From admin at opensuse.org Fri Nov 1 06:47:21 2019 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Nov 2019 06:47:21 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5dbbd4fe96b25_19182ad482dc060084941c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Raspbian_10/armv7l Package network:osmocom:nightly/limesuite failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 785s] [ 85%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o [ 785s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -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 -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/LTEpackets -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/src/HPM7 -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -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 -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlLimeSDR.cpp [ 786s] [ 86%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o [ 786s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -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 -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/LTEpackets -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/src/HPM7 -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -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 -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlGPIO.cpp [ 801s] [ 87%] Linking CXX executable ../bin/LimeSuiteGUI [ 801s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/LimeSuiteGUI.dir/link.txt --verbose=1 [ 801s] /usr/bin/c++ -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 -O3 -DNDEBUG -Wl,-z,relro -rdynamic CMakeFiles/LimeSuiteGUI.dir/ADF4002/ADF4002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlXBUF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCalibrations_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTRF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCDS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLimeLightPAD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIST_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewIRAM.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_gui_utilities.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlSX_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgVCOfrequencies.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLDO_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlAFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlGains_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/CoefficientFileParser.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_mainPanel.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/pnlBoardControls.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewSFR.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCLKGEN_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlMCU_BD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIAS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgGFIR_Coefficients.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlR3.cpp.o CMakeFiles/LimeSuiteGUI.dir/LMS_Programing/LMS_Programing_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgConnectionSettings.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlMiniLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/SPI_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgFullMessageLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgDeviceInfo.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/utilities_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteAppFrame.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/lms7002m_novena_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/RFSpark/RFSpark_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/Si5351C/Si5351C_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp.cpp.o CMakeFiles/LimeSuiteGUI.dir/FPGAcontrols_wxgui/FPGAcontrols_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/HPM7/HPM7_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/dlgAbout.cpp.o CMakeFiles/LimeSuiteGUI.dir/numericSlider/numericSlider.cpp.o CMakeFiles/LimeSuiteGUI.dir/myriad7/myriad7_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_frFFTviewer.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteEvents/lms7suiteEvents.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlQSpark.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnluLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlUltimateEVB.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBuffers.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlCoreSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeNetMicro.cpp.o CMakeFiles/LimeSuiteGUI.dir/__/external/kissFFT/kiss_fft.c.o CMakeFiles/LimeSuiteGUI.dir/windowFunction.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -o ../bin/LimeSuiteGUI -Wl,-rpath,/usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src: libLimeSuite.so.19.04.0 oglGraph/liboglGraph.a -L/usr/lib/arm-linux-gnueabihf -pthread -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 -lusb-1.0 -lGL -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 [ 807s] /usr/bin/ld: libLimeSuite.so.19.04.0: undefined reference to `__atomic_store_8' [ 807s] /usr/bin/ld: libLimeSuite.so.19.04.0: undefined reference to `__atomic_load_8' [ 807s] collect2: error: ld returned 1 exit status [ 807s] make[3]: *** [src/CMakeFiles/LimeSuiteGUI.dir/build.make:975: bin/LimeSuiteGUI] Error 1 [ 807s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 807s] make[2]: *** [CMakeFiles/Makefile2:142: src/CMakeFiles/LimeSuiteGUI.dir/all] Error 2 [ 807s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 807s] make[1]: *** [Makefile:133: all] Error 2 [ 807s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 807s] dh_auto_build: cd obj-arm-linux-gnueabihf && make -j4 returned exit code 2 [ 807s] make: *** [debian/rules:28: binary] Error 2 [ 807s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 807s] [ 807s] armbuild04 failed "build limesuite_19.04.0-1.dsc" at Fri Nov 1 06:47:06 UTC 2019. [ 807s] [ 807s] ### VM INTERACTION START ### [ 810s] [ 778.131635] sysrq: SysRq : Power Off [ 810s] [ 778.146554] reboot: Power down [ 810s] ### VM INTERACTION END ### [ 810s] [ 810s] armbuild04 failed "build limesuite_19.04.0-1.dsc" at Fri Nov 1 06:47:09 UTC 2019. [ 810s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 1 06:50:13 2019 From: admin at opensuse.org (OBS Notification) Date: Fri, 01 Nov 2019 06:50:13 +0000 Subject: Build failure of network:osmocom:latest/limesuite in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5dbbd5b46d16a_19182ad482dc060084983c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/limesuite/Raspbian_10/armv7l Package network:osmocom:latest/limesuite failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest limesuite Last lines of build log: [ 950s] [ 81%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o [ 950s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -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 -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/LTEpackets -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/src/HPM7 -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -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 -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlLimeSDR.cpp [ 955s] [ 82%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o [ 955s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -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 -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/LTEpackets -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/src/HPM7 -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -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 -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlGPIO.cpp [ 965s] [ 83%] Linking CXX executable ../bin/LimeSuiteGUI [ 965s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/LimeSuiteGUI.dir/link.txt --verbose=1 [ 966s] /usr/bin/c++ -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 -O3 -DNDEBUG -Wl,-z,relro -rdynamic CMakeFiles/LimeSuiteGUI.dir/ADF4002/ADF4002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlXBUF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCalibrations_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTRF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCDS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLimeLightPAD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIST_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewIRAM.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_gui_utilities.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlSX_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgVCOfrequencies.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLDO_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlAFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlGains_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/CoefficientFileParser.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_mainPanel.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/pnlBoardControls.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewSFR.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCLKGEN_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlMCU_BD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIAS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgGFIR_Coefficients.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlR3.cpp.o CMakeFiles/LimeSuiteGUI.dir/LMS_Programing/LMS_Programing_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgConnectionSettings.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlMiniLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/SPI_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgFullMessageLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgDeviceInfo.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/utilities_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteAppFrame.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/lms7002m_novena_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/RFSpark/RFSpark_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/Si5351C/Si5351C_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp.cpp.o CMakeFiles/LimeSuiteGUI.dir/FPGAcontrols_wxgui/FPGAcontrols_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/HPM7/HPM7_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/dlgAbout.cpp.o CMakeFiles/LimeSuiteGUI.dir/numericSlider/numericSlider.cpp.o CMakeFiles/LimeSuiteGUI.dir/myriad7/myriad7_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_frFFTviewer.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteEvents/lms7suiteEvents.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlQSpark.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnluLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlUltimateEVB.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBuffers.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlCoreSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeNetMicro.cpp.o CMakeFiles/LimeSuiteGUI.dir/__/external/kissFFT/kiss_fft.c.o CMakeFiles/LimeSuiteGUI.dir/windowFunction.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -o ../bin/LimeSuiteGUI -Wl,-rpath,/usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src: libLimeSuite.so.19.04.0 oglGraph/liboglGraph.a -L/usr/lib/arm-linux-gnueabihf -pthread -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 -lusb-1.0 -lGL -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 [ 971s] /usr/bin/ld: libLimeSuite.so.19.04.0: undefined reference to `__atomic_store_8' [ 971s] /usr/bin/ld: libLimeSuite.so.19.04.0: undefined reference to `__atomic_load_8' [ 971s] collect2: error: ld returned 1 exit status [ 971s] make[3]: *** [src/CMakeFiles/LimeSuiteGUI.dir/build.make:975: bin/LimeSuiteGUI] Error 1 [ 971s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 971s] make[2]: *** [CMakeFiles/Makefile2:142: src/CMakeFiles/LimeSuiteGUI.dir/all] Error 2 [ 971s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 971s] make[1]: *** [Makefile:133: all] Error 2 [ 971s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 971s] dh_auto_build: cd obj-arm-linux-gnueabihf && make -j2 returned exit code 2 [ 971s] make: *** [debian/rules:28: binary] Error 2 [ 971s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 971s] [ 971s] armbuild25 failed "build limesuite_19.04.0-1.dsc" at Fri Nov 1 06:50:09 UTC 2019. [ 971s] [ 971s] ### VM INTERACTION START ### [ 974s] [ 947.345831] sysrq: SysRq : Power Off [ 974s] [ 947.360557] reboot: Power down [ 975s] ### VM INTERACTION END ### [ 975s] [ 975s] armbuild25 failed "build limesuite_19.04.0-1.dsc" at Fri Nov 1 06:50:12 UTC 2019. [ 975s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 1 10:14:49 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 1 Nov 2019 10:14:49 +0000 Subject: Change in libosmocore[master]: l1sap: add measurement related struct members In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15888 to look at the new patch set (#3). Change subject: l1sap: add measurement related struct members ...................................................................... l1sap: add measurement related struct members In order to dissolve info_meas_ind_param in ph_data_param and ph_tch_param we need to add the measurement related struct members to ph_data_param and ph_tch_param as well so that those indications can also carry measurement data. Change-Id: I2c34b02d329f9df190c5035c396403ca0a4f9c42 Related: OS#2977 --- M include/osmocom/gsm/l1sap.h 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/88/15888/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15888 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2c34b02d329f9df190c5035c396403ca0a4f9c42 Gerrit-Change-Number: 15888 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 10:46:24 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 1 Nov 2019 10:46:24 +0000 Subject: Change in osmo-bts[master]: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/15918 to look at the new patch set (#2). Change subject: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH ...................................................................... l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH The MPH INFO MEAS IND indication, which contains the uplink measurement data is sent in parallel to the PH DATA and TCH indications as a separate indications. This makes the overall uplink measurement data processing unnecessarly complex. So lets put the data that is relevant for measurement into the PH DATA and TCH indications directly. This change only affects osmo-bts-trx at the moment. In order to keep the upper layers (l1sap.c) compatible we add an autodection to switch between separate measurement indications and included measurement data. Related: OS#2977 Depends: libosmocore I2c34b02d329f9df190c5035c396403ca0a4f9c42 Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84 --- M include/osmo-bts/scheduler_backend.h M src/common/l1sap.c M src/common/scheduler.c M src/osmo-bts-trx/l1_if.c M src/osmo-bts-trx/l1_if.h M src/osmo-bts-trx/scheduler_trx.c 6 files changed, 114 insertions(+), 99 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/18/15918/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15918 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84 Gerrit-Change-Number: 15918 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 11:03:05 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Fri, 1 Nov 2019 11:03:05 +0000 Subject: Change in libosmocore[master]: sim: allow opening reader# > 0 In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15927 to look at the new patch set (#3). Change subject: sim: allow opening reader# > 0 ...................................................................... sim: allow opening reader# > 0 Change-Id: I4b1abc8d8aae4bd9a32f927269d7ebfef902d7c5 --- M src/sim/reader_pcsc.c M utils/osmo-sim-test.c 2 files changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/15927/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15927 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4b1abc8d8aae4bd9a32f927269d7ebfef902d7c5 Gerrit-Change-Number: 15927 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 11:13:47 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 1 Nov 2019 11:13:47 +0000 Subject: Change in osmo-bsc[master]: gsm_data.h: Remove unused field classmark from gsm_subscriber_connection In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15921 ) Change subject: gsm_data.h: Remove unused field classmark from gsm_subscriber_connection ...................................................................... Patch Set 1: I don't have a strong opinion but I think it makes more sense to keep parsed "ready-to-use" values rathe than a whole classmark struct as it comes from the wire. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15921 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: If2826a8f334afabfa3a0198a0bc1eed009962c81 Gerrit-Change-Number: 15921 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 01 Nov 2019 11:13:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 11:17:05 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 1 Nov 2019 11:17:05 +0000 Subject: Change in osmo-hlr[master]: hlr.sql: move comment In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15928 ) Change subject: hlr.sql: move comment ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15928 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id66ad68dd3f22d533fc3a428223ea6ad0282bde0 Gerrit-Change-Number: 15928 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 11:17:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 11:20:22 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 1 Nov 2019 11:20:22 +0000 Subject: Change in osmo-hlr[master]: db.c: code dup: add db_run_statements() for arrays of statements In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15929 ) Change subject: db.c: code dup: add db_run_statements() for arrays of statements ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I2721dfc0a9aadcc7f5ac81a1c0fa87452098996f Gerrit-Change-Number: 15929 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 11:20:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 11:23:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 1 Nov 2019 11:23:53 +0000 Subject: Change in libosmocore[master]: cosmetic: gsm_04_08.h: Fix trailing whitespace In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15922 ) Change subject: cosmetic: gsm_04_08.h: Fix trailing whitespace ...................................................................... cosmetic: gsm_04_08.h: Fix trailing whitespace Change-Id: I4b34dbd5f0176d1d8aa8cc96f642ed35d4214b7e --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 2be6ed3..6a6c7f3 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -954,7 +954,7 @@ #if OSMO_IS_LITTLE_ENDIAN uint8_t l2_plen; uint8_t rr_protocol_discriminator :4, - skip_indicator:4; + skip_indicator:4; uint8_t system_information; #elif OSMO_IS_BIG_ENDIAN /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ @@ -1104,7 +1104,7 @@ struct gsm48_system_information_type_5 { #if OSMO_IS_LITTLE_ENDIAN uint8_t rr_protocol_discriminator :4, - skip_indicator:4; + skip_indicator:4; uint8_t system_information; uint8_t bcch_frequency_list[16]; #elif OSMO_IS_BIG_ENDIAN @@ -1149,7 +1149,7 @@ struct gsm48_system_information_type_6 { #if OSMO_IS_LITTLE_ENDIAN uint8_t rr_protocol_discriminator :4, - skip_indicator:4; + skip_indicator:4; uint8_t system_information; uint16_t cell_identity; struct gsm48_loc_area_id lai; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15922 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4b34dbd5f0176d1d8aa8cc96f642ed35d4214b7e Gerrit-Change-Number: 15922 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 12:20:33 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 12:20:33 +0000 Subject: Change in osmo-hlr[master]: db.c: code dup: add db_run_statements() for arrays of statements In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15929 ) Change subject: db.c: code dup: add db_run_statements() for arrays of statements ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I2721dfc0a9aadcc7f5ac81a1c0fa87452098996f Gerrit-Change-Number: 15929 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 12:20:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 12:47:23 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 1 Nov 2019 12:47:23 +0000 Subject: Change in osmo-bts[master]: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/15918 to look at the new patch set (#3). Change subject: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH ...................................................................... l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH The MPH INFO MEAS IND indication, which contains the uplink measurement data is sent in parallel to the PH DATA and TCH indications as a separate indications. This makes the overall uplink measurement data processing unnecessarly complex. So lets put the data that is relevant for measurement into the PH DATA and TCH indications directly. This change only affects osmo-bts-trx at the moment. In order to keep the upper layers (l1sap.c) compatible we add an autodection to switch between separate measurement indications and included measurement data. Related: OS#2977 Depends: libosmocore I2c34b02d329f9df190c5035c396403ca0a4f9c42 Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84 --- M include/osmo-bts/scheduler_backend.h M src/common/l1sap.c M src/common/scheduler.c M src/osmo-bts-trx/l1_if.c M src/osmo-bts-trx/l1_if.h M src/osmo-bts-trx/scheduler_trx.c 6 files changed, 114 insertions(+), 99 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/18/15918/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15918 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84 Gerrit-Change-Number: 15918 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 13:37:59 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 13:37:59 +0000 Subject: Change in libosmocore[master]: fsm: add osmo_fsm_set_term_stops_actions() In-Reply-To: References: Message-ID: neels has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15833 ) Change subject: fsm: add osmo_fsm_set_term_stops_actions() ...................................................................... Abandoned merged as https://gerrit.osmocom.org/c/libosmocore/+/15896 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0adc13a1a998e953b6c850efa2761350dd07e03a Gerrit-Change-Number: 15833 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 13:38:06 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 13:38:06 +0000 Subject: Change in libosmocore[master]: fsm_dealloc_test: enable term_stops_actions In-Reply-To: References: Message-ID: neels has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15834 ) Change subject: fsm_dealloc_test: enable term_stops_actions ...................................................................... Abandoned merged as https://gerrit.osmocom.org/c/libosmocore/+/15896 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15834 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iff7843e12ce49f169f8c36b14fdb19935f61274d Gerrit-Change-Number: 15834 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: fixeria Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 13:42:15 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 13:42:15 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_is_nonzero() In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15835 ) Change subject: add osmo_sockaddr_str_is_nonzero() ...................................................................... add osmo_sockaddr_str_is_nonzero() Often, an IP address of 0.0.0.0 is considered an unset value (for clients requiring a server address; not for listening on "any"). osmo_sockaddr_str_is_set() does return false when the port is 0, but there is no simple way to tell whether the IP address is actually set to a server address. Add osmo_sockaddr_str_is_nonzero() to return false if: - the port is zero, or - the IP address is zero (0.0.0.0 or ::0), or - the IP address cannot be parsed. A practical use example: osmo-msc so far accepts an RTP IP address of 0.0.0.0 as valid. I noticed when trying to trigger error handling from a ttcn3 test. osmo-msc can use this function to reject invalid addresses from MGCP messages. Related: I53ddb19a70fda3deb906464e1b89c12d9b4c7cbd (osmo-msc) Change-Id: I73cbcab90cffcdc9a5f8d5281c57c1f87b2c3550 --- M include/osmocom/core/sockaddr_str.h M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 4 files changed, 87 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index d16dc86..d47b2a4 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -65,6 +65,7 @@ #define OSMO_SOCKADDR_STR_FMT_ARGS(R) ((R)? (R)->ip : "NULL"), ((R)? (R)->port : 0) bool osmo_sockaddr_str_is_set(const struct osmo_sockaddr_str *sockaddr_str); +bool osmo_sockaddr_str_is_nonzero(const struct osmo_sockaddr_str *sockaddr_str); int osmo_sockaddr_str_from_str(struct osmo_sockaddr_str *sockaddr_str, const char *ip, uint16_t port); diff --git a/src/sockaddr_str.c b/src/sockaddr_str.c index d683c7d..f523050 100644 --- a/src/sockaddr_str.c +++ b/src/sockaddr_str.c @@ -66,6 +66,35 @@ && (sockaddr_str->af == AF_INET || sockaddr_str->af == AF_INET6); } +/*! Return true if IP and port are valid and nonzero. + * \param[in] sockaddr_str The instance to examine. + * \return True iff ip can be converted to a nonzero IP address, and port is not 0. + */ +bool osmo_sockaddr_str_is_nonzero(const struct osmo_sockaddr_str *sockaddr_str) +{ + uint32_t ipv4; + struct in6_addr ipv6_zero = {}; + struct in6_addr ipv6; + + if (!osmo_sockaddr_str_is_set(sockaddr_str)) + return false; + + switch (sockaddr_str->af) { + case AF_INET: + if (osmo_sockaddr_str_to_32(sockaddr_str, &ipv4)) + return false; + return ipv4 != 0; + + case AF_INET6: + if (osmo_sockaddr_str_to_in6_addr(sockaddr_str, &ipv6)) + return false; + return memcmp(&ipv6, &ipv6_zero, sizeof(ipv6)) != 0; + + default: + return false; + } +} + /*! Distinguish between valid IPv4 and IPv6 strings. * This does not verify whether the string is a valid IP address; it assumes that the input is a valid IP address, and * on that premise returns whether it is an IPv4 or IPv6 string, by looking for '.' and ':' characters. It is safe to diff --git a/tests/sockaddr_str/sockaddr_str_test.c b/tests/sockaddr_str/sockaddr_str_test.c index d2e7944..4284387 100644 --- a/tests/sockaddr_str/sockaddr_str_test.c +++ b/tests/sockaddr_str/sockaddr_str_test.c @@ -53,6 +53,8 @@ { .af = AF_INET, .ip = "1.2.3.4", .port = 0 }, { .af = AF_INET, .ip = "1.2.3:4:5", .port = 0 }, { .af = AF_INET6, .ip = "::1:10.9.8.7", .port = 1 }, + { .af = AF_INET, .ip = "0.0.0.0", .port = 5 }, + { .af = AF_INET6, .ip = "::", .port = 5 }, }; const char *af_name(int af) @@ -106,6 +108,7 @@ dump_oip(x); printf(" osmo_sockaddr_str_is_set() = %s\n", osmo_sockaddr_str_is_set(x) ? "true" : "false"); + printf(" osmo_sockaddr_str_is_nonzero() = %s\n", osmo_sockaddr_str_is_nonzero(x) ? "true" : "false"); { struct in_addr a = {}; diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index d69314d..781e9d1 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -2,6 +2,7 @@ { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=01020304 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 @@ -19,6 +20,7 @@ { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_is_set() = false + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=00000000 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 @@ -36,6 +38,7 @@ { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=ffffffff -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 @@ -53,6 +56,7 @@ { .af = AF_INET, .ip = "0.0.0.256", .port = 1 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 @@ -65,6 +69,7 @@ { .af = AF_INET, .ip = "not an ip address", .port = 1 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 @@ -77,6 +82,7 @@ { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00010002000300000000000000000004 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } @@ -92,6 +98,7 @@ { .af = AF_INET6, .ip = "::", .port = 0 } osmo_sockaddr_str_is_set() = false + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } @@ -107,6 +114,7 @@ { .af = AF_INET6, .ip = "::1", .port = 0 } osmo_sockaddr_str_is_set() = false + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000001 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } @@ -122,6 +130,7 @@ { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=ffffffffffffffffffffffffffffffff -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -137,6 +146,7 @@ { .af = AF_INET6, .ip = "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", .port = 65535 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=ffffffffffffffffffffffffffffffff -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -155,6 +165,7 @@ { .af = AF_INET6, .ip = "::fffff", .port = 1 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 @@ -167,6 +178,7 @@ { .af = AF_INET6, .ip = "not an ip address", .port = 1 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 @@ -179,6 +191,7 @@ { .af = AF_INET6, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 @@ -192,6 +205,7 @@ { .af = AF_INET, .ip = "1:2:3::4", .port = 5 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 @@ -205,6 +219,7 @@ { .af = AF_UNSPEC, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_is_set() = false + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 @@ -218,6 +233,7 @@ { .af = AF_INET, .ip = "", .port = 5 } osmo_sockaddr_str_is_set() = false + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 @@ -230,6 +246,7 @@ { .af = AF_INET6, .ip = "", .port = 5 } osmo_sockaddr_str_is_set() = false + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 @@ -242,6 +259,7 @@ { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_is_set() = false + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=01020304 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 @@ -259,6 +277,7 @@ { .af = AF_INET, .ip = "1.2.3:4:5", .port = 0 } osmo_sockaddr_str_is_set() = false + osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 @@ -272,6 +291,7 @@ { .af = AF_INET6, .ip = "::1:10.9.8.7", .port = 1 } osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=0000000000000000000000010a090807 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } @@ -286,3 +306,37 @@ -> osmo_sockaddr_str_from_sockaddr() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } DIFFERS! osmo_sockaddr_str_from_str() rc == 0 { .af = AF_INET6, .ip = "::1:10.9.8.7", .port = 1 } + + +{ .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = false + osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=00000000 + -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 + osmo_sockaddr_str_to_32() rc == 0 uint32_t=0x0 + -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0x0 + -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005000000000000000000000000 + -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 + osmo_sockaddr_str_to_sockaddr() rc == 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + -> osmo_sockaddr_str_from_sockaddr() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + osmo_sockaddr_str_from_str() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + + +{ .af = AF_INET6, .ip = "::", .port = 5 } + osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = false + osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 + osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 + -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 + osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 + -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + osmo_sockaddr_str_to_sockaddr() rc == 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + -> osmo_sockaddr_str_from_sockaddr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + osmo_sockaddr_str_from_str() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15835 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I73cbcab90cffcdc9a5f8d5281c57c1f87b2c3550 Gerrit-Change-Number: 15835 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:08:57 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:08:57 +0000 Subject: Change in osmo-bsc[master]: Remove unused API classmark_is_r99() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15920 ) Change subject: Remove unused API classmark_is_r99() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15920 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6763d8c894f0a0555a9801bddbc0a12c2b945599 Gerrit-Change-Number: 15920 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 01 Nov 2019 14:08:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:09:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:09:06 +0000 Subject: Change in osmo-bsc[master]: gsm_data.h: Remove unused field classmark from gsm_subscriber_connection In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15921 ) Change subject: gsm_data.h: Remove unused field classmark from gsm_subscriber_connection ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15921 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: If2826a8f334afabfa3a0198a0bc1eed009962c81 Gerrit-Change-Number: 15921 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 01 Nov 2019 14:09:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:09:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:09:16 +0000 Subject: Change in osmo-bsc[master]: gsm_data.h: Remove unused func declarations In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15925 ) Change subject: gsm_data.h: Remove unused func declarations ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15925 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I189d34b6db78de749e1901733d0df35411e0d583 Gerrit-Change-Number: 15925 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 01 Nov 2019 14:09:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:09:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:09:17 +0000 Subject: Change in osmo-bsc[master]: Remove unused API classmark_is_r99() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15920 ) Change subject: Remove unused API classmark_is_r99() ...................................................................... Remove unused API classmark_is_r99() Furthermore, similar API already exist in libosmocore: osmo_gsm48_classmark_is_r99() Change-Id: I6763d8c894f0a0555a9801bddbc0a12c2b945599 --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/gsm_data.c 2 files changed, 0 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index f6d6d5e..c9595fa 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1744,8 +1744,6 @@ int gsm_bts_get_radio_link_timeout(const struct gsm_bts *bts); void gsm_bts_set_radio_link_timeout(struct gsm_bts *bts, int value); -bool classmark_is_r99(struct gsm_classmark *cm); - bool trx_is_usable(const struct gsm_bts_trx *trx); bool ts_is_usable(const struct gsm_bts_trx_ts *ts); diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index c2cfacf..88981c0 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -367,16 +367,6 @@ } } -bool classmark_is_r99(struct gsm_classmark *cm) -{ - int rev_lev = 0; - if (cm->classmark1_set) - rev_lev = cm->classmark1.rev_lev; - else if (cm->classmark2_len > 0) - rev_lev = (cm->classmark2[0] >> 5) & 0x3; - return rev_lev >= 2; -} - static const struct osmo_stat_item_desc bts_stat_desc[] = { { "chanloadavg", "Channel load average.", "%", 16, 0 }, { "T3122", "T3122 IMMEDIATE ASSIGNMENT REJECT wait indicator.", "s", 16, GSM_T3122_DEFAULT }, -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15920 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6763d8c894f0a0555a9801bddbc0a12c2b945599 Gerrit-Change-Number: 15920 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:09:18 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:09:18 +0000 Subject: Change in osmo-bsc[master]: gsm_data.h: Remove unused field classmark from gsm_subscriber_connection In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15921 ) Change subject: gsm_data.h: Remove unused field classmark from gsm_subscriber_connection ...................................................................... gsm_data.h: Remove unused field classmark from gsm_subscriber_connection Change-Id: If2826a8f334afabfa3a0198a0bc1eed009962c81 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index c9595fa..c940f7b 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -242,9 +242,6 @@ * operation. If a Handover was successful, all relevant state must be copied out of this sub-struct. */ struct handover ho; - /* buffer/cache for classmark of the ME of the subscriber */ - struct gsm_classmark classmark; - /* Queue DTAP messages during handover/assignment (msgb_enqueue()/msgb_dequeue())*/ struct llist_head dtap_queue; unsigned int dtap_queue_len; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15921 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: If2826a8f334afabfa3a0198a0bc1eed009962c81 Gerrit-Change-Number: 15921 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:09:18 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:09:18 +0000 Subject: Change in osmo-bsc[master]: gsm_data.h: Remove unused func declarations In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15925 ) Change subject: gsm_data.h: Remove unused func declarations ...................................................................... gsm_data.h: Remove unused func declarations Change-Id: I189d34b6db78de749e1901733d0df35411e0d583 --- M include/osmocom/bsc/gsm_data.h 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index c940f7b..ca9d294 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1705,9 +1705,6 @@ struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *network); -struct gsm_subscriber_connection *msc_subscr_con_allocate(struct gsm_network *network); -void msc_subscr_con_free(struct gsm_subscriber_connection *conn); - struct gsm_bts *gsm_bts_alloc_register(struct gsm_network *net, enum gsm_bts_type type, uint8_t bsic); struct gsm_bts *bsc_bts_alloc_register(struct gsm_network *net, enum gsm_bts_type type, uint8_t bsic); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15925 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I189d34b6db78de749e1901733d0df35411e0d583 Gerrit-Change-Number: 15925 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:11:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:11:30 +0000 Subject: Change in osmo-hlr[master]: db upgrade to v2: log version 2, not 1 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15910 ) Change subject: db upgrade to v2: log version 2, not 1 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15910 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I9237b64e5748e693a5f039c5a5554d417eed3633 Gerrit-Change-Number: 15910 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 14:11:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:51:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:51:49 +0000 Subject: Change in osmo-hlr[master]: add --db-check option In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15912 ) Change subject: add --db-check option ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15912 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I1a4b3360690acd2cd3cffdadffbb00a28d421316 Gerrit-Change-Number: 15912 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 01 Nov 2019 14:51:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:57:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:57:05 +0000 Subject: Change in osmo-hlr[master]: hlr.sql: move comment In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15928 ) Change subject: hlr.sql: move comment ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15928 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id66ad68dd3f22d533fc3a428223ea6ad0282bde0 Gerrit-Change-Number: 15928 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 14:57:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:57:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:57:35 +0000 Subject: Change in osmo-hlr[master]: add db_upgrade test In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15913 ) Change subject: add db_upgrade test ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I0961bab0e17cfde5b030576c5bc243c2b51d9dc4 Gerrit-Change-Number: 15913 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 14:57:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:58:23 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:58:23 +0000 Subject: Change in osmo-hlr[master]: hlr db schema 3: hlr_number -> msc_number In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15914 ) Change subject: hlr db schema 3: hlr_number -> msc_number ...................................................................... Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15914 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I527e8627b24b79f3e9eec32675c7f5a3a6d25440 Gerrit-Change-Number: 15914 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Fri, 01 Nov 2019 14:58:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 14:59:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 14:59:49 +0000 Subject: Change in osmo-hlr[master]: db.c: code dup: add db_run_statements() for arrays of statements In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15929 ) Change subject: db.c: code dup: add db_run_statements() for arrays of statements ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I2721dfc0a9aadcc7f5ac81a1c0fa87452098996f Gerrit-Change-Number: 15929 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 14:59:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 15:00:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 15:00:05 +0000 Subject: Change in osmo-hlr[master]: add osmo_gsup_msgb_alloc() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15915 ) Change subject: add osmo_gsup_msgb_alloc() ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e Gerrit-Change-Number: 15915 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 01 Nov 2019 15:00:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 15:00:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 15:00:47 +0000 Subject: Change in osmo-hlr[master]: add osmo_gsup_conn_send_err_reply() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15916 ) Change subject: add osmo_gsup_conn_send_err_reply() ...................................................................... Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15916 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I792fd9993ab2a323af58782a357d71205c43b72a Gerrit-Change-Number: 15916 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 01 Nov 2019 15:00:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 15:08:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 15:08:41 +0000 Subject: Change in libosmocore[master]: sim: allow opening reader# > 0 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15927 ) Change subject: sim: allow opening reader# > 0 ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15927/3/utils/osmo-sim-test.c File utils/osmo-sim-test.c: https://gerrit.osmocom.org/c/libosmocore/+/15927/3/utils/osmo-sim-test.c at 339 PS3, Line 339: f(argc > 1) : readernum = atoi(argv[1]); I would prefer some proper getopt here, rather than just using the full argument. The tool is likely to get more options in the future, meaning named arguments are better than positional arguments. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15927 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4b1abc8d8aae4bd9a32f927269d7ebfef902d7c5 Gerrit-Change-Number: 15927 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 01 Nov 2019 15:08:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 15:09:57 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 15:09:57 +0000 Subject: Change in libosmocore[master]: l1sap: add measurement related struct members In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15888 ) Change subject: l1sap: add measurement related struct members ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15888/3/include/osmocom/gsm/l1sap.h File include/osmocom/gsm/l1sap.h: https://gerrit.osmocom.org/c/libosmocore/+/15888/3/include/osmocom/gsm/l1sap.h at 99 PS3, Line 99: int16_t ta_offs_qbits; /*!< timing advance offset (in qbits) */ : int16_t ta_offs_256bits;/*!< timing advance offset (in 1/256th bits) */ why a union why not always stort 256ths? If somebody has or wants a quarter-bit, they cna do the bit-shifting themselves? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15888 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2c34b02d329f9df190c5035c396403ca0a4f9c42 Gerrit-Change-Number: 15888 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 01 Nov 2019 15:09:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 15:24:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 1 Nov 2019 15:24:44 +0000 Subject: Change in osmo-bsc[master]: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed wh... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15909 ) Change subject: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed when the BTS configured with none combined CCCH mode. ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I33ea7808ac1bd064b88fd609bd7dfe0c8aa341f2 Gerrit-Change-Number: 15909 Gerrit-PatchSet: 1 Gerrit-Owner: mqng2 Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 15:24:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 16:00:19 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 16:00:19 +0000 Subject: Change in osmo-bsc[master]: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed wh... In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15909 ) Change subject: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed when the BTS configured with none combined CCCH mode. ...................................................................... Patch Set 1: Code-Review-1 (4 comments) https://gerrit.osmocom.org/c/osmo-bsc/+/15909/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bsc/+/15909/1//COMMIT_MSG at 7 PS1, Line 7: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed when the BTS configured with none combined CCCH mode. Please make this line shorter, for example: "RSL: fix: use proper CCCH_CONFIG in SI3 for non-combined CCCH". MO call failures are consequences of the incorrect CCCH_CONFIG value, you already mention that in the message below. https://gerrit.osmocom.org/c/osmo-bsc/+/15909/1//COMMIT_MSG at 10 PS1, Line 10: the CCCH is configured in none combined with SDCCH (a dedicated TS is configured for SDCCH) This looks very confusing. I first thought you somehow managed to combine SDCCH with NONE :) I am not a native speaker, but IMHO this would be much cleaner: "... when the network is configured to use non-combined CCCH". https://gerrit.osmocom.org/c/osmo-bsc/+/15909/1//COMMIT_MSG at 24 PS1, Line 24: it turns out that the BTS broadcasts wrong CCCH_CONF=1 I confirm that we have a bug in OsmoBSC. Just manually tested with both 'CCCH' and 'CCCH+SDCCH4' channel combinations, and in both cases SI3 contains: 001 = CCCH-CONF: 1 basic physical channel used for CCCH, combined with SDCCHs (1) We need a TTCN-3 test case to reproduce the problem (should be easy to implement). Could you please create a ticket at http://osmocom.org/projects/osmobsc/issues/new ? https://gerrit.osmocom.org/c/osmo-bsc/+/15909/1/src/osmo-bsc/bsc_vty.c File src/osmo-bsc/bsc_vty.c: https://gerrit.osmocom.org/c/osmo-bsc/+/15909/1/src/osmo-bsc/bsc_vty.c at 4304 PS1, Line 4304: cfg_ts_pchan > I fixed at this at first but it did not fix the issue. Fixing in the cfg_ts_pchan_compt solved the problem. Most likely, because you're using the old-style uppercase pchan type names. I think we need to fix both functions. Otherwise the bug will still affect configuration files with the lowercase names. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I33ea7808ac1bd064b88fd609bd7dfe0c8aa341f2 Gerrit-Change-Number: 15909 Gerrit-PatchSet: 1 Gerrit-Owner: mqng2 Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 16:00:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 16:13:49 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 16:13:49 +0000 Subject: Change in osmo-bsc[master]: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed wh... In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15909 ) Change subject: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed when the BTS configured with none combined CCCH mode. ...................................................................... Patch Set 1: Code-Review-2 (1 comment) Adding Neels as he is the (most likely) author of the related code. https://gerrit.osmocom.org/c/osmo-bsc/+/15909/1/src/osmo-bsc/bsc_vty.c File src/osmo-bsc/bsc_vty.c: https://gerrit.osmocom.org/c/osmo-bsc/+/15909/1/src/osmo-bsc/bsc_vty.c at 4341 PS1, Line 4341: pchan_is Furthermore, as far as I can see from include/osmocom/bsc/gsm_data.h: - pchan_from_config - channel configuration from the configuration file (can be changed from the VTY at runtime, should not affect the existing RSL/OML connections); - pchan_on_init - channel configuration after the OML link is established (pchan_from_config is copied here); - pchan_is - the *actual* channel configuration currently active. The question is why pchan_is does not reflect the _actual_ channel configuration? I think the problem is somewhere deeper in the code (src/osmo-bsc/timeslot_fsm.c?). And most likely this patch is not the right solution, because we shall not change the actual channel configuration from the VTY. Sorry. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I33ea7808ac1bd064b88fd609bd7dfe0c8aa341f2 Gerrit-Change-Number: 15909 Gerrit-PatchSet: 1 Gerrit-Owner: mqng2 Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 16:13:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 16:38:40 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 16:38:40 +0000 Subject: Change in osmo-mgw[master]: fix use-after-free: require new fsm deferred dealloc, check for term In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/15839 to look at the new patch set (#3). Change subject: fix use-after-free: require new fsm deferred dealloc, check for term ...................................................................... fix use-after-free: require new fsm deferred dealloc, check for term API doc: require osmo_fsm_set_dealloc_ctx(). mgcp_client during delete: do not reparent the FSM when it is already terminating. I have recently discovered a vulnerability: if an endpoint FSM deallocates during event handling of a successful MGCP response, this causes a use-after-free; and once that is fixed, a state change on the already terminated FSM causes a pointer corruption by using already cleaned data structures. osmo_fsm_set_dealloc_ctx() fixes the use-after-free, and osmo_fsm_set_term_stops_actions() fixes the pointer corruption. Related: Ib7fce7b7d54dfb87af97544796680919e5929a50 (osmo-bsc), I08c03946605aa12e0a5ce8b3c773704ef5327a7a (osmo-msc) Depends: Ief4dba9ea587c9b4aea69993e965fbb20fb80e78 (libosmocore), I0adc13a1a998e953b6c850efa2761350dd07e03a (libosmocore) Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 --- M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c M src/libosmo-mgcp-client/mgcp_client_fsm.c 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/39/15839/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 Gerrit-Change-Number: 15839 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 16:40:46 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 16:40:46 +0000 Subject: Change in osmo-bsc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/15841 to look at the new patch set (#2). Change subject: fsm: use deferred deallocation ...................................................................... fsm: use deferred deallocation Since osmo-bsc uses the MGCP client FSMs, it is required to enable this new feature to guarantee safe operation. The issue is described in detail in commit logs linked below. Depends: Ief4dba9ea587c9b4aea69993e965fbb20fb80e78 (libosmocore), I0adc13a1a998e953b6c850efa2761350dd07e03a (libosmocore) Related: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 (osmo-mgw) Change-Id: Ib7fce7b7d54dfb87af97544796680919e5929a50 --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/41/15841/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib7fce7b7d54dfb87af97544796680919e5929a50 Gerrit-Change-Number: 15841 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 16:43:05 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 1 Nov 2019 16:43:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Allow setting expected ms max power level with module param References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15930 ) Change subject: bsc: Allow setting expected ms max power level with module param ...................................................................... bsc: Allow setting expected ms max power level with module param It will allow changing ms max power in osmo-bsc.cfg as well as TTCN3 expactancies in BSC_Tests.cfg easily in docker-playground.git without needing to recompile or change code in TTCN3. Change-Id: Ib00c96902377582bc32778c5b947a6b4274041aa --- M bsc/BSC_Tests.ttcn 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/30/15930/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index e25bf7f..1cced21 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -130,6 +130,8 @@ unconditionally once new version of osmo-bsc is released (current version: 1.4.1) */ boolean mp_enable_osmux_test := true; + /* Value set in osmo-bsc.cfg "ms max power" */ + uint8_t mp_bsc_cfg_ms_max_power := 7; } private function f_gen_test_hdlr_pars() return TestHdlrParams { @@ -140,6 +142,7 @@ } else { pars.aoip := false; } + pars.exp_ms_power_level := mp_bsc_cfg_ms_max_power; return pars; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15930 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib00c96902377582bc32778c5b947a6b4274041aa Gerrit-Change-Number: 15930 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 16:45:28 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 16:45:28 +0000 Subject: Change in osmo-mgw[master]: accept MGCP without SDP In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/15840 ) Change subject: accept MGCP without SDP ...................................................................... accept MGCP without SDP SDP is an optional part of MGCP messages. Do not fail when there is no SDP part. Practically this is useful to compose simpler MGCP responses from TTCN3 tests. osmo-mgw itself always includes SDP, so there is no real impact on operating libosmo-mgcp-client with osmo-mgw from osmo-bsc or osmo-msc. Change-Id: I608001626459ea72415fb142f857550bbb90c683 --- M src/libosmo-mgcp-client/mgcp_client.c M tests/mgcp_client/mgcp_client_test.c M tests/mgcp_client/mgcp_client_test.err 3 files changed, 18 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 5823e2b..a65cd61 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -466,9 +466,8 @@ /* Find beginning of the parameter (SDP) section */ data_ptr = mgcp_find_section_end(data); if (!data_ptr) { - LOGP(DLMGCP, LOGL_ERROR, - "MGCP response: cannot find start of SDP parameters\n"); - rc = -EINVAL; + LOGP(DLMGCP, LOGL_DEBUG, "MGCP response contains no SDP parameters\n"); + rc = 0; goto exit; } diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 9c4392f..d2e34a6 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -360,7 +360,7 @@ static struct sdp_section_start_test sdp_section_start_tests[] = { { .body = "", - .expect_rc = -EINVAL, + .expect_rc = 0, }, { .body = "\n\n", @@ -399,19 +399,19 @@ .body = "some mgcp header data\r\nand header params" "\n\r\n" "m=audio 23\r\n", - .expect_rc = -EINVAL, + .expect_rc = 0, }, { .body = "some mgcp header data\r\nand header params" "\r\n\r" "m=audio 23\r\n", - .expect_rc = -EINVAL, + .expect_rc = 0, }, { .body = "some mgcp header data\r\nand header params" "\n\r\r" "m=audio 23\r\n", - .expect_rc = -EINVAL, + .expect_rc = 0, }, }; diff --git a/tests/mgcp_client/mgcp_client_test.err b/tests/mgcp_client/mgcp_client_test.err index 627b2d9..fbcf8f6 100644 --- a/tests/mgcp_client/mgcp_client_test.err +++ b/tests/mgcp_client/mgcp_client_test.err @@ -17,8 +17,9 @@ test_sdp_section_start() test [0]: body: "" -DLMGCP MGCP response: cannot find start of SDP parameters -got rc=-22 +DLMGCP MGCP response contains no SDP parameters +got rc=0 +got audio_port=0 test_sdp_section_start() test [1]: body: "\n\n" @@ -52,18 +53,21 @@ test_sdp_section_start() test [7]: body: "some mgcp header data\r\nand header params\n\r\nm=audio 23\r\n" -DLMGCP MGCP response: cannot find start of SDP parameters -got rc=-22 +DLMGCP MGCP response contains no SDP parameters +got rc=0 +got audio_port=0 test_sdp_section_start() test [8]: body: "some mgcp header data\r\nand header params\r\n\rm=audio 23\r\n" -DLMGCP MGCP response: cannot find start of SDP parameters -got rc=-22 +DLMGCP MGCP response contains no SDP parameters +got rc=0 +got audio_port=0 test_sdp_section_start() test [9]: body: "some mgcp header data\r\nand header params\n\r\rm=audio 23\r\n" -DLMGCP MGCP response: cannot find start of SDP parameters -got rc=-22 +DLMGCP MGCP response contains no SDP parameters +got rc=0 +got audio_port=0 DLMGCP ptmap contains illegal mapping: codec=113 maps to pt=2 DLMGCP ptmap contains illegal mapping: codec=0 maps to pt=100 DLMGCP ptmap contains illegal mapping: codec=113 maps to pt=2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15840 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I608001626459ea72415fb142f857550bbb90c683 Gerrit-Change-Number: 15840 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 16:45:28 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 1 Nov 2019 16:45:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Allow setting expected ms max power level with module param In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15930 to look at the new patch set (#2). Change subject: bsc: Allow setting expected ms max power level with module param ...................................................................... bsc: Allow setting expected ms max power level with module param It will allow changing ms max power in osmo-bsc.cfg as well as TTCN3 expactancies in BSC_Tests.cfg easily in docker-playground.git without needing to recompile or change code in TTCN3. Change-Id: Ib00c96902377582bc32778c5b947a6b4274041aa --- M bsc/BSC_Tests.ttcn 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/30/15930/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15930 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib00c96902377582bc32778c5b947a6b4274041aa Gerrit-Change-Number: 15930 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 16:45:50 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 16:45:50 +0000 Subject: Change in osmo-bsc[master]: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed wh... In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15909 ) Change subject: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed when the BTS configured with none combined CCCH mode. ...................................................................... Patch Set 1: Further investigation shows that CCCH_CONFIG is initialized in bootstrap_bts(), and at that time 'pchan_is' for all timeslots is NONE. Of course this is expected, because bootstrap_bts() is executed even before than any BTS is connected. A possible solution would be to delay the calculation of CCCH_CONFIG until the OML link is established. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I33ea7808ac1bd064b88fd609bd7dfe0c8aa341f2 Gerrit-Change-Number: 15909 Gerrit-PatchSet: 1 Gerrit-Owner: mqng2 Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 16:45:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 16:50:46 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 16:50:46 +0000 Subject: Change in osmo-hlr[master]: fix upgrade to version 2: imei column default value In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15911 ) Change subject: fix upgrade to version 2: imei column default value ...................................................................... Patch Set 1: (1 comment) > Adding Oliver, as he is the author of the related code (to my best knowledge). I'm pretty sure it was stsp https://gerrit.osmocom.org/c/osmo-hlr/+/15911/1/src/db.c File src/db.c: https://gerrit.osmocom.org/c/osmo-hlr/+/15911/1/src/db.c at a302 PS1, Line 302: default NULL > Shouldn't IMEI actually be NULL by default? AFAIK, storing IMEI(SV) is an optional feature, so what [?] In this patch I want to achieve that an upgraded DB yields exactly the same schema as a newly created db. (If we want to change the 'default's, we need to create a new db schema version to change that. The default is empty, and I guess 'default NULL' could even be equivalent to leaving it empty. So I guess we don't need to change the 'default's.) -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15911 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I68a00014a3d603fcba8781470bc5285f78b538d0 Gerrit-Change-Number: 15911 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 01 Nov 2019 16:50:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 17:07:39 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 17:07:39 +0000 Subject: Change in osmo-msc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15850 to look at the new patch set (#2). Change subject: fsm: use deferred deallocation ...................................................................... fsm: use deferred deallocation Since osmo-bsc uses the MGCP client FSMs, it is required to enable this new feature to guarantee safe operation. The issue is described in detail in commit logs linked below. Notably, osmo-msc currently chooses to omit error handling during MGCP events (marked "FIXME"). An upcoming patch implements this error handling, and would make osmo-msc vulnerable to crash from unexpected MGCP messages without this. Deferred FSM deallocation is a more general, simpler approach to osmo_fsm_term_safely(), so we can switch that off now. Depends: Ief4dba9ea587c9b4aea69993e965fbb20fb80e78 (libosmocore), I0adc13a1a998e953b6c850efa2761350dd07e03a (libosmocore) Related: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 (osmo-mgw) Change-Id: I08c03946605aa12e0a5ce8b3c773704ef5327a7a --- M src/osmo-msc/msc_main.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/50/15850/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15850 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I08c03946605aa12e0a5ce8b3c773704ef5327a7a Gerrit-Change-Number: 15850 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 17:12:57 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 17:12:57 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Allow setting expected ms max power level with module param In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15930 ) Change subject: bsc: Allow setting expected ms max power level with module param ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15930 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib00c96902377582bc32778c5b947a6b4274041aa Gerrit-Change-Number: 15930 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Comment-Date: Fri, 01 Nov 2019 17:12:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 17:20:48 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 17:20:48 +0000 Subject: Change in libosmocore[master]: gsm_04_08.h: Introduce API osmo_gsm48_rfpowercap2powerclass() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15923 ) Change subject: gsm_04_08.h: Introduce API osmo_gsm48_rfpowercap2powerclass() ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15923/1/src/gsm/gsm48.c File src/gsm/gsm48.c: https://gerrit.osmocom.org/c/libosmocore/+/15923/1/src/gsm/gsm48.c at 1412 PS1, Line 1412: (nitpicks: "band The", only one 'return rf_power_cap + 1' in the end, only one blank line here) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I32e9cc1c2397b44f0d48db2acdf782a821365b63 Gerrit-Change-Number: 15923 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-Comment-Date: Fri, 01 Nov 2019 17:20:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 17:29:18 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 1 Nov 2019 17:29:18 +0000 Subject: Change in libosmocore[master]: gsm: gsm_utils: Introduce API ms_max_pwr_dbm In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15924 ) Change subject: gsm: gsm_utils: Introduce API ms_max_pwr_dbm ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15924/1/src/gsm/gsm_utils.c File src/gsm/gsm_utils.c: https://gerrit.osmocom.org/c/libosmocore/+/15924/1/src/gsm/gsm_utils.c at 546 PS1, Line 546: * indicated by the tables in chapter 4.1.1 of GSM TS 05.05 end with . also for params below -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 Gerrit-Change-Number: 15924 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Comment-Date: Fri, 01 Nov 2019 17:29:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 19:42:33 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 19:42:33 +0000 Subject: Change in osmo-bsc[master]: VTY: also print the active phan config in ts_dump_vty() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15931 ) Change subject: VTY: also print the active phan config in ts_dump_vty() ...................................................................... VTY: also print the active phan config in ts_dump_vty() Change-Id: I45c93a737ad82a2525f941e89cd19d4cedbf6f02 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/31/15931/1 diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index a388c9a..0fbff86 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -1219,9 +1219,10 @@ static void ts_dump_vty(struct vty *vty, struct gsm_bts_trx_ts *ts) { - vty_out(vty, "BTS %u, TRX %u, Timeslot %u, phys cfg %s", + vty_out(vty, "BTS %u, TRX %u, Timeslot %u, phys cfg %s (active %s)", ts->trx->bts->nr, ts->trx->nr, ts->nr, - gsm_pchan_name(ts->pchan_on_init)); + gsm_pchan_name(ts->pchan_on_init), + gsm_pchan_name(ts->pchan_is)); if (ts->pchan_is != ts->pchan_on_init) vty_out(vty, " (%s mode)", gsm_pchan_name(ts->pchan_is)); vty_out(vty, ", TSC %u%s NM State: ", gsm_ts_tsc(ts), VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I45c93a737ad82a2525f941e89cd19d4cedbf6f02 Gerrit-Change-Number: 15931 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 19:42:34 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 19:42:34 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: verify the physical channel mapping at startup References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15932 ) Change subject: osmo_bsc_main.c: verify the physical channel mapping at startup ...................................................................... osmo_bsc_main.c: verify the physical channel mapping at startup Change-Id: I758ef80f7884ba35cdf59d671ee30222ffb9d68b --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/gsm_data.c M src/osmo-bsc/osmo_bsc_main.c 3 files changed, 62 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/32/15932/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index ca9d294..23aacd6 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1749,4 +1749,6 @@ int bts_count_free_ts(struct gsm_bts *bts, enum gsm_phys_chan_config pchan); +bool trx_has_valid_pchan_config(const struct gsm_bts_trx *trx); + #endif /* _GSM_DATA_H */ diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 88981c0..e7fe065 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -1693,3 +1693,54 @@ OSMO_VALUE_STRING(FOR_VTY), {} }; + +bool trx_has_valid_pchan_config(const struct gsm_bts_trx *trx) +{ + bool combined = false; + bool result = true; + unsigned int i; + + /* Iterate over all timeslots */ + for (i = 0; i < 8; i++) { + const struct gsm_bts_trx_ts *ts = &trx->ts[i]; + + switch (ts->pchan_from_config) { + case GSM_PCHAN_CCCH_SDCCH4_CBCH: + case GSM_PCHAN_CCCH_SDCCH4: + /* CCCH+SDCCH4 can only be configured on TS0 */ + if (i > 0) { + LOGP(DNM, LOGL_ERROR, "Combined CCCH is not allowed " + "on TS%u > 0\n", i); + result = false; + } + if (i == 0) + combined = true; + /* fall-through */ + case GSM_PCHAN_CCCH: + /* 3GPP TS 45.002, Table 3, CCCH: TS (0, 2, 4, 6) */ + if (i % 2 != 0) { + LOGP(DNM, LOGL_ERROR, "%s is not allowed on odd TS%u\n", + gsm_pchan_name(ts->pchan_from_config), i); + result = false; + } + + /* There can be no more CCCHs if TS0/C0 is combined */ + if (i > 0 && combined) { + LOGP(DNM, LOGL_ERROR, "%s is not allowed on TS%u, " + "because TS0 is using combined channel configuration\n", + gsm_pchan_name(ts->pchan_from_config), i); + result = false; + } + break; + + default: + /* CCCH on TS0 is mandatory for C0 */ + if (trx->bts->c0 == trx && i == 0) { + LOGP(DNM, LOGL_ERROR, "TS0 on C0 must be CCCH/BCCH\n"); + result = false; + } + } + } + + return result; +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index dacd61a..bf9358f 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -401,6 +401,7 @@ static int bootstrap_bts(struct gsm_bts *bts) { + struct gsm_bts_trx *trx; int i, n; if (!bts->model) @@ -447,6 +448,14 @@ return -EINVAL; } + /* Verify the physical channel mapping */ + llist_for_each_entry(trx, &bts->trx_list, list) { + if (!trx_has_valid_pchan_config(trx)) { + LOGP(DNM, LOGL_ERROR, "TRX %u has invalid phan config\n", trx->nr); + return -EINVAL; + } + } + /* Control Channel Description is set from vty/config */ /* Set ccch config by looking at ts config */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I758ef80f7884ba35cdf59d671ee30222ffb9d68b Gerrit-Change-Number: 15932 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 19:42:34 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 19:42:34 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: simplify computation of CCCH_CONFIG References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15933 ) Change subject: osmo_bsc_main.c: simplify computation of CCCH_CONFIG ...................................................................... osmo_bsc_main.c: simplify computation of CCCH_CONFIG Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 10 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/33/15933/1 diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index bf9358f..abfb1bb 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -402,7 +402,7 @@ static int bootstrap_bts(struct gsm_bts *bts) { struct gsm_bts_trx *trx; - int i, n; + unsigned int n = 0; if (!bts->model) return -EFAULT; @@ -458,16 +458,13 @@ /* Control Channel Description is set from vty/config */ - /* Set ccch config by looking at ts config */ - for (n=0, i=0; i<8; i++) - n += bts->c0->ts[i].pchan_is == GSM_PCHAN_CCCH ? 1 : 0; - /* Indicate R99 MSC in SI3 */ bts->si_common.chan_desc.mscr = 1; - switch (n) { - case 0: + /* Determine the value of CCCH_CONF. Is TS0/C0 combined? */ + if (bts->c0->ts[0].pchan_is != GSM_PCHAN_CCCH) { bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C; + /* Limit reserved block to 2 on combined channel according to 3GPP TS 44.018 Table 10.5.2.11.1 */ if (bts->si_common.chan_desc.bs_ag_blks_res > 2) { @@ -476,22 +473,12 @@ bts->si_common.chan_desc.bs_ag_blks_res); bts->si_common.chan_desc.bs_ag_blks_res = 2; } - break; - case 1: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_NC; - break; - case 2: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_2_NC; - break; - case 3: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_3_NC; - break; - case 4: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_4_NC; - break; - default: - LOGP(DNM, LOGL_ERROR, "Unsupported CCCH timeslot configuration\n"); - return -EINVAL; + } else { /* Non-combined TS0/C0 configuration */ + /* There can be additional CCCHs on even timeslot numbers */ + n += (bts->c0->ts[2].pchan_is == GSM_PCHAN_CCCH); + n += (bts->c0->ts[4].pchan_is == GSM_PCHAN_CCCH); + n += (bts->c0->ts[6].pchan_is == GSM_PCHAN_CCCH); + bts->si_common.chan_desc.ccch_conf = (n << 1); } bts->si_common.cell_options.pwrc = 0; /* PWRC not set */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 Gerrit-Change-Number: 15933 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 19:42:35 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 19:42:35 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15934 ) Change subject: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config ...................................................................... osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/15934/1 diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index abfb1bb..893124f 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -462,7 +462,7 @@ bts->si_common.chan_desc.mscr = 1; /* Determine the value of CCCH_CONF. Is TS0/C0 combined? */ - if (bts->c0->ts[0].pchan_is != GSM_PCHAN_CCCH) { + if (bts->c0->ts[0].pchan_from_config != GSM_PCHAN_CCCH) { bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C; /* Limit reserved block to 2 on combined channel according to @@ -475,9 +475,9 @@ } } else { /* Non-combined TS0/C0 configuration */ /* There can be additional CCCHs on even timeslot numbers */ - n += (bts->c0->ts[2].pchan_is == GSM_PCHAN_CCCH); - n += (bts->c0->ts[4].pchan_is == GSM_PCHAN_CCCH); - n += (bts->c0->ts[6].pchan_is == GSM_PCHAN_CCCH); + n += (bts->c0->ts[2].pchan_from_config == GSM_PCHAN_CCCH); + n += (bts->c0->ts[4].pchan_from_config == GSM_PCHAN_CCCH); + n += (bts->c0->ts[6].pchan_from_config == GSM_PCHAN_CCCH); bts->si_common.chan_desc.ccch_conf = (n << 1); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd Gerrit-Change-Number: 15934 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 19:43:11 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 19:43:11 +0000 Subject: Change in osmo-bsc[master]: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed wh... In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15909 ) Change subject: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed when the BTS configured with none combined CCCH mode. ...................................................................... Patch Set 1: Please see: https://gerrit.osmocom.org/q/topic:%22ccch_conf%22+(status:open%20OR%20status:merged) -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I33ea7808ac1bd064b88fd609bd7dfe0c8aa341f2 Gerrit-Change-Number: 15909 Gerrit-PatchSet: 1 Gerrit-Owner: mqng2 Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 01 Nov 2019 19:43:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 20:27:40 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 20:27:40 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: verify the physical channel mapping at startup In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/15932 to look at the new patch set (#2). Change subject: osmo_bsc_main.c: verify the physical channel mapping at startup ...................................................................... osmo_bsc_main.c: verify the physical channel mapping at startup As per 3GPP TS 45.002, section 3.3.2.3, and table 3 of clause 7, the following limitations apply mapping of CCCH/BCCH channels: - TS0/C0 shall be configured as CCCH/BCCH (optionally combined); - combined CCCH (CCCH+SDCCH4) can only be used on TS0; - additional CCCHs can be on TS2, TS4, and TS6; - additional CCCHs are not allowed if TS0 is combined. Let's make sure that OsmoBSC is properly configured before starring. Change-Id: I758ef80f7884ba35cdf59d671ee30222ffb9d68b --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/gsm_data.c M src/osmo-bsc/osmo_bsc_main.c 3 files changed, 63 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/32/15932/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I758ef80f7884ba35cdf59d671ee30222ffb9d68b Gerrit-Change-Number: 15932 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 20:27:40 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 20:27:40 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: simplify computation of CCCH_CONFIG In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/15933 to look at the new patch set (#2). Change subject: osmo_bsc_main.c: simplify computation of CCCH_CONFIG ...................................................................... osmo_bsc_main.c: simplify computation of CCCH_CONFIG Do not count the number of additional CCCHs if TS0 is using combined channel configuration (CCCH+SDCCH4), because they are only allowed if TS0 is not combined with SDCCH. Get rid of the 'switch' statement using the following formula: CCCH_CONFIG = (N << 1) where N is the number of additional CCCHs. Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 10 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/33/15933/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 Gerrit-Change-Number: 15933 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 1 20:27:40 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 1 Nov 2019 20:27:40 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/15934 to look at the new patch set (#2). Change subject: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config ...................................................................... osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config As can be seen from include/osmocom/bsc/gsm_data.h: - pchan_from_config - channel configuration from the VTY/config (can be changed from the VTY at runtime, should not affect the existing RSL/OML connections); - pchan_on_init - channel configuration after the OML link is established (pchan_from_config is copied here); - pchan_is - the *actual* channel configuration currently active. Since we call bootstrap_bts() during the initialization, even before establishing any OML/RSL connections, neither pchan_on_init nor pchan_is can be used. Let's use pchan_from_config instead. This change fixes the problem discovered by @mqng2 and reported together with https://gerrit.osmocom.org/c/osmo-bsc/+/15909: CCCH_CONF in System Information Type 3 does not reflect the actual channel configuration, and always indicates a single CCCH combined with SDCCH. This also misleads the lchan allocation algorithm during the MO connection establishment. Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/15934/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd Gerrit-Change-Number: 15934 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sat Nov 2 02:39:15 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 02 Nov 2019 02:39:15 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_10/i586 In-Reply-To: References: Message-ID: <5dbcec67cdbec_751f2b0ec3e165fc3180b1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_10/i586 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 516s] dh_makeshlibs [ 517s] dh_shlibdeps [ 518s] dpkg-shlibdeps: warning: symbol talloc_asn1_ctx used by debian/libosmo-ranap2/usr/lib/i386-linux-gnu/libosmo-sabp.so.0.0.0 found in none of the libraries [ 518s] dpkg-shlibdeps: warning: symbol asn1_xer_print used by debian/libosmo-ranap2/usr/lib/i386-linux-gnu/libosmo-sabp.so.0.0.0 found in none of the libraries [ 518s] dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-hnbgw/usr/bin/osmo-hnbgw was not linked against libpthread.so.0 (it uses none of the library's symbols) [ 518s] dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/libosmo-ranap2/usr/lib/i386-linux-gnu/libosmo-sabp.so.0.0.0 debian/libosmo-ranap2/usr/lib/i386-linux-gnu/libosmo-ranap.so.2.0.2 were not linked against libpthread.so.0 (they use none of the library's symbols) [ 518s] dh_installdeb [ 518s] dh_gencontrol [ 518s] dh_md5sums [ 519s] dh_builddeb [ 519s] dpkg-deb: building package 'osmo-hnbgw-dbg' in '../osmo-hnbgw-dbg_0.5.0.18.9fb8_i386.deb'. [ 519s] dpkg-deb: building package 'libosmo-ranap2' in '../libosmo-ranap2_0.5.0.18.9fb8_i386.deb'. [ 519s] dpkg-deb: building package 'libosmo-ranap-dev' in '../libosmo-ranap-dev_0.5.0.18.9fb8_i386.deb'. [ 519s] dpkg-deb: building package 'osmo-hnbgw' in '../osmo-hnbgw_0.5.0.18.9fb8_i386.deb'. [ 519s] dpkg-deb: building package 'libosmo-ranap-dbg' in '../libosmo-ranap-dbg_0.5.0.18.9fb8_i386.deb'. [ 519s] dpkg-genbuildinfo [ 520s] dpkg-genchanges >../osmo-iuh_0.5.0.18.9fb8_i386.changes [ 520s] dpkg-genchanges: error: file ../osmo-iuh_0.5.0.18.9fb8.tar.xz has checksum 074279010a786419ab39c9ee0346312c instead of expected 64781cbb22d85ff330465c0ba53b84ca (algorithm md5) [ 520s] dpkg-buildpackage: error: dpkg-genchanges subprocess returned exit status 25 [ 520s] [ 520s] lamb20 failed "build osmo-iuh_0.5.0.18.9fb8.dsc" at Sat Nov 2 02:39:10 UTC 2019. [ 520s] [ 520s] ### VM INTERACTION START ### [ 523s] [ 508.972502] sysrq: SysRq : Power Off [ 523s] [ 508.978335] reboot: Power down [ 523s] ### VM INTERACTION END ### [ 523s] [ 523s] lamb20 failed "build osmo-iuh_0.5.0.18.9fb8.dsc" at Sat Nov 2 02:39:13 UTC 2019. [ 523s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sat Nov 2 10:46:29 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 2 Nov 2019 10:46:29 +0000 Subject: Change in osmo-msc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15850 ) Change subject: fsm: use deferred deallocation ...................................................................... Patch Set 2: Code-Review+1 Did you check if all our TTCN-3 test cases still pass after this change? Just to be sure. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15850 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I08c03946605aa12e0a5ce8b3c773704ef5327a7a Gerrit-Change-Number: 15850 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Sat, 02 Nov 2019 10:46:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 2 14:35:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 2 Nov 2019 14:35:21 +0000 Subject: Change in libosmocore[master]: gsm_04_08.h: Introduce API osmo_gsm48_rfpowercap2powerclass() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15923 ) Change subject: gsm_04_08.h: Introduce API osmo_gsm48_rfpowercap2powerclass() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I32e9cc1c2397b44f0d48db2acdf782a821365b63 Gerrit-Change-Number: 15923 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Sat, 02 Nov 2019 14:35:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 2 14:35:36 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 2 Nov 2019 14:35:36 +0000 Subject: Change in libosmocore[master]: cosmetic: gsm_04_08.h: Fix trailing whitespace In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15922 ) Change subject: cosmetic: gsm_04_08.h: Fix trailing whitespace ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15922 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4b34dbd5f0176d1d8aa8cc96f642ed35d4214b7e Gerrit-Change-Number: 15922 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 02 Nov 2019 14:35:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 2 14:36:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 2 Nov 2019 14:36:48 +0000 Subject: Change in libosmocore[master]: gsm: gsm_utils: Introduce API ms_max_pwr_dbm In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15924 ) Change subject: gsm: gsm_utils: Introduce API ms_max_pwr_dbm ...................................................................... Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15924/1/include/osmocom/gsm/gsm_utils.h File include/osmocom/gsm/gsm_utils.h: https://gerrit.osmocom.org/c/libosmocore/+/15924/1/include/osmocom/gsm/gsm_utils.h at 121 PS1, Line 121: even of the old ones are not using any osmo_prefix, we shouldn't make the situation worse in terms of polluting the namespace. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 Gerrit-Change-Number: 15924 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Sat, 02 Nov 2019 14:36:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 2 14:37:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 2 Nov 2019 14:37:02 +0000 Subject: Change in osmo-bsc[master]: VTY: also print the active phan config in ts_dump_vty() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15931 ) Change subject: VTY: also print the active phan config in ts_dump_vty() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I45c93a737ad82a2525f941e89cd19d4cedbf6f02 Gerrit-Change-Number: 15931 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 02 Nov 2019 14:37:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 2 14:38:26 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 2 Nov 2019 14:38:26 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: verify the physical channel mapping at startup In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15932 ) Change subject: osmo_bsc_main.c: verify the physical channel mapping at startup ...................................................................... Patch Set 2: Code-Review+1 most old BTSs have further restrictions, like nanoBTS in terms of number of SDCCH, etc. I believe we already implemented some of those constraints somewehre. Might be nice to integrate this here, so that each BTS model can add more constraints? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I758ef80f7884ba35cdf59d671ee30222ffb9d68b Gerrit-Change-Number: 15932 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 02 Nov 2019 14:38:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 2 14:38:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 2 Nov 2019 14:38:58 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: simplify computation of CCCH_CONFIG In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15933 ) Change subject: osmo_bsc_main.c: simplify computation of CCCH_CONFIG ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 Gerrit-Change-Number: 15933 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 02 Nov 2019 14:38:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 2 14:39:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 2 Nov 2019 14:39:30 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15934 ) Change subject: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd Gerrit-Change-Number: 15934 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 02 Nov 2019 14:39:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:18:10 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:18:10 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc-test: improve error log on Assignment RTP port mismatch References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15935 ) Change subject: msc-test: improve error log on Assignment RTP port mismatch ...................................................................... msc-test: improve error log on Assignment RTP port mismatch Before this, if an Assignment Request contains an unexpected Transport Layer Address, the test completely rejects the Assignment Request. Instead, accept any tla in the Assignment, and compare the expected tla in the Assignment's interleave action. Thus we directly get logging hinting at the tla instead of a T_guard timeout. Change-Id: I04847c10d6c3bf9e04cfda6e343dfd4a65be71a5 --- M msc/BSC_ConnectionHandler.ttcn 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/35/15935/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index fb2d888..5b0a125 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1044,12 +1044,19 @@ } //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { - [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { + [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit)) -> value bssap { log("f_mo_call_establish 4: rx Assignment Request"); var BSSMAP_IE_AoIP_TransportLayerAddress tla; var BSSMAP_IE_SpeechCodec codec; var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; + if (tla_ass != bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer) { + log("Expected:", tla_ass); + log("Got:", bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer); + setverdict(fail, "MSC sent Assignment Request with unexpected AoIP Transport Layer IE"); + mtc.stop; + } + tla := valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), cpars.bss_rtp_port)); codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})); if (cpars.use_osmux) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15935 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I04847c10d6c3bf9e04cfda6e343dfd4a65be71a5 Gerrit-Change-Number: 15935 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:18:11 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:18:11 +0000 Subject: Change in osmo-ttcn3-hacks[master]: improve/fix f_tc_mo_setup_dtmf_dup References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15936 ) Change subject: improve/fix f_tc_mo_setup_dtmf_dup ...................................................................... improve/fix f_tc_mo_setup_dtmf_dup - Fix error log for a missing final DTMF. - Instead of code dup to establish a call, use f_mo_call_establish(). This will make the test benefit from changes to f_mo_call_establish() (which will soon come up to accomodate changes in osmo-msc's codec negotiation). - Instead of hardcoding the expected N_SD counter values to detect DTAP duplicates, use f_bssmap_last_n_sd() and f_next_n_sd(), so that the N_SD counter is correct regardless of how many DTAP were sent in f_mo_call_establish(). - Instead of hardcoding a correct N_SD in the end, use skip_seq_patching == false, so that the ttcn DTAP correctly tracks N_SD for subsequent call release messages. - Release the call. Change-Id: Ibfa8b906764f2d5ed75fe74125be42af4546e864 --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 2 files changed, 26 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/36/15936/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 5b0a125..0ddc911 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1273,50 +1273,58 @@ var MgcpCommand mgcp_cmd; var template PDU_ML3_MS_NW dtmf_dtap; - f_establish_fully(); + f_mo_call_establish(cpars); - /* Create MNCC and MGCP expect */ - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); + /* Send DTMF: send the exact same DTAP message twice, the dup should be filtered out by + * 3GPP TS 24.007 11.2.3.2 Message Type Octet / Duplicate Detection. */ - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); - MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc; - cpars.mncc_callref := mncc.u.signal.callref; + /* Find out the next NSD that will be used, from RAN emulation. */ + var N_Sd_Array last_n_sd := f_bssmap_last_n_sd(); + var uint2_t next_n_sd := f_next_n_sd(last_n_sd, 0 /* cc is index 0 */); - /* Send DTMF */ + /* Compose DTAP with this correct NSD */ dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "2"); - dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(2, 2); - BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true)); + + /* Here, pass skip_seq_patching == false so that the RAN Emulation NSD increments after this message. */ + BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, false)); T.start; alt { - [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {} + [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) { + log("f_mo_seq_dtmf_dup() 1: got first START_DTMF_ind"); + } [] T.timeout { setverdict(fail, "Timeout waiting for START_DTMF_ind"); mtc.stop; } } + /* Send the exact same DTAP with above NSD, which is now incorrect (has not incremented), so that this message + * will get filtered by the duplicate detection. Write NSD into DTAP and pass skip_seq_patching == true. */ + dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(next_n_sd, 2); BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true)); T.start; alt { [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) { - setverdict(fail, "Received duplicate START_DTMF_ind"); + setverdict(fail, "f_mo_seq_dtmf_dup() 2: Received duplicate START_DTMF_ind"); mtc.stop; } [] T.timeout { } } + /* Here the NSD should be correct again and we see a DTMF. */ dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "3"); - dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(3, 2); - BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true)); + BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, false)); alt { - [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) { } + [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) { + log("f_mo_seq_dtmf_dup() 3: got second START_DTMF_ind"); + } [] T.timeout { - setverdict(fail, "Received duplicate START_DTMF_ind"); + setverdict(fail, "Timeout waiting for final START_DTMF_ind"); mtc.stop; } } + f_call_hangup(cpars, true); setverdict(pass); } diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index fbb471e..c290d7c 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1776,6 +1776,8 @@ cpars.bss_rtp_port := 1110; cpars.mgcp_connection_id_bss := '22222'H; cpars.mgcp_connection_id_mss := '33333'H; + cpars.mgcp_ep := "rtpbridge/1 at mgw"; + cpars.mo_call := true; f_perform_lu(); f_mo_seq_dtmf_dup(cpars); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15936 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ibfa8b906764f2d5ed75fe74125be42af4546e864 Gerrit-Change-Number: 15936 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:18:11 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:18:11 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cosmetic: remove brace from comment References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15937 ) Change subject: cosmetic: remove brace from comment ...................................................................... cosmetic: remove brace from comment This '{' in the comment gets my auto indenting / syntax brace matching all confused. Change-Id: I303abe800037abd0c9694ae750a7acaa79c9754f --- M msc/BSC_ConnectionHandler.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/15937/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 0ddc911..7a94d85 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1043,7 +1043,7 @@ MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref)); } - //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { + //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit)) -> value bssap { log("f_mo_call_establish 4: rx Assignment Request"); var BSSMAP_IE_AoIP_TransportLayerAddress tla; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15937 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I303abe800037abd0c9694ae750a7acaa79c9754f Gerrit-Change-Number: 15937 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:18:12 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:18:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 ) Change subject: msc: overhaul voice call testing ...................................................................... msc: overhaul voice call testing * Semantic: We don't really know which side the MSC first creates a CRCX for. Instead of assuming that the RAN side is always CRCX'd first, simply handle a "first" and a "second" CRCX, not making any assumptions which is for which side. Notably, there still are quite a few places assuming which CRCX corresponds to the RAN/CN side, but the changes are sufficient to still pass the tests when osmo-msc swaps the CRCX order; sometimes for slightly obscure reasons, for example because it doesn't matter that the wrong port number is returned during a subsequent MDCX... Cleaning up the rest is still todo for later. Remove code dup from call establishing code, particularly for MGCP. Use f_mo_call_establish() and f_mt_call() where ever possible, to make all of the call establishing tests handle upcoming changes in osmo-msc's order of messages, without re-implementing the changes for each test individually. The X-Osmux parameter was so far expected to appear in the first CRCX received, assuming that this first CRCX is for the RAN. Instead, detect whether X-Osmux is contained in a CRCX, and reply with an Osmux CID if so, regardless of it being the first or second CRCX. Count the number of X-Osmux parameters received in CRCX messages, and compare after call setup to verify X-Osmux presence. Since f_mo_call_establish() can't handle RANAP assignment, a few Iu tests that worked with the older code dup will break by this patch. This is fixed by a subsequent patch, see I0ead36333ab665147b8d222070ea5cf8afc555ec. * Details, per patch chunk: Change ts_BSSMAP_IE_AoIP_TLA4 to a non-value template, so that we can use a wildcard for the assigned port number from MGCP (depending on RAN or CN CRCX first, the RAN port number can be one or the other). Split f_mgcp_find_param_entry() out of f_mgcp_find_param() to be able to act on an MgcpParameterList without an enclosing MgcpMessage. In CallParameters, move MGCP handling instructions into a separate record "CrcxResponse", and have two of them for handling the first and the second CRCX, replacing mgw_rtp_{ip,port}_{bss,mss} and mgcp_connection_id_{bss,mss}. In CallParameters, add some flags for early-exiting call establishment with a particular desired behavior, for specialized tests. In CallParameters, use common default values and don't repeat them in each and every call establishing test. Set cpars.mo_call := {true,false} implicitly when f_{mo,mt}_call_establish() are invoked. Remove CRCX comments implying RAN or CN side, instead just talk of the "first" and the "second" CRCX. Implement one common f_handle_crcx() function, which is used by f_mo_call_establish(), f_mt_call_complete(), as_optional_mgcp_crcx(), and implicitly uses the first/second CRCX handling. For Assigment, use a wildcard RTP port so that we don't have to assume which CRCX was for the RAN side. In f_mo_call_establish(), insert special case conditions to make it enact errors at specific times, for individual tests. That saves re-implementing the entire call establishment (code dup). For error cases, add expectation of a CC Release message in the call establishment. This should not apply for normal successful operation, but because interleave does not support conditionals, add flags got_mncc_setup_compl_ind and got_cc_connect to break the interleave when establishing is complete, so that the CC Release is skipped. A CC Release always breaks the interleave, at whatever time it arrives. Tests adopting f_{mo,mt}_call instead of code dup: f_tc_mo_setup_and_nothing() f_tc_mo_crcx_ran_timeout() f_tc_mo_crcx_ran_reject() f_tc_mo_release_timeout() f_tc_mo_cc_bssmap_clear() Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f --- M library/BSSMAP_Templates.ttcn M library/MGCP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 4 files changed, 294 insertions(+), 345 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/38/15938/1 diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 41755db..b40ec61 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -407,15 +407,15 @@ return cic; } -template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr, - uint16_t udp_port, +template BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr, + template uint16_t udp_port, integer len) := { elementIdentifier := '7C'O, lengthIndicator := len, /* overwritten */ ipAddress := addr, uDPPortValue := udp_port } -template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA4(OCT4 ip, uint16_t pt) := +template BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA4(OCT4 ip, template uint16_t pt) := ts_BSSMAP_IE_AoIP_TLA({ipv4:=ip}, pt, 6); template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA6(OCT16 ip, uint16_t pt) := ts_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt, 18); diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index dae379e..e03fd8e 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -453,6 +453,17 @@ sdp := * } + function f_mgcp_find_param_entry(MgcpParameterList pars, MgcpInfoCode code, out charstring ret) + return boolean { + for (var integer i := 0; i < sizeof(pars); i := i+1) { + if (pars[i].code == code) { + ret := pars[i].val; + return true; + } + } + return false; + } + function f_mgcp_find_param(MgcpMessage msg, MgcpInfoCode code, out charstring ret) return boolean { var MgcpParameterList pars; @@ -461,13 +472,7 @@ } else { pars := msg.response.params; } - for (var integer i := 0; i < sizeof(pars); i := i+1) { - if (pars[i].code == code) { - ret := pars[i].val; - return true; - } - } - return false; + return f_mgcp_find_param_entry(pars, code, ret); } /* template to determine if a MGCP endpoint is a wildcard endpoint */ diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 7a94d85..23697da 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -676,6 +676,13 @@ /* re-configure MSC behaviour via VTY */ } +type record CrcxResponse { + integer resp, /* 1 = reply with OK, 0 = do not reply, -1 = reply with error */ + HostName mgw_rtp_ip, + PortNumber mgw_rtp_port, + MgcpConnectionId mgcp_connection_id /* MGCP Connection ID BSS Side */ +} + /* parameters related to a (MO?) voice call */ type record CallParameters { /* CC related parameters */ @@ -695,24 +702,24 @@ PortNumber bss_rtp_port optional, /* BSS Side RTP Port */ HostName mss_rtp_ip optional, /* MSS Side RTP IP */ PortNumber mss_rtp_port optional, /* MSS Side RTP Port */ - HostName mgw_rtp_ip_bss, /* BSS-facing MGW RTP IP */ - PortNumber mgw_rtp_port_bss, /* BSS-facing MGW RTP Port */ - HostName mgw_rtp_ip_mss, /* MSS-facing MGW RTP IP */ - PortNumber mgw_rtp_port_mss, /* MSS-facing MGW RTP Port */ + integer got_crcx_count, + CrcxResponse mgw_conn_1, + CrcxResponse mgw_conn_2, uint7_t rtp_payload_type, /* dynamic RTP payload type */ charstring rtp_sdp_format, /* AMR/8000 or the like */ boolean mgw_drop_dlcx optional, /* Provoke errors by not responding to DLCX (f_mt_call and f_mt_call) */ + boolean stop_after_cc_setup, /* Special case: stop call establish after CC Setup */ + boolean ran_clear_when_alerting, /* Special case: send Clear upon CC Alerting */ MgcpCallId mgcp_call_id optional, /* MGCP Call ID; CallAgent allocated */ MgcpEndpoint mgcp_ep optional /* MGCP Endpoint, CallAgent or MGW allocated */, - MgcpConnectionId mgcp_connection_id_bss, /* MGCP Connection ID BSS Side */ - MgcpConnectionId mgcp_connection_id_mss, /* MGCP Connection ID MSS Side */ - boolean use_osmux /* MSC is expected to use Osmux for this call */ + boolean use_osmux, /* MSC is expected to use Osmux for this call */ + integer got_osmux } -template (value) CallParameters t_CallParams(hexstring called, integer tid) := { +template (value) CallParameters t_CallParams(hexstring called := '12345'H, integer tid := 0) := { called_party := called, transaction_id := tid, mo_call := false, @@ -724,32 +731,43 @@ bss_rtp_port := 9000, mss_rtp_ip := omit, mss_rtp_port := omit, - mgw_rtp_ip_bss := "1.1.1.1", - mgw_rtp_port_bss := 10000, - mgw_rtp_ip_mss := "1.1.1.1", - mgw_rtp_port_mss := 11000, + got_crcx_count := 0, + mgw_conn_1 := { + resp := 1, + mgw_rtp_ip := "1.1.1.1", + mgw_rtp_port := 10000, + mgcp_connection_id := '11111'H + }, + mgw_conn_2 := { + resp := 1, + mgw_rtp_ip := "1.1.1.1", + mgw_rtp_port := 11000, + mgcp_connection_id := '22222'H + }, rtp_payload_type := 98, rtp_sdp_format := "AMR/8000", mgw_drop_dlcx := false, + stop_after_cc_setup := false, + ran_clear_when_alerting := false, mgcp_call_id := omit, - mgcp_ep := omit, - mgcp_connection_id_bss := '0'H,// - mgcp_connection_id_mss := '0'H,// - use_osmux := false + mgcp_ep := "rtpbridge/1 at mgw", + use_osmux := false, + got_osmux := 0 }; /* Allocate a call reference and send SETUP via MNCC to MSC */ function f_mt_call_initate(inout CallParameters cpars) runs on BSC_ConnHdlr { + cpars.mo_call := false; cpars.mncc_callref := f_rnd_int(2147483648); MNCC.send(ts_MNCC_SETUP_req(cpars.mncc_callref, hex2str(g_pars.msisdn), hex2str(cpars.called_party), hex2str(g_pars.imsi))); } private template (value) SDP_Message ts_SDP_CRCX_CN(CallParameters cpars) := - ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, + cpars.mgw_conn_2.mgw_rtp_port, { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), @@ -770,6 +788,8 @@ log("f_mt_call_complete 1"); + cpars.got_osmux := 0; + /* MS <- MSC: Expect CC SETUP */ BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_SETUP(cpars.transaction_id, *, cpars.called_party))); @@ -783,53 +803,26 @@ /* Ask MSC via MNCC to create the RTP socket on the MSC/MGW side */ MNCC.send(ts_MNCC_RTP_CREATE(cpars.mncc_callref)); - /* First MGCP CRCX (for BSS/RAN side) */ + /* First MGCP CRCX */ MGCP.receive(tr_CRCX) -> value mgcp_cmd { log("f_mt_call_complete 3"); - cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - - /* When the endpoint contains a wildcard we keep the endpoint - * identifier we have set up in cpars. Otherwise we use the - * endpoint name that the call agent has supplied */ - if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard) == false) { - cpars.mgcp_ep := mgcp_cmd.line.ep; + if (not f_handle_crcx(cpars, mgcp_cmd)) { + return; } - - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_bss, cpars.mgw_rtp_ip_bss, - hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_bss, - { int2str(cpars.rtp_payload_type) }, - { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, - cpars.rtp_sdp_format)), - valueof(ts_SDP_ptime(20)) })); - - if (cpars.use_osmux) { - osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); - if (osmux_cid != -1) { /* we expect MSC to use wildcard here */ - setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != -1"); - mtc.stop; - } - osmux_cid := 0; - mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); - } else { - mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); - } - - f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); - MGCP.send(mgcp_resp); } if (g_pars.ran_is_geran) { - var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass := - valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss)); + var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass := + ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_conn_1.mgw_rtp_ip), ?); interleave { /* Second MGCP CRCX (this time for MSS/CN side) */ [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { log("f_mt_call_complete 4"); - var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + if (not f_handle_crcx(cpars, mgcp_cmd)) { + break; + } } /* MSC acknowledges the MNCC_CREATE to the MNCC handler */ @@ -839,7 +832,7 @@ /* expect the MSC to trigger a BSSMAP ASSIGNMENT */ [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { - var BSSMAP_IE_AoIP_TransportLayerAddress tla; + var template BSSMAP_IE_AoIP_TransportLayerAddress tla; var BSSMAP_IE_SpeechCodec codec; var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; log("f_mt_call_complete 6"); @@ -853,8 +846,8 @@ mtc.stop; } osmuxCID := valueof(ts_OsmuxCID(0)); - if (cpars.use_osmux and not match(bssap.pdu.bssmap.assignmentRequest.osmuxCID, osmuxCID)) { - setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + if (not match(bssap.pdu.bssmap.assignmentRequest.osmuxCID, osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE. Expected ", osmuxCID, " Got ", bssap.pdu.bssmap.assignmentRequest.osmuxCID); mtc.stop; } bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec, osmuxCID)); @@ -877,9 +870,9 @@ /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */ [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { log("f_mt_call_complete 8"); - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, + cpars.mgw_conn_2.mgw_rtp_port, { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), @@ -890,9 +883,9 @@ setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != 0"); mtc.stop; } - mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgw_conn_1.mgcp_connection_id, osmux_cid, sdp); } else { - mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp); + mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp); } MGCP.send(mgcp_resp); } @@ -900,25 +893,25 @@ /* MDCX setting up the CN side remote RTP address received from MNCC CONNECT */ [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { log("f_mt_call_complete 9"); - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, + cpars.mgw_conn_2.mgw_rtp_port, { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp)); } } } else { - var template TransportLayerAddress rab_tla := ? /* FIXME: encode the mgw_rtp_ip_bss/mgw_rtp_port_bss */ + var template TransportLayerAddress rab_tla := ? /* FIXME: encode the mgw_rtp_ip/mgw_rtp_port */ var template RAB_SetupOrModifyList rab_sml := tr_RAB_SML(rab_id := ?, tla := rab_tla, binding_id := ?); interleave { [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp)); /* MSC acknowledges the MNCC_CREATE to the MNCC handler */ MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)); } @@ -930,6 +923,13 @@ } } + if (cpars.use_osmux == (cpars.got_osmux != 0)) { + log("Osmux ok: use_osmux = ", cpars.use_osmux, " got_osmux = ", cpars.got_osmux); + } else { + setverdict(fail, "Osmux failure: use_osmux = ", cpars.use_osmux, " got_osmux = ", cpars.got_osmux); + mtc.stop; + } + log("f_mt_call_complete DONE"); } @@ -958,6 +958,139 @@ setverdict(pass); } +/* Reply to a received CRCX with an OK (or the reply configured in cpars), using the given parameters. + * Return true when an OK reply was sent, false otherwise. + * Count occurence of Osmux, include Osmux parameters in the reply if necessary. */ +function f_handle_crcx(inout CallParameters cpars, MgcpCommand mgcp_cmd) +runs on BSC_ConnHdlr +return boolean { + var CrcxResponse conn := cpars.mgw_conn_1; + if (cpars.got_crcx_count > 0) { + conn := cpars.mgw_conn_2; + } + cpars.got_crcx_count := cpars.got_crcx_count + 1; + + var MgcpMessage mgcp_msg := { + command := mgcp_cmd + } + var template MgcpResponse mgcp_resp; + var MgcpOsmuxCID osmux_cid; + var MgcpCallId call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); + if (ispresent(cpars.mgcp_call_id)) { + if (cpars.mgcp_call_id != call_id) { + setverdict(fail, "CRCX contained unexpected call id. Expected:", cpars.mgcp_call_id, " got:", call_id); + mtc.stop; + } + } else { + cpars.mgcp_call_id := call_id; + } + + /* When the endpoint contains a wildcard we keep the endpoint + * identifier we have set up in cpars. Otherwise we use the + * endpoint name that the call agent has supplied */ + if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard) == false) { + cpars.mgcp_ep := mgcp_cmd.line.ep; + } + + if (conn.resp == -1) { + /* Reply with error */ + var MgcpResponse mgcp_rsp := { + line := { + code := "542", + trans_id := mgcp_cmd.line.trans_id, + string := "FORCED_FAIL" + }, + sdp := omit + + } + var MgcpParameter mgcp_rsp_param := { + code := "Z", + val := cpars.mgcp_ep + }; + mgcp_rsp.params[0] := mgcp_rsp_param; + MGCP.send(mgcp_rsp); + return false; + } + + if (conn.resp == 0) { + /* Do not reply at all */ + return false; + } + + if (conn.resp != 1) { + setverdict(fail, "Unexpected value for cpars.mgw_conn_*.resp, expect -1, 0 or 1"); + mtc.stop; + } + + var SDP_Message sdp := valueof(ts_SDP(conn.mgw_rtp_ip, conn.mgw_rtp_ip, + hex2str(cpars.mgcp_call_id), "42", + conn.mgw_rtp_port, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + + if (f_mgcp_contains_par(mgcp_msg, "X-OSMUX")) { + if (not cpars.use_osmux) { + setverdict(fail, "MSC sent X-Osmux parameter in MGCP, but not expecting any Osmux"); + mtc.stop; + } + cpars.got_osmux := cpars.got_osmux + 1; + /* we expect MSC to use wildcard here, i.e. osmux_cid == -1 */ + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + log("f_handle_crcx(): got Osmux CID: ", osmux_cid); + if (osmux_cid != -1) { + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != -1"); + mtc.stop; + } + + osmux_cid := 0; + mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, conn.mgcp_connection_id, osmux_cid, sdp); + } else { + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, conn.mgcp_connection_id, sdp); + } + + f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); + MGCP.send(mgcp_resp); + return true; +} + + +altstep as_optional_mgcp_crcx(CallParameters cpars) runs on BSC_ConnHdlr { + var MgcpCommand mgcp_cmd; + [] MGCP.receive(tr_CRCX) -> value mgcp_cmd { + log("as_optional_mgcp_crcx: rx CRCX"); + f_handle_crcx(cpars, mgcp_cmd); + + /* Without this 'repeat', the as_optional_mgcp_crcx() exits currently waiting interleaves as soon as an + * CRCX is handled. */ + repeat; + } +} + +private altstep as_optional_mgcp_mdcx(HostName mgw_rtp_ip, PortNumber mgw_rtp_port) runs on BSC_ConnHdlr { + var MgcpCommand mgcp_cmd; + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + log("as_optional_mgcp_mdcx: rx MDCX"); + log(mgcp_cmd); + var charstring conn_id; + var charstring rtp_payload_type; + f_mgcp_find_param_entry(mgcp_cmd.params, "I", conn_id); + rtp_payload_type := mgcp_cmd.sdp.media_list[0].media_field.fmts[0]; + + var SDP_Message sdp := valueof(ts_SDP(mgw_rtp_ip, mgw_rtp_ip, + mgcp_cmd.sdp.origin.session_id, "42", + mgw_rtp_port, + { rtp_payload_type }, + { valueof(ts_SDP_ptime(20)) })); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, str2hex(conn_id), sdp)); + + /* Without this 'repeat', currently active other interleave and alt series exit as soon as an MDCX is + * handled. */ + repeat; + } +} + function f_mo_call_establish(inout CallParameters cpars) runs on BSC_ConnHdlr { @@ -968,6 +1101,8 @@ var PDU_BSSAP bssap; var MgcpOsmuxCID osmux_cid; + cpars.mo_call := true; + if (cpars.emergency) { f_establish_fully(EST_TYPE_EMERG_CALL); } else { @@ -984,8 +1119,14 @@ BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); } - var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass := - valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss)); + if (cpars.stop_after_cc_setup) { + return; + } + + var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass := + ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_conn_1.mgw_rtp_ip), ?); + + var default mdcx := activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_port)); interleave { [] MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc { @@ -994,43 +1135,20 @@ MNCC.send(ts_MNCC_RTP_CREATE(cpars.mncc_callref)); } - /* First MGCP CRCX (for BSS/RAN side) */ + /* First MGCP CRCX */ [] MGCP.receive(tr_CRCX) -> value mgcp_cmd { log("f_mo_call_establish 2: rx 1st CRCX"); - cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - - /* When the endpoint contains a wildcard we keep the endpoint - * identifier we have set up in cpars. Otherwise we use the - * endpoint name that the call agent has supplied */ - if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard) == false) { - cpars.mgcp_ep := mgcp_cmd.line.ep; + if (not f_handle_crcx(cpars, mgcp_cmd)) { + break; + } } - if (cpars.use_osmux) { - osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + /* Second MGCP CRCX */ + [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { + log("f_mo_call_establish 6: rx 2nd CRCX"); + if (not f_handle_crcx(cpars, mgcp_cmd)) { + break; } - - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_bss, cpars.mgw_rtp_ip_bss, - hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_bss, - { int2str(cpars.rtp_payload_type) }, - { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, - cpars.rtp_sdp_format)), - valueof(ts_SDP_ptime(20)) })); - - if (cpars.use_osmux) { - osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); - if (osmux_cid != -1) { /* we expect MSC to use wildcard here */ - setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != -1"); - mtc.stop; - } - osmux_cid := 0; - mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); - } else { - mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); - } - f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); - MGCP.send(mgcp_resp); } [] MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)) { @@ -1050,7 +1168,7 @@ var BSSMAP_IE_SpeechCodec codec; var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; - if (tla_ass != bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer) { + if (not match(bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer, tla_ass)) { log("Expected:", tla_ass); log("Got:", bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer); setverdict(fail, "MSC sent Assignment Request with unexpected AoIP Transport Layer IE"); @@ -1084,9 +1202,9 @@ /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */ [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { log("f_mo_call_establish 5: rx MDCX for the RAN side"); - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, + cpars.mgw_conn_2.mgw_rtp_port, { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), @@ -1098,22 +1216,25 @@ setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != 0"); mtc.stop; } - mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgw_conn_1.mgcp_connection_id, osmux_cid, sdp); } else { - mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp); + mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp); } MGCP.send(mgcp_resp); } - /* Second MGCP CRCX (this time for MSS/CN side) */ - [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { - log("f_mo_call_establish 6: rx 2nd CRCX, for CN side"); - var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); - } - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(cpars.transaction_id))) { log("f_mo_call_establish 7: rx CC Alerting"); + + if (cpars.ran_clear_when_alerting) { + if (g_pars.ran_is_geran) { + BSSAP.send(ts_BSSMAP_ClearRequest(0)); + } else { + BSSAP.send(ts_RANAP_IuReleaseRequest(ts_RanapCause_om_intervention)); + } + break; + } + cpars.mncc_callref := mncc.u.signal.callref; /* Call Proceeding */ MNCC.send(ts_MNCC_RTP_CONNECT(cpars.mncc_callref, @@ -1127,33 +1248,32 @@ log("f_mo_call_establish 8: rx MNCC SETUP COMPLETE ind"); } - /* second MDCX setting up the CN side remote RTP address and codec received from MNCC RTP CONNECT */ - [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { - log("f_mo_call_establish 9: rx MDCX for CN side"); - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, - hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, - { int2str(cpars.rtp_payload_type) }, - { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, - cpars.rtp_sdp_format)), - valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); - } - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CONNECT(cpars.transaction_id))) { log("f_mo_call_establish 10: rx CC CONNECT"); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT_ACK(cpars.transaction_id))); } + + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) { + log("f_mo_call_establish 11: rx CC RELEASE"); + f_expect_clear(); + break; + } + } + + f_sleep(0.5); + deactivate(mdcx); + + if (cpars.use_osmux == (cpars.got_osmux != 0)) { + log("Osmux ok: use_osmux = ", cpars.use_osmux, " got_osmux = ", cpars.got_osmux); + } else { + setverdict(fail, "Osmux failure: use_osmux = ", cpars.use_osmux, " got_osmux = ", cpars.got_osmux); + mtc.stop; } log("f_mo_call_establish DONE"); setverdict(pass); } -private altstep as_optional_mgcp_mdcx() runs on BSC_ConnHdlr { - [] MGCP.receive(tr_MDCX) {}; -} - function f_call_hangup(inout CallParameters cpars, boolean release_by_ms, boolean is_csfb := false) runs on BSC_ConnHdlr { @@ -1194,7 +1314,7 @@ respond_to_dlcx := not (isbound(cpars.mgw_drop_dlcx) and valueof(cpars.mgw_drop_dlcx)); - var default mdcx := activate(as_optional_mgcp_mdcx()); + var default mdcx := activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_port)); /* clearing of radio channel */ interleave { diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index c290d7c..b4db43d 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -608,12 +608,7 @@ friend function f_tc_lu_and_mo_call(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); - var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - + var CallParameters cpars := valueof(t_CallParams); f_perform_lu(); f_mo_call(cpars); } @@ -939,7 +934,6 @@ private function f_emerg_call(MobileIdentityLV mi) runs on BSC_ConnHdlr { var CallParameters cpars := valueof(t_CallParams('112'H, 0)); cpars.emergency := true; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; f_mo_call(cpars); } @@ -1213,14 +1207,14 @@ f_init_handler(pars, 190.0); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); + cpars.mgw_conn_2.resp := 0; + cpars.stop_after_cc_setup := true; + + f_vty_config(MSCVTY, "msc", "mncc guard-timeout 20"); f_perform_lu(); - f_establish_fully(); - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); - - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); + f_mo_call_establish(cpars); var default ccrel := activate(as_optional_cc_rel(cpars)); @@ -1247,28 +1241,15 @@ var MgcpCommand mgcp_cmd; f_perform_lu(); + /* Do not respond to the second CRCX */ + cpars.mgw_conn_2.resp := 0; + f_mo_call_establish(cpars); - f_establish_fully(); - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); + var default ccrel := activate(as_optional_cc_rel(cpars)); - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); - MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc; - cpars.mncc_callref := mncc.u.signal.callref; - MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); + f_expect_clear(60.0); - MGCP.receive(tr_CRCX) -> value mgcp_cmd; - cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - cpars.mgcp_ep := mgcp_cmd.line.ep; - /* never respond to this */ - - /* When the connection with the MGW fails, the MSC will first request - * a release via call control. We will answer this request normally. */ - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))); - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id))); - - f_expect_clear(30.0); + deactivate(ccrel); } testcase TC_mo_crcx_ran_timeout() runs on MTC_CT { var BSC_ConnHdlr vc_conn; @@ -1282,75 +1263,18 @@ /* Test MO Call with reject to RAN-side CRCX */ friend function f_tc_mo_crcx_ran_reject(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); + var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - var MNCC_PDU mncc; - var MgcpCommand mgcp_cmd; + + /* Respond with error for the first CRCX */ + cpars.mgw_conn_1.resp := -1; f_perform_lu(); + f_mo_call_establish(cpars); - f_establish_fully(); - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); - - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); - MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc; - cpars.mncc_callref := mncc.u.signal.callref; - MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); - - MGCP.receive(tr_CRCX) -> value mgcp_cmd; - - /* Detect if the received CRCX is a wildcarded CRCX request. If yes, - * set an endpoint name that fits the pattern. If not, just use the - * endpoint name from the request */ - if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard)) { - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - } else { - cpars.mgcp_ep := mgcp_cmd.line.ep; - } - - cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - - /* Respond to CRCX with error */ - var MgcpResponse mgcp_rsp := { - line := { - code := "542", - trans_id := mgcp_cmd.line.trans_id, - string := "FORCED_FAIL" - }, - sdp := omit - } - var MgcpParameter mgcp_rsp_param := { - code := "Z", - val := cpars.mgcp_ep - }; - mgcp_rsp.params[0] := mgcp_rsp_param; - MGCP.send(mgcp_rsp); - - timer T := 30.0; - T.start; - alt { - [] T.timeout { - setverdict(fail, "Timeout waiting for channel release"); - mtc.stop; - } - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) { - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id))); - repeat; - } - [] MNCC.receive { repeat; } - [] GSUP.receive { repeat; } - /* Note: As we did not respond properly to the CRCX from the MSC we - * expect the MSC to omit any further MGCP operation (At least in the - * the current implementation, there is no recovery mechanism implemented - * and a DLCX can not be performed as the MSC does not know a specific - * endpoint yet. */ - [] MGCP.receive { - setverdict(fail, "Unexpected MGCP message"); - mtc.stop; - } - [] as_clear_cmd_compl_disc(); - } + var default ccrel := activate(as_optional_cc_rel(cpars)); + f_expect_clear(60.0); + deactivate(ccrel); } testcase TC_mo_crcx_ran_reject() runs on MTC_CT { var BSC_ConnHdlr vc_conn; @@ -1520,10 +1444,6 @@ friend function f_tc_gsup_cancel(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; /* Location Update to make subscriber known */ f_perform_lu(); @@ -1741,15 +1661,8 @@ private function f_tc_lu_and_mt_call(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '10004'H; - cpars.mgcp_connection_id_mss := '10005'H; cpars.use_osmux := pars.use_osmux; - /* Note: This is an optional parameter. When the call-agent (MSC) does - * supply a full endpoint name this setting will be overwritten. */ - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - f_perform_lu(); f_mt_call(cpars); } @@ -1773,11 +1686,6 @@ private function f_tc_mo_setup_dtmf_dup(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.mo_call := true; f_perform_lu(); f_mo_seq_dtmf_dup(cpars); @@ -1838,20 +1746,11 @@ var MNCC_PDU mncc; var MgcpCommand mgcp_cmd; + /* Do not respond to the second CRCX */ + cpars.mgw_conn_2.resp := 0; + f_perform_lu(); - - f_establish_fully(); - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); - - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); - MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc; - cpars.mncc_callref := mncc.u.signal.callref; - MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); - - /* Drop CRCX */ - MGCP.receive(tr_CRCX) -> value mgcp_cmd; + f_mo_call_establish(cpars); var default ccrel := activate(as_optional_cc_rel(cpars)); @@ -1872,13 +1771,6 @@ private function f_tc_lu_and_mt_call_no_dlcx_resp(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '10004'H; - cpars.mgcp_connection_id_mss := '10005'H; - - /* Note: This is an optional parameter. When the call-agent (MSC) does - * supply a full endpoint name this setting will be overwritten. */ - cpars.mgcp_ep := "rtpbridge/1 at mgw"; /* Intentionally disable the CRCX response */ cpars.mgw_drop_dlcx := true; @@ -3107,10 +2999,6 @@ /* Call parameters taken from f_tc_lu_and_mt_call */ var CallParameters cpars := valueof(t_CallParams('123456'H, 0)); - cpars.mgcp_connection_id_bss := '10004'H; - cpars.mgcp_connection_id_mss := '10005'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.bss_rtp_port := 1110; /* Perform location update */ f_perform_lu(); @@ -3190,51 +3078,13 @@ friend function f_tc_mo_cc_bssmap_clear(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - var MNCC_PDU mncc; - var MgcpCommand mgcp_cmd; + cpars.ran_clear_when_alerting := true; f_perform_lu(); - f_establish_fully(); - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); - - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); - MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc; - cpars.mncc_callref := mncc.u.signal.callref; - log("mncc_callref=", cpars.mncc_callref); - MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); - - MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(cpars.transaction_id))); - MGCP.receive(tr_CRCX); - - f_sleep(1.0); - if (pars.ran_is_geran) { - BSSAP.send(ts_BSSMAP_ClearRequest(0)); - } else { - BSSAP.send(ts_RANAP_IuReleaseRequest(ts_RanapCause_om_intervention)); - } - var default ccrel := activate(as_optional_cc_rel(cpars)); - - if (pars.ran_is_geran) { - interleave { - [] MNCC.receive(tr_MNCC_REL_ind(?, ?)) { }; - [] BSSAP.receive(tr_BSSMAP_ClearCommand) { - BSSAP.send(ts_BSSMAP_ClearComplete); - }; - } - } else { - interleave { - [] MNCC.receive(tr_MNCC_REL_ind(?, ?)) { }; - [] BSSAP.receive(tr_RANAP_IuReleaseCommand(?)) { - BSSAP.send(ts_RANAP_IuReleaseComplete); - }; - } - } - + f_mo_call_establish(cpars); + f_expect_clear() deactivate(ccrel); f_sleep(1.0); @@ -3255,10 +3105,6 @@ /* Call parameters taken from f_tc_lu_and_mt_call */ var CallParameters cpars := valueof(t_CallParams('123456'H, 0)); - cpars.mgcp_connection_id_bss := '10004'H; - cpars.mgcp_connection_id_mss := '10005'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.bss_rtp_port := 1110; /* Perform location update */ f_perform_lu(); @@ -5020,13 +4866,6 @@ var octetstring vlr_name := f_enc_dns_hostname(mp_vlr_name); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '10004'H; - cpars.mgcp_connection_id_mss := '10005'H; - - /* Note: This is an optional parameter. When the call-agent (MSC) does - * supply a full endpoint name this setting will be overwritten. */ - cpars.mgcp_ep := "rtpbridge/1 at mgw"; /* Initiate a call via MNCC interface */ f_mt_call_initate(cpars); @@ -5142,11 +4981,6 @@ private function f_tc_ho_inter_bsc_unknown_cell(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.mo_call := true; f_perform_lu(); f_mo_call_establish(cpars); @@ -5175,25 +5009,20 @@ private altstep as_mgcp_ack_all_mdcx(CallParameters cpars) runs on BSC_ConnHdlr { var MgcpCommand mgcp_cmd; [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, + cpars.mgw_conn_2.mgw_rtp_port, { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp)); repeat; } } private function f_tc_ho_inter_bsc0(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.mo_call := true; f_init_handler(pars); @@ -5353,11 +5182,6 @@ private function f_tc_ho_inter_msc_out(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.mo_call := true; var hexstring ho_number := f_gen_msisdn(99999); f_init_handler(pars); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:18:12 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:18:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: fix Iu mo call References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 ) Change subject: msc: fix Iu mo call ...................................................................... msc: fix Iu mo call Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec --- M library/ranap/RANAP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn 2 files changed, 48 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/39/15939/1 diff --git a/library/ranap/RANAP_Templates.ttcn b/library/ranap/RANAP_Templates.ttcn index df4ea03..c616231 100644 --- a/library/ranap/RANAP_Templates.ttcn +++ b/library/ranap/RANAP_Templates.ttcn @@ -1305,7 +1305,7 @@ protocolIEs := { { id := id_RAB_SetupOrModifyList, - criticality := reject, + criticality := ?, value_ := { rAB_SetupOrModifyList := rab_sml } diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 23697da..b11d24b 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1091,6 +1091,20 @@ } } +private altstep as_optional_mgcp_dlcx(CallParameters cpars) runs on BSC_ConnHdlr { + var MgcpCommand mgcp_cmd; + var boolean respond_to_dlcx := not (isbound(cpars.mgw_drop_dlcx) and valueof(cpars.mgw_drop_dlcx)); + [] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { + log("as_optional_mgcp_dlcx: rx MGCP DLCX"); + if (respond_to_dlcx) { + MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id)); + } + /* Without this 'repeat', currently active other interleave and alt series exit as soon as a + * DLCX is handled. */ + repeat; + } +} + function f_mo_call_establish(inout CallParameters cpars) runs on BSC_ConnHdlr { @@ -1099,6 +1113,7 @@ var template MgcpResponse mgcp_resp; var boolean respond_to_dlcx; var PDU_BSSAP bssap; + var RANAP_PDU ranap; var MgcpOsmuxCID osmux_cid; cpars.mo_call := true; @@ -1193,11 +1208,29 @@ } BSSAP.send(bssap); } - /* - [!g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) { - //BSSAP.send(ts_RANAP_RabAssResp(rab_sml)); FIXME + [] BSSAP.receive(tr_RANAP_RabAssReq(*)) -> value ranap { + log("f_mo_call_establish 4.iu: rx RANAP RAB Assignment Request"); + var RAB_SetupOrModifiedList l := { + { + { + id := id_RAB_SetupOrModifiedItem, + criticality := ignore, + value_ := { + rAB_SetupOrModifiedItem := { + rAB_ID := int2bit(23, 8), + transportLayerAddress := hex2bit( '350001c0a8021500000000000000000000000000'H), + iuTransportAssociation := { + bindingID := '040c0000'O + }, + dl_dataVolumes := omit, + iE_Extensions := omit + } + } + } + } + }; + BSSAP.send(ts_RANAP_RabAssResp(l)); } - */ /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */ [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { @@ -1315,48 +1348,32 @@ respond_to_dlcx := not (isbound(cpars.mgw_drop_dlcx) and valueof(cpars.mgw_drop_dlcx)); var default mdcx := activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_port)); + var default dlcx := activate(as_optional_mgcp_dlcx(cpars)); /* clearing of radio channel */ - interleave { - //[g_pars.ran_is_geran] BSSAP.receive(t_clear) { - [] BSSAP.receive(t_clear) { + alt { + [g_pars.ran_is_geran] BSSAP.receive(t_clear) { log("f_call_hangup 5: rx BSSAP Clear Command"); BSSAP.send(ts_BSSMAP_ClearComplete); BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND); log("f_call_hangup 6: rx SCCP DISC"); + setverdict(pass); } - /* - [!g_pars.ran_is_geran] BSSAP.receive(t_iurel) { + [not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_IuReleaseCommand(?)) { + log("f_call_hangup 5.iu: rx Iu Release Command"); BSSAP.send(ts_RANAP_IuReleaseComplete); BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND); - } - */ - [] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { - log("f_call_hangup 7: rx MGCP DLCX"); - if (respond_to_dlcx) { - MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id)); - } - dlcx_contained_ci := f_MgcpCmd_contains_par(mgcp_cmd, "I"); + log("f_call_hangup 6.iu: rx SCCP DISC"); + setverdict(pass); } } - /* Two DLCXes expected, one for RAN and one for CN side. - * Unless the first DLCX did not contain a CI, in which case it was a wildcard DLCX for both. */ - if (dlcx_contained_ci) { - MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { - log("f_call_hangup 8: rx MGCP DLCX"); - if (respond_to_dlcx) { - MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id)); - } - } - } - + f_sleep(1.0); f_create_mgcp_delete_ep(cpars.mgcp_ep); log("f_call_hangup 9: done"); deactivate(mdcx); - - setverdict(pass); + deactivate(dlcx); } function f_mt_call(inout CallParameters cpars) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec Gerrit-Change-Number: 15939 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:18:13 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:18:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add and fix Iu mt call References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15940 ) Change subject: msc: add and fix Iu mt call ...................................................................... msc: add and fix Iu mt call Change-Id: I3ce29f3d9254656dc295674e8cec72a741b7764a --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn M msc/MSC_Tests_Iu.ttcn 3 files changed, 88 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/15940/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index b11d24b..63c64bb 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -905,21 +905,89 @@ } } else { - var template TransportLayerAddress rab_tla := ? /* FIXME: encode the mgw_rtp_ip/mgw_rtp_port */ - var template RAB_SetupOrModifyList rab_sml := tr_RAB_SML(rab_id := ?, tla := rab_tla, binding_id := ?); - interleave { [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { - var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp)); - /* MSC acknowledges the MNCC_CREATE to the MNCC handler */ - MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)); + log("f_mt_call_complete 4.iu"); + if (not f_handle_crcx(cpars, mgcp_cmd)) { + break; } - [] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) { - //BSSAP.send(ts_RANAP_RabAssResp(rab_sml)); FIXME } - /* FIXME: same MNCC and MGCP as in 2G above */ + /* MSC acknowledges the MNCC_CREATE to the MNCC handler */ + [] MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)) { + log("f_mt_call_complete 5.iu"); + } + + [] BSSAP.receive(tr_RANAP_RabAssReq(?)) { + log("f_mt_call_complete 6.iu"); + var RAB_SetupOrModifiedList l := { + { + { + id := id_RAB_SetupOrModifiedItem, + criticality := ignore, + value_ := { + rAB_SetupOrModifiedItem := { + rAB_ID := int2bit(23, 8), + transportLayerAddress := hex2bit( '350001c0a8021500000000000000000000000000'H), + iuTransportAssociation := { + bindingID := '040c0000'O + }, + dl_dataVolumes := omit, + iE_Extensions := omit + } + } + } + } + }; + BSSAP.send(ts_RANAP_RabAssResp(l)); + + BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT(cpars.transaction_id))); + } + + [] MNCC.receive(tr_MNCC_SETUP_cnf(cpars.mncc_callref)) { + log("f_mt_call_complete 7.iu"); + MNCC.send(ts_MNCC_RTP_CONNECT(cpars.mncc_callref, + /* ip 42.23.11.5 */ hex2int('42231105'H), + /* port 423 */ 423, + /* payload type 3 = GSM FR */ 3)); + } + + /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */ + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + log("f_mt_call_complete 8.iu"); + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, + hex2str(cpars.mgcp_call_id), "42", + cpars.mgw_conn_2.mgw_rtp_port, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + if (osmux_cid != 0) { /* we expect MSC to use specific CID here */ + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != 0"); + mtc.stop; + } + mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgw_conn_1.mgcp_connection_id, osmux_cid, sdp); + } else { + mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp); + } + MGCP.send(mgcp_resp); + } + + /* MDCX setting up the CN side remote RTP address received from MNCC CONNECT */ + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + log("f_mt_call_complete 9.iu"); + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, + hex2str(cpars.mgcp_call_id), "42", + cpars.mgw_conn_2.mgw_rtp_port, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp)); + } + } } diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index b4db43d..4ef592f 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1658,7 +1658,7 @@ } /* LU followed by MT call (including paging) */ -private function f_tc_lu_and_mt_call(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { +friend function f_tc_lu_and_mt_call(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); cpars.use_osmux := pars.use_osmux; diff --git a/msc/MSC_Tests_Iu.ttcn b/msc/MSC_Tests_Iu.ttcn index 628fbcd..987baf0 100644 --- a/msc/MSC_Tests_Iu.ttcn +++ b/msc/MSC_Tests_Iu.ttcn @@ -249,6 +249,13 @@ vc_conn.done; } +testcase TC_iu_lu_and_mt_call() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(3); + vc_conn := f_start_handler(refers(f_tc_lu_and_mt_call), 1142, ran_idx := 2, ran_is_geran := false); + vc_conn.done; +} + testcase TC_iu_lu_and_mo_sms() runs on MTC_CT { var BSC_ConnHdlr vc_conn; f_init(3); @@ -438,6 +445,8 @@ execute( TC_iu_mo_release_timeout() ); execute( TC_reset_two_1iu() ); + execute( TC_iu_lu_and_mt_call() ); + execute( TC_iu_lu_and_mo_sms() ); execute( TC_iu_lu_and_mt_sms() ); execute( TC_iu_lu_and_mt_sms_paging_and_nothing() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3ce29f3d9254656dc295674e8cec72a741b7764a Gerrit-Change-Number: 15940 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:18:13 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:18:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: log tweaks for call / call hangup References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15941 ) Change subject: msc: log tweaks for call / call hangup ...................................................................... msc: log tweaks for call / call hangup Change-Id: I06474e3d592195a8c422493166d9f042da1ac7e6 --- M msc/BSC_ConnectionHandler.ttcn 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/41/15941/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 63c64bb..853d1e5 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1389,6 +1389,7 @@ t_clear := tr_BSSMAP_ClearCommandCSFB; } + log("f_call_hangup 0: tx MNCC_DISC_REQ"); MNCC.send(ts_MNCC_DISC_req(cpars.mncc_callref, valueof(ts_MNCC_cause(23)))); BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_DISC(cpars.transaction_id))); @@ -1449,9 +1450,10 @@ f_mt_call_establish(cpars); - /* Hold the call for some time */ + log("Hold the call for some time"); f_sleep(3.0); + log("Hangup"); f_call_hangup(cpars, true); setverdict(pass); @@ -1462,9 +1464,10 @@ f_mo_call_establish(cpars); - /* Hold the call for some time */ + log("Hold the call for some time"); f_sleep(3.0); + log("Hangup"); f_call_hangup(cpars, false); setverdict(pass); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15941 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I06474e3d592195a8c422493166d9f042da1ac7e6 Gerrit-Change-Number: 15941 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:18:13 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:18:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add f_tc_invalid_mgcp_crash References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15942 ) Change subject: msc: add f_tc_invalid_mgcp_crash ...................................................................... msc: add f_tc_invalid_mgcp_crash Make sure that osmo-msc doesn't crash if a successful CRCX response contains an invalid IP address. Originally/recently, osmo-msc did not validate the IP addresses at all. In an intermediate patch I added error handling, releasing the call. That uncovered a use-after-free problem in libosmo-mgcp-client. This problem is fixed by osmo_fsm_set_dealloc_ctx() and an osmo-mgw fix (see I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 in osmo-mgw). Add this test to make sure the crash is not re-introduced. Change-Id: I0c76b0a7a33a96a39a242ecd387ba3769161cf7a --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 2 files changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/15942/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 853d1e5..092906d 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -711,6 +711,7 @@ (f_mt_call and f_mt_call) */ boolean stop_after_cc_setup, /* Special case: stop call establish after CC Setup */ boolean ran_clear_when_alerting, /* Special case: send Clear upon CC Alerting */ + boolean expect_release, /* Special case: expect call establish to cause direct CC Rel */ MgcpCallId mgcp_call_id optional, /* MGCP Call ID; CallAgent allocated */ MgcpEndpoint mgcp_ep optional /* MGCP Endpoint, CallAgent or MGW allocated */, @@ -749,6 +750,7 @@ mgw_drop_dlcx := false, stop_after_cc_setup := false, ran_clear_when_alerting := false, + expect_release := false, mgcp_call_id := omit, mgcp_ep := "rtpbridge/1 at mgw", use_osmux := false, @@ -1210,6 +1212,8 @@ ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_conn_1.mgw_rtp_ip), ?); var default mdcx := activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_port)); + var boolean got_mncc_setup_compl_ind := false; + var boolean got_cc_connect := false; interleave { [] MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc { @@ -1347,15 +1351,27 @@ [] MNCC.receive(tr_MNCC_SETUP_COMPL_ind(?)) -> value mncc { log("f_mo_call_establish 8: rx MNCC SETUP COMPLETE ind"); + got_mncc_setup_compl_ind := true; + if (not cpars.expect_release and got_cc_connect) { + break; + } } [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CONNECT(cpars.transaction_id))) { log("f_mo_call_establish 10: rx CC CONNECT"); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT_ACK(cpars.transaction_id))); + got_cc_connect := true; + if (not cpars.expect_release and got_mncc_setup_compl_ind) { + break; + } } [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) { log("f_mo_call_establish 11: rx CC RELEASE"); + if (not cpars.expect_release) { + setverdict(fail, "Got unexpected CC Release"); + mtc.stop; + } f_expect_clear(); break; } diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 4ef592f..480ec96 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -5662,6 +5662,29 @@ vc_conn.done; } +friend function f_tc_invalid_mgcp_crash(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars); + var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); + + /* Set invalid IP address so that osmo-msc discards the rtp_stream and MGCP endpoint FSM instances in the middle + * of successful MGCP response dispatch. If things aren't safeguarded, the on_success() in osmo_mgcpc_ep_fsm + * will cause a use-after-free after that event dispatch. */ + cpars.mgw_conn_1.mgw_rtp_ip := "0.0.0.0"; + cpars.mgw_conn_2.mgw_rtp_ip := "0.0.0.0"; + cpars.rtp_sdp_format := "FOO/8000"; + cpars.expect_release := true; + + f_perform_lu(); + f_mo_call_establish(cpars); +} +testcase TC_invalid_mgcp_crash() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + + vc_conn := f_start_handler(refers(f_tc_invalid_mgcp_crash), 7); + vc_conn.done; +} + control { execute( TC_cr_before_reset() ); execute( TC_lu_imsi_noauth_tmsi() ); @@ -5792,6 +5815,7 @@ if (mp_enable_osmux_test) { execute( TC_lu_and_mt_call_osmux() ); } + execute( TC_invalid_mgcp_crash() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0c76b0a7a33a96a39a242ecd387ba3769161cf7a Gerrit-Change-Number: 15942 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:18:13 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:18:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: re-implement compare-results.sh as compare-results.py References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 ) Change subject: re-implement compare-results.sh as compare-results.py ...................................................................... re-implement compare-results.sh as compare-results.py The compare-results.sh is annoyingly slow. Since our ttcn3 tests containers support Python 2, re-implement in Python for much quicker evaluation. Change-Id: I0747c9d66ffc7e4121497a2416fca78d7b56c8e6 --- A compare-results.py D compare-results.sh M start-testsuite.sh 3 files changed, 144 insertions(+), 214 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/43/15943/1 diff --git a/compare-results.py b/compare-results.py new file mode 100755 index 0000000..48efd78 --- /dev/null +++ b/compare-results.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python +# Copyright 2018 sysmocom - s.f.m.c. GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import argparse +import re + +doc = "Compare TTCN3 test run results with expected results by junit logs." + +# The nicest would be to use an XML library, but I don't want to introduce dependencies on the build slaves. +re_testcase = re.compile(r'''''') +re_testcase_end = re.compile(r'''(|]*/>)''') +re_failure = re.compile(r'''($')" ]; then - test_result="pass" - else - test_result="FAIL" - fi -} - -pass=0 -xfail=0 -more_failures=0 -more_successes=0 -skipped=0 -new=0 - -while read line; do - parse_testcase "$line" - exp_suite_name="$suite_name" - exp_test_name="$test_name" - exp_test_result="$test_result" - matched="0" - - while read line; do - parse_testcase "$line" - if [ "x$exp_suite_name" != "x$suite_name" ]; then - continue - fi - if [ "x$exp_test_name" != "x$test_name" ]; then - continue - fi - - if [ "x$exp_test_result" = "x$test_result" ]; then - if [ "x$exp_test_result" = "xFAIL" ]; then - exp_test_result="xfail" - (( xfail += 1 )) - else - (( pass += 1 )) - fi - echo "$exp_test_result $suite_name.$test_name" - else - if [ "x$exp_test_result" = "xFAIL" ]; then - exp_test_result="xfail" - fi - echo "$exp_test_result->$test_result $suite_name.$test_name" - if [ "x$test_result" = "xFAIL" ]; then - (( more_failures += 1 )) - else - (( more_successes += 1 )) - fi - fi - matched="1" - break - done <<< "$(grep " Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:20:32 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 3 Nov 2019 23:20:32 +0000 Subject: Change in osmo-msc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15850 ) Change subject: fsm: use deferred deallocation ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15850 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I08c03946605aa12e0a5ce8b3c773704ef5327a7a Gerrit-Change-Number: 15850 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 03 Nov 2019 23:20:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:06 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 3 Nov 2019 23:21:06 +0000 Subject: Change in libosmocore[master]: gsm_04_08.h: Introduce API osmo_gsm48_rfpowercap2powerclass() In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15923 ) Change subject: gsm_04_08.h: Introduce API osmo_gsm48_rfpowercap2powerclass() ...................................................................... gsm_04_08.h: Introduce API osmo_gsm48_rfpowercap2powerclass() Related: OS#4244 Change-Id: I32e9cc1c2397b44f0d48db2acdf782a821365b63 --- M TODO-RELEASE M include/osmocom/gsm/protocol/gsm_04_08.h M src/gsm/gsm48.c M src/gsm/libosmogsm.map M tests/gsm0408/gsm0408_test.c 5 files changed, 49 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved neels: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index 547b5a9..9af92c1 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line core osmo_tdef_get() change val_if_not_present arg from unsigned long to long to allow passing -1 core struct osmo_tdef fields min_val,max_val added, ABI break (arrays of structs used in programs) +gsm API added osmo_gsm48_rfpowercap2powerclass() diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 6a6c7f3..b5317d5 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -10,6 +10,7 @@ #include struct gsm_lchan; +enum gsm_band; /* Chapter 10.5.1.5 */ struct gsm48_classmark1 { @@ -73,7 +74,7 @@ char *osmo_gsm48_classmark_a5_name_buf(char *buf, size_t buf_len, const struct osmo_gsm48_classmark *cm); char *osmo_gsm48_classmark_a5_name_c(const void *ctx, const struct osmo_gsm48_classmark *cm); void osmo_gsm48_classmark_update(struct osmo_gsm48_classmark *dst, const struct osmo_gsm48_classmark *src); - +int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); /* Chapter 10.5.2.1b.3 */ #if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_1024 { diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 2d6deb5..17b0829 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -1390,4 +1390,25 @@ } } +/*! Decode power class from Classmark1/2 RF power capability field. + * \param[in] rf_power_cap The RF power capability field (3 bits). + * \param[in] band the band of the arfcn from where the classmark was received + * \return the MS power class on success, negative on error. + */ +int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap) +{ + switch (band) { + case GSM_BAND_1800: + case GSM_BAND_1900: + if (rf_power_cap > 2) + return -1; + return rf_power_cap + 1; + default: + if (rf_power_cap > 4) + return -1; + return rf_power_cap + 1; + } +} + + /*! @} */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 724fe5b..a0e3b32 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -646,6 +646,7 @@ osmo_gsm48_classmark_a5_name_buf; osmo_gsm48_classmark_a5_name_c; osmo_gsm48_classmark_update; +osmo_gsm48_rfpowercap2powerclass; cbsp_msg_type_names; cbsp_iei_names; diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index db1d45a..2488024 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -1132,6 +1133,28 @@ VERIFY(f0, ==, 1); } +static void test_power_ctrl() +{ + int8_t rc8; + + rc8 = osmo_gsm48_rfpowercap2powerclass(GSM_BAND_850, 0x00); + VERIFY(rc8, ==, 1); + rc8 = osmo_gsm48_rfpowercap2powerclass(GSM_BAND_900, 0x02); + VERIFY(rc8, ==, 3); + rc8 = osmo_gsm48_rfpowercap2powerclass(GSM_BAND_1800, 0x02); + VERIFY(rc8, ==, 3); + rc8 = osmo_gsm48_rfpowercap2powerclass(GSM_BAND_1900, 0x02); + VERIFY(rc8, ==, 3); + rc8 = osmo_gsm48_rfpowercap2powerclass(GSM_BAND_1900, 0x04); + VERIFY(rc8, <, 0); + rc8 = osmo_gsm48_rfpowercap2powerclass(GSM_BAND_900, 0x04); + VERIFY(rc8, ==, 5); + rc8 = osmo_gsm48_rfpowercap2powerclass(GSM_BAND_900, 0x05); + VERIFY(rc8, <, 0); + rc8 = osmo_gsm48_rfpowercap2powerclass(GSM_BAND_900, 0xf2); + VERIFY(rc8, <, 0); +} + int main(int argc, char **argv) { test_bearer_cap(); @@ -1147,6 +1170,7 @@ test_arfcn_filter(); test_print_encoding(); test_range_encoding(); + test_power_ctrl(); return EXIT_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I32e9cc1c2397b44f0d48db2acdf782a821365b63 Gerrit-Change-Number: 15923 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:18 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:18 +0000 Subject: Change in osmo-msc[master]: rtp_stream: sanely cancel MGW endpoint FSM notify In-Reply-To: References: Message-ID: Hello pespin, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15851 to look at the new patch set (#2). Change subject: rtp_stream: sanely cancel MGW endpoint FSM notify ...................................................................... rtp_stream: sanely cancel MGW endpoint FSM notify libosmo-mgcp-client recently introduced osmo_mgcpc_ep_cancel_notify() to cancel notification if a notify target FSM deallocates. Use it for sanity in rtp_stream FSM cleanup, the notify target for endpoint FSMs. Depends: I41687d7f3a808587ab7f7520f46dcc3c29cff92d (osmo-mgw) I14f7a46031327fb2b2047b998eae6ad0bb7324ad (osmo-mgw) Change-Id: I351bb8e8fbc46eb629bcd599f6453e2c84c15015 --- M src/libmsc/rtp_stream.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/51/15851/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15851 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I351bb8e8fbc46eb629bcd599f6453e2c84c15015 Gerrit-Change-Number: 15851 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:19 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:19 +0000 Subject: Change in osmo-msc[master]: add msc_log_to_ladder.py References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15944 ) Change subject: add msc_log_to_ladder.py ...................................................................... add msc_log_to_ladder.py Add script that reads in an osmo-msc log output and extracts the interesting information for displaying a sequence chart of voice call log, in mscgen format. I want to visualize how the sequence of messages changes across patches. It is error prone to do it manually, and re-doing the sequence chart for every patch (and patch rework) would be prohibitively time consuming. Change-Id: I2e4d8778f7b83dee558517a9b23450b817ee325d --- A doc/sequence_charts/msc_log_to_ladder.py 1 file changed, 724 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/44/15944/1 diff --git a/doc/sequence_charts/msc_log_to_ladder.py b/doc/sequence_charts/msc_log_to_ladder.py new file mode 100755 index 0000000..1ceaeb6 --- /dev/null +++ b/doc/sequence_charts/msc_log_to_ladder.py @@ -0,0 +1,724 @@ +#!/usr/bin/env python3 +doc=r''' +Reading a log, it can be hard to figure out what is the important bit going on. +This is a tool that reads an osmo-msc log and tries to compose a ladder diagram from it automatically. +''' + +import argparse +import sys +import re +import tempfile +import os + +def error(*msg): + sys.stderr.write('%s\n' % (''.join(msg))) + exit(1) + +def quote(msg, quote='"'): + return '"%s"' % (msg.replace('"', r'\"')) + +class Entity: + def __init__(self, name, descr=None, attrs={}): + self.name = name + self.descr = descr + self.attrs = attrs + +class Arrow: + def __init__(self, mo_mt, left, arrow, right, descr=None, attrs={}, ran_conn=None, imsi=None, tmsi=None): + self.mo_mt = mo_mt + self.left = left + self.arrow = arrow + self.right = right + self.descr = descr + self.attrs = attrs + self.ran_conn = ran_conn + self.imsi = imsi + self.tmsi = tmsi + + def __repr__(self): + return 'Arrow(%s %s %s %s: %s IMSI=%s)' % (self.mo_mt, self.left, self.arrow, self.right, self.descr, self.imsi) + +class Separator: + def __init__(self): + self.separator = None + self.descr = None + self.attrs = {} + +class EmptyLine: + def __init__(self): + self.count = 1 + +MS = 'ms' +UE = 'ms' #'ue' +MS_UE_UNKNOWN = 'ms' #None +MSC = 'msc' +MGW = 'mgw' +SIP = 'sip' + +MO = 'mo' +MT = 'mt' +MO_MT_UNKNOWN = None + + +class OutputBase: + def __init__(self, write_to, start_with_re=None): + self._write_to = write_to + + self.start_with_re = None + if start_with_re is not None: + self.start_with_re = re.compile(start_with_re) + + def head(self): + self.writeln('# Generated by msc_log_to_ladder.py') + + def tail(self): + pass + + def render(self, diagram): + self.head() + if diagram.root_attrs: + self.root_attrs(diagram.root_attrs) + self.entities(diagram.entities) + + started = (self.start_with_re is None) + + for line in diagram.lines: + if not started: + if hasattr(line, 'descr') and self.start_with_re.match(line.descr): + started = True + else: + continue + self.add(line) + self.tail() + + def entities(self, entities): + for entity in entities: + self.entity(entity) + + def write(self, line): + self._write_to.write(line) + + def writeln(self, line): + self.write('%s\n' % line) + + def emptyline(self, emptyline): + self.write('\n' * emptyline.count); + + def add(self, thing): + func = getattr(self, thing.__class__.__name__.lower()) + func(thing) + + +class OutputLadder(OutputBase): + + def indent_multiline(self, s): + return s.replace('\n', '\n\t') + + def attrs_str(self, attrs, prefix=' '): + if not attrs: + return '' + return '%s{%s}' % (prefix or '', ','.join('%s=%s' % (k,v) for k,v in attrs.items())) + + def root_attrs(self, attrs): + self.writeln(self.attrs_str(attrs, prefix=None)) + + def entity(self, entity): + self.writeln('%s = %s%s' % (entity.name, self.indent_multiline(entity.descr), self.attrs_str(entity.attrs))) + + def arrow(self, arrow): + mo_mt = arrow.mo_mt or MO + + def prepend_mo_mt(name): + if name in ('.', SIP): + return name + return '%s%s' % (mo_mt, name) + + self.writeln('%s %s %s%s%s%s' + % (prepend_mo_mt(arrow.left), + arrow.arrow, + prepend_mo_mt(arrow.right), + '\t' if arrow.descr else '', + self.indent_multiline(arrow.descr or ''), + self.attrs_str(arrow.attrs))) + + def separator(self, sep_str, descr, attrs): + self.writeln('%s%s%s%s' + % (separator.separator, + ' ' if separator.descr else '', + self.indent_multiline(separator.descr or ''), + self.attrs_str(separator.attrs))) + +class OutputMscgen(OutputBase): + ARROWS = { + '>' : '=>>', + '->' : '=>', + '-->' : '>>', + '~>' : '->', + '=>' : ':>', + '-><' : '-x', + + '<' : '<<=', + '<-' : '<=', + '<--' : '<<', + '<~' : '<-', + '<=' : '<:', + '><-' : 'x-', + + '<>' : 'abox', + '()' : 'rbox', + '[]' : 'note', + } + + def head(self): + super().head() + self.writeln('msc {') + + def tail(self): + self.writeln('}') + + def entities(self, entities): + estr = [] + for entity in entities: + estr.append('%s%s' % (entity.name, self.attrs_str(self.all_attrs(entity.descr, entity.attrs), prefix=''))) + if not estr: + return + self.writeln('%s;' % (','.join(estr))) + + def attrs_list_str(self, attrs): + if not attrs: + return '' + def escape(s): + return s.replace('\n', r'\n').replace('\r', '').replace('\t', r'\t') + return ','.join('%s="%s"' % (k,escape(v)) for k,v in attrs.items()) + + def attrs_str(self, attrs, prefix=' '): + attrs_list_str = self.attrs_list_str(attrs) + if not attrs_list_str: + return '' + return '%s[%s]' % (prefix or '', attrs_list_str) + + def root_attrs(self, attrs): + if not attrs: + return + self.writeln('%s;' % self.attrs_list_str(attrs)) + + def all_attrs(self, descr, attrs): + a = {} + if descr: + a['label'] = descr + a.update(attrs) + return a + + def entity(self, entity): + error('OutputMscgen.entity() should not be called') + + def arrow_txlate(self, arrow): + txlate = OutputMscgen.ARROWS.get(arrow) + if not txlate: + error('Unknown arrow: %r' % arrow) + return txlate + + def arrow(self, arrow): + mo_mt = arrow.mo_mt or MO + + def prepend_mo_mt(name): + if name in ('.', SIP): + return name + return '%s%s' % (mo_mt, name) + + l = prepend_mo_mt(arrow.left) + r = arrow.right + if r == '.': + r = l + else: + r = prepend_mo_mt(r) + + a = {'label': arrow.descr} + a.update(arrow.attrs) + attrs = self.attrs_str(a) + + self.writeln('%s %s %s%s;' + % (l, self.arrow_txlate(arrow.arrow), r, + self.attrs_str(self.all_attrs(arrow.descr, arrow.attrs), prefix='\t'))) + + def separator(self, sep_str, descr, attrs): + self.writeln('%s%s%s%s;' + % (separator.separator, + self.attrs_str(self.all_attrs(descr, attrs), prefix='\t'))) + + def emptyline(self, emptyline): + self.write('\n' * emptyline.count); + + +def ms_from_ran(ran_type_or_conn): + if ran_type_or_conn.startswith('UTRAN-Iu'): + return UE + if ran_type_or_conn.startswith('RANAP'): + return UE + if ran_type_or_conn.startswith('GERAN-A'): + return MS + if ran_type_or_conn.startswith('BSS'): + return MS + return MS_UE_UNKNOWN + +class Diagram: + def __init__(self): + self.root_attrs = {} + self.entities = [] + self.lines = [] + self.mo_mt_unknown_lines = [] + + def add_line(self, line): + self.lines.append(line) + + def resolve_unknown_mo_mt(self): + + def try_match(a, b): + if a < 0 or a >= len(self.lines): + return False + if b < 0 or b >= len(self.lines): + return False + la = self.lines[a] + lb = self.lines[b] + + if not hasattr(lb, 'mo_mt'): + return False + if lb.mo_mt == MO_MT_UNKNOWN: + return False + + for match_attr in ('imsi', 'tmsi', 'ran_conn'): + if not hasattr(la, match_attr): + continue + if not hasattr(lb, match_attr): + continue + la_attr = getattr(la, match_attr) + if la_attr is None: + continue + lb_attr = getattr(lb, match_attr) + if la_attr == lb_attr: + la.mo_mt = lb.mo_mt + return True + return False + + + while True: + changes = 0 + for i in range(len(self.lines)): + line = self.lines[i] + + if not hasattr(line, 'mo_mt'): + continue + if line.mo_mt is not MO_MT_UNKNOWN: + continue + + # don't know MO/MT, try to resolve from near messages + for j in range(1,100): + if try_match(i, i-j): + break + if try_match(i, i+j): + break + if line.mo_mt is not MO_MT_UNKNOWN: + changes += 1 + if not changes: + break + + +re_source_file_last = re.compile(r'(.*) \(([^):]+:[0-9]+)\)$') + +class Rule: + def __init__(self, name, re_str, handler): + self.name = name + self.re = re.compile(re_str) + self.handler = handler + + def match(self, line): + m = self.re.match(line) + if not m: + return False + return self.handler(m) + + +def mo_mt_from_l3type(l3type): + if l3type == 'PAGING_RESP': + return MT + elif l3type == 'CM_SERVICE_REQ': + return MO + else: + return MO_MT_UNKNOWN + +def int_to_hex(val, bits): + return hex((int(val) + (1 << bits)) % (1 << bits)) + +class Callref: + MAX = 0x7fffffff + MIN = -0x80000000 + BITS = 32 + + def int_to_hex(val): + return int_to_hex(val, Callref.BITS) + + def hex_to_int(hexstr): + val = int(hexstr, 16) + if val > Callref.MAX: + val = Callref.MIN + (val & Callref.MAX) + return val + +class Parse: + + def __init__(self, output, mask_values=False): + + self.diagram = Diagram() + self.output = output + self.linenr = 0 + self.rules = [] + self.seen_udtrace_mncc = False + + self.callrefs_mo_mt = {} + self.mask_values = mask_values + self.masked_values = {} + + for member in dir(self): + if not member.startswith('rule_'): + continue + func = getattr(self, member) + if not callable(func): + continue + + docstr = func.__doc__ + if not docstr: + continue + re_str = docstr.splitlines()[0] + + self.rules.append(Rule(name=member, re_str=re_str, handler=func)) + + + + def error(self, *msg): + error('line %d: ' % self.linenr, *msg) + + def start(self): + self.diagram.root_attrs = {'hscale': '3'} + for name, descr in ( + ('moms', 'MS,BSS (MO)\\nUE,hNodeB (MO)'), + #('moue', 'UE,hNodeB (MO)'), + ('momgw', 'MGW for MSC (MO)'), + ('momsc', 'MSC (MO)'), + ('sip', 'MNCC to PBX via\nosmo-sip-connector'), + ('mtmsc', 'MSC (MT)'), + ('mtmgw', 'MGW for MSC (MT)'), + ('mtms', 'BSS,MS (MT)\\nhNodeB,UE (MT)'), + #('mtue', 'hNodeB,UE (MT)'), + ): + self.diagram.entities.append(Entity(name, descr)) + + def end(self): + self.diagram.resolve_unknown_mo_mt() + self.output.render(self.diagram) + + def mask_value(self, name, val): + if not self.mask_values: + return val + if not val: + return val + name_dict = self.masked_values.get(name) + if not name_dict: + name_dict = {} + self.masked_values[name] = name_dict + + masked_val = name_dict.get(val) + if masked_val is None: + masked_val = '%s-%d' % (name, len(name_dict) + 1) + name_dict[val] = masked_val + return masked_val + + def add_line(self, line): + self.linenr += 1 + if line.endswith('\n'): + line = line[:-1] + if line.endswith('\r'): + line = line[:-1] + + self.interpret(line) + + def interpret(self, line): + + m = re_source_file_last.match(line) + if m: + line = m.group(1) + + for rule in self.rules: + if rule.match(line): + break + + RE_DTAP_NAME = re.compile('.*GSM48_MT_([^_]+)_(.+)') + + def rule_paging(self, m): + r'.*ran_peer\(([^:]+):.* Paging for ([^ ]+) on ([^ ]+)' + ran_type, subscr, cell = m.groups() + + self.diagram.add_line(Arrow(MT, ms_from_ran(ran_type), '<', MSC, 'Paging')) + return True + + RE_IMSI = re.compile('IMSI-([0-9]+)') + RE_TMSI = re.compile('TMSI-0x([0-9a-fA-F]+)') + + def rule_dtap(self, m): + r'.*msc_a\(([^)]*):([^:]+):([^:]+)\).* (Dispatching 04.08 message|Sending DTAP): (.+)$' + + subscr, ran_conn, l3type, rx_tx, dtap = m.groups() + tx = (rx_tx == 'Sending DTAP') + + m = self.RE_DTAP_NAME.match(dtap) + if m: + dtap = '%s %s' % m.groups() + + if 'IMSI_DETACH_IND' in dtap: + # detecting IMSI Detach separately + return True + + if l3type == 'NONE' and not tx and dtap.endswith('PAG_RESP'): + e = MT + else: + e = mo_mt_from_l3type(l3type) + + imsi = None + for m in Parse.RE_IMSI.finditer(subscr): + imsi = m.group(1) + tmsi = None + for m in Parse.RE_TMSI.finditer(subscr): + tmsi = m.group(1) + + self.diagram.add_line(Arrow(e, ms_from_ran(ran_conn), '<' if tx else '>', MSC, dtap, + ran_conn=ran_conn, imsi=imsi, tmsi=tmsi)) + return True + + def rule_imsi_detach(self, m): + r'.*IMSI DETACH for IMSI-([0-9]+):.*' + imsi = m.group(1) + e = MO_MT_UNKNOWN + self.diagram.add_line(Arrow(e, MS_UE_UNKNOWN, '>', MSC, 'IMSI Detach', imsi=imsi)) + + def rule_mgcp_tx(self, m): + r'.*mgw-endp\([^)]*:([^:]+):([^:]+)\).* (rtpbridge[^ ]+) .* RTP_TO_(RAN|CN)( CI=([^:]+)|): ([^ :]+).*: Sending' + ran, l3type, endp, rtp_to, cond_ci, ci, verb = m.groups() + e = mo_mt_from_l3type(l3type) + if '*' not in endp: + endp = self.mask_value('EP', endp) + ci = self.mask_value('CI', ci) + ci_str = '' + if ci: + ci_str = ' %s' % ci + self.diagram.add_line(Arrow(e, MGW, '<', MSC, 'for %s: %s\\n%s%s' % (rtp_to, verb, endp, ci_str))) + return True + + def rule_mgcp_rx(self, m): + r'.*mgw-endp\([^)]*:([^:]+):([^:]+)\).* (rtpbridge[^ ]+) .* RTP_TO_(RAN|CN)( CI=([^:]+)|).*: received successful response to ([^:]+): (.*)' + ran, l3type, endp, rtp_to, cond_ci, ci, verb, details = m.groups() + e = mo_mt_from_l3type(l3type) + endp = self.mask_value('EP', endp) + ci = self.mask_value('CI', ci) + ci_str = '' + if ci: + ci_str = ' %s' % ci + self.diagram.add_line(Arrow(e, MGW, '>', MSC, 'for %s: %s OK\\n%s%s' % (rtp_to, verb, endp, ci_str))) + return True + + def rule_ran_tx(self, m): + r'.*msc_a\(([^)]*):([^:]+):([^:]+)\).* RAN encode: ([^: ]+): (.+)$' + + subscr, ran_conn, l3type, ran_type, msg_type = m.groups() + + if msg_type in ('DTAP', 'DirectTransfer'): + # will get DTAP details from rule_dtap() instead, not from BSSMAP logging + return True + if msg_type.startswith('Tx'): + # skip 'Tx RANAP SECURITY MODE COMMAND to RNC, ik 47...' + return True + if '=' in msg_type: + # skip 'RAB Assignment: rab_id=1, rtp=192.168.178.66:50008, use_x213_nsap=1' + return True + + if l3type == 'NONE': + return True + + e = mo_mt_from_l3type(l3type) + + imsi = None + for m in Parse.RE_IMSI.finditer(subscr): + imsi = m.group(1) + tmsi = None + for m in Parse.RE_TMSI.finditer(subscr): + tmsi = m.group(1) + + self.diagram.add_line(Arrow(e, ms_from_ran(ran_conn), '<', MSC, '(%s) %s' % (ran_type, msg_type), + ran_conn=ran_conn, imsi=imsi, tmsi=tmsi)) + return True + + def rule_ran_rx(self, m): + r'.*msc_a\(([^)]*):([^:]+):([^:]+)\).* RAN decode: ([^: ]+) (.+)$' + + subscr, ran_conn, l3type, ran_type, msg_type = m.groups() + + if msg_type in ('DTAP', 'DirectTransfer', 'DirectTransfer RAN PDU'): + # will get DTAP details from rule_dtap() instead, not from BSSMAP logging + return True + + if l3type == 'NONE': + return True + + e = mo_mt_from_l3type(l3type) + + imsi = None + for m in Parse.RE_IMSI.finditer(subscr): + imsi = m.group(1) + tmsi = None + for m in Parse.RE_TMSI.finditer(subscr): + tmsi = m.group(1) + + self.diagram.add_line(Arrow(e, ms_from_ran(ran_type), '>', MSC, '(%s) %s' % (ran_type, msg_type), + ran_conn=ran_conn, imsi=imsi, tmsi=tmsi)) + return True + + def rule_cc_state(self, m): + r'.*trans\(CC[^) ]* [^ )]+:([^:)]+) callref-([^ ]+) [^)]+\) new state ([^ ]+) -> ([^ ]+)' + l3type, callref_hex, from_state, to_state = m.groups() + + e = mo_mt_from_l3type(l3type) + self.callrefs_mo_mt[callref_hex] = e + + self.diagram.add_line(Arrow(e, MSC, '<>', '.', 'CC state:\\n%s' % to_state)) + return True + + def rule_log_mncc(self, m): + r'.*trans\(CC[^) ]* [^ )]+:([^:)]+) callref-([^ ]+) [^)]+\) (tx|rx) (MNCC_[^ ]*)$' + l3type, callref_hex, tx_rx, mncc_msg = m.groups() + + if self.seen_udtrace_mncc: + # If no udtrace is present, take the MNCC logging. + # But if there is udtrace logging available, we should not duplicate those MNCC lines. + return True + + tx = (tx_rx == 'tx') + + try: + e = self.callrefs_mo_mt.get(callref_hex, MT) + except: + e = MT + + self.diagram.add_line(Arrow(e, MSC, '>' if tx else '<', 'sip', mncc_msg)) + return True + + RE_MNCC_RTP = re.compile(' ip := ([^, ]+), rtp_port := ([0-9]+),') + RE_MNCC_CALLREF = re.compile(' callref := ([^ ,]+), ') + + def rule_udtrace_mncc(self, m): + r'.*(write|recv).* (Tx|Rx): \{ msg_type := ([^ ]+) .* u := \{ (.*) \} \}$' + write_recv, tx_rx, msg_type, u = m.groups() + + self.seen_udtrace_mncc = True + + tx = (tx_rx == 'Tx') + + callref_intstr = None + for m in Parse.RE_MNCC_CALLREF.finditer(u): + callref_intstr = m.group(1) + if not callref_intstr: + # log only MNCC that has a callref + return True + + try: + e = self.callrefs_mo_mt.get(Callref.int_to_hex(callref_intstr), MT) + except: + e = MT + + descr = msg_type + + for m in Parse.RE_MNCC_RTP.finditer(u): + ip_str, port_str = m.groups() + try: + if int(ip_str) == 0 or int(port_str) == 0: + break + except: + break + ip_hex = int_to_hex(ip_str, 32) + ip = [] + ip_val = int(ip_hex, 16) + for byte in range(4): + ip.insert(0, (ip_val & (0xff << (8*byte))) >> (8*byte)) + rtp_info = '%s:%s' % ('.'.join(str(b) for b in ip), port_str) + rtp_info = self.mask_value('IP:port', rtp_info) + descr = '%s\\n%s' % (descr, rtp_info) + break + + self.diagram.add_line(Arrow(e, MSC, '>' if tx else '<', 'sip', descr)) + return True + + def rule_cc_timer(self, m): + r'.*trans\(CC.*IMSI-([0-9]+):.*\) (starting|stopping pending) (guard timer|timer T[0-9]+)( with ([0-9]+) seconds|)' + imsi, start_stop, t, with_cond, s = m.groups() + start = (start_stop == 'starting') + e = MO_MT_UNKNOWN + if start: + self.diagram.add_line(Arrow(e, MSC, '[]', '.', 'CC starts %s (%ss)' % (t, s), imsi=imsi)) + else: + self.diagram.add_line(Arrow(e, MSC, '[]', '.', 'CC stops %s' % (t), imsi=imsi)) + return True + + +def translate(inf, outf, cmdline): + if cmdline.output_format == 'mscgen': + output = OutputMscgen(outf, cmdline.start_with_re) + else: + output = OutputLadder(outf, cmdline.start_with_re) + parse = Parse(output, cmdline.mask_values) + + parse.start() + + while inf.readable(): + line = inf.readline() + if not line: + break; + parse.add_line(line) + parse.end() + +def open_output(inf, cmdline): + if cmdline.output_file == '-': + translate(inf, sys.stdout, cmdline) + else: + with tempfile.NamedTemporaryFile(dir=os.path.dirname(cmdline.output_file), mode='w', encoding='utf-8') as tmp_out: + translate(inf, tmp_out, cmdline) + if os.path.exists(cmdline.output_file): + os.unlink(cmdline.output_file) + os.link(tmp_out.name, cmdline.output_file) + +def open_input(cmdline): + if cmdline.input_file == '-': + open_output(sys.stdin, cmdline) + else: + with open(cmdline.input_file, 'r') as f: + open_output(f, cmdline) + +def main(cmdline): + open_input(cmdline) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description=doc) + parser.add_argument('-i', '--input-file', dest='input_file', default="-", + help='Read from this file, or stdin if "-"') + parser.add_argument('-o', '--output-file', dest='output_file', default="-", + help='Write to this file, or stdout if "-"') + parser.add_argument('-t', '--output-format', dest='output_format', default="mscgen", + choices=('mscgen','ladder'), + help='Pick output format: mscgen format or libosmocore/contrib/ladder_to_msc.py format') + parser.add_argument('-m', '--mask-values', dest='mask_values', action='store_true', + help='Do not output specific values like IP address, port, endpoint CI, instead just indicate that a value is' + ' present. This makes the output reproducable across various logs.') + parser.add_argument('-s', '--start-with', dest='start_with_re', default=None, + help='Skip until the first message with this label (regex), e.g. -s "CC SETUP"') + + cmdline = parser.parse_args() + + main(cmdline) + +# vim: shiftwidth=8 noexpandtab tabstop=8 autoindent nocindent -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2e4d8778f7b83dee558517a9b23450b817ee325d Gerrit-Change-Number: 15944 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:19 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:19 +0000 Subject: Change in osmo-msc[master]: charts: add full MO and MT voice call diagram References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15945 ) Change subject: charts: add full MO and MT voice call diagram ...................................................................... charts: add full MO and MT voice call diagram Add voice_call_full.msc, generated from a real 2G<->3G voice call log fed to msc_log_to_ladder.py. The idea is to document how the voice call sequence of events changes in upcoming patches. Change-Id: I8a907d6a4ece1f3ad78da75a8c3e3e76afd5418d --- M doc/sequence_charts/Makefile.am A doc/sequence_charts/voice_call_full.msc 2 files changed, 126 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/45/15945/1 diff --git a/doc/sequence_charts/Makefile.am b/doc/sequence_charts/Makefile.am index f1775c8..6782f44 100644 --- a/doc/sequence_charts/Makefile.am +++ b/doc/sequence_charts/Makefile.am @@ -13,18 +13,20 @@ inter_bsc_ho.png \ inter_msc_ho.png \ mncc_call_fsm.png \ + voice_call_full.png \ $(NULL) msc: \ $(builddir)/mncc_call_fsm.png \ $(builddir)/inter_bsc_ho.png \ $(builddir)/inter_msc_ho.png \ + $(builddir)/voice_call_full.png \ $(NULL) dot: \ $(NULL) -$(builddir)/%.png: $(srcdir)/%.msc +$(builddir)/%.png: %.msc mscgen -T png -o $@ $< $(builddir)/%.png: $(srcdir)/%.dot diff --git a/doc/sequence_charts/voice_call_full.msc b/doc/sequence_charts/voice_call_full.msc new file mode 100644 index 0000000..75fcef2 --- /dev/null +++ b/doc/sequence_charts/voice_call_full.msc @@ -0,0 +1,123 @@ +# Generated by msc_log_to_ladder.py +msc { +hscale="3"; +moms[label="MS,BSS (MO)\nUE,hNodeB (MO)"],momgw[label="MGW for MSC (MO)"],momsc[label="MSC (MO)"],sip[label="MNCC to PBX via\nosmo-sip-connector"],mtmsc[label="MSC (MT)"],mtmgw[label="MGW for MSC (MT)"],mtms[label="BSS,MS (MT)\nhNodeB,UE (MT)"]; +moms =>> momsc [label="MM CM_SERV_REQ"]; +moms <<= momsc [label="MM AUTH_REQ"]; +moms =>> momsc [label="MM AUTH_RESP"]; +moms <<= momsc [label="(BSSMAP) CIPHER_MODE_COMMAND"]; +moms =>> momsc [label="(BSSMAP) Ciphering Mode Complete"]; +moms =>> momsc [label="RR CIPH_M_COMPL"]; +moms =>> momsc [label="CC SETUP"]; +momsc note momsc [label="CC starts guard timer (180s)"]; +momsc abox momsc [label="CC state:\nINITIATED"]; +momsc =>> sip [label="MNCC_SETUP_IND"]; +momsc <<= sip [label="MNCC_RTP_CREATE"]; +momgw <<= momsc [label="for RAN: CRCX\nrtpbridge/*@msc"]; +momgw =>> momsc [label="for RAN: CRCX OK\nEP-1 CI-1"]; +moms <<= momsc [label="(BSSMAP) ASSIGNMENT_COMMAND"]; +moms =>> momsc [label="(BSSMAP) Assignment Complete"]; +momgw <<= momsc [label="for RAN: MDCX\nEP-1 CI-1"]; +momgw =>> momsc [label="for RAN: MDCX OK\nEP-1 CI-1"]; +momgw <<= momsc [label="for CN: CRCX\nEP-1"]; +momgw =>> momsc [label="for CN: CRCX OK\nEP-1 CI-2"]; +momsc =>> sip [label="MNCC_RTP_CREATE\nIP:port-1"]; +momsc <<= sip [label="MNCC_CALL_PROC_REQ"]; +momsc note momsc [label="CC stops guard timer"]; +momsc note momsc [label="CC starts guard timer (180s)"]; +momsc abox momsc [label="CC state:\nMO_CALL_PROC"]; +moms <<= momsc [label="CC CALL_PROC"]; +mtmsc <<= sip [label="MNCC_SETUP_REQ"]; +mtms <<= mtmsc [label="Paging"]; +mtms =>> mtmsc [label="RR PAG_RESP"]; +mtms <<= mtmsc [label="MM AUTH_REQ"]; +mtms =>> mtmsc [label="MM NULL"]; +mtms =>> mtmsc [label="MM AUTH_RESP"]; +mtms <<= mtmsc [label="(RANAP) SecurityModeCommand"]; +mtms =>> mtmsc [label="(RANAP) SecurityModeControl successfulOutcome"]; +mtms <<= mtmsc [label="(RANAP) CommonId"]; +mtmsc note mtmsc [label="CC starts timer T303 (30s)"]; +mtmsc abox mtmsc [label="CC state:\nCALL_PRESENT"]; +mtms <<= mtmsc [label="CC SETUP"]; +mtms =>> mtmsc [label="CC CALL_CONF"]; +mtmsc note mtmsc [label="CC stops timer T303"]; +mtmsc note mtmsc [label="CC starts timer T310 (30s)"]; +mtmsc abox mtmsc [label="CC state:\nMO_TERM_CALL_CONF"]; +mtmgw <<= mtmsc [label="for RAN: CRCX\nrtpbridge/*@msc"]; +mtmsc =>> sip [label="MNCC_CALL_CONF_IND"]; +mtmsc <<= sip [label="MNCC_RTP_CREATE"]; +mtmgw =>> mtmsc [label="for RAN: CRCX OK\nEP-2 CI-3"]; +mtms <<= mtmsc [label="(RANAP) RAB AssignmentRequest"]; +mtms =>> mtmsc [label="(RANAP) RAB Assignment Response"]; +mtmgw <<= mtmsc [label="for RAN: MDCX\nEP-2 CI-3"]; +mtmgw =>> mtmsc [label="for RAN: MDCX OK\nEP-2 CI-3"]; +mtmgw <<= mtmsc [label="for CN: CRCX\nEP-2"]; +mtmgw =>> mtmsc [label="for CN: CRCX OK\nEP-2 CI-4"]; +mtmsc =>> sip [label="MNCC_RTP_CREATE\nIP:port-2"]; +mtms =>> mtmsc [label="CC ALERTING"]; +mtmsc note mtmsc [label="CC stops timer T310"]; +mtmsc note mtmsc [label="CC starts timer T301 (180s)"]; +mtmsc abox mtmsc [label="CC state:\nCALL_RECEIVED"]; +mtmsc =>> sip [label="MNCC_ALERT_IND"]; +momsc <<= sip [label="MNCC_ALERT_REQ"]; +momsc note momsc [label="CC stops guard timer"]; +momsc note momsc [label="CC starts guard timer (180s)"]; +momsc abox momsc [label="CC state:\nCALL_DELIVERED"]; +moms <<= momsc [label="CC ALERTING"]; +mtms =>> mtmsc [label="CC CONNECT"]; +mtmsc note mtmsc [label="CC stops timer T301"]; +mtmsc abox mtmsc [label="CC state:\nCONNECT_REQUEST"]; +mtmsc =>> sip [label="MNCC_SETUP_CNF"]; +mtmsc <<= sip [label="MNCC_RTP_CONNECT\nIP:port-1"]; +mtmgw <<= mtmsc [label="for CN: MDCX\nEP-2 CI-4"]; +mtmsc <<= sip [label="MNCC_SETUP_COMPL_REQ"]; +mtmsc note mtmsc [label="CC starts guard timer (180s)"]; +mtmsc abox mtmsc [label="CC state:\nACTIVE"]; +mtmsc note mtmsc [label="CC stops guard timer"]; +mtms <<= mtmsc [label="CC CONNECT_ACK"]; +mtmgw =>> mtmsc [label="for CN: MDCX OK\nEP-2 CI-4"]; +momsc <<= sip [label="MNCC_RTP_CONNECT\nIP:port-2"]; +momgw <<= momsc [label="for CN: MDCX\nEP-1 CI-2"]; +momsc <<= sip [label="MNCC_SETUP_RSP"]; +momsc note momsc [label="CC stops guard timer"]; +momsc note momsc [label="CC starts guard timer (180s)"]; +momsc note momsc [label="CC starts timer T313 (30s)"]; +momsc abox momsc [label="CC state:\nCONNECT_IND"]; +moms <<= momsc [label="CC CONNECT"]; +momgw =>> momsc [label="for CN: MDCX OK\nEP-1 CI-2"]; +moms =>> momsc [label="CC CONNECT_ACK"]; +momsc note momsc [label="CC stops timer T313"]; +momsc abox momsc [label="CC state:\nACTIVE"]; +momsc note momsc [label="CC stops guard timer"]; +momsc =>> sip [label="MNCC_SETUP_COMPL_IND"]; +moms =>> momsc [label="CC DISCONNECT"]; +momsc abox momsc [label="CC state:\nDISCONNECT_IND"]; +momsc =>> sip [label="MNCC_DISC_IND"]; +momsc <<= sip [label="MNCC_REL_REQ"]; +momsc note momsc [label="CC starts guard timer (180s)"]; +momsc note momsc [label="CC starts timer T308 (10s)"]; +momsc abox momsc [label="CC state:\nRELEASE_REQ"]; +moms <<= momsc [label="CC RELEASE"]; +mtmsc <<= sip [label="MNCC_DISC_REQ"]; +mtmsc note mtmsc [label="CC starts guard timer (180s)"]; +mtmsc note mtmsc [label="CC starts timer T306 (30s)"]; +mtmsc abox mtmsc [label="CC state:\nDISCONNECT_IND"]; +mtms <<= mtmsc [label="CC DISCONNECT"]; +moms =>> momsc [label="CC RELEASE_COMPL"]; +momsc note momsc [label="CC stops timer T308"]; +momsc abox momsc [label="CC state:\nNULL"]; +momsc note momsc [label="CC stops guard timer"]; +moms <<= momsc [label="(BSSMAP) CLEAR_COMMAND"]; +momsc =>> sip [label="MNCC_REL_CNF"]; +moms =>> momsc [label="(BSSMAP) Clear Complete"]; +mtms =>> mtmsc [label="CC RELEASE"]; +mtmsc note mtmsc [label="CC stops timer T306"]; +mtms <<= mtmsc [label="CC RELEASE_COMPL"]; +mtmsc abox mtmsc [label="CC state:\nNULL"]; +mtmsc note mtmsc [label="CC stops guard timer"]; +mtms <<= mtmsc [label="(RANAP) Iu Release"]; +mtmsc =>> sip [label="MNCC_REL_IND"]; +mtms =>> mtmsc [label="(RANAP) Iu Release successfulOutcome"]; +moms =>> momsc [label="IMSI Detach"]; +mtms =>> mtmsc [label="IMSI Detach"]; +} -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8a907d6a4ece1f3ad78da75a8c3e3e76afd5418d Gerrit-Change-Number: 15945 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:20 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:20 +0000 Subject: Change in osmo-msc[master]: BSSMAP: decode Codec List (BSS Supported) References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15946 ) Change subject: BSSMAP: decode Codec List (BSS Supported) ...................................................................... BSSMAP: decode Codec List (BSS Supported) Actually decode the Codec List (BSS Supported) in BSSMAP, in both the Complete Layer 3 Information and the Assignment Complete messages. An upcoming patch improves codec negotiation and requires the BSS supported codecs, which are so far ignored (which is/was a pity as osmo-bsc goes at great lengths to compose those IEs). Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e --- M include/osmocom/msc/ran_msg.h M src/libmsc/ran_msg_a.c 2 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/46/15946/1 diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h index 081c7ad..1b0e2e8 100644 --- a/include/osmocom/msc/ran_msg.h +++ b/include/osmocom/msc/ran_msg.h @@ -192,6 +192,7 @@ union { struct { const struct gsm0808_cell_id *cell_id; + const struct gsm0808_speech_codec_list *codec_list_bss_supported; struct msgb *msg; } compl_l3; struct msgb *dtap; @@ -226,6 +227,7 @@ struct osmo_sockaddr_str remote_rtp; bool codec_present; enum mgcp_codecs codec; + const struct gsm0808_speech_codec_list *codec_list_bss_supported; bool osmux_present; uint8_t osmux_cid; } assignment_complete; diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index fc9a9d7..2307fa6 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -52,6 +52,8 @@ struct gsm0808_cell_id cell_id; struct tlv_p_entry *ie_cell_id = TLVP_GET(tp, GSM0808_IE_CELL_IDENTIFIER); struct tlv_p_entry *ie_l3_info = TLVP_GET(tp, GSM0808_IE_LAYER_3_INFORMATION); + struct tlv_p_entry *ie_codec_list_bss_supported = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC_LIST); + struct gsm0808_speech_codec_list codec_list_bss_supported; struct ran_msg ran_dec_msg = { .msg_type = RAN_MSG_COMPL_L3, .msg_name = "BSSMAP Complete Layer 3 Information", @@ -114,6 +116,20 @@ return -ENODATA; } + /* Decode Codec List (BSS Supported) */ + if (ie_codec_list_bss_supported) { + rc = gsm0808_dec_speech_codec_list(&codec_list_bss_supported, + ie_codec_list_bss_supported->val, ie_codec_list_bss_supported->len); + if (rc < 0) { + LOG_RAN_A_DEC_MSG(LOGL_ERROR, + "Complete Layer 3 Information: unable to decode IE Codec List (BSS Supported)" + " (rc=%d), continuing anyway\n", rc); + /* This IE is not critical, do not abort with error. */ + } else + ran_dec_msg.compl_l3.codec_list_bss_supported = &codec_list_bss_supported; + } + + return ran_decoded(ran_dec, &ran_dec_msg); } @@ -261,10 +277,12 @@ { struct tlv_p_entry *ie_aoip_transp_addr = TLVP_GET(tp, GSM0808_IE_AOIP_TRASP_ADDR); struct tlv_p_entry *ie_speech_codec = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC); + struct tlv_p_entry *ie_codec_list_bss_supported = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC_LIST); struct tlv_p_entry *ie_osmux_cid = TLVP_GET(tp, GSM0808_IE_OSMO_OSMUX_CID); struct sockaddr_storage rtp_addr; struct sockaddr_in *rtp_addr_in; struct gsm0808_speech_codec sc; + struct gsm0808_speech_codec_list codec_list_bss_supported; int rc; struct ran_msg ran_dec_msg = { .msg_type = RAN_MSG_ASSIGNMENT_COMPLETE, @@ -314,6 +332,19 @@ ran_dec_msg.assignment_complete.codec = ran_a_mgcp_codec_from_sc(&sc); } + if (ie_codec_list_bss_supported) { + /* Decode Codec List (BSS Supported) */ + rc = gsm0808_dec_speech_codec_list(&codec_list_bss_supported, + ie_codec_list_bss_supported->val, ie_codec_list_bss_supported->len); + if (rc < 0) { + LOG_RAN_A_DEC_MSG(LOGL_ERROR, + "Assignment Complete: unable to decode IE Codec List (BSS Supported)" + " (rc=%d), continuing anyway\n", rc); + /* This IE is not critical, do not abort with error. */ + } else + ran_dec_msg.assignment_complete.codec_list_bss_supported = &codec_list_bss_supported; + } + return ran_decoded(ran_dec, &ran_dec_msg); } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e Gerrit-Change-Number: 15946 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:20 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:20 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15947 ) Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... add sdp_msg API: SDP parsing/composition Rationale: in order to add full SDP to the MNCC protocol (upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f), we need to parse and compose SDP messages. Obviously, libosmo-mgcp-client already contains similar code, but that is unfortunately heavily glued to the actual MGCP implementation. The simplest solution is to create this separate implementation, copy-pasting from the existing libosmo-mgcp-client code as is convenient. Various foo_name() functions are implemented for the sdp_msg API. Each is: a) implemented as foo_name_buf(buf, len, val), b) wrapped as foo_name_c(ctx, val) c) and as foo_name(val), a convienience variant using OTC_SELECT. (a) foo_name_buf() uses osmo_strbuf to write to a fixed-size caller provided buffer: osmo_strbuf is most convenient to implement optional parts / loops. (b) foo_name_c() uses a caller-provided talloc ctx to allocate such buffer; implemented using a generalized NAME_C_IMPL(func_buf, arg) macro, which calls func with an initial size buffer, and reallocates if more space is needed. (c) foo_name() then calls foo_name_c() with the OTC_SELECT context (we know that msc_main.c uses osmo_select_main_ctx()), implemented using a generalized NAME_IMPL() macro, and returns "ERROR" on failure instead of NULL. Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 --- M configure.ac M include/osmocom/msc/Makefile.am M include/osmocom/msc/debug.h A include/osmocom/msc/sdp_msg.h M src/libmsc/Makefile.am A src/libmsc/sdp_msg.c M tests/Makefile.am A tests/sdp_msg/Makefile.am A tests/sdp_msg/sdp_msg_test.c A tests/sdp_msg/sdp_msg_test.err A tests/sdp_msg/sdp_msg_test.ok M tests/testsuite.at 12 files changed, 1,886 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/47/15947/1 diff --git a/configure.ac b/configure.ac index 5aa652d..ee80900 100644 --- a/configure.ac +++ b/configure.ac @@ -254,6 +254,7 @@ tests/db_sms/Makefile tests/sms_queue/Makefile tests/msc_vlr/Makefile + tests/sdp_msg/Makefile doc/Makefile doc/examples/Makefile doc/manuals/Makefile diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 0d7d45c..faf1048 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ rrlp.h \ rtp_stream.h \ sccp_ran.h \ + sdp_msg.h \ sgs_iface.h \ sgs_server.h \ sgs_vty.h \ diff --git a/include/osmocom/msc/debug.h b/include/osmocom/msc/debug.h index 3347e20..1a335fd 100644 --- a/include/osmocom/msc/debug.h +++ b/include/osmocom/msc/debug.h @@ -25,3 +25,43 @@ DSS, Debug_LastEntry, }; + +/* Translate a buffer function to a talloc context function. + * This is the full function body of a char *foo_name_c(void *ctx, val...) function, implemented by an + * int foo_name_buf(buf, buflen, val...) function. + * Return a talloc'd string containing the result of the given foo_name_buf() function, or NULL on error. + * See for example sdp_msg_name_c() and sdp_msg_name_buf(). + * FUNC_BUF: name of a function with signature foo_buf(char *buf, size_t buflen, ...). + * FUNC_BUF_ARGS: additional arguments to pass to FUNC_BUF after the buf and buflen. + */ +#define NAME_C_IMPL(FUNC_BUF, FUNC_BUF_ARGS...) \ + size_t len = 64; \ + int needed; \ + char *str = (char*)talloc_named_const(ctx, len, #FUNC_BUF "_c()"); \ + OSMO_ASSERT(str); \ + needed = FUNC_BUF(str, len, ## FUNC_BUF_ARGS); \ + if (needed < 0) \ + return NULL; \ + if (needed < len) \ + return str; \ + len = needed + 1; \ + str = (char*)talloc_realloc_size(ctx, str, len); \ + OSMO_ASSERT(str); \ + needed = FUNC_BUF(str, len, ## FUNC_BUF_ARGS); \ + if (needed < 0) \ + return NULL; \ + return str; + +/* Translate a NAME_C_IMPL function to a safe printf() arg function using OTC_SELECT. + * This is the full function body of a const char *foo_name(val...) function, implemented by a + * char *foo_name_c(ctx, val...) function. + * Return a string talloc'd from OTC_SELECT, or the constant "ERROR" on error; never return NULL. + * See for example sdp_msg_name() and sdp_msg_name_c(). + * FUNC_C: name of a function with signature char *foo_name_c(void *ctx, ...). + * FUNC_C_ARGS: additional arguments to pass to FUNC_C after the ctx. + */ +#define NAME_IMPL(FUNC_C, FUNC_C_ARGS...) \ + char *str = FUNC_C(OTC_SELECT, ## FUNC_C_ARGS); \ + if (!str) \ + return "ERROR"; \ + return str; diff --git a/include/osmocom/msc/sdp_msg.h b/include/osmocom/msc/sdp_msg.h new file mode 100644 index 0000000..7ac6036 --- /dev/null +++ b/include/osmocom/msc/sdp_msg.h @@ -0,0 +1,68 @@ +/* Minimalistic SDP parse/compose API, focused on GSM audio codecs */ +#pragma once + +#include +#include + +extern const struct value_string sdp_msg_payload_type_names[]; +static inline const char *sdp_msg_payload_type_name(unsigned int payload_type) +{ return get_value_string(sdp_msg_payload_type_names, payload_type); } +int sdp_subtype_name_to_payload_type(const char *subtype_name); + +struct sdp_audio_codec { + unsigned int payload_type; + /* Like "GSM", "AMR", "EFR", ... */ + char subtype_name[16]; + unsigned int rate; + char fmtp[64]; +}; + +struct sdp_audio_codecs { + unsigned int count; + struct sdp_audio_codec codec[16]; +}; + +struct sdp_msg { + struct osmo_sockaddr_str rtp; + unsigned int ptime; + struct sdp_audio_codecs audio_codecs; +}; + +#define foreach_sdp_audio_codec(/* struct sdp_audio_codec* */ CODEC, \ + /* struct sdp_audio_codecs* */ AC) \ + for (CODEC = (AC)->codec; \ + (CODEC - (AC)->codec) < OSMO_MIN((AC)->count, ARRAY_SIZE((AC)->codec)); \ + CODEC++) + +const char *sdp_msg_line_end(const char *src); + +int sdp_audio_codec_cmp(const struct sdp_audio_codec *a, const struct sdp_audio_codec *b); + +struct sdp_audio_codec *sdp_audio_codec_add(struct sdp_audio_codecs *ac, unsigned int payload_type, + const char *subtype_name, unsigned int rate, const char *fmtp); +struct sdp_audio_codec *sdp_audio_codec_add_copy(struct sdp_audio_codecs *ac, + const struct sdp_audio_codec *codec); +int sdp_audio_codec_remove(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec); +struct sdp_audio_codec *sdp_audio_codec_by_payload_type(struct sdp_audio_codecs *ac, + unsigned int payload_type, bool create); +struct sdp_audio_codec *sdp_audio_codec_by_descr(struct sdp_audio_codecs *ac, + const struct sdp_audio_codec *codec); + +void sdp_audio_codecs_intersection(struct sdp_audio_codecs *ac_dest, const struct sdp_audio_codecs *ac_other, + bool translate_payload_type_numbers); +void sdp_audio_codecs_select(struct sdp_audio_codecs *ac, struct sdp_audio_codec *codec); + +int sdp_msg_to_str(char *dst, size_t dst_size, const struct sdp_msg *sdp); +int sdp_msg_from_str(struct sdp_msg *sdp, const char *src); + +int sdp_audio_codec_name_buf(char *buf, size_t buflen, const struct sdp_audio_codec *codec); +char *sdp_audio_codec_name_c(void *ctx, const struct sdp_audio_codec *codec); +const char *sdp_audio_codec_name(const struct sdp_audio_codec *codec); + +int sdp_audio_codecs_name_buf(char *buf, size_t buflen, const struct sdp_audio_codecs *ac); +char *sdp_audio_codecs_name_c(void *ctx, const struct sdp_audio_codecs *ac); +const char *sdp_audio_codecs_name(const struct sdp_audio_codecs *ac); + +int sdp_msg_name_buf(char *buf, size_t buflen, const struct sdp_msg *sdp); +char *sdp_msg_name_c(void *ctx, const struct sdp_msg *sdp); +const char *sdp_msg_name(const struct sdp_msg *sdp); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index d834896..e6a2dc1 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -64,6 +64,7 @@ ran_peer.c \ rrlp.c \ rtp_stream.c \ + sdp_msg.c \ silent_call.c \ sms_queue.c \ transaction.c \ diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c new file mode 100644 index 0000000..3386170 --- /dev/null +++ b/src/libmsc/sdp_msg.c @@ -0,0 +1,576 @@ +/* Minimalistic SDP parse/compose implementation, focused on GSM audio codecs */ +/* + * (C) 2019 by sysmocom - s.m.f.c. GmbH + * All Rights Reserved + * + * SPDX-License-Identifier: AGPL-3.0+ + * + * 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 +#include + +/* Compare name, rate and fmtp, returning typical cmp result: 0 on match, and -1 / 1 on mismatch. + * Do *not* compare the payload_type number. + * The fmtp is only string-compared -- e.g. if AMR parameters appear in a different order, it amounts to a mismatch even + * though all parameters are the same. */ +int sdp_audio_codec_cmp(const struct sdp_audio_codec *a, const struct sdp_audio_codec *b) +{ + int rc; + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + rc = strncmp(a->subtype_name, b->subtype_name, sizeof(a->subtype_name)); + if (rc) + return rc; + + if (a->rate < b->rate) + return -1; + if (a->rate > b->rate) + return 1; + + rc = strncmp(a->fmtp, b->fmtp, sizeof(a->fmtp)); + if (rc) + return rc; + + return 0; +} + +/* Given a predefined fixed payload_type number, add an SDP audio codec entry, if not present yet. + * The payload_type must exist in sdp_msg_payload_type_names. + * Return the audio codec created or already existing for this payload type number. + */ +struct sdp_audio_codec *sdp_audio_codec_add(struct sdp_audio_codecs *ac, unsigned int payload_type, + const char *subtype_name, unsigned int rate, const char *fmtp) +{ + struct sdp_audio_codec *codec; + + /* Does an entry already exist? */ + codec = sdp_audio_codec_by_payload_type(ac, payload_type, false); + if (codec) { + /* Already exists, sanity check */ + if (!codec->subtype_name[0]) + OSMO_STRLCPY_ARRAY(codec->subtype_name, subtype_name); + else if (strcmp(codec->subtype_name, subtype_name)) { + /* There already is an entry with this payload_type number but a mismatching subtype_name. That is + * weird, rather abort. */ + return NULL; + } + if (codec->rate != rate + || (fmtp && strcmp(fmtp, codec->fmtp))) { + /* Mismatching details. Rather abort */ + return NULL; + } + return codec; + } + + /* None exists, create codec entry for this payload type number */ + codec = sdp_audio_codec_by_payload_type(ac, payload_type, true); + /* NULL means unable to add an entry */ + if (!codec) + return NULL; + + OSMO_STRLCPY_ARRAY(codec->subtype_name, subtype_name); + if (fmtp) + OSMO_STRLCPY_ARRAY(codec->fmtp, fmtp); + return codec; +} + +struct sdp_audio_codec *sdp_audio_codec_add_copy(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec) +{ + return sdp_audio_codec_add(ac, codec->payload_type, codec->subtype_name, codec->rate, + codec->fmtp[0] ? codec->fmtp : NULL); +} + +struct sdp_audio_codec *sdp_audio_codec_by_payload_type(struct sdp_audio_codecs *ac, unsigned int payload_type, + bool create) +{ + struct sdp_audio_codec *codec; + foreach_sdp_audio_codec(codec, ac) { + if (codec->payload_type == payload_type) + return codec; + } + + if (!create) + return NULL; + + /* Not found; codec points after the last entry now. */ + if ((codec - ac->codec) >= ARRAY_SIZE(ac->codec)) + return NULL; + + *codec = (struct sdp_audio_codec){ + .payload_type = payload_type, + .rate = 8000, + }; + + ac->count = (codec - ac->codec) + 1; + return codec; +} + +/* Return a given sdp_msg's codec entry that matches the subtype_name, rate and fmtp of the given codec, or NULL if no + * match is found. Comparison is made by sdp_audio_codec_cmp(). */ +struct sdp_audio_codec *sdp_audio_codec_by_descr(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec) +{ + struct sdp_audio_codec *i; + foreach_sdp_audio_codec(i, ac) { + if (!sdp_audio_codec_cmp(i, codec)) + return i; + } + return NULL; +} + +/* Remove the codec entry pointed at by 'codec'. 'codec' must point at an entry of 'sdp' (to use an external codec + * instance, use sdp_audio_codec_by_descr()). + * Return 0 on success, -ENOENT if codec does not point at the sdp->codec array. */ +int sdp_audio_codec_remove(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec) +{ + struct sdp_audio_codec *i; + if ((codec < ac->codec) + || ((codec - ac->codec) >= OSMO_MIN(ac->count, ARRAY_SIZE(ac->codec)))) + return -ENOENT; + + /* Move all following entries one up */ + ac->count--; + foreach_sdp_audio_codec(i, ac) { + if (i < codec) + continue; + *i = *(i+1); + } + return 0; +} + +/* Convert struct sdp_msg to the actual SDP protocol representation */ +int sdp_msg_to_str(char *dst, size_t dst_size, const struct sdp_msg *sdp) +{ + const struct sdp_audio_codec *codec; + struct osmo_strbuf sb = { .buf = dst, .len = dst_size }; + const char *ip = sdp->rtp.ip[0] ? sdp->rtp.ip : "0.0.0.0"; + + OSMO_STRBUF_PRINTF(sb, + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 %s\r\n" + "s=GSM Call\r\n" + "c=IN IP4 %s\r\n" + "t=0 0\r\n" + "m=audio %d RTP/AVP", + ip, ip, + sdp->rtp.port); + + /* Append all payload type numbers to 'm=audio RTP/AVP 3 4 112' line */ + foreach_sdp_audio_codec(codec, &sdp->audio_codecs) + OSMO_STRBUF_PRINTF(sb, " %d", codec->payload_type); + OSMO_STRBUF_PRINTF(sb, "\r\n"); + + /* Add details for all codecs */ + foreach_sdp_audio_codec(codec, &sdp->audio_codecs) { + if (codec->subtype_name[0]) { + OSMO_STRBUF_PRINTF(sb, "a=rtpmap:%d %s/%d\r\n", codec->payload_type, codec->subtype_name, + codec->rate > 0? codec->rate : 8000); + } + + if (codec->fmtp[0]) + OSMO_STRBUF_PRINTF(sb, "a=fmtp:%d %s\r\n", codec->payload_type, codec->fmtp); + } + + OSMO_STRBUF_PRINTF(sb, "a=ptime:%d\r\n", sdp->ptime > 0? sdp->ptime : 20); + + return sb.chars_needed; +} + +/* Return the first line ending (or the end of the string) at or after the given string position. */ +const char *sdp_msg_line_end(const char *src) +{ + const char *line_end = strchr(src, '\r'); + if (!line_end) + line_end = strchr(src, '\n'); + if (!line_end) + line_end = src + strlen(src); + return line_end; +} + +/* parse a line like 'a=rtpmap:0 PCMU/8000', 'a=fmtp:112 octet-align=1; mode-set=4', 'a=ptime:20'. + * The src should point at the character after 'a=', e.g. at the start of 'rtpmap', 'fmtp', 'ptime' + */ +int sdp_parse_attrib(struct sdp_msg *sdp, const char *src) +{ + unsigned int payload_type; + struct sdp_audio_codec *codec; +#define A_RTPMAP "rtpmap:" +#define A_FMTP "fmtp:" +#define A_PTIME "ptime:" +#define A_RTCP "rtcp:" +#define A_SENDRECV "sendrecv" +#define A_SENDONLY "sendonly" +#define A_RECVONLY "recvonly" + + if (osmo_str_startswith(src, A_RTPMAP)) { + char *audio_name; + unsigned int channels = 1; + if (sscanf(src, A_RTPMAP "%u", &payload_type) != 1) + return -EINVAL; + + audio_name = strchr(src, ' '); + if (!audio_name || audio_name >= sdp_msg_line_end(src)) + return -EINVAL; + + codec = sdp_audio_codec_by_payload_type(&sdp->audio_codecs, payload_type, true); + if (!codec) + return -ENOSPC; + + if (sscanf(audio_name, " %31[^/]/%u/%u", codec->subtype_name, &codec->rate, &channels) < 1) + return -EINVAL; + + if (channels != 1) + return -ENOTSUP; + } + + else if (osmo_str_startswith(src, A_FMTP)) { + char *fmtp_str; + const char *line_end = sdp_msg_line_end(src); + if (sscanf(src, A_FMTP "%u", &payload_type) != 1) + return -EINVAL; + + fmtp_str = strchr(src, ' '); + if (!fmtp_str) + return -EINVAL; + fmtp_str++; + if (fmtp_str >= line_end) + return -EINVAL; + + codec = sdp_audio_codec_by_payload_type(&sdp->audio_codecs, payload_type, true); + if (!codec) + return -ENOSPC; + + /* (+1 because osmo_strlcpy() interprets it as size including the '\0') */ + osmo_strlcpy(codec->fmtp, fmtp_str, line_end - fmtp_str + 1); + } + + else if (osmo_str_startswith(src, A_PTIME)) { + if (sscanf(src, A_PTIME "%u", &sdp->ptime) != 1) + return -EINVAL; + + } + + else if (osmo_str_startswith(src, A_RTCP)) { + /* TODO? */ + } + + else if (osmo_str_startswith(src, A_SENDRECV)) { + /* TODO? */ + } + + else if (osmo_str_startswith(src, A_SENDONLY)) { + /* TODO? */ + } + + else if (osmo_str_startswith(src, A_RECVONLY)) { + /* TODO? */ + } + + return 0; +} + +const struct value_string sdp_msg_payload_type_names[] = { + { 0, "PCMU" }, + { 3, "GSM" }, + { 8, "PCMA" }, + { 18, "G729" }, + { 110, "GSM-EFR" }, + { 111, "GSM-HR-08" }, + { 112, "AMR" }, + { 113, "AMR-WB" }, + {} +}; + +/* Return payload type number matching given string ("AMR", "GSM", ...) or negative if not found. */ +int sdp_subtype_name_to_payload_type(const char *subtype_name) +{ + return get_string_value(sdp_msg_payload_type_names, subtype_name); +} + +/* Parse a line like 'm=audio 16398 RTP/AVP 0 3 8 96 112', starting after the '=' */ +static int sdp_parse_media_description(struct sdp_msg *sdp, const char *src) +{ + unsigned int port; + int i; + const char *payload_type_str; + const char *line_end = sdp_msg_line_end(src); + if (sscanf(src, "audio %u RTP/AVP", &port) < 1) + return -ENOTSUP; + + if (port < 0 || port > 0xffff) + return -EINVAL; + + sdp->rtp.port = port; + + /* skip "audio 12345 RTP/AVP ", i.e. 3 spaces on */ + payload_type_str = src; + for (i = 0; i < 3; i++) { + payload_type_str = strchr(payload_type_str, ' '); + if (!payload_type_str) + return -EINVAL; + while (*payload_type_str == ' ') + payload_type_str++; + if (payload_type_str >= line_end) + return -EINVAL; + } + + /* Parse listing of payload type numbers after "RTP/AVP" */ + while (payload_type_str < line_end) { + unsigned int payload_type; + struct sdp_audio_codec *codec; + const char *subtype_name; + if (sscanf(payload_type_str, "%u", &payload_type) < 1) + return -EINVAL; + + codec = sdp_audio_codec_by_payload_type(&sdp->audio_codecs, payload_type, true); + if (!codec) + return -ENOSPC; + + /* Fill in subtype name for fixed payload types */ + subtype_name = get_value_string_or_null(sdp_msg_payload_type_names, codec->payload_type); + if (subtype_name) + OSMO_STRLCPY_ARRAY(codec->subtype_name, subtype_name); + + payload_type_str = strchr(payload_type_str, ' '); + if (!payload_type_str) + payload_type_str = line_end; + while (*payload_type_str == ' ') + payload_type_str++; + } + + return 0; +} + +/* parse a line like 'c=IN IP4 192.168.11.151' starting after the '=' */ +static int sdp_parse_connection_info(struct sdp_msg *sdp, const char *src) +{ + char ipv[10]; + char addr_str[INET6_ADDRSTRLEN]; + if (sscanf(src, "IN %s %s", ipv, addr_str) < 2) + return -EINVAL; + + /* supporting only IPv4 */ + if (strcmp(ipv, "IP4")) + return -ENOTSUP; + + osmo_sockaddr_str_from_str(&sdp->rtp, addr_str, sdp->rtp.port); + return 0; +} + +/* Parse SDP string into struct sdp_msg. Return 0 on success, negative on error. */ +int sdp_msg_from_str(struct sdp_msg *sdp, const char *src) +{ + const char *pos; + *sdp = (struct sdp_msg){}; + + for (pos = src; pos && *pos; pos++) { + char attrib; + int rc = 0; + + if (*pos == '\r' || *pos == '\n') + continue; + + /* Expecting only lines starting with 'X='. Not being too strict about it is probably alright. */ + if (pos[1] != '=') + goto next_line; + + attrib = *pos; + pos += 2; + switch (attrib) { + /* a=... */ + case 'a': + rc = sdp_parse_attrib(sdp, pos); + break; + case 'm': + rc = sdp_parse_media_description(sdp, pos); + break; + case 'c': + rc = sdp_parse_connection_info(sdp, pos); + break; + default: + /* ignore any other parameters */ + break; + } + + if (rc) { + size_t line_len; + const char *line_end = sdp_msg_line_end(pos); + pos -= 2; + line_len = line_end - pos; + switch (rc) { + case -EINVAL: + LOGP(DMNCC, LOGL_ERROR, + "Failed to parse SDP: invalid line: %s\n", osmo_quote_str(pos, line_len)); + break; + case -ENOSPC: + LOGP(DMNCC, LOGL_ERROR, + "Failed to parse SDP: no more space for: %s\n", osmo_quote_str(pos, line_len)); + break; + case -ENOTSUP: + LOGP(DMNCC, LOGL_ERROR, + "Failed to parse SDP: not supported: %s\n", osmo_quote_str(pos, line_len)); + break; + default: + LOGP(DMNCC, LOGL_ERROR, + "Failed to parse SDP: %s\n", osmo_quote_str(pos, line_len)); + break; + } + return rc; + } +next_line: + pos = strstr(pos, "\r\n"); + if (!pos) + break; + } + + return 0; +} + +/* Leave only those codecs in 'ac_dest' that are also present in 'ac_other'. + * The matching is made by sdp_audio_codec_cmp(), i.e. payload_type numbers are not compared and fmtp parameters are + * compared 1:1 as plain strings. + * If translate_payload_type_numbers has an effect if ac_dest and ac_other have mismatching payload_type numbers for the + * same SDP codec descriptions. If translate_payload_type_numbers is true, take the payload_type numbers from ac_other. + * If false, keep payload_type numbers in ac_dest unchanged. */ +void sdp_audio_codecs_intersection(struct sdp_audio_codecs *ac_dest, const struct sdp_audio_codecs *ac_other, + bool translate_payload_type_numbers) +{ + int i; + for (i = 0; i < ac_dest->count; i++) { + struct sdp_audio_codec *codec = &ac_dest->codec[i]; + struct sdp_audio_codec *other; + OSMO_ASSERT(i < ARRAY_SIZE(ac_dest->codec)); + + other = sdp_audio_codec_by_descr((struct sdp_audio_codecs*)ac_other, codec); + + if (!other) { + OSMO_ASSERT(sdp_audio_codec_remove(ac_dest, codec) == 0); + i--; + continue; + } + + /* Doing payload_type number translation of part of the intersection because it makes the algorithm + * simpler: we already know ac_dest is a subset of ac_other, and there is no need to resolve payload + * type number conflicts. */ + if (translate_payload_type_numbers) + codec->payload_type = other->payload_type; + } +} + +/* Make sure the given codec is listed as the first codec. 'codec' must be an actual codec entry of the given audio + * codecs list. */ +void sdp_audio_codecs_select(struct sdp_audio_codecs *ac, struct sdp_audio_codec *codec) +{ + struct sdp_audio_codec tmp; + struct sdp_audio_codec *pos; + OSMO_ASSERT((codec >= ac->codec) + && ((codec - ac->codec) < OSMO_MIN(ac->count, ARRAY_SIZE(ac->codec)))); + + /* Already the first? */ + if (codec == ac->codec) + return; + + tmp = *codec; + for (pos = codec - 1; pos >= ac->codec; pos--) + pos[1] = pos[0]; + + ac->codec[0] = tmp; + return; +} + +/* Short single-line representation of an SDP audio codec, convenient for logging */ +int sdp_audio_codec_name_buf(char *buf, size_t buflen, const struct sdp_audio_codec *codec) +{ + struct osmo_strbuf sb = { .buf = buf, .len = buflen }; + OSMO_STRBUF_PRINTF(sb, "%s", codec->subtype_name); + if (codec->fmtp[0]) + OSMO_STRBUF_PRINTF(sb, ":%s", codec->fmtp); + return sb.chars_needed; +} + +char *sdp_audio_codec_name_c(void *ctx, const struct sdp_audio_codec *codec) +{ + NAME_C_IMPL(sdp_audio_codec_name_buf, codec) +} + +const char *sdp_audio_codec_name(const struct sdp_audio_codec *codec) +{ + NAME_IMPL(sdp_audio_codec_name_c, codec) +} + +/* Short single-line representation of a list of SDP audio codecs, convenient for logging */ +int sdp_audio_codecs_name_buf(char *buf, size_t buflen, const struct sdp_audio_codecs *ac) +{ + struct osmo_strbuf sb = { .buf = buf, .len = buflen }; + const struct sdp_audio_codec *codec; + if (!ac->count) + OSMO_STRBUF_PRINTF(sb, "(no-codecs)"); + foreach_sdp_audio_codec(codec, ac) { + bool first = (codec == ac->codec); + if (!first) + OSMO_STRBUF_PRINTF(sb, ","); + OSMO_STRBUF_APPEND(sb, sdp_audio_codec_name_buf, codec); + } + return sb.chars_needed; +} + +char *sdp_audio_codecs_name_c(void *ctx, const struct sdp_audio_codecs *ac) +{ + NAME_C_IMPL(sdp_audio_codecs_name_buf, ac) +} + +const char *sdp_audio_codecs_name(const struct sdp_audio_codecs *ac) +{ + NAME_IMPL(sdp_audio_codecs_name_c, ac) +} + + +/* Short single-line representation of an SDP message, convenient for logging */ +int sdp_msg_name_buf(char *buf, size_t buflen, const struct sdp_msg *sdp) +{ + struct osmo_strbuf sb = { .buf = buf, .len = buflen }; + if (!sdp) { + OSMO_STRBUF_PRINTF(sb, "NULL"); + return sb.chars_needed; + } + + OSMO_STRBUF_PRINTF(sb, OSMO_SOCKADDR_STR_FMT, OSMO_SOCKADDR_STR_FMT_ARGS(&sdp->rtp)); + OSMO_STRBUF_PRINTF(sb, "{"); + OSMO_STRBUF_APPEND(sb, sdp_audio_codecs_name_buf, &sdp->audio_codecs); + OSMO_STRBUF_PRINTF(sb, "}"); + return sb.chars_needed; +} + +char *sdp_msg_name_c(void *ctx, const struct sdp_msg *sdp) +{ + NAME_C_IMPL(sdp_msg_name_buf, sdp) +} + +const char *sdp_msg_name(const struct sdp_msg *sdp) +{ + NAME_IMPL(sdp_msg_name_c, sdp) +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 27c1205..864ac7c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,6 +2,7 @@ sms_queue \ msc_vlr \ db_sms \ + sdp_msg \ $(NULL) if BUILD_SMPP diff --git a/tests/sdp_msg/Makefile.am b/tests/sdp_msg/Makefile.am new file mode 100644 index 0000000..7d8def9 --- /dev/null +++ b/tests/sdp_msg/Makefile.am @@ -0,0 +1,32 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + -ggdb3 \ + $(LIBOSMOCORE_CFLAGS) \ + $(NULL) + +LDADD = \ + $(top_builddir)/src/libmsc/libmsc.a \ + $(LIBOSMOCORE_LIBS) \ + $(NULL) + +EXTRA_DIST = \ + sdp_msg_test.ok \ + sdp_msg_test.err \ + $(NULL) + +noinst_PROGRAMS = \ + sdp_msg_test \ + $(NULL) + +sdp_msg_test_SOURCES = \ + sdp_msg_test.c \ + $(NULL) + +.PHONY: update_exp +update_exp: + $(builddir)/sdp_msg_test >$(srcdir)/sdp_msg_test.ok 2>$(srcdir)/sdp_msg_test.err diff --git a/tests/sdp_msg/sdp_msg_test.c b/tests/sdp_msg/sdp_msg_test.c new file mode 100644 index 0000000..b97127a --- /dev/null +++ b/tests/sdp_msg/sdp_msg_test.c @@ -0,0 +1,569 @@ +#include +#include +#include +#include + +struct sdp_test_data { + const char *sdp_input; + const char *expect_sdp_str; +}; + +static void dump_sdp(const char *str, const char *prefix) +{ + while (str && *str) { + const char *line_end = sdp_msg_line_end(str); + while (*line_end == '\r' || *line_end == '\n') + line_end++; + printf("%s%s\n", prefix, osmo_escape_str(str, line_end - str)); + str = line_end; + } +} + +struct sdp_test_data sdp_tests[] = { + { + "v=0\r\n" + "o=- 5628250 5628250 IN IP4 192.168.11.121\r\n" + "s=-\r\n" + "c=IN IP4 192.168.11.121\r\n" + "t=0 0\r\n" + "m=audio 10020 RTP/AVP 18 0 2 4 8 96 97 98 100 101\r\n" + "a=rtpmap:18 G729/8000\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:2 G726-32/8000\r\n" + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:8 PCMA/8000\r\n" + "a=rtpmap:96 G726-40/8000\r\n" + "a=rtpmap:97 G726-24/8000\r\n" + "a=rtpmap:98 G726-16/8000\r\n" + "a=rtpmap:100 NSE/8000\r\n" + "a=fmtp:100 192-193\r\n" + "a=rtpmap:101 telephone-event/8000\r\n" + "a=fmtp:101 0-15\r\n" + "a=ptime:20\r\n" + "a=sendrecv\r\n" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 192.168.11.121\r\n" + "s=GSM Call\r\n" + "c=IN IP4 192.168.11.121\r\n" + "t=0 0\r\n" + "m=audio 10020 RTP/AVP 18 0 2 4 8 96 97 98 100 101\r\n" + "a=rtpmap:18 G729/8000\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:2 G726-32/8000\r\n" + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:8 PCMA/8000\r\n" + "a=rtpmap:96 G726-40/8000\r\n" + "a=rtpmap:97 G726-24/8000\r\n" + "a=rtpmap:98 G726-16/8000\r\n" + "a=rtpmap:100 NSE/8000\r\n" + "a=fmtp:100 192-193\r\n" + "a=rtpmap:101 telephone-event/8000\r\n" + "a=fmtp:101 0-15\r\n" + "a=ptime:20\r\n" + , + }, + { + "v=0\r\n" + "o=FooBar 1565090289 1565090290 IN IP4 192.168.11.151\r\n" + "s=FooBar\r\n" + "c=IN IP4 192.168.11.151\r\n" + "t=0 0\r\n" + "m=audio 16398 RTP/AVP 98\r\n" + "a=rtpmap:98 AMR/8000\r\n" + "a=fmtp:98 octet-align=1; mode-set=4\r\n" + "a=ptime:20\r\n" + "a=rtcp:16399 IN IP4 192.168.11.151\r\n" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 192.168.11.151\r\n" + "s=GSM Call\r\n" + "c=IN IP4 192.168.11.151\r\n" + "t=0 0\r\n" + "m=audio 16398 RTP/AVP 98\r\n" + "a=rtpmap:98 AMR/8000\r\n" + "a=fmtp:98 octet-align=1; mode-set=4\r\n" + "a=ptime:20\r\n" + , + }, + { + "v=0\r\n" + "o=FooBar 1565090289 1565090290 IN IP4 192.168.11.151\r\n" + "s=FooBar\r\n" + "c=IN IP4 192.168.11.140\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 18 0 4 8 101\r\n" + "a=rtpmap:18 G729/8000\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:8 PCMA/8000\r\n" + "a=rtpmap:101 telephone-event/8000\r\n" + "a=fmtp:101 0-15\r\n" + "a=sendrecv\r\n" + "a=rtcp:30437\r\n" + "a=ptime:20\r\n" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 192.168.11.140\r\n" /* <- NOTE: loses the 'o=' address, uses only 'c=' */ + "s=GSM Call\r\n" + "c=IN IP4 192.168.11.140\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 18 0 4 8 101\r\n" + "a=rtpmap:18 G729/8000\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:8 PCMA/8000\r\n" + "a=rtpmap:101 telephone-event/8000\r\n" + "a=fmtp:101 0-15\r\n" + "a=ptime:20\r\n" + , + }, +}; + +void test_parse_and_compose() +{ + int i; + bool ok = true; + + printf("\n\n%s\n", __func__); + + for (i = 0; i < ARRAY_SIZE(sdp_tests); i++) { + struct sdp_test_data *t = &sdp_tests[i]; + struct sdp_msg sdp = {}; + char str[1024]; + printf("\n[%d]\n", i); + dump_sdp(t->sdp_input, "sdp input: "); + + sdp_msg_from_str(&sdp, t->sdp_input); + sdp_msg_to_str(str, sizeof(str), &sdp); + + dump_sdp(str, "sdp_msg_to_str: "); + if (strcmp(str, t->expect_sdp_str)) { + int j; + ok = false; + printf("ERROR:\n"); + dump_sdp(t->expect_sdp_str, "expect_sdp_str: "); + for (j = 0; t->expect_sdp_str[j]; j++) { + if (t->expect_sdp_str[j] != str[j]) { + printf("ERROR at position %d, at:\n", j); + dump_sdp(str + j, " mismatch: "); + break; + } + } + } else + printf("[%d] ok\n", i); + } + + OSMO_ASSERT(ok); +} + +struct sdp_intersect_test_data { + const char *descr; + const char *sdp_a; + const char *sdp_b; + const char *expect_intersection; +}; + +#define SDP_1 \ + "v=0\r\n" \ + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" \ + "s=GSM Call\r\n" \ + "c=IN IP4 23.42.23.42\r\n" \ + "t=0 0\r\n" \ + "m=audio 30436 RTP/AVP 112 3 111 110\r\n" \ + "a=rtpmap:112 AMR/8000\r\n" \ + "a=fmtp:112 octet-align=1\r\n" \ + "a=rtpmap:3 GSM/8000\r\n" \ + "a=rtpmap:111 GSM-HR-08/8000\r\n" \ + "a=rtpmap:110 GSM-EFR/8000\r\n" \ + "a=ptime:20\r\n" + +#define SDP_2 \ + "v=0\r\n" \ + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" \ + "s=GSM Call\r\n" \ + "c=IN IP4 23.42.23.42\r\n" \ + "t=0 0\r\n" \ + "m=audio 30436 RTP/AVP 112 110\r\n" \ + "a=rtpmap:112 AMR/8000\r\n" \ + "a=fmtp:112 octet-align=1\r\n" \ + "a=rtpmap:110 GSM-EFR/8000\r\n" \ + "a=ptime:20\r\n" + +#define SDP_3 \ + "v=0\r\n" \ + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" \ + "s=GSM Call\r\n" \ + "c=IN IP4 23.42.23.42\r\n" \ + "t=0 0\r\n" \ + "m=audio 30436 RTP/AVP 3 111\r\n" \ + "a=rtpmap:3 GSM/8000\r\n" \ + "a=rtpmap:111 GSM-HR-08/8000\r\n" \ + "a=ptime:20\r\n" + + +struct sdp_intersect_test_data sdp_intersect_tests[] = { + { + "identical codecs lead to no change" + , + SDP_1 + , + "c=IN IP4 5.6.7.8\r\n" \ + "m=audio 12345 RTP/AVP 112 3 111 110\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + , + SDP_1 + }, + { + "identical codecs in different order also lead to no change" + , + SDP_1 + , + "c=IN IP4 5.6.7.8\r\n" \ + "m=audio 12345 RTP/AVP 3 110 111 112\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + , + SDP_1 + }, + { + "identical codecs with mismatching payload type numbers also lead to no change" + , + SDP_1 + , + "c=IN IP4 5.6.7.8\r\n" \ + "m=audio 12345 RTP/AVP 96 97 98 99\r\n" + "a=rtpmap:96 GSM/8000\r\n" + "a=rtpmap:97 GSM-EFR/8000\r\n" + "a=rtpmap:98 GSM-HR-08/8000\r\n" + "a=rtpmap:99 AMR/8000\r\n" + "a=fmtp:99 octet-align=1\r\n" + , + SDP_1 + }, + { + "identical codecs plus some extra codecs also lead to no change" + , + SDP_1 + , + "c=IN IP4 5.6.7.8\r\n" \ + "m=audio 12345 RTP/AVP 8 0 96 97 98 99\r\n" + "a=rtpmap:8 PCMA/8000\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:96 GSM/8000\r\n" + "a=rtpmap:97 GSM-EFR/8000\r\n" + "a=rtpmap:98 GSM-HR-08/8000\r\n" + "a=rtpmap:99 AMR/8000\r\n" + "a=fmtp:99 octet-align=1\r\n" + , + SDP_1 + }, + { + "some codecs removed", + SDP_1, + SDP_2, + SDP_2, + }, + { + "other codecs removed", + SDP_1, + SDP_3, + SDP_3, + }, + { + "all codecs removed", + SDP_1 + , + "s=empty" + , + "v=0\r\n" \ + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" \ + "s=GSM Call\r\n" \ + "c=IN IP4 23.42.23.42\r\n" \ + "t=0 0\r\n" \ + "m=audio 30436 RTP/AVP\r\n" \ + "a=ptime:20\r\n" + }, + { + "some real world test case" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n" + "s=GSM Call\r\n" + "c=IN IP4 0.0.0.0\r\n" + "t=0 0\r\n" + "m=audio 0 RTP/AVP 112 113 110 3 111\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n" + "a=rtpmap:113 AMR-WB/8000\r\n" + "a=fmtp:113 octet-align=1\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=ptime:20\r\n" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n" + "s=GSM Call\r\n" + "c=IN IP4 0.0.0.0\r\n" + "t=0 0\r\n" + "m=audio 0 RTP/AVP 112 113 110 3 111\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n" + "a=rtpmap:113 AMR-WB/8000\r\n" + "a=fmtp:113 octet-align=1\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=ptime:20\r\n" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n" + "s=GSM Call\r\n" + "c=IN IP4 0.0.0.0\r\n" + "t=0 0\r\n" + "m=audio 0 RTP/AVP 112 113 110 3 111\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n" + "a=rtpmap:113 AMR-WB/8000\r\n" + "a=fmtp:113 octet-align=1\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=ptime:20\r\n" + } +}; + +const char *sdp_msg_logstr(const struct sdp_msg *sdp) +{ + static char buf[1024]; + sdp_msg_to_str(buf, sizeof(buf), sdp); + return buf; +} + +static void test_intersect() +{ + int i; + bool ok = true; + int rc; + + printf("\n\n%s\n", __func__); + + for (i = 0; i < ARRAY_SIZE(sdp_intersect_tests); i++) { + struct sdp_intersect_test_data *t = &sdp_intersect_tests[i]; + struct sdp_msg sdp_a = {}; + struct sdp_msg sdp_b = {}; + char str[1024]; + printf("\n[%d] %s\n", i, t->descr); + dump_sdp(t->sdp_a, "SDP A: "); + dump_sdp(t->sdp_b, " SDP B: "); + + rc = sdp_msg_from_str(&sdp_a, t->sdp_a); + if (rc) { + printf("ERROR parsing SDP A: %d\n", rc); + break; + } + dump_sdp(sdp_msg_logstr(&sdp_a), "parsed SDP A: "); + rc = sdp_msg_from_str(&sdp_b, t->sdp_b); + if (rc) { + printf("ERROR parsing SDP A: %d\n", rc); + break; + } + dump_sdp(sdp_msg_logstr(&sdp_b), "parsed SDP B: "); + sdp_audio_codecs_intersection(&sdp_a.audio_codecs, &sdp_b.audio_codecs, false); + sdp_msg_to_str(str, sizeof(str), &sdp_a); + + dump_sdp(str, "sdp_msg_intersection(a,b): "); + if (strcmp(str, t->expect_intersection)) { + int j; + ok = false; + printf("ERROR:\n"); + dump_sdp(t->expect_intersection, "expect_intersection: "); + for (j = 0; t->expect_intersection[j]; j++) { + if (t->expect_intersection[j] != str[j]) { + printf("ERROR at position %d, at:\n", j); + dump_sdp(str + j, " mismatch: "); + break; + } + } + } else + printf("[%d] ok\n", i); + } + + OSMO_ASSERT(ok); +} + +struct sdp_select_test_data { + const char *sdp; + unsigned int select_payload_type; + const char *expect_sdp; +}; + +struct sdp_select_test_data sdp_select_tests[] = { + { + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 112 3 111 110\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + , + 112, + NULL + }, + { + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 112 3 111 110\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + , + 3, + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 3 112 111 110\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + }, + { + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 112 3 111 110\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + , + 111, + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 111 112 3 110\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + }, + { + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 112 3 111 110\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + , + 110, + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 110 112 3 111\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=ptime:20\r\n" + }, + +}; + +static void test_select() +{ + int i; + bool ok = true; + int rc; + + printf("\n\n%s\n", __func__); + + for (i = 0; i < ARRAY_SIZE(sdp_select_tests); i++) { + struct sdp_select_test_data *t = &sdp_select_tests[i]; + struct sdp_msg sdp = {}; + struct sdp_audio_codec *codec; + char buf[1024]; + printf("\n[%d]\n", i); + rc = sdp_msg_from_str(&sdp, t->sdp); + if (rc) { + printf("ERROR parsing SDP: %d\n", rc); + break; + } + printf("SDP: %s\n", sdp_audio_codecs_name(&sdp.audio_codecs)); + codec = sdp_audio_codec_by_payload_type(&sdp.audio_codecs, t->select_payload_type, false); + OSMO_ASSERT(codec); + printf("Select: %s\n", sdp_audio_codec_name(codec)); + + sdp_audio_codecs_select(&sdp.audio_codecs, codec); + + printf("SDP: %s\n", sdp_audio_codecs_name(&sdp.audio_codecs)); + sdp_msg_to_str(buf, sizeof(buf), &sdp); + + if (strcmp(buf, t->expect_sdp ? : t->sdp)) { + int j; + ok = false; + printf("ERROR:\n"); + dump_sdp(buf, "selection result: "); + dump_sdp(t->expect_sdp, "expect result: "); + for (j = 0; t->expect_sdp[j]; j++) { + if (t->expect_sdp[j] != buf[j]) { + printf("ERROR at position %d, at:\n", j); + dump_sdp(buf + j, " mismatch: "); + break; + } + } + } else + printf("[%d] ok\n", i); + } + + OSMO_ASSERT(ok); +} + +int main(void) +{ + test_parse_and_compose(); + test_intersect(); + test_select(); + return 0; +} diff --git a/tests/sdp_msg/sdp_msg_test.err b/tests/sdp_msg/sdp_msg_test.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/sdp_msg/sdp_msg_test.err diff --git a/tests/sdp_msg/sdp_msg_test.ok b/tests/sdp_msg/sdp_msg_test.ok new file mode 100644 index 0000000..a7a3d51 --- /dev/null +++ b/tests/sdp_msg/sdp_msg_test.ok @@ -0,0 +1,590 @@ + + +test_parse_and_compose + +[0] +sdp input: v=0\r\n +sdp input: o=- 5628250 5628250 IN IP4 192.168.11.121\r\n +sdp input: s=-\r\n +sdp input: c=IN IP4 192.168.11.121\r\n +sdp input: t=0 0\r\n +sdp input: m=audio 10020 RTP/AVP 18 0 2 4 8 96 97 98 100 101\r\n +sdp input: a=rtpmap:18 G729/8000\r\n +sdp input: a=rtpmap:0 PCMU/8000\r\n +sdp input: a=rtpmap:2 G726-32/8000\r\n +sdp input: a=rtpmap:4 G723/8000\r\n +sdp input: a=rtpmap:8 PCMA/8000\r\n +sdp input: a=rtpmap:96 G726-40/8000\r\n +sdp input: a=rtpmap:97 G726-24/8000\r\n +sdp input: a=rtpmap:98 G726-16/8000\r\n +sdp input: a=rtpmap:100 NSE/8000\r\n +sdp input: a=fmtp:100 192-193\r\n +sdp input: a=rtpmap:101 telephone-event/8000\r\n +sdp input: a=fmtp:101 0-15\r\n +sdp input: a=ptime:20\r\n +sdp input: a=sendrecv\r\n +sdp_msg_to_str: v=0\r\n +sdp_msg_to_str: o=OsmoMSC 0 0 IN IP4 192.168.11.121\r\n +sdp_msg_to_str: s=GSM Call\r\n +sdp_msg_to_str: c=IN IP4 192.168.11.121\r\n +sdp_msg_to_str: t=0 0\r\n +sdp_msg_to_str: m=audio 10020 RTP/AVP 18 0 2 4 8 96 97 98 100 101\r\n +sdp_msg_to_str: a=rtpmap:18 G729/8000\r\n +sdp_msg_to_str: a=rtpmap:0 PCMU/8000\r\n +sdp_msg_to_str: a=rtpmap:2 G726-32/8000\r\n +sdp_msg_to_str: a=rtpmap:4 G723/8000\r\n +sdp_msg_to_str: a=rtpmap:8 PCMA/8000\r\n +sdp_msg_to_str: a=rtpmap:96 G726-40/8000\r\n +sdp_msg_to_str: a=rtpmap:97 G726-24/8000\r\n +sdp_msg_to_str: a=rtpmap:98 G726-16/8000\r\n +sdp_msg_to_str: a=rtpmap:100 NSE/8000\r\n +sdp_msg_to_str: a=fmtp:100 192-193\r\n +sdp_msg_to_str: a=rtpmap:101 telephone-event/8000\r\n +sdp_msg_to_str: a=fmtp:101 0-15\r\n +sdp_msg_to_str: a=ptime:20\r\n +[0] ok + +[1] +sdp input: v=0\r\n +sdp input: o=FooBar 1565090289 1565090290 IN IP4 192.168.11.151\r\n +sdp input: s=FooBar\r\n +sdp input: c=IN IP4 192.168.11.151\r\n +sdp input: t=0 0\r\n +sdp input: m=audio 16398 RTP/AVP 98\r\n +sdp input: a=rtpmap:98 AMR/8000\r\n +sdp input: a=fmtp:98 octet-align=1; mode-set=4\r\n +sdp input: a=ptime:20\r\n +sdp input: a=rtcp:16399 IN IP4 192.168.11.151\r\n +sdp_msg_to_str: v=0\r\n +sdp_msg_to_str: o=OsmoMSC 0 0 IN IP4 192.168.11.151\r\n +sdp_msg_to_str: s=GSM Call\r\n +sdp_msg_to_str: c=IN IP4 192.168.11.151\r\n +sdp_msg_to_str: t=0 0\r\n +sdp_msg_to_str: m=audio 16398 RTP/AVP 98\r\n +sdp_msg_to_str: a=rtpmap:98 AMR/8000\r\n +sdp_msg_to_str: a=fmtp:98 octet-align=1; mode-set=4\r\n +sdp_msg_to_str: a=ptime:20\r\n +[1] ok + +[2] +sdp input: v=0\r\n +sdp input: o=FooBar 1565090289 1565090290 IN IP4 192.168.11.151\r\n +sdp input: s=FooBar\r\n +sdp input: c=IN IP4 192.168.11.140\r\n +sdp input: t=0 0\r\n +sdp input: m=audio 30436 RTP/AVP 18 0 4 8 101\r\n +sdp input: a=rtpmap:18 G729/8000\r\n +sdp input: a=rtpmap:0 PCMU/8000\r\n +sdp input: a=rtpmap:4 G723/8000\r\n +sdp input: a=rtpmap:8 PCMA/8000\r\n +sdp input: a=rtpmap:101 telephone-event/8000\r\n +sdp input: a=fmtp:101 0-15\r\n +sdp input: a=sendrecv\r\n +sdp input: a=rtcp:30437\r\n +sdp input: a=ptime:20\r\n +sdp_msg_to_str: v=0\r\n +sdp_msg_to_str: o=OsmoMSC 0 0 IN IP4 192.168.11.140\r\n +sdp_msg_to_str: s=GSM Call\r\n +sdp_msg_to_str: c=IN IP4 192.168.11.140\r\n +sdp_msg_to_str: t=0 0\r\n +sdp_msg_to_str: m=audio 30436 RTP/AVP 18 0 4 8 101\r\n +sdp_msg_to_str: a=rtpmap:18 G729/8000\r\n +sdp_msg_to_str: a=rtpmap:0 PCMU/8000\r\n +sdp_msg_to_str: a=rtpmap:4 G723/8000\r\n +sdp_msg_to_str: a=rtpmap:8 PCMA/8000\r\n +sdp_msg_to_str: a=rtpmap:101 telephone-event/8000\r\n +sdp_msg_to_str: a=fmtp:101 0-15\r\n +sdp_msg_to_str: a=ptime:20\r\n +[2] ok + + +test_intersect + +[0] identical codecs lead to no change +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: c=IN IP4 5.6.7.8\r\n + SDP B: m=audio 12345 RTP/AVP 112 3 111 110\r\n + SDP B: a=rtpmap:112 AMR/8000\r\n + SDP B: a=fmtp:112 octet-align=1\r\n + SDP B: a=rtpmap:3 GSM/8000\r\n + SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n + SDP B: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 5.6.7.8\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 5.6.7.8\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 12345 RTP/AVP 112 3 111 110\r\n +parsed SDP B: a=rtpmap:112 AMR/8000\r\n +parsed SDP B: a=fmtp:112 octet-align=1\r\n +parsed SDP B: a=rtpmap:3 GSM/8000\r\n +parsed SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP B: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 112 3 111 110\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[0] ok + +[1] identical codecs in different order also lead to no change +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: c=IN IP4 5.6.7.8\r\n + SDP B: m=audio 12345 RTP/AVP 3 110 111 112\r\n + SDP B: a=rtpmap:3 GSM/8000\r\n + SDP B: a=rtpmap:110 GSM-EFR/8000\r\n + SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n + SDP B: a=rtpmap:112 AMR/8000\r\n + SDP B: a=fmtp:112 octet-align=1\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 5.6.7.8\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 5.6.7.8\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 12345 RTP/AVP 3 110 111 112\r\n +parsed SDP B: a=rtpmap:3 GSM/8000\r\n +parsed SDP B: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP B: a=rtpmap:112 AMR/8000\r\n +parsed SDP B: a=fmtp:112 octet-align=1\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 112 3 111 110\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[1] ok + +[2] identical codecs with mismatching payload type numbers also lead to no change +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: c=IN IP4 5.6.7.8\r\n + SDP B: m=audio 12345 RTP/AVP 96 97 98 99\r\n + SDP B: a=rtpmap:96 GSM/8000\r\n + SDP B: a=rtpmap:97 GSM-EFR/8000\r\n + SDP B: a=rtpmap:98 GSM-HR-08/8000\r\n + SDP B: a=rtpmap:99 AMR/8000\r\n + SDP B: a=fmtp:99 octet-align=1\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 5.6.7.8\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 5.6.7.8\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 12345 RTP/AVP 96 97 98 99\r\n +parsed SDP B: a=rtpmap:96 GSM/8000\r\n +parsed SDP B: a=rtpmap:97 GSM-EFR/8000\r\n +parsed SDP B: a=rtpmap:98 GSM-HR-08/8000\r\n +parsed SDP B: a=rtpmap:99 AMR/8000\r\n +parsed SDP B: a=fmtp:99 octet-align=1\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 112 3 111 110\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[2] ok + +[3] identical codecs plus some extra codecs also lead to no change +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: c=IN IP4 5.6.7.8\r\n + SDP B: m=audio 12345 RTP/AVP 8 0 96 97 98 99\r\n + SDP B: a=rtpmap:8 PCMA/8000\r\n + SDP B: a=rtpmap:0 PCMU/8000\r\n + SDP B: a=rtpmap:96 GSM/8000\r\n + SDP B: a=rtpmap:97 GSM-EFR/8000\r\n + SDP B: a=rtpmap:98 GSM-HR-08/8000\r\n + SDP B: a=rtpmap:99 AMR/8000\r\n + SDP B: a=fmtp:99 octet-align=1\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 5.6.7.8\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 5.6.7.8\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 12345 RTP/AVP 8 0 96 97 98 99\r\n +parsed SDP B: a=rtpmap:8 PCMA/8000\r\n +parsed SDP B: a=rtpmap:0 PCMU/8000\r\n +parsed SDP B: a=rtpmap:96 GSM/8000\r\n +parsed SDP B: a=rtpmap:97 GSM-EFR/8000\r\n +parsed SDP B: a=rtpmap:98 GSM-HR-08/8000\r\n +parsed SDP B: a=rtpmap:99 AMR/8000\r\n +parsed SDP B: a=fmtp:99 octet-align=1\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 112 3 111 110\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[3] ok + +[4] some codecs removed +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: v=0\r\n + SDP B: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n + SDP B: s=GSM Call\r\n + SDP B: c=IN IP4 23.42.23.42\r\n + SDP B: t=0 0\r\n + SDP B: m=audio 30436 RTP/AVP 112 110\r\n + SDP B: a=rtpmap:112 AMR/8000\r\n + SDP B: a=fmtp:112 octet-align=1\r\n + SDP B: a=rtpmap:110 GSM-EFR/8000\r\n + SDP B: a=ptime:20\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 23.42.23.42\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 30436 RTP/AVP 112 110\r\n +parsed SDP B: a=rtpmap:112 AMR/8000\r\n +parsed SDP B: a=fmtp:112 octet-align=1\r\n +parsed SDP B: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 112 110\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[4] ok + +[5] other codecs removed +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: v=0\r\n + SDP B: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n + SDP B: s=GSM Call\r\n + SDP B: c=IN IP4 23.42.23.42\r\n + SDP B: t=0 0\r\n + SDP B: m=audio 30436 RTP/AVP 3 111\r\n + SDP B: a=rtpmap:3 GSM/8000\r\n + SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n + SDP B: a=ptime:20\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 23.42.23.42\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 30436 RTP/AVP 3 111\r\n +parsed SDP B: a=rtpmap:3 GSM/8000\r\n +parsed SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 3 111\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[5] ok + +[6] all codecs removed +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: s=empty +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 0.0.0.0\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 0 RTP/AVP\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[6] ok + +[7] some real world test case +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 0.0.0.0\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 0 RTP/AVP 112 113 110 3 111\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n +SDP A: a=rtpmap:113 AMR-WB/8000\r\n +SDP A: a=fmtp:113 octet-align=1\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: v=0\r\n + SDP B: o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n + SDP B: s=GSM Call\r\n + SDP B: c=IN IP4 0.0.0.0\r\n + SDP B: t=0 0\r\n + SDP B: m=audio 0 RTP/AVP 112 113 110 3 111\r\n + SDP B: a=rtpmap:112 AMR/8000\r\n + SDP B: a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n + SDP B: a=rtpmap:113 AMR-WB/8000\r\n + SDP B: a=fmtp:113 octet-align=1\r\n + SDP B: a=rtpmap:110 GSM-EFR/8000\r\n + SDP B: a=rtpmap:3 GSM/8000\r\n + SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n + SDP B: a=ptime:20\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 0.0.0.0\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 0 RTP/AVP 112 113 110 3 111\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n +parsed SDP A: a=rtpmap:113 AMR-WB/8000\r\n +parsed SDP A: a=fmtp:113 octet-align=1\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 0.0.0.0\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 0 RTP/AVP 112 113 110 3 111\r\n +parsed SDP B: a=rtpmap:112 AMR/8000\r\n +parsed SDP B: a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n +parsed SDP B: a=rtpmap:113 AMR-WB/8000\r\n +parsed SDP B: a=fmtp:113 octet-align=1\r\n +parsed SDP B: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP B: a=rtpmap:3 GSM/8000\r\n +parsed SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 0.0.0.0\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 0 RTP/AVP 112 113 110 3 111\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n +sdp_msg_intersection(a,b): a=rtpmap:113 AMR-WB/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:113 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[7] ok + + +test_select + +[0] +SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR +Select: AMR:octet-align=1 +SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR +[0] ok + +[1] +SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR +Select: GSM +SDP: GSM,AMR:octet-align=1,GSM-HR-08,GSM-EFR +[1] ok + +[2] +SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR +Select: GSM-HR-08 +SDP: GSM-HR-08,AMR:octet-align=1,GSM,GSM-EFR +[2] ok + +[3] +SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR +Select: GSM-EFR +SDP: GSM-EFR,AMR:octet-align=1,GSM,GSM-HR-08 +[3] ok diff --git a/tests/testsuite.at b/tests/testsuite.at index c0788b9..946d0db 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -107,3 +107,10 @@ cat $abs_srcdir/msc_vlr/msc_vlr_test_ss.err > experr AT_CHECK([$abs_top_builddir/tests/msc_vlr/msc_vlr_test_ss], [], [expout], [experr]) AT_CLEANUP + +AT_SETUP([sdp_msg_test]) +AT_KEYWORDS([sdp_msg_test]) +cat $abs_srcdir/sdp_msg/sdp_msg_test.ok > expout +cat $abs_srcdir/sdp_msg/sdp_msg_test.err > experr +AT_CHECK([$abs_top_builddir/tests/sdp_msg/sdp_msg_test], [], [expout], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:20 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:20 +0000 Subject: Change in osmo-msc[master]: MNCC: add optional SDP to the socket protocol References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC: add optional SDP to the socket protocol ...................................................................... MNCC: add optional SDP to the socket protocol Add a char buffer of 1024 characters length as space for SDP to pass to / receive from MNCC. Actually support receiving MNCC without such an SDP tail. The main reason for this is to avoid the need to adjust the ttcn3 implementation of MNCC: it would stop working for older osmo-msc. Older or non-SIP MNCC peers could operate the previous MNCC protocol unchanged (save the protocol number bump) without having to implement SDP. The SDP part in the MNCC protocol will be used in upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f. Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 --- M include/osmocom/msc/mncc.h M src/libmsc/mncc.c 2 files changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/48/15948/1 diff --git a/include/osmocom/msc/mncc.h b/include/osmocom/msc/mncc.h index 28ee9b3..2297b54 100644 --- a/include/osmocom/msc/mncc.h +++ b/include/osmocom/msc/mncc.h @@ -159,6 +159,9 @@ unsigned char lchan_type; unsigned char lchan_mode; + + /* A buffer to contain SDP ('\0' terminated) */ + char sdp[1024]; }; struct gsm_data_frame { @@ -167,7 +170,7 @@ unsigned char data[0]; }; -#define MNCC_SOCK_VERSION 5 +#define MNCC_SOCK_VERSION 6 struct gsm_mncc_hello { uint32_t msg_type; uint32_t version; @@ -190,6 +193,7 @@ uint16_t port; uint32_t payload_type; uint32_t payload_msg_type; + char sdp[1024]; }; struct gsm_mncc_bridge { diff --git a/src/libmsc/mncc.c b/src/libmsc/mncc.c index d0b2ff2..3d17ab9 100644 --- a/src/libmsc/mncc.c +++ b/src/libmsc/mncc.c @@ -262,7 +262,9 @@ case MNCC_RTP_FREE: case MNCC_RTP_CONNECT: case MNCC_RTP_CREATE: - if (len < sizeof(struct gsm_mncc_rtp)) { + /* Should we receive an MNCC message without SDP, the zero-initialized msgb will guarantee that the + * char sdp[] starts with a '\0'. */ + if (len < offsetof(struct gsm_mncc_rtp, sdp)) { LOGP(DMNCC, LOGL_ERROR, "Short MNCC RTP\n"); return -EINVAL; } @@ -279,7 +281,9 @@ } break; default: - if (len < sizeof(struct gsm_mncc)) { + /* Should we receive an MNCC message without SDP, the zero-initialized msgb will guarantee that the + * char sdp[] starts with a '\0'. */ + if (len < offsetof(struct gsm_mncc, sdp)) { LOGP(DMNCC, LOGL_ERROR, "Short MNCC Signalling\n"); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:20 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:20 +0000 Subject: Change in osmo-msc[master]: validate dtap err logging References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15949 ) Change subject: validate dtap err logging ...................................................................... validate dtap err logging Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/49/15949/1 diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index de4913a..e00c337 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -254,8 +254,10 @@ /* Mask the sequence number out before comparing */ msg->data[1] &= 0x3f; - if (!msgb_eq_data_print(msg, dtap_tx_expected->data, dtap_tx_expected->len)) + if (!msgb_eq_data_print(msg, dtap_tx_expected->data, dtap_tx_expected->len)) { + btw("Expected %s", osmo_hexdump(dtap_tx_expected->data, dtap_tx_expected->len)); abort(); + } btw("DTAP matches expected message"); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 Gerrit-Change-Number: 15949 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:21 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:21 +0000 Subject: Change in osmo-msc[master]: msc_vlr_test_call.c: add MNCC logging References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15950 ) Change subject: msc_vlr_test_call.c: add MNCC logging ...................................................................... msc_vlr_test_call.c: add MNCC logging Change-Id: I03b25c134553c620d3fa9d23a67ad39414546861 --- M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err 2 files changed, 41 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/50/15950/1 diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index 392d38d..dfa3141 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -25,11 +25,13 @@ #include -static void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc) -{ - mncc->msg_type = msg_type; - mncc_tx_to_cc(net, mncc); -} +#define mncc_sends_to_cc(MSG_TYPE, MNCC) do { \ + (MNCC)->msg_type = MSG_TYPE; \ + log("MSC <-- MNCC: callref 0x%x: %s\n%s", (MNCC)->callref, \ + get_mncc_name((MNCC)->msg_type), \ + (MNCC)->sdp); \ + mncc_tx_to_cc(net, MNCC); \ + } while(0) /* static void on_call_release_mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc) diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 7f9940b..07e10a5 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -297,6 +297,8 @@ MSC --> MNCC: callref 0x80000001: MNCC_SETUP_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) - MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN + MSC <-- MNCC: callref 0x80000001: MNCC_RTP_CREATE + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_RTP_CREATE DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated @@ -328,6 +330,8 @@ DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) tx MNCC_RTP_CREATE MSC --> MNCC: callref 0x80000001: MNCC_RTP_CREATE - MNCC says that's fine + MSC <-- MNCC: callref 0x80000001: MNCC_CALL_PROC_REQ + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_CALL_PROC_REQ DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) stopping pending guard timer DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) starting guard timer with 180 seconds @@ -341,6 +345,8 @@ DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - Total time passed: 1.000023 s - The other call leg got established (not shown here), MNCC tells us so + MSC <-- MNCC: callref 0x80000001: MNCC_ALERT_REQ + DMNCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_ALERT_REQ DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) stopping pending guard timer DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) starting guard timer with 180 seconds @@ -351,6 +357,8 @@ - DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_ALERTING: 8301 - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST + MSC <-- MNCC: callref 0x80000001: MNCC_SETUP_RSP + DMNCC trans(CC:CALL_DELIVERED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_SETUP_RSP DCC trans(CC:CALL_DELIVERED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) stopping pending guard timer DCC trans(CC:CALL_DELIVERED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) starting guard timer with 180 seconds @@ -390,6 +398,8 @@ DMNCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) tx MNCC_DISC_IND MSC --> MNCC: callref 0x80000001: MNCC_DISC_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) + MSC <-- MNCC: callref 0x80000001: MNCC_REL_REQ + DMNCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_REL_REQ DCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) starting guard timer with 180 seconds DCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_REL_REQ in state DISCONNECT_IND @@ -661,6 +671,8 @@ - after a while, MNCC asks us to setup a call, causing Paging + MSC <-- MNCC: callref 0x423: MNCC_SETUP_REQ + DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + mncc_tx_to_gsm_cc: now used by 2 (attached,mncc_tx_to_gsm_cc) DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + CC: now used by 3 (attached,mncc_tx_to_gsm_cc,CC) DCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 callref-0x423 tid-255) New transaction @@ -779,6 +791,8 @@ MSC --> MNCC: callref 0x423: MNCC_CALL_CONF_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) - MNCC sends MNCC_RTP_CREATE + MSC <-- MNCC: callref 0x423: MNCC_RTP_CREATE + DMNCC trans(CC:MO_TERM_CALL_CONF IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_RTP_CREATE DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - MGW acknowledges the CRCX to RAN, triggering Assignment @@ -827,6 +841,8 @@ DMNCC trans(CC:CONNECT_REQUEST IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) tx MNCC_SETUP_CNF MSC --> MNCC: callref 0x423: MNCC_SETUP_CNF DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) + MSC <-- MNCC: callref 0x423: MNCC_SETUP_COMPL_REQ + DMNCC trans(CC:CONNECT_REQUEST IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_SETUP_COMPL_REQ DCC trans(CC:CONNECT_REQUEST IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) starting guard timer with 180 seconds DCC trans(CC:CONNECT_REQUEST IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_SETUP_COMPL_REQ in state CONNECT_REQUEST @@ -853,6 +869,8 @@ DMNCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) tx MNCC_DISC_IND MSC --> MNCC: callref 0x423: MNCC_DISC_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) + MSC <-- MNCC: callref 0x423: MNCC_REL_REQ + DMNCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_REL_REQ DCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) starting guard timer with 180 seconds DCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_REL_REQ in state DISCONNECT_IND @@ -1124,6 +1142,8 @@ - after a while, MNCC asks us to setup a call, causing Paging + MSC <-- MNCC: callref 0x423: MNCC_SETUP_REQ + DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + mncc_tx_to_gsm_cc: now used by 2 (attached,mncc_tx_to_gsm_cc) DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + CC: now used by 3 (attached,mncc_tx_to_gsm_cc,CC) DCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 callref-0x423 tid-255) New transaction @@ -1242,6 +1262,8 @@ MSC --> MNCC: callref 0x423: MNCC_CALL_CONF_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) - MNCC sends MNCC_RTP_CREATE + MSC <-- MNCC: callref 0x423: MNCC_RTP_CREATE + DMNCC trans(CC:MO_TERM_CALL_CONF IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_RTP_CREATE DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - MGW acknowledges the CRCX to RAN, triggering Assignment @@ -1645,6 +1667,8 @@ MSC --> MNCC: callref 0x80000002: MNCC_SETUP_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) - MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN + MSC <-- MNCC: callref 0x80000002: MNCC_RTP_CREATE + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) rx MNCC_RTP_CREATE DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated @@ -1676,6 +1700,8 @@ DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) tx MNCC_RTP_CREATE MSC --> MNCC: callref 0x80000002: MNCC_RTP_CREATE - MNCC says that's fine + MSC <-- MNCC: callref 0x80000002: MNCC_CALL_PROC_REQ + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) rx MNCC_CALL_PROC_REQ DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) stopping pending guard timer DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) starting guard timer with 180 seconds @@ -1688,6 +1714,8 @@ DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - But the other side's MSISDN could not be resolved, MNCC tells us to cancel + MSC <-- MNCC: callref 0x80000002: MNCC_REL_REQ + DMNCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) rx MNCC_REL_REQ DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) stopping pending guard timer DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) starting guard timer with 180 seconds @@ -2067,6 +2095,8 @@ MSC --> MNCC: callref 0x80000003: MNCC_SETUP_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) - MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN + MSC <-- MNCC: callref 0x80000003: MNCC_RTP_CREATE + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) rx MNCC_RTP_CREATE DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated @@ -2098,6 +2128,8 @@ DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) tx MNCC_RTP_CREATE MSC --> MNCC: callref 0x80000003: MNCC_RTP_CREATE - MNCC says that's fine + MSC <-- MNCC: callref 0x80000003: MNCC_CALL_PROC_REQ + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) rx MNCC_CALL_PROC_REQ DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) stopping pending guard timer DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) starting guard timer with 180 seconds @@ -2110,6 +2142,8 @@ DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - But the other side's MSISDN could not be resolved, MNCC tells us to cancel + MSC <-- MNCC: callref 0x80000003: MNCC_REL_REQ + DMNCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) rx MNCC_REL_REQ DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) stopping pending guard timer DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) starting guard timer with 180 seconds -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I03b25c134553c620d3fa9d23a67ad39414546861 Gerrit-Change-Number: 15950 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:21 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:21 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: log descriptions in color with -v References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15951 ) Change subject: msc_vlr_tests: log descriptions in color with -v ...................................................................... msc_vlr_tests: log descriptions in color with -v Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d --- M tests/msc_vlr/msc_vlr_tests.h 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/51/15951/1 diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index 57022b4..88f80b4 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -35,9 +35,12 @@ #include extern bool _log_lines; +#define LOG_COLOR "\033[1;33m" +#define LOG_COLOR_OFF "\033[0;m" + #define _log(fmt, args...) do { \ if (_log_lines) \ - fprintf(stderr, " %4d:%s: " fmt "\n", \ + fprintf(stderr, LOG_COLOR " %4d:%s: " fmt LOG_COLOR_OFF "\n", \ __LINE__, __FILE__, ## args ); \ else \ fprintf(stderr, fmt "\n", ## args ); \ -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d Gerrit-Change-Number: 15951 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:21 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:21 +0000 Subject: Change in osmo-msc[master]: msc_vlr_test_call: rename lu_utran_tmsi References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15952 ) Change subject: msc_vlr_test_call: rename lu_utran_tmsi ...................................................................... msc_vlr_test_call: rename lu_utran_tmsi Change-Id: I46a41321e6d1be3672a56a6e3cc36f013fdcd396 --- M tests/msc_vlr/msc_vlr_test_call.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/52/15952/1 diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index dfa3141..339233c 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -43,7 +43,7 @@ #define IMSI "901700000010650" -static void standard_lu() +static void lu_utran_tmsi() { struct vlr_subscr *vsub; @@ -173,7 +173,7 @@ fake_time_start(); - standard_lu(); + lu_utran_tmsi(); BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector"); auth_request_sent = false; @@ -291,7 +291,7 @@ fake_time_start(); - standard_lu(); + lu_utran_tmsi(); BTW("after a while, MNCC asks us to setup a call, causing Paging"); @@ -394,7 +394,7 @@ fake_time_start(); - standard_lu(); + lu_utran_tmsi(); BTW("after a while, MNCC asks us to setup a call, causing Paging"); @@ -489,7 +489,7 @@ fake_time_start(); - standard_lu(); + lu_utran_tmsi(); BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector"); auth_request_sent = false; @@ -585,7 +585,7 @@ fake_time_start(); - standard_lu(); + lu_utran_tmsi(); BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector"); auth_request_sent = false; diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 07e10a5..8c394d0 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -189,11 +189,11 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations - msub gone llist_count(&msub_list) == 0 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + standard_lu: now used by 2 (attached,standard_lu) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + lu_utran_tmsi: now used by 2 (attached,lu_utran_tmsi) vsub != NULL == 1 strcmp(vsub->imsi, IMSI) == 0 LAC == 23 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - standard_lu: now used by 1 (attached) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - lu_utran_tmsi: now used by 1 (attached) - after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector @@ -663,11 +663,11 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations - msub gone llist_count(&msub_list) == 0 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + standard_lu: now used by 2 (attached,standard_lu) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + lu_utran_tmsi: now used by 2 (attached,lu_utran_tmsi) vsub != NULL == 1 strcmp(vsub->imsi, IMSI) == 0 LAC == 23 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - standard_lu: now used by 1 (attached) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - lu_utran_tmsi: now used by 1 (attached) - after a while, MNCC asks us to setup a call, causing Paging @@ -1134,11 +1134,11 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations - msub gone llist_count(&msub_list) == 0 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + standard_lu: now used by 2 (attached,standard_lu) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + lu_utran_tmsi: now used by 2 (attached,lu_utran_tmsi) vsub != NULL == 1 strcmp(vsub->imsi, IMSI) == 0 LAC == 23 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - standard_lu: now used by 1 (attached) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - lu_utran_tmsi: now used by 1 (attached) - after a while, MNCC asks us to setup a call, causing Paging @@ -1559,11 +1559,11 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations - msub gone llist_count(&msub_list) == 0 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + standard_lu: now used by 2 (attached,standard_lu) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + lu_utran_tmsi: now used by 2 (attached,lu_utran_tmsi) vsub != NULL == 1 strcmp(vsub->imsi, IMSI) == 0 LAC == 23 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - standard_lu: now used by 1 (attached) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - lu_utran_tmsi: now used by 1 (attached) - after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector @@ -1987,11 +1987,11 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations - msub gone llist_count(&msub_list) == 0 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + standard_lu: now used by 2 (attached,standard_lu) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + lu_utran_tmsi: now used by 2 (attached,lu_utran_tmsi) vsub != NULL == 1 strcmp(vsub->imsi, IMSI) == 0 LAC == 23 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - standard_lu: now used by 1 (attached) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - lu_utran_tmsi: now used by 1 (attached) - after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15952 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I46a41321e6d1be3672a56a6e3cc36f013fdcd396 Gerrit-Change-Number: 15952 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:21:21 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 3 Nov 2019 23:21:21 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15953 ) Change subject: add full SDP codec information to the MNCC socket ...................................................................... add full SDP codec information to the MNCC socket This way osmo-msc can benefit from the complete codec information received via SIP, which was so far terminated at osmo-sip-connector. osmo-sip-connector could/should have translated the received SDP to MNCC bearer_cap, but this was never implemented properly. Since osmo-msc already handles SDP towards the MGW, it makes most sense to pass SDP to osmo-msc transparently. To be able to send a valid RTP IP:port in the SDP upon the first MNCC_SETUP_IND going out, move the CN side CRCX to the very start of establishing a voice call. As a result, first create MGW conns for both RAN and CN before starting. The voice_call_full.msc chart shows the change in message sequence for MO and MT voice calls. Implement cc_sdp.c, which accumulates codec information from various sources (MS, BSS, Assignment, remote call leg) and provides filtering to get the available set of codecs at any point in time. Implement codec_sdp_cc_t9n.c, to translate between SDP and the various libosmo-mgcp-client, CC and BSSMAP representations of codecs: - Speech Version, - Permitted Speech, - Speech Codec Type, - default Payload Type numbers, - enum mgcp_codecs, - FR/HR compatibility - SDP audio codec names, - various AMR configurations. A codec_map lists these relations in one large data record. Various functions provide conversions by traversing this map. Add trans->cc.mnccc_release_sent: so far, avoiding to send an MNCC release during trans_free() was done by setting the callref = 0. But that also skips CC Release. On codec mismatch, we send a specific MNCC error code but still want a normal CC Release: hence send the MNCC message, set mnccc_release_sent = true and do normal CC Release in trans_free(). (A better way to do this would be to adopt the mncc_call FSM from inter-MSC handover also for local voice calls, but that is out of scope for now. I want to try that soon, as time permits.) Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f --- M doc/sequence_charts/voice_call_full.msc M include/osmocom/msc/Makefile.am M include/osmocom/msc/call_leg.h A include/osmocom/msc/cc_sdp.h A include/osmocom/msc/codec_sdp_cc_t9n.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/msc_a.h M include/osmocom/msc/msc_ho.h M include/osmocom/msc/rtp_stream.h M include/osmocom/msc/sdp_msg.h M include/osmocom/msc/transaction.h M src/libmsc/Makefile.am M src/libmsc/call_leg.c A src/libmsc/cc_sdp.c A src/libmsc/codec_sdp_cc_t9n.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/mncc_call.c M src/libmsc/msc_a.c M src/libmsc/msc_ho.c M src/libmsc/msc_t.c M src/libmsc/rtp_stream.c M src/libmsc/sdp_msg.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sdp_msg/sdp_msg_test.ok 27 files changed, 5,485 insertions(+), 463 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/53/15953/1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:22:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 3 Nov 2019 23:22:55 +0000 Subject: Change in osmo-bsc[master]: VTY: also print the active phan config in ts_dump_vty() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15931 ) Change subject: VTY: also print the active phan config in ts_dump_vty() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I45c93a737ad82a2525f941e89cd19d4cedbf6f02 Gerrit-Change-Number: 15931 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 03 Nov 2019 23:22:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:27:20 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 3 Nov 2019 23:27:20 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: simplify computation of CCCH_CONFIG In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15933 ) Change subject: osmo_bsc_main.c: simplify computation of CCCH_CONFIG ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 Gerrit-Change-Number: 15933 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 03 Nov 2019 23:27:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 3 23:30:41 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 3 Nov 2019 23:30:41 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15934 ) Change subject: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd Gerrit-Change-Number: 15934 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 03 Nov 2019 23:30:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Mon Nov 4 01:49:31 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 01:49:31 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5dbf83c69c209_751f2b0ec3e165fc789563@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_8.0/i586 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 168s] from /usr/include/osmocom/gprs/gprs_bssgp.h:9, [ 168s] from ./gprs_bssgp_pcu.h:32, [ 168s] from gprs_bssgp_pcu.cpp:22: [ 168s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 168s] enum gsm_band; [ 168s] ^ [ 168s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 168s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 168s] ^ [ 168s] Makefile:793: recipe for target 'gprs_bssgp_pcu.lo' failed [ 168s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 168s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 168s] Makefile:399: recipe for target 'all-recursive' failed [ 168s] make[1]: *** [all-recursive] Error 1 [ 168s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 168s] dh_auto_build: make -j1 returned exit code 2 [ 168s] debian/rules:12: recipe for target 'build' failed [ 168s] make: *** [build] Error 2 [ 168s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 168s] [ 168s] lamb18 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:49:19 UTC 2019. [ 168s] [ 168s] ### VM INTERACTION START ### [ 169s] Powering off. [ 170s] [ 156.383094] reboot: Power down [ 170s] ### VM INTERACTION END ### [ 170s] [ 170s] lamb18 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:49:21 UTC 2019. [ 170s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 01:52:23 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 01:52:23 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5dbf845e768f6_751f2b0ec3e165fc790436@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 159s] from /usr/include/osmocom/gprs/gprs_bssgp.h:9, [ 159s] from ./gprs_bssgp_pcu.h:32, [ 159s] from gprs_bssgp_pcu.cpp:22: [ 159s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 159s] enum gsm_band; [ 159s] ^ [ 159s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 159s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 159s] ^ [ 159s] Makefile:805: recipe for target 'gprs_bssgp_pcu.lo' failed [ 159s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 159s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 159s] Makefile:411: recipe for target 'all-recursive' failed [ 159s] make[1]: *** [all-recursive] Error 1 [ 159s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 159s] dh_auto_build: make -j1 returned exit code 2 [ 159s] debian/rules:12: recipe for target 'build' failed [ 159s] make: *** [build] Error 2 [ 159s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 159s] [ 159s] lamb12 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:52:18 UTC 2019. [ 159s] [ 159s] ### VM INTERACTION START ### [ 162s] [ 150.595120] sysrq: SysRq : Power Off [ 162s] [ 150.600534] reboot: Power down [ 162s] ### VM INTERACTION END ### [ 162s] [ 162s] lamb12 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:52:21 UTC 2019. [ 162s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 01:53:15 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 01:53:15 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/i586 In-Reply-To: References: Message-ID: <5dbf849b2caee_751f2b0ec3e165fc7907f0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/i586 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 202s] from /usr/include/osmocom/gprs/gprs_bssgp.h:9, [ 202s] from ./gprs_bssgp_pcu.h:32, [ 202s] from gprs_bssgp_pcu.cpp:22: [ 202s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 202s] enum gsm_band; [ 202s] ^~~~~~~~ [ 202s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 202s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 202s] ^~~~~~~~ [ 202s] Makefile:805: recipe for target 'gprs_bssgp_pcu.lo' failed [ 202s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 202s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 202s] Makefile:411: recipe for target 'all-recursive' failed [ 202s] make[1]: *** [all-recursive] Error 1 [ 202s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 202s] dh_auto_build: make -j1 returned exit code 2 [ 202s] debian/rules:12: recipe for target 'build' failed [ 202s] make: *** [build] Error 2 [ 202s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 202s] [ 202s] wildcard2 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:53:07 UTC 2019. [ 202s] [ 202s] ### VM INTERACTION START ### [ 205s] [ 184.793065] sysrq: SysRq : Power Off [ 205s] [ 184.802106] reboot: Power down [ 206s] ### VM INTERACTION END ### [ 206s] [ 206s] wildcard2 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:53:12 UTC 2019. [ 206s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 01:55:14 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 01:55:14 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_18.04/i586 In-Reply-To: References: Message-ID: <5dbf851148399_751f2b0ec3e165fc7911df@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_18.04/i586 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_18.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 271s] from /usr/include/osmocom/gprs/gprs_bssgp.h:9, [ 271s] from ./gprs_bssgp_pcu.h:32, [ 271s] from gprs_bssgp_pcu.cpp:22: [ 271s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 271s] enum gsm_band; [ 271s] ^~~~~~~~ [ 271s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 271s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 271s] ^~~~~~~~ [ 271s] Makefile:805: recipe for target 'gprs_bssgp_pcu.lo' failed [ 271s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 271s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 272s] Makefile:411: recipe for target 'all-recursive' failed [ 272s] make[1]: *** [all-recursive] Error 1 [ 272s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 272s] dh_auto_build: make -j1 returned exit code 2 [ 272s] debian/rules:12: recipe for target 'build' failed [ 272s] make: *** [build] Error 2 [ 272s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 272s] [ 272s] lamb18 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:54:53 UTC 2019. [ 272s] [ 272s] ### VM INTERACTION START ### [ 275s] [ 259.929561] sysrq: SysRq : Power Off [ 275s] [ 259.934467] reboot: Power down [ 275s] ### VM INTERACTION END ### [ 275s] [ 275s] lamb18 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:54:57 UTC 2019. [ 275s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 01:56:05 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 01:56:05 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_18.10/i586 In-Reply-To: References: Message-ID: <5dbf854f100cc_751f2b0ec3e165fc791579@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_18.10/i586 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_18.10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 311s] Making all in src [ 311s] make[2]: Entering directory '/usr/src/packages/BUILD/src' [ 312s] g++ -DPACKAGE_NAME=\"osmo-pcu\" -DPACKAGE_TARNAME=\"osmo-pcu\" -DPACKAGE_VERSION=\"0.7.0.38-05bc\" -DPACKAGE_STRING=\"osmo-pcu\ 0.7.0.38-05bc\" -DPACKAGE_BUGREPORT=\"osmocom-net-gprs at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"osmo-pcu\" -DVERSION=\"0.7.0.38-05bc\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -I. -I../include -Wall -pthread -I/usr/include/ -fno-strict-aliasing -I/usr/include/ -I/usr/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ldl -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++03 -c -o pcu_main.o pcu_main.cpp [ 312s] In file included from /usr/include/osmocom/gsm/gsm_utils.h:33, [ 312s] from ./pcu_l1_if.h:31, [ 312s] from pcu_main.cpp:20: [ 312s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 312s] enum gsm_band; [ 312s] ^~~~~~~~ [ 312s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 312s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 312s] ^~~~~~~~ [ 312s] make[2]: *** [Makefile:823: pcu_main.o] Error 1 [ 312s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 312s] make[1]: *** [Makefile:411: all-recursive] Error 1 [ 312s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 312s] dh_auto_build: make -j1 returned exit code 2 [ 312s] make: *** [debian/rules:12: build] Error 2 [ 312s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 312s] [ 312s] lamb07 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:55:45 UTC 2019. [ 312s] [ 312s] ### VM INTERACTION START ### [ 315s] [ 299.954116] sysrq: SysRq : Power Off [ 315s] [ 299.965725] reboot: Power down [ 315s] ### VM INTERACTION END ### [ 315s] [ 315s] lamb07 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:55:48 UTC 2019. [ 315s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 01:58:39 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 01:58:39 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5dbf85e4a056e_751f2b0ec3e165fc79227a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 138s] from /usr/include/osmocom/gprs/gprs_bssgp.h:9, [ 138s] from ./gprs_bssgp_pcu.h:32, [ 138s] from gprs_bssgp_pcu.cpp:22: [ 138s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 138s] enum gsm_band; [ 138s] ^ [ 138s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 138s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 138s] ^ [ 138s] Makefile:805: recipe for target 'gprs_bssgp_pcu.lo' failed [ 138s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 138s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 138s] Makefile:411: recipe for target 'all-recursive' failed [ 138s] make[1]: *** [all-recursive] Error 1 [ 138s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 138s] dh_auto_build: make -j1 returned exit code 2 [ 138s] debian/rules:12: recipe for target 'build' failed [ 138s] make: *** [build] Error 2 [ 138s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 138s] [ 138s] sheep82 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:58:22 UTC 2019. [ 138s] [ 138s] ### VM INTERACTION START ### [ 141s] [ 132.860373] sysrq: SysRq : Power Off [ 141s] [ 132.869536] reboot: Power down [ 141s] ### VM INTERACTION END ### [ 141s] [ 141s] sheep82 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:58:26 UTC 2019. [ 141s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 01:59:48 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 01:59:48 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_10/i586 In-Reply-To: References: Message-ID: <5dbf8621b591e_751f2b0ec3e165fc792522@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_10/i586 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 454s] Making all in src [ 454s] make[2]: Entering directory '/usr/src/packages/BUILD/src' [ 454s] g++ -DPACKAGE_NAME=\"osmo-pcu\" -DPACKAGE_TARNAME=\"osmo-pcu\" -DPACKAGE_VERSION=\"0.7.0.38-05bc\" -DPACKAGE_STRING=\"osmo-pcu\ 0.7.0.38-05bc\" -DPACKAGE_BUGREPORT=\"osmocom-net-gprs at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"osmo-pcu\" -DVERSION=\"0.7.0.38-05bc\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -I. -I../include -Wall -pthread -I/usr/include/ -fno-strict-aliasing -I/usr/include/ -I/usr/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ldl -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++03 -c -o pcu_main.o pcu_main.cpp [ 455s] In file included from /usr/include/osmocom/gsm/gsm_utils.h:33, [ 455s] from ./pcu_l1_if.h:31, [ 455s] from pcu_main.cpp:20: [ 455s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 455s] enum gsm_band; [ 455s] ^~~~~~~~ [ 455s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 455s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 455s] ^~~~~~~~ [ 455s] make[2]: *** [Makefile:823: pcu_main.o] Error 1 [ 455s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 455s] make[1]: *** [Makefile:411: all-recursive] Error 1 [ 455s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 455s] dh_auto_build: make -j1 returned exit code 2 [ 455s] make: *** [debian/rules:12: build] Error 2 [ 455s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 455s] [ 455s] lamb26 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:59:30 UTC 2019. [ 455s] [ 455s] ### VM INTERACTION START ### [ 458s] [ 437.898836] sysrq: SysRq : Power Off [ 458s] [ 437.910646] reboot: Power down [ 459s] ### VM INTERACTION END ### [ 459s] [ 459s] lamb26 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 01:59:35 UTC 2019. [ 459s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 02:00:22 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 02:00:22 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_18.04/x86_64 In-Reply-To: References: Message-ID: <5dbf863e99be2_751f2b0ec3e165fc7927ec@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_18.04/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_18.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 336s] from /usr/include/osmocom/gprs/gprs_bssgp.h:9, [ 336s] from ./gprs_bssgp_pcu.h:32, [ 336s] from gprs_bssgp_pcu.cpp:22: [ 336s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 336s] enum gsm_band; [ 336s] ^~~~~~~~ [ 336s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 336s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 336s] ^~~~~~~~ [ 336s] Makefile:805: recipe for target 'gprs_bssgp_pcu.lo' failed [ 336s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 336s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 336s] Makefile:411: recipe for target 'all-recursive' failed [ 336s] make[1]: *** [all-recursive] Error 1 [ 336s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 336s] dh_auto_build: make -j1 returned exit code 2 [ 336s] debian/rules:12: recipe for target 'build' failed [ 336s] make: *** [build] Error 2 [ 336s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 336s] [ 336s] lamb23 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:00:06 UTC 2019. [ 336s] [ 336s] ### VM INTERACTION START ### [ 339s] [ 322.352710] sysrq: SysRq : Power Off [ 339s] [ 322.358371] reboot: Power down [ 339s] ### VM INTERACTION END ### [ 339s] [ 339s] lamb23 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:00:10 UTC 2019. [ 339s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 02:01:31 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 02:01:31 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_18.10/x86_64 In-Reply-To: References: Message-ID: <5dbf869a2a0b8_751f2b0ec3e165fc79303d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_18.10/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_18.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 199s] Making all in src [ 199s] make[2]: Entering directory '/usr/src/packages/BUILD/src' [ 199s] g++ -DPACKAGE_NAME=\"osmo-pcu\" -DPACKAGE_TARNAME=\"osmo-pcu\" -DPACKAGE_VERSION=\"0.7.0.38-05bc\" -DPACKAGE_STRING=\"osmo-pcu\ 0.7.0.38-05bc\" -DPACKAGE_BUGREPORT=\"osmocom-net-gprs at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"osmo-pcu\" -DVERSION=\"0.7.0.38-05bc\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -I. -I../include -Wall -pthread -I/usr/include/ -fno-strict-aliasing -I/usr/include/ -I/usr/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ldl -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++03 -c -o pcu_main.o pcu_main.cpp [ 199s] In file included from /usr/include/osmocom/gsm/gsm_utils.h:33, [ 199s] from ./pcu_l1_if.h:31, [ 200s] from pcu_main.cpp:20: [ 200s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 200s] enum gsm_band; [ 200s] ^~~~~~~~ [ 200s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 200s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 200s] ^~~~~~~~ [ 200s] make[2]: *** [Makefile:823: pcu_main.o] Error 1 [ 200s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 200s] make[1]: *** [Makefile:411: all-recursive] Error 1 [ 200s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 200s] dh_auto_build: make -j1 returned exit code 2 [ 200s] make: *** [debian/rules:12: build] Error 2 [ 200s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 200s] [ 200s] sheep81 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:01:24 UTC 2019. [ 200s] [ 200s] ### VM INTERACTION START ### [ 203s] [ 193.352755] sysrq: SysRq : Power Off [ 203s] [ 193.361304] reboot: Power down [ 203s] ### VM INTERACTION END ### [ 203s] [ 203s] sheep81 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:01:28 UTC 2019. [ 203s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 02:04:57 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 02:04:57 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5dbf875082a8c_751f2b0ec3e165fc7937cf@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 153s] from /usr/include/osmocom/gprs/gprs_bssgp.h:9, [ 153s] from ./gprs_bssgp_pcu.h:32, [ 153s] from gprs_bssgp_pcu.cpp:22: [ 153s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 153s] enum gsm_band; [ 153s] ^ [ 153s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 153s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 153s] ^ [ 153s] Makefile:793: recipe for target 'gprs_bssgp_pcu.lo' failed [ 153s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 153s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 153s] Makefile:399: recipe for target 'all-recursive' failed [ 153s] make[1]: *** [all-recursive] Error 1 [ 153s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 153s] dh_auto_build: make -j1 returned exit code 2 [ 153s] debian/rules:12: recipe for target 'build' failed [ 154s] make: *** [build] Error 2 [ 154s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 154s] [ 154s] lamb17 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:04:47 UTC 2019. [ 154s] [ 154s] ### VM INTERACTION START ### [ 155s] Powering off. [ 155s] [ 140.985388] reboot: Power down [ 155s] ### VM INTERACTION END ### [ 155s] [ 155s] lamb17 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:04:49 UTC 2019. [ 155s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 02:05:31 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 02:05:31 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_19.10/x86_64 In-Reply-To: References: Message-ID: <5dbf878a6f95f_751f2b0ec3e165fc793829@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_19.10/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_19.10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 532s] Making all in src [ 532s] make[2]: Entering directory '/usr/src/packages/BUILD/src' [ 532s] g++ -DPACKAGE_NAME=\"osmo-pcu\" -DPACKAGE_TARNAME=\"osmo-pcu\" -DPACKAGE_VERSION=\"0.7.0.38-05bc\" -DPACKAGE_STRING=\"osmo-pcu\ 0.7.0.38-05bc\" -DPACKAGE_BUGREPORT=\"osmocom-net-gprs at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"osmo-pcu\" -DVERSION=\"0.7.0.38-05bc\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -I. -I../include -Wall -pthread -I/usr/include/ -fno-strict-aliasing -I/usr/include/ -I/usr/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ldl -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++03 -c -o pcu_main.o pcu_main.cpp [ 533s] In file included from /usr/include/osmocom/gsm/gsm_utils.h:33, [ 533s] from ./pcu_l1_if.h:31, [ 533s] from pcu_main.cpp:20: [ 533s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 533s] 13 | enum gsm_band; [ 533s] | ^~~~~~~~ [ 533s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 533s] 77 | int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 533s] | ^~~~~~~~ [ 533s] make[2]: *** [Makefile:823: pcu_main.o] Error 1 [ 533s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 533s] make[1]: *** [Makefile:411: all-recursive] Error 1 [ 533s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 533s] dh_auto_build: make -j1 returned exit code 2 [ 533s] make: *** [debian/rules:12: build] Error 255 [ 533s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 533s] [ 533s] lamb62 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:05:25 UTC 2019. [ 533s] [ 533s] ### VM INTERACTION START ### [ 536s] [ 517.647821] sysrq: SysRq : Power Off [ 536s] [ 517.700270] reboot: Power down [ 536s] ### VM INTERACTION END ### [ 537s] [ 537s] lamb62 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:05:29 UTC 2019. [ 537s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 02:10:57 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 02:10:57 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/x86_64 In-Reply-To: References: Message-ID: <5dbf88b7e5ce8_751f2b0ec3e165fc794727@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 149s] from /usr/include/osmocom/gprs/gprs_bssgp.h:9, [ 149s] from ./gprs_bssgp_pcu.h:32, [ 149s] from gprs_bssgp_pcu.cpp:22: [ 149s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 149s] enum gsm_band; [ 149s] ^~~~~~~~ [ 149s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 149s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 149s] ^~~~~~~~ [ 149s] Makefile:805: recipe for target 'gprs_bssgp_pcu.lo' failed [ 149s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 149s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 149s] Makefile:411: recipe for target 'all-recursive' failed [ 149s] make[1]: *** [all-recursive] Error 1 [ 149s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 149s] dh_auto_build: make -j1 returned exit code 2 [ 149s] debian/rules:12: recipe for target 'build' failed [ 149s] make: *** [build] Error 2 [ 149s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 149s] [ 149s] build82 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:10:39 UTC 2019. [ 149s] [ 149s] ### VM INTERACTION START ### [ 153s] [ 139.424506] sysrq: SysRq : Power Off [ 153s] [ 139.427189] reboot: Power down [ 153s] ### VM INTERACTION END ### [ 153s] [ 153s] build82 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:10:43 UTC 2019. [ 153s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 02:12:22 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 02:12:22 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in xUbuntu_19.04/x86_64 In-Reply-To: References: Message-ID: <5dbf891078445_751f2b0ec3e165fc795245@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/xUbuntu_19.04/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in xUbuntu_19.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 886s] Making all in src [ 886s] make[2]: Entering directory '/usr/src/packages/BUILD/src' [ 886s] g++ -DPACKAGE_NAME=\"osmo-pcu\" -DPACKAGE_TARNAME=\"osmo-pcu\" -DPACKAGE_VERSION=\"0.7.0.38-05bc\" -DPACKAGE_STRING=\"osmo-pcu\ 0.7.0.38-05bc\" -DPACKAGE_BUGREPORT=\"osmocom-net-gprs at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"osmo-pcu\" -DVERSION=\"0.7.0.38-05bc\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -I. -I../include -Wall -pthread -I/usr/include/ -fno-strict-aliasing -I/usr/include/ -I/usr/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ldl -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++03 -c -o pcu_main.o pcu_main.cpp [ 886s] In file included from /usr/include/osmocom/gsm/gsm_utils.h:33, [ 886s] from ./pcu_l1_if.h:31, [ 886s] from pcu_main.cpp:20: [ 886s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 886s] enum gsm_band; [ 886s] ^~~~~~~~ [ 886s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 886s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 886s] ^~~~~~~~ [ 886s] make[2]: *** [Makefile:823: pcu_main.o] Error 1 [ 886s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 886s] make[1]: *** [Makefile:411: all-recursive] Error 1 [ 886s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 886s] dh_auto_build: make -j1 returned exit code 2 [ 886s] make: *** [debian/rules:12: build] Error 2 [ 886s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 886s] [ 886s] build35 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:11:50 UTC 2019. [ 886s] [ 886s] ### VM INTERACTION START ### [ 889s] [ 805.818002] sysrq: SysRq : Power Off [ 889s] [ 805.841375] reboot: Power down [ 916s] ### VM INTERACTION END ### [ 916s] [ 916s] build35 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:12:20 UTC 2019. [ 916s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 02:12:57 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 02:12:57 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_10/x86_64 In-Reply-To: References: Message-ID: <5dbf892c2ef19_751f2b0ec3e165fc7953b3@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_10/x86_64 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_10/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 268s] Making all in src [ 269s] make[2]: Entering directory '/usr/src/packages/BUILD/src' [ 269s] g++ -DPACKAGE_NAME=\"osmo-pcu\" -DPACKAGE_TARNAME=\"osmo-pcu\" -DPACKAGE_VERSION=\"0.7.0.38-05bc\" -DPACKAGE_STRING=\"osmo-pcu\ 0.7.0.38-05bc\" -DPACKAGE_BUGREPORT=\"osmocom-net-gprs at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"osmo-pcu\" -DVERSION=\"0.7.0.38-05bc\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -I. -I../include -Wall -pthread -I/usr/include/ -fno-strict-aliasing -I/usr/include/ -I/usr/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ldl -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++03 -c -o pcu_main.o pcu_main.cpp [ 269s] In file included from /usr/include/osmocom/gsm/gsm_utils.h:33, [ 269s] from ./pcu_l1_if.h:31, [ 269s] from pcu_main.cpp:20: [ 269s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 269s] enum gsm_band; [ 269s] ^~~~~~~~ [ 269s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 269s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 269s] ^~~~~~~~ [ 269s] make[2]: *** [Makefile:823: pcu_main.o] Error 1 [ 269s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 269s] make[1]: *** [Makefile:411: all-recursive] Error 1 [ 269s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 269s] dh_auto_build: make -j1 returned exit code 2 [ 269s] make: *** [debian/rules:12: build] Error 2 [ 269s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 269s] [ 269s] build31 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:12:47 UTC 2019. [ 269s] [ 269s] ### VM INTERACTION START ### [ 272s] [ 252.450809] sysrq: SysRq : Power Off [ 272s] [ 252.462567] reboot: Power down [ 273s] ### VM INTERACTION END ### [ 273s] [ 273s] build31 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:12:52 UTC 2019. [ 273s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 02:22:05 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 02:22:05 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/aarch64 In-Reply-To: References: Message-ID: <5dbf8b6642454_751f2b0ec3e165fc798067@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/aarch64 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 485s] from /usr/include/osmocom/gprs/gprs_bssgp.h:9, [ 485s] from ./gprs_bssgp_pcu.h:32, [ 485s] from gprs_bssgp_pcu.cpp:22: [ 485s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 485s] enum gsm_band; [ 485s] ^~~~~~~~ [ 485s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 485s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 485s] ^~~~~~~~ [ 485s] Makefile:805: recipe for target 'gprs_bssgp_pcu.lo' failed [ 485s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 485s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 485s] Makefile:411: recipe for target 'all-recursive' failed [ 485s] make[1]: *** [all-recursive] Error 1 [ 485s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 485s] dh_auto_build: make -j1 returned exit code 2 [ 485s] debian/rules:12: recipe for target 'build' failed [ 485s] make: *** [build] Error 2 [ 485s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 485s] [ 485s] obs-arm-3 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:21:52 UTC 2019. [ 485s] [ 485s] ### VM INTERACTION START ### [ 488s] [ 458.038614] sysrq: SysRq : Power Off [ 489s] [ 458.055115] reboot: Power down [ 489s] ### VM INTERACTION END ### [ 489s] [ 489s] obs-arm-3 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:21:55 UTC 2019. [ 489s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 02:25:14 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 02:25:14 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_10/aarch64 In-Reply-To: References: Message-ID: <5dbf8c1ade69c_751f2b0ec3e165fc7984ba@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_10/aarch64 Package network:osmocom:nightly/osmo-pcu failed to build in Debian_10/aarch64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 290s] Making all in src [ 290s] make[2]: Entering directory '/usr/src/packages/BUILD/src' [ 290s] g++ -DPACKAGE_NAME=\"osmo-pcu\" -DPACKAGE_TARNAME=\"osmo-pcu\" -DPACKAGE_VERSION=\"0.7.0.38-05bc\" -DPACKAGE_STRING=\"osmo-pcu\ 0.7.0.38-05bc\" -DPACKAGE_BUGREPORT=\"osmocom-net-gprs at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"osmo-pcu\" -DVERSION=\"0.7.0.38-05bc\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -I. -I../include -Wall -pthread -I/usr/include/ -fno-strict-aliasing -I/usr/include/ -I/usr/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ldl -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++03 -c -o pcu_main.o pcu_main.cpp [ 290s] In file included from /usr/include/osmocom/gsm/gsm_utils.h:33, [ 290s] from ./pcu_l1_if.h:31, [ 290s] from pcu_main.cpp:20: [ 290s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 290s] enum gsm_band; [ 290s] ^~~~~~~~ [ 290s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 290s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 290s] ^~~~~~~~ [ 290s] make[2]: *** [Makefile:823: pcu_main.o] Error 1 [ 290s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 290s] make[1]: *** [Makefile:411: all-recursive] Error 1 [ 290s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 290s] dh_auto_build: make -j1 returned exit code 2 [ 290s] make: *** [debian/rules:12: build] Error 2 [ 290s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 290s] [ 290s] obs-arm-9 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:24:54 UTC 2019. [ 290s] [ 290s] ### VM INTERACTION START ### [ 293s] [ 278.785040] sysrq: Power Off [ 293s] [ 278.830393] reboot: Power down [ 294s] ### VM INTERACTION END ### [ 294s] [ 294s] obs-arm-9 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 02:24:58 UTC 2019. [ 294s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 06:30:39 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 06:30:39 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_9.0/armv7l In-Reply-To: References: Message-ID: <5dbfc5a455ca4_751f2b0ec3e165fc83151c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-pcu failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 504s] from /usr/include/osmocom/gprs/gprs_bssgp.h:9, [ 504s] from ./gprs_bssgp_pcu.h:32, [ 504s] from gprs_bssgp_pcu.cpp:22: [ 504s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 504s] enum gsm_band; [ 504s] ^~~~~~~~ [ 504s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 504s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 504s] ^~~~~~~~ [ 505s] Makefile:805: recipe for target 'gprs_bssgp_pcu.lo' failed [ 505s] make[2]: *** [gprs_bssgp_pcu.lo] Error 1 [ 505s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 505s] Makefile:411: recipe for target 'all-recursive' failed [ 505s] make[1]: *** [all-recursive] Error 1 [ 505s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 505s] dh_auto_build: make -j1 returned exit code 2 [ 505s] debian/rules:12: recipe for target 'build' failed [ 505s] make: *** [build] Error 2 [ 505s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 505s] [ 505s] armbuild18 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 06:30:31 UTC 2019. [ 505s] [ 505s] ### VM INTERACTION START ### [ 508s] [ 459.905270] sysrq: SysRq : Power Off [ 508s] [ 459.907614] reboot: Power down [ 508s] ### VM INTERACTION END ### [ 508s] [ 508s] armbuild18 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 06:30:35 UTC 2019. [ 508s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 06:35:31 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 06:35:31 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5dbfc6cd29351_751f2b0ec3e165fc83208f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Raspbian_10/armv7l Package network:osmocom:nightly/osmo-pcu failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 439s] Making all in src [ 439s] make[2]: Entering directory '/usr/src/packages/BUILD/src' [ 439s] g++ -DPACKAGE_NAME=\"osmo-pcu\" -DPACKAGE_TARNAME=\"osmo-pcu\" -DPACKAGE_VERSION=\"0.7.0.38-05bc\" -DPACKAGE_STRING=\"osmo-pcu\ 0.7.0.38-05bc\" -DPACKAGE_BUGREPORT=\"osmocom-net-gprs at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"osmo-pcu\" -DVERSION=\"0.7.0.38-05bc\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -I. -I../include -Wall -pthread -I/usr/include/ -fno-strict-aliasing -I/usr/include/ -I/usr/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ldl -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++03 -c -o pcu_main.o pcu_main.cpp [ 440s] In file included from /usr/include/osmocom/gsm/gsm_utils.h:33, [ 440s] from ./pcu_l1_if.h:31, [ 440s] from pcu_main.cpp:20: [ 440s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 440s] enum gsm_band; [ 440s] ^~~~~~~~ [ 440s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 440s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 440s] ^~~~~~~~ [ 440s] make[2]: *** [Makefile:823: pcu_main.o] Error 1 [ 440s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 440s] make[1]: *** [Makefile:411: all-recursive] Error 1 [ 440s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 440s] dh_auto_build: make -j1 returned exit code 2 [ 440s] make: *** [debian/rules:12: build] Error 2 [ 440s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 440s] [ 440s] armbuild25 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 06:35:19 UTC 2019. [ 440s] [ 440s] ### VM INTERACTION START ### [ 443s] [ 412.122595] sysrq: SysRq : Power Off [ 443s] [ 412.124747] reboot: Power down [ 444s] ### VM INTERACTION END ### [ 444s] [ 444s] armbuild25 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 06:35:22 UTC 2019. [ 444s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 4 07:23:14 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 04 Nov 2019 07:23:14 +0000 Subject: Build failure of network:osmocom:nightly/osmo-pcu in Debian_10/armv7l In-Reply-To: References: Message-ID: <5dbfd1f26d4a9_751f2b0ec3e165fc837321@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-pcu/Debian_10/armv7l Package network:osmocom:nightly/osmo-pcu failed to build in Debian_10/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-pcu Last lines of build log: [ 624s] Making all in src [ 624s] make[2]: Entering directory '/usr/src/packages/BUILD/src' [ 624s] g++ -DPACKAGE_NAME=\"osmo-pcu\" -DPACKAGE_TARNAME=\"osmo-pcu\" -DPACKAGE_VERSION=\"0.7.0.38-05bc\" -DPACKAGE_STRING=\"osmo-pcu\ 0.7.0.38-05bc\" -DPACKAGE_BUGREPORT=\"osmocom-net-gprs at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"osmo-pcu\" -DVERSION=\"0.7.0.38-05bc\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -I. -I../include -Wall -pthread -I/usr/include/ -fno-strict-aliasing -I/usr/include/ -I/usr/include/ -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -ldl -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++03 -c -o pcu_main.o pcu_main.cpp [ 625s] In file included from /usr/include/osmocom/gsm/gsm_utils.h:33, [ 625s] from ./pcu_l1_if.h:31, [ 625s] from pcu_main.cpp:20: [ 625s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:13:6: error: use of enum 'gsm_band' without previous declaration [ 625s] enum gsm_band; [ 625s] ^~~~~~~~ [ 625s] /usr/include/osmocom/gsm/protocol/gsm_04_08.h:77:46: error: use of enum 'gsm_band' without previous declaration [ 625s] int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); [ 625s] ^~~~~~~~ [ 625s] make[2]: *** [Makefile:823: pcu_main.o] Error 1 [ 625s] make[2]: Leaving directory '/usr/src/packages/BUILD/src' [ 625s] make[1]: *** [Makefile:411: all-recursive] Error 1 [ 625s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 625s] dh_auto_build: make -j1 returned exit code 2 [ 625s] make: *** [debian/rules:12: build] Error 2 [ 625s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 625s] [ 625s] armbuild24 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 07:23:02 UTC 2019. [ 625s] [ 625s] ### VM INTERACTION START ### [ 628s] [ 588.560820] sysrq: SysRq : Power Off [ 628s] [ 588.602431] reboot: Power down [ 629s] ### VM INTERACTION END ### [ 629s] [ 629s] armbuild24 failed "build osmo-pcu_0.7.0.38.05bc.dsc" at Mon Nov 4 07:23:05 UTC 2019. [ 629s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Nov 4 09:50:47 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 4 Nov 2019 09:50:47 +0000 Subject: Change in osmo-hlr[master]: fix upgrade to version 2: imei column default value In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15911 ) Change subject: fix upgrade to version 2: imei column default value ...................................................................... Patch Set 1: Code-Review+2 > Patch Set 1: > > (1 comment) > > Adding Oliver, as he is the author of the related code (to my best knowledge). yep: https://gerrit.osmocom.org/c/osmo-hlr/+/12525 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15911 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I68a00014a3d603fcba8781470bc5285f78b538d0 Gerrit-Change-Number: 15911 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Mon, 04 Nov 2019 09:50:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 09:58:27 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 4 Nov 2019 09:58:27 +0000 Subject: Change in osmo-hlr[master]: add db_upgrade test In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15913 ) Change subject: add db_upgrade test ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I0961bab0e17cfde5b030576c5bc243c2b51d9dc4 Gerrit-Change-Number: 15913 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 09:58:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:05:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:05:55 +0000 Subject: Change in libosmocore[master]: gsm: Fix compilation error under some compilers References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15954 ) Change subject: gsm: Fix compilation error under some compilers ...................................................................... gsm: Fix compilation error under some compilers Some compilers don't like declaration of enums in header files like we do sometimes for structs: enum gsm_band; void foobar(enum gsm_band band); triggers: error: use of enum 'gsm_band' without previous declaration Fixes: b99f4ca2d8517d99cdf8aa183dbfda7b233bb781 Related: OS#4244 Change-Id: I6c2102c763f565bbe3c8dd7e5b4e04c4a45fff67 --- M include/osmocom/gsm/gsm_utils.h M include/osmocom/gsm/protocol/gsm_04_08.h 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/54/15954/1 diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 7a5da9a..38a3f6e 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -30,7 +30,6 @@ #include #include -#include #define ADD_MODULO(sum, delta, modulo) do { \ if ((sum += delta) >= modulo) \ diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index b5317d5..68ec4e3 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -9,8 +9,9 @@ #include #include +#include + struct gsm_lchan; -enum gsm_band; /* Chapter 10.5.1.5 */ struct gsm48_classmark1 { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15954 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6c2102c763f565bbe3c8dd7e5b4e04c4a45fff67 Gerrit-Change-Number: 15954 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:09:28 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:09:28 +0000 Subject: Change in osmo-msc[master]: rtp_stream: sanely cancel MGW endpoint FSM notify In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15851 ) Change subject: rtp_stream: sanely cancel MGW endpoint FSM notify ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15851 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I351bb8e8fbc46eb629bcd599f6453e2c84c15015 Gerrit-Change-Number: 15851 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:09:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:09:32 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 4 Nov 2019 10:09:32 +0000 Subject: Change in libosmocore[master]: gsm: Fix compilation error under some compilers In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15954 ) Change subject: gsm: Fix compilation error under some compilers ...................................................................... Patch Set 1: Code-Review+2 Notably this is currently breaking master-osmo-pcu in jenkins. https://jenkins.osmocom.org/jenkins/job/master-osmo-pcu/FIRMWARE_VERSION=master,WITH_MANUALS=0,label=osmocom-master-debian9,with_dsp=sysmo,with_vty=True/2026/console -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15954 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6c2102c763f565bbe3c8dd7e5b4e04c4a45fff67 Gerrit-Change-Number: 15954 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Mon, 04 Nov 2019 10:09:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:10:16 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:10:16 +0000 Subject: Change in osmo-msc[master]: use osmo_sockaddr_str_is_nonzero() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15852 ) Change subject: use osmo_sockaddr_str_is_nonzero() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15852 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I53ddb19a70fda3deb906464e1b89c12d9b4c7cbd Gerrit-Change-Number: 15852 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:10:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:10:41 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:10:41 +0000 Subject: Change in osmo-msc[master]: CC: add error handling for CRCX responses In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15853 ) Change subject: CC: add error handling for CRCX responses ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15853 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8313bed1d782100bebeac7d8fc040557c4cb653e Gerrit-Change-Number: 15853 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:10:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:11:24 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:11:24 +0000 Subject: Change in osmo-msc[master]: add msc_log_to_ladder.py In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15944 ) Change subject: add msc_log_to_ladder.py ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2e4d8778f7b83dee558517a9b23450b817ee325d Gerrit-Change-Number: 15944 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:11:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:11:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:11:31 +0000 Subject: Change in libosmocore[master]: gsm: Fix compilation error under some compilers In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15954 ) Change subject: gsm: Fix compilation error under some compilers ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15954 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6c2102c763f565bbe3c8dd7e5b4e04c4a45fff67 Gerrit-Change-Number: 15954 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 04 Nov 2019 10:11:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:11:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:11:32 +0000 Subject: Change in libosmocore[master]: gsm: Fix compilation error under some compilers In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15954 ) Change subject: gsm: Fix compilation error under some compilers ...................................................................... gsm: Fix compilation error under some compilers Some compilers don't like declaration of enums in header files like we do sometimes for structs: enum gsm_band; void foobar(enum gsm_band band); triggers: error: use of enum 'gsm_band' without previous declaration Fixes: b99f4ca2d8517d99cdf8aa183dbfda7b233bb781 Related: OS#4244 Change-Id: I6c2102c763f565bbe3c8dd7e5b4e04c4a45fff67 --- M include/osmocom/gsm/gsm_utils.h M include/osmocom/gsm/protocol/gsm_04_08.h 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: osmith: Looks good to me, approved laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 7a5da9a..38a3f6e 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -30,7 +30,6 @@ #include #include -#include #define ADD_MODULO(sum, delta, modulo) do { \ if ((sum += delta) >= modulo) \ diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index b5317d5..68ec4e3 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -9,8 +9,9 @@ #include #include +#include + struct gsm_lchan; -enum gsm_band; /* Chapter 10.5.1.5 */ struct gsm48_classmark1 { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15954 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6c2102c763f565bbe3c8dd7e5b4e04c4a45fff67 Gerrit-Change-Number: 15954 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:11:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:11:59 +0000 Subject: Change in osmo-msc[master]: add msc_log_to_ladder.py In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15944 ) Change subject: add msc_log_to_ladder.py ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2e4d8778f7b83dee558517a9b23450b817ee325d Gerrit-Change-Number: 15944 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:11:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:12:09 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:12:09 +0000 Subject: Change in osmo-msc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15850 ) Change subject: fsm: use deferred deallocation ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15850 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I08c03946605aa12e0a5ce8b3c773704ef5327a7a Gerrit-Change-Number: 15850 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:12:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:12:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:12:14 +0000 Subject: Change in osmo-msc[master]: rtp_stream: sanely cancel MGW endpoint FSM notify In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15851 ) Change subject: rtp_stream: sanely cancel MGW endpoint FSM notify ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15851 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I351bb8e8fbc46eb629bcd599f6453e2c84c15015 Gerrit-Change-Number: 15851 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:12:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:12:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:12:29 +0000 Subject: Change in osmo-msc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15850 ) Change subject: fsm: use deferred deallocation ...................................................................... fsm: use deferred deallocation Since osmo-bsc uses the MGCP client FSMs, it is required to enable this new feature to guarantee safe operation. The issue is described in detail in commit logs linked below. Notably, osmo-msc currently chooses to omit error handling during MGCP events (marked "FIXME"). An upcoming patch implements this error handling, and would make osmo-msc vulnerable to crash from unexpected MGCP messages without this. Deferred FSM deallocation is a more general, simpler approach to osmo_fsm_term_safely(), so we can switch that off now. Depends: Ief4dba9ea587c9b4aea69993e965fbb20fb80e78 (libosmocore), I0adc13a1a998e953b6c850efa2761350dd07e03a (libosmocore) Related: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 (osmo-mgw) Change-Id: I08c03946605aa12e0a5ce8b3c773704ef5327a7a --- M src/osmo-msc/msc_main.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c index 3860589..43a1fcb 100644 --- a/src/osmo-msc/msc_main.c +++ b/src/osmo-msc/msc_main.c @@ -500,7 +500,7 @@ /* Track the use of talloc NULL memory contexts */ talloc_enable_null_tracking(); - osmo_fsm_term_safely(true); + osmo_fsm_set_dealloc_ctx(OTC_SELECT); msc_vty_info.copyright = osmomsc_copyright; @@ -721,7 +721,7 @@ while (!quit) { log_reset_context(); - osmo_select_main(0); + osmo_select_main_ctx(0); } msc_network_shutdown(msc_network); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15850 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I08c03946605aa12e0a5ce8b3c773704ef5327a7a Gerrit-Change-Number: 15850 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:12:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:12:29 +0000 Subject: Change in osmo-msc[master]: rtp_stream: sanely cancel MGW endpoint FSM notify In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15851 ) Change subject: rtp_stream: sanely cancel MGW endpoint FSM notify ...................................................................... rtp_stream: sanely cancel MGW endpoint FSM notify libosmo-mgcp-client recently introduced osmo_mgcpc_ep_cancel_notify() to cancel notification if a notify target FSM deallocates. Use it for sanity in rtp_stream FSM cleanup, the notify target for endpoint FSMs. Depends: I41687d7f3a808587ab7f7520f46dcc3c29cff92d (osmo-mgw) I14f7a46031327fb2b2047b998eae6ad0bb7324ad (osmo-mgw) Change-Id: I351bb8e8fbc46eb629bcd599f6453e2c84c15015 --- M src/libmsc/rtp_stream.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/libmsc/rtp_stream.c b/src/libmsc/rtp_stream.c index c3880bf..d78743e 100644 --- a/src/libmsc/rtp_stream.c +++ b/src/libmsc/rtp_stream.c @@ -220,6 +220,7 @@ { struct rtp_stream *rtps = fi->priv; if (rtps->ci) { + osmo_mgcpc_ep_cancel_notify(osmo_mgcpc_ep_ci_ep(rtps->ci), fi); osmo_mgcpc_ep_ci_dlcx(rtps->ci); rtps->ci = NULL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15851 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I351bb8e8fbc46eb629bcd599f6453e2c84c15015 Gerrit-Change-Number: 15851 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:12:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:12:30 +0000 Subject: Change in osmo-msc[master]: use osmo_sockaddr_str_is_nonzero() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15852 ) Change subject: use osmo_sockaddr_str_is_nonzero() ...................................................................... use osmo_sockaddr_str_is_nonzero() Also regard an RTP port as invalid if the IP address is 0.0.0.0. Achieve this by using osmo_sockaddr_str_is_nonzero() instead of osmo_sockaddr_str_is_set(). Depends: I73cbcab90cffcdc9a5f8d5281c57c1f87b2c3550 (libosmocore) Change-Id: I53ddb19a70fda3deb906464e1b89c12d9b4c7cbd --- M src/libmsc/call_leg.c M src/libmsc/mncc_call.c M src/libmsc/msc_ho.c M src/libmsc/msc_t.c M src/libmsc/ran_msg_a.c M src/libmsc/rtp_stream.c 6 files changed, 19 insertions(+), 19 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c index 794eda2..b1d0b1e 100644 --- a/src/libmsc/call_leg.c +++ b/src/libmsc/call_leg.c @@ -301,7 +301,7 @@ rtps = cl->rtp[dir]; if (!rtps) return NULL; - if (!osmo_sockaddr_str_is_set(&rtps->local)) + if (!osmo_sockaddr_str_is_nonzero(&rtps->local)) return NULL; return &rtps->local; } @@ -327,7 +327,7 @@ } if (codec_if_known) rtp_stream_set_codec(cl->rtp[dir], *codec_if_known); - if (remote_addr_if_known && osmo_sockaddr_str_is_set(remote_addr_if_known)) + if (remote_addr_if_known && osmo_sockaddr_str_is_nonzero(remote_addr_if_known)) rtp_stream_set_remote_addr(cl->rtp[dir], remote_addr_if_known); return rtp_stream_ensure_ci(cl->rtp[dir], cl->mgw_endpoint); } diff --git a/src/libmsc/mncc_call.c b/src/libmsc/mncc_call.c index 5ca91d0..34c7299 100644 --- a/src/libmsc/mncc_call.c +++ b/src/libmsc/mncc_call.c @@ -256,7 +256,7 @@ return true; } - if (!osmo_sockaddr_str_is_set(&mncc_call->rtps->local)) { + if (!osmo_sockaddr_str_is_nonzero(&mncc_call->rtps->local)) { LOG_MNCC_CALL(mncc_call, LOGL_DEBUG, "Got RTP_CREATE, but RTP stream has no local address\n"); return true; } @@ -294,7 +294,7 @@ static bool mncc_call_tx_rtp_create(struct mncc_call *mncc_call) { - if (!mncc_call->rtps || !osmo_sockaddr_str_is_set(&mncc_call->rtps->local)) { + if (!mncc_call->rtps || !osmo_sockaddr_str_is_nonzero(&mncc_call->rtps->local)) { mncc_call_error(mncc_call, "Cannot send RTP_CREATE, no local RTP address set up\n"); return false; } diff --git a/src/libmsc/msc_ho.c b/src/libmsc/msc_ho.c index 615b8cd..99f37b6 100644 --- a/src/libmsc/msc_ho.c +++ b/src/libmsc/msc_ho.c @@ -661,7 +661,7 @@ } msc_a->ho.new_cell.ran_remote_rtp = hra->ran_dec->handover_request_ack.remote_rtp; - if (osmo_sockaddr_str_is_set(&msc_a->ho.new_cell.ran_remote_rtp)) { + if (osmo_sockaddr_str_is_nonzero(&msc_a->ho.new_cell.ran_remote_rtp)) { LOG_HO(msc_a, LOGL_DEBUG, "Request Ack contains cell's RTP address " OSMO_SOCKADDR_STR_FMT "\n", OSMO_SOCKADDR_STR_FMT_ARGS(&msc_a->ho.new_cell.ran_remote_rtp)); } @@ -684,7 +684,7 @@ return; } - if (!osmo_sockaddr_str_is_set(&msc_a->ho.new_cell.ran_remote_rtp)) { + if (!osmo_sockaddr_str_is_nonzero(&msc_a->ho.new_cell.ran_remote_rtp)) { LOG_HO(msc_a, LOGL_DEBUG, "New cell's RTP IP:port not yet known, not switching RTP stream\n"); return; } @@ -738,7 +738,7 @@ return; } - if (!osmo_sockaddr_str_is_set(&msc_a->ho.old_cell.ran_remote_rtp)) { + if (!osmo_sockaddr_str_is_nonzero(&msc_a->ho.old_cell.ran_remote_rtp)) { LOG_HO(msc_a, LOGL_DEBUG, "Have no RTP IP:port for the old cell, not switching back to\n"); return; } diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c index 6b96c26..af0ddaa 100644 --- a/src/libmsc/msc_t.c +++ b/src/libmsc/msc_t.c @@ -444,7 +444,7 @@ /* Also need to fetch the RTP IP:port from AoIP Transport Address IE to tell the MGW about it */ if (rtp_ran) { - if (osmo_sockaddr_str_is_set(&r->remote_rtp)) { + if (osmo_sockaddr_str_is_nonzero(&r->remote_rtp)) { LOG_MSC_T(msc_t, LOGL_DEBUG, "From Handover Request Ack, got " OSMO_SOCKADDR_STR_FMT "\n", OSMO_SOCKADDR_STR_FMT_ARGS(&r->remote_rtp)); rtp_stream_set_remote_addr(rtp_ran, &r->remote_rtp); diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index fa0335c..fc9a9d7 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -942,7 +942,7 @@ use_scl = &scl; /* Package RTP-Address data */ - if (osmo_sockaddr_str_is_set(ac->cn_rtp)) { + if (osmo_sockaddr_str_is_nonzero(ac->cn_rtp)) { struct sockaddr_in rtp_addr_in; memset(&rtp_addr_in, 0, sizeof(rtp_addr_in)); @@ -1114,7 +1114,7 @@ if (n->classmark) r.classmark_information = *n->classmark; - if (osmo_sockaddr_str_is_set(n->rtp_ran_local)) { + if (osmo_sockaddr_str_is_nonzero(n->rtp_ran_local)) { if (osmo_sockaddr_str_to_sockaddr(n->rtp_ran_local, &ss)) { LOG_RAN_A_ENC(log_fi, LOGL_ERROR, "Handover Request: invalid AoIP Transport Layer address/port: " @@ -1139,7 +1139,7 @@ .chosen_speech_version = r->chosen_speech_version, }; - if (osmo_sockaddr_str_is_set(&r->remote_rtp)) { + if (osmo_sockaddr_str_is_nonzero(&r->remote_rtp)) { osmo_sockaddr_str_to_sockaddr(&r->remote_rtp, &ss); params.aoip_transport_layer = &ss; } diff --git a/src/libmsc/rtp_stream.c b/src/libmsc/rtp_stream.c index d78743e..2902520 100644 --- a/src/libmsc/rtp_stream.c +++ b/src/libmsc/rtp_stream.c @@ -74,7 +74,7 @@ OSMO_STRBUF_PRINTF(sb, ":no-CI"); } else { OSMO_STRBUF_PRINTF(sb, ":CI-%s", osmo_mgcpc_ep_ci_id(rtps->ci)); - if (!osmo_sockaddr_str_is_set(&rtps->remote)) + if (!osmo_sockaddr_str_is_nonzero(&rtps->remote)) OSMO_STRBUF_PRINTF(sb, ":no-remote-port"); else if (!rtps->remote_sent_to_mgw) OSMO_STRBUF_PRINTF(sb, ":remote-port-not-sent"); @@ -89,9 +89,9 @@ OSMO_STRBUF_PRINTF(sb, ":remote-osmux-cid-not-sent"); } } - if (osmo_sockaddr_str_is_set(&rtps->local)) + if (osmo_sockaddr_str_is_nonzero(&rtps->local)) OSMO_STRBUF_PRINTF(sb, ":local-%s-%u", rtps->local.ip, rtps->local.port); - if (osmo_sockaddr_str_is_set(&rtps->remote)) + if (osmo_sockaddr_str_is_nonzero(&rtps->remote)) OSMO_STRBUF_PRINTF(sb, ":remote-%s-%u", rtps->remote.ip, rtps->remote.port); if (rtps->use_osmux) OSMO_STRBUF_PRINTF(sb, ":osmux-%d-%d", rtps->local_osmux_cid, rtps->remote_osmux_cid); @@ -137,8 +137,8 @@ static void check_established(struct rtp_stream *rtps) { if (rtps->fi->state != RTP_STREAM_ST_ESTABLISHED - && osmo_sockaddr_str_is_set(&rtps->local) - && osmo_sockaddr_str_is_set(&rtps->remote) + && osmo_sockaddr_str_is_nonzero(&rtps->local) + && osmo_sockaddr_str_is_nonzero(&rtps->remote) && rtps->remote_sent_to_mgw && (!rtps->use_osmux || rtps->remote_osmux_cid_sent_to_mgw) && rtps->codec_known) @@ -172,7 +172,7 @@ check_established(rtps); if ((!rtps->remote_sent_to_mgw || !rtps->codec_sent_to_mgw) - && osmo_sockaddr_str_is_set(&rtps->remote) + && osmo_sockaddr_str_is_nonzero(&rtps->remote) && (!rtps->use_osmux || rtps->remote_osmux_cid_sent_to_mgw) && rtps->codec_known) { LOG_RTPS(rtps, LOGL_DEBUG, @@ -315,7 +315,7 @@ verb_info.codecs_len = 1; rtps->codec_sent_to_mgw = true; } - if (osmo_sockaddr_str_is_set(&rtps->remote)) { + if (osmo_sockaddr_str_is_nonzero(&rtps->remote)) { int rc = osmo_strlcpy(verb_info.addr, rtps->remote.ip, sizeof(verb_info.addr)); if (rc <= 0 || rc >= sizeof(verb_info.addr)) { LOG_RTPS(rtps, LOGL_ERROR, "Failure to write IP address to MGCP message (rc=%d)\n", rc); @@ -365,7 +365,7 @@ LOG_RTPS(rtps, LOGL_DEBUG, "Not committing: no MGW endpoint CI set up\n"); return -1; } - if (!osmo_sockaddr_str_is_set(&rtps->remote)) { + if (!osmo_sockaddr_str_is_nonzero(&rtps->remote)) { LOG_RTPS(rtps, LOGL_DEBUG, "Not committing: no remote RTP address known\n"); return -1; } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15852 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I53ddb19a70fda3deb906464e1b89c12d9b4c7cbd Gerrit-Change-Number: 15852 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:12:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:12:30 +0000 Subject: Change in osmo-msc[master]: CC: add error handling for CRCX responses In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15853 ) Change subject: CC: add error handling for CRCX responses ...................................................................... CC: add error handling for CRCX responses Fix three 'FIXME: ERROR HANDLING' occurences in the code that reacts upon the MGW providing (or failing to provide) an RTP port for the RAN side. From an earlier stage of the code, the cleanup for this situation was extremely complex, and hence the choice was to simply wait for the call to time out and fail. But since we have implemented safe deallocation of nested FSMs in libosmocore, the situation has become rather trivial: simply free the CC transactions, and all the rest will immediately release, and terminate correctly without crashing. A ttcn3 test for this is MSC_Tests:TC_invalid_mgcp_crash, which actually also needs the change to osmo_sockaddr_str_is_nonzero() in preceding patch I53ddb19a70fda3deb906464e1b89c12d9b4c7cbd, so that a seemingly valid MGCP message ends up causing a failure in the on_success() branch of mgcp_client_endpoint_fsm.c. Change-Id: I8313bed1d782100bebeac7d8fc040557c4cb653e --- M src/libmsc/msc_a.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index d99088e..3c316ea 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -523,7 +523,7 @@ if (mncc_bearer_cap_to_channel_type(&channel_type, &cc_trans->bearer_cap)) { LOG_MSC_A(msc_a, LOGL_ERROR, "Cannot compose Channel Type from bearer capabilities\n"); - /* FIXME: ERROR HANDLING */ + trans_free(cc_trans); return; } @@ -539,7 +539,7 @@ }; if (msc_a_ran_down(msc_a, MSC_ROLE_I, &msg)) { LOG_MSC_A(msc_a, LOGL_ERROR, "Cannot send Assignment\n"); - /* FIXME: ERROR HANDLING */ + trans_free(cc_trans); return; } } @@ -548,7 +548,7 @@ { if (gsm48_tch_rtp_create(cc_trans)) { LOG_MSC_A(msc_a, LOGL_ERROR, "Cannot inform MNCC of RTP address\n"); - /* FIXME: ERROR HANDLING */ + trans_free(cc_trans); return; } } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15853 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8313bed1d782100bebeac7d8fc040557c4cb653e Gerrit-Change-Number: 15853 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:12:45 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:12:45 +0000 Subject: Change in osmo-msc[master]: charts: add full MO and MT voice call diagram In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15945 ) Change subject: charts: add full MO and MT voice call diagram ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8a907d6a4ece1f3ad78da75a8c3e3e76afd5418d Gerrit-Change-Number: 15945 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:12:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:12:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:12:47 +0000 Subject: Change in osmo-msc[master]: charts: add full MO and MT voice call diagram In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15945 ) Change subject: charts: add full MO and MT voice call diagram ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8a907d6a4ece1f3ad78da75a8c3e3e76afd5418d Gerrit-Change-Number: 15945 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:12:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:13:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:13:22 +0000 Subject: Change in osmo-msc[master]: add msc_log_to_ladder.py In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15944 ) Change subject: add msc_log_to_ladder.py ...................................................................... add msc_log_to_ladder.py Add script that reads in an osmo-msc log output and extracts the interesting information for displaying a sequence chart of voice call log, in mscgen format. I want to visualize how the sequence of messages changes across patches. It is error prone to do it manually, and re-doing the sequence chart for every patch (and patch rework) would be prohibitively time consuming. Change-Id: I2e4d8778f7b83dee558517a9b23450b817ee325d --- A doc/sequence_charts/msc_log_to_ladder.py 1 file changed, 724 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/doc/sequence_charts/msc_log_to_ladder.py b/doc/sequence_charts/msc_log_to_ladder.py new file mode 100755 index 0000000..1ceaeb6 --- /dev/null +++ b/doc/sequence_charts/msc_log_to_ladder.py @@ -0,0 +1,724 @@ +#!/usr/bin/env python3 +doc=r''' +Reading a log, it can be hard to figure out what is the important bit going on. +This is a tool that reads an osmo-msc log and tries to compose a ladder diagram from it automatically. +''' + +import argparse +import sys +import re +import tempfile +import os + +def error(*msg): + sys.stderr.write('%s\n' % (''.join(msg))) + exit(1) + +def quote(msg, quote='"'): + return '"%s"' % (msg.replace('"', r'\"')) + +class Entity: + def __init__(self, name, descr=None, attrs={}): + self.name = name + self.descr = descr + self.attrs = attrs + +class Arrow: + def __init__(self, mo_mt, left, arrow, right, descr=None, attrs={}, ran_conn=None, imsi=None, tmsi=None): + self.mo_mt = mo_mt + self.left = left + self.arrow = arrow + self.right = right + self.descr = descr + self.attrs = attrs + self.ran_conn = ran_conn + self.imsi = imsi + self.tmsi = tmsi + + def __repr__(self): + return 'Arrow(%s %s %s %s: %s IMSI=%s)' % (self.mo_mt, self.left, self.arrow, self.right, self.descr, self.imsi) + +class Separator: + def __init__(self): + self.separator = None + self.descr = None + self.attrs = {} + +class EmptyLine: + def __init__(self): + self.count = 1 + +MS = 'ms' +UE = 'ms' #'ue' +MS_UE_UNKNOWN = 'ms' #None +MSC = 'msc' +MGW = 'mgw' +SIP = 'sip' + +MO = 'mo' +MT = 'mt' +MO_MT_UNKNOWN = None + + +class OutputBase: + def __init__(self, write_to, start_with_re=None): + self._write_to = write_to + + self.start_with_re = None + if start_with_re is not None: + self.start_with_re = re.compile(start_with_re) + + def head(self): + self.writeln('# Generated by msc_log_to_ladder.py') + + def tail(self): + pass + + def render(self, diagram): + self.head() + if diagram.root_attrs: + self.root_attrs(diagram.root_attrs) + self.entities(diagram.entities) + + started = (self.start_with_re is None) + + for line in diagram.lines: + if not started: + if hasattr(line, 'descr') and self.start_with_re.match(line.descr): + started = True + else: + continue + self.add(line) + self.tail() + + def entities(self, entities): + for entity in entities: + self.entity(entity) + + def write(self, line): + self._write_to.write(line) + + def writeln(self, line): + self.write('%s\n' % line) + + def emptyline(self, emptyline): + self.write('\n' * emptyline.count); + + def add(self, thing): + func = getattr(self, thing.__class__.__name__.lower()) + func(thing) + + +class OutputLadder(OutputBase): + + def indent_multiline(self, s): + return s.replace('\n', '\n\t') + + def attrs_str(self, attrs, prefix=' '): + if not attrs: + return '' + return '%s{%s}' % (prefix or '', ','.join('%s=%s' % (k,v) for k,v in attrs.items())) + + def root_attrs(self, attrs): + self.writeln(self.attrs_str(attrs, prefix=None)) + + def entity(self, entity): + self.writeln('%s = %s%s' % (entity.name, self.indent_multiline(entity.descr), self.attrs_str(entity.attrs))) + + def arrow(self, arrow): + mo_mt = arrow.mo_mt or MO + + def prepend_mo_mt(name): + if name in ('.', SIP): + return name + return '%s%s' % (mo_mt, name) + + self.writeln('%s %s %s%s%s%s' + % (prepend_mo_mt(arrow.left), + arrow.arrow, + prepend_mo_mt(arrow.right), + '\t' if arrow.descr else '', + self.indent_multiline(arrow.descr or ''), + self.attrs_str(arrow.attrs))) + + def separator(self, sep_str, descr, attrs): + self.writeln('%s%s%s%s' + % (separator.separator, + ' ' if separator.descr else '', + self.indent_multiline(separator.descr or ''), + self.attrs_str(separator.attrs))) + +class OutputMscgen(OutputBase): + ARROWS = { + '>' : '=>>', + '->' : '=>', + '-->' : '>>', + '~>' : '->', + '=>' : ':>', + '-><' : '-x', + + '<' : '<<=', + '<-' : '<=', + '<--' : '<<', + '<~' : '<-', + '<=' : '<:', + '><-' : 'x-', + + '<>' : 'abox', + '()' : 'rbox', + '[]' : 'note', + } + + def head(self): + super().head() + self.writeln('msc {') + + def tail(self): + self.writeln('}') + + def entities(self, entities): + estr = [] + for entity in entities: + estr.append('%s%s' % (entity.name, self.attrs_str(self.all_attrs(entity.descr, entity.attrs), prefix=''))) + if not estr: + return + self.writeln('%s;' % (','.join(estr))) + + def attrs_list_str(self, attrs): + if not attrs: + return '' + def escape(s): + return s.replace('\n', r'\n').replace('\r', '').replace('\t', r'\t') + return ','.join('%s="%s"' % (k,escape(v)) for k,v in attrs.items()) + + def attrs_str(self, attrs, prefix=' '): + attrs_list_str = self.attrs_list_str(attrs) + if not attrs_list_str: + return '' + return '%s[%s]' % (prefix or '', attrs_list_str) + + def root_attrs(self, attrs): + if not attrs: + return + self.writeln('%s;' % self.attrs_list_str(attrs)) + + def all_attrs(self, descr, attrs): + a = {} + if descr: + a['label'] = descr + a.update(attrs) + return a + + def entity(self, entity): + error('OutputMscgen.entity() should not be called') + + def arrow_txlate(self, arrow): + txlate = OutputMscgen.ARROWS.get(arrow) + if not txlate: + error('Unknown arrow: %r' % arrow) + return txlate + + def arrow(self, arrow): + mo_mt = arrow.mo_mt or MO + + def prepend_mo_mt(name): + if name in ('.', SIP): + return name + return '%s%s' % (mo_mt, name) + + l = prepend_mo_mt(arrow.left) + r = arrow.right + if r == '.': + r = l + else: + r = prepend_mo_mt(r) + + a = {'label': arrow.descr} + a.update(arrow.attrs) + attrs = self.attrs_str(a) + + self.writeln('%s %s %s%s;' + % (l, self.arrow_txlate(arrow.arrow), r, + self.attrs_str(self.all_attrs(arrow.descr, arrow.attrs), prefix='\t'))) + + def separator(self, sep_str, descr, attrs): + self.writeln('%s%s%s%s;' + % (separator.separator, + self.attrs_str(self.all_attrs(descr, attrs), prefix='\t'))) + + def emptyline(self, emptyline): + self.write('\n' * emptyline.count); + + +def ms_from_ran(ran_type_or_conn): + if ran_type_or_conn.startswith('UTRAN-Iu'): + return UE + if ran_type_or_conn.startswith('RANAP'): + return UE + if ran_type_or_conn.startswith('GERAN-A'): + return MS + if ran_type_or_conn.startswith('BSS'): + return MS + return MS_UE_UNKNOWN + +class Diagram: + def __init__(self): + self.root_attrs = {} + self.entities = [] + self.lines = [] + self.mo_mt_unknown_lines = [] + + def add_line(self, line): + self.lines.append(line) + + def resolve_unknown_mo_mt(self): + + def try_match(a, b): + if a < 0 or a >= len(self.lines): + return False + if b < 0 or b >= len(self.lines): + return False + la = self.lines[a] + lb = self.lines[b] + + if not hasattr(lb, 'mo_mt'): + return False + if lb.mo_mt == MO_MT_UNKNOWN: + return False + + for match_attr in ('imsi', 'tmsi', 'ran_conn'): + if not hasattr(la, match_attr): + continue + if not hasattr(lb, match_attr): + continue + la_attr = getattr(la, match_attr) + if la_attr is None: + continue + lb_attr = getattr(lb, match_attr) + if la_attr == lb_attr: + la.mo_mt = lb.mo_mt + return True + return False + + + while True: + changes = 0 + for i in range(len(self.lines)): + line = self.lines[i] + + if not hasattr(line, 'mo_mt'): + continue + if line.mo_mt is not MO_MT_UNKNOWN: + continue + + # don't know MO/MT, try to resolve from near messages + for j in range(1,100): + if try_match(i, i-j): + break + if try_match(i, i+j): + break + if line.mo_mt is not MO_MT_UNKNOWN: + changes += 1 + if not changes: + break + + +re_source_file_last = re.compile(r'(.*) \(([^):]+:[0-9]+)\)$') + +class Rule: + def __init__(self, name, re_str, handler): + self.name = name + self.re = re.compile(re_str) + self.handler = handler + + def match(self, line): + m = self.re.match(line) + if not m: + return False + return self.handler(m) + + +def mo_mt_from_l3type(l3type): + if l3type == 'PAGING_RESP': + return MT + elif l3type == 'CM_SERVICE_REQ': + return MO + else: + return MO_MT_UNKNOWN + +def int_to_hex(val, bits): + return hex((int(val) + (1 << bits)) % (1 << bits)) + +class Callref: + MAX = 0x7fffffff + MIN = -0x80000000 + BITS = 32 + + def int_to_hex(val): + return int_to_hex(val, Callref.BITS) + + def hex_to_int(hexstr): + val = int(hexstr, 16) + if val > Callref.MAX: + val = Callref.MIN + (val & Callref.MAX) + return val + +class Parse: + + def __init__(self, output, mask_values=False): + + self.diagram = Diagram() + self.output = output + self.linenr = 0 + self.rules = [] + self.seen_udtrace_mncc = False + + self.callrefs_mo_mt = {} + self.mask_values = mask_values + self.masked_values = {} + + for member in dir(self): + if not member.startswith('rule_'): + continue + func = getattr(self, member) + if not callable(func): + continue + + docstr = func.__doc__ + if not docstr: + continue + re_str = docstr.splitlines()[0] + + self.rules.append(Rule(name=member, re_str=re_str, handler=func)) + + + + def error(self, *msg): + error('line %d: ' % self.linenr, *msg) + + def start(self): + self.diagram.root_attrs = {'hscale': '3'} + for name, descr in ( + ('moms', 'MS,BSS (MO)\\nUE,hNodeB (MO)'), + #('moue', 'UE,hNodeB (MO)'), + ('momgw', 'MGW for MSC (MO)'), + ('momsc', 'MSC (MO)'), + ('sip', 'MNCC to PBX via\nosmo-sip-connector'), + ('mtmsc', 'MSC (MT)'), + ('mtmgw', 'MGW for MSC (MT)'), + ('mtms', 'BSS,MS (MT)\\nhNodeB,UE (MT)'), + #('mtue', 'hNodeB,UE (MT)'), + ): + self.diagram.entities.append(Entity(name, descr)) + + def end(self): + self.diagram.resolve_unknown_mo_mt() + self.output.render(self.diagram) + + def mask_value(self, name, val): + if not self.mask_values: + return val + if not val: + return val + name_dict = self.masked_values.get(name) + if not name_dict: + name_dict = {} + self.masked_values[name] = name_dict + + masked_val = name_dict.get(val) + if masked_val is None: + masked_val = '%s-%d' % (name, len(name_dict) + 1) + name_dict[val] = masked_val + return masked_val + + def add_line(self, line): + self.linenr += 1 + if line.endswith('\n'): + line = line[:-1] + if line.endswith('\r'): + line = line[:-1] + + self.interpret(line) + + def interpret(self, line): + + m = re_source_file_last.match(line) + if m: + line = m.group(1) + + for rule in self.rules: + if rule.match(line): + break + + RE_DTAP_NAME = re.compile('.*GSM48_MT_([^_]+)_(.+)') + + def rule_paging(self, m): + r'.*ran_peer\(([^:]+):.* Paging for ([^ ]+) on ([^ ]+)' + ran_type, subscr, cell = m.groups() + + self.diagram.add_line(Arrow(MT, ms_from_ran(ran_type), '<', MSC, 'Paging')) + return True + + RE_IMSI = re.compile('IMSI-([0-9]+)') + RE_TMSI = re.compile('TMSI-0x([0-9a-fA-F]+)') + + def rule_dtap(self, m): + r'.*msc_a\(([^)]*):([^:]+):([^:]+)\).* (Dispatching 04.08 message|Sending DTAP): (.+)$' + + subscr, ran_conn, l3type, rx_tx, dtap = m.groups() + tx = (rx_tx == 'Sending DTAP') + + m = self.RE_DTAP_NAME.match(dtap) + if m: + dtap = '%s %s' % m.groups() + + if 'IMSI_DETACH_IND' in dtap: + # detecting IMSI Detach separately + return True + + if l3type == 'NONE' and not tx and dtap.endswith('PAG_RESP'): + e = MT + else: + e = mo_mt_from_l3type(l3type) + + imsi = None + for m in Parse.RE_IMSI.finditer(subscr): + imsi = m.group(1) + tmsi = None + for m in Parse.RE_TMSI.finditer(subscr): + tmsi = m.group(1) + + self.diagram.add_line(Arrow(e, ms_from_ran(ran_conn), '<' if tx else '>', MSC, dtap, + ran_conn=ran_conn, imsi=imsi, tmsi=tmsi)) + return True + + def rule_imsi_detach(self, m): + r'.*IMSI DETACH for IMSI-([0-9]+):.*' + imsi = m.group(1) + e = MO_MT_UNKNOWN + self.diagram.add_line(Arrow(e, MS_UE_UNKNOWN, '>', MSC, 'IMSI Detach', imsi=imsi)) + + def rule_mgcp_tx(self, m): + r'.*mgw-endp\([^)]*:([^:]+):([^:]+)\).* (rtpbridge[^ ]+) .* RTP_TO_(RAN|CN)( CI=([^:]+)|): ([^ :]+).*: Sending' + ran, l3type, endp, rtp_to, cond_ci, ci, verb = m.groups() + e = mo_mt_from_l3type(l3type) + if '*' not in endp: + endp = self.mask_value('EP', endp) + ci = self.mask_value('CI', ci) + ci_str = '' + if ci: + ci_str = ' %s' % ci + self.diagram.add_line(Arrow(e, MGW, '<', MSC, 'for %s: %s\\n%s%s' % (rtp_to, verb, endp, ci_str))) + return True + + def rule_mgcp_rx(self, m): + r'.*mgw-endp\([^)]*:([^:]+):([^:]+)\).* (rtpbridge[^ ]+) .* RTP_TO_(RAN|CN)( CI=([^:]+)|).*: received successful response to ([^:]+): (.*)' + ran, l3type, endp, rtp_to, cond_ci, ci, verb, details = m.groups() + e = mo_mt_from_l3type(l3type) + endp = self.mask_value('EP', endp) + ci = self.mask_value('CI', ci) + ci_str = '' + if ci: + ci_str = ' %s' % ci + self.diagram.add_line(Arrow(e, MGW, '>', MSC, 'for %s: %s OK\\n%s%s' % (rtp_to, verb, endp, ci_str))) + return True + + def rule_ran_tx(self, m): + r'.*msc_a\(([^)]*):([^:]+):([^:]+)\).* RAN encode: ([^: ]+): (.+)$' + + subscr, ran_conn, l3type, ran_type, msg_type = m.groups() + + if msg_type in ('DTAP', 'DirectTransfer'): + # will get DTAP details from rule_dtap() instead, not from BSSMAP logging + return True + if msg_type.startswith('Tx'): + # skip 'Tx RANAP SECURITY MODE COMMAND to RNC, ik 47...' + return True + if '=' in msg_type: + # skip 'RAB Assignment: rab_id=1, rtp=192.168.178.66:50008, use_x213_nsap=1' + return True + + if l3type == 'NONE': + return True + + e = mo_mt_from_l3type(l3type) + + imsi = None + for m in Parse.RE_IMSI.finditer(subscr): + imsi = m.group(1) + tmsi = None + for m in Parse.RE_TMSI.finditer(subscr): + tmsi = m.group(1) + + self.diagram.add_line(Arrow(e, ms_from_ran(ran_conn), '<', MSC, '(%s) %s' % (ran_type, msg_type), + ran_conn=ran_conn, imsi=imsi, tmsi=tmsi)) + return True + + def rule_ran_rx(self, m): + r'.*msc_a\(([^)]*):([^:]+):([^:]+)\).* RAN decode: ([^: ]+) (.+)$' + + subscr, ran_conn, l3type, ran_type, msg_type = m.groups() + + if msg_type in ('DTAP', 'DirectTransfer', 'DirectTransfer RAN PDU'): + # will get DTAP details from rule_dtap() instead, not from BSSMAP logging + return True + + if l3type == 'NONE': + return True + + e = mo_mt_from_l3type(l3type) + + imsi = None + for m in Parse.RE_IMSI.finditer(subscr): + imsi = m.group(1) + tmsi = None + for m in Parse.RE_TMSI.finditer(subscr): + tmsi = m.group(1) + + self.diagram.add_line(Arrow(e, ms_from_ran(ran_type), '>', MSC, '(%s) %s' % (ran_type, msg_type), + ran_conn=ran_conn, imsi=imsi, tmsi=tmsi)) + return True + + def rule_cc_state(self, m): + r'.*trans\(CC[^) ]* [^ )]+:([^:)]+) callref-([^ ]+) [^)]+\) new state ([^ ]+) -> ([^ ]+)' + l3type, callref_hex, from_state, to_state = m.groups() + + e = mo_mt_from_l3type(l3type) + self.callrefs_mo_mt[callref_hex] = e + + self.diagram.add_line(Arrow(e, MSC, '<>', '.', 'CC state:\\n%s' % to_state)) + return True + + def rule_log_mncc(self, m): + r'.*trans\(CC[^) ]* [^ )]+:([^:)]+) callref-([^ ]+) [^)]+\) (tx|rx) (MNCC_[^ ]*)$' + l3type, callref_hex, tx_rx, mncc_msg = m.groups() + + if self.seen_udtrace_mncc: + # If no udtrace is present, take the MNCC logging. + # But if there is udtrace logging available, we should not duplicate those MNCC lines. + return True + + tx = (tx_rx == 'tx') + + try: + e = self.callrefs_mo_mt.get(callref_hex, MT) + except: + e = MT + + self.diagram.add_line(Arrow(e, MSC, '>' if tx else '<', 'sip', mncc_msg)) + return True + + RE_MNCC_RTP = re.compile(' ip := ([^, ]+), rtp_port := ([0-9]+),') + RE_MNCC_CALLREF = re.compile(' callref := ([^ ,]+), ') + + def rule_udtrace_mncc(self, m): + r'.*(write|recv).* (Tx|Rx): \{ msg_type := ([^ ]+) .* u := \{ (.*) \} \}$' + write_recv, tx_rx, msg_type, u = m.groups() + + self.seen_udtrace_mncc = True + + tx = (tx_rx == 'Tx') + + callref_intstr = None + for m in Parse.RE_MNCC_CALLREF.finditer(u): + callref_intstr = m.group(1) + if not callref_intstr: + # log only MNCC that has a callref + return True + + try: + e = self.callrefs_mo_mt.get(Callref.int_to_hex(callref_intstr), MT) + except: + e = MT + + descr = msg_type + + for m in Parse.RE_MNCC_RTP.finditer(u): + ip_str, port_str = m.groups() + try: + if int(ip_str) == 0 or int(port_str) == 0: + break + except: + break + ip_hex = int_to_hex(ip_str, 32) + ip = [] + ip_val = int(ip_hex, 16) + for byte in range(4): + ip.insert(0, (ip_val & (0xff << (8*byte))) >> (8*byte)) + rtp_info = '%s:%s' % ('.'.join(str(b) for b in ip), port_str) + rtp_info = self.mask_value('IP:port', rtp_info) + descr = '%s\\n%s' % (descr, rtp_info) + break + + self.diagram.add_line(Arrow(e, MSC, '>' if tx else '<', 'sip', descr)) + return True + + def rule_cc_timer(self, m): + r'.*trans\(CC.*IMSI-([0-9]+):.*\) (starting|stopping pending) (guard timer|timer T[0-9]+)( with ([0-9]+) seconds|)' + imsi, start_stop, t, with_cond, s = m.groups() + start = (start_stop == 'starting') + e = MO_MT_UNKNOWN + if start: + self.diagram.add_line(Arrow(e, MSC, '[]', '.', 'CC starts %s (%ss)' % (t, s), imsi=imsi)) + else: + self.diagram.add_line(Arrow(e, MSC, '[]', '.', 'CC stops %s' % (t), imsi=imsi)) + return True + + +def translate(inf, outf, cmdline): + if cmdline.output_format == 'mscgen': + output = OutputMscgen(outf, cmdline.start_with_re) + else: + output = OutputLadder(outf, cmdline.start_with_re) + parse = Parse(output, cmdline.mask_values) + + parse.start() + + while inf.readable(): + line = inf.readline() + if not line: + break; + parse.add_line(line) + parse.end() + +def open_output(inf, cmdline): + if cmdline.output_file == '-': + translate(inf, sys.stdout, cmdline) + else: + with tempfile.NamedTemporaryFile(dir=os.path.dirname(cmdline.output_file), mode='w', encoding='utf-8') as tmp_out: + translate(inf, tmp_out, cmdline) + if os.path.exists(cmdline.output_file): + os.unlink(cmdline.output_file) + os.link(tmp_out.name, cmdline.output_file) + +def open_input(cmdline): + if cmdline.input_file == '-': + open_output(sys.stdin, cmdline) + else: + with open(cmdline.input_file, 'r') as f: + open_output(f, cmdline) + +def main(cmdline): + open_input(cmdline) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description=doc) + parser.add_argument('-i', '--input-file', dest='input_file', default="-", + help='Read from this file, or stdin if "-"') + parser.add_argument('-o', '--output-file', dest='output_file', default="-", + help='Write to this file, or stdout if "-"') + parser.add_argument('-t', '--output-format', dest='output_format', default="mscgen", + choices=('mscgen','ladder'), + help='Pick output format: mscgen format or libosmocore/contrib/ladder_to_msc.py format') + parser.add_argument('-m', '--mask-values', dest='mask_values', action='store_true', + help='Do not output specific values like IP address, port, endpoint CI, instead just indicate that a value is' + ' present. This makes the output reproducable across various logs.') + parser.add_argument('-s', '--start-with', dest='start_with_re', default=None, + help='Skip until the first message with this label (regex), e.g. -s "CC SETUP"') + + cmdline = parser.parse_args() + + main(cmdline) + +# vim: shiftwidth=8 noexpandtab tabstop=8 autoindent nocindent -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2e4d8778f7b83dee558517a9b23450b817ee325d Gerrit-Change-Number: 15944 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:13:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:13:22 +0000 Subject: Change in osmo-msc[master]: charts: add full MO and MT voice call diagram In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15945 ) Change subject: charts: add full MO and MT voice call diagram ...................................................................... charts: add full MO and MT voice call diagram Add voice_call_full.msc, generated from a real 2G<->3G voice call log fed to msc_log_to_ladder.py. The idea is to document how the voice call sequence of events changes in upcoming patches. Change-Id: I8a907d6a4ece1f3ad78da75a8c3e3e76afd5418d --- M doc/sequence_charts/Makefile.am A doc/sequence_charts/voice_call_full.msc 2 files changed, 126 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/doc/sequence_charts/Makefile.am b/doc/sequence_charts/Makefile.am index f1775c8..6782f44 100644 --- a/doc/sequence_charts/Makefile.am +++ b/doc/sequence_charts/Makefile.am @@ -13,18 +13,20 @@ inter_bsc_ho.png \ inter_msc_ho.png \ mncc_call_fsm.png \ + voice_call_full.png \ $(NULL) msc: \ $(builddir)/mncc_call_fsm.png \ $(builddir)/inter_bsc_ho.png \ $(builddir)/inter_msc_ho.png \ + $(builddir)/voice_call_full.png \ $(NULL) dot: \ $(NULL) -$(builddir)/%.png: $(srcdir)/%.msc +$(builddir)/%.png: %.msc mscgen -T png -o $@ $< $(builddir)/%.png: $(srcdir)/%.dot diff --git a/doc/sequence_charts/voice_call_full.msc b/doc/sequence_charts/voice_call_full.msc new file mode 100644 index 0000000..75fcef2 --- /dev/null +++ b/doc/sequence_charts/voice_call_full.msc @@ -0,0 +1,123 @@ +# Generated by msc_log_to_ladder.py +msc { +hscale="3"; +moms[label="MS,BSS (MO)\nUE,hNodeB (MO)"],momgw[label="MGW for MSC (MO)"],momsc[label="MSC (MO)"],sip[label="MNCC to PBX via\nosmo-sip-connector"],mtmsc[label="MSC (MT)"],mtmgw[label="MGW for MSC (MT)"],mtms[label="BSS,MS (MT)\nhNodeB,UE (MT)"]; +moms =>> momsc [label="MM CM_SERV_REQ"]; +moms <<= momsc [label="MM AUTH_REQ"]; +moms =>> momsc [label="MM AUTH_RESP"]; +moms <<= momsc [label="(BSSMAP) CIPHER_MODE_COMMAND"]; +moms =>> momsc [label="(BSSMAP) Ciphering Mode Complete"]; +moms =>> momsc [label="RR CIPH_M_COMPL"]; +moms =>> momsc [label="CC SETUP"]; +momsc note momsc [label="CC starts guard timer (180s)"]; +momsc abox momsc [label="CC state:\nINITIATED"]; +momsc =>> sip [label="MNCC_SETUP_IND"]; +momsc <<= sip [label="MNCC_RTP_CREATE"]; +momgw <<= momsc [label="for RAN: CRCX\nrtpbridge/*@msc"]; +momgw =>> momsc [label="for RAN: CRCX OK\nEP-1 CI-1"]; +moms <<= momsc [label="(BSSMAP) ASSIGNMENT_COMMAND"]; +moms =>> momsc [label="(BSSMAP) Assignment Complete"]; +momgw <<= momsc [label="for RAN: MDCX\nEP-1 CI-1"]; +momgw =>> momsc [label="for RAN: MDCX OK\nEP-1 CI-1"]; +momgw <<= momsc [label="for CN: CRCX\nEP-1"]; +momgw =>> momsc [label="for CN: CRCX OK\nEP-1 CI-2"]; +momsc =>> sip [label="MNCC_RTP_CREATE\nIP:port-1"]; +momsc <<= sip [label="MNCC_CALL_PROC_REQ"]; +momsc note momsc [label="CC stops guard timer"]; +momsc note momsc [label="CC starts guard timer (180s)"]; +momsc abox momsc [label="CC state:\nMO_CALL_PROC"]; +moms <<= momsc [label="CC CALL_PROC"]; +mtmsc <<= sip [label="MNCC_SETUP_REQ"]; +mtms <<= mtmsc [label="Paging"]; +mtms =>> mtmsc [label="RR PAG_RESP"]; +mtms <<= mtmsc [label="MM AUTH_REQ"]; +mtms =>> mtmsc [label="MM NULL"]; +mtms =>> mtmsc [label="MM AUTH_RESP"]; +mtms <<= mtmsc [label="(RANAP) SecurityModeCommand"]; +mtms =>> mtmsc [label="(RANAP) SecurityModeControl successfulOutcome"]; +mtms <<= mtmsc [label="(RANAP) CommonId"]; +mtmsc note mtmsc [label="CC starts timer T303 (30s)"]; +mtmsc abox mtmsc [label="CC state:\nCALL_PRESENT"]; +mtms <<= mtmsc [label="CC SETUP"]; +mtms =>> mtmsc [label="CC CALL_CONF"]; +mtmsc note mtmsc [label="CC stops timer T303"]; +mtmsc note mtmsc [label="CC starts timer T310 (30s)"]; +mtmsc abox mtmsc [label="CC state:\nMO_TERM_CALL_CONF"]; +mtmgw <<= mtmsc [label="for RAN: CRCX\nrtpbridge/*@msc"]; +mtmsc =>> sip [label="MNCC_CALL_CONF_IND"]; +mtmsc <<= sip [label="MNCC_RTP_CREATE"]; +mtmgw =>> mtmsc [label="for RAN: CRCX OK\nEP-2 CI-3"]; +mtms <<= mtmsc [label="(RANAP) RAB AssignmentRequest"]; +mtms =>> mtmsc [label="(RANAP) RAB Assignment Response"]; +mtmgw <<= mtmsc [label="for RAN: MDCX\nEP-2 CI-3"]; +mtmgw =>> mtmsc [label="for RAN: MDCX OK\nEP-2 CI-3"]; +mtmgw <<= mtmsc [label="for CN: CRCX\nEP-2"]; +mtmgw =>> mtmsc [label="for CN: CRCX OK\nEP-2 CI-4"]; +mtmsc =>> sip [label="MNCC_RTP_CREATE\nIP:port-2"]; +mtms =>> mtmsc [label="CC ALERTING"]; +mtmsc note mtmsc [label="CC stops timer T310"]; +mtmsc note mtmsc [label="CC starts timer T301 (180s)"]; +mtmsc abox mtmsc [label="CC state:\nCALL_RECEIVED"]; +mtmsc =>> sip [label="MNCC_ALERT_IND"]; +momsc <<= sip [label="MNCC_ALERT_REQ"]; +momsc note momsc [label="CC stops guard timer"]; +momsc note momsc [label="CC starts guard timer (180s)"]; +momsc abox momsc [label="CC state:\nCALL_DELIVERED"]; +moms <<= momsc [label="CC ALERTING"]; +mtms =>> mtmsc [label="CC CONNECT"]; +mtmsc note mtmsc [label="CC stops timer T301"]; +mtmsc abox mtmsc [label="CC state:\nCONNECT_REQUEST"]; +mtmsc =>> sip [label="MNCC_SETUP_CNF"]; +mtmsc <<= sip [label="MNCC_RTP_CONNECT\nIP:port-1"]; +mtmgw <<= mtmsc [label="for CN: MDCX\nEP-2 CI-4"]; +mtmsc <<= sip [label="MNCC_SETUP_COMPL_REQ"]; +mtmsc note mtmsc [label="CC starts guard timer (180s)"]; +mtmsc abox mtmsc [label="CC state:\nACTIVE"]; +mtmsc note mtmsc [label="CC stops guard timer"]; +mtms <<= mtmsc [label="CC CONNECT_ACK"]; +mtmgw =>> mtmsc [label="for CN: MDCX OK\nEP-2 CI-4"]; +momsc <<= sip [label="MNCC_RTP_CONNECT\nIP:port-2"]; +momgw <<= momsc [label="for CN: MDCX\nEP-1 CI-2"]; +momsc <<= sip [label="MNCC_SETUP_RSP"]; +momsc note momsc [label="CC stops guard timer"]; +momsc note momsc [label="CC starts guard timer (180s)"]; +momsc note momsc [label="CC starts timer T313 (30s)"]; +momsc abox momsc [label="CC state:\nCONNECT_IND"]; +moms <<= momsc [label="CC CONNECT"]; +momgw =>> momsc [label="for CN: MDCX OK\nEP-1 CI-2"]; +moms =>> momsc [label="CC CONNECT_ACK"]; +momsc note momsc [label="CC stops timer T313"]; +momsc abox momsc [label="CC state:\nACTIVE"]; +momsc note momsc [label="CC stops guard timer"]; +momsc =>> sip [label="MNCC_SETUP_COMPL_IND"]; +moms =>> momsc [label="CC DISCONNECT"]; +momsc abox momsc [label="CC state:\nDISCONNECT_IND"]; +momsc =>> sip [label="MNCC_DISC_IND"]; +momsc <<= sip [label="MNCC_REL_REQ"]; +momsc note momsc [label="CC starts guard timer (180s)"]; +momsc note momsc [label="CC starts timer T308 (10s)"]; +momsc abox momsc [label="CC state:\nRELEASE_REQ"]; +moms <<= momsc [label="CC RELEASE"]; +mtmsc <<= sip [label="MNCC_DISC_REQ"]; +mtmsc note mtmsc [label="CC starts guard timer (180s)"]; +mtmsc note mtmsc [label="CC starts timer T306 (30s)"]; +mtmsc abox mtmsc [label="CC state:\nDISCONNECT_IND"]; +mtms <<= mtmsc [label="CC DISCONNECT"]; +moms =>> momsc [label="CC RELEASE_COMPL"]; +momsc note momsc [label="CC stops timer T308"]; +momsc abox momsc [label="CC state:\nNULL"]; +momsc note momsc [label="CC stops guard timer"]; +moms <<= momsc [label="(BSSMAP) CLEAR_COMMAND"]; +momsc =>> sip [label="MNCC_REL_CNF"]; +moms =>> momsc [label="(BSSMAP) Clear Complete"]; +mtms =>> mtmsc [label="CC RELEASE"]; +mtmsc note mtmsc [label="CC stops timer T306"]; +mtms <<= mtmsc [label="CC RELEASE_COMPL"]; +mtmsc abox mtmsc [label="CC state:\nNULL"]; +mtmsc note mtmsc [label="CC stops guard timer"]; +mtms <<= mtmsc [label="(RANAP) Iu Release"]; +mtmsc =>> sip [label="MNCC_REL_IND"]; +mtms =>> mtmsc [label="(RANAP) Iu Release successfulOutcome"]; +moms =>> momsc [label="IMSI Detach"]; +mtms =>> mtmsc [label="IMSI Detach"]; +} -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8a907d6a4ece1f3ad78da75a8c3e3e76afd5418d Gerrit-Change-Number: 15945 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:14:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:14:55 +0000 Subject: Change in osmo-msc[master]: BSSMAP: decode Codec List (BSS Supported) In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15946 ) Change subject: BSSMAP: decode Codec List (BSS Supported) ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/c/osmo-msc/+/15946/1/src/libmsc/ran_msg_a.c File src/libmsc/ran_msg_a.c: https://gerrit.osmocom.org/c/osmo-msc/+/15946/1/src/libmsc/ran_msg_a.c at 129 PS1, Line 129: ran_dec_msg.compl_l3.codec_list_bss_supported = &codec_list_bss_supported; aren't you assigning a pointer to a stack variable here, which will have no significance after the function returns? https://gerrit.osmocom.org/c/osmo-msc/+/15946/1/src/libmsc/ran_msg_a.c at 345 PS1, Line 345: ran_dec_msg.assignment_complete.codec_list_bss_supported = &codec_list_bss_supported; same here? -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e Gerrit-Change-Number: 15946 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:14:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:16:09 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:16:09 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15947 ) Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... Patch Set 1: doesn't it much rather make sense to have at least a helper library containing those things that you are copy+pasting here? something like libosmo-sdp-utils, which then can be used by any of the actual parser codebases? Copy+Pasting of such code really hurts me :/ -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:16:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:16:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:16:32 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc-test: improve error log on Assignment RTP port mismatch In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15935 ) Change subject: msc-test: improve error log on Assignment RTP port mismatch ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15935 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I04847c10d6c3bf9e04cfda6e343dfd4a65be71a5 Gerrit-Change-Number: 15935 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:16:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:16:50 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:16:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: improve/fix f_tc_mo_setup_dtmf_dup In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15936 ) Change subject: improve/fix f_tc_mo_setup_dtmf_dup ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15936 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ibfa8b906764f2d5ed75fe74125be42af4546e864 Gerrit-Change-Number: 15936 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:16:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:17:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:17:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cosmetic: remove brace from comment In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15937 ) Change subject: cosmetic: remove brace from comment ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15937 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I303abe800037abd0c9694ae750a7acaa79c9754f Gerrit-Change-Number: 15937 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:17:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:22:20 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:22:20 +0000 Subject: Change in osmo-msc[master]: BSSMAP: decode Codec List (BSS Supported) In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15946 ) Change subject: BSSMAP: decode Codec List (BSS Supported) ...................................................................... Patch Set 1: Code-Review+1 (2 comments) https://gerrit.osmocom.org/c/osmo-msc/+/15946/1/src/libmsc/ran_msg_a.c File src/libmsc/ran_msg_a.c: https://gerrit.osmocom.org/c/osmo-msc/+/15946/1/src/libmsc/ran_msg_a.c at 127 PS1, Line 127: /* This IE is not critical, do not abort with error. */ then probably set log level as WARN/NOTICE? https://gerrit.osmocom.org/c/osmo-msc/+/15946/1/src/libmsc/ran_msg_a.c at 129 PS1, Line 129: ran_dec_msg.compl_l3.codec_list_bss_supported = &codec_list_bss_supported; > aren't you assigning a pointer to a stack variable here, which will have no significance after the f [?] I have the feeling that's intended and fine here. It's like our usual tlv_parsed, used during the current code path and if you need to keep something later then you must copy it. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e Gerrit-Change-Number: 15946 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:22:20 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:38:23 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:38:23 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: fix Iu mo call In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 ) Change subject: msc: fix Iu mo call ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939/1/library/ranap/RANAP_Templates.ttcn File library/ranap/RANAP_Templates.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939/1/library/ranap/RANAP_Templates.ttcn at 1309 PS1, Line 1309: value_ := { actually, the criticality specified by Section 9.1.2 of TS 25.413 is "ignore" so we should set it here. The purpose of the tests is to test the specs as closely as possible, while not making too many assumptions on the implementation details. However, as the criticality permitted here is only 'ignore', we should check for that. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec Gerrit-Change-Number: 15939 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:38:23 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:38:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:38:27 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15947 ) Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... Patch Set 1: (4 comments) > Patch Set 1: > > doesn't it much rather make sense to have at least a helper library containing those things that you are copy+pasting here? something like libosmo-sdp-utils, which then can be used by any of the actual parser codebases? Copy+Pasting of such code really hurts me :/ Agree. https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h File include/osmocom/msc/debug.h: https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h at 38 PS1, Line 38: size_t len = 64; \ Makes much more sense having len as a param to avoid almost-sure talloc_realloc on some functions. https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h at 40 PS1, Line 40: char *str = (char*)talloc_named_const(ctx, len, #FUNC_BUF "_c()"); \ where does this "ctx" var come from? https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h at 63 PS1, Line 63: #define NAME_IMPL(FUNC_C, FUNC_C_ARGS...) \ So you return a talloc'ed pointer on success and a static string pointer on error? That will break when you attempt to free it. I'd drop this function completely, null is your friend! https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/src/libmsc/sdp_msg.c File src/libmsc/sdp_msg.c: https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/src/libmsc/sdp_msg.c at 105 PS1, Line 105: codec->fmtp[0] ? codec->fmtp : NULL); shouldn't you compare against '\0' here? codec->fmtp[0] != '\0' ? ... -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:38:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:38:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:38:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add and fix Iu mt call In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15940 ) Change subject: msc: add and fix Iu mt call ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3ce29f3d9254656dc295674e8cec72a741b7764a Gerrit-Change-Number: 15940 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:38:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:39:12 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:39:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: log tweaks for call / call hangup In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15941 ) Change subject: msc: log tweaks for call / call hangup ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15941 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I06474e3d592195a8c422493166d9f042da1ac7e6 Gerrit-Change-Number: 15941 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:39:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:39:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:39:44 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add f_tc_invalid_mgcp_crash In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15942 ) Change subject: msc: add f_tc_invalid_mgcp_crash ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0c76b0a7a33a96a39a242ecd387ba3769161cf7a Gerrit-Change-Number: 15942 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:39:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:40:10 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 4 Nov 2019 10:40:10 +0000 Subject: Change in osmo-ttcn3-hacks[master]: re-implement compare-results.sh as compare-results.py In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 ) Change subject: re-implement compare-results.sh as compare-results.py ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0747c9d66ffc7e4121497a2416fca78d7b56c8e6 Gerrit-Change-Number: 15943 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 04 Nov 2019 10:40:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:41:44 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:41:44 +0000 Subject: Change in osmo-msc[master]: MNCC: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC: add optional SDP to the socket protocol ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/15948/1/src/libmsc/mncc.c File src/libmsc/mncc.c: https://gerrit.osmocom.org/c/osmo-msc/+/15948/1/src/libmsc/mncc.c at 266 PS1, Line 266: * char sdp[] starts with a '\0'. */ I'd better don't rely on msgb being zero-filled and mark the related byte = 0. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:41:44 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:42:05 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:42:05 +0000 Subject: Change in osmo-msc[master]: validate dtap err logging In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15949 ) Change subject: validate dtap err logging ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 Gerrit-Change-Number: 15949 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:42:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:42:31 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:42:31 +0000 Subject: Change in osmo-msc[master]: msc_vlr_test_call.c: add MNCC logging In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15950 ) Change subject: msc_vlr_test_call.c: add MNCC logging ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I03b25c134553c620d3fa9d23a67ad39414546861 Gerrit-Change-Number: 15950 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:42:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:44:18 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:44:18 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: log descriptions in color with -v In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15951 ) Change subject: msc_vlr_tests: log descriptions in color with -v ...................................................................... Patch Set 1: I don't see any reference to the -v thing in the code changes... -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d Gerrit-Change-Number: 15951 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:44:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 10:44:57 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 10:44:57 +0000 Subject: Change in osmo-msc[master]: msc_vlr_test_call: rename lu_utran_tmsi In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15952 ) Change subject: msc_vlr_test_call: rename lu_utran_tmsi ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15952 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I46a41321e6d1be3672a56a6e3cc36f013fdcd396 Gerrit-Change-Number: 15952 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 10:44:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 11:02:11 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 11:02:11 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15953 ) Change subject: add full SDP codec information to the MNCC socket ...................................................................... Patch Set 1: Code-Review+1 (2 comments) This patch is huge, I'd welcome some splitting into several patches if possible. https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/include/osmocom/msc/transaction.h File include/osmocom/msc/transaction.h: https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/include/osmocom/msc/transaction.h at a90 PS1, Line 90: /* if true, TCH_RTP_CREATE is sent after the Removing this seems non-related? https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/src/libmsc/gsm_04_08_cc.c File src/libmsc/gsm_04_08_cc.c: https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/src/libmsc/gsm_04_08_cc.c at 634 PS1, Line 634: trans_free(trans); trans->callref = 0 needed here? -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 11:02:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 11:04:36 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 11:04:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc-test: improve error log on Assignment RTP port mismatch In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15935 ) Change subject: msc-test: improve error log on Assignment RTP port mismatch ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15935 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I04847c10d6c3bf9e04cfda6e343dfd4a65be71a5 Gerrit-Change-Number: 15935 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 11:04:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 11:12:39 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 11:12:39 +0000 Subject: Change in osmo-ttcn3-hacks[master]: improve/fix f_tc_mo_setup_dtmf_dup In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15936 ) Change subject: improve/fix f_tc_mo_setup_dtmf_dup ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15936 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ibfa8b906764f2d5ed75fe74125be42af4546e864 Gerrit-Change-Number: 15936 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 11:12:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 11:13:25 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 11:13:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cosmetic: remove brace from comment In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15937 ) Change subject: cosmetic: remove brace from comment ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15937 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I303abe800037abd0c9694ae750a7acaa79c9754f Gerrit-Change-Number: 15937 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 11:13:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 11:20:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 11:20:52 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 ) Change subject: msc: overhaul voice call testing ...................................................................... Patch Set 1: Code-Review+1 (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/1/library/MGCP_Templates.ttcn File library/MGCP_Templates.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/1/library/MGCP_Templates.ttcn at 456 PS1, Line 456: function f_mgcp_find_param_entry(MgcpParameterList pars, MgcpInfoCode code, out charstring ret) This can probably be a different patch. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/1/msc/BSC_ConnectionHandler.ttcn File msc/BSC_ConnectionHandler.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/1/msc/BSC_ConnectionHandler.ttcn at 755 PS1, Line 755: got_osmux := 0 got_osmux_cnt? otherwise it looks like a bool. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 11:20:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 11:22:46 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 11:22:46 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add and fix Iu mt call In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15940 ) Change subject: msc: add and fix Iu mt call ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3ce29f3d9254656dc295674e8cec72a741b7764a Gerrit-Change-Number: 15940 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 11:22:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 11:23:03 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 11:23:03 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: log tweaks for call / call hangup In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15941 ) Change subject: msc: log tweaks for call / call hangup ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15941 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I06474e3d592195a8c422493166d9f042da1ac7e6 Gerrit-Change-Number: 15941 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 11:23:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 11:23:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 11:23:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add f_tc_invalid_mgcp_crash In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15942 ) Change subject: msc: add f_tc_invalid_mgcp_crash ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0c76b0a7a33a96a39a242ecd387ba3769161cf7a Gerrit-Change-Number: 15942 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 11:23:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 11:24:39 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 11:24:39 +0000 Subject: Change in osmo-ttcn3-hacks[master]: re-implement compare-results.sh as compare-results.py In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 ) Change subject: re-implement compare-results.sh as compare-results.py ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943/1/compare-results.py File compare-results.py: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943/1/compare-results.py at 68 PS1, Line 68: whitespace -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0747c9d66ffc7e4121497a2416fca78d7b56c8e6 Gerrit-Change-Number: 15943 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 11:24:39 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 11:42:14 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 11:42:14 +0000 Subject: Change in libosmocore[master]: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add un... In-Reply-To: References: Message-ID: Hello neels, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15924 to look at the new patch set (#2). Change subject: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add unit tests ...................................................................... gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add unit tests Only known user of API is in osmocom-bb and it compiles fine after the change. Related: OS#4244 Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 --- M include/osmocom/gsm/gsm_utils.h M src/gsm/gsm_utils.c M tests/gsm0408/gsm0408_test.c 3 files changed, 23 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/24/15924/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 Gerrit-Change-Number: 15924 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 13:10:27 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 4 Nov 2019 13:10:27 +0000 Subject: Change in libosmocore[master]: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add un... In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15924 ) Change subject: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add unit tests ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 Gerrit-Change-Number: 15924 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Mon, 04 Nov 2019 13:10:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 14:08:28 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 14:08:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 ) Change subject: msc: overhaul voice call testing ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/1/library/MGCP_Templates.ttcn File library/MGCP_Templates.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/1/library/MGCP_Templates.ttcn at 456 PS1, Line 456: function f_mgcp_find_param_entry(MgcpParameterList pars, MgcpInfoCode code, out charstring ret) > This can probably be a different patch. but then I would create a function with no callers... well, almost. ok then. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/1/msc/BSC_ConnectionHandler.ttcn File msc/BSC_ConnectionHandler.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/1/msc/BSC_ConnectionHandler.ttcn at 755 PS1, Line 755: got_osmux := 0 > got_osmux_cnt? otherwise it looks like a bool. indeed, thx -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 14:08:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 14:24:54 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 14:24:54 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15953 ) Change subject: add full SDP codec information to the MNCC socket ...................................................................... Patch Set 1: > This patch is huge, I'd welcome some splitting into several patches if possible. I fully agree, and I tried that. The problem: it is hard to make parts of it work without the rest. After hitting complex problems trying to split things out, I flinched and left it in one. I can spend (probably a lot of) time on separate patches if that is required, or we can agree on another "medium-large refactoring" bomb... If the opinion is that it should be split, I can try harder. For example, I wanted to split out the part that moves the CN side CRCX to an earlier time, but that also entails changing the the callback functions' names and the sequence of what calls which. Then I would need to sort of undo the part that figures out the codecs from SDP, which IIRC changes the code flow and needs more thinking to get a fully working osmo-msc. We would get an intermediate stage osmo-msc that no-one will be using in practice and which probably has odd problems that are fixed by the rest of this patch; I'd need to fix those in creative ways... I could split out the SDP parsing stuff, but then that would have no callers. I could split out the Codec List (BSS Supported) handling, but I store the result in the new cc_sdp struct. I'd have to invent some other storage for that and undo it in the second part of the patch. Or I could split it out without using it anywhere. Ah, I did that already in I66c735c79e982388f06b5de783aa584c9d13569e ... I'm open for opinions here. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 14:24:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 14:32:14 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 14:32:14 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15953 ) Change subject: add full SDP codec information to the MNCC socket ...................................................................... Patch Set 1: (2 comments) > I could split out the SDP parsing stuff, but then that would have no callers. ah, also did that in If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/include/osmocom/msc/transaction.h File include/osmocom/msc/transaction.h: https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/include/osmocom/msc/transaction.h at a90 PS1, Line 90: /* if true, TCH_RTP_CREATE is sent after the > Removing this seems non-related? indeed, thx https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/src/libmsc/gsm_04_08_cc.c File src/libmsc/gsm_04_08_cc.c: https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/src/libmsc/gsm_04_08_cc.c at 634 PS1, Line 634: trans_free(trans); > trans->callref = 0 needed here? no, because I still want to effect a CC Release during trans_free(). Setting callref = 0 is a quite hacky way of skipping all the CC and MNCC release code. I'm adding the mncc_release_sent flag instead to do MNCC release only once. It should use the mncc_call fsm, but that's future. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 14:32:14 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 14:42:51 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 14:42:51 +0000 Subject: Change in libosmocore[master]: gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uin... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15955 ) Change subject: gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uint32_t ...................................................................... gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uint32_t New fields are put inside a union to keep backward compatibility with potential older users of the struct. Change-Id: I235635800c0de47b1e2b9ec9c7191418f6003554 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 28 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/55/15955/1 diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 68ec4e3..8370eca 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -889,13 +889,25 @@ #if OSMO_IS_LITTLE_ENDIAN uint8_t spare:4, key_seq:4; - uint32_t classmark2; + union { + uint32_t classmark2; /* Backward compatibility */ + struct { + uint8_t cm2_len; + struct gsm48_classmark2 cm2; + }; + }; uint8_t mi_len; uint8_t mi[0]; #elif OSMO_IS_BIG_ENDIAN /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t key_seq:4, spare:4; - uint32_t classmark2; + union { + uint32_t classmark2; /* Backward compatibility */ + struct { + uint8_t cm2_len; + struct gsm48_classmark2 cm2; + }; + }; uint8_t mi_len; uint8_t mi[0]; #endif @@ -1027,15 +1039,26 @@ #if OSMO_IS_LITTLE_ENDIAN uint8_t cm_service_type : 4, cipher_key_seq : 4; - /* length + 3 bytes */ - uint32_t classmark; + union { + uint32_t classmark; /* Backward compatibility */ + struct { + uint8_t cm2_len; + struct gsm48_classmark2 classmark2; + }; + }; uint8_t mi_len; uint8_t mi[0]; /* optional priority level */ #elif OSMO_IS_BIG_ENDIAN /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t cipher_key_seq:4, cm_service_type:4; - uint32_t classmark; + union { + uint32_t classmark; /* Backward compatibility */ + struct { + uint8_t cm2_len; + struct gsm48_classmark2 classmark2; + }; + }; uint8_t mi_len; uint8_t mi[0]; #endif -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15955 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I235635800c0de47b1e2b9ec9c7191418f6003554 Gerrit-Change-Number: 15955 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 14:46:42 2019 From: gerrit-no-reply at lists.osmocom.org (mqng2) Date: Mon, 4 Nov 2019 14:46:42 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config In-Reply-To: References: Message-ID: mqng2 has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15934 ) Change subject: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd Gerrit-Change-Number: 15934 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 14:46:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 14:47:12 2019 From: gerrit-no-reply at lists.osmocom.org (mqng2) Date: Mon, 4 Nov 2019 14:47:12 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config In-Reply-To: References: Message-ID: mqng2 has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15934 ) Change subject: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config ...................................................................... Patch Set 2: Code-Review+1 > Patch Set 2: Code-Review+2 It looks good to me. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd Gerrit-Change-Number: 15934 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 14:47:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 14:58:54 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 14:58:54 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: log descriptions in color with -v In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15951 ) Change subject: msc_vlr_tests: log descriptions in color with -v ...................................................................... Patch Set 1: (3 comments) https://gerrit.osmocom.org/c/osmo-msc/+/15951/1/tests/msc_vlr/msc_vlr_tests.h File tests/msc_vlr/msc_vlr_tests.h: https://gerrit.osmocom.org/c/osmo-msc/+/15951/1/tests/msc_vlr/msc_vlr_tests.h at 42 PS1, Line 42: if (_log_lines) \ this flag is true with './msc_vlr_test_foo -v' https://gerrit.osmocom.org/c/osmo-msc/+/15951/1/tests/msc_vlr/msc_vlr_tests.c File tests/msc_vlr/msc_vlr_tests.c: https://gerrit.osmocom.org/c/osmo-msc/+/15951/1/tests/msc_vlr/msc_vlr_tests.c at 1120 PS1, Line 1120: cmdline_opts.verbose = true; here https://gerrit.osmocom.org/c/osmo-msc/+/15951/1/tests/msc_vlr/msc_vlr_tests.c at 1210 PS1, Line 1210: _log_lines = cmdline_opts.verbose; here -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d Gerrit-Change-Number: 15951 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 14:58:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 15:05:51 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 15:05:51 +0000 Subject: Change in osmo-msc[master]: MNCC: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC: add optional SDP to the socket protocol ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/15948/1/src/libmsc/mncc.c File src/libmsc/mncc.c: https://gerrit.osmocom.org/c/osmo-msc/+/15948/1/src/libmsc/mncc.c at 266 PS1, Line 266: * char sdp[] starts with a '\0'. */ > I'd better don't rely on msgb being zero-filled and mark the related byte = 0. but msgb_alloc_c() has: /* Manually zero-initialize allocated memory */ memset(msg, 0x00, sizeof(*msg) + size); So why, are you aiming at future alternative msgb implementations? To write a '\0' to a msgb's unused data part, we would have to manually check that we're not writing past the allocated mem. I'd rather not dup that validation out of msgb.c... Ah ok, I could msgb_put_u8() and then remove that again. But seems unnecessary? Plus I'd rather not modify the msgb we got from incoming data, as a sane premise. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 15:05:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 15:14:06 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 15:14:06 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15947 ) Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... Patch Set 1: > Patch Set 1: > > doesn't it much rather make sense to have at least a helper library containing those things that you are copy+pasting here? something like libosmo-sdp-utils, which then can be used by any of the actual parser codebases? Copy+Pasting of such code really hurts me :/ Indeed, but my idea was to do that in a separate patch set. I didn't want to blow up the current task. When we want to use this SDP parsing in osmo-mgw, that likely triggers a rund of MGCP refactoring. I have plans there, being that we should be able to fully control SDP in MGCP messages instead of using the struct mgcp_conn_peer (so far a bit of a bottleneck for what we are able to express in SDP). That also has implications for osmo-bsc. So it is sort of a perpendicular other task with tails on it. We could add an SDP lib in osmo-mgw without using it there... but: To not get pulled into that and to not stretch this patch across git reposes, I thought of this as an SDP parsing incubator, and we can move to osmo-mgw (or libosmocore even) when it has matured. I guess it has pretty much matured when this patch set gets accepted, and we can decide when to apply in osmo-mgw. Does that sound acceptable? -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 15:14:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 15:18:01 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 4 Nov 2019 15:18:01 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15934 ) Change subject: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config ...................................................................... Patch Set 2: Verified+1 I've tested this patch manually, and it fixes the problem for me. I also have a draft TTCN-3 test case (see fixeria/si3_ccch_conf), but I am not sure how should we check different CCCH combinations without changing the configuration files in docker-playground. Any ideas? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd Gerrit-Change-Number: 15934 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 15:18:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 16:02:34 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 4 Nov 2019 16:02:34 +0000 Subject: Change in osmo-ttcn3-hacks[master]: WIP References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15956 ) Change subject: WIP ...................................................................... WIP Change-Id: I5e3cbcf3c915f62913bec3423e14ba9152c7ba2f --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M library/L3_Templates.ttcn 3 files changed, 34 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/15956/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index e7a4c13..0a472cb 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -4372,6 +4372,31 @@ } } +/* Establish signalling channel (non-assignment case) followed by cipher mode */ +private function f_tc_lu_classmark_pwr_lvl(charstring id) runs on MSC_ConnHdlr { + var template PDU_BSSAP exp_compl := f_gen_exp_compl(); + var PDU_BSSAP ass_cmd := f_gen_ass_req(); + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeSIGNAL); + ass_cmd.pdu.bssmap.assignmentRequest.circuitIdentityCode := omit; + ass_cmd.pdu.bssmap.assignmentRequest.aoIPTransportLayer := omit; + exp_compl.pdu.bssmap.assignmentComplete.circuitIdentityCode := omit; + exp_compl.pdu.bssmap.assignmentComplete.aoIPTransportLayer := omit; + + f_establish_fully(ass_cmd, exp_compl); + log("Done with first assignment, starting second assignment"); + f_create_chan_and_exp(); +} +testcase TC_lu_classmark_pwr_lvl() runs on test_CT { + var MSC_ConnHdlr vc_conn; + var TestHdlrParams pars := f_gen_test_hdlr_pars(); + pars.cm2.rf_PowerCapability := '001'B; /* DCS 1800 power class 2, max power lvl = 3 (24dBm) */ + + f_init(1, true); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_tc_ciph_mode_a5), pars); + vc_conn.done; +} + /* Dyn PDCH todo: * activate OSMO as TCH/F @@ -4541,6 +4566,9 @@ execute( TC_chopped_ipa_ping() ); execute( TC_chopped_ipa_payload() ); + /* Power control related */ + execute( TC_lu_classmark_pwr_lvl() ); + /* at bottom as they might crash OsmoBSC before OS#3182 is fixed */ execute( TC_early_conn_fail() ); execute( TC_late_conn_fail() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 8091d8d..12e11fa 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -526,6 +526,7 @@ TestHdlrEncrParams encr optional, TestHdlrParamsLcls lcls, TestHdlrParamsHandover handover optional, + MobileStationClassmark2_LV cm2, uint5_t exp_ms_power_level, boolean aoip, boolean use_osmux @@ -552,6 +553,7 @@ adjust_cx_exp := true }, handover := omit, + cm2 := ts_CM2, exp_ms_power_level := 7, /* calculated from osmo-bsc.cfg "ms max power" */ aoip := true, use_osmux := false @@ -559,7 +561,7 @@ function f_create_chan_and_exp() runs on MSC_ConnHdlr { var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi)); - var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi)); + var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi, g_pars.cm2)); var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info); /* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */ @@ -770,7 +772,7 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "IE MS Power not found in CHAN ACT"); } else { if (not match(ms_power.ms_power, tr_RSL_IE_MS_Power(g_pars.exp_ms_power_level, false))) { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Wrong MS Power IE in CHAN ACT"); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Wrong MS Power IE in CHAN ACT, ", ms_power.ms_power.power_level, " vs exp ", g_pars.exp_ms_power_level)); } } diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 0556c97..d183097 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -202,7 +202,7 @@ }; /* Send template for CM SERVICE REQUEST */ -template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(CmServiceType serv_type, MobileIdentityLV mi_lv) := { +template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(CmServiceType serv_type, MobileIdentityLV mi_lv, MobileStationClassmark2_LV cm2) := { discriminator := '0000'B, /* overwritten */ tiOrSkip := { skipIndicator := '0000'B @@ -214,7 +214,7 @@ nsd := '00'B, cm_ServiceType := int2bit(enum2int(serv_type), 4), cipheringKeySequenceNumber := { '000'B, '0'B }, - mobileStationClassmark2 := ts_CM2, + mobileStationClassmark2 := cm2, mobileIdentity := mi_lv, priorityLevel := omit, additionalUpdateParameterTV := omit, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15956 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5e3cbcf3c915f62913bec3423e14ba9152c7ba2f Gerrit-Change-Number: 15956 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 18:13:50 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 18:13:50 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... utils.h: add OSMO_NAME_C_IMPL() macro Provide a common implementation for foo_name_c() functions that base on foo_name_buf() functions. char *foo_name_c(void *ctx, example_t arg) { OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg) } Rationale: the most efficient way of composing strings that have optional parts or require loops for composition is by writing to a ready char[], and this in turn is easiest done by using OSMO_STRBUF_* API. Using such a basic name string implementation which typically returns a length, I often want a more convenient version that returns a char*, which can just be inlined in a "%s" string format -- crucially: skipping string composition when inlined in a LOGP(). This common implementation allows saving code dup, only the function signature is needed. Why not include the function signature in the macro? The two sets of varargs (1: signature args, 2: function call args) are hard to do. Also, having an explicit signature is good for readability and code grepping / ctags. Upcoming uses: in libosmocore in the mslookup (D-GSM) implementation (osmo_mslookup_result_name_c()), and in osmo_msc's codec negotiation implementation (sdp_audio_codecs_name_c(), sdp_msg_name_c(), ...). I54b6c0810f181259da307078977d9ef3d90458c9 (libosmocore) If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 (osmo-msc) Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 --- M include/osmocom/core/utils.h M tests/utils/utils_test.c M tests/utils/utils_test.ok 3 files changed, 157 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/15957/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 601bb56..4eba987 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -269,4 +270,61 @@ bool osmo_str_startswith(const char *str, const char *startswith_str); +/*! Translate a buffer function to a talloc context function. + * This is the full function body of a char *foo_name_c(void *ctx, val...) function, implemented by an + * int foo_name_buf(buf, buflen, val...) function: + * + * char *foo_name_c(void *ctx, example_t arg) + * { + * OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg) + * } + * + * Return a talloc'd string containing the result of the given foo_name_buf() function, or ON_ERROR on error in the called + * foo_name_buf() function. + * + * If ON_ERROR is NULL, the function returns NULL on error rc from FUNC_BUF. Take care: returning NULL in printf() like + * formats (LOGP()) makes the program crash. If ON_ERROR is non-NULL, it must be a string constant, which is not + * returned directly, but written to an allocated string buffer first. + * + * \param[in] INITIAL_BUFSIZE Which size to first talloc from ctx -- a larger size makes a reallocation less likely, a + * smaller size allocates less unused bytes, zero allocates once but still runs the string composition twice. + * \param[in] ON_ERROR String constant to copy on error rc returned by FUNC_BUF, or NULL to return NULL. + * \param[in] FUNC_BUF Name of a function with signature foo_buf(char *buf, size_t buflen, ...). + * \param[in] FUNC_BUF_ARGS Additional arguments to pass to FUNC_BUF after the buf and buflen. + */ +#define OSMO_NAME_C_IMPL(CTX, INITIAL_BUFSIZE, ON_ERROR, FUNC_BUF, FUNC_BUF_ARGS...) \ + size_t len = INITIAL_BUFSIZE; \ + int needed; \ + char *str = NULL; \ + if (INITIAL_BUFSIZE > 0) { \ + str = (char*)talloc_named_const(CTX, len, __func__); \ + OSMO_ASSERT(str); \ + } \ + needed = FUNC_BUF(str, len, ## FUNC_BUF_ARGS); \ + if (needed < 0) \ + goto OSMO_NAME_C_on_error; \ + if (needed < len) \ + return str; \ + len = needed + 1; \ + if (str) { \ + str = (char*)talloc_realloc_size(CTX, str, len); \ + talloc_set_name_const(str, __func__); \ + } else \ + str = (char*)talloc_named_const(CTX, len, __func__); \ + OSMO_ASSERT(str); \ + needed = FUNC_BUF(str, len, ## FUNC_BUF_ARGS); \ + if (needed < 0) \ + goto OSMO_NAME_C_on_error; \ + return str; \ + OSMO_NAME_C_on_error: \ + /* Re-using and re-sizing above allocated buf ends up in very complex code. Just free and strdup. */ \ + if (str) \ + talloc_free(str); \ + if (!ON_ERROR) \ + return NULL; \ + str = talloc_strdup(CTX, ON_ERROR); \ + OSMO_ASSERT(str); \ + talloc_set_name_const(str, __func__); \ + return str; + /*! @} */ diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index 70d017f..532bdbf 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -1058,6 +1058,87 @@ startswith_test_str("abc", "xyz", false); } +static int foo_name_buf(char *buf, size_t buflen, const char *arg) +{ + if (!arg) + return -EINVAL; + return snprintf(buf, buflen, "%s", arg); +} + +static char *foo_name_c(void *ctx, const char *arg) +{ + OSMO_NAME_C_IMPL(ctx, 10, "ERROR", foo_name_buf, arg) +} + +static char *foo_name_c_null(void *ctx, const char *arg) +{ + OSMO_NAME_C_IMPL(ctx, 10, NULL, foo_name_buf, arg) +} + +static char *foo_name_c_zero(void *ctx, const char *arg) +{ + OSMO_NAME_C_IMPL(ctx, 0, "ERROR", foo_name_buf, arg) +} + +static char *foo_name_c_zero_null(void *ctx, const char *arg) +{ + OSMO_NAME_C_IMPL(ctx, 0, NULL, foo_name_buf, arg) +} + + +static void name_c_impl_test() +{ + char *test_strs[] = { + "test", + "longer than 10 chars", + NULL, + }; + struct { + const char *label; + char *(*func)(void *, const char*); + } funcs[] = { + { + "OSMO_NAME_C_IMPL(10, \"ERROR\")", + foo_name_c, + }, + { + "OSMO_NAME_C_IMPL(10, NULL)", + foo_name_c_null, + }, + { + "OSMO_NAME_C_IMPL(0, \"ERROR\")", + foo_name_c_zero, + }, + { + "OSMO_NAME_C_IMPL(0, NULL)", + foo_name_c_zero_null, + }, + }; + + int i; + void *ctx = talloc_named_const(NULL, 0, __func__); + int allocs = talloc_total_blocks(ctx); + + printf("\n%s\n", __func__); + for (i = 0; i < ARRAY_SIZE(test_strs); i++) { + char *test_str = test_strs[i]; + int j; + printf("%2d: %s\n", i, osmo_quote_str(test_str, -1)); + + for (j = 0; j < ARRAY_SIZE(funcs); j++) { + char *str = funcs[j].func(ctx, test_str); + printf(" %30s -> %s", funcs[j].label, osmo_quote_str(str, -1)); + printf(" allocated %d", (int)talloc_total_blocks(ctx) - allocs); + if (str) { + printf(" %zu bytes, name '%s'", talloc_total_size(str), talloc_get_name(str)); + talloc_free(str); + } + printf("\n"); + } + } + talloc_free(ctx); +} + int main(int argc, char **argv) { static const struct log_info log_info = {}; @@ -1078,5 +1159,6 @@ strbuf_test(); strbuf_test_nolen(); startswith_test(); + name_c_impl_test(); return 0; } diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index c150a8d..b603647 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -360,3 +360,20 @@ osmo_str_startswith("abc", "abc") == true osmo_str_startswith("abc", "abcd") == false osmo_str_startswith("abc", "xyz") == false + +name_c_impl_test + 0: "test" + OSMO_NAME_C_IMPL(10, "ERROR") -> "test" allocated 1 10 bytes, name 'foo_name_c' + OSMO_NAME_C_IMPL(10, NULL) -> "test" allocated 1 10 bytes, name 'foo_name_c_null' + OSMO_NAME_C_IMPL(0, "ERROR") -> "test" allocated 1 5 bytes, name 'foo_name_c_zero' + OSMO_NAME_C_IMPL(0, NULL) -> "test" allocated 1 5 bytes, name 'foo_name_c_zero_null' + 1: "longer than 10 chars" + OSMO_NAME_C_IMPL(10, "ERROR") -> "longer than 10 chars" allocated 1 21 bytes, name 'foo_name_c' + OSMO_NAME_C_IMPL(10, NULL) -> "longer than 10 chars" allocated 1 21 bytes, name 'foo_name_c_null' + OSMO_NAME_C_IMPL(0, "ERROR") -> "longer than 10 chars" allocated 1 21 bytes, name 'foo_name_c_zero' + OSMO_NAME_C_IMPL(0, NULL) -> "longer than 10 chars" allocated 1 21 bytes, name 'foo_name_c_zero_null' + 2: NULL + OSMO_NAME_C_IMPL(10, "ERROR") -> "ERROR" allocated 1 6 bytes, name 'foo_name_c' + OSMO_NAME_C_IMPL(10, NULL) -> NULL allocated 0 + OSMO_NAME_C_IMPL(0, "ERROR") -> "ERROR" allocated 1 6 bytes, name 'foo_name_c_zero' + OSMO_NAME_C_IMPL(0, NULL) -> NULL allocated 0 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 18:13:51 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 18:13:51 +0000 Subject: Change in libosmocore[master]: test: add OSMO_SOCKADDR_STR_FMT to sockaddr_str_test.c References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15958 ) Change subject: test: add OSMO_SOCKADDR_STR_FMT to sockaddr_str_test.c ...................................................................... test: add OSMO_SOCKADDR_STR_FMT to sockaddr_str_test.c This shows the weird format choice for showing IPv6 addresses' port, fixed in subsequent patch. Change-Id: I8e5ebfbbc3a2b88aed820e8f845d9f6ededb29de --- M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 2 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/58/15958/1 diff --git a/tests/sockaddr_str/sockaddr_str_test.c b/tests/sockaddr_str/sockaddr_str_test.c index 4284387..bf7d738 100644 --- a/tests/sockaddr_str/sockaddr_str_test.c +++ b/tests/sockaddr_str/sockaddr_str_test.c @@ -107,6 +107,8 @@ printf("\n\n"); dump_oip(x); + printf(" OSMO_SOCKADDR_STR_FMT: '" OSMO_SOCKADDR_STR_FMT "'\n", + OSMO_SOCKADDR_STR_FMT_ARGS(x)); printf(" osmo_sockaddr_str_is_set() = %s\n", osmo_sockaddr_str_is_set(x) ? "true" : "false"); printf(" osmo_sockaddr_str_is_nonzero() = %s\n", osmo_sockaddr_str_is_nonzero(x) ? "true" : "false"); diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index 781e9d1..5ebf7be 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -1,6 +1,7 @@ { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '1.2.3.4:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=01020304 @@ -19,6 +20,7 @@ { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } + OSMO_SOCKADDR_STR_FMT: '0.0.0.0:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=00000000 @@ -37,6 +39,7 @@ { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } + OSMO_SOCKADDR_STR_FMT: '255.255.255.255:65535' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=ffffffff @@ -55,6 +58,7 @@ { .af = AF_INET, .ip = "0.0.0.256", .port = 1 } + OSMO_SOCKADDR_STR_FMT: '0.0.0.256:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -68,6 +72,7 @@ { .af = AF_INET, .ip = "not an ip address", .port = 1 } + OSMO_SOCKADDR_STR_FMT: 'not an ip address:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -81,6 +86,7 @@ { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '1:2:3::4:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -97,6 +103,7 @@ { .af = AF_INET6, .ip = "::", .port = 0 } + OSMO_SOCKADDR_STR_FMT: ':::0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -113,6 +120,7 @@ { .af = AF_INET6, .ip = "::1", .port = 0 } + OSMO_SOCKADDR_STR_FMT: '::1:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -129,6 +137,7 @@ { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } + OSMO_SOCKADDR_STR_FMT: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff:65535' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -145,6 +154,7 @@ { .af = AF_INET6, .ip = "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", .port = 65535 } + OSMO_SOCKADDR_STR_FMT: 'FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:65535' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -164,6 +174,7 @@ { .af = AF_INET6, .ip = "::fffff", .port = 1 } + OSMO_SOCKADDR_STR_FMT: '::fffff:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -177,6 +188,7 @@ { .af = AF_INET6, .ip = "not an ip address", .port = 1 } + OSMO_SOCKADDR_STR_FMT: 'not an ip address:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -190,6 +202,7 @@ { .af = AF_INET6, .ip = "1.2.3.4", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '1.2.3.4:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -204,6 +217,7 @@ { .af = AF_INET, .ip = "1:2:3::4", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '1:2:3::4:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -218,6 +232,7 @@ { .af = AF_UNSPEC, .ip = "1.2.3.4", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '1.2.3.4:5' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -232,6 +247,7 @@ { .af = AF_INET, .ip = "", .port = 5 } + OSMO_SOCKADDR_STR_FMT: ':5' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -245,6 +261,7 @@ { .af = AF_INET6, .ip = "", .port = 5 } + OSMO_SOCKADDR_STR_FMT: ':5' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -258,6 +275,7 @@ { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } + OSMO_SOCKADDR_STR_FMT: '1.2.3.4:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=01020304 @@ -276,6 +294,7 @@ { .af = AF_INET, .ip = "1.2.3:4:5", .port = 0 } + OSMO_SOCKADDR_STR_FMT: '1.2.3:4:5:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -290,6 +309,7 @@ { .af = AF_INET6, .ip = "::1:10.9.8.7", .port = 1 } + OSMO_SOCKADDR_STR_FMT: '::1:10.9.8.7:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -309,6 +329,7 @@ { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '0.0.0.0:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=00000000 @@ -327,6 +348,7 @@ { .af = AF_INET6, .ip = "::", .port = 5 } + OSMO_SOCKADDR_STR_FMT: ':::5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15958 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I8e5ebfbbc3a2b88aed820e8f845d9f6ededb29de Gerrit-Change-Number: 15958 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 18:13:51 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 18:13:51 +0000 Subject: Change in libosmocore[master]: fix OSMO_SOCKADDR_STR_FMT for IPv6 References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15959 ) Change subject: fix OSMO_SOCKADDR_STR_FMT for IPv6 ...................................................................... fix OSMO_SOCKADDR_STR_FMT for IPv6 The format prints IP:port separated by a colon, which of course is confusing when the IPv6 address itself contains mostly colons. The new format adds square braces. cafe:face::1:42 -> [cafe:face::1]:42 The IPv4 format remains unchanged: 1.2.3.4:42 Change-Id: I161f8427729ae31be0eac719b7a4a9290715e37f --- M include/osmocom/core/sockaddr_str.h M tests/sockaddr_str/sockaddr_str_test.ok 2 files changed, 17 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/15959/1 diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index d47b2a4..6dd428c 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -61,8 +61,12 @@ * struct osmo_sockaddr_str *my_sockaddr_str = ...; * printf("got " OSMO_SOCKADDR_STR_FMT "\n", OSMO_SOCKADDR_STR_FMT_ARGS(my_sockaddr_str)); */ -#define OSMO_SOCKADDR_STR_FMT "%s:%u" -#define OSMO_SOCKADDR_STR_FMT_ARGS(R) ((R)? (R)->ip : "NULL"), ((R)? (R)->port : 0) +#define OSMO_SOCKADDR_STR_FMT "%s%s%s:%u" +#define OSMO_SOCKADDR_STR_FMT_ARGS(R) \ + ((R) && (R)->af == AF_INET6)? "[" : "", \ + (R)? (R)->ip : "NULL", \ + ((R) && (R)->af == AF_INET6)? "]" : "", \ + (R)? (R)->port : 0 bool osmo_sockaddr_str_is_set(const struct osmo_sockaddr_str *sockaddr_str); bool osmo_sockaddr_str_is_nonzero(const struct osmo_sockaddr_str *sockaddr_str); diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index 5ebf7be..bc18225 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -86,7 +86,7 @@ { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } - OSMO_SOCKADDR_STR_FMT: '1:2:3::4:5' + OSMO_SOCKADDR_STR_FMT: '[1:2:3::4]:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -103,7 +103,7 @@ { .af = AF_INET6, .ip = "::", .port = 0 } - OSMO_SOCKADDR_STR_FMT: ':::0' + OSMO_SOCKADDR_STR_FMT: '[::]:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -120,7 +120,7 @@ { .af = AF_INET6, .ip = "::1", .port = 0 } - OSMO_SOCKADDR_STR_FMT: '::1:0' + OSMO_SOCKADDR_STR_FMT: '[::1]:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -137,7 +137,7 @@ { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } - OSMO_SOCKADDR_STR_FMT: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff:65535' + OSMO_SOCKADDR_STR_FMT: '[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -154,7 +154,7 @@ { .af = AF_INET6, .ip = "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", .port = 65535 } - OSMO_SOCKADDR_STR_FMT: 'FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:65535' + OSMO_SOCKADDR_STR_FMT: '[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -174,7 +174,7 @@ { .af = AF_INET6, .ip = "::fffff", .port = 1 } - OSMO_SOCKADDR_STR_FMT: '::fffff:1' + OSMO_SOCKADDR_STR_FMT: '[::fffff]:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -188,7 +188,7 @@ { .af = AF_INET6, .ip = "not an ip address", .port = 1 } - OSMO_SOCKADDR_STR_FMT: 'not an ip address:1' + OSMO_SOCKADDR_STR_FMT: '[not an ip address]:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -202,7 +202,7 @@ { .af = AF_INET6, .ip = "1.2.3.4", .port = 5 } - OSMO_SOCKADDR_STR_FMT: '1.2.3.4:5' + OSMO_SOCKADDR_STR_FMT: '[1.2.3.4]:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -261,7 +261,7 @@ { .af = AF_INET6, .ip = "", .port = 5 } - OSMO_SOCKADDR_STR_FMT: ':5' + OSMO_SOCKADDR_STR_FMT: '[]:5' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -309,7 +309,7 @@ { .af = AF_INET6, .ip = "::1:10.9.8.7", .port = 1 } - OSMO_SOCKADDR_STR_FMT: '::1:10.9.8.7:1' + OSMO_SOCKADDR_STR_FMT: '[::1:10.9.8.7]:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -348,7 +348,7 @@ { .af = AF_INET6, .ip = "::", .port = 5 } - OSMO_SOCKADDR_STR_FMT: ':::5' + OSMO_SOCKADDR_STR_FMT: '[::]:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15959 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I161f8427729ae31be0eac719b7a4a9290715e37f Gerrit-Change-Number: 15959 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 18:13:51 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 18:13:51 +0000 Subject: Change in libosmocore[master]: OSMO_SOCKADDR_STR_FMT: indicate weird non-AF_INET/AF_INET6 setting References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15960 ) Change subject: OSMO_SOCKADDR_STR_FMT: indicate weird non-AF_INET/AF_INET6 setting ...................................................................... OSMO_SOCKADDR_STR_FMT: indicate weird non-AF_INET/AF_INET6 setting Change-Id: Ia8dd7fcc96ac5b71bdb4dbde1daea4887fa753b0 --- M include/osmocom/core/sockaddr_str.h M tests/sockaddr_str/sockaddr_str_test.ok 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/15960/1 diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index 6dd428c..aa3da6a 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -61,8 +61,9 @@ * struct osmo_sockaddr_str *my_sockaddr_str = ...; * printf("got " OSMO_SOCKADDR_STR_FMT "\n", OSMO_SOCKADDR_STR_FMT_ARGS(my_sockaddr_str)); */ -#define OSMO_SOCKADDR_STR_FMT "%s%s%s:%u" +#define OSMO_SOCKADDR_STR_FMT "%s%s%s%s:%u" #define OSMO_SOCKADDR_STR_FMT_ARGS(R) \ + ((R) && ((R)->af == AF_INET || (R)->af == AF_INET6)) ? "" : "(AF_UNSPEC)", \ ((R) && (R)->af == AF_INET6)? "[" : "", \ (R)? (R)->ip : "NULL", \ ((R) && (R)->af == AF_INET6)? "]" : "", \ diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index bc18225..52636f0 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -232,7 +232,7 @@ { .af = AF_UNSPEC, .ip = "1.2.3.4", .port = 5 } - OSMO_SOCKADDR_STR_FMT: '1.2.3.4:5' + OSMO_SOCKADDR_STR_FMT: '(AF_UNSPEC)1.2.3.4:5' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15960 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia8dd7fcc96ac5b71bdb4dbde1daea4887fa753b0 Gerrit-Change-Number: 15960 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 18:13:52 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 18:13:52 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() and _str_ip_cmp() References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15961 ) Change subject: add osmo_sockaddr_str_cmp() and _str_ip_cmp() ...................................................................... add osmo_sockaddr_str_cmp() and _str_ip_cmp() Currently planned user: for Distributed GSM in osmo-hlr: setting per-MSC service addresses in VTY: replace/remove existing entries. osmo_sockaddr_str_cmp() is useful to sort existing entries, while showing possible duplicates evaluating to the same actual IP address bytes. osmo_sockaddr_str_ip_cmp() is useful to catch identical resulting IP addresses, regardless of differing strings (e.g. '0::' and '::' are equal but differ in strings). Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 --- M include/osmocom/core/sockaddr_str.h M include/osmocom/core/utils.h M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 5 files changed, 1,263 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/15961/1 diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index aa3da6a..0511771 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -71,6 +71,8 @@ bool osmo_sockaddr_str_is_set(const struct osmo_sockaddr_str *sockaddr_str); bool osmo_sockaddr_str_is_nonzero(const struct osmo_sockaddr_str *sockaddr_str); +int osmo_sockaddr_str_cmp(const struct osmo_sockaddr_str *a, const struct osmo_sockaddr_str *b); +int osmo_sockaddr_str_ip_cmp(const struct osmo_sockaddr_str *a, const struct osmo_sockaddr_str *b); int osmo_sockaddr_str_from_str(struct osmo_sockaddr_str *sockaddr_str, const char *ip, uint16_t port); diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 4eba987..508b6b6 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -22,6 +22,8 @@ #define OSMO_MAX(a, b) ((a) >= (b) ? (a) : (b)) /*! Return the minimum of two specified values */ #define OSMO_MIN(a, b) ((a) >= (b) ? (b) : (a)) +/*! Return a typical cmp result for comparable entities a and b. */ +#define OSMO_CMP(a, b) ((a) < (b)? -1 : ((a) > (b)? 1 : 0)) /*! Stringify the name of a macro x, e.g. an FSM event name. * Note: if nested within another preprocessor macro, this will * stringify the value of x instead of its name. */ diff --git a/src/sockaddr_str.c b/src/sockaddr_str.c index f523050..0d824d9 100644 --- a/src/sockaddr_str.c +++ b/src/sockaddr_str.c @@ -95,6 +95,86 @@ } } +/*! Compare two osmo_sockaddr_str instances by string comparison. + * Compare IP versions (AF_INET vs AF_INET6), use strcmp() for the address and compare port numbers. + * \param[in] a left side of comparison. + * \param[in] b right side of comparison. + * \return -1 if a < b, 0 if a == b, 1 if a > b. + */ +int osmo_sockaddr_str_cmp(const struct osmo_sockaddr_str *a, const struct osmo_sockaddr_str *b) +{ + int cmp; + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + cmp = OSMO_CMP(a->af, b->af); + if (cmp) + return cmp; + cmp = strncmp(a->ip, b->ip, sizeof(a->ip)); + if (cmp) + return cmp; + cmp = OSMO_CMP(a->port, b->port); + if (cmp) + return cmp; + return 0; +} + +/*! Compare two osmo_sockaddr_str instances by resulting IP address. + * Compare IP versions (AF_INET vs AF_INET6), compare resulting IP address bytes and compare port numbers. + * If the IP address strings cannot be parsed successfully / if the 'af' is neither AF_INET nor AF_INET6, fall back to + * osmo_sockaddr_str_cmp(). + * \param[in] a left side of comparison. + * \param[in] b right side of comparison. + * \return -1 if a < b, 0 if a == b, 1 if a > b. + */ +int osmo_sockaddr_str_ip_cmp(const struct osmo_sockaddr_str *a, const struct osmo_sockaddr_str *b) +{ + int cmp; + uint32_t ipv4_a, ipv4_b; + struct in6_addr ipv6_a = {}, ipv6_b = {}; + + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + cmp = OSMO_CMP(a->af, b->af); + if (cmp) + return cmp; + switch (a->af) { + case AF_INET: + if (osmo_sockaddr_str_to_32(a, &ipv4_a) + || osmo_sockaddr_str_to_32(b, &ipv4_b)) + goto fallback_to_strcmp; + cmp = OSMO_CMP(ipv4_a, ipv4_b); + break; + + case AF_INET6: + if (osmo_sockaddr_str_to_in6_addr(a, &ipv6_a) + || osmo_sockaddr_str_to_in6_addr(b, &ipv6_b)) + goto fallback_to_strcmp; + cmp = memcmp(&ipv6_a, &ipv6_b, sizeof(ipv6_a)); + break; + + default: + goto fallback_to_strcmp; + } + if (cmp) + return cmp; + + cmp = OSMO_CMP(a->port, b->port); + if (cmp) + return cmp; + return 0; + +fallback_to_strcmp: + return osmo_sockaddr_str_cmp(a, b); +} + /*! Distinguish between valid IPv4 and IPv6 strings. * This does not verify whether the string is a valid IP address; it assumes that the input is a valid IP address, and * on that premise returns whether it is an IPv4 or IPv6 string, by looking for '.' and ':' characters. It is safe to diff --git a/tests/sockaddr_str/sockaddr_str_test.c b/tests/sockaddr_str/sockaddr_str_test.c index bf7d738..3697256 100644 --- a/tests/sockaddr_str/sockaddr_str_test.c +++ b/tests/sockaddr_str/sockaddr_str_test.c @@ -55,6 +55,7 @@ { .af = AF_INET6, .ip = "::1:10.9.8.7", .port = 1 }, { .af = AF_INET, .ip = "0.0.0.0", .port = 5 }, { .af = AF_INET6, .ip = "::", .port = 5 }, + { .af = AF_INET6, .ip = "0::", .port = 5 }, }; const char *af_name(int af) @@ -236,9 +237,57 @@ } +static void test_osmo_sockaddr_str_cmp() +{ + int i; + printf("\n\n%s\n", __func__); + for (i = 0; i < ARRAY_SIZE(oip_data); i++) { + /* use a copy to not hit the pointer comparison in osmo_sockaddr_str_cmp(). */ + struct osmo_sockaddr_str _a = oip_data[i]; + struct osmo_sockaddr_str *a = &_a; + int j; + printf("[%2d]\n", i); + + for (j = 0; j < ARRAY_SIZE(oip_data); j++) { + struct osmo_sockaddr_str *b = &oip_data[j]; + int str_rc = osmo_sockaddr_str_cmp(a, b); + printf(" osmo_sockaddr_str_cmp(): \"" OSMO_SOCKADDR_STR_FMT "\" %s \"" OSMO_SOCKADDR_STR_FMT "\"\n", + OSMO_SOCKADDR_STR_FMT_ARGS(a), + str_rc < 0? "<" : (str_rc == 0? "==" : ">" ), + OSMO_SOCKADDR_STR_FMT_ARGS(b)); + } + } +} + +static void test_osmo_sockaddr_str_ip_cmp() +{ + int i; + printf("\n\n%s\n", __func__); + for (i = 0; i < ARRAY_SIZE(oip_data); i++) { + /* use a copy to not hit the pointer comparison in osmo_sockaddr_str_cmp(). */ + struct osmo_sockaddr_str _a = oip_data[i]; + struct osmo_sockaddr_str *a = &_a; + int j; + printf("[%2d]\n", i); + + for (j = 0; j < ARRAY_SIZE(oip_data); j++) { + struct osmo_sockaddr_str *b = &oip_data[j]; + int ip_rc = osmo_sockaddr_str_ip_cmp(a, b); + printf(" osmo_sockaddr_str_ip_cmp(): " OSMO_SOCKADDR_STR_FMT "%s %s " OSMO_SOCKADDR_STR_FMT "%s\n", + OSMO_SOCKADDR_STR_FMT_ARGS(a), + osmo_sockaddr_str_is_nonzero(a) ? "" : "(zero)", + ip_rc < 0? "<" : (ip_rc == 0? "==" : ">" ), + OSMO_SOCKADDR_STR_FMT_ARGS(b), + osmo_sockaddr_str_is_nonzero(b) ? "" : "(zero)"); + } + } +} + int main(int argc, char **argv) { sockaddr_str_test_conversions(); + test_osmo_sockaddr_str_cmp(); + test_osmo_sockaddr_str_ip_cmp(); return 0; } diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index 52636f0..d8269ed 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -362,3 +362,1133 @@ osmo_sockaddr_str_to_sockaddr() rc == 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } osmo_sockaddr_str_from_str() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + + +{ .af = AF_INET6, .ip = "0::", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '[0::]:5' + osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = false + osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 + osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 + -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + DIFFERS! + osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 + osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 + -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + DIFFERS! + osmo_sockaddr_str_to_sockaddr() rc == 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + -> osmo_sockaddr_str_from_sockaddr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + DIFFERS! + osmo_sockaddr_str_from_str() rc == 0 { .af = AF_INET6, .ip = "0::", .port = 5 } + + +test_osmo_sockaddr_str_cmp +[ 0] + osmo_sockaddr_str_cmp(): "1.2.3.4:5" == "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "not an ip address:1" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[::]:0" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[::1]:0" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" > ":5" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[]:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[::]:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:5" < "[0::]:5" +[ 1] + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" == "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "not an ip address:1" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[::]:0" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[::1]:0" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" > ":5" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[]:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[::]:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:0" < "[0::]:5" +[ 2] + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" == "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "not an ip address:1" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[::]:0" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[::1]:0" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" > ":5" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[]:5" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[::]:5" + osmo_sockaddr_str_cmp(): "255.255.255.255:65535" < "[0::]:5" +[ 3] + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" == "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "not an ip address:1" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[::]:0" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[::1]:0" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" > ":5" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[]:5" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[::]:5" + osmo_sockaddr_str_cmp(): "0.0.0.256:1" < "[0::]:5" +[ 4] + osmo_sockaddr_str_cmp(): "not an ip address:1" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "not an ip address:1" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "not an ip address:1" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "not an ip address:1" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "not an ip address:1" == "not an ip address:1" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[::]:0" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[::1]:0" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "not an ip address:1" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "not an ip address:1" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "not an ip address:1" > ":5" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[]:5" + osmo_sockaddr_str_cmp(): "not an ip address:1" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "not an ip address:1" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "not an ip address:1" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[::]:5" + osmo_sockaddr_str_cmp(): "not an ip address:1" < "[0::]:5" +[ 5] + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" == "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" < "[::]:0" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" < "[::1]:0" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > ":5" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "[]:5" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" < "[::]:5" + osmo_sockaddr_str_cmp(): "[1:2:3::4]:5" > "[0::]:5" +[ 6] + osmo_sockaddr_str_cmp(): "[::]:0" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[::]:0" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[::]:0" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[::]:0" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[::]:0" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[::]:0" > "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[::]:0" == "[::]:0" + osmo_sockaddr_str_cmp(): "[::]:0" < "[::1]:0" + osmo_sockaddr_str_cmp(): "[::]:0" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[::]:0" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[::]:0" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[::]:0" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[::]:0" > "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[::]:0" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[::]:0" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[::]:0" > ":5" + osmo_sockaddr_str_cmp(): "[::]:0" > "[]:5" + osmo_sockaddr_str_cmp(): "[::]:0" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[::]:0" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[::]:0" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[::]:0" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[::]:0" < "[::]:5" + osmo_sockaddr_str_cmp(): "[::]:0" > "[0::]:5" +[ 7] + osmo_sockaddr_str_cmp(): "[::1]:0" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[::1]:0" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[::1]:0" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[::1]:0" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[::1]:0" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[::1]:0" > "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[::1]:0" > "[::]:0" + osmo_sockaddr_str_cmp(): "[::1]:0" == "[::1]:0" + osmo_sockaddr_str_cmp(): "[::1]:0" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[::1]:0" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[::1]:0" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[::1]:0" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[::1]:0" > "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[::1]:0" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[::1]:0" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[::1]:0" > ":5" + osmo_sockaddr_str_cmp(): "[::1]:0" > "[]:5" + osmo_sockaddr_str_cmp(): "[::1]:0" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[::1]:0" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[::1]:0" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[::1]:0" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[::1]:0" > "[::]:5" + osmo_sockaddr_str_cmp(): "[::1]:0" > "[0::]:5" +[ 8] + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "[::]:0" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "[::1]:0" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" == "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > ":5" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "[]:5" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "[::]:5" + osmo_sockaddr_str_cmp(): "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" > "[0::]:5" +[ 9] + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "[::]:0" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "[::1]:0" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" == "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > ":5" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "[]:5" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "[::]:5" + osmo_sockaddr_str_cmp(): "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" > "[0::]:5" +[10] + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "[::]:0" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "[::1]:0" + osmo_sockaddr_str_cmp(): "[::fffff]:1" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[::fffff]:1" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[::fffff]:1" == "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[::fffff]:1" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > ":5" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "[]:5" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "[::]:5" + osmo_sockaddr_str_cmp(): "[::fffff]:1" > "[0::]:5" +[11] + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[::]:0" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[::1]:0" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" == "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > ":5" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[]:5" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[::]:5" + osmo_sockaddr_str_cmp(): "[not an ip address]:1" > "[0::]:5" +[12] + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" < "[::]:0" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" < "[::1]:0" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" == "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > ":5" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "[]:5" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" < "[::]:5" + osmo_sockaddr_str_cmp(): "[1.2.3.4]:5" > "[0::]:5" +[13] + osmo_sockaddr_str_cmp(): "1:2:3::4:5" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "not an ip address:1" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[::]:0" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[::1]:0" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" == "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" > ":5" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[]:5" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[::]:5" + osmo_sockaddr_str_cmp(): "1:2:3::4:5" < "[0::]:5" +[14] + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "not an ip address:1" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[::]:0" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[::1]:0" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" == "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < ":5" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[]:5" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[::]:5" + osmo_sockaddr_str_cmp(): "(AF_UNSPEC)1.2.3.4:5" < "[0::]:5" +[15] + osmo_sockaddr_str_cmp(): ":5" < "1.2.3.4:5" + osmo_sockaddr_str_cmp(): ":5" < "0.0.0.0:0" + osmo_sockaddr_str_cmp(): ":5" < "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): ":5" < "0.0.0.256:1" + osmo_sockaddr_str_cmp(): ":5" < "not an ip address:1" + osmo_sockaddr_str_cmp(): ":5" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): ":5" < "[::]:0" + osmo_sockaddr_str_cmp(): ":5" < "[::1]:0" + osmo_sockaddr_str_cmp(): ":5" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): ":5" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): ":5" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): ":5" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): ":5" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): ":5" < "1:2:3::4:5" + osmo_sockaddr_str_cmp(): ":5" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): ":5" == ":5" + osmo_sockaddr_str_cmp(): ":5" < "[]:5" + osmo_sockaddr_str_cmp(): ":5" < "1.2.3.4:0" + osmo_sockaddr_str_cmp(): ":5" < "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): ":5" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): ":5" < "0.0.0.0:5" + osmo_sockaddr_str_cmp(): ":5" < "[::]:5" + osmo_sockaddr_str_cmp(): ":5" < "[0::]:5" +[16] + osmo_sockaddr_str_cmp(): "[]:5" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[]:5" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[]:5" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[]:5" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[]:5" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[]:5" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[]:5" < "[::]:0" + osmo_sockaddr_str_cmp(): "[]:5" < "[::1]:0" + osmo_sockaddr_str_cmp(): "[]:5" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[]:5" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[]:5" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[]:5" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[]:5" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[]:5" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[]:5" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[]:5" > ":5" + osmo_sockaddr_str_cmp(): "[]:5" == "[]:5" + osmo_sockaddr_str_cmp(): "[]:5" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[]:5" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[]:5" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[]:5" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[]:5" < "[::]:5" + osmo_sockaddr_str_cmp(): "[]:5" < "[0::]:5" +[17] + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "not an ip address:1" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[::]:0" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[::1]:0" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" > ":5" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[]:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" == "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[::]:5" + osmo_sockaddr_str_cmp(): "1.2.3.4:0" < "[0::]:5" +[18] + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "not an ip address:1" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[::]:0" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[::1]:0" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" > ":5" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[]:5" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" == "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[::]:5" + osmo_sockaddr_str_cmp(): "1.2.3:4:5:0" < "[0::]:5" +[19] + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "[::]:0" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "[::1]:0" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > ":5" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "[]:5" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" == "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "[::]:5" + osmo_sockaddr_str_cmp(): "[::1:10.9.8.7]:1" > "[0::]:5" +[20] + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "not an ip address:1" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[::]:0" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[::1]:0" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" > ":5" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[]:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" == "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[::]:5" + osmo_sockaddr_str_cmp(): "0.0.0.0:5" < "[0::]:5" +[21] + osmo_sockaddr_str_cmp(): "[::]:5" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[::]:5" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[::]:5" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[::]:5" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[::]:5" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[::]:5" > "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[::]:5" > "[::]:0" + osmo_sockaddr_str_cmp(): "[::]:5" < "[::1]:0" + osmo_sockaddr_str_cmp(): "[::]:5" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[::]:5" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[::]:5" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[::]:5" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[::]:5" > "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[::]:5" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[::]:5" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[::]:5" > ":5" + osmo_sockaddr_str_cmp(): "[::]:5" > "[]:5" + osmo_sockaddr_str_cmp(): "[::]:5" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[::]:5" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[::]:5" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[::]:5" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[::]:5" == "[::]:5" + osmo_sockaddr_str_cmp(): "[::]:5" > "[0::]:5" +[22] + osmo_sockaddr_str_cmp(): "[0::]:5" > "1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[0::]:5" > "0.0.0.0:0" + osmo_sockaddr_str_cmp(): "[0::]:5" > "255.255.255.255:65535" + osmo_sockaddr_str_cmp(): "[0::]:5" > "0.0.0.256:1" + osmo_sockaddr_str_cmp(): "[0::]:5" > "not an ip address:1" + osmo_sockaddr_str_cmp(): "[0::]:5" < "[1:2:3::4]:5" + osmo_sockaddr_str_cmp(): "[0::]:5" < "[::]:0" + osmo_sockaddr_str_cmp(): "[0::]:5" < "[::1]:0" + osmo_sockaddr_str_cmp(): "[0::]:5" < "[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535" + osmo_sockaddr_str_cmp(): "[0::]:5" < "[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535" + osmo_sockaddr_str_cmp(): "[0::]:5" < "[::fffff]:1" + osmo_sockaddr_str_cmp(): "[0::]:5" < "[not an ip address]:1" + osmo_sockaddr_str_cmp(): "[0::]:5" < "[1.2.3.4]:5" + osmo_sockaddr_str_cmp(): "[0::]:5" > "1:2:3::4:5" + osmo_sockaddr_str_cmp(): "[0::]:5" > "(AF_UNSPEC)1.2.3.4:5" + osmo_sockaddr_str_cmp(): "[0::]:5" > ":5" + osmo_sockaddr_str_cmp(): "[0::]:5" > "[]:5" + osmo_sockaddr_str_cmp(): "[0::]:5" > "1.2.3.4:0" + osmo_sockaddr_str_cmp(): "[0::]:5" > "1.2.3:4:5:0" + osmo_sockaddr_str_cmp(): "[0::]:5" < "[::1:10.9.8.7]:1" + osmo_sockaddr_str_cmp(): "[0::]:5" > "0.0.0.0:5" + osmo_sockaddr_str_cmp(): "[0::]:5" < "[::]:5" + osmo_sockaddr_str_cmp(): "[0::]:5" == "[0::]:5" + + +test_osmo_sockaddr_str_ip_cmp +[ 0] + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 == 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 > :5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < []:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:5 < [0::]:5(zero) +[ 1] + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) == 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < []:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:0(zero) < [0::]:5(zero) +[ 2] + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 == 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 > :5(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < []:5(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): 255.255.255.255:65535 < [0::]:5(zero) +[ 3] + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) == 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < []:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.256:1(zero) < [0::]:5(zero) +[ 4] + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) == not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < []:5(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): not an ip address:1(zero) < [0::]:5(zero) +[ 5] + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 == [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > :5(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [1:2:3::4]:5 > [0::]:5(zero) +[ 6] + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) == [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:0(zero) < [0::]:5(zero) +[ 7] + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) == [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1]:0(zero) > [0::]:5(zero) +[ 8] + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 == [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 == [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > :5(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [0::]:5(zero) +[ 9] + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 == [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 == [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > :5(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [0::]:5(zero) +[10] + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) == [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [::fffff]:1(zero) > [0::]:5(zero) +[11] + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) == [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [not an ip address]:1(zero) > [0::]:5(zero) +[12] + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) == [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [1.2.3.4]:5(zero) > [0::]:5(zero) +[13] + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) == 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < []:5(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): 1:2:3::4:5(zero) < [0::]:5(zero) +[14] + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) == (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < :5(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < []:5(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): (AF_UNSPEC)1.2.3.4:5(zero) < [0::]:5(zero) +[15] + osmo_sockaddr_str_ip_cmp(): :5(zero) < 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): :5(zero) < 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): :5(zero) < 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): :5(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): :5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): :5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) == :5(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < []:5(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): :5(zero) < 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): :5(zero) < [0::]:5(zero) +[16] + osmo_sockaddr_str_ip_cmp(): []:5(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): []:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): []:5(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) == []:5(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): []:5(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): []:5(zero) < [0::]:5(zero) +[17] + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < []:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) == 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3.4:0(zero) < [0::]:5(zero) +[18] + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < []:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) == 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): 1.2.3:4:5:0(zero) < [0::]:5(zero) +[19] + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > :5(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 == [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [::1:10.9.8.7]:1 > [0::]:5(zero) +[20] + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < []:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) == 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): 0.0.0.0:5(zero) < [0::]:5(zero) +[21] + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) == [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [::]:5(zero) == [0::]:5(zero) +[22] + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > 1.2.3.4:5 + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > not an ip address:1(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > [::]:0(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > (AF_UNSPEC)1.2.3.4:5(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > :5(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > []:5(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) == [::]:5(zero) + osmo_sockaddr_str_ip_cmp(): [0::]:5(zero) == [0::]:5(zero) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 4 23:59:56 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 4 Nov 2019 23:59:56 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15947 ) Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... Patch Set 1: (3 comments) https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h File include/osmocom/msc/debug.h: https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h at 38 PS1, Line 38: size_t len = 64; \ > Makes much more sense having len as a param to avoid almost-sure talloc_realloc on some functions. you're right https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h at 40 PS1, Line 40: char *str = (char*)talloc_named_const(ctx, len, #FUNC_BUF "_c()"); \ > where does this "ctx" var come from? it's a required parameter indicated above as foo_name_c(void *ctx, But hold on, I actually moved this to libosmocore in a more generalized fashion, and forgot to apply that here. Ah I remember now, I also needed this in osmo-hlr for the Distributed GSM task. I'll submit that libosmocore patch first and use that here as well. I've taken your points into consideration and submitted https://gerrit.osmocom.org/c/libosmocore/+/15957 https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h at 63 PS1, Line 63: #define NAME_IMPL(FUNC_C, FUNC_C_ARGS...) \ > So you return a talloc'ed pointer on success and a static string pointer on error? That will break w [?] the point being that I want to use this function in printf() formats, and there returning NULL is a crash. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 04 Nov 2019 23:59:56 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:20:01 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:20:01 +0000 Subject: Change in libosmocore[master]: OSMO_SOCKADDR_STR_FMT: indicate weird non-AF_INET/AF_INET6 setting In-Reply-To: References: Message-ID: neels has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15960 ) Change subject: OSMO_SOCKADDR_STR_FMT: indicate weird non-AF_INET/AF_INET6 setting ...................................................................... Abandoned On second thought I don't like it, will print "(AF_UNSPEC)" for all unset addresses, which seems too verbose when seen in the osmo-msc log. It was useful in the sockaddr_str_test.c output, but in real life not so much. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15960 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia8dd7fcc96ac5b71bdb4dbde1daea4887fa753b0 Gerrit-Change-Number: 15960 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:20:32 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:20:32 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15957 to look at the new patch set (#3). Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... utils.h: add OSMO_NAME_C_IMPL() macro Provide a common implementation for foo_name_c() functions that base on foo_name_buf() functions. char *foo_name_c(void *ctx, example_t arg) { OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg) } Rationale: the most efficient way of composing strings that have optional parts or require loops for composition is by writing to a ready char[], and this in turn is easiest done by using OSMO_STRBUF_* API. Using such a basic name string implementation which typically returns a length, I often want a more convenient version that returns a char*, which can just be inlined in a "%s" string format -- crucially: skipping string composition when inlined in a LOGP(). This common implementation allows saving code dup, only the function signature is needed. Why not include the function signature in the macro? The two sets of varargs (1: signature args, 2: function call args) are hard to do. Also, having an explicit signature is good for readability and code grepping / ctags. Upcoming uses: in libosmocore in the mslookup (D-GSM) implementation (osmo_mslookup_result_name_c()), and in osmo_msc's codec negotiation implementation (sdp_audio_codecs_name_c(), sdp_msg_name_c(), ...). I54b6c0810f181259da307078977d9ef3d90458c9 (libosmocore) If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 (osmo-msc) Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 --- M include/osmocom/core/utils.h M tests/utils/utils_test.c M tests/utils/utils_test.ok 3 files changed, 158 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/15957/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:23:06 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:23:06 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() and _str_ip_cmp() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15961 to look at the new patch set (#4). Change subject: add osmo_sockaddr_str_cmp() and _str_ip_cmp() ...................................................................... add osmo_sockaddr_str_cmp() and _str_ip_cmp() Currently planned user: for Distributed GSM in osmo-hlr: setting per-MSC service addresses in VTY: replace/remove existing entries. osmo_sockaddr_str_cmp() is useful to sort existing entries, while showing possible duplicates evaluating to the same actual IP address bytes. osmo_sockaddr_str_ip_cmp() is useful to catch identical resulting IP addresses, regardless of differing strings (e.g. '0::' and '::' are equal but differ in strings). Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 --- M include/osmocom/core/sockaddr_str.h M include/osmocom/core/utils.h M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 5 files changed, 1,263 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/15961/4 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:34:06 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:34:06 +0000 Subject: Change in osmo-msc[master]: BSSMAP: decode Codec List (BSS Supported) In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15946 to look at the new patch set (#2). Change subject: BSSMAP: decode Codec List (BSS Supported) ...................................................................... BSSMAP: decode Codec List (BSS Supported) Actually decode the Codec List (BSS Supported) in BSSMAP, in both the Complete Layer 3 Information and the Assignment Complete messages. An upcoming patch improves codec negotiation and requires the BSS supported codecs, which are so far ignored (which is/was a pity as osmo-bsc goes at great lengths to compose those IEs). Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e --- M include/osmocom/msc/ran_msg.h M src/libmsc/ran_msg_a.c 2 files changed, 32 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/46/15946/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e Gerrit-Change-Number: 15946 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:34:06 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:34:06 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 to look at the new patch set (#2). Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... add sdp_msg API: SDP parsing/composition Rationale: in order to add full SDP to the MNCC protocol (upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f), we need to parse and compose SDP messages. Obviously, libosmo-mgcp-client already contains similar code, but that is unfortunately heavily glued to the actual MGCP implementation. The simplest solution is to create this separate implementation, copy-pasting from the existing libosmo-mgcp-client code as is convenient. Various foo_name() functions are implemented for the sdp_msg API. Each is: a) implemented as foo_name_buf(buf, len, val), b) wrapped as foo_name_c(ctx, val) c) and as foo_name(val), a convienience variant using OTC_SELECT. (a) foo_name_buf() uses osmo_strbuf to write to a fixed-size caller provided buffer: osmo_strbuf is most convenient to implement optional parts / loops. (b) foo_name_c() uses a caller-provided talloc ctx to allocate such buffer; implemented using a generalized NAME_C_IMPL(func_buf, arg) macro, which calls func with an initial size buffer, and reallocates if more space is needed. (c) foo_name() then calls foo_name_c() with the OTC_SELECT context (we know that msc_main.c uses osmo_select_main_ctx()), implemented using a generalized NAME_IMPL() macro, and returns "ERROR" on failure instead of NULL. Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 --- M configure.ac M include/osmocom/msc/Makefile.am A include/osmocom/msc/sdp_msg.h M src/libmsc/Makefile.am A src/libmsc/sdp_msg.c M tests/Makefile.am A tests/sdp_msg/Makefile.am A tests/sdp_msg/sdp_msg_test.c A tests/sdp_msg/sdp_msg_test.err A tests/sdp_msg/sdp_msg_test.ok M tests/testsuite.at 11 files changed, 1,846 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/47/15947/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:34:07 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:34:07 +0000 Subject: Change in osmo-msc[master]: cc trans: remove unused tch_rtp_create References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/15962 ) Change subject: cc trans: remove unused tch_rtp_create ...................................................................... cc trans: remove unused tch_rtp_create Use of this flag was dropped when adding inter-BSC and inter-MSC Handover support, I forgot to remove it. Change-Id: I5ec78e30eb36fbe78a3f7c46bfa44af5a4eb7bf2 --- M include/osmocom/msc/transaction.h M src/libmsc/gsm_04_08_cc.c 2 files changed, 0 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/62/15962/1 diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index 61d8c1a..928b137 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -87,10 +87,6 @@ /* bearer capabilities (rate and codec) */ struct gsm_mncc_bearer_cap bearer_cap; - /* if true, TCH_RTP_CREATE is sent after the - * assignment is done */ - bool tch_rtp_create; - union { struct { diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 792ab61..7e2d70b 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -1655,20 +1655,6 @@ } LOG_TRANS_CAT(trans, DMNCC, LOGL_DEBUG, "rx %s\n", get_mncc_name(MNCC_RTP_CREATE)); - /* 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_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_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. */ - trans->tch_rtp_create = true; - /* Assign call (if not done yet) */ return msc_a_try_call_assignment(trans); } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15962 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5ec78e30eb36fbe78a3f7c46bfa44af5a4eb7bf2 Gerrit-Change-Number: 15962 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:35:02 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:35:02 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: better err logging for dtap msgs In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15949 to look at the new patch set (#2). Change subject: msc_vlr_tests: better err logging for dtap msgs ...................................................................... msc_vlr_tests: better err logging for dtap msgs Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/49/15949/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 Gerrit-Change-Number: 15949 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:35:02 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:35:02 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 to look at the new patch set (#2). Change subject: add full SDP codec information to the MNCC socket ...................................................................... add full SDP codec information to the MNCC socket This way osmo-msc can benefit from the complete codec information received via SIP, which was so far terminated at osmo-sip-connector. osmo-sip-connector could/should have translated the received SDP to MNCC bearer_cap, but this was never implemented properly. Since osmo-msc already handles SDP towards the MGW, it makes most sense to pass SDP to osmo-msc transparently. To be able to send a valid RTP IP:port in the SDP upon the first MNCC_SETUP_IND going out, move the CN side CRCX to the very start of establishing a voice call. As a result, first create MGW conns for both RAN and CN before starting. The voice_call_full.msc chart shows the change in message sequence for MO and MT voice calls. Implement cc_sdp.c, which accumulates codec information from various sources (MS, BSS, Assignment, remote call leg) and provides filtering to get the available set of codecs at any point in time. Implement codec_sdp_cc_t9n.c, to translate between SDP and the various libosmo-mgcp-client, CC and BSSMAP representations of codecs: - Speech Version, - Permitted Speech, - Speech Codec Type, - default Payload Type numbers, - enum mgcp_codecs, - FR/HR compatibility - SDP audio codec names, - various AMR configurations. A codec_map lists these relations in one large data record. Various functions provide conversions by traversing this map. Add trans->cc.mnccc_release_sent: so far, avoiding to send an MNCC release during trans_free() was done by setting the callref = 0. But that also skips CC Release. On codec mismatch, we send a specific MNCC error code but still want a normal CC Release: hence send the MNCC message, set mnccc_release_sent = true and do normal CC Release in trans_free(). (A better way to do this would be to adopt the mncc_call FSM from inter-MSC handover also for local voice calls, but that is out of scope for now. I want to try that soon, as time permits.) Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f --- M doc/sequence_charts/voice_call_full.msc M include/osmocom/msc/Makefile.am M include/osmocom/msc/call_leg.h A include/osmocom/msc/cc_sdp.h A include/osmocom/msc/codec_sdp_cc_t9n.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/msc_a.h M include/osmocom/msc/msc_ho.h M include/osmocom/msc/rtp_stream.h M include/osmocom/msc/sdp_msg.h M include/osmocom/msc/transaction.h M src/libmsc/Makefile.am M src/libmsc/call_leg.c A src/libmsc/cc_sdp.c A src/libmsc/codec_sdp_cc_t9n.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/mncc_call.c M src/libmsc/msc_a.c M src/libmsc/msc_ho.c M src/libmsc/msc_t.c M src/libmsc/rtp_stream.c M src/libmsc/sdp_msg.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sdp_msg/sdp_msg_test.ok 27 files changed, 5,489 insertions(+), 445 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/53/15953/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:43:10 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:43:10 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 to look at the new patch set (#2). Change subject: msc: overhaul voice call testing ...................................................................... msc: overhaul voice call testing * Semantic: We don't really know which side the MSC first creates a CRCX for. Instead of assuming that the RAN side is always CRCX'd first, simply handle a "first" and a "second" CRCX, not making any assumptions which is for which side. Notably, there still are quite a few places assuming which CRCX corresponds to the RAN/CN side, but the changes are sufficient to still pass the tests when osmo-msc swaps the CRCX order; sometimes for slightly obscure reasons, for example because it doesn't matter that the wrong port number is returned during a subsequent MDCX... Cleaning up the rest is still todo for later. Remove code dup from call establishing code, particularly for MGCP. Use f_mo_call_establish() and f_mt_call() where ever possible, to make all of the call establishing tests handle upcoming changes in osmo-msc's order of messages, without re-implementing the changes for each test individually. The X-Osmux parameter was so far expected to appear in the first CRCX received, assuming that this first CRCX is for the RAN. Instead, detect whether X-Osmux is contained in a CRCX, and reply with an Osmux CID if so, regardless of it being the first or second CRCX. Count the number of X-Osmux parameters received in CRCX messages, and compare after call setup to verify X-Osmux presence. Since f_mo_call_establish() can't handle RANAP assignment, a few Iu tests that worked with the older code dup will break by this patch. This is fixed by a subsequent patch, see I0ead36333ab665147b8d222070ea5cf8afc555ec. * Details, per patch chunk: Change ts_BSSMAP_IE_AoIP_TLA4 to a non-value template, so that we can use a wildcard for the assigned port number from MGCP (depending on RAN or CN CRCX first, the RAN port number can be one or the other). In CallParameters, move MGCP handling instructions into a separate record "CrcxResponse", and have two of them for handling the first and the second CRCX, replacing mgw_rtp_{ip,port}_{bss,mss} and mgcp_connection_id_{bss,mss}. In CallParameters, add some flags for early-exiting call establishment with a particular desired behavior, for specialized tests. In CallParameters, use common default values and don't repeat them in each and every call establishing test. Set cpars.mo_call := {true,false} implicitly when f_{mo,mt}_call_establish() are invoked. Remove CRCX comments implying RAN or CN side, instead just talk of the "first" and the "second" CRCX. Implement one common f_handle_crcx() function, which is used by f_mo_call_establish(), f_mt_call_complete(), as_optional_mgcp_crcx(), and implicitly uses the first/second CRCX handling. For Assigment, use a wildcard RTP port so that we don't have to assume which CRCX was for the RAN side. In f_mo_call_establish(), insert special case conditions to make it enact errors at specific times, for individual tests. That saves re-implementing the entire call establishment (code dup). For error cases, add expectation of a CC Release message in the call establishment. This should not apply for normal successful operation, but because interleave does not support conditionals, add flags got_mncc_setup_compl_ind and got_cc_connect to break the interleave when establishing is complete, so that the CC Release is skipped. A CC Release always breaks the interleave, at whatever time it arrives. Tests adopting f_{mo,mt}_call instead of code dup: f_tc_mo_setup_and_nothing() f_tc_mo_crcx_ran_timeout() f_tc_mo_crcx_ran_reject() f_tc_mo_release_timeout() f_tc_mo_cc_bssmap_clear() Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f --- M library/BSSMAP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 3 files changed, 282 insertions(+), 338 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/38/15938/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:43:10 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:43:10 +0000 Subject: Change in osmo-ttcn3-hacks[master]: re-implement compare-results.sh as compare-results.py In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 to look at the new patch set (#2). Change subject: re-implement compare-results.sh as compare-results.py ...................................................................... re-implement compare-results.sh as compare-results.py The compare-results.sh is annoyingly slow. Since our ttcn3 tests containers support Python 2, re-implement in Python for much quicker evaluation. Change-Id: I0747c9d66ffc7e4121497a2416fca78d7b56c8e6 --- A compare-results.py D compare-results.sh M start-testsuite.sh 3 files changed, 138 insertions(+), 214 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/43/15943/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0747c9d66ffc7e4121497a2416fca78d7b56c8e6 Gerrit-Change-Number: 15943 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 00:43:11 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 00:43:11 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: split off f_mgcp_find_param_entry() References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15963 ) Change subject: msc: split off f_mgcp_find_param_entry() ...................................................................... msc: split off f_mgcp_find_param_entry() Split f_mgcp_find_param_entry() out of f_mgcp_find_param() to be able to act on an MgcpParameterList without an enclosing MgcpMessage. Will be used by upcoming I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Change-Id: I90f213d2a1be979afa024e0faa25d532f9858636 --- M library/MGCP_Templates.ttcn 1 file changed, 12 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/63/15963/1 diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index dae379e..e03fd8e 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -453,6 +453,17 @@ sdp := * } + function f_mgcp_find_param_entry(MgcpParameterList pars, MgcpInfoCode code, out charstring ret) + return boolean { + for (var integer i := 0; i < sizeof(pars); i := i+1) { + if (pars[i].code == code) { + ret := pars[i].val; + return true; + } + } + return false; + } + function f_mgcp_find_param(MgcpMessage msg, MgcpInfoCode code, out charstring ret) return boolean { var MgcpParameterList pars; @@ -461,13 +472,7 @@ } else { pars := msg.response.params; } - for (var integer i := 0; i < sizeof(pars); i := i+1) { - if (pars[i].code == code) { - ret := pars[i].val; - return true; - } - } - return false; + return f_mgcp_find_param_entry(pars, code, ret); } /* template to determine if a MGCP endpoint is a wildcard endpoint */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I90f213d2a1be979afa024e0faa25d532f9858636 Gerrit-Change-Number: 15963 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 01:04:48 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 01:04:48 +0000 Subject: Change in osmo-hlr[master]: db upgrade to v2: log version 2, not 1 In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15910 ) Change subject: db upgrade to v2: log version 2, not 1 ...................................................................... db upgrade to v2: log version 2, not 1 Change-Id: I9237b64e5748e693a5f039c5a5554d417eed3633 --- M src/db.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/src/db.c b/src/db.c index 5e6b5eb..f3ed863 100644 --- a/src/db.c +++ b/src/db.c @@ -311,7 +311,7 @@ db_remove_reset(stmt); sqlite3_finalize(stmt); if (rc != SQLITE_DONE) { - LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version %d\n", 1); + LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 2\n"); return rc; } @@ -322,7 +322,7 @@ } rc = sqlite3_step(stmt); if (rc != SQLITE_DONE) - LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version %d\n", 1); + LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 2\n"); db_remove_reset(stmt); sqlite3_finalize(stmt); -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15910 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I9237b64e5748e693a5f039c5a5554d417eed3633 Gerrit-Change-Number: 15910 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 01:04:49 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 01:04:49 +0000 Subject: Change in osmo-hlr[master]: fix upgrade to version 2: imei column default value In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15911 ) Change subject: fix upgrade to version 2: imei column default value ...................................................................... fix upgrade to version 2: imei column default value A subsequent commit will add a db_upgrade test, which verifies that the db resulting from an upgrade is identical to one created from scratch in the new version. That test currently would show a diff: an upgraded 'imei' column has 'default NULL', where a new db created in version 2 has no default value on the imei column. Fix the upgrade path to add an imei column without 'default NULL', so that adding the upgrade test will result in success. The test is added in I0961bab0e17cfde5b030576c5bc243c2b51d9dc4 Change-Id: I68a00014a3d603fcba8781470bc5285f78b538d0 --- M src/db.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/src/db.c b/src/db.c index f3ed863..31c4ba5 100644 --- a/src/db.c +++ b/src/db.c @@ -299,7 +299,7 @@ { sqlite3_stmt *stmt; int rc; - const char *update_stmt_sql = "ALTER TABLE subscriber ADD COLUMN imei VARCHAR(14) default NULL"; + const char *update_stmt_sql = "ALTER TABLE subscriber ADD COLUMN imei VARCHAR(14)"; const char *set_schema_version_sql = "PRAGMA user_version = 2"; rc = sqlite3_prepare_v2(dbc->db, update_stmt_sql, -1, &stmt, NULL); -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15911 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I68a00014a3d603fcba8781470bc5285f78b538d0 Gerrit-Change-Number: 15911 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 01:04:49 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 01:04:49 +0000 Subject: Change in osmo-hlr[master]: add --db-check option In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15912 ) Change subject: add --db-check option ...................................................................... add --db-check option This allows starting osmo-hlr to merely open the database, do upgrades if necessary, and quit, without opening any ports. So that no ports are opened, move the telnet VTY startup to below the database check. Needed for upcoming patch that introduces a db_upgrade test, in I0961bab0e17cfde5b030576c5bc243c2b51d9dc4. Change-Id: I1a4b3360690acd2cd3cffdadffbb00a28d421316 --- M src/hlr.c 1 file changed, 23 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/hlr.c b/src/hlr.c index 8b9dff1..6bfc141 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -706,6 +706,7 @@ printf(" -T --timestamp Prefix every log line with a timestamp.\n"); printf(" -e --log-level number Set a global loglevel.\n"); printf(" -U --db-upgrade Allow HLR database schema upgrades.\n"); + printf(" -C --db-check Quit after opening (and upgrading) the database.\n"); printf(" -V --version Print the version of OsmoHLR.\n"); } @@ -714,6 +715,7 @@ const char *db_file; bool daemonize; bool db_upgrade; + bool db_check; } cmdline_opts = { .config_file = "osmo-hlr.cfg", .db_file = NULL, @@ -735,6 +737,7 @@ {"log-level", 1, 0, 'e'}, {"timestamp", 0, 0, 'T'}, {"db-upgrade", 0, 0, 'U' }, + {"db-check", 0, 0, 'C' }, {"version", 0, 0, 'V' }, {0, 0, 0, 0} }; @@ -773,6 +776,9 @@ case 'U': cmdline_opts.db_upgrade = true; break; + case 'C': + cmdline_opts.db_check = true; + break; case 'V': print_version(1); exit(0); @@ -856,12 +862,6 @@ return rc; } - /* start telnet after reading config for vty_get_bind_addr() */ - rc = telnet_init_dynif(hlr_ctx, NULL, vty_get_bind_addr(), - OSMO_VTY_PORT_HLR); - if (rc < 0) - return rc; - LOGP(DMAIN, LOGL_NOTICE, "hlr starting\n"); rc = rand_init(); @@ -879,6 +879,23 @@ exit(1); } + if (cmdline_opts.db_check) { + LOGP(DMAIN, LOGL_NOTICE, "Cmdline option --db-check: Database was opened successfully, quitting.\n"); + db_close(g_hlr->dbc); + log_fini(); + talloc_free(hlr_ctx); + talloc_free(tall_vty_ctx); + talloc_disable_null_tracking(); + exit(0); + } + + /* start telnet after reading config for vty_get_bind_addr() */ + rc = telnet_init_dynif(hlr_ctx, NULL, vty_get_bind_addr(), + OSMO_VTY_PORT_HLR); + if (rc < 0) + return rc; + + g_hlr->gs = osmo_gsup_server_create(hlr_ctx, g_hlr->gsup_bind_addr, OSMO_GSUP_PORT, read_cb, &g_lu_ops, g_hlr); if (!g_hlr->gs) { -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15912 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I1a4b3360690acd2cd3cffdadffbb00a28d421316 Gerrit-Change-Number: 15912 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 01:04:50 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 01:04:50 +0000 Subject: Change in osmo-hlr[master]: hlr.sql: move comment In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15928 ) Change subject: hlr.sql: move comment ...................................................................... hlr.sql: move comment Move a comment for ind_bitlen column to a separate line, so that it doesn't show in PRAGMA_TABLE_INFO('subscriber'). An upcoming patch introduces db_upgrade_test, which dumps a sorted db schema. In newer sqlite3 versions, a comment following a 'DEFAULT' keyword actually shows up in the PRAGMA_TABLE_INFO() results (on my machine), but older versions (on the build slaves) drop that comment. The ind_bitlen column is the only one producing this odd side effect, because it is the last column and has no comma between 'DEFAULT' and the comment. The easiest way to get matching results across sqlite3 client versions is to move the comment to above ind_bitlen instead of having it on the same line. (Adding a comma doesn't work.) Change-Id: Id66ad68dd3f22d533fc3a428223ea6ad0282bde0 --- M sql/hlr.sql 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/sql/hlr.sql b/sql/hlr.sql index 10838f2..c1b0f1a 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -69,7 +69,8 @@ op VARCHAR(32), -- hex string: operator's secret key (128bit) opc VARCHAR(32), -- hex string: derived from OP and K (128bit) sqn INTEGER NOT NULL DEFAULT 0, -- sequence number of key usage - ind_bitlen INTEGER NOT NULL DEFAULT 5 -- nr of index bits at lower SQN end + -- nr of index bits at lower SQN end + ind_bitlen INTEGER NOT NULL DEFAULT 5 ); CREATE UNIQUE INDEX idx_subscr_imsi ON subscriber (imsi); -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15928 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id66ad68dd3f22d533fc3a428223ea6ad0282bde0 Gerrit-Change-Number: 15928 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 01:04:51 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 01:04:51 +0000 Subject: Change in osmo-hlr[master]: add db_upgrade test In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15913 ) Change subject: add db_upgrade test ...................................................................... add db_upgrade test We have a database schema upgrade path, but so far nothing that verifies that we don't break it. It almost seems like the user data weren't important to us!? Add a db upgrade test: - Create a db with an .sql dump taken from a db created with an old osmo-hlr, producing DB schema version 0. - Run osmo-hlr --db-upgrade --db-check - Verify that the upgrade exited successfully. - Verify that restarting with the upgraded DB works. If python tests are enabled, also: - create a new database using the new osmo-hlr (just built). - replay a VTY transcript to create subscribers as in the old snapshot. - replay some sql modifications as done in the old snapshot. - Get a list of sorted table names, - a list of their sorted columns with all their properties, - and dump the table contents in a column- and value-sorted way. - Compare the resulting dumps and error if there are any diffs. (This is how I found the difference in the imei column that was fixed in I68a00014a3d603fcba8781470bc5285f78b538d0) Change-Id: I0961bab0e17cfde5b030576c5bc243c2b51d9dc4 --- M configure.ac M tests/Makefile.am A tests/db_upgrade/Makefile.am A tests/db_upgrade/create_subscribers.vty A tests/db_upgrade/create_subscribers_step2.sql A tests/db_upgrade/db_upgrade_test.err A tests/db_upgrade/db_upgrade_test.ok A tests/db_upgrade/db_upgrade_test.sh A tests/db_upgrade/hlr_db_v0.sql A tests/db_upgrade/osmo-hlr.cfg M tests/testsuite.at 11 files changed, 417 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/configure.ac b/configure.ac index 993d4d5..ca78f38 100644 --- a/configure.ac +++ b/configure.ac @@ -186,4 +186,5 @@ tests/gsup_server/Makefile tests/gsup/Makefile tests/db/Makefile + tests/db_upgrade/Makefile ) diff --git a/tests/Makefile.am b/tests/Makefile.am index 4da8ab1..357fbac 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,6 +3,7 @@ gsup_server \ db \ gsup \ + db_upgrade \ $(NULL) # The `:;' works around a Bash 3.2 bug when the output is not writeable. @@ -44,6 +45,7 @@ # don't run vty and ctrl tests concurrently so that the ports don't conflict $(MAKE) vty-test $(MAKE) ctrl-test + $(MAKE) db-upgrade-equivalence-test else python-tests: echo "Not running python-based external tests (determined at configure-time)" @@ -81,6 +83,9 @@ -rm -f $(CTRL_TEST_DB) -rm $(CTRL_TEST_DB)-* +db-upgrade-equivalence-test: + $(MAKE) -C db_upgrade upgrade-equivalence-test + check-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) $(MAKE) $(AM_MAKEFLAGS) python-tests diff --git a/tests/db_upgrade/Makefile.am b/tests/db_upgrade/Makefile.am new file mode 100644 index 0000000..79136c9 --- /dev/null +++ b/tests/db_upgrade/Makefile.am @@ -0,0 +1,14 @@ +EXTRA_DIST = \ + db_upgrade_test.sh \ + db_upgrade_test.err \ + db_upgrade_test.ok \ + hlr_db_v0.sql \ + osmo-hlr.cfg \ + create_subscribers.vty \ + $(NULL) + +update_exp: + $(srcdir)/db_upgrade_test.sh $(srcdir) $(builddir) >"$(srcdir)/db_upgrade_test.ok" 2>"$(srcdir)/db_upgrade_test.err" + +upgrade-equivalence-test: + $(srcdir)/db_upgrade_test.sh $(srcdir) $(builddir) do-equivalence-test diff --git a/tests/db_upgrade/create_subscribers.vty b/tests/db_upgrade/create_subscribers.vty new file mode 100644 index 0000000..30eeba6 --- /dev/null +++ b/tests/db_upgrade/create_subscribers.vty @@ -0,0 +1,47 @@ +OsmoHLR> enable +OsmoHLR# subscriber imsi 123456789012345 create +% Created subscriber 123456789012345 + ID: 1 + IMSI: 123456789012345 + MSISDN: none +OsmoHLR# subscriber imsi 123456789012345 update msisdn 098765432109876 +% Updated subscriber IMSI='123456789012345' to MSISDN='098765432109876' +OsmoHLR# subscriber imsi 123456789012345 update aud2g comp128v1 ki BeefedCafeFaceAcedAddedDecadeFee +OsmoHLR# subscriber imsi 123456789012345 update aud3g milenage k C01ffedC1cadaeAc1d1f1edAcac1aB0a opc CededEffacedAceFacedBadFadedBeef +OsmoHLR# subscriber imsi 111111111 create +% Created subscriber 111111111 + ID: 2 + IMSI: 111111111 + MSISDN: none +OsmoHLR# subscriber imsi 222222222 create +% Created subscriber 222222222 + ID: 3 + IMSI: 222222222 + MSISDN: none +OsmoHLR# subscriber imsi 222222222 update msisdn 22222 +% Updated subscriber IMSI='222222222' to MSISDN='22222' +OsmoHLR# subscriber imsi 333333 create +% Created subscriber 333333 + ID: 4 + IMSI: 333333 + MSISDN: none +OsmoHLR# subscriber imsi 333333 update msisdn 3 +% Updated subscriber IMSI='333333' to MSISDN='3' +OsmoHLR# subscriber imsi 333333 update aud2g comp128v2 ki 33333333333333333333333333333333 +OsmoHLR# subscriber imsi 444444444444444 create +% Created subscriber 444444444444444 + ID: 5 + IMSI: 444444444444444 + MSISDN: none +OsmoHLR# subscriber imsi 444444444444444 update msisdn 4444 +% Updated subscriber IMSI='444444444444444' to MSISDN='4444' +OsmoHLR# subscriber imsi 444444444444444 update aud3g milenage k 44444444444444444444444444444444 op 44444444444444444444444444444444 +OsmoHLR# subscriber imsi 5555555 create +% Created subscriber 5555555 + ID: 6 + IMSI: 5555555 + MSISDN: none +OsmoHLR# subscriber imsi 5555555 update msisdn 55555555555555 +% Updated subscriber IMSI='5555555' to MSISDN='55555555555555' +OsmoHLR# subscriber imsi 5555555 update aud2g xor ki 55555555555555555555555555555555 +OsmoHLR# subscriber imsi 5555555 update aud3g milenage k 55555555555555555555555555555555 opc 55555555555555555555555555555555 diff --git a/tests/db_upgrade/create_subscribers_step2.sql b/tests/db_upgrade/create_subscribers_step2.sql new file mode 100644 index 0000000..7933e25 --- /dev/null +++ b/tests/db_upgrade/create_subscribers_step2.sql @@ -0,0 +1,6 @@ +update subscriber set vlr_number = 'MSC-1' where id = 1; +update subscriber set ms_purged_cs = 1 where id = 2; +update subscriber set ms_purged_ps = 1 where id = 3; +update subscriber set nam_cs = 0 where id = 4; +update subscriber set nam_ps = 0 where id = 5; +update subscriber set nam_cs = 0, nam_ps = 0 where id = 6; diff --git a/tests/db_upgrade/db_upgrade_test.err b/tests/db_upgrade/db_upgrade_test.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/db_upgrade/db_upgrade_test.err diff --git a/tests/db_upgrade/db_upgrade_test.ok b/tests/db_upgrade/db_upgrade_test.ok new file mode 100644 index 0000000..bce3eb4 --- /dev/null +++ b/tests/db_upgrade/db_upgrade_test.ok @@ -0,0 +1,168 @@ +Creating db in schema version 0 + +Version 0 db: + +Table: auc_2g +name|type|notnull|dflt_value|pk +algo_id_2g|INTEGER|1||0 +ki|VARCHAR(32)|1||0 +subscriber_id|INTEGER|0||1 + +Table auc_2g contents: +algo_id_2g|ki|subscriber_id +1|BeefedCafeFaceAcedAddedDecadeFee|1 +2|33333333333333333333333333333333|4 +4|55555555555555555555555555555555|6 + +Table: auc_3g +name|type|notnull|dflt_value|pk +algo_id_3g|INTEGER|1||0 +ind_bitlen|INTEGER|1|5|0 +k|VARCHAR(32)|1||0 +op|VARCHAR(32)|0||0 +opc|VARCHAR(32)|0||0 +sqn|INTEGER|1|0|0 +subscriber_id|INTEGER|0||1 + +Table auc_3g contents: +algo_id_3g|ind_bitlen|k|op|opc|sqn|subscriber_id +5|5|C01ffedC1cadaeAc1d1f1edAcac1aB0a||CededEffacedAceFacedBadFadedBeef|0|1 +5|5|44444444444444444444444444444444|44444444444444444444444444444444||0|5 +5|5|55555555555555555555555555555555||55555555555555555555555555555555|0|6 + +Table: subscriber +name|type|notnull|dflt_value|pk +ggsn_number|VARCHAR(15)|0||0 +gmlc_number|VARCHAR(15)|0||0 +hlr_number|VARCHAR(15)|0||0 +id|INTEGER|0||1 +imeisv|VARCHAR|0||0 +imsi|VARCHAR(15)|1||0 +lmsi|INTEGER|0||0 +ms_purged_cs|BOOLEAN|1|0|0 +ms_purged_ps|BOOLEAN|1|0|0 +msisdn|VARCHAR(15)|0||0 +nam_cs|BOOLEAN|1|1|0 +nam_ps|BOOLEAN|1|1|0 +periodic_lu_tmr|INTEGER|0||0 +periodic_rau_tau_tmr|INTEGER|0||0 +sgsn_address|VARCHAR|0||0 +sgsn_number|VARCHAR(15)|0||0 +smsc_number|VARCHAR(15)|0||0 +vlr_number|VARCHAR(15)|0||0 + +Table subscriber contents: +ggsn_number|gmlc_number|hlr_number|id|imeisv|imsi|lmsi|ms_purged_cs|ms_purged_ps|msisdn|nam_cs|nam_ps|periodic_lu_tmr|periodic_rau_tau_tmr|sgsn_address|sgsn_number|smsc_number|vlr_number +|||1||123456789012345||0|0|098765432109876|1|1||||||MSC-1 +|||2||111111111||1|0||1|1|||||| +|||3||222222222||0|1|22222|1|1|||||| +|||4||333333||0|0|3|0|1|||||| +|||5||444444444444444||0|0|4444|1|0|||||| +|||6||5555555||0|0|55555555555555|0|0|||||| + +Table: subscriber_apn +name|type|notnull|dflt_value|pk +apn|VARCHAR(256)|1||0 +subscriber_id|INTEGER|0||0 + +Table subscriber_apn contents: + +Table: subscriber_multi_msisdn +name|type|notnull|dflt_value|pk +msisdn|VARCHAR(15)|1||0 +subscriber_id|INTEGER|0||0 + +Table subscriber_multi_msisdn contents: + +Launching osmo-hlr to upgrade db: +osmo-hlr --database $db --db-upgrade --db-check --config-file $srcdir/osmo-hlr.cfg +rc = 0 +DMAIN hlr starting +DDB using database: test.db +DDB Database test.db' has HLR DB schema version 0 +DDB Database test.db' has been upgraded to HLR DB schema version 2 +DMAIN Cmdline option --db-check: Database was opened successfully, quitting. + +Resulting db: + +Table: auc_2g +name|type|notnull|dflt_value|pk +algo_id_2g|INTEGER|1||0 +ki|VARCHAR(32)|1||0 +subscriber_id|INTEGER|0||1 + +Table auc_2g contents: +algo_id_2g|ki|subscriber_id +1|BeefedCafeFaceAcedAddedDecadeFee|1 +2|33333333333333333333333333333333|4 +4|55555555555555555555555555555555|6 + +Table: auc_3g +name|type|notnull|dflt_value|pk +algo_id_3g|INTEGER|1||0 +ind_bitlen|INTEGER|1|5|0 +k|VARCHAR(32)|1||0 +op|VARCHAR(32)|0||0 +opc|VARCHAR(32)|0||0 +sqn|INTEGER|1|0|0 +subscriber_id|INTEGER|0||1 + +Table auc_3g contents: +algo_id_3g|ind_bitlen|k|op|opc|sqn|subscriber_id +5|5|C01ffedC1cadaeAc1d1f1edAcac1aB0a||CededEffacedAceFacedBadFadedBeef|0|1 +5|5|44444444444444444444444444444444|44444444444444444444444444444444||0|5 +5|5|55555555555555555555555555555555||55555555555555555555555555555555|0|6 + +Table: subscriber +name|type|notnull|dflt_value|pk +ggsn_number|VARCHAR(15)|0||0 +gmlc_number|VARCHAR(15)|0||0 +hlr_number|VARCHAR(15)|0||0 +id|INTEGER|0||1 +imei|VARCHAR(14)|0||0 +imeisv|VARCHAR|0||0 +imsi|VARCHAR(15)|1||0 +last_lu_seen|TIMESTAMP|0|NULL|0 +lmsi|INTEGER|0||0 +ms_purged_cs|BOOLEAN|1|0|0 +ms_purged_ps|BOOLEAN|1|0|0 +msisdn|VARCHAR(15)|0||0 +nam_cs|BOOLEAN|1|1|0 +nam_ps|BOOLEAN|1|1|0 +periodic_lu_tmr|INTEGER|0||0 +periodic_rau_tau_tmr|INTEGER|0||0 +sgsn_address|VARCHAR|0||0 +sgsn_number|VARCHAR(15)|0||0 +smsc_number|VARCHAR(15)|0||0 +vlr_number|VARCHAR(15)|0||0 + +Table subscriber contents: +ggsn_number|gmlc_number|hlr_number|id|imei|imeisv|imsi|last_lu_seen|lmsi|ms_purged_cs|ms_purged_ps|msisdn|nam_cs|nam_ps|periodic_lu_tmr|periodic_rau_tau_tmr|sgsn_address|sgsn_number|smsc_number|vlr_number +|||1|||123456789012345|||0|0|098765432109876|1|1||||||MSC-1 +|||2|||111111111|||1|0||1|1|||||| +|||3|||222222222|||0|1|22222|1|1|||||| +|||4|||333333|||0|0|3|0|1|||||| +|||5|||444444444444444|||0|0|4444|1|0|||||| +|||6|||5555555|||0|0|55555555555555|0|0|||||| + +Table: subscriber_apn +name|type|notnull|dflt_value|pk +apn|VARCHAR(256)|1||0 +subscriber_id|INTEGER|0||0 + +Table subscriber_apn contents: + +Table: subscriber_multi_msisdn +name|type|notnull|dflt_value|pk +msisdn|VARCHAR(15)|1||0 +subscriber_id|INTEGER|0||0 + +Table subscriber_multi_msisdn contents: + +Verify that osmo-hlr can open it: +osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg +rc = 0 +DMAIN hlr starting +DDB using database: test.db +DDB Database test.db' has HLR DB schema version 2 +DMAIN Cmdline option --db-check: Database was opened successfully, quitting. diff --git a/tests/db_upgrade/db_upgrade_test.sh b/tests/db_upgrade/db_upgrade_test.sh new file mode 100755 index 0000000..bf56c56 --- /dev/null +++ b/tests/db_upgrade/db_upgrade_test.sh @@ -0,0 +1,83 @@ +#!/bin/sh +srcdir="${1:-.}" +builddir="${2:-.}" +do_equivalence_test="$3" + +set -e + +db="$builddir/test.db" +osmo_hlr="$builddir/../../src/osmo-hlr" +cfg="$srcdir/osmo-hlr.cfg" + +dump_sorted_schema(){ + db_file="$1" + tables="$(sqlite3 "$db_file" "SELECT name FROM sqlite_master WHERE type = 'table' order by name")" + for table in $tables; do + echo + echo "Table: $table" + sqlite3 -header "$db_file" "SELECT name,type,\"notnull\",dflt_value,pk FROM PRAGMA_TABLE_INFO('$table') order by name;" + echo + echo "Table $table contents:" + columns="$(sqlite3 "$db_file" "SELECT name FROM PRAGMA_TABLE_INFO('$table') order by name;")" + sqlite3 -header "$db_file" "SELECT $(echo $columns | sed 's/ /,/g') from $table;" + done +} + +rm -f "$db" +echo "Creating db in schema version 0" +sqlite3 "$db" < "$srcdir/hlr_db_v0.sql" + +echo +echo "Version 0 db:" +dump_sorted_schema "$db" + +set +e + +echo +echo "Launching osmo-hlr to upgrade db:" +echo osmo-hlr --database '$db' --db-upgrade --db-check --config-file '$srcdir/osmo-hlr.cfg' +"$osmo_hlr" --database "$db" --db-upgrade --db-check --config-file "$cfg" >log 2>&1 +echo "rc = $?" +cat log | sed 's@[^ "]*/@@g' + +echo +echo "Resulting db:" +dump_sorted_schema "$db" + +echo +echo "Verify that osmo-hlr can open it:" +echo osmo-hlr --database '$db' --db-check --config-file '$srcdir/osmo-hlr.cfg' +"$osmo_hlr" --database "$db" --db-check --config-file "$cfg" >log 2>&1 +echo "rc = $?" +cat log | sed 's@[^ "]*/@@g' + +if [ -n "$do_equivalence_test" ]; then + # this part requires osmo_interact_vty.py, so this test is not part of the normal run + set -e -x + mint_db="$builddir/mint.db" + rm -f "$mint_db" + + osmo_verify_transcript_vty.py -v \ + -n OsmoHLR -p 4258 \ + -r "$osmo_hlr -c $cfg -l $mint_db" \ + "$srcdir/create_subscribers.vty" + sqlite3 "$mint_db" < "$srcdir/create_subscribers_step2.sql" + + set +x + test_dump="$builddir/test.dump" + mint_dump="$builddir/mint.dump" + + dump_sorted_schema "$db" > "$test_dump" + dump_sorted_schema "$mint_db" > "$mint_dump" + + echo + echo "Newly created sorted schema is:" + cat "$mint_dump" + echo + echo "Diff to upgraded schema:" + diff -u "$mint_dump" "$test_dump" + echo "rc=$?" +fi + +rm -f log +rm -f "$db" diff --git a/tests/db_upgrade/hlr_db_v0.sql b/tests/db_upgrade/hlr_db_v0.sql new file mode 100644 index 0000000..46c985d --- /dev/null +++ b/tests/db_upgrade/hlr_db_v0.sql @@ -0,0 +1,80 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE subscriber ( +-- OsmoHLR's DB scheme is modelled roughly after TS 23.008 version 13.3.0 + id INTEGER PRIMARY KEY, + -- Chapter 2.1.1.1 + imsi VARCHAR(15) UNIQUE NOT NULL, + -- Chapter 2.1.2 + msisdn VARCHAR(15) UNIQUE, + -- Chapter 2.2.3: Most recent / current IMEI + imeisv VARCHAR, + -- Chapter 2.4.5 + vlr_number VARCHAR(15), + -- Chapter 2.4.6 + hlr_number VARCHAR(15), + -- Chapter 2.4.8.1 + sgsn_number VARCHAR(15), + -- Chapter 2.13.10 + sgsn_address VARCHAR, + -- Chapter 2.4.8.2 + ggsn_number VARCHAR(15), + -- Chapter 2.4.9.2 + gmlc_number VARCHAR(15), + -- Chapter 2.4.23 + smsc_number VARCHAR(15), + -- Chapter 2.4.24 + periodic_lu_tmr INTEGER, + -- Chapter 2.13.115 + periodic_rau_tau_tmr INTEGER, + -- Chapter 2.1.1.2: network access mode + nam_cs BOOLEAN NOT NULL DEFAULT 1, + nam_ps BOOLEAN NOT NULL DEFAULT 1, + -- Chapter 2.1.8 + lmsi INTEGER, + -- The below purged flags might not even be stored non-volatile, + -- refer to TS 23.012 Chapter 3.6.1.4 + -- Chapter 2.7.5 + ms_purged_cs BOOLEAN NOT NULL DEFAULT 0, + -- Chapter 2.7.6 + ms_purged_ps BOOLEAN NOT NULL DEFAULT 0 +); +INSERT INTO subscriber VALUES(1,'123456789012345','098765432109876',NULL,'MSC-1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,0,0); +INSERT INTO subscriber VALUES(2,'111111111',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,1,0); +INSERT INTO subscriber VALUES(3,'222222222','22222',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,0,1); +INSERT INTO subscriber VALUES(4,'333333','3',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,NULL,0,0); +INSERT INTO subscriber VALUES(5,'444444444444444','4444',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,0,0); +INSERT INTO subscriber VALUES(6,'5555555','55555555555555',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,0,0); +CREATE TABLE subscriber_apn ( + subscriber_id INTEGER, -- subscriber.id + apn VARCHAR(256) NOT NULL +); +CREATE TABLE subscriber_multi_msisdn ( +-- Chapter 2.1.3 + subscriber_id INTEGER, -- subscriber.id + msisdn VARCHAR(15) NOT NULL +); +CREATE TABLE auc_2g ( + subscriber_id INTEGER PRIMARY KEY, -- subscriber.id + algo_id_2g INTEGER NOT NULL, -- enum osmo_auth_algo value + ki VARCHAR(32) NOT NULL -- hex string: subscriber's secret key (128bit) +); +INSERT INTO auc_2g VALUES(1,1,'BeefedCafeFaceAcedAddedDecadeFee'); +INSERT INTO auc_2g VALUES(4,2,'33333333333333333333333333333333'); +INSERT INTO auc_2g VALUES(6,4,'55555555555555555555555555555555'); +CREATE TABLE auc_3g ( + subscriber_id INTEGER PRIMARY KEY, -- subscriber.id + algo_id_3g INTEGER NOT NULL, -- enum osmo_auth_algo value + k VARCHAR(32) NOT NULL, -- hex string: subscriber's secret key (128bit) + op VARCHAR(32), -- hex string: operator's secret key (128bit) + opc VARCHAR(32), -- hex string: derived from OP and K (128bit) + sqn INTEGER NOT NULL DEFAULT 0, -- sequence number of key usage + -- nr of index bits at lower SQN end + ind_bitlen INTEGER NOT NULL DEFAULT 5 +); +INSERT INTO auc_3g VALUES(1,5,'C01ffedC1cadaeAc1d1f1edAcac1aB0a',NULL,'CededEffacedAceFacedBadFadedBeef',0,5); +INSERT INTO auc_3g VALUES(5,5,'44444444444444444444444444444444','44444444444444444444444444444444',NULL,0,5); +INSERT INTO auc_3g VALUES(6,5,'55555555555555555555555555555555',NULL,'55555555555555555555555555555555',0,5); +CREATE UNIQUE INDEX idx_subscr_imsi ON subscriber (imsi) +; +COMMIT; diff --git a/tests/db_upgrade/osmo-hlr.cfg b/tests/db_upgrade/osmo-hlr.cfg new file mode 100644 index 0000000..7fb12c1 --- /dev/null +++ b/tests/db_upgrade/osmo-hlr.cfg @@ -0,0 +1,6 @@ +log stderr + logging level db notice + logging print category-hex 0 + logging print file 0 + logging print category 1 + logging color 0 diff --git a/tests/testsuite.at b/tests/testsuite.at index 70ae7ae..a8efe42 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -36,3 +36,10 @@ sqlite3 db_test.db < $abs_top_srcdir/sql/hlr.sql AT_CHECK([$abs_top_builddir/tests/db/db_test], [], [expout], [experr]) AT_CLEANUP + +AT_SETUP([db_upgrade]) +AT_KEYWORDS([db_upgrade]) +cat $abs_srcdir/db_upgrade/db_upgrade_test.ok > expout +cat $abs_srcdir/db_upgrade/db_upgrade_test.err > experr +AT_CHECK([$abs_srcdir/db_upgrade/db_upgrade_test.sh $abs_srcdir/db_upgrade $abs_builddir/db_upgrade], [], [expout], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15913 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I0961bab0e17cfde5b030576c5bc243c2b51d9dc4 Gerrit-Change-Number: 15913 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 01:05:35 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 01:05:35 +0000 Subject: Change in osmo-hlr[master]: hlr db schema 3: hlr_number -> msc_number In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15914 ) Change subject: hlr db schema 3: hlr_number -> msc_number ...................................................................... Patch Set 6: I'm still considering whether we should instead just ignore that misnamed column... -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15914 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I527e8627b24b79f3e9eec32675c7f5a3a6d25440 Gerrit-Change-Number: 15914 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Tue, 05 Nov 2019 01:05:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 01:07:49 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 01:07:49 +0000 Subject: Change in osmo-hlr[master]: db upgrade: remove some code dup References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15964 ) Change subject: db upgrade: remove some code dup ...................................................................... db upgrade: remove some code dup Instead of a switch() for each version number with identical switch cases except for the function name, use an array of function pointers and loop. Also print a success message after each individual version upgrade, instead of only one in the end (see change in db_upgrade_test.ok). Change-Id: I1736af3d9a3f02e29db836966ac15ce49f94737b --- M src/db.c M tests/db_upgrade/db_upgrade_test.ok 2 files changed, 16 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/64/15964/1 diff --git a/src/db.c b/src/db.c index 75ca889..93771bd 100644 --- a/src/db.c +++ b/src/db.c @@ -423,6 +423,13 @@ return rc; } +typedef int (*db_upgrade_func_t)(struct db_context *dbc); +static db_upgrade_func_t db_upgrade_path[] = { + db_upgrade_v1, + db_upgrade_v2, + db_upgrade_v3, +}; + static int db_get_user_version(struct db_context *dbc) { const char *user_version_sql = "PRAGMA user_version"; @@ -534,40 +541,17 @@ LOGP(DDB, LOGL_NOTICE, "Database '%s' has HLR DB schema version %d\n", dbc->fname, version); if (version < CURRENT_SCHEMA_VERSION && allow_upgrade) { - switch (version) { - case 0: - rc = db_upgrade_v1(dbc); + for (;version < ARRAY_SIZE(db_upgrade_path); version++) { + db_upgrade_func_t upgrade_func = db_upgrade_path[version]; + rc = upgrade_func(dbc); if (rc != SQLITE_DONE) { - LOGP(DDB, LOGL_ERROR, "Failed to upgrade HLR DB schema to version 1: (rc=%d) %s\n", - rc, sqlite3_errmsg(dbc->db)); + LOGP(DDB, LOGL_ERROR, "Failed to upgrade HLR DB schema to version %d: (rc=%d) %s\n", + version+1, rc, sqlite3_errmsg(dbc->db)); goto out_free; } - version = 1; - /* fall through */ - case 1: - rc = db_upgrade_v2(dbc); - if (rc != SQLITE_DONE) { - LOGP(DDB, LOGL_ERROR, "Failed to upgrade HLR DB schema to version 2: (rc=%d) %s\n", - rc, sqlite3_errmsg(dbc->db)); - goto out_free; - } - version = 2; - /* fall through */ - case 2: - rc = db_upgrade_v3(dbc); - if (rc != SQLITE_DONE) { - LOGP(DDB, LOGL_ERROR, "Failed to upgrade HLR DB schema to version 3: (rc=%d) %s\n", - rc, sqlite3_errmsg(dbc->db)); - goto out_free; - } - version = 3; - /* fall through */ - /* case N: ... */ - default: - break; + LOGP(DDB, LOGL_NOTICE, "Database '%s' has been upgraded to HLR DB schema version %d\n", + dbc->fname, version+1); } - LOGP(DDB, LOGL_NOTICE, "Database '%s' has been upgraded to HLR DB schema version %d\n", - dbc->fname, version); } if (version != CURRENT_SCHEMA_VERSION) { diff --git a/tests/db_upgrade/db_upgrade_test.ok b/tests/db_upgrade/db_upgrade_test.ok index c1f0f9d..49e7151 100644 --- a/tests/db_upgrade/db_upgrade_test.ok +++ b/tests/db_upgrade/db_upgrade_test.ok @@ -80,6 +80,8 @@ DMAIN hlr starting DDB using database: test.db DDB Database test.db' has HLR DB schema version 0 +DDB Database test.db' has been upgraded to HLR DB schema version 1 +DDB Database test.db' has been upgraded to HLR DB schema version 2 DDB Database test.db' has been upgraded to HLR DB schema version 3 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15964 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I1736af3d9a3f02e29db836966ac15ce49f94737b Gerrit-Change-Number: 15964 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 01:09:59 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 5 Nov 2019 01:09:59 +0000 Subject: Change in osmo-hlr[master]: db upgrade: remove some code dup In-Reply-To: References: Message-ID: neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-hlr/+/15964 ) Change subject: db upgrade: remove some code dup ...................................................................... db upgrade: remove some code dup Instead of a switch() for each version number with identical switch cases except for the function name, use an array of function pointers and loop. Also print a success message after each individual version upgrade, instead of only one in the end (see change in db_upgrade_test.ok). Change-Id: I1736af3d9a3f02e29db836966ac15ce49f94737b --- M src/db.c M tests/db_upgrade/db_upgrade_test.ok 2 files changed, 17 insertions(+), 33 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/64/15964/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15964 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I1736af3d9a3f02e29db836966ac15ce49f94737b Gerrit-Change-Number: 15964 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Tue Nov 5 01:56:44 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 05 Nov 2019 01:56:44 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5dc0d6ed390dd_751f2b0ec3e165fc11240ab@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/i586 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 222s] -subscriber_id|INTEGER|0||0 [ 222s] - [ 222s] -Table subscriber_multi_msisdn contents: [ 222s] - [ 222s] -Verify that osmo-hlr can open it: [ 222s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 222s] -rc = 0 [ 222s] -DMAIN hlr starting [ 222s] -DDB using database: test.db [ 222s] -DDB Database test.db' has HLR DB schema version 2 [ 222s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 222s] ./testsuite.at:44: exit code was 1, expected 0 [ 222s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 222s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 222s] make[1]: *** [override_dh_auto_test] Error 1 [ 222s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 222s] debian/rules:7: recipe for target 'build' failed [ 222s] make: *** [build] Error 2 [ 222s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 222s] [ 222s] lamb01 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 5 01:56:34 UTC 2019. [ 222s] [ 222s] ### VM INTERACTION START ### [ 223s] Powering off. [ 223s] [ 210.039040] reboot: Power down [ 223s] ### VM INTERACTION END ### [ 223s] [ 223s] lamb01 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 5 01:56:36 UTC 2019. [ 223s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Nov 5 02:01:35 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 05 Nov 2019 02:01:35 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5dc0d815efae1_751f2b0ec3e165fc11245e3@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 238s] -subscriber_id|INTEGER|0||0 [ 238s] - [ 238s] -Table subscriber_multi_msisdn contents: [ 238s] - [ 238s] -Verify that osmo-hlr can open it: [ 238s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 238s] -rc = 0 [ 238s] -DMAIN hlr starting [ 238s] -DDB using database: test.db [ 238s] -DDB Database test.db' has HLR DB schema version 2 [ 238s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 238s] ./testsuite.at:44: exit code was 1, expected 0 [ 238s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 238s] debian/rules:17: 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:7: recipe for target 'build' failed [ 238s] make: *** [build] Error 2 [ 238s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 238s] [ 238s] lamb19 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 5 02:01:19 UTC 2019. [ 238s] [ 238s] ### VM INTERACTION START ### [ 242s] [ 228.870477] sysrq: SysRq : Power Off [ 242s] [ 228.876327] reboot: Power down [ 242s] ### VM INTERACTION END ### [ 242s] [ 242s] lamb19 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 5 02:01:23 UTC 2019. [ 242s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:05:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:05:53 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: simplify computation of CCCH_CONFIG In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15933 ) Change subject: osmo_bsc_main.c: simplify computation of CCCH_CONFIG ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 Gerrit-Change-Number: 15933 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 02:05:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:05:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:05:55 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15934 ) Change subject: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd Gerrit-Change-Number: 15934 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 02:05:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:05:57 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:05:57 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: verify the physical channel mapping at startup In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15932 ) Change subject: osmo_bsc_main.c: verify the physical channel mapping at startup ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I758ef80f7884ba35cdf59d671ee30222ffb9d68b Gerrit-Change-Number: 15932 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 02:05:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:05:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:05:59 +0000 Subject: Change in osmo-bsc[master]: VTY: also print the active phan config in ts_dump_vty() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15931 ) Change subject: VTY: also print the active phan config in ts_dump_vty() ...................................................................... VTY: also print the active phan config in ts_dump_vty() Change-Id: I45c93a737ad82a2525f941e89cd19d4cedbf6f02 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index a388c9a..0fbff86 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -1219,9 +1219,10 @@ static void ts_dump_vty(struct vty *vty, struct gsm_bts_trx_ts *ts) { - vty_out(vty, "BTS %u, TRX %u, Timeslot %u, phys cfg %s", + vty_out(vty, "BTS %u, TRX %u, Timeslot %u, phys cfg %s (active %s)", ts->trx->bts->nr, ts->trx->nr, ts->nr, - gsm_pchan_name(ts->pchan_on_init)); + gsm_pchan_name(ts->pchan_on_init), + gsm_pchan_name(ts->pchan_is)); if (ts->pchan_is != ts->pchan_on_init) vty_out(vty, " (%s mode)", gsm_pchan_name(ts->pchan_is)); vty_out(vty, ", TSC %u%s NM State: ", gsm_ts_tsc(ts), VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I45c93a737ad82a2525f941e89cd19d4cedbf6f02 Gerrit-Change-Number: 15931 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:06:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:06:00 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: verify the physical channel mapping at startup In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15932 ) Change subject: osmo_bsc_main.c: verify the physical channel mapping at startup ...................................................................... osmo_bsc_main.c: verify the physical channel mapping at startup As per 3GPP TS 45.002, section 3.3.2.3, and table 3 of clause 7, the following limitations apply mapping of CCCH/BCCH channels: - TS0/C0 shall be configured as CCCH/BCCH (optionally combined); - combined CCCH (CCCH+SDCCH4) can only be used on TS0; - additional CCCHs can be on TS2, TS4, and TS6; - additional CCCHs are not allowed if TS0 is combined. Let's make sure that OsmoBSC is properly configured before starring. Change-Id: I758ef80f7884ba35cdf59d671ee30222ffb9d68b --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/gsm_data.c M src/osmo-bsc/osmo_bsc_main.c 3 files changed, 63 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index ca9d294..23aacd6 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1749,4 +1749,6 @@ int bts_count_free_ts(struct gsm_bts *bts, enum gsm_phys_chan_config pchan); +bool trx_has_valid_pchan_config(const struct gsm_bts_trx *trx); + #endif /* _GSM_DATA_H */ diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 88981c0..e7fe065 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -1693,3 +1693,54 @@ OSMO_VALUE_STRING(FOR_VTY), {} }; + +bool trx_has_valid_pchan_config(const struct gsm_bts_trx *trx) +{ + bool combined = false; + bool result = true; + unsigned int i; + + /* Iterate over all timeslots */ + for (i = 0; i < 8; i++) { + const struct gsm_bts_trx_ts *ts = &trx->ts[i]; + + switch (ts->pchan_from_config) { + case GSM_PCHAN_CCCH_SDCCH4_CBCH: + case GSM_PCHAN_CCCH_SDCCH4: + /* CCCH+SDCCH4 can only be configured on TS0 */ + if (i > 0) { + LOGP(DNM, LOGL_ERROR, "Combined CCCH is not allowed " + "on TS%u > 0\n", i); + result = false; + } + if (i == 0) + combined = true; + /* fall-through */ + case GSM_PCHAN_CCCH: + /* 3GPP TS 45.002, Table 3, CCCH: TS (0, 2, 4, 6) */ + if (i % 2 != 0) { + LOGP(DNM, LOGL_ERROR, "%s is not allowed on odd TS%u\n", + gsm_pchan_name(ts->pchan_from_config), i); + result = false; + } + + /* There can be no more CCCHs if TS0/C0 is combined */ + if (i > 0 && combined) { + LOGP(DNM, LOGL_ERROR, "%s is not allowed on TS%u, " + "because TS0 is using combined channel configuration\n", + gsm_pchan_name(ts->pchan_from_config), i); + result = false; + } + break; + + default: + /* CCCH on TS0 is mandatory for C0 */ + if (trx->bts->c0 == trx && i == 0) { + LOGP(DNM, LOGL_ERROR, "TS0 on C0 must be CCCH/BCCH\n"); + result = false; + } + } + } + + return result; +} diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index dacd61a..3acdf30 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -401,6 +401,7 @@ static int bootstrap_bts(struct gsm_bts *bts) { + struct gsm_bts_trx *trx; int i, n; if (!bts->model) @@ -447,6 +448,15 @@ return -EINVAL; } + /* Verify the physical channel mapping */ + llist_for_each_entry(trx, &bts->trx_list, list) { + if (!trx_has_valid_pchan_config(trx)) { + LOGP(DNM, LOGL_ERROR, "TRX %u has invalid timeslot " + "configuration\n", trx->nr); + return -EINVAL; + } + } + /* Control Channel Description is set from vty/config */ /* Set ccch config by looking at ts config */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I758ef80f7884ba35cdf59d671ee30222ffb9d68b Gerrit-Change-Number: 15932 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:06:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:06:00 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: simplify computation of CCCH_CONFIG In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15933 ) Change subject: osmo_bsc_main.c: simplify computation of CCCH_CONFIG ...................................................................... osmo_bsc_main.c: simplify computation of CCCH_CONFIG Do not count the number of additional CCCHs if TS0 is using combined channel configuration (CCCH+SDCCH4), because they are only allowed if TS0 is not combined with SDCCH. Get rid of the 'switch' statement using the following formula: CCCH_CONFIG = (N << 1) where N is the number of additional CCCHs. Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 10 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 3acdf30..f63a388 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -402,7 +402,7 @@ static int bootstrap_bts(struct gsm_bts *bts) { struct gsm_bts_trx *trx; - int i, n; + unsigned int n = 0; if (!bts->model) return -EFAULT; @@ -459,16 +459,13 @@ /* Control Channel Description is set from vty/config */ - /* Set ccch config by looking at ts config */ - for (n=0, i=0; i<8; i++) - n += bts->c0->ts[i].pchan_is == GSM_PCHAN_CCCH ? 1 : 0; - /* Indicate R99 MSC in SI3 */ bts->si_common.chan_desc.mscr = 1; - switch (n) { - case 0: + /* Determine the value of CCCH_CONF. Is TS0/C0 combined? */ + if (bts->c0->ts[0].pchan_is != GSM_PCHAN_CCCH) { bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C; + /* Limit reserved block to 2 on combined channel according to 3GPP TS 44.018 Table 10.5.2.11.1 */ if (bts->si_common.chan_desc.bs_ag_blks_res > 2) { @@ -477,22 +474,12 @@ bts->si_common.chan_desc.bs_ag_blks_res); bts->si_common.chan_desc.bs_ag_blks_res = 2; } - break; - case 1: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_NC; - break; - case 2: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_2_NC; - break; - case 3: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_3_NC; - break; - case 4: - bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_4_NC; - break; - default: - LOGP(DNM, LOGL_ERROR, "Unsupported CCCH timeslot configuration\n"); - return -EINVAL; + } else { /* Non-combined TS0/C0 configuration */ + /* There can be additional CCCHs on even timeslot numbers */ + n += (bts->c0->ts[2].pchan_is == GSM_PCHAN_CCCH); + n += (bts->c0->ts[4].pchan_is == GSM_PCHAN_CCCH); + n += (bts->c0->ts[6].pchan_is == GSM_PCHAN_CCCH); + bts->si_common.chan_desc.ccch_conf = (n << 1); } bts->si_common.cell_options.pwrc = 0; /* PWRC not set */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15933 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I1430500999389e9b30e55ea89a8a5ea5071f7957 Gerrit-Change-Number: 15933 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:06:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:06:00 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15934 ) Change subject: osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config ...................................................................... osmo_bsc_main.c: fix CCCH_CONF computation: use pchan_from_config As can be seen from include/osmocom/bsc/gsm_data.h: - pchan_from_config - channel configuration from the VTY/config (can be changed from the VTY at runtime, should not affect the existing RSL/OML connections); - pchan_on_init - channel configuration after the OML link is established (pchan_from_config is copied here); - pchan_is - the *actual* channel configuration currently active. Since we call bootstrap_bts() during the initialization, even before establishing any OML/RSL connections, neither pchan_on_init nor pchan_is can be used. Let's use pchan_from_config instead. This change fixes the problem discovered by @mqng2 and reported together with https://gerrit.osmocom.org/c/osmo-bsc/+/15909: CCCH_CONF in System Information Type 3 does not reflect the actual channel configuration, and always indicates a single CCCH combined with SDCCH. This also misleads the lchan allocation algorithm during the MO connection establishment. Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Verified pespin: Looks good to me, but someone else must approve mqng2: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index f63a388..41e810b 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -463,7 +463,7 @@ bts->si_common.chan_desc.mscr = 1; /* Determine the value of CCCH_CONF. Is TS0/C0 combined? */ - if (bts->c0->ts[0].pchan_is != GSM_PCHAN_CCCH) { + if (bts->c0->ts[0].pchan_from_config != GSM_PCHAN_CCCH) { bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C; /* Limit reserved block to 2 on combined channel according to @@ -476,9 +476,9 @@ } } else { /* Non-combined TS0/C0 configuration */ /* There can be additional CCCHs on even timeslot numbers */ - n += (bts->c0->ts[2].pchan_is == GSM_PCHAN_CCCH); - n += (bts->c0->ts[4].pchan_is == GSM_PCHAN_CCCH); - n += (bts->c0->ts[6].pchan_is == GSM_PCHAN_CCCH); + n += (bts->c0->ts[2].pchan_from_config == GSM_PCHAN_CCCH); + n += (bts->c0->ts[4].pchan_from_config == GSM_PCHAN_CCCH); + n += (bts->c0->ts[6].pchan_from_config == GSM_PCHAN_CCCH); bts->si_common.chan_desc.ccch_conf = (n << 1); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8f9d7aa27f24b55732a4de933bc834ed930806fd Gerrit-Change-Number: 15934 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:08:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:08:08 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 02:08:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:08:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:08:47 +0000 Subject: Change in libosmocore[master]: test: add OSMO_SOCKADDR_STR_FMT to sockaddr_str_test.c In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15958 ) Change subject: test: add OSMO_SOCKADDR_STR_FMT to sockaddr_str_test.c ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15958 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I8e5ebfbbc3a2b88aed820e8f845d9f6ededb29de Gerrit-Change-Number: 15958 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 02:08:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:09:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:09:16 +0000 Subject: Change in libosmocore[master]: fix OSMO_SOCKADDR_STR_FMT for IPv6 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15959 ) Change subject: fix OSMO_SOCKADDR_STR_FMT for IPv6 ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15959 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I161f8427729ae31be0eac719b7a4a9290715e37f Gerrit-Change-Number: 15959 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 02:09:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:10:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:10:30 +0000 Subject: Change in osmo-hlr[master]: db upgrade: remove some code dup In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15964 ) Change subject: db upgrade: remove some code dup ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15964 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I1736af3d9a3f02e29db836966ac15ce49f94737b Gerrit-Change-Number: 15964 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 02:10:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:11:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:11:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: split off f_mgcp_find_param_entry() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15963 ) Change subject: msc: split off f_mgcp_find_param_entry() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I90f213d2a1be979afa024e0faa25d532f9858636 Gerrit-Change-Number: 15963 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 02:11:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:14:04 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:14:04 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 ) Change subject: msc: overhaul voice call testing ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/2/library/BSSMAP_Templates.ttcn File library/BSSMAP_Templates.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/2/library/BSSMAP_Templates.ttcn at a410 PS2, Line 410: template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr, : uint16_t udp_port, : integer len) := { this looks odd. A send-template (ts_*) should always render a defined value and hence be constrained to template (value). If you want the udp_port parameter to be absent (omit), then use "template (omit) uint16_t udp_port" for the argument specification. Maybe I'm missing something? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 02:14:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 02:14:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 02:14:37 +0000 Subject: Change in osmo-ttcn3-hacks[master]: re-implement compare-results.sh as compare-results.py In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 ) Change subject: re-implement compare-results.sh as compare-results.py ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0747c9d66ffc7e4121497a2416fca78d7b56c8e6 Gerrit-Change-Number: 15943 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 02:14:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Tue Nov 5 02:18:10 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 05 Nov 2019 02:18:10 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5dc0dbf6eb5a7_751f2b0ec3e165fc112746a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 225s] | #defi[ 208.204132] serial8250: too much work for irq4 [ 225s] ne HAVE_STRINGS_H 1 [ 225s] | #define HAVE_INTTYPES_H 1 [ 225s] | #define HAVE_STDINT_H 1 [ 225s] | #define HAVE_UNISTD_H 1 [ 225s] | #define HAVE_DLFCN_H 1 [ 225s] | #define LT_OBJDIR ".libs/" [ 225s] | #define PACKAGE "osmo-hlr" [ 225s] | #define VERSION "1.1.0.10-5b65" [ 225s] | #define STDC_HEADERS 1 [ 225s] | [ 225s] | configure: exit 0 [ 225s] [ 225s] debian/rules:17: 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:7: recipe for target 'build' failed [ 225s] make: *** [build] Error 2 [ 225s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 225s] [ 225s] lamb28 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 5 02:18:02 UTC 2019. [ 225s] [ 225s] ### VM INTERACTION START ### [ 226s] Powering off. [ 226s] [ 209.315711] reboot: Power down [ 226s] ### VM INTERACTION END ### [ 226s] [ 226s] lamb28 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 5 02:18:03 UTC 2019. [ 226s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Nov 5 02:19:01 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 05 Nov 2019 02:19:01 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5dc0dc31ab18b_751f2b0ec3e165fc1127619@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 190s] | #define HAVE_MEMORY_H 1 [ 190s] | #define HAVE_STRINGS_H 1 [ 190s] | #define HAVE_INTTYPES_H 1 [ 190s] | #define HAVE_STDINT_H 1 [ 190s] | #define HAVE_UNISTD_H 1 [ 190s] | #define HAVE_DLFCN_H 1 [ 190s] | #define LT_OBJDIR ".libs/" [ 190s] | #define PACKAGE "osmo-hlr" [ 190s] | #define VERSION "1.1.0.10-5b65" [ 190s] | #define STDC_HEADERS 1 [ 190s] | [ 190s] | configure: exit 0 [ 190s] [ 190s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 190s] make[1]: *** [override_dh_auto_test] Error 1 [ 190s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 190s] debian/rules:7: recipe for target 'build' failed [ 191s] make: *** [build] Error 2 [ 191s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 191s] [ 191s] lamb17 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 5 02:18:46 UTC 2019. [ 191s] [ 191s] ### VM INTERACTION START ### [ 193s] [ 180.810462] sysrq: SysRq : Power Off [ 193s] [ 180.830212] reboot: Power down [ 193s] ### VM INTERACTION END ### [ 193s] [ 193s] lamb17 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 5 02:18:50 UTC 2019. [ 193s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Nov 5 07:12:08 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 5 Nov 2019 07:12:08 +0000 Subject: Change in osmo-bsc[master]: osmo_bsc_main.c: verify the physical channel mapping at startup In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15932 ) Change subject: osmo_bsc_main.c: verify the physical channel mapping at startup ...................................................................... Patch Set 2: > Might be nice to integrate this here, so that each BTS model can add more constraints? I am on it. Will submit in a separate change. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I758ef80f7884ba35cdf59d671ee30222ffb9d68b Gerrit-Change-Number: 15932 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 07:12:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 10:22:06 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 10:22:06 +0000 Subject: Change in osmo-bsc[master]: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15926 ) Change subject: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class ...................................................................... Patch Set 5: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15926 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6bff440b7797e710bca5af94fae546e5d55e6972 Gerrit-Change-Number: 15926 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 10:22:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 10:23:01 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 5 Nov 2019 10:23:01 +0000 Subject: Change in osmo-bts[master]: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/15918 to look at the new patch set (#4). Change subject: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH ...................................................................... l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH The MPH INFO MEAS IND indication, which contains the uplink measurement data is sent in parallel to the PH DATA and TCH indications as a separate indications. This makes the overall uplink measurement data processing unnecessarly complex. So lets put the data that is relevant for measurement into the PH DATA and TCH indications directly. This change only affects osmo-bts-trx at the moment. In order to keep the upper layers (l1sap.c) compatible we add an autodection to switch between separate measurement indications and included measurement data. Related: OS#2977 Depends: libosmocore I2c34b02d329f9df190c5035c396403ca0a4f9c42 Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84 --- M include/osmo-bts/scheduler_backend.h M src/common/l1sap.c M src/common/scheduler.c M src/osmo-bts-trx/l1_if.c M src/osmo-bts-trx/l1_if.h M src/osmo-bts-trx/scheduler_trx.c 6 files changed, 121 insertions(+), 99 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/18/15918/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15918 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84 Gerrit-Change-Number: 15918 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 11:03:08 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 11:03:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Log wrong and expected values if MS Power level verification fails References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15965 ) Change subject: bsc: Log wrong and expected values if MS Power level verification fails ...................................................................... bsc: Log wrong and expected values if MS Power level verification fails Change-Id: Idacfdb8d9061d78ce6fa521d4008974c2d3d74df --- M bsc/MSC_ConnectionHandler.ttcn 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/65/15965/1 diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 8091d8d..09190e3 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -760,7 +760,7 @@ } } /* FIXME: validate RSL_IE_ACT_TYPE, RSL_IE_CHAN_MODE, RSL_IE_CHAN_IDENT, RSL_IE_BS_POWER, - * RSL_IE_MS_POWER, RSL_IE_TIMING_ADVANCE */ + * RSL_IE_TIMING_ADVANCE */ if (not f_rsl_find_ie(chan_act, RSL_IE_MS_POWER_PARAM, ms_power_param)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "IE MS Power Parameters not found in CHAN ACT"); @@ -770,7 +770,7 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "IE MS Power not found in CHAN ACT"); } else { if (not match(ms_power.ms_power, tr_RSL_IE_MS_Power(g_pars.exp_ms_power_level, false))) { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Wrong MS Power IE in CHAN ACT"); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Wrong MS Power IE in CHAN ACT, ", ms_power.ms_power.power_level, " vs exp ", g_pars.exp_ms_power_level)); } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15965 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idacfdb8d9061d78ce6fa521d4008974c2d3d74df Gerrit-Change-Number: 15965 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 11:03:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 11:03:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Verify presence of MS Power Parameters IE on one test References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15966 ) Change subject: bsc: Verify presence of MS Power Parameters IE on one test ...................................................................... bsc: Verify presence of MS Power Parameters IE on one test Otherwise most tests in bsc-latest fail because in latest release BSC never sends that IE. Related: OS#4244 Change-Id: I725836784a7900d2ea51eae188c2c279e8639dbf --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M bsc/expected-results.xml 3 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/15966/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index e7a4c13..9c8d68d 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -4372,6 +4372,19 @@ } } +/* Verify the BSC sends the MS Power Parameters IE during CHAN ACT to make sure + the BTS does autonomous MS power control loop */ +testcase TC_assignment_verify_ms_power_params_ie() runs on test_CT { + var MSC_ConnHdlr vc_conn; + var TestHdlrParams pars := f_gen_test_hdlr_pars(); + //pars.encr := valueof(t_EncrParams('01'O, f_rnd_octstring(8))); + pars.exp_ms_power_params := true; + + f_init(1, true); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5), pars); + vc_conn.done; +} /* Dyn PDCH todo: * activate OSMO as TCH/F @@ -4541,6 +4554,8 @@ execute( TC_chopped_ipa_ping() ); execute( TC_chopped_ipa_payload() ); + /* Power control related */ + execute( TC_assignment_verify_ms_power_params_ie() ); /* at bottom as they might crash OsmoBSC before OS#3182 is fixed */ execute( TC_early_conn_fail() ); execute( TC_late_conn_fail() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 09190e3..0141522 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -527,6 +527,7 @@ TestHdlrParamsLcls lcls, TestHdlrParamsHandover handover optional, uint5_t exp_ms_power_level, + boolean exp_ms_power_params, boolean aoip, boolean use_osmux }; @@ -553,6 +554,7 @@ }, handover := omit, exp_ms_power_level := 7, /* calculated from osmo-bsc.cfg "ms max power" */ + exp_ms_power_params := false, aoip := true, use_osmux := false } @@ -762,7 +764,7 @@ /* FIXME: validate RSL_IE_ACT_TYPE, RSL_IE_CHAN_MODE, RSL_IE_CHAN_IDENT, RSL_IE_BS_POWER, * RSL_IE_TIMING_ADVANCE */ - if (not f_rsl_find_ie(chan_act, RSL_IE_MS_POWER_PARAM, ms_power_param)) { + if (g_pars.exp_ms_power_params and not f_rsl_find_ie(chan_act, RSL_IE_MS_POWER_PARAM, ms_power_param)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "IE MS Power Parameters not found in CHAN ACT"); } diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml index 3ea202c..eb932ef 100644 --- a/bsc/expected-results.xml +++ b/bsc/expected-results.xml @@ -102,6 +102,7 @@ + -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15966 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I725836784a7900d2ea51eae188c2c279e8639dbf Gerrit-Change-Number: 15966 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 11:52:29 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 11:52:29 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix missing header for GSM_MACBLOCK_LEN References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/15967 ) Change subject: trxcon: Fix missing header for GSM_MACBLOCK_LEN ...................................................................... trxcon: Fix missing header for GSM_MACBLOCK_LEN Due to recent include dependency tree change in libosmocore, trxcon fails now to build since it uncovered it's missing a header inclusion for a symbol it is using: osmocom-bb/src/host/trxcon/sched_trx.h:204:20: error: ?GSM_MACBLOCK_LEN? undeclared here (not in a function) 204 | uint8_t mr_cache[GSM_MACBLOCK_LEN]; | ^~~~~~~~~~~~~~~~ Change-Id: Ide22e525c106342b00171a8c08bb7265d19a651b --- M src/host/trxcon/sched_trx.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/67/15967/1 diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index ab3883e..f2089e8 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -5,6 +5,7 @@ #include #include +#include #include #include -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/15967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ide22e525c106342b00171a8c08bb7265d19a651b Gerrit-Change-Number: 15967 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 11:56:04 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 5 Nov 2019 11:56:04 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix missing header for GSM_MACBLOCK_LEN In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/15967 ) Change subject: trxcon: Fix missing header for GSM_MACBLOCK_LEN ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/15967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ide22e525c106342b00171a8c08bb7265d19a651b Gerrit-Change-Number: 15967 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Tue, 05 Nov 2019 11:56:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 11:56:33 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 11:56:33 +0000 Subject: Change in osmocom-bb[master]: trxcon: Fix missing header for GSM_MACBLOCK_LEN In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/15967 ) Change subject: trxcon: Fix missing header for GSM_MACBLOCK_LEN ...................................................................... trxcon: Fix missing header for GSM_MACBLOCK_LEN Due to recent include dependency tree change in libosmocore, trxcon fails now to build since it uncovered it's missing a header inclusion for a symbol it is using: osmocom-bb/src/host/trxcon/sched_trx.h:204:20: error: ?GSM_MACBLOCK_LEN? undeclared here (not in a function) 204 | uint8_t mr_cache[GSM_MACBLOCK_LEN]; | ^~~~~~~~~~~~~~~~ Change-Id: Ide22e525c106342b00171a8c08bb7265d19a651b --- M src/host/trxcon/sched_trx.h 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index ab3883e..f2089e8 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -5,6 +5,7 @@ #include #include +#include #include #include -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/15967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ide22e525c106342b00171a8c08bb7265d19a651b Gerrit-Change-Number: 15967 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 12:02:33 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 12:02:33 +0000 Subject: Change in docker-playground[master]: make: Fix OSMO_BB_BRANCH not being passed correctly References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/15968 ) Change subject: make: Fix OSMO_BB_BRANCH not being passed correctly ...................................................................... make: Fix OSMO_BB_BRANCH not being passed correctly Change-Id: Ia289f8e71e8bb6c59b1caa7a23981a1f08a2f49e --- M make/Makefile 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/68/15968/1 diff --git a/make/Makefile b/make/Makefile index 4b40da5..83f56ae 100644 --- a/make/Makefile +++ b/make/Makefile @@ -17,6 +17,7 @@ USERNAME?=$(USER) NAME?=$(shell basename $(CURDIR)) OSMO_TTCN3_BRANCH?=master +OSMO_BB_BRANCH?=master OSMO_BSC_BRANCH?=master OSMO_BTS_BRANCH?=master OSMO_GGSN_BRANCH?=master @@ -54,6 +55,7 @@ docker-build: .release docker build --build-arg USER=$(USERNAME) --build-arg OSMO_TTCN3_BRANCH=$(OSMO_TTCN3_BRANCH) \ + --build-arg OSMO_BB_BRANCH=$(OSMO_BB_BRANCH) \ --build-arg OSMO_BSC_BRANCH=$(OSMO_BSC_BRANCH) \ --build-arg OSMO_BTS_BRANCH=$(OSMO_BTS_BRANCH) \ --build-arg OSMO_GGSN_BRANCH=$(OSMO_GGSN_BRANCH) \ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ia289f8e71e8bb6c59b1caa7a23981a1f08a2f49e Gerrit-Change-Number: 15968 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 13:09:42 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 13:09:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15969 ) Change subject: bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level ...................................................................... bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level Related: OS#4244 Change-Id: I62c468b27d05fbff4a98ea24981188689f5899d3 --- M bts/BTS_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/69/15969/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 90281e3..f5a2b1f 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -2160,7 +2160,7 @@ /* update power param to enable power loop as per spec the supplied ms power IE should set the max allowed power...*/ - RSL.send(ts_RSL_MS_PWR_CTRL_with_pp(g_chan_nr, pwr_var)); + RSL.send(ts_RSL_MS_PWR_CTRL_with_pp(g_chan_nr, pwr_target_val)); /* wait, then check that our power level was increased */ timer T1 := 10.0; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15969 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I62c468b27d05fbff4a98ea24981188689f5899d3 Gerrit-Change-Number: 15969 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 13:35:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 13:35:27 +0000 Subject: Change in osmo-bts[master]: rsl: Assign recv pwr to lchan's max ms power References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/15970 ) Change subject: rsl: Assign recv pwr to lchan's max ms power ...................................................................... rsl: Assign recv pwr to lchan's max ms power Otherwise older ms_power value will be kept and used as a maximum. >From TS 08.58 sec 4.8 "MS power control": """ If power control is supported by BTS and it is to be used, this is indicated by optional parameters in theMS POWER CONTROL message (or the CHANNEL ACTIVATION message). Based on the measurements performed on the uplink, TRX then attempts to keep the power control parameters within the limits set by the MS POWER CONTROL message (or by the CHANNEL ACTIVATION message). """ Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 --- M src/common/rsl.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/15970/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index de51e6f..3358976 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1633,7 +1633,10 @@ return rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &dch->chan_nr, NULL, msg); pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; - lchan->ms_power_ctrl.current = pwr; + lchan->ms_power = pwr; + /* FIXME: only set current to lchan->ms_power if actual value of current + in dBm > value in dBm from lchan->ms_power, or if fixed=1. */ + lchan->ms_power_ctrl.current = lchan->ms_power; LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Rx MS POWER CONTROL %d\n", lchan->ms_power_ctrl.current); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 Gerrit-Change-Number: 15970 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 13:35:28 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 13:35:28 +0000 Subject: Change in osmo-bts[master]: bts-trx: Implement MS Power control loop calculations using dBm inste... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/15971 ) Change subject: bts-trx: Implement MS Power control loop calculations using dBm instead of ctl levels ...................................................................... bts-trx: Implement MS Power control loop calculations using dBm instead of ctl levels Some bands, such as DCS1800, contain power levels such as 29, 30 and 31 not following same unified sequence other power levels follow regarding conversion to dBm values. This makes extremly complex and prone to error comparing different power levels. Let's instead use dBm values to calculate and crop desired new value, and then convert it back to TS 05.05 ms power control level value. With this commit the control loop should be able to manage correctly the MS power levels explained above. Related: OS#4244 Change-Id: I0160637c5ffa606ee3081ad30be8e6f2a42b725b --- M src/osmo-bts-trx/loops.c M src/osmo-bts-trx/loops.h 2 files changed, 55 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/71/15971/1 diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index 4e77bca..469f2c7 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -39,45 +40,68 @@ /*! compute the new MS POWER LEVEL communicated to the MS and store it in lchan. * \param lchan logical channel for which to compute (and in which to store) new power value. - * \param[in] diff input delta value (in dB) */ + * \param[in] diff input delta value (in dB). How many dBs measured power should be increased (+) or decreased (-) to reach expected power. */ static void ms_power_diff(struct gsm_lchan *lchan, int8_t diff) { struct gsm_bts_trx *trx = lchan->ts->trx; enum gsm_band band = trx->bts->band; - uint16_t arfcn = trx->arfcn; int8_t new_power; /* TS 05.05 power level */ + int8_t new_dbm, current_dbm, bsc_max_dbm, pwclass_max_dbm; - /* compute new target MS output power level based on current value subtracted by 'diff/2' */ - new_power = lchan->ms_power_ctrl.current - (diff >> 1); - - if (diff == 0) + /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */ + if (diff < 2 && diff > -2) return; - /* ms transmit power level cannot become negative */ - if (new_power < 0) - new_power = 0; - - /* Don't ask for smaller ms power level than the one set by BSC upon RSL CHAN ACT */ - if (new_power < lchan->ms_power) - new_power = lchan->ms_power; - - /* saturate at the maximum possible power level for the given band */ - // FIXME: to go above 1W, we need to know classmark of MS - if (arfcn >= 512 && arfcn <= 885) { - if (new_power > 15) - new_power = 15; - } else { - if (new_power > 19) - new_power = 19; + current_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.current); + if (current_dbm < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to retrieve dBm for power ctl level %" PRIu8 " on band %d\n", + lchan->ms_power_ctrl.current, band); + return; + } + bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power); + if (bsc_max_dbm < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to retrieve dBm for power ctl level %" PRIu8 " on band %d\n", + lchan->ms_power, band); + return; } - /* don't ever change more than MS_{LOWER,RAISE}_MAX during one loop iteration, i.e. + /* don't ever change more than MS_{LOWER,RAISE}_MAX_DBM during one loop iteration, i.e. * reduce the speed at which the MS transmit power can change */ /* a higher value means a lower level (and vice versa) */ - if (new_power > lchan->ms_power_ctrl.current + MS_LOWER_MAX) - new_power = lchan->ms_power_ctrl.current + MS_LOWER_MAX; - else if (new_power < lchan->ms_power_ctrl.current - MS_RAISE_MAX) - new_power = lchan->ms_power_ctrl.current - MS_RAISE_MAX; + if (diff > MS_RAISE_MAX_DBM) + diff = MS_RAISE_MAX_DBM; + else if (diff < -MS_LOWER_MAX_DBM) + diff = -MS_LOWER_MAX_DBM; + + new_dbm = current_dbm + diff; + + /* Make sure new_dbm is never negative. ms_pwr_ctl_lvl() can later on + cope with any unsigned dbm value, regardless of band minimal value. */ + if (new_dbm < 0) + new_dbm = 0; + + /* Don't ask for smaller ms power level than the one set by BSC upon RSL CHAN ACT */ + if (new_dbm > bsc_max_dbm) + new_dbm = bsc_max_dbm; + + /* Make sure in no case the dBm value is higher than the one of ms + power class 1 (the one with more output power) for the given band. + Ideally we should catch the MS specific power class and apply it + here, but for now let's assume the BSC sent us one taking the power + class into account. */ + pwclass_max_dbm = (int)ms_class_gmsk_dbm(band, 1); + if (pwclass_max_dbm >= 0 && new_dbm > pwclass_max_dbm) + new_dbm = pwclass_max_dbm; + + new_power = ms_pwr_ctl_lvl(band, new_dbm); + if (new_power < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to retrieve power level for %" PRId8 " dBm on band %d\n", + new_dbm, band); + return; + } if (lchan->ms_power_ctrl.current == new_power) { LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d (%d dBm)\n", @@ -138,8 +162,8 @@ /* if no burst was received from MS at clock */ if (chan_state->meas.rssi_count == 0) { - LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, "LOST SACCH frame, so we raise MS power\n"); - ms_power_diff(lchan, MS_RAISE_MAX); + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, "LOST SACCH frame, so we raise MS power output\n"); + ms_power_diff(lchan, MS_RAISE_MAX_DBM); return; } diff --git a/src/osmo-bts-trx/loops.h b/src/osmo-bts-trx/loops.h index 0db01d7..42b1819 100644 --- a/src/osmo-bts-trx/loops.h +++ b/src/osmo-bts-trx/loops.h @@ -8,8 +8,8 @@ */ /* how much power levels do we raise/lower as maximum (1 level = 2 dB) */ -#define MS_RAISE_MAX 4 -#define MS_LOWER_MAX 2 +#define MS_RAISE_MAX_DBM 4 +#define MS_LOWER_MAX_DBM 8 /* * loops api -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0160637c5ffa606ee3081ad30be8e6f2a42b725b Gerrit-Change-Number: 15971 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 15:18:46 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 15:18:46 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: log descriptions in color with -v In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15951 ) Change subject: msc_vlr_tests: log descriptions in color with -v ...................................................................... Patch Set 2: Code-Review+1 Ah sorry, I understood wrong the commit message, I thought you were adding the parameter. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d Gerrit-Change-Number: 15951 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 15:18:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 15:23:13 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 15:23:13 +0000 Subject: Change in osmo-msc[master]: MNCC: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC: add optional SDP to the socket protocol ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/15948/1/src/libmsc/mncc.c File src/libmsc/mncc.c: https://gerrit.osmocom.org/c/osmo-msc/+/15948/1/src/libmsc/mncc.c at 266 PS1, Line 266: * char sdp[] starts with a '\0'. */ > but msgb_alloc_c() has: [?] for performance reasons I would expect at some point msgb cease to be zero-initialized. In any case, I'd take that as an implementation detail and not rely on that from API point of view. It's no problem modifying an input buffer from the msgb, I'm pretty sure we do that in other places and I don't see why that can be bad. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 15:23:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 15:30:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 15:30:27 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() and _str_ip_cmp() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15961 ) Change subject: add osmo_sockaddr_str_cmp() and _str_ip_cmp() ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15961/4/src/sockaddr_str.c File src/sockaddr_str.c: https://gerrit.osmocom.org/c/libosmocore/+/15961/4/src/sockaddr_str.c at 104 PS4, Line 104: int osmo_sockaddr_str_cmp(const struct osmo_sockaddr_str *a, const struct osmo_sockaddr_str *b) It's not clear to me why do you want to have this one as a public API having the other. I'd keep it as static until there's a case for it. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 15:30:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 15:31:43 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 15:31:43 +0000 Subject: Change in osmo-msc[master]: BSSMAP: decode Codec List (BSS Supported) In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15946 ) Change subject: BSSMAP: decode Codec List (BSS Supported) ...................................................................... Patch Set 2: Code-Review+1 see my last comment regarding log level. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e Gerrit-Change-Number: 15946 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 15:31:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 15:39:45 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 15:39:45 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 3: (3 comments) https://gerrit.osmocom.org/c/libosmocore/+/15957/3/include/osmocom/core/utils.h File include/osmocom/core/utils.h: https://gerrit.osmocom.org/c/libosmocore/+/15957/3/include/osmocom/core/utils.h at 300 PS3, Line 300: if (INITIAL_BUFSIZE > 0) { \ better use (INITIAL_BUFSIZE) https://gerrit.osmocom.org/c/libosmocore/+/15957/3/include/osmocom/core/utils.h at 324 PS3, Line 324: if (!ON_ERROR) \ Probably add () here, otherwise something in there may take higher priority than the negation mark. https://gerrit.osmocom.org/c/libosmocore/+/15957/3/tests/utils/utils_test.c File tests/utils/utils_test.c: https://gerrit.osmocom.org/c/libosmocore/+/15957/3/tests/utils/utils_test.c at 1127 PS3, Line 1127: whitespace -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 15:39:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 15:40:48 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 15:40:48 +0000 Subject: Change in osmo-msc[master]: cc trans: remove unused tch_rtp_create In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15962 ) Change subject: cc trans: remove unused tch_rtp_create ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15962 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5ec78e30eb36fbe78a3f7c46bfa44af5a4eb7bf2 Gerrit-Change-Number: 15962 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 15:40:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 15:43:22 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 15:43:22 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15953 ) Change subject: add full SDP codec information to the MNCC socket ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 15:43:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 15:44:48 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 15:44:48 +0000 Subject: Change in libosmocore[master]: test: add OSMO_SOCKADDR_STR_FMT to sockaddr_str_test.c In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15958 ) Change subject: test: add OSMO_SOCKADDR_STR_FMT to sockaddr_str_test.c ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15958 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I8e5ebfbbc3a2b88aed820e8f845d9f6ededb29de Gerrit-Change-Number: 15958 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 15:44:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 15:45:56 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 15:45:56 +0000 Subject: Change in libosmocore[master]: fix OSMO_SOCKADDR_STR_FMT for IPv6 In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15959 ) Change subject: fix OSMO_SOCKADDR_STR_FMT for IPv6 ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15959 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I161f8427729ae31be0eac719b7a4a9290715e37f Gerrit-Change-Number: 15959 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 15:45:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 15:47:13 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 15:47:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: re-implement compare-results.sh as compare-results.py In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 ) Change subject: re-implement compare-results.sh as compare-results.py ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0747c9d66ffc7e4121497a2416fca78d7b56c8e6 Gerrit-Change-Number: 15943 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 15:47:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 16:16:36 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 16:16:36 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: Log osmo-stp output to file and gsmtap References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/15972 ) Change subject: ttcn3-stp: Log osmo-stp output to file and gsmtap ...................................................................... ttcn3-stp: Log osmo-stp output to file and gsmtap Similar to what we do with other suites. Change-Id: Ib12bc92c86e4a2ba15e1eec56f2ac0905281b21d --- M ttcn3-stp-test/osmo-stp.cfg 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/72/15972/1 diff --git a/ttcn3-stp-test/osmo-stp.cfg b/ttcn3-stp-test/osmo-stp.cfg index e16cd8b..058ac2a 100644 --- a/ttcn3-stp-test/osmo-stp.cfg +++ b/ttcn3-stp-test/osmo-stp.cfg @@ -2,6 +2,16 @@ ! OsmoSTP (1.1.0.2-3884) configuration saved from vty !! ! +log gsmtap 172.18.19.203 + logging level set-all debug + logging filter all 1 +log file /data/osmo-stp.log + logging filter all 1 + logging color 0 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging level set-all debug log stderr logging filter all 1 logging color 1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15972 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ib12bc92c86e4a2ba15e1eec56f2ac0905281b21d Gerrit-Change-Number: 15972 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 16:24:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 16:24:47 +0000 Subject: Change in libosmo-sccp[master]: introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15973 ) Change subject: introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP ...................................................................... introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP This supersedes the library-internal enum xua_asp_role. Change-Id: I28b0888b8f8206e9dd67ef64ce0f71ba9a7105ce --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/xua_asp_fsm.c M src/xua_asp_fsm.h 4 files changed, 32 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/73/15973/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index e1f72fd..bbf9f81 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -368,6 +368,14 @@ OSMO_SS7_ASP_ADM_S_ENABLED, }; +enum osmo_ss7_asp_role { + OSMO_SS7_ASP_ROLE_ASP, + OSMO_SS7_ASP_ROLE_SG, + OSMO_SS7_ASP_ROLE_IPSP, +}; + +extern const struct value_string osmo_ss7_asp_role_names[]; + struct osmo_ss7_asp { /*! entry in \ref osmo_ss7_instance.asp_list */ struct llist_head list; diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index c982370..35df192 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -74,6 +74,13 @@ { 0, NULL } }; +const struct value_string osmo_ss7_asp_role_names[] = { + { OSMO_SS7_ASP_ROLE_ASP, "ASP" }, + { OSMO_SS7_ASP_ROLE_SG, "SG" }, + { OSMO_SS7_ASP_ROLE_IPSP, "IPSP" }, + { 0, NULL } +}; + static int asp_proto_to_ip_proto(enum osmo_ss7_asp_protocol proto) { switch (proto) { @@ -1280,7 +1287,7 @@ int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp) { int rc; - enum xua_asp_role role; + enum osmo_ss7_asp_role role; char bufloc[512], bufrem[512]; OSMO_ASSERT(ss7_initialized); @@ -1326,7 +1333,7 @@ osmo_stream_cli_set_reconnect_timeout() above) to connect so the error is transient */ } /* TODO: make this configurable and not implicit */ - role = XUA_ASPFSM_ROLE_ASP; + role = OSMO_SS7_ASP_ROLE_ASP; } else { /* We are in server mode now */ if (asp->client) { @@ -1339,7 +1346,7 @@ LOGPASP(asp, DLSS7, LOGL_NOTICE, "ASP Restart for server " "not implemented yet!\n"); /* TODO: make this configurable and not implicit */ - role = XUA_ASPFSM_ROLE_SG; + role = OSMO_SS7_ASP_ROLE_SG; } /* (re)start the ASP FSM */ diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 1f27201..b3910b2 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -47,13 +47,6 @@ #define SUA_T_IAS_SEC (7*60) /* SUA only */ #define SUA_T_IAR_SEC (15*60) /* SUA only */ -static const struct value_string xua_asp_role_names[] = { - { XUA_ASPFSM_ROLE_ASP, "ASP" }, - { XUA_ASPFSM_ROLE_SG, "SG" }, - { XUA_ASPFSM_ROLE_IPSP, "IPSP" }, - { 0, NULL } -}; - static const struct value_string xua_asp_event_names[] = { { XUA_ASP_E_M_ASP_UP_REQ, "M-ASP_UP.req" }, { XUA_ASP_E_M_ASP_ACTIVE_REQ, "M-ASP_ACTIVE.req" }, @@ -88,7 +81,7 @@ /* pointer back to ASP to which we belong */ struct osmo_ss7_asp *asp; /* Role (ASP/SG/IPSP) */ - enum xua_asp_role role; + enum osmo_ss7_asp_role role; /* routing context[s]: list of 32bit integers */ /* ACTIVE: traffic mode type, tid label, drn label ? */ @@ -312,12 +305,12 @@ #define ENSURE_ASP_OR_IPSP(fi, event) \ do { \ struct xua_asp_fsm_priv *_xafp = fi->priv; \ - if (_xafp->role != XUA_ASPFSM_ROLE_ASP && \ - _xafp->role != XUA_ASPFSM_ROLE_IPSP) { \ + if (_xafp->role != OSMO_SS7_ASP_ROLE_ASP && \ + _xafp->role != OSMO_SS7_ASP_ROLE_IPSP) { \ LOGPFSML(fi, LOGL_ERROR, "event %s not permitted " \ "in role %s\n", \ osmo_fsm_event_name(fi->fsm, event), \ - get_value_string(xua_asp_role_names, _xafp->role));\ + get_value_string(osmo_ss7_asp_role_names, _xafp->role));\ return; \ } \ } while(0) @@ -325,12 +318,12 @@ #define ENSURE_SG_OR_IPSP(fi, event) \ do { \ struct xua_asp_fsm_priv *_xafp = fi->priv; \ - if (_xafp->role != XUA_ASPFSM_ROLE_SG && \ - _xafp->role != XUA_ASPFSM_ROLE_IPSP) { \ + if (_xafp->role != OSMO_SS7_ASP_ROLE_SG && \ + _xafp->role != OSMO_SS7_ASP_ROLE_IPSP) { \ LOGPFSML(fi, LOGL_ERROR, "event %s not permitted " \ "in role %s\n", \ osmo_fsm_event_name(fi->fsm, event), \ - get_value_string(xua_asp_role_names, _xafp->role));\ + get_value_string(osmo_ss7_asp_role_names, _xafp->role));\ return; \ } \ } while(0) @@ -695,7 +688,7 @@ }; static struct osmo_fsm_inst *ipa_asp_fsm_start(struct osmo_ss7_asp *asp, - enum xua_asp_role role, int log_level); + enum osmo_ss7_asp_role role, int log_level); /*! \brief Start a new ASP finite stae machine for given ASP * \param[in] asp Application Server Process for which to start FSM @@ -703,7 +696,7 @@ * \param[in] log_level Logging Level for ASP FSM logging * \returns FSM instance on success; NULL on error */ struct osmo_fsm_inst *xua_asp_fsm_start(struct osmo_ss7_asp *asp, - enum xua_asp_role role, int log_level) + enum osmo_ss7_asp_role role, int log_level) { struct osmo_fsm_inst *fi; struct xua_asp_fsm_priv *xafp; @@ -754,7 +747,7 @@ /* pointer back to ASP to which we belong */ struct osmo_ss7_asp *asp; /* Role (ASP/SG/IPSP) */ - enum xua_asp_role role; + enum osmo_ss7_asp_role role; /* Structure holding parsed data of the IPA CCM ID exchange */ struct ipaccess_unit *ipa_unit; @@ -793,7 +786,7 @@ switch (event) { case XUA_ASP_E_M_ASP_UP_REQ: case XUA_ASP_E_SCTP_EST_IND: - if (iafp->role == XUA_ASPFSM_ROLE_SG) { + if (iafp->role == OSMO_SS7_ASP_ROLE_SG) { /* Server: Transmit IPA ID GET + Wait for Response */ if (fd >= 0) { ipa_ccm_send_id_req(fd); @@ -1101,7 +1094,7 @@ * \param[in] log_level Logging Level for ASP FSM logging * \returns FSM instance on success; NULL on error */ static struct osmo_fsm_inst *ipa_asp_fsm_start(struct osmo_ss7_asp *asp, - enum xua_asp_role role, int log_level) + enum osmo_ss7_asp_role role, int log_level) { struct osmo_fsm_inst *fi; struct ipa_asp_fsm_priv *iafp; @@ -1123,7 +1116,7 @@ fi->priv = iafp; - if (role == XUA_ASPFSM_ROLE_ASP) + if (role == OSMO_SS7_ASP_ROLE_ASP) osmo_fsm_inst_dispatch(fi, XUA_ASP_E_M_ASP_UP_REQ, NULL); return fi; diff --git a/src/xua_asp_fsm.h b/src/xua_asp_fsm.h index 32749ec..2b36220 100644 --- a/src/xua_asp_fsm.h +++ b/src/xua_asp_fsm.h @@ -36,14 +36,8 @@ _NUM_XUA_ASP_E }; -enum xua_asp_role { - XUA_ASPFSM_ROLE_ASP, - XUA_ASPFSM_ROLE_SG, - XUA_ASPFSM_ROLE_IPSP, -}; - extern struct osmo_fsm xua_asp_fsm; extern struct osmo_fsm ipa_asp_fsm; struct osmo_fsm_inst *xua_asp_fsm_start(struct osmo_ss7_asp *asp, - enum xua_asp_role role, int log_level); + enum osmo_ss7_asp_role role, int log_level); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I28b0888b8f8206e9dd67ef64ce0f71ba9a7105ce Gerrit-Change-Number: 15973 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 16:24:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 16:24:47 +0000 Subject: Change in libosmo-sccp[master]: Allow ASP role to be configured References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 ) Change subject: Allow ASP role to be configured ...................................................................... Allow ASP role to be configured So far, we had a static role model: * SCTP servers (listening, such as OsmoSTP) are role SGW * SCTP clients (connecting, such as OsmoMSC) are role ASP While this is customary, it is not actually required by the specification. The SGW can establish the SCTP connection to an ASP but still remain "SG" role. Let's make things more flexible by having the role configurable. Related: OS#2005 Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/sccp_user.c 4 files changed, 34 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/74/15974/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index bbf9f81..3ad9d7b 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -417,6 +417,8 @@ enum osmo_ss7_asp_protocol proto; enum osmo_ss7_asp_admin_state adm_state; bool is_server; + enum osmo_ss7_asp_role role; + bool role_set_by_vty; struct osmo_ss7_asp_peer local; struct osmo_ss7_asp_peer remote; diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 35df192..8687690 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1287,7 +1287,6 @@ int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp) { int rc; - enum osmo_ss7_asp_role role; char bufloc[512], bufrem[512]; OSMO_ASSERT(ss7_initialized); @@ -1332,8 +1331,6 @@ will continue to retry (due to timeout being explicitly set with osmo_stream_cli_set_reconnect_timeout() above) to connect so the error is transient */ } - /* TODO: make this configurable and not implicit */ - role = OSMO_SS7_ASP_ROLE_ASP; } else { /* We are in server mode now */ if (asp->client) { @@ -1345,14 +1342,12 @@ /* FIXME: ensure we have a SCTP server */ LOGPASP(asp, DLSS7, LOGL_NOTICE, "ASP Restart for server " "not implemented yet!\n"); - /* TODO: make this configurable and not implicit */ - role = OSMO_SS7_ASP_ROLE_SG; } /* (re)start the ASP FSM */ if (asp->fi) osmo_fsm_inst_term(asp->fi, OSMO_FSM_TERM_REQUEST, NULL); - asp->fi = xua_asp_fsm_start(asp, role, LOGL_DEBUG); + asp->fi = xua_asp_fsm_start(asp, asp->cfg.role, LOGL_DEBUG); return 0; } diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 9c22fb1..1b8b043 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -580,6 +580,7 @@ return CMD_WARNING; } asp->cfg.is_server = true; + asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; vty->node = L_CS7_ASP_NODE; vty->index = asp; @@ -637,6 +638,29 @@ return CMD_SUCCESS; } +DEFUN(asp_role, asp_role_cmd, + "role (sg|asp|ipsp)", + "Specify the xUA role for this ASP\n" + "SG (Signaling Gateway)\n" + "ASP (Application Server Process)\n" + "IPSP (IP Signalling Point)\n") +{ + struct osmo_ss7_asp *asp = vty->index; + + if (!strcmp(argv[0], "sg")) { + asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; + } else if (!strcmp(argv[0], "asp")) { + asp->cfg.role = OSMO_SS7_ASP_ROLE_ASP; + } else if (!strcmp(argv[0], "ipsp")) { + vty_out(vty, "IPSP role isn't supported yet%s", VTY_NEWLINE); + return CMD_WARNING; + } else + OSMO_ASSERT(0); + + asp->cfg.role_set_by_vty = true; + return CMD_SUCCESS; +} + DEFUN(asp_block, asp_block_cmd, "block", "Allows a SCTP Association with ASP, but doesn't let it become active\n") @@ -707,6 +731,10 @@ } if (asp->cfg.qos_class) vty_out(vty, " qos-class %u%s", asp->cfg.qos_class, VTY_NEWLINE); + if (asp->cfg.role_set_by_vty) { + vty_out(vty, " role %s%s", get_value_string(osmo_ss7_asp_role_names, asp->cfg.role), + VTY_NEWLINE); + } } @@ -1847,6 +1875,7 @@ install_element(L_CS7_ASP_NODE, &asp_remote_ip_cmd); install_element(L_CS7_ASP_NODE, &asp_local_ip_cmd); install_element(L_CS7_ASP_NODE, &asp_qos_class_cmd); + install_element(L_CS7_ASP_NODE, &asp_role_cmd); install_element(L_CS7_ASP_NODE, &asp_block_cmd); install_element(L_CS7_ASP_NODE, &asp_shutdown_cmd); diff --git a/src/sccp_user.c b/src/sccp_user.c index 4e4144e..929445f 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -587,6 +587,7 @@ /* Ensure that the ASP we use is set to client mode. */ asp->cfg.is_server = false; + asp->cfg.role = OSMO_SS7_ASP_ROLE_ASP; /* Restart ASP */ if (prot != OSMO_SS7_ASP_PROT_IPA) @@ -734,6 +735,7 @@ if (!asp) goto out_rt; asp->cfg.is_server = true; + asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; osmo_ss7_as_add_asp(as, asp_name); talloc_free(asp_name); talloc_free(as_name); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 Gerrit-Change-Number: 15974 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 16:24:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 16:24:48 +0000 Subject: Change in libosmo-sccp[master]: vty: Permit configuration of ASPs in SCTP client mode References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 ) Change subject: vty: Permit configuration of ASPs in SCTP client mode ...................................................................... vty: Permit configuration of ASPs in SCTP client mode The M3UA specification states that either of the two roles should be the SCTP client and the other the server. It also states that the default for the SGP is to operate as server. However, it permits other configurations. Let's allow this to be configured by the VTY. We need to ensure that while in ASP role, we don't send any NOTIFY messages to the peer SG. Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Closes: OS#2005 --- M src/osmo_ss7_vty.c M src/xua_as_fsm.c 2 files changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/15975/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 1b8b043..35640df 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -661,6 +661,24 @@ return CMD_SUCCESS; } +DEFUN(sctp_role, asp_sctp_role_cmd, + "sctp-role (client|server)", + "Specify the SCTP role for this ASP\n" + "Operate as SCTP client; connect to a server\n" + "Operate as SCTP server; wait for client connections\n") +{ + struct osmo_ss7_asp *asp = vty->index; + + if (!strcmp(argv[0], "client")) + asp->cfg.is_server = false; + else if (!strcmp(argv[0], "server")) + asp->cfg.is_server = true; + else + OSMO_ASSERT(0); + + return CMD_SUCCESS; +} + DEFUN(asp_block, asp_block_cmd, "block", "Allows a SCTP Association with ASP, but doesn't let it become active\n") @@ -1876,6 +1894,7 @@ install_element(L_CS7_ASP_NODE, &asp_local_ip_cmd); install_element(L_CS7_ASP_NODE, &asp_qos_class_cmd); install_element(L_CS7_ASP_NODE, &asp_role_cmd); + install_element(L_CS7_ASP_NODE, &asp_sctp_role_cmd); install_element(L_CS7_ASP_NODE, &asp_block_cmd); install_element(L_CS7_ASP_NODE, &asp_shutdown_cmd); diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index cf75ef3..97a2107 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -51,6 +51,10 @@ if (!asp) continue; + /* NOTIFY are only sent by SG or IPSP role */ + if (asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP) + continue; + if (!asp->fi || asp->fi->state == XUA_ASP_S_DOWN) continue; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Gerrit-Change-Number: 15975 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 16:24:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 16:24:48 +0000 Subject: Change in libosmo-sccp[master]: ASP FSM: Permit DOWN -> DOWN "transition" References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15976 ) Change subject: ASP FSM: Permit DOWN -> DOWN "transition" ...................................................................... ASP FSM: Permit DOWN -> DOWN "transition" let's avoid messages like DLSS7 <000c> xua_asp_fsm.c:600 XUA_ASP(asp-client0){ASP_DOWN}: transition to state ASP_DOWN not permitted! Change-Id: Iabbcf92e3022a4c3f165ce19be929915f92b455c --- M src/xua_asp_fsm.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/76/15976/1 diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index b3910b2..b704f84 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -634,7 +634,8 @@ S(XUA_ASP_E_ASPSM_ASPUP_ACK) | S(XUA_ASP_E_ASPSM_ASPDN) | S(XUA_ASP_E_SCTP_EST_IND), - .out_state_mask = S(XUA_ASP_S_INACTIVE), + .out_state_mask = S(XUA_ASP_S_INACTIVE) | + S(XUA_ASP_S_DOWN), .name = "ASP_DOWN", .action = xua_asp_fsm_down, .onenter = xua_asp_fsm_down_onenter, -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15976 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Iabbcf92e3022a4c3f165ce19be929915f92b455c Gerrit-Change-Number: 15976 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 16:24:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 16:24:48 +0000 Subject: Change in libosmo-sccp[master]: ASP: Stop re-transmitting un-acknowledged messages on SCTP down event References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15977 ) Change subject: ASP: Stop re-transmitting un-acknowledged messages on SCTP down event ...................................................................... ASP: Stop re-transmitting un-acknowledged messages on SCTP down event We don't want to attempt to re-transimt if we lots the connection: DLSS7 <000c> xua_asp_fsm.c:251 XUA_ASP(asp-client0){ASP_DOWN}: T(ack) callback: re-transmitting event ASPSM-ASP_UP DLSS7 <000c> osmo_ss7.c:1833 0: asp-asp-client0: Cannot transmit, asp->client not connected DLSS7 <000c> xua_asp_fsm.c:251 XUA_ASP(asp-client0){ASP_DOWN}: T(ack) callback: re-transmitting event ASPSM-ASP_UP DLSS7 <000c> osmo_ss7.c:1833 0: asp-asp-client0: Cannot transmit, asp->client not connected DLSS7 <000c> xua_asp_fsm.c:251 XUA_ASP(asp-client0){ASP_DOWN}: T(ack) callback: re-transmitting event ASPSM-ASP_UP DLSS7 <000c> osmo_ss7.c:1833 0: asp-asp-client0: Cannot transmit, asp->client not connected DLSS7 <000c> xua_asp_fsm.c:251 XUA_ASP(asp-client0){ASP_DOWN}: T(ack) callback: re-transmitting event ASPSM-ASP_UP DLSS7 <000c> osmo_ss7.c:1833 0: asp-asp-client0: Cannot transmit, asp->client not connected DLSS7 <000c> xua_asp_fsm.c:251 XUA_ASP(asp-client0){ASP_DOWN}: T(ack) callback: re-transmitting event ASPSM-ASP_UP Change-Id: Ic8da646d22d3120121d9af43a890762a879f9d74 --- M src/xua_asp_fsm.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/77/15977/1 diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index b704f84..c951006 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -592,11 +592,13 @@ static void xua_asp_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct xua_asp_fsm_priv *xafp = fi->priv; struct xua_msg *xua; switch (event) { case XUA_ASP_E_SCTP_COMM_DOWN_IND: case XUA_ASP_E_SCTP_RESTART_IND: + osmo_timer_del(&xafp->t_ack.timer); osmo_fsm_inst_state_chg(fi, XUA_ASP_S_DOWN, 0, 0); send_xlm_prim_simple(fi, OSMO_XLM_PRIM_M_ASP_DOWN, PRIM_OP_INDICATION); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15977 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic8da646d22d3120121d9af43a890762a879f9d74 Gerrit-Change-Number: 15977 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 16:27:31 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 16:27:31 +0000 Subject: Change in libosmo-sccp[master]: introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15973 ) Change subject: introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I28b0888b8f8206e9dd67ef64ce0f71ba9a7105ce Gerrit-Change-Number: 15973 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 05 Nov 2019 16:27:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 17:39:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 17:39:59 +0000 Subject: Change in libosmo-sccp[master]: Allow ASP role to be configured In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 to look at the new patch set (#2). Change subject: Allow ASP role to be configured ...................................................................... Allow ASP role to be configured So far, we had a static role model: * SCTP servers (listening, such as OsmoSTP) are role SGW * SCTP clients (connecting, such as OsmoMSC) are role ASP While this is customary, it is not actually required by the specification. The SGW can establish the SCTP connection to an ASP but still remain "SG" role. Let's make things more flexible by having the role configurable. Related: OS#2005 Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/sccp_user.c M tests/vty/ss7_asp_test.vty 5 files changed, 35 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/74/15974/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 Gerrit-Change-Number: 15974 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 17:39:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 17:39:59 +0000 Subject: Change in libosmo-sccp[master]: vty: Permit configuration of ASPs in SCTP client mode In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 to look at the new patch set (#2). Change subject: vty: Permit configuration of ASPs in SCTP client mode ...................................................................... vty: Permit configuration of ASPs in SCTP client mode The M3UA specification states that either of the two roles should be the SCTP client and the other the server. It also states that the default for the SGP is to operate as server. However, it permits other configurations. Let's allow this to be configured by the VTY. We need to ensure that while in ASP role, we don't send any NOTIFY messages to the peer SG. Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Closes: OS#2005 --- M src/osmo_ss7_vty.c M src/xua_as_fsm.c M tests/vty/ss7_asp_test.vty 3 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/15975/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Gerrit-Change-Number: 15975 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 17:51:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 17:51:49 +0000 Subject: Change in libosmo-sccp[master]: M3UA: Reject ASP activation + RKM registration for incompatible traff... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 ) Change subject: M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode ...................................................................... Patch Set 3: (4 comments) https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/3/include/osmocom/sigtran/osmo_ss7.h File include/osmocom/sigtran/osmo_ss7.h: https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/3/include/osmocom/sigtran/osmo_ss7.h at 319 PS3, Line 319: /* traffic mode was configured by RKM (routing key management) */ > AFAIU not only by RKM, but by first ASPAC too. Done https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/3/include/osmocom/sigtran/osmo_ss7.h at 531 PS3, Line 531: bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt); > This one should go togehter with other osmo_ss7_as_* APIs around line 349. Done https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/3/src/xua_asp_fsm.c File src/xua_asp_fsm.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/3/src/xua_asp_fsm.c at 459 PS3, Line 459: return; > Ah you fixed it here. I'd be better on the other commit but fine. Done https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/3/src/xua_asp_fsm.c at 470 PS3, Line 470: if (traf_mode) { /* if the peer has specified a traffic mode at all */ > I'm thinking that inside here we should have similar to what we have in RKM: if (!as->cfg. [?] Done -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c Gerrit-Change-Number: 15885 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 17:51:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 17:59:57 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 17:59:57 +0000 Subject: Change in libosmo-sccp[master]: xua: Allow traffic mode set by peer if not set by VTY References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 ) Change subject: xua: Allow traffic mode set by peer if not set by VTY ...................................................................... xua: Allow traffic mode set by peer if not set by VTY Change-Id: I8ca17439b4dd023625f8f22689c0432341986099 --- M include/osmocom/sigtran/osmo_ss7.h M src/xua_asp_fsm.c M src/xua_rkm.c 3 files changed, 55 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/78/15978/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 1b5fc31..4f20d81 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -314,7 +314,10 @@ enum osmo_ss7_asp_protocol proto; struct osmo_ss7_routing_key routing_key; enum osmo_ss7_as_traffic_mode mode; + /* traffic mode was configured by VTY / config file */ bool mode_set_by_vty; + /* traffic mode was configured by RKM (routing key management) or ASPAC */ + bool mode_set_by_peer; uint32_t recovery_timeout_msec; uint8_t qos_class; struct { diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 890a6b5..5814532 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -415,10 +415,11 @@ { struct xua_asp_fsm_priv *xafp = fi->priv; struct osmo_ss7_asp *asp = xafp->asp; + struct osmo_ss7_as *as; struct xua_msg *xua_in; - uint32_t traf_mode; + uint32_t traf_mode = 0; + enum osmo_ss7_as_traffic_mode tmode; struct xua_msg_part *part; - uint32_t rctx; int i; check_stop_t_ack(fi, event); @@ -457,18 +458,42 @@ traf_mode != M3UA_TMOD_LOADSHARE && traf_mode != M3UA_TMOD_BCAST) { peer_send_error(fi, M3UA_ERR_UNSUPP_TRAF_MOD_TYP); - break; + return; } + tmode = osmo_ss7_tmode_from_xua(traf_mode); } if ((part = xua_msg_find_tag(xua_in, M3UA_IEI_ROUTE_CTX))) { for (i = 0; i < part->len / sizeof(uint32_t); i++) { - rctx = osmo_load32be(&part->dat[i * sizeof(uint32_t)]); - if (!osmo_ss7_as_find_by_rctx(asp->inst, rctx)) { + uint32_t rctx = osmo_load32be(&part->dat[i * sizeof(uint32_t)]); + as = osmo_ss7_as_find_by_rctx(asp->inst, rctx); + if (!as) { peer_send_error(fi, M3UA_ERR_INVAL_ROUT_CTX); - break; + return; } } } + + if (traf_mode) { /* if the peer has specified a traffic mode at all */ + llist_for_each_entry(as, &asp->inst->as_list, list) { + if (!osmo_ss7_as_has_asp(as, asp)) + continue; + + if (!as->cfg.mode_set_by_peer && !as->cfg.mode_set_by_vty) { + as->cfg.mode = tmode; + LOGPAS(as, DLSS7, LOGL_INFO, + "ASPAC: Traffic mode set dynamically by peer to %s\n", + osmo_ss7_as_traffic_mode_name(as->cfg.mode)); + } else if (as->cfg.mode != tmode) { + /*FIXME: ^ properly check if tmode is + compatible with already set + as->cfg.mode */ + peer_send_error(fi, M3UA_ERR_UNSUPP_TRAF_MOD_TYP); + return; + } + as->cfg.mode_set_by_peer = true; + } + } + /* send ACK */ peer_send(fi, XUA_ASP_E_ASPTM_ASPAC_ACK, xua_in); /* transition state and inform layer manager */ diff --git a/src/xua_rkm.c b/src/xua_rkm.c index b3c785f..a61ac31 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -152,6 +152,7 @@ unsigned int max_nas_idx, unsigned int *nas_idx) { uint32_t rk_id, rctx, _tmode, dpc; + enum osmo_ss7_as_traffic_mode tmode; struct osmo_ss7_as *as; struct osmo_ss7_route *rt; char namebuf[32]; @@ -217,8 +218,23 @@ msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INVAL_RKEY, 0); return -1; } - if (!as->cfg.mode_set_by_vty && _tmode) - as->cfg.mode = osmo_ss7_tmode_from_xua(_tmode); + if (_tmode) { /* if the peer has specified a traffic mode at all */ + tmode = osmo_ss7_tmode_from_xua(_tmode); + if (!as->cfg.mode_set_by_peer && !as->cfg.mode_set_by_vty) { + as->cfg.mode = tmode; + LOGPAS(as, DLSS7, LOGL_INFO, + "RKM: Traffic mode set dynamically by peer to %s\n", + osmo_ss7_as_traffic_mode_name(as->cfg.mode)); + } else if (as->cfg.mode != tmode) { + /*FIXME: ^ properly check if tmode is + compatible with already set as->cfg.mode */ + LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: Non-matching Traffic Mode %s\n", + osmo_ss7_as_traffic_mode_name(tmode)); + msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_UNSUPP_TRAF_MODE, 0); + return -1; + } + as->cfg.mode_set_by_peer = true; + } } else if (asp->inst->cfg.permit_dyn_rkm_alloc) { /* Create an AS for this routing key */ snprintf(namebuf, sizeof(namebuf), "as-rkm-%u", rctx); @@ -231,8 +247,10 @@ as->cfg.description = talloc_strdup(as, "Auto-generated by RKM"); as->rkm_dyn_allocated = true; - if (!as->cfg.mode_set_by_vty && _tmode) + if (!as->cfg.mode_set_by_vty && _tmode) { as->cfg.mode = osmo_ss7_tmode_from_xua(_tmode); + as->cfg.mode_set_by_peer = true; + } /* fill routing key */ as->cfg.routing_key.pc = dpc; as->cfg.routing_key.context = rctx; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I8ca17439b4dd023625f8f22689c0432341986099 Gerrit-Change-Number: 15978 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 17:59:58 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 17:59:58 +0000 Subject: Change in libosmo-sccp[master]: WIP References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15979 ) Change subject: WIP ...................................................................... WIP Change-Id: I5eb4c5fceeb902930c94f390dd5fc949f0d0bf04 --- M src/xua_as_fsm.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/79/15979/1 diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index cf75ef3..2c38843 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -95,14 +95,16 @@ first_idx = (as->cfg.last_asp_idx_sent + 1) % ARRAY_SIZE(as->cfg.asps); i = first_idx; + LOGPFSM(as->fi, "tx loadshare: first_idx=%u/%lu\n", first_idx, ARRAY_SIZE(as->cfg.asps)); do { + LOGPFSM(as->fi, "tx loadshare: checking asp %u: %p\n", i, as->cfg.asps[i]); asp = as->cfg.asps[i]; if (asp) break; i = (i + 1) % ARRAY_SIZE(as->cfg.asps); } while (i != first_idx); as->cfg.last_asp_idx_sent = i; - + LOGPFSM(as->fi, "tx loadshare: returning asp %u: %p\n", i, as->cfg.asps[i]); return asp; } @@ -111,6 +113,8 @@ { struct osmo_ss7_asp *asp = NULL; + LOGPFSM(as->fi, "Tx using traffic mode %s\n", osmo_ss7_as_traffic_mode_name(as->cfg.mode)); + switch (as->cfg.mode) { case OSMO_SS7_AS_TMOD_OVERRIDE: asp = xua_as_select_asp_override(as); @@ -132,7 +136,7 @@ msgb_free(msg); return -1; } - + LOGPASP(asp, DLSS7, LOGL_ERROR, "selected for transmission\n"); return osmo_ss7_asp_send(asp, msg); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15979 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I5eb4c5fceeb902930c94f390dd5fc949f0d0bf04 Gerrit-Change-Number: 15979 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 18:00:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 18:00:09 +0000 Subject: Change in libosmo-sccp[master]: WIP In-Reply-To: References: Message-ID: pespin has abandoned this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15979 ) Change subject: WIP ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15979 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I5eb4c5fceeb902930c94f390dd5fc949f0d0bf04 Gerrit-Change-Number: 15979 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 18:13:11 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 18:13:11 +0000 Subject: Change in libosmo-sccp[master]: xua: loadshare: select ASP for tx only if active References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15980 ) Change subject: xua: loadshare: select ASP for tx only if active ...................................................................... xua: loadshare: select ASP for tx only if active Change-Id: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/xua_as_fsm.c 3 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/80/15980/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 4f20d81..26b871b 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -431,6 +431,7 @@ int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg); int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp); int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level); +bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp); /*! Weak function to handle payload for unknown/unsupported PPID or IPA StreamID. * This function can be overridden by application code to implement whatever handling diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index efbceb8..532b332 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1350,6 +1350,13 @@ return 0; } +bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp) +{ + if (!asp->fi) + return false; + return asp->fi->state == XUA_ASP_S_ACTIVE; +} + /*********************************************************************** * libosmo-netif integration for SCTP stream server/client ***********************************************************************/ diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index cf75ef3..b7074aa 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -97,7 +97,7 @@ i = first_idx; do { asp = as->cfg.asps[i]; - if (asp) + if (asp && osmo_ss7_asp_active(asp)) break; i = (i + 1) % ARRAY_SIZE(as->cfg.asps); } while (i != first_idx); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15980 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3 Gerrit-Change-Number: 15980 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 18:32:44 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 18:32:44 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: AS missing asp reference in osmo-stp.cfg References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/15981 ) Change subject: ttcn3-stp: AS missing asp reference in osmo-stp.cfg ...................................................................... ttcn3-stp: AS missing asp reference in osmo-stp.cfg Change-Id: I3cac64217acf60720388f24713268a22e342e993 --- M ttcn3-stp-test/osmo-stp.cfg 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/81/15981/1 diff --git a/ttcn3-stp-test/osmo-stp.cfg b/ttcn3-stp-test/osmo-stp.cfg index 058ac2a..d50e7c2 100644 --- a/ttcn3-stp-test/osmo-stp.cfg +++ b/ttcn3-stp-test/osmo-stp.cfg @@ -61,6 +61,7 @@ routing-key 1023 23 as as-receiver m3ua asp asp-receiver0 + asp asp-receiver1 routing-key 1042 42 as mahlzeit ipa routing-key 0 5 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3cac64217acf60720388f24713268a22e342e993 Gerrit-Change-Number: 15981 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:25:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:25:56 +0000 Subject: Change in libosmo-sccp[master]: xua_asp_fsm: Don't send M3UA ERR and then send ASPAC_ACK In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15892 to look at the new patch set (#2). Change subject: xua_asp_fsm: Don't send M3UA ERR and then send ASPAC_ACK ...................................................................... xua_asp_fsm: Don't send M3UA ERR and then send ASPAC_ACK IF we cannot activate the ASP in response to an ASPAC, we should return just the error and not an error + ASPACK_ACK. Change-Id: I681021a13af9b91d8b2b849bd7149d6b1f783865 --- M src/xua_asp_fsm.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/92/15892/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I681021a13af9b91d8b2b849bd7149d6b1f783865 Gerrit-Change-Number: 15892 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:25:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:25:56 +0000 Subject: Change in libosmo-sccp[master]: M3UA: Reject ASP activation + RKM registration for incompatible traff... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 to look at the new patch set (#4). Change subject: M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode ...................................................................... M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode If the AS is e.g. configured as broadcast, then individual ASPs cannot be activated in loadshare or override. Everyone must agree. Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/xua_asp_fsm.c M src/xua_rkm.c 4 files changed, 56 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/85/15885/4 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c Gerrit-Change-Number: 15885 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:25:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:25:56 +0000 Subject: Change in libosmo-sccp[master]: Allow ASP role to be configured In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 to look at the new patch set (#3). Change subject: Allow ASP role to be configured ...................................................................... Allow ASP role to be configured So far, we had a static role model: * SCTP servers (listening, such as OsmoSTP) are role SGW * SCTP clients (connecting, such as OsmoMSC) are role ASP While this is customary, it is not actually required by the specification. The SGW can establish the SCTP connection to an ASP but still remain "SG" role. Let's make things more flexible by having the role configurable. Related: OS#2005 Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/sccp_user.c M tests/vty/ss7_asp_test.vty 5 files changed, 36 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/74/15974/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 Gerrit-Change-Number: 15974 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:25:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:25:56 +0000 Subject: Change in libosmo-sccp[master]: vty: Permit configuration of ASPs in SCTP client mode In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 to look at the new patch set (#3). Change subject: vty: Permit configuration of ASPs in SCTP client mode ...................................................................... vty: Permit configuration of ASPs in SCTP client mode The M3UA specification states that either of the two roles should be the SCTP client and the other the server. It also states that the default for the SGP is to operate as server. However, it permits other configurations. Let's allow this to be configured by the VTY. We need to ensure that while in ASP role, we don't send any NOTIFY messages to the peer SG. Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Closes: OS#2005 --- M src/osmo_ss7_vty.c M src/xua_as_fsm.c M tests/vty/ss7_asp_test.vty 3 files changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/15975/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Gerrit-Change-Number: 15975 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:26:18 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:26:18 +0000 Subject: Change in libosmo-sccp[master]: xua_asp_fsm: Don't send M3UA ERR and then send ASPAC_ACK In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15892 ) Change subject: xua_asp_fsm: Don't send M3UA ERR and then send ASPAC_ACK ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I681021a13af9b91d8b2b849bd7149d6b1f783865 Gerrit-Change-Number: 15892 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 19:26:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:26:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:26:30 +0000 Subject: Change in libosmo-sccp[master]: introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15973 ) Change subject: introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I28b0888b8f8206e9dd67ef64ce0f71ba9a7105ce Gerrit-Change-Number: 15973 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 19:26:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:27:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:27:07 +0000 Subject: Change in docker-playground[master]: make: Fix OSMO_BB_BRANCH not being passed correctly In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15968 ) Change subject: make: Fix OSMO_BB_BRANCH not being passed correctly ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ia289f8e71e8bb6c59b1caa7a23981a1f08a2f49e Gerrit-Change-Number: 15968 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:27:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:27:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:27:13 +0000 Subject: Change in docker-playground[master]: make: Fix OSMO_BB_BRANCH not being passed correctly In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15968 ) Change subject: make: Fix OSMO_BB_BRANCH not being passed correctly ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ia289f8e71e8bb6c59b1caa7a23981a1f08a2f49e Gerrit-Change-Number: 15968 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:27:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:27:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:27:25 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: Log osmo-stp output to file and gsmtap In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15972 ) Change subject: ttcn3-stp: Log osmo-stp output to file and gsmtap ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15972 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ib12bc92c86e4a2ba15e1eec56f2ac0905281b21d Gerrit-Change-Number: 15972 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:27:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:27:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:27:33 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: AS missing asp reference in osmo-stp.cfg In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15981 ) Change subject: ttcn3-stp: AS missing asp reference in osmo-stp.cfg ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3cac64217acf60720388f24713268a22e342e993 Gerrit-Change-Number: 15981 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:27:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:27:36 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:27:36 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: AS missing asp reference in osmo-stp.cfg In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15981 ) Change subject: ttcn3-stp: AS missing asp reference in osmo-stp.cfg ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3cac64217acf60720388f24713268a22e342e993 Gerrit-Change-Number: 15981 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:27:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:27:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:27:37 +0000 Subject: Change in docker-playground[master]: make: Fix OSMO_BB_BRANCH not being passed correctly In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15968 ) Change subject: make: Fix OSMO_BB_BRANCH not being passed correctly ...................................................................... make: Fix OSMO_BB_BRANCH not being passed correctly Change-Id: Ia289f8e71e8bb6c59b1caa7a23981a1f08a2f49e --- M make/Makefile 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/make/Makefile b/make/Makefile index 4b40da5..83f56ae 100644 --- a/make/Makefile +++ b/make/Makefile @@ -17,6 +17,7 @@ USERNAME?=$(USER) NAME?=$(shell basename $(CURDIR)) OSMO_TTCN3_BRANCH?=master +OSMO_BB_BRANCH?=master OSMO_BSC_BRANCH?=master OSMO_BTS_BRANCH?=master OSMO_GGSN_BRANCH?=master @@ -54,6 +55,7 @@ docker-build: .release docker build --build-arg USER=$(USERNAME) --build-arg OSMO_TTCN3_BRANCH=$(OSMO_TTCN3_BRANCH) \ + --build-arg OSMO_BB_BRANCH=$(OSMO_BB_BRANCH) \ --build-arg OSMO_BSC_BRANCH=$(OSMO_BSC_BRANCH) \ --build-arg OSMO_BTS_BRANCH=$(OSMO_BTS_BRANCH) \ --build-arg OSMO_GGSN_BRANCH=$(OSMO_GGSN_BRANCH) \ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15968 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ia289f8e71e8bb6c59b1caa7a23981a1f08a2f49e Gerrit-Change-Number: 15968 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:27:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:27:37 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: Log osmo-stp output to file and gsmtap In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15972 ) Change subject: ttcn3-stp: Log osmo-stp output to file and gsmtap ...................................................................... ttcn3-stp: Log osmo-stp output to file and gsmtap Similar to what we do with other suites. Change-Id: Ib12bc92c86e4a2ba15e1eec56f2ac0905281b21d --- M ttcn3-stp-test/osmo-stp.cfg 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ttcn3-stp-test/osmo-stp.cfg b/ttcn3-stp-test/osmo-stp.cfg index e16cd8b..058ac2a 100644 --- a/ttcn3-stp-test/osmo-stp.cfg +++ b/ttcn3-stp-test/osmo-stp.cfg @@ -2,6 +2,16 @@ ! OsmoSTP (1.1.0.2-3884) configuration saved from vty !! ! +log gsmtap 172.18.19.203 + logging level set-all debug + logging filter all 1 +log file /data/osmo-stp.log + logging filter all 1 + logging color 0 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging level set-all debug log stderr logging filter all 1 logging color 1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15972 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ib12bc92c86e4a2ba15e1eec56f2ac0905281b21d Gerrit-Change-Number: 15972 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:27:38 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:27:38 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: AS missing asp reference in osmo-stp.cfg In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15981 ) Change subject: ttcn3-stp: AS missing asp reference in osmo-stp.cfg ...................................................................... ttcn3-stp: AS missing asp reference in osmo-stp.cfg Change-Id: I3cac64217acf60720388f24713268a22e342e993 --- M ttcn3-stp-test/osmo-stp.cfg 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ttcn3-stp-test/osmo-stp.cfg b/ttcn3-stp-test/osmo-stp.cfg index 058ac2a..d50e7c2 100644 --- a/ttcn3-stp-test/osmo-stp.cfg +++ b/ttcn3-stp-test/osmo-stp.cfg @@ -61,6 +61,7 @@ routing-key 1023 23 as as-receiver m3ua asp asp-receiver0 + asp asp-receiver1 routing-key 1042 42 as mahlzeit ipa routing-key 0 5 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3cac64217acf60720388f24713268a22e342e993 Gerrit-Change-Number: 15981 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:28:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:28:25 +0000 Subject: Change in libosmo-sccp[master]: xua: Allow traffic mode set by peer if not set by VTY In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 ) Change subject: xua: Allow traffic mode set by peer if not set by VTY ...................................................................... Patch Set 1: isn't that the same what one of my patches is doing? -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I8ca17439b4dd023625f8f22689c0432341986099 Gerrit-Change-Number: 15978 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:28:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:29:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:29:14 +0000 Subject: Change in libosmo-sccp[master]: xua: loadshare: select ASP for tx only if active In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15980 ) Change subject: xua: loadshare: select ASP for tx only if active ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15980 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3 Gerrit-Change-Number: 15980 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:29:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:30:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:30:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc-test: improve error log on Assignment RTP port mismatch In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15935 ) Change subject: msc-test: improve error log on Assignment RTP port mismatch ...................................................................... msc-test: improve error log on Assignment RTP port mismatch Before this, if an Assignment Request contains an unexpected Transport Layer Address, the test completely rejects the Assignment Request. Instead, accept any tla in the Assignment, and compare the expected tla in the Assignment's interleave action. Thus we directly get logging hinting at the tla instead of a T_guard timeout. Change-Id: I04847c10d6c3bf9e04cfda6e343dfd4a65be71a5 --- M msc/BSC_ConnectionHandler.ttcn 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index fb2d888..5b0a125 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1044,12 +1044,19 @@ } //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { - [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { + [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit)) -> value bssap { log("f_mo_call_establish 4: rx Assignment Request"); var BSSMAP_IE_AoIP_TransportLayerAddress tla; var BSSMAP_IE_SpeechCodec codec; var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; + if (tla_ass != bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer) { + log("Expected:", tla_ass); + log("Got:", bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer); + setverdict(fail, "MSC sent Assignment Request with unexpected AoIP Transport Layer IE"); + mtc.stop; + } + tla := valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), cpars.bss_rtp_port)); codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})); if (cpars.use_osmux) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15935 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I04847c10d6c3bf9e04cfda6e343dfd4a65be71a5 Gerrit-Change-Number: 15935 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:30:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:30:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: improve/fix f_tc_mo_setup_dtmf_dup In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15936 ) Change subject: improve/fix f_tc_mo_setup_dtmf_dup ...................................................................... improve/fix f_tc_mo_setup_dtmf_dup - Fix error log for a missing final DTMF. - Instead of code dup to establish a call, use f_mo_call_establish(). This will make the test benefit from changes to f_mo_call_establish() (which will soon come up to accomodate changes in osmo-msc's codec negotiation). - Instead of hardcoding the expected N_SD counter values to detect DTAP duplicates, use f_bssmap_last_n_sd() and f_next_n_sd(), so that the N_SD counter is correct regardless of how many DTAP were sent in f_mo_call_establish(). - Instead of hardcoding a correct N_SD in the end, use skip_seq_patching == false, so that the ttcn DTAP correctly tracks N_SD for subsequent call release messages. - Release the call. Change-Id: Ibfa8b906764f2d5ed75fe74125be42af4546e864 --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 2 files changed, 26 insertions(+), 16 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 5b0a125..0ddc911 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1273,50 +1273,58 @@ var MgcpCommand mgcp_cmd; var template PDU_ML3_MS_NW dtmf_dtap; - f_establish_fully(); + f_mo_call_establish(cpars); - /* Create MNCC and MGCP expect */ - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); + /* Send DTMF: send the exact same DTAP message twice, the dup should be filtered out by + * 3GPP TS 24.007 11.2.3.2 Message Type Octet / Duplicate Detection. */ - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); - MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc; - cpars.mncc_callref := mncc.u.signal.callref; + /* Find out the next NSD that will be used, from RAN emulation. */ + var N_Sd_Array last_n_sd := f_bssmap_last_n_sd(); + var uint2_t next_n_sd := f_next_n_sd(last_n_sd, 0 /* cc is index 0 */); - /* Send DTMF */ + /* Compose DTAP with this correct NSD */ dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "2"); - dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(2, 2); - BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true)); + + /* Here, pass skip_seq_patching == false so that the RAN Emulation NSD increments after this message. */ + BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, false)); T.start; alt { - [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {} + [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) { + log("f_mo_seq_dtmf_dup() 1: got first START_DTMF_ind"); + } [] T.timeout { setverdict(fail, "Timeout waiting for START_DTMF_ind"); mtc.stop; } } + /* Send the exact same DTAP with above NSD, which is now incorrect (has not incremented), so that this message + * will get filtered by the duplicate detection. Write NSD into DTAP and pass skip_seq_patching == true. */ + dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(next_n_sd, 2); BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true)); T.start; alt { [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) { - setverdict(fail, "Received duplicate START_DTMF_ind"); + setverdict(fail, "f_mo_seq_dtmf_dup() 2: Received duplicate START_DTMF_ind"); mtc.stop; } [] T.timeout { } } + /* Here the NSD should be correct again and we see a DTMF. */ dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "3"); - dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(3, 2); - BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true)); + BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, false)); alt { - [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) { } + [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) { + log("f_mo_seq_dtmf_dup() 3: got second START_DTMF_ind"); + } [] T.timeout { - setverdict(fail, "Received duplicate START_DTMF_ind"); + setverdict(fail, "Timeout waiting for final START_DTMF_ind"); mtc.stop; } } + f_call_hangup(cpars, true); setverdict(pass); } diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index fbb471e..c290d7c 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1776,6 +1776,8 @@ cpars.bss_rtp_port := 1110; cpars.mgcp_connection_id_bss := '22222'H; cpars.mgcp_connection_id_mss := '33333'H; + cpars.mgcp_ep := "rtpbridge/1 at mgw"; + cpars.mo_call := true; f_perform_lu(); f_mo_seq_dtmf_dup(cpars); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15936 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ibfa8b906764f2d5ed75fe74125be42af4546e864 Gerrit-Change-Number: 15936 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:30:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:30:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: cosmetic: remove brace from comment In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15937 ) Change subject: cosmetic: remove brace from comment ...................................................................... cosmetic: remove brace from comment This '{' in the comment gets my auto indenting / syntax brace matching all confused. Change-Id: I303abe800037abd0c9694ae750a7acaa79c9754f --- M msc/BSC_ConnectionHandler.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, approved diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 0ddc911..7a94d85 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1043,7 +1043,7 @@ MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref)); } - //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { + //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit)) -> value bssap { log("f_mo_call_establish 4: rx Assignment Request"); var BSSMAP_IE_AoIP_TransportLayerAddress tla; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15937 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I303abe800037abd0c9694ae750a7acaa79c9754f Gerrit-Change-Number: 15937 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:30:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:30:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: split off f_mgcp_find_param_entry() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15963 ) Change subject: msc: split off f_mgcp_find_param_entry() ...................................................................... msc: split off f_mgcp_find_param_entry() Split f_mgcp_find_param_entry() out of f_mgcp_find_param() to be able to act on an MgcpParameterList without an enclosing MgcpMessage. Will be used by upcoming I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Change-Id: I90f213d2a1be979afa024e0faa25d532f9858636 --- M library/MGCP_Templates.ttcn 1 file changed, 12 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index dae379e..e03fd8e 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -453,6 +453,17 @@ sdp := * } + function f_mgcp_find_param_entry(MgcpParameterList pars, MgcpInfoCode code, out charstring ret) + return boolean { + for (var integer i := 0; i < sizeof(pars); i := i+1) { + if (pars[i].code == code) { + ret := pars[i].val; + return true; + } + } + return false; + } + function f_mgcp_find_param(MgcpMessage msg, MgcpInfoCode code, out charstring ret) return boolean { var MgcpParameterList pars; @@ -461,13 +472,7 @@ } else { pars := msg.response.params; } - for (var integer i := 0; i < sizeof(pars); i := i+1) { - if (pars[i].code == code) { - ret := pars[i].val; - return true; - } - } - return false; + return f_mgcp_find_param_entry(pars, code, ret); } /* template to determine if a MGCP endpoint is a wildcard endpoint */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15963 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I90f213d2a1be979afa024e0faa25d532f9858636 Gerrit-Change-Number: 15963 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:31:18 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 19:31:18 +0000 Subject: Change in libosmo-sccp[master]: xua: Allow traffic mode set by peer if not set by VTY In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 ) Change subject: xua: Allow traffic mode set by peer if not set by VTY ...................................................................... Patch Set 1: Some parts yes, but fixing some bugs and doing some things a bit differently (for instance setting traffic mode of all AS if no route ctx is present in ASAPC or REG REQ). Unless you recently pushed a new version or you see something wrong in this one, I'd recommend rebasing yours simply by using the new API to verify traffic modes from your path instead of the simple != comparison I do here. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I8ca17439b4dd023625f8f22689c0432341986099 Gerrit-Change-Number: 15978 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:31:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:31:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:31:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Allow setting expected ms max power level with module param In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15930 ) Change subject: bsc: Allow setting expected ms max power level with module param ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15930 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib00c96902377582bc32778c5b947a6b4274041aa Gerrit-Change-Number: 15930 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Tue, 05 Nov 2019 19:31:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:31:50 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:31:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Allow setting expected ms max power level with module param In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15930 ) Change subject: bsc: Allow setting expected ms max power level with module param ...................................................................... bsc: Allow setting expected ms max power level with module param It will allow changing ms max power in osmo-bsc.cfg as well as TTCN3 expactancies in BSC_Tests.cfg easily in docker-playground.git without needing to recompile or change code in TTCN3. Change-Id: Ib00c96902377582bc32778c5b947a6b4274041aa --- M bsc/BSC_Tests.ttcn 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved neels: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index e25bf7f..e7a4c13 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -130,6 +130,8 @@ unconditionally once new version of osmo-bsc is released (current version: 1.4.1) */ boolean mp_enable_osmux_test := true; + /* Value set in osmo-bsc.cfg "ms max power" */ + uint8_t mp_exp_ms_power_level := 7; } private function f_gen_test_hdlr_pars() return TestHdlrParams { @@ -140,6 +142,7 @@ } else { pars.aoip := false; } + pars.exp_ms_power_level := mp_exp_ms_power_level; return pars; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15930 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib00c96902377582bc32778c5b947a6b4274041aa Gerrit-Change-Number: 15930 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:32:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:32:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Log wrong and expected values if MS Power level verification fails In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15965 ) Change subject: bsc: Log wrong and expected values if MS Power level verification fails ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15965 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idacfdb8d9061d78ce6fa521d4008974c2d3d74df Gerrit-Change-Number: 15965 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:32:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:32:28 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:32:28 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Verify presence of MS Power Parameters IE on one test In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15966 ) Change subject: bsc: Verify presence of MS Power Parameters IE on one test ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15966 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I725836784a7900d2ea51eae188c2c279e8639dbf Gerrit-Change-Number: 15966 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:32:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:32:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:32:32 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Log wrong and expected values if MS Power level verification fails In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15965 ) Change subject: bsc: Log wrong and expected values if MS Power level verification fails ...................................................................... bsc: Log wrong and expected values if MS Power level verification fails Change-Id: Idacfdb8d9061d78ce6fa521d4008974c2d3d74df --- M bsc/MSC_ConnectionHandler.ttcn 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 8091d8d..09190e3 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -760,7 +760,7 @@ } } /* FIXME: validate RSL_IE_ACT_TYPE, RSL_IE_CHAN_MODE, RSL_IE_CHAN_IDENT, RSL_IE_BS_POWER, - * RSL_IE_MS_POWER, RSL_IE_TIMING_ADVANCE */ + * RSL_IE_TIMING_ADVANCE */ if (not f_rsl_find_ie(chan_act, RSL_IE_MS_POWER_PARAM, ms_power_param)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "IE MS Power Parameters not found in CHAN ACT"); @@ -770,7 +770,7 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "IE MS Power not found in CHAN ACT"); } else { if (not match(ms_power.ms_power, tr_RSL_IE_MS_Power(g_pars.exp_ms_power_level, false))) { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Wrong MS Power IE in CHAN ACT"); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Wrong MS Power IE in CHAN ACT, ", ms_power.ms_power.power_level, " vs exp ", g_pars.exp_ms_power_level)); } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15965 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idacfdb8d9061d78ce6fa521d4008974c2d3d74df Gerrit-Change-Number: 15965 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:32:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:32:35 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bsc: Verify presence of MS Power Parameters IE on one test In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15966 ) Change subject: bsc: Verify presence of MS Power Parameters IE on one test ...................................................................... bsc: Verify presence of MS Power Parameters IE on one test Otherwise most tests in bsc-latest fail because in latest release BSC never sends that IE. Related: OS#4244 Change-Id: I725836784a7900d2ea51eae188c2c279e8639dbf --- M bsc/BSC_Tests.ttcn M bsc/MSC_ConnectionHandler.ttcn M bsc/expected-results.xml 3 files changed, 19 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index e7a4c13..9c8d68d 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -4372,6 +4372,19 @@ } } +/* Verify the BSC sends the MS Power Parameters IE during CHAN ACT to make sure + the BTS does autonomous MS power control loop */ +testcase TC_assignment_verify_ms_power_params_ie() runs on test_CT { + var MSC_ConnHdlr vc_conn; + var TestHdlrParams pars := f_gen_test_hdlr_pars(); + //pars.encr := valueof(t_EncrParams('01'O, f_rnd_octstring(8))); + pars.exp_ms_power_params := true; + + f_init(1, true); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_tc_assignment_fr_a5), pars); + vc_conn.done; +} /* Dyn PDCH todo: * activate OSMO as TCH/F @@ -4541,6 +4554,8 @@ execute( TC_chopped_ipa_ping() ); execute( TC_chopped_ipa_payload() ); + /* Power control related */ + execute( TC_assignment_verify_ms_power_params_ie() ); /* at bottom as they might crash OsmoBSC before OS#3182 is fixed */ execute( TC_early_conn_fail() ); execute( TC_late_conn_fail() ); diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 09190e3..0141522 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -527,6 +527,7 @@ TestHdlrParamsLcls lcls, TestHdlrParamsHandover handover optional, uint5_t exp_ms_power_level, + boolean exp_ms_power_params, boolean aoip, boolean use_osmux }; @@ -553,6 +554,7 @@ }, handover := omit, exp_ms_power_level := 7, /* calculated from osmo-bsc.cfg "ms max power" */ + exp_ms_power_params := false, aoip := true, use_osmux := false } @@ -762,7 +764,7 @@ /* FIXME: validate RSL_IE_ACT_TYPE, RSL_IE_CHAN_MODE, RSL_IE_CHAN_IDENT, RSL_IE_BS_POWER, * RSL_IE_TIMING_ADVANCE */ - if (not f_rsl_find_ie(chan_act, RSL_IE_MS_POWER_PARAM, ms_power_param)) { + if (g_pars.exp_ms_power_params and not f_rsl_find_ie(chan_act, RSL_IE_MS_POWER_PARAM, ms_power_param)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "IE MS Power Parameters not found in CHAN ACT"); } diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml index 3ea202c..eb932ef 100644 --- a/bsc/expected-results.xml +++ b/bsc/expected-results.xml @@ -102,6 +102,7 @@ + -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15966 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I725836784a7900d2ea51eae188c2c279e8639dbf Gerrit-Change-Number: 15966 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:32:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:32:53 +0000 Subject: Change in libosmo-sccp[master]: xua_asp_fsm: Don't send M3UA ERR and then send ASPAC_ACK In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15892 ) Change subject: xua_asp_fsm: Don't send M3UA ERR and then send ASPAC_ACK ...................................................................... xua_asp_fsm: Don't send M3UA ERR and then send ASPAC_ACK IF we cannot activate the ASP in response to an ASPAC, we should return just the error and not an error + ASPACK_ACK. Change-Id: I681021a13af9b91d8b2b849bd7149d6b1f783865 --- M src/xua_asp_fsm.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 890a6b5..a6ee2ec 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -457,7 +457,7 @@ traf_mode != M3UA_TMOD_LOADSHARE && traf_mode != M3UA_TMOD_BCAST) { peer_send_error(fi, M3UA_ERR_UNSUPP_TRAF_MOD_TYP); - break; + return; } } if ((part = xua_msg_find_tag(xua_in, M3UA_IEI_ROUTE_CTX))) { @@ -465,7 +465,7 @@ rctx = osmo_load32be(&part->dat[i * sizeof(uint32_t)]); if (!osmo_ss7_as_find_by_rctx(asp->inst, rctx)) { peer_send_error(fi, M3UA_ERR_INVAL_ROUT_CTX); - break; + return; } } } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15892 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I681021a13af9b91d8b2b849bd7149d6b1f783865 Gerrit-Change-Number: 15892 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:34:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:34:01 +0000 Subject: Change in libosmocore[master]: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add un... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15924 ) Change subject: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add unit tests ...................................................................... Patch Set 2: Code-Review-1 old comment not addressed -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 Gerrit-Change-Number: 15924 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Tue, 05 Nov 2019 19:34:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:34:41 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 19:34:41 +0000 Subject: Change in libosmo-sccp[master]: M3UA: Reject ASP activation + RKM registration for incompatible traff... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 ) Change subject: M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode ...................................................................... Patch Set 4: I had to reuse content from this one but fixing/improving some parts here: https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 ping my in IRC if you want to discuss how to proceed. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c Gerrit-Change-Number: 15885 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 19:34:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:36:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 19:36:09 +0000 Subject: Change in libosmocore[master]: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add un... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15924 ) Change subject: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add unit tests ...................................................................... Patch Set 2: > Patch Set 2: Code-Review-1 > > old comment not addressed Which one? It turns out there was already a function present implementing what I needed, so I'm not adding an API here anymore. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 Gerrit-Change-Number: 15924 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 19:36:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:36:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:36:49 +0000 Subject: Change in osmo-bts[master]: bts-trx: Implement MS Power control loop calculations using dBm inste... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15971 ) Change subject: bts-trx: Implement MS Power control loop calculations using dBm instead of ctl levels ...................................................................... Patch Set 1: (4 comments) https://gerrit.osmocom.org/c/osmo-bts/+/15971/1/src/osmo-bts-trx/loops.h File src/osmo-bts-trx/loops.h: https://gerrit.osmocom.org/c/osmo-bts/+/15971/1/src/osmo-bts-trx/loops.h at 11 PS1, Line 11: #define MS_RAISE_MAX_DBM 4 : #define MS_LOWER_MAX_DBM 8 A relative change to a dBm value is always in dB. So you are e.g. adding 2dB to a 10dBm value, and you get 12dBm. So the constants here should end in _DB https://gerrit.osmocom.org/c/osmo-bts/+/15971/1/src/osmo-bts-trx/loops.c File src/osmo-bts-trx/loops.c: https://gerrit.osmocom.org/c/osmo-bts/+/15971/1/src/osmo-bts-trx/loops.c at 58 PS1, Line 58: retrieve nitpick: compute? calculate? https://gerrit.osmocom.org/c/osmo-bts/+/15971/1/src/osmo-bts-trx/loops.c at 58 PS1, Line 58: %d I'm sure we have a value_string for band names? https://gerrit.osmocom.org/c/osmo-bts/+/15971/1/src/osmo-bts-trx/loops.c at 65 PS1, Line 65: %d I'm sure we have a value_string for band names? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0160637c5ffa606ee3081ad30be8e6f2a42b725b Gerrit-Change-Number: 15971 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:36:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:38:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 19:38:03 +0000 Subject: Change in osmo-bts[master]: rsl: Assign recv pwr to lchan's max ms power In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15970 ) Change subject: rsl: Assign recv pwr to lchan's max ms power ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 Gerrit-Change-Number: 15970 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 05 Nov 2019 19:38:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:55:22 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 19:55:22 +0000 Subject: Change in libosmo-sccp[master]: Allow ASP role to be configured In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 ) Change subject: Allow ASP role to be configured ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15974/3/src/osmo_ss7_vty.c File src/osmo_ss7_vty.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15974/3/src/osmo_ss7_vty.c at 734 PS3, Line 734: if (asp->cfg.role_set_by_vty) { If this flag is only used this way, I don't see the point in having it. If default is OSMO_SS7_ASP_ROLE_SG, then do if(asp->cfg.role != OSMO_SS7_ASP_ROLE_SG) Or even let it be writen to config always. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 Gerrit-Change-Number: 15974 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 19:55:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 19:59:17 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 19:59:17 +0000 Subject: Change in libosmo-sccp[master]: vty: Permit configuration of ASPs in SCTP client mode In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 ) Change subject: vty: Permit configuration of ASPs in SCTP client mode ...................................................................... Patch Set 3: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15975/3/src/xua_as_fsm.c File src/xua_as_fsm.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15975/3/src/xua_as_fsm.c at 38 PS3, Line 38: static int asp_notify_all_as(struct osmo_ss7_as *as, struct osmo_xlm_prim_notify *npar) This function is named wrong. Should be as_notify_all_asp() ... -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Gerrit-Change-Number: 15975 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 19:59:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:02:41 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 20:02:41 +0000 Subject: Change in libosmo-sccp[master]: ASP FSM: Permit DOWN -> DOWN "transition" In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15976 ) Change subject: ASP FSM: Permit DOWN -> DOWN "transition" ...................................................................... Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15976/3/src/xua_asp_fsm.c File src/xua_asp_fsm.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15976/3/src/xua_asp_fsm.c at 642 PS3, Line 642: S(XUA_ASP_S_DOWN), Since probably xua_asp_fsm_down_onenter() is called, it may make sense to do something like this in there: if (prev_state != XUA_ASP_S_DOWN) dispatch_to_all_as(fi, XUA_ASPAS_ASP_DOWN_IND); Because I don't see the point in annoying upper layers if there's no real change. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15976 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Iabbcf92e3022a4c3f165ce19be929915f92b455c Gerrit-Change-Number: 15976 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:02:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:02:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:02:44 +0000 Subject: Change in osmo-ttcn3-hacks[master]: STP_Tests_M3UA.TC_tmt_{loadshare, override}: Fix double-ASPUP References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15982 ) Change subject: STP_Tests_M3UA.TC_tmt_{loadshare,override}: Fix double-ASPUP ...................................................................... STP_Tests_M3UA.TC_tmt_{loadshare,override}: Fix double-ASPUP Change-Id: I3acf1ce18d1a232c9ce457a19a6d36be380c42dd --- M stp/STP_Tests_M3UA.ttcn 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/82/15982/1 diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn index 29e85f9..1ad2279 100644 --- a/stp/STP_Tests_M3UA.ttcn +++ b/stp/STP_Tests_M3UA.ttcn @@ -259,7 +259,6 @@ f_M3UA_asp_up_act(0, omit, rctx_sender); /* activate the first 'receiver' side ASP */ - f_M3UA_asp_up(1); f_M3UA_asp_up_act(1, c_M3UA_TMT_loadshare, omit); // TODO: rctx /* verify traffic is routed from sender to [sole] receiver */ @@ -311,7 +310,6 @@ f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx /* activate the first 'receiver' side ASP */ - f_M3UA_asp_up(1); f_M3UA_asp_up_act(1, c_M3UA_TMT_broadcast, omit); // TODO: rctx /* verify traffic is routed from sender to [sole] receiver */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3acf1ce18d1a232c9ce457a19a6d36be380c42dd Gerrit-Change-Number: 15982 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:02:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:02:44 +0000 Subject: Change in osmo-ttcn3-hacks[master]: STP_Tests_M3UA.TC_tmt_loadshare: Clarify log message in failure case References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15983 ) Change subject: STP_Tests_M3UA.TC_tmt_loadshare: Clarify log message in failure case ...................................................................... STP_Tests_M3UA.TC_tmt_loadshare: Clarify log message in failure case Change-Id: I28a86f0ea0f8df28d8d22732a8647a07a936c100 --- M stp/STP_Tests_M3UA.ttcn 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/83/15983/1 diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn index 1ad2279..3415e52 100644 --- a/stp/STP_Tests_M3UA.ttcn +++ b/stp/STP_Tests_M3UA.ttcn @@ -287,8 +287,8 @@ /* FIXME: check for extraneous messages? */ for (i := 1; i <= 2; i := i+1) { if (num_rx[i] != iter_per_asp) { - setverdict(fail, "Received only ", num_rx[i], " out of expected ", iter_per_asp, - "M3UA DATA messages"); + setverdict(fail, "Received ", num_rx[i], " out of expected ", iter_per_asp, + "M3UA DATA messages at M3UA port ", i); } } setverdict(pass); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I28a86f0ea0f8df28d8d22732a8647a07a936c100 Gerrit-Change-Number: 15983 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:02:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:02:44 +0000 Subject: Change in osmo-ttcn3-hacks[master]: M3UA_Templates: Fix tr_M3UA_ASPUP() length value copy+paste error References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15984 ) Change subject: M3UA_Templates: Fix tr_M3UA_ASPUP() length value copy+paste error ...................................................................... M3UA_Templates: Fix tr_M3UA_ASPUP() length value copy+paste error Change-Id: I7ef53b93fcdfe1ce7914bd4edb1fed8a8351b1b4 --- M library/M3UA_Templates.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/84/15984/1 diff --git a/library/M3UA_Templates.ttcn b/library/M3UA_Templates.ttcn index 02b493c..1063b50 100644 --- a/library/M3UA_Templates.ttcn +++ b/library/M3UA_Templates.ttcn @@ -81,7 +81,7 @@ version := c_M3UA_VERSION, reserved := '00'O, messageClassAndType := '0301'O, - messageLength := 0, // overwritten + messageLength := ?, // overwritten messageParameters := { aSP_Identifier := tr_M3UA_asp_id(aspid), info_String := * -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15984 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7ef53b93fcdfe1ce7914bd4edb1fed8a8351b1b4 Gerrit-Change-Number: 15984 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:02:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:02:45 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Add tests for running STP in M3UA ASP role References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15985 ) Change subject: stp: Add tests for running STP in M3UA ASP role ...................................................................... stp: Add tests for running STP in M3UA ASP role Change-Id: Ifec443858256ad79fbe29e26c609322809dd07b1 Related: OS#2005 --- M stp/STP_Tests_M3UA.ttcn M stp/osmo-stp.cfg 2 files changed, 149 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/85/15985/1 diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn index 3415e52..5c15c6f 100644 --- a/stp/STP_Tests_M3UA.ttcn +++ b/stp/STP_Tests_M3UA.ttcn @@ -36,14 +36,20 @@ modulepar { integer mp_stp_m3ua_port := 2905; + integer mp_stp_m3ua_clnt_port := 2906; integer mp_local_m3ua_port := 9999; } -private const integer NR_M3UA := 3; +private const integer NR_M3UA := 3; /* number of M3UA clients in ATS */ +private const integer NR_M3UA_SRV := 1; /* number of M3UA servres in ATS */ + +private function M3UA_SRV(integer idx) return integer { + return NR_M3UA+idx; +} type component RAW_M3UA_CT extends Test_CT { - port M3UA_CODEC_PT M3UA[NR_M3UA]; - var integer g_m3ua_conn_id[NR_M3UA]; + port M3UA_CODEC_PT M3UA[NR_M3UA+NR_M3UA_SRV]; + var integer g_m3ua_conn_id[NR_M3UA+NR_M3UA_SRV]; } private template PortEvent tr_SctpAssocChange := { @@ -56,6 +62,10 @@ sctpPeerAddrChange := ? } } +private template PortEvent tr_SctpConnOpened := { + connOpened := ? +} + private altstep as_m3ua_sctp() runs on RAW_M3UA_CT { [] any from M3UA.receive(tr_SctpAssocChange) { repeat; } @@ -93,6 +103,16 @@ g_m3ua_conn_id[i] := res.connId; } +friend function f_M3UA_listen(integer i) runs on RAW_M3UA_CT { + var Result res; + res := M3UA_CodecPort_CtrlFunct.f_IPL4_listen(M3UA[i], mp_local_ip, mp_local_m3ua_port+i, + {sctp:=valueof(ts_SCTP)}); + if (not ispresent(res.connId)) { + setverdict(fail, "Could not bind M3UA socket, check your configuration"); + mtc.stop; + } +} + friend function f_init_m3ua() runs on RAW_M3UA_CT { var integer i; @@ -106,6 +126,26 @@ } } +friend function f_init_m3ua_srv() runs on RAW_M3UA_CT { + var integer i; + var PortEvent sctp_evt; + + for (i := NR_M3UA; i < NR_M3UA+NR_M3UA_SRV; i:=i+1) { + map(self:M3UA[i], system:M3UA_CODEC_PT); + /* bind+ listen */ + f_M3UA_listen(i); + /* wait for accept() */ + M3UA[i].receive(tr_SctpConnOpened) -> value sctp_evt { + g_m3ua_conn_id[i] := sctp_evt.connOpened.connId; + } + } +} + + +/*********************************************************************** + * Test the STP in M3UA SG role (we are ASP) + ***********************************************************************/ + /* perform an outbound ASP-UP procedure */ friend function f_M3UA_asp_up(integer idx, template (omit) OCT4 aspid := omit) runs on RAW_M3UA_CT { f_M3UA_send(idx, ts_M3UA_ASPUP(aspid)); @@ -417,6 +457,97 @@ /* FIXME: we now may have changed the state on the STP side! */ } +/*********************************************************************** + * Test the STP in M3UA ASP role (we are SG) + ***********************************************************************/ + +/* expect/perform an inbound ASP-UP procedure */ +friend function f_M3UA_CLNT_asp_up(integer idx, template OCT4 aspid := omit) runs on RAW_M3UA_CT { + f_M3UA_exp(idx, tr_M3UA_ASPUP(aspid)); + f_M3UA_send(idx, ts_M3UA_ASPUP_ACK); +} + +/* expect/perform an inbound ASP-ACTIVATE procedure */ +friend function f_M3UA_CLNT_asp_act(integer idx, template M3UA_Traffic_Mode_Type tmt := omit, + template (omit) OCT4 rctx := omit) runs on RAW_M3UA_CT { + f_M3UA_exp(idx, tr_M3UA_ASPAC(tmt, rctx)); + f_M3UA_send(idx, ts_M3UA_ASPAC_ACK(tmt, rctx)); +} + +/* expect/perform inbound ASP-UP and ASP-ACT, optionally send interemittent NOTIFY */ +friend function f_M3UA_CLNT_asp_up_act(integer idx, template M3UA_Traffic_Mode_Type tmt := omit, + template OCT4 rctx := omit, + template (omit) OCT2 ntfy_after_up := c_M3UA_ST_I_AS_INACTIVE, + template (omit) OCT2 ntfy_after_act := c_M3UA_ST_I_AS_ACTIVE) +runs on RAW_M3UA_CT { + f_M3UA_CLNT_asp_up(idx, omit); + if (not istemplatekind(ntfy_after_up, "omit")) { + f_M3UA_send(idx, ts_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, ntfy_after_up, rctx)); + } + f_M3UA_CLNT_asp_act(idx, tmt, rctx); + if (not istemplatekind(ntfy_after_act, "omit")) { + f_M3UA_send(idx, ts_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, ntfy_after_act, rctx)); + } +} + + +/* Expect inbound connection from ASP/SCTP-client, followed by ASP-UP */ +testcase TC_clnt_connect_asp_up() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_init_m3ua_srv(); + + f_M3UA_CLNT_asp_up(M3UA_SRV(0)); +} + +/* Expect inbound connection from ASP/SCTP-client, followed by ASP-UP + ASP-ACT */ +testcase TC_clnt_asp_act() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_init_m3ua_srv(); + + f_M3UA_CLNT_asp_up_act(M3UA_SRV(0)); +} + +/* Test traffic being routed through "server" side STP (M3UA SG), coming back in "client" + * side STP (M3UA ASP) */ +testcase TC_clnt_sg_to_asp() runs on RAW_M3UA_CT { + var OCT4 rctx_sender := int2oct(1023, 4); + var OCT4 pc_sender := int2oct(23, 4); + var OCT4 rctx_receiver := int2oct(1055, 4); + var OCT4 pc_receiver := int2oct(55, 4); + + f_init_m3ua(); + f_M3UA_asp_up_act(0); + + f_init_m3ua_srv(); + f_M3UA_CLNT_asp_up_act(M3UA_SRV(0)); + + f_sleep(1.0); + + /* verify traffic is routed from sender to [sole] receiver */ + f_test_traffic(0, rctx_sender, pc_sender, M3UA_SRV(0), rctx_receiver, pc_receiver); +} + +/* Test traffic being routed through "client" side STP (M3UA ASP), coming back in "server" + * side STP (M3UA SG) */ +testcase TC_clnt_asp_to_sg() runs on RAW_M3UA_CT { + var OCT4 rctx_sender := int2oct(1055, 4); + var OCT4 pc_sender := int2oct(55, 4); + var OCT4 rctx_receiver := int2oct(1023, 4); + var OCT4 pc_receiver := int2oct(23, 4); + + f_init_m3ua(); + f_M3UA_asp_up_act(0); + + f_init_m3ua_srv(); + f_M3UA_CLNT_asp_up_act(M3UA_SRV(0)); + + f_sleep(1.0); + + /* verify traffic is routed from sender to [sole] receiver */ + f_test_traffic(M3UA_SRV(0), rctx_sender, pc_sender, 0, rctx_receiver, pc_receiver); +} + + control { /* M3UA Tests */ @@ -442,6 +573,12 @@ /* TODO: test RKM with unsupported routing keys: NA, SI, OPC */ /* TODO: register/unregister multiple routing contexts in one message; including mixed success/failure situations */ + + /* Test STP as SCTP client + M3UA ASP role */ + execute( TC_clnt_connect_asp_up() ); + execute( TC_clnt_asp_act() ); + execute( TC_clnt_sg_to_asp() ); + execute( TC_clnt_asp_to_sg() ); } diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg index d5eccba..d8630d2 100644 --- a/stp/osmo-stp.cfg +++ b/stp/osmo-stp.cfg @@ -45,6 +45,11 @@ asp asp-receiver1 10001 2905 m3ua local-ip 127.0.0.1 remote-ip 127.0.0.1 + asp asp-client0 10002 2906 m3ua + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + sctp-role client + role asp as as-sender m3ua asp asp-sender routing-key 1023 23 @@ -54,9 +59,13 @@ as mahlzeit ipa routing-key 0 5 point-code override dpc 23 + as as-client m3ua + routing-key 1055 55 + asp asp-client0 route-table system update route 23 16777215 linkset as-sender update route 42 16777215 linkset as-receiver + update route 55 16777215 linkset as-client listen m3ua 2905 accept-asp-connections dynamic-permitted listen ipa 5000 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15985 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ifec443858256ad79fbe29e26c609322809dd07b1 Gerrit-Change-Number: 15985 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:03:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:03:22 +0000 Subject: Change in libosmo-sccp[master]: xua: Allow traffic mode set by peer if not set by VTY In-Reply-To: References: Message-ID: laforge has uploaded a new patch set (#2) to the change originally created by pespin. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 ) Change subject: xua: Allow traffic mode set by peer if not set by VTY ...................................................................... xua: Allow traffic mode set by peer if not set by VTY Change-Id: I8ca17439b4dd023625f8f22689c0432341986099 --- M include/osmocom/sigtran/osmo_ss7.h M src/xua_asp_fsm.c M src/xua_rkm.c 3 files changed, 55 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/78/15978/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I8ca17439b4dd023625f8f22689c0432341986099 Gerrit-Change-Number: 15978 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:03:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:03:22 +0000 Subject: Change in libosmo-sccp[master]: M3UA: Reject ASP activation + RKM registration for incompatible traff... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 to look at the new patch set (#5). Change subject: M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode ...................................................................... M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode If the AS is e.g. configured as broadcast, then individual ASPs cannot be activated in loadshare or override. Everyone must agree. Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/xua_asp_fsm.c M src/xua_rkm.c 4 files changed, 30 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/85/15885/5 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c Gerrit-Change-Number: 15885 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:03:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:03:52 +0000 Subject: Change in libosmo-sccp[master]: xua: Allow traffic mode set by peer if not set by VTY In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 ) Change subject: xua: Allow traffic mode set by peer if not set by VTY ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I8ca17439b4dd023625f8f22689c0432341986099 Gerrit-Change-Number: 15978 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:03:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:05:19 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 20:05:19 +0000 Subject: Change in libosmo-sccp[master]: ASP: Stop re-transmitting un-acknowledged messages on SCTP down event In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15977 ) Change subject: ASP: Stop re-transmitting un-acknowledged messages on SCTP down event ...................................................................... Patch Set 4: (2 comments) https://gerrit.osmocom.org/c/libosmo-sccp/+/15977/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/libosmo-sccp/+/15977/3//COMMIT_MSG at 9 PS3, Line 9: We don't want to attempt to re-transimt if we lots the connection: If we have lots of connections it's fine re-transimting! re-transmit lost https://gerrit.osmocom.org/c/libosmo-sccp/+/15977/3/src/xua_asp_fsm.c File src/xua_asp_fsm.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15977/3/src/xua_asp_fsm.c at 605 PS3, Line 605: osmo_timer_del(&xafp->t_ack.timer); will the timer be armed again when we re-gain connectivity? or are we simply dropping everything on the queue then? Because in that case it makes sense to clean up the queue now... -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15977 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic8da646d22d3120121d9af43a890762a879f9d74 Gerrit-Change-Number: 15977 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:05:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:05:23 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:05:23 +0000 Subject: Change in libosmo-sccp[master]: Allow ASP role to be configured In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 ) Change subject: Allow ASP role to be configured ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15974/3/src/osmo_ss7_vty.c File src/osmo_ss7_vty.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15974/3/src/osmo_ss7_vty.c at 734 PS3, Line 734: if (asp->cfg.role_set_by_vty) { > If this flag is only used this way, I don't see the point in having it. [?] the vty code is also used by classic M3UA clients. Here, the default is ASP_ROLE_ASP. So if we ever were to run a MSC/BSC with mode != ASP, or a STP with mode != SG, then the vty config line will be written. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 Gerrit-Change-Number: 15974 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:05:23 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:06:12 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:06:12 +0000 Subject: Change in libosmo-sccp[master]: vty: Permit configuration of ASPs in SCTP client mode In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 ) Change subject: vty: Permit configuration of ASPs in SCTP client mode ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15975/3/src/xua_as_fsm.c File src/xua_as_fsm.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15975/3/src/xua_as_fsm.c at 38 PS3, Line 38: static int asp_notify_all_as(struct osmo_ss7_as *as, struct osmo_xlm_prim_notify *npar) > This function is named wrong. Should be as_notify_all_asp() ... feel free to submit a related patch. My patch series doesn't introduce this function, AFAICT. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Gerrit-Change-Number: 15975 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:06:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:07:44 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 20:07:44 +0000 Subject: Change in libosmo-sccp[master]: xua: Allow traffic mode set by peer if not set by VTY In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 ) Change subject: xua: Allow traffic mode set by peer if not set by VTY ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I8ca17439b4dd023625f8f22689c0432341986099 Gerrit-Change-Number: 15978 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:07:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:09:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 20:09:27 +0000 Subject: Change in libosmo-sccp[master]: M3UA: Reject ASP activation + RKM registration for incompatible traff... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 ) Change subject: M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode ...................................................................... Patch Set 5: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/5/src/osmo_ss7.c File src/osmo_ss7.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15885/5/src/osmo_ss7.c at 2069 PS5, Line 2069: if (as->cfg.mode== OSMO_SS7_AS_TMOD_OVERRIDE) whitespace missing -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c Gerrit-Change-Number: 15885 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:09:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:10:23 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 20:10:23 +0000 Subject: Change in libosmo-sccp[master]: Allow ASP role to be configured In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 ) Change subject: Allow ASP role to be configured ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 Gerrit-Change-Number: 15974 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:10:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:13:06 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 20:13:06 +0000 Subject: Change in libosmo-sccp[master]: xua: Fix private function name References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15986 ) Change subject: xua: Fix private function name ...................................................................... xua: Fix private function name The function clearly does stuff the other way as its name used to describe. Change-Id: Ib65a0f2706e2eefe2446d3c9a6bdd19cf9cb81f2 --- M src/xua_as_fsm.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/86/15986/1 diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index cf75ef3..6f6ccff 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -35,7 +35,7 @@ return msg; } -static int asp_notify_all_as(struct osmo_ss7_as *as, struct osmo_xlm_prim_notify *npar) +static int as_notify_all_asp(struct osmo_ss7_as *as, struct osmo_xlm_prim_notify *npar) { struct msgb *msg; unsigned int i, sent = 0; @@ -260,7 +260,7 @@ /* TODO: ASP-Id of ASP triggering this state change */ - asp_notify_all_as(xafp->as, &npar); + as_notify_all_asp(xafp->as, &npar); }; static void xua_as_fsm_inactive(struct osmo_fsm_inst *fi, uint32_t event, void *data) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15986 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib65a0f2706e2eefe2446d3c9a6bdd19cf9cb81f2 Gerrit-Change-Number: 15986 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:16:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 20:16:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: STP_Tests_M3UA.TC_tmt_{loadshare, override}: Fix double-ASPUP In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15982 ) Change subject: STP_Tests_M3UA.TC_tmt_{loadshare,override}: Fix double-ASPUP ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3acf1ce18d1a232c9ce457a19a6d36be380c42dd Gerrit-Change-Number: 15982 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:16:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:17:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 20:17:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: STP_Tests_M3UA.TC_tmt_loadshare: Clarify log message in failure case In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15983 ) Change subject: STP_Tests_M3UA.TC_tmt_loadshare: Clarify log message in failure case ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15983/1/stp/STP_Tests_M3UA.ttcn File stp/STP_Tests_M3UA.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15983/1/stp/STP_Tests_M3UA.ttcn at 291 PS1, Line 291: "M3UA DATA messages at M3UA port ", i); may be worth using "mp_local_m3ua_port + i", but i is also fine. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I28a86f0ea0f8df28d8d22732a8647a07a936c100 Gerrit-Change-Number: 15983 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 05 Nov 2019 20:17:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:17:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 20:17:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: M3UA_Templates: Fix tr_M3UA_ASPUP() length value copy+paste error In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15984 ) Change subject: M3UA_Templates: Fix tr_M3UA_ASPUP() length value copy+paste error ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15984 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7ef53b93fcdfe1ce7914bd4edb1fed8a8351b1b4 Gerrit-Change-Number: 15984 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 05 Nov 2019 20:17:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:21:56 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 20:21:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Add tests for running STP in M3UA ASP role In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15985 ) Change subject: stp: Add tests for running STP in M3UA ASP role ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15985 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ifec443858256ad79fbe29e26c609322809dd07b1 Gerrit-Change-Number: 15985 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:21:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:41:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:41:03 +0000 Subject: Change in libosmo-sccp[master]: M3UA: Reject ASP activation + RKM registration for incompatible traff... In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 to look at the new patch set (#6). Change subject: M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode ...................................................................... M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode If the AS is e.g. configured as broadcast, then individual ASPs cannot be activated in loadshare or override. Everyone must agree. Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/xua_asp_fsm.c M src/xua_rkm.c 4 files changed, 30 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/85/15885/6 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c Gerrit-Change-Number: 15885 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:41:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:41:08 +0000 Subject: Change in libosmo-sccp[master]: M3UA: Reject ASP activation + RKM registration for incompatible traff... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 ) Change subject: M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c Gerrit-Change-Number: 15885 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:41:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:41:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:41:56 +0000 Subject: Change in libosmo-sccp[master]: xua: Allow traffic mode set by peer if not set by VTY In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 ) Change subject: xua: Allow traffic mode set by peer if not set by VTY ...................................................................... xua: Allow traffic mode set by peer if not set by VTY Change-Id: I8ca17439b4dd023625f8f22689c0432341986099 --- M include/osmocom/sigtran/osmo_ss7.h M src/xua_asp_fsm.c M src/xua_rkm.c 3 files changed, 53 insertions(+), 7 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 1b5fc31..4f20d81 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -314,7 +314,10 @@ enum osmo_ss7_asp_protocol proto; struct osmo_ss7_routing_key routing_key; enum osmo_ss7_as_traffic_mode mode; + /* traffic mode was configured by VTY / config file */ bool mode_set_by_vty; + /* traffic mode was configured by RKM (routing key management) or ASPAC */ + bool mode_set_by_peer; uint32_t recovery_timeout_msec; uint8_t qos_class; struct { diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index a6ee2ec..5814532 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -415,10 +415,11 @@ { struct xua_asp_fsm_priv *xafp = fi->priv; struct osmo_ss7_asp *asp = xafp->asp; + struct osmo_ss7_as *as; struct xua_msg *xua_in; - uint32_t traf_mode; + uint32_t traf_mode = 0; + enum osmo_ss7_as_traffic_mode tmode; struct xua_msg_part *part; - uint32_t rctx; int i; check_stop_t_ack(fi, event); @@ -459,16 +460,40 @@ peer_send_error(fi, M3UA_ERR_UNSUPP_TRAF_MOD_TYP); return; } + tmode = osmo_ss7_tmode_from_xua(traf_mode); } if ((part = xua_msg_find_tag(xua_in, M3UA_IEI_ROUTE_CTX))) { for (i = 0; i < part->len / sizeof(uint32_t); i++) { - rctx = osmo_load32be(&part->dat[i * sizeof(uint32_t)]); - if (!osmo_ss7_as_find_by_rctx(asp->inst, rctx)) { + uint32_t rctx = osmo_load32be(&part->dat[i * sizeof(uint32_t)]); + as = osmo_ss7_as_find_by_rctx(asp->inst, rctx); + if (!as) { peer_send_error(fi, M3UA_ERR_INVAL_ROUT_CTX); return; } } } + + if (traf_mode) { /* if the peer has specified a traffic mode at all */ + llist_for_each_entry(as, &asp->inst->as_list, list) { + if (!osmo_ss7_as_has_asp(as, asp)) + continue; + + if (!as->cfg.mode_set_by_peer && !as->cfg.mode_set_by_vty) { + as->cfg.mode = tmode; + LOGPAS(as, DLSS7, LOGL_INFO, + "ASPAC: Traffic mode set dynamically by peer to %s\n", + osmo_ss7_as_traffic_mode_name(as->cfg.mode)); + } else if (as->cfg.mode != tmode) { + /*FIXME: ^ properly check if tmode is + compatible with already set + as->cfg.mode */ + peer_send_error(fi, M3UA_ERR_UNSUPP_TRAF_MOD_TYP); + return; + } + as->cfg.mode_set_by_peer = true; + } + } + /* send ACK */ peer_send(fi, XUA_ASP_E_ASPTM_ASPAC_ACK, xua_in); /* transition state and inform layer manager */ diff --git a/src/xua_rkm.c b/src/xua_rkm.c index b3c785f..a61ac31 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -152,6 +152,7 @@ unsigned int max_nas_idx, unsigned int *nas_idx) { uint32_t rk_id, rctx, _tmode, dpc; + enum osmo_ss7_as_traffic_mode tmode; struct osmo_ss7_as *as; struct osmo_ss7_route *rt; char namebuf[32]; @@ -217,8 +218,23 @@ msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INVAL_RKEY, 0); return -1; } - if (!as->cfg.mode_set_by_vty && _tmode) - as->cfg.mode = osmo_ss7_tmode_from_xua(_tmode); + if (_tmode) { /* if the peer has specified a traffic mode at all */ + tmode = osmo_ss7_tmode_from_xua(_tmode); + if (!as->cfg.mode_set_by_peer && !as->cfg.mode_set_by_vty) { + as->cfg.mode = tmode; + LOGPAS(as, DLSS7, LOGL_INFO, + "RKM: Traffic mode set dynamically by peer to %s\n", + osmo_ss7_as_traffic_mode_name(as->cfg.mode)); + } else if (as->cfg.mode != tmode) { + /*FIXME: ^ properly check if tmode is + compatible with already set as->cfg.mode */ + LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: Non-matching Traffic Mode %s\n", + osmo_ss7_as_traffic_mode_name(tmode)); + msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_UNSUPP_TRAF_MODE, 0); + return -1; + } + as->cfg.mode_set_by_peer = true; + } } else if (asp->inst->cfg.permit_dyn_rkm_alloc) { /* Create an AS for this routing key */ snprintf(namebuf, sizeof(namebuf), "as-rkm-%u", rctx); @@ -231,8 +247,10 @@ as->cfg.description = talloc_strdup(as, "Auto-generated by RKM"); as->rkm_dyn_allocated = true; - if (!as->cfg.mode_set_by_vty && _tmode) + if (!as->cfg.mode_set_by_vty && _tmode) { as->cfg.mode = osmo_ss7_tmode_from_xua(_tmode); + as->cfg.mode_set_by_peer = true; + } /* fill routing key */ as->cfg.routing_key.pc = dpc; as->cfg.routing_key.context = rctx; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I8ca17439b4dd023625f8f22689c0432341986099 Gerrit-Change-Number: 15978 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:50:28 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:50:28 +0000 Subject: Change in libosmo-sccp[master]: M3UA: Reject ASP activation + RKM registration for incompatible traff... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 ) Change subject: M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode ...................................................................... M3UA: Reject ASP activation + RKM registration for incompatible traffic-mode If the AS is e.g. configured as broadcast, then individual ASPs cannot be activated in loadshare or override. Everyone must agree. Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/xua_asp_fsm.c M src/xua_rkm.c 4 files changed, 30 insertions(+), 8 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 4f20d81..04058c2 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -316,7 +316,7 @@ enum osmo_ss7_as_traffic_mode mode; /* traffic mode was configured by VTY / config file */ bool mode_set_by_vty; - /* traffic mode was configured by RKM (routing key management) or ASPAC */ + /* traffic mode was configured by RKM (routing key management) or first ASPAC */ bool mode_set_by_peer; uint32_t recovery_timeout_msec; uint8_t qos_class; @@ -346,6 +346,7 @@ void osmo_ss7_as_destroy(struct osmo_ss7_as *as); bool osmo_ss7_as_has_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp); +bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt); void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp); diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index efbceb8..87f1245 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -2059,6 +2059,31 @@ } } +bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt) +{ + if (!as->cfg.mode_set_by_vty && !as->cfg.mode_set_by_peer) + return true; + + switch (m3ua_tmt) { + case M3UA_TMOD_OVERRIDE: + if (as->cfg.mode == OSMO_SS7_AS_TMOD_OVERRIDE) + return true; + break; + case M3UA_TMOD_LOADSHARE: + if (as->cfg.mode == OSMO_SS7_AS_TMOD_LOADSHARE || + as->cfg.mode == OSMO_SS7_AS_TMOD_ROUNDROBIN) + return true; + break; + case M3UA_TMOD_BCAST: + if (as->cfg.mode == OSMO_SS7_AS_TMOD_BCAST) + return true; + break; + default: + break; + } + return false; +} + static osmo_ss7_asp_rx_unknown_cb *g_osmo_ss7_asp_rx_unknown_cb; int ss7_asp_rx_unknown(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg) diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 5814532..16c06d6 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -483,10 +483,7 @@ LOGPAS(as, DLSS7, LOGL_INFO, "ASPAC: Traffic mode set dynamically by peer to %s\n", osmo_ss7_as_traffic_mode_name(as->cfg.mode)); - } else if (as->cfg.mode != tmode) { - /*FIXME: ^ properly check if tmode is - compatible with already set - as->cfg.mode */ + } else if (!osmo_ss7_as_tmode_compatible_xua(as, traf_mode)) { peer_send_error(fi, M3UA_ERR_UNSUPP_TRAF_MOD_TYP); return; } diff --git a/src/xua_rkm.c b/src/xua_rkm.c index a61ac31..10335ea 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -225,9 +225,8 @@ LOGPAS(as, DLSS7, LOGL_INFO, "RKM: Traffic mode set dynamically by peer to %s\n", osmo_ss7_as_traffic_mode_name(as->cfg.mode)); - } else if (as->cfg.mode != tmode) { - /*FIXME: ^ properly check if tmode is - compatible with already set as->cfg.mode */ + /* verify if existing AS has same traffic-mode as new request (if any) */ + } else if (!osmo_ss7_as_tmode_compatible_xua(as, _tmode)) { LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: Non-matching Traffic Mode %s\n", osmo_ss7_as_traffic_mode_name(tmode)); msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_UNSUPP_TRAF_MODE, 0); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic73410fbc88d50710202453f759fa132ce14db4c Gerrit-Change-Number: 15885 Gerrit-PatchSet: 7 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:50:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:50:40 +0000 Subject: Change in libosmo-sccp[master]: introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15973 ) Change subject: introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP ...................................................................... Patch Set 4: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I28b0888b8f8206e9dd67ef64ce0f71ba9a7105ce Gerrit-Change-Number: 15973 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:50:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:50:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:50:42 +0000 Subject: Change in libosmo-sccp[master]: introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15973 ) Change subject: introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP ...................................................................... introduce public enum osmo_ss7_asp_role for ASP/SG/IPSP This supersedes the library-internal enum xua_asp_role. Change-Id: I28b0888b8f8206e9dd67ef64ce0f71ba9a7105ce --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/xua_asp_fsm.c M src/xua_asp_fsm.h 4 files changed, 32 insertions(+), 30 deletions(-) Approvals: laforge: Looks good to me, approved; Verified pespin: Looks good to me, approved diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 04058c2..87336a8 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -369,6 +369,14 @@ OSMO_SS7_ASP_ADM_S_ENABLED, }; +enum osmo_ss7_asp_role { + OSMO_SS7_ASP_ROLE_ASP, + OSMO_SS7_ASP_ROLE_SG, + OSMO_SS7_ASP_ROLE_IPSP, +}; + +extern const struct value_string osmo_ss7_asp_role_names[]; + struct osmo_ss7_asp { /*! entry in \ref osmo_ss7_instance.asp_list */ struct llist_head list; diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 87f1245..7a5e35d 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -74,6 +74,13 @@ { 0, NULL } }; +const struct value_string osmo_ss7_asp_role_names[] = { + { OSMO_SS7_ASP_ROLE_ASP, "ASP" }, + { OSMO_SS7_ASP_ROLE_SG, "SG" }, + { OSMO_SS7_ASP_ROLE_IPSP, "IPSP" }, + { 0, NULL } +}; + static int asp_proto_to_ip_proto(enum osmo_ss7_asp_protocol proto) { switch (proto) { @@ -1280,7 +1287,7 @@ int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp) { int rc; - enum xua_asp_role role; + enum osmo_ss7_asp_role role; char bufloc[512], bufrem[512]; OSMO_ASSERT(ss7_initialized); @@ -1326,7 +1333,7 @@ osmo_stream_cli_set_reconnect_timeout() above) to connect so the error is transient */ } /* TODO: make this configurable and not implicit */ - role = XUA_ASPFSM_ROLE_ASP; + role = OSMO_SS7_ASP_ROLE_ASP; } else { /* We are in server mode now */ if (asp->client) { @@ -1339,7 +1346,7 @@ LOGPASP(asp, DLSS7, LOGL_NOTICE, "ASP Restart for server " "not implemented yet!\n"); /* TODO: make this configurable and not implicit */ - role = XUA_ASPFSM_ROLE_SG; + role = OSMO_SS7_ASP_ROLE_SG; } /* (re)start the ASP FSM */ diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 16c06d6..3f3d69a 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -47,13 +47,6 @@ #define SUA_T_IAS_SEC (7*60) /* SUA only */ #define SUA_T_IAR_SEC (15*60) /* SUA only */ -static const struct value_string xua_asp_role_names[] = { - { XUA_ASPFSM_ROLE_ASP, "ASP" }, - { XUA_ASPFSM_ROLE_SG, "SG" }, - { XUA_ASPFSM_ROLE_IPSP, "IPSP" }, - { 0, NULL } -}; - static const struct value_string xua_asp_event_names[] = { { XUA_ASP_E_M_ASP_UP_REQ, "M-ASP_UP.req" }, { XUA_ASP_E_M_ASP_ACTIVE_REQ, "M-ASP_ACTIVE.req" }, @@ -88,7 +81,7 @@ /* pointer back to ASP to which we belong */ struct osmo_ss7_asp *asp; /* Role (ASP/SG/IPSP) */ - enum xua_asp_role role; + enum osmo_ss7_asp_role role; /* routing context[s]: list of 32bit integers */ /* ACTIVE: traffic mode type, tid label, drn label ? */ @@ -312,12 +305,12 @@ #define ENSURE_ASP_OR_IPSP(fi, event) \ do { \ struct xua_asp_fsm_priv *_xafp = fi->priv; \ - if (_xafp->role != XUA_ASPFSM_ROLE_ASP && \ - _xafp->role != XUA_ASPFSM_ROLE_IPSP) { \ + if (_xafp->role != OSMO_SS7_ASP_ROLE_ASP && \ + _xafp->role != OSMO_SS7_ASP_ROLE_IPSP) { \ LOGPFSML(fi, LOGL_ERROR, "event %s not permitted " \ "in role %s\n", \ osmo_fsm_event_name(fi->fsm, event), \ - get_value_string(xua_asp_role_names, _xafp->role));\ + get_value_string(osmo_ss7_asp_role_names, _xafp->role));\ return; \ } \ } while(0) @@ -325,12 +318,12 @@ #define ENSURE_SG_OR_IPSP(fi, event) \ do { \ struct xua_asp_fsm_priv *_xafp = fi->priv; \ - if (_xafp->role != XUA_ASPFSM_ROLE_SG && \ - _xafp->role != XUA_ASPFSM_ROLE_IPSP) { \ + if (_xafp->role != OSMO_SS7_ASP_ROLE_SG && \ + _xafp->role != OSMO_SS7_ASP_ROLE_IPSP) { \ LOGPFSML(fi, LOGL_ERROR, "event %s not permitted " \ "in role %s\n", \ osmo_fsm_event_name(fi->fsm, event), \ - get_value_string(xua_asp_role_names, _xafp->role));\ + get_value_string(osmo_ss7_asp_role_names, _xafp->role));\ return; \ } \ } while(0) @@ -709,7 +702,7 @@ }; static struct osmo_fsm_inst *ipa_asp_fsm_start(struct osmo_ss7_asp *asp, - enum xua_asp_role role, int log_level); + enum osmo_ss7_asp_role role, int log_level); /*! \brief Start a new ASP finite stae machine for given ASP * \param[in] asp Application Server Process for which to start FSM @@ -717,7 +710,7 @@ * \param[in] log_level Logging Level for ASP FSM logging * \returns FSM instance on success; NULL on error */ struct osmo_fsm_inst *xua_asp_fsm_start(struct osmo_ss7_asp *asp, - enum xua_asp_role role, int log_level) + enum osmo_ss7_asp_role role, int log_level) { struct osmo_fsm_inst *fi; struct xua_asp_fsm_priv *xafp; @@ -768,7 +761,7 @@ /* pointer back to ASP to which we belong */ struct osmo_ss7_asp *asp; /* Role (ASP/SG/IPSP) */ - enum xua_asp_role role; + enum osmo_ss7_asp_role role; /* Structure holding parsed data of the IPA CCM ID exchange */ struct ipaccess_unit *ipa_unit; @@ -807,7 +800,7 @@ switch (event) { case XUA_ASP_E_M_ASP_UP_REQ: case XUA_ASP_E_SCTP_EST_IND: - if (iafp->role == XUA_ASPFSM_ROLE_SG) { + if (iafp->role == OSMO_SS7_ASP_ROLE_SG) { /* Server: Transmit IPA ID GET + Wait for Response */ if (fd >= 0) { ipa_ccm_send_id_req(fd); @@ -1115,7 +1108,7 @@ * \param[in] log_level Logging Level for ASP FSM logging * \returns FSM instance on success; NULL on error */ static struct osmo_fsm_inst *ipa_asp_fsm_start(struct osmo_ss7_asp *asp, - enum xua_asp_role role, int log_level) + enum osmo_ss7_asp_role role, int log_level) { struct osmo_fsm_inst *fi; struct ipa_asp_fsm_priv *iafp; @@ -1137,7 +1130,7 @@ fi->priv = iafp; - if (role == XUA_ASPFSM_ROLE_ASP) + if (role == OSMO_SS7_ASP_ROLE_ASP) osmo_fsm_inst_dispatch(fi, XUA_ASP_E_M_ASP_UP_REQ, NULL); return fi; diff --git a/src/xua_asp_fsm.h b/src/xua_asp_fsm.h index 32749ec..2b36220 100644 --- a/src/xua_asp_fsm.h +++ b/src/xua_asp_fsm.h @@ -36,14 +36,8 @@ _NUM_XUA_ASP_E }; -enum xua_asp_role { - XUA_ASPFSM_ROLE_ASP, - XUA_ASPFSM_ROLE_SG, - XUA_ASPFSM_ROLE_IPSP, -}; - extern struct osmo_fsm xua_asp_fsm; extern struct osmo_fsm ipa_asp_fsm; struct osmo_fsm_inst *xua_asp_fsm_start(struct osmo_ss7_asp *asp, - enum xua_asp_role role, int log_level); + enum osmo_ss7_asp_role role, int log_level); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I28b0888b8f8206e9dd67ef64ce0f71ba9a7105ce Gerrit-Change-Number: 15973 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:50:54 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:50:54 +0000 Subject: Change in libosmo-sccp[master]: Allow ASP role to be configured In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 ) Change subject: Allow ASP role to be configured ...................................................................... Patch Set 5: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 Gerrit-Change-Number: 15974 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:50:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:50:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:50:56 +0000 Subject: Change in libosmo-sccp[master]: Allow ASP role to be configured In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 ) Change subject: Allow ASP role to be configured ...................................................................... Allow ASP role to be configured So far, we had a static role model: * SCTP servers (listening, such as OsmoSTP) are role SGW * SCTP clients (connecting, such as OsmoMSC) are role ASP While this is customary, it is not actually required by the specification. The SGW can establish the SCTP connection to an ASP but still remain "SG" role. Let's make things more flexible by having the role configurable. Related: OS#2005 Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/sccp_user.c M tests/vty/ss7_asp_test.vty 5 files changed, 36 insertions(+), 6 deletions(-) Approvals: laforge: Verified pespin: Looks good to me, approved diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 87336a8..826b890 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -418,6 +418,8 @@ enum osmo_ss7_asp_protocol proto; enum osmo_ss7_asp_admin_state adm_state; bool is_server; + enum osmo_ss7_asp_role role; + bool role_set_by_vty; struct osmo_ss7_asp_peer local; struct osmo_ss7_asp_peer remote; diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 7a5e35d..8c547e8 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1287,7 +1287,6 @@ int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp) { int rc; - enum osmo_ss7_asp_role role; char bufloc[512], bufrem[512]; OSMO_ASSERT(ss7_initialized); @@ -1332,8 +1331,6 @@ will continue to retry (due to timeout being explicitly set with osmo_stream_cli_set_reconnect_timeout() above) to connect so the error is transient */ } - /* TODO: make this configurable and not implicit */ - role = OSMO_SS7_ASP_ROLE_ASP; } else { /* We are in server mode now */ if (asp->client) { @@ -1345,14 +1342,12 @@ /* FIXME: ensure we have a SCTP server */ LOGPASP(asp, DLSS7, LOGL_NOTICE, "ASP Restart for server " "not implemented yet!\n"); - /* TODO: make this configurable and not implicit */ - role = OSMO_SS7_ASP_ROLE_SG; } /* (re)start the ASP FSM */ if (asp->fi) osmo_fsm_inst_term(asp->fi, OSMO_FSM_TERM_REQUEST, NULL); - asp->fi = xua_asp_fsm_start(asp, role, LOGL_DEBUG); + asp->fi = xua_asp_fsm_start(asp, asp->cfg.role, LOGL_DEBUG); return 0; } diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 9c22fb1..1b8b043 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -580,6 +580,7 @@ return CMD_WARNING; } asp->cfg.is_server = true; + asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; vty->node = L_CS7_ASP_NODE; vty->index = asp; @@ -637,6 +638,29 @@ return CMD_SUCCESS; } +DEFUN(asp_role, asp_role_cmd, + "role (sg|asp|ipsp)", + "Specify the xUA role for this ASP\n" + "SG (Signaling Gateway)\n" + "ASP (Application Server Process)\n" + "IPSP (IP Signalling Point)\n") +{ + struct osmo_ss7_asp *asp = vty->index; + + if (!strcmp(argv[0], "sg")) { + asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; + } else if (!strcmp(argv[0], "asp")) { + asp->cfg.role = OSMO_SS7_ASP_ROLE_ASP; + } else if (!strcmp(argv[0], "ipsp")) { + vty_out(vty, "IPSP role isn't supported yet%s", VTY_NEWLINE); + return CMD_WARNING; + } else + OSMO_ASSERT(0); + + asp->cfg.role_set_by_vty = true; + return CMD_SUCCESS; +} + DEFUN(asp_block, asp_block_cmd, "block", "Allows a SCTP Association with ASP, but doesn't let it become active\n") @@ -707,6 +731,10 @@ } if (asp->cfg.qos_class) vty_out(vty, " qos-class %u%s", asp->cfg.qos_class, VTY_NEWLINE); + if (asp->cfg.role_set_by_vty) { + vty_out(vty, " role %s%s", get_value_string(osmo_ss7_asp_role_names, asp->cfg.role), + VTY_NEWLINE); + } } @@ -1847,6 +1875,7 @@ install_element(L_CS7_ASP_NODE, &asp_remote_ip_cmd); install_element(L_CS7_ASP_NODE, &asp_local_ip_cmd); install_element(L_CS7_ASP_NODE, &asp_qos_class_cmd); + install_element(L_CS7_ASP_NODE, &asp_role_cmd); install_element(L_CS7_ASP_NODE, &asp_block_cmd); install_element(L_CS7_ASP_NODE, &asp_shutdown_cmd); diff --git a/src/sccp_user.c b/src/sccp_user.c index 4e4144e..929445f 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -587,6 +587,7 @@ /* Ensure that the ASP we use is set to client mode. */ asp->cfg.is_server = false; + asp->cfg.role = OSMO_SS7_ASP_ROLE_ASP; /* Restart ASP */ if (prot != OSMO_SS7_ASP_PROT_IPA) @@ -734,6 +735,7 @@ if (!asp) goto out_rt; asp->cfg.is_server = true; + asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; osmo_ss7_as_add_asp(as, asp_name); talloc_free(asp_name); talloc_free(as_name); diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty index 367c2d9..bc899eb 100644 --- a/tests/vty/ss7_asp_test.vty +++ b/tests/vty/ss7_asp_test.vty @@ -215,6 +215,7 @@ remote-ip A.B.C.D local-ip A.B.C.D qos-class <0-255> + role (sg|asp|ipsp) block shutdown @@ -224,6 +225,7 @@ remote-ip Specify Remote IP Address of ASP local-ip Specify Local IP Address from which to contact ASP qos-class Specify QoS Class of ASP + role Specify the xUA role for this ASP block Allows a SCTP Association with ASP, but doesn't let it become active shutdown Terminates SCTP association; New associations will be rejected -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 Gerrit-Change-Number: 15974 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:51:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:51:06 +0000 Subject: Change in libosmo-sccp[master]: vty: Permit configuration of ASPs in SCTP client mode In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 ) Change subject: vty: Permit configuration of ASPs in SCTP client mode ...................................................................... Patch Set 5: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Gerrit-Change-Number: 15975 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 05 Nov 2019 20:51:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 20:51:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 5 Nov 2019 20:51:08 +0000 Subject: Change in libosmo-sccp[master]: vty: Permit configuration of ASPs in SCTP client mode In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 ) Change subject: vty: Permit configuration of ASPs in SCTP client mode ...................................................................... vty: Permit configuration of ASPs in SCTP client mode The M3UA specification states that either of the two roles should be the SCTP client and the other the server. It also states that the default for the SGP is to operate as server. However, it permits other configurations. Let's allow this to be configured by the VTY. We need to ensure that while in ASP role, we don't send any NOTIFY messages to the peer SG. Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Closes: OS#2005 --- M src/osmo_ss7_vty.c M src/xua_as_fsm.c M tests/vty/ss7_asp_test.vty 3 files changed, 25 insertions(+), 0 deletions(-) Approvals: laforge: Verified pespin: Looks good to me, approved diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 1b8b043..35640df 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -661,6 +661,24 @@ return CMD_SUCCESS; } +DEFUN(sctp_role, asp_sctp_role_cmd, + "sctp-role (client|server)", + "Specify the SCTP role for this ASP\n" + "Operate as SCTP client; connect to a server\n" + "Operate as SCTP server; wait for client connections\n") +{ + struct osmo_ss7_asp *asp = vty->index; + + if (!strcmp(argv[0], "client")) + asp->cfg.is_server = false; + else if (!strcmp(argv[0], "server")) + asp->cfg.is_server = true; + else + OSMO_ASSERT(0); + + return CMD_SUCCESS; +} + DEFUN(asp_block, asp_block_cmd, "block", "Allows a SCTP Association with ASP, but doesn't let it become active\n") @@ -1876,6 +1894,7 @@ install_element(L_CS7_ASP_NODE, &asp_local_ip_cmd); install_element(L_CS7_ASP_NODE, &asp_qos_class_cmd); install_element(L_CS7_ASP_NODE, &asp_role_cmd); + install_element(L_CS7_ASP_NODE, &asp_sctp_role_cmd); install_element(L_CS7_ASP_NODE, &asp_block_cmd); install_element(L_CS7_ASP_NODE, &asp_shutdown_cmd); diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index cf75ef3..97a2107 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -51,6 +51,10 @@ if (!asp) continue; + /* NOTIFY are only sent by SG or IPSP role */ + if (asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP) + continue; + if (!asp->fi || asp->fi->state == XUA_ASP_S_DOWN) continue; diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty index bc899eb..eeda4c8 100644 --- a/tests/vty/ss7_asp_test.vty +++ b/tests/vty/ss7_asp_test.vty @@ -216,6 +216,7 @@ local-ip A.B.C.D qos-class <0-255> role (sg|asp|ipsp) + sctp-role (client|server) block shutdown @@ -226,6 +227,7 @@ local-ip Specify Local IP Address from which to contact ASP qos-class Specify QoS Class of ASP role Specify the xUA role for this ASP + sctp-role Specify the SCTP role for this ASP block Allows a SCTP Association with ASP, but doesn't let it become active shutdown Terminates SCTP association; New associations will be rejected -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I7452a862d45da35dcd58654ca17222eb52d26f1f Gerrit-Change-Number: 15975 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 5 22:50:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 5 Nov 2019 22:50:52 +0000 Subject: Change in osmo-bts[master]: bts-trx: Implement MS Power control loop calculations using dBm inste... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/15971 to look at the new patch set (#2). Change subject: bts-trx: Implement MS Power control loop calculations using dBm instead of ctl levels ...................................................................... bts-trx: Implement MS Power control loop calculations using dBm instead of ctl levels Some bands, such as DCS1800, contain power levels such as 29, 30 and 31 not following same unified sequence other power levels follow regarding conversion to dBm values. This makes extremly complex and prone to error comparing different power levels. Let's instead use dBm values to calculate and crop desired new value, and then convert it back to TS 05.05 ms power control level value. With this commit the control loop should be able to manage correctly the MS power levels explained above. Related: OS#4244 Change-Id: I0160637c5ffa606ee3081ad30be8e6f2a42b725b --- M src/osmo-bts-trx/loops.c M src/osmo-bts-trx/loops.h 2 files changed, 58 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/71/15971/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0160637c5ffa606ee3081ad30be8e6f2a42b725b Gerrit-Change-Number: 15971 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Wed Nov 6 02:06:14 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 06 Nov 2019 02:06:14 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5dc22aa5fa90_5ddf2af1f811c5f0267785@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 196s] | #define HAVE_MEMORY_H 1 [ 196s] | #define HAVE_STRINGS_H 1 [ 196s] | #define HAVE_INTTYPES_H 1 [ 196s] | #define HAVE_STDINT_H 1 [ 196s] | #define HAVE_UNISTD_H 1 [ 196s] | #define HAVE_DLFCN_H 1 [ 196s] | #define LT_OBJDIR ".libs/" [ 196s] | #define PACKAGE "osmo-hlr" [ 196s] | #define VERSION "1.1.0.10-5b65" [ 196s] | #define STDC_HEADERS 1 [ 196s] | [ 196s] | configure: exit 0 [ 196s] [ 196s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 196s] make[1]: *** [override_dh_auto_test] Error 1 [ 196s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 196s] debian/rules:7: recipe for target 'build' failed [ 196s] make: *** [build] Error 2 [ 196s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 196s] [ 196s] lamb60 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Wed Nov 6 02:06:02 UTC 2019. [ 196s] [ 196s] ### VM INTERACTION START ### [ 199s] [ 186.774223] sysrq: SysRq : Power Off [ 199s] [ 186.781470] reboot: Power down [ 199s] ### VM INTERACTION END ### [ 199s] [ 199s] lamb60 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Wed Nov 6 02:06:06 UTC 2019. [ 199s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 6 02:06:48 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 06 Nov 2019 02:06:48 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5dc22ac4dd4_5ddf2af1f811c5f02679c4@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 198s] -subscriber_id|INTEGER|0||0 [ 198s] - [ 198s] -Table subscriber_multi_msisdn contents: [ 198s] - [ 198s] -Verify that osmo-hlr can open it: [ 198s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 198s] -rc = 0 [ 198s] -DMAIN hlr starting [ 198s] -DDB using database: test.db [ 198s] -DDB Database test.db' has HLR DB schema version 2 [ 198s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 198s] ./testsuite.at:44: exit code was 1, expected 0 [ 198s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 198s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 198s] make[1]: *** [override_dh_auto_test] Error 1 [ 198s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 198s] debian/rules:7: recipe for target 'build' failed [ 198s] make: *** [build] Error 2 [ 198s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 198s] [ 198s] lamb52 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Wed Nov 6 02:06:28 UTC 2019. [ 198s] [ 198s] ### VM INTERACTION START ### [ 201s] [ 189.298022] sysrq: SysRq : Power Off [ 201s] [ 189.306675] reboot: Power down [ 201s] ### VM INTERACTION END ### [ 201s] [ 201s] lamb52 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Wed Nov 6 02:06:32 UTC 2019. [ 201s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 6 02:08:14 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 06 Nov 2019 02:08:14 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5dc22b1c65f10_5ddf2af1f811c5f026812d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/i586 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 191s] | #define HAVE_MEMORY_H 1 [ 191s] | #define HAVE_STRINGS_H 1 [ 191s] | #define HAVE_INTTYPES_H 1 [ 191s] | #define HAVE_STDINT_H 1 [ 191s] | #define HAVE_UNISTD_H 1 [ 191s] | #define HAVE_DLFCN_H 1 [ 191s] | #define LT_OBJDIR ".libs/" [ 191s] | #define PACKAGE "osmo-hlr" [ 191s] | #define VERSION "1.1.0.10-5b65" [ 191s] | #define STDC_HEADERS 1 [ 191s] | [ 191s] | configure: exit 0 [ 191s] [ 191s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 191s] make[1]: *** [override_dh_auto_test] Error 1 [ 191s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 191s] debian/rules:7: recipe for target 'build' failed [ 191s] make: *** [build] Error 2 [ 191s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 191s] [ 191s] lamb59 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Wed Nov 6 02:08:00 UTC 2019. [ 191s] [ 191s] ### VM INTERACTION START ### [ 192s] Powering off. [ 192s] [ 178.956822] reboot: Power down [ 192s] ### VM INTERACTION END ### [ 192s] [ 192s] lamb59 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Wed Nov 6 02:08:01 UTC 2019. [ 192s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Wed Nov 6 02:13:05 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 06 Nov 2019 02:13:05 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5dc22c4a72f5b_5ddf2af1f811c5f026821a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 296s] -name|type|notnull|dflt_value|pk [ 296s] -algo_id_2g|INTEGER|1||0 [ 296s] -ki|VARCHAR(32)|1||0 [ 296s] -subscriber_id|INTEGER|0||1 [ 296s] - [ 296s] -Table auc_2g contents: [ 296s] -algo_id_2g|ki|subscriber_id [ 296s] -1|BeefedCafeFaceAcedAddedDecadeFee|1 [ 296s] -2|33333333333333333333333333333333|4 [ 296s] -4|55555555555555555555555555555555|6 [ 296s] - [ 296s] -Table: auc_3g [ 296s] -name|type|notnull|dflt_value|pk [ 296s] -algo_id_3g|INTEGER|1||0 [ 296s] -ind_bitlen|INTEGER|1|5|0 [ 296s] -k|VARCHAR(32)|1||0 [ 296s] -op|VARCHAR(32)|0||0 [ 296s] -opc|VARCHAR(32)|0||0 [ 296s] -sqn|INTEGER|1|0|0 [ 296s] -subscriber_id|INTEGER|0||1 [ 296s] - [ 296s] -Table auc_3g contents: [ 296s] -algo_id_3g|ind_bitlen|k|op|opc|sqn|subscriber_id [ 297s] -5|5|C01ffedC1cadaeAc1d1f1edAcac1aB0aPowering off. [ 297s] [ 266.753243] reboot: Power down [ 298s] ### VM INTERACTION END ### [ 298s] [ 298s] cloud113 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Wed Nov 6 02:12:58 UTC 2019. [ 298s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:52:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:52:33 +0000 Subject: Change in libosmo-sccp[master]: xua: Fix private function name In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15986 ) Change subject: xua: Fix private function name ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15986 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib65a0f2706e2eefe2446d3c9a6bdd19cf9cb81f2 Gerrit-Change-Number: 15986 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 06 Nov 2019 04:52:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:52:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:52:35 +0000 Subject: Change in libosmo-sccp[master]: xua: Fix private function name In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15986 ) Change subject: xua: Fix private function name ...................................................................... xua: Fix private function name The function clearly does stuff the other way as its name used to describe. Change-Id: Ib65a0f2706e2eefe2446d3c9a6bdd19cf9cb81f2 --- M src/xua_as_fsm.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 97a2107..ab98da8 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -35,7 +35,7 @@ return msg; } -static int asp_notify_all_as(struct osmo_ss7_as *as, struct osmo_xlm_prim_notify *npar) +static int as_notify_all_asp(struct osmo_ss7_as *as, struct osmo_xlm_prim_notify *npar) { struct msgb *msg; unsigned int i, sent = 0; @@ -264,7 +264,7 @@ /* TODO: ASP-Id of ASP triggering this state change */ - asp_notify_all_as(xafp->as, &npar); + as_notify_all_asp(xafp->as, &npar); }; static void xua_as_fsm_inactive(struct osmo_fsm_inst *fi, uint32_t event, void *data) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15986 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib65a0f2706e2eefe2446d3c9a6bdd19cf9cb81f2 Gerrit-Change-Number: 15986 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:53:26 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:53:26 +0000 Subject: Change in osmo-bts[master]: bts-trx: Implement MS Power control loop calculations using dBm inste... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15971 ) Change subject: bts-trx: Implement MS Power control loop calculations using dBm instead of ctl levels ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0160637c5ffa606ee3081ad30be8e6f2a42b725b Gerrit-Change-Number: 15971 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 06 Nov 2019 04:53:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:54:38 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:54:38 +0000 Subject: Change in libosmocore[master]: gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uin... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15955 ) Change subject: gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uint32_t ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15955 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I235635800c0de47b1e2b9ec9c7191418f6003554 Gerrit-Change-Number: 15955 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 06 Nov 2019 04:54:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:55:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:55:11 +0000 Subject: Change in libosmocore[master]: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add un... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15924 ) Change subject: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add unit tests ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 Gerrit-Change-Number: 15924 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 04:55:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:55:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:55:14 +0000 Subject: Change in libosmocore[master]: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add un... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15924 ) Change subject: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add unit tests ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 Gerrit-Change-Number: 15924 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 04:55:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:55:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:55:16 +0000 Subject: Change in libosmocore[master]: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add un... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15924 ) Change subject: gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add unit tests ...................................................................... gsm: gsm_utils: Fix return type of API ms_class_gmsk_dbm() and add unit tests Only known user of API is in osmocom-bb and it compiles fine after the change. Related: OS#4244 Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 --- M include/osmocom/gsm/gsm_utils.h M src/gsm/gsm_utils.c M tests/gsm0408/gsm0408_test.c 3 files changed, 23 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 38a3f6e..de63434 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -115,8 +115,7 @@ uint8_t gsm_get_octet_len(const uint8_t sept_len); int gsm_7bit_decode_n_hdr(char *decoded, size_t n, const uint8_t *user_data, uint8_t length, uint8_t ud_hdr_ind); -unsigned int ms_class_gmsk_dbm(enum gsm_band band, int ms_class); - +int ms_class_gmsk_dbm(enum gsm_band band, int ms_class); int ms_pwr_ctl_lvl(enum gsm_band band, unsigned int dbm); int ms_pwr_dbm(enum gsm_band band, uint8_t lvl); diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 365920f..ae77a9d 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -501,8 +501,8 @@ /*! Convert power class to dBm according to GSM TS 05.05 * \param[in] band GSM frequency band * \param[in] class GSM power class - * \returns maximum transmit power of power class in dBm */ -unsigned int ms_class_gmsk_dbm(enum gsm_band band, int class) + * \returns maximum transmit power of power class in dBm, negative on error */ +int ms_class_gmsk_dbm(enum gsm_band band, int class) { switch (band) { case GSM_BAND_450: diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 2488024..9617823 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -1136,6 +1136,7 @@ static void test_power_ctrl() { int8_t rc8; + int rc; rc8 = osmo_gsm48_rfpowercap2powerclass(GSM_BAND_850, 0x00); VERIFY(rc8, ==, 1); @@ -1153,6 +1154,25 @@ VERIFY(rc8, <, 0); rc8 = osmo_gsm48_rfpowercap2powerclass(GSM_BAND_900, 0xf2); VERIFY(rc8, <, 0); + + rc = ms_class_gmsk_dbm(GSM_BAND_850, 0); + VERIFY(rc, <, 0); + rc = ms_class_gmsk_dbm(GSM_BAND_850, 1); + VERIFY(rc, ==, 43); + rc = ms_class_gmsk_dbm(GSM_BAND_900, 3); + VERIFY(rc, ==, 37); + rc = ms_class_gmsk_dbm(GSM_BAND_1800, 2); + VERIFY(rc, ==, 24); + rc = ms_class_gmsk_dbm(GSM_BAND_1800, 3); + VERIFY(rc, ==, 36); + rc = ms_class_gmsk_dbm(GSM_BAND_1900, 3); + VERIFY(rc, ==, 33); + rc = ms_class_gmsk_dbm(GSM_BAND_1900, 4); + VERIFY(rc, <, 0); + rc = ms_class_gmsk_dbm(GSM_BAND_900, 5); + VERIFY(rc, ==, 29); + rc = ms_class_gmsk_dbm(GSM_BAND_900, 6); + VERIFY(rc, <, 0); } int main(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia10345008b3aca50b30482ef3b852b03eca71995 Gerrit-Change-Number: 15924 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:55:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:55:19 +0000 Subject: Change in libosmocore[master]: gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uin... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15955 ) Change subject: gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uint32_t ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15955 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I235635800c0de47b1e2b9ec9c7191418f6003554 Gerrit-Change-Number: 15955 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 06 Nov 2019 04:55:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:55:20 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:55:20 +0000 Subject: Change in libosmocore[master]: gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uin... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15955 ) Change subject: gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uint32_t ...................................................................... gsm: gsm_04_08.h: Allow accessing classmark2 as struct instead of uint32_t New fields are put inside a union to keep backward compatibility with potential older users of the struct. Change-Id: I235635800c0de47b1e2b9ec9c7191418f6003554 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 28 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 68ec4e3..8370eca 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -889,13 +889,25 @@ #if OSMO_IS_LITTLE_ENDIAN uint8_t spare:4, key_seq:4; - uint32_t classmark2; + union { + uint32_t classmark2; /* Backward compatibility */ + struct { + uint8_t cm2_len; + struct gsm48_classmark2 cm2; + }; + }; uint8_t mi_len; uint8_t mi[0]; #elif OSMO_IS_BIG_ENDIAN /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t key_seq:4, spare:4; - uint32_t classmark2; + union { + uint32_t classmark2; /* Backward compatibility */ + struct { + uint8_t cm2_len; + struct gsm48_classmark2 cm2; + }; + }; uint8_t mi_len; uint8_t mi[0]; #endif @@ -1027,15 +1039,26 @@ #if OSMO_IS_LITTLE_ENDIAN uint8_t cm_service_type : 4, cipher_key_seq : 4; - /* length + 3 bytes */ - uint32_t classmark; + union { + uint32_t classmark; /* Backward compatibility */ + struct { + uint8_t cm2_len; + struct gsm48_classmark2 classmark2; + }; + }; uint8_t mi_len; uint8_t mi[0]; /* optional priority level */ #elif OSMO_IS_BIG_ENDIAN /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t cipher_key_seq:4, cm_service_type:4; - uint32_t classmark; + union { + uint32_t classmark; /* Backward compatibility */ + struct { + uint8_t cm2_len; + struct gsm48_classmark2 classmark2; + }; + }; uint8_t mi_len; uint8_t mi[0]; #endif -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15955 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I235635800c0de47b1e2b9ec9c7191418f6003554 Gerrit-Change-Number: 15955 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:55:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:55:37 +0000 Subject: Change in libosmo-sccp[master]: xua: loadshare: select ASP for tx only if active In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15980 ) Change subject: xua: loadshare: select ASP for tx only if active ...................................................................... xua: loadshare: select ASP for tx only if active Change-Id: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/xua_as_fsm.c 3 files changed, 9 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 826b890..d0aa9a1 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -442,6 +442,7 @@ int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg); int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp); int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level); +bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp); /*! Weak function to handle payload for unknown/unsupported PPID or IPA StreamID. * This function can be overridden by application code to implement whatever handling diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 8c547e8..fa6a338 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1352,6 +1352,13 @@ return 0; } +bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp) +{ + if (!asp->fi) + return false; + return asp->fi->state == XUA_ASP_S_ACTIVE; +} + /*********************************************************************** * libosmo-netif integration for SCTP stream server/client ***********************************************************************/ diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index ab98da8..b0fbd2a 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -101,7 +101,7 @@ i = first_idx; do { asp = as->cfg.asps[i]; - if (asp) + if (asp && osmo_ss7_asp_active(asp)) break; i = (i + 1) % ARRAY_SIZE(as->cfg.asps); } while (i != first_idx); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15980 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4f1d1aa9395698e5b6b930a5092a4b914dd15fb3 Gerrit-Change-Number: 15980 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:56:34 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:56:34 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BTS_Tests.ttcn: fix: move TC_pcu_ptcch to a proper place In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15869 ) Change subject: BTS_Tests.ttcn: fix: move TC_pcu_ptcch to a proper place ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15869 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id2e751e825a7a5128bc3f2e4677d8ef31174b501 Gerrit-Change-Number: 15869 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 04:56:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 04:56:36 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 04:56:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: BTS_Tests.ttcn: fix: move TC_pcu_ptcch to a proper place In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15869 ) Change subject: BTS_Tests.ttcn: fix: move TC_pcu_ptcch to a proper place ...................................................................... BTS_Tests.ttcn: fix: move TC_pcu_ptcch to a proper place We have a module parameter 'mp_l1_supports_gprs' that indicates whether the L1 back-end (trxcon, virt_phy, or Calypso) does support PDCH and TBF management. The TC_pcu_ptcch does not require support of TBF management, only PDCH (namely PTCCH) needs to be supported. This is already implemented in trxcon, and can be easily implemented for Calypso. Change-Id: Id2e751e825a7a5128bc3f2e4677d8ef31174b501 --- M bts/BTS_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 90281e3..25721e3 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -6356,7 +6356,6 @@ execute( TC_pcu_deact_req_wrong_ts() ); execute( TC_pcu_ver_si13() ); if (mp_l1_supports_gprs) { - execute( TC_pcu_ptcch() ); execute( TC_pcu_data_req_pdtch() ); execute( TC_pcu_data_req_ptcch() ); execute( TC_pcu_data_req_wrong_bts() ); @@ -6364,6 +6363,7 @@ execute( TC_pcu_data_req_wrong_ts() ); execute( TC_pcu_data_req_ts_inactive() ); } + execute( TC_pcu_ptcch() ); execute( TC_pcu_data_req_agch() ); execute( TC_pcu_data_req_pch() ); execute( TC_pcu_data_req_imm_ass_pch() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15869 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id2e751e825a7a5128bc3f2e4677d8ef31174b501 Gerrit-Change-Number: 15869 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 09:01:27 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 6 Nov 2019 09:01:27 +0000 Subject: Change in osmo-bts[master]: rsl: Assign recv pwr to lchan's max ms power In-Reply-To: References: Message-ID: dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15970 ) Change subject: rsl: Assign recv pwr to lchan's max ms power ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/15970/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/15970/1//COMMIT_MSG at 7 PS1, Line 7: rsl: Assign recv pwr to lchan's max ms power Maybe I lack the background here, but why does it help to use the receive power as ms max power? So we measure the power at the BTS side, and then set the MS TX-Power to that level? I am sure everything makes sense and I am just getting this wrong. Maybe you can give some details in the commit message. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 Gerrit-Change-Number: 15970 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 06 Nov 2019 09:01:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 12:02:17 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 12:02:17 +0000 Subject: Change in osmo-bts[master]: rsl: Assign recv pwr to lchan's max ms power In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15970 ) Change subject: rsl: Assign recv pwr to lchan's max ms power ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/15970/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/15970/1//COMMIT_MSG at 7 PS1, Line 7: rsl: Assign recv pwr to lchan's max ms power > Maybe I lack the background here, but why does it help to use the receive power as ms max power? So [?] It's explained in the spec explained above: "Based on the measurements performed on the uplink, TRX then attempts to keep the power control parameters within the limits set by the MS POWER CONTROL message" In our case the BSC is not managing the power loop, but the BTS does it (because we don't implement that in BSC, and we tell the BTs to do it by sending the "MS Power Parameters" IE in "MS Power Control" and "Channel Activate" messages in RSL. So based on signal strength rceived from the MS, the BTS freely decides to adjust the "MS Power" over time in downlink L1 SACCH header sent to the MS. Still, it should attatch to restrictions told by the BSC. The BSC can for instance request a smaller output power due to policy configuration (VTY "ms max power") or because it detected the MS is not capable of more power (thanks to power class available from MS classmark1 and 2). -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 Gerrit-Change-Number: 15970 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 12:02:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 12:56:58 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 6 Nov 2019 12:56:58 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: cosmetic: fix typo in xua_accept_cb() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15987 ) Change subject: osmo_ss7.c: cosmetic: fix typo in xua_accept_cb() ...................................................................... osmo_ss7.c: cosmetic: fix typo in xua_accept_cb() Change-Id: Id925d09b9232b5e0124b977fa482e8cdc3c8b835 --- M src/osmo_ss7.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/87/15987/1 diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index fa6a338..1b9e3d1 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1760,7 +1760,7 @@ char portbuf[16]; osmo_sock_get_ip_and_port(fd, hostbuf, sizeof(hostbuf), portbuf, sizeof(portbuf), false); - LOGP(DLSS7, LOGL_INFO, "%s: created dynamicASP %s\n", + LOGP(DLSS7, LOGL_INFO, "%s: created dynamic ASP %s\n", sock_name, asp->cfg.name); asp->cfg.is_server = true; asp->cfg.local.host[0] = NULL; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15987 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Id925d09b9232b5e0124b977fa482e8cdc3c8b835 Gerrit-Change-Number: 15987 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 12:56:58 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 6 Nov 2019 12:56:58 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: fix xua_accept_cb(): properly assign role References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 ) Change subject: osmo_ss7.c: fix xua_accept_cb(): properly assign role ...................................................................... osmo_ss7.c: fix xua_accept_cb(): properly assign role Change-Id: Ib904ecf0e5d192a1024863f6f0fdf79301055655 Related: OS#4247 --- M src/osmo_ss7.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/88/15988/1 diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 1b9e3d1..9698941 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1767,6 +1767,7 @@ asp->cfg.remote.host_cnt = 1; asp->cfg.remote.port = atoi(portbuf); asp->cfg.remote.host[0] = talloc_strdup(asp, hostbuf); + asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; asp->cfg.remote.host_cnt = 1; asp->dyn_allocated = true; asp->server = srv; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib904ecf0e5d192a1024863f6f0fdf79301055655 Gerrit-Change-Number: 15988 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 13:06:41 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 6 Nov 2019 13:06:41 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: general handling of NOPE / IDLE indications References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/15989 ) Change subject: osmo-bts-trx: general handling of NOPE / IDLE indications ...................................................................... osmo-bts-trx: general handling of NOPE / IDLE indications Each logical channel can now optionally have an additional handler, that will be called when a NOPE / IDLE indication is received from the transceiver. The aim of that handler is to keep the logical channel state updated in case if one or more Uplink bursts are lost. Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Related: OS#3428 --- M include/osmo-bts/scheduler_backend.h M src/common/scheduler.c M src/osmo-bts-trx/trx_if.c 3 files changed, 20 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/89/15989/1 diff --git a/include/osmo-bts/scheduler_backend.h b/include/osmo-bts/scheduler_backend.h index d713900..51c957c 100644 --- a/include/osmo-bts/scheduler_backend.h +++ b/include/osmo-bts/scheduler_backend.h @@ -31,6 +31,8 @@ trx_sched_dl_func *dl_fn; /*! \brief function to call when burst received from PHY */ trx_sched_ul_func *ul_fn; + /*! \brief function to call when NOPE.ind received from PHY */ + trx_sched_ul_func *nope_fn; /*! \brief channel flags, see TRX_CHAN_FLAG_* */ uint8_t flags; }; diff --git a/src/common/scheduler.c b/src/common/scheduler.c index 3adfc49..fe93c32 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -1349,6 +1349,13 @@ l1cs = &l1ts->chan_state[chan]; func = trx_chan_desc[chan].ul_fn; + /* TODO: handle noise measurements */ + if (chan == TRXC_IDLE && bi->flags & TRX_BI_F_NOPE_IND) { + LOGL1S(DL1P, LOGL_DEBUG, l1t, bi->tn, chan, bi->fn, + "Rx noise measurement (%d)\n", bi->rssi); + return -ENOTSUP; + } + /* check if channel is active */ if (!TRX_CHAN_IS_ACTIVE(l1cs, chan)) return -EINVAL; @@ -1364,6 +1371,14 @@ l1cs->last_tdma_fn = bi->fn; l1cs->proc_tdma_fs++; + /* handle NOPE indications (if the handler is present) */ + if (bi->flags & TRX_BI_F_NOPE_IND) { + func = trx_chan_desc[chan].nope_fn; + if (!func) + return 0; + return func(l1t, chan, bid, bi); + } + /* decrypt */ if (bi->burst_len && l1cs->ul_encr_algo) { ubit_t ks[114]; diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 920f441..dbf7805 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -1018,14 +1018,8 @@ if (hdr_len < 0) return hdr_len; - /* TODO: we can use NOPE indications to get noise levels on IDLE - * TDMA frames, and properly drive scheduler if nothing has been - * detected on non-IDLE channels. */ - if (bi.flags & TRX_BI_F_NOPE_IND) { - LOGPPHI(l1h->phy_inst, DTRX, LOGL_DEBUG, - "IDLE / NOPE indications are not (yet) supported\n"); - return -ENOTSUP; - } + if (bi.flags & TRX_BI_F_NOPE_IND) + goto skip_burst; /* We're done with the header now */ buf_len -= hdr_len; @@ -1047,6 +1041,7 @@ if (rc < 0) return rc; +skip_burst: /* Print header & burst info */ LOGPPHI(l1h->phy_inst, DTRX, LOGL_DEBUG, "Rx %s (hdr_ver=%u): %s\n", (bi.flags & TRX_BI_F_NOPE_IND) ? "NOPE.ind" : "UL burst", -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Gerrit-Change-Number: 15989 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 13:21:29 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 13:21:29 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: cosmetic: fix typo in xua_accept_cb() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15987 ) Change subject: osmo_ss7.c: cosmetic: fix typo in xua_accept_cb() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15987 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Id925d09b9232b5e0124b977fa482e8cdc3c8b835 Gerrit-Change-Number: 15987 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 13:21:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 13:25:33 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 13:25:33 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: fix xua_accept_cb(): properly assign role In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 ) Change subject: osmo_ss7.c: fix xua_accept_cb(): properly assign role ...................................................................... Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15988/1/src/osmo_ss7.c File src/osmo_ss7.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15988/1/src/osmo_ss7.c at 1770 PS1, Line 1770: asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; Please move it sometwhere else, not between host[0] and host_cnt ;) And I think that's not correct. According to 1a822635f8e5a389aaae68d2d4fed3e310739129 we still may want the server to be role ASP right? -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib904ecf0e5d192a1024863f6f0fdf79301055655 Gerrit-Change-Number: 15988 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 13:25:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 13:31:53 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 6 Nov 2019 13:31:53 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: fix xua_accept_cb(): properly assign role In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 ) Change subject: osmo_ss7.c: fix xua_accept_cb(): properly assign role ...................................................................... Patch Set 1: As I mentioned in the commit message, I am not sure if this is the right solution. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib904ecf0e5d192a1024863f6f0fdf79301055655 Gerrit-Change-Number: 15988 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 13:31:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 13:33:22 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 13:33:22 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: general handling of NOPE / IDLE indications In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15989 ) Change subject: osmo-bts-trx: general handling of NOPE / IDLE indications ...................................................................... Patch Set 1: (1 comment) Are you sure it makes sense to have a specific function for IDLE/NOPE burst indications? afaik we don't have that in other osmo-bts models... I'd expect to have them sent over usual UL path and then for each specific logical channel do whatever based on it being IDLE or not (for instance lost TCH frames have len=0 but still are sent to increase the RTP clock). In any case I'd wait to merge this until there's someone using that new fn callback you are adding... https://gerrit.osmocom.org/c/osmo-bts/+/15989/1/src/common/scheduler.c File src/common/scheduler.c: https://gerrit.osmocom.org/c/osmo-bts/+/15989/1/src/common/scheduler.c at 1363 PS1, Line 1363: /* omit bursts which have no handler, like IDLE bursts */ In here it says it will return on IDLE bursts, but are adding code below this point to handle them... -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Gerrit-Change-Number: 15989 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 13:33:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 13:36:03 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 13:36:03 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: cosmetic: fix typo in xua_accept_cb() In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15987 ) Change subject: osmo_ss7.c: cosmetic: fix typo in xua_accept_cb() ...................................................................... osmo_ss7.c: cosmetic: fix typo in xua_accept_cb() Change-Id: Id925d09b9232b5e0124b977fa482e8cdc3c8b835 --- M src/osmo_ss7.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index fa6a338..1b9e3d1 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1760,7 +1760,7 @@ char portbuf[16]; osmo_sock_get_ip_and_port(fd, hostbuf, sizeof(hostbuf), portbuf, sizeof(portbuf), false); - LOGP(DLSS7, LOGL_INFO, "%s: created dynamicASP %s\n", + LOGP(DLSS7, LOGL_INFO, "%s: created dynamic ASP %s\n", sock_name, asp->cfg.name); asp->cfg.is_server = true; asp->cfg.local.host[0] = NULL; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15987 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Id925d09b9232b5e0124b977fa482e8cdc3c8b835 Gerrit-Change-Number: 15987 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 14:05:46 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 6 Nov 2019 14:05:46 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: fix copy-paste error in xua_accept_cb() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15990 ) Change subject: osmo_ss7.c: fix copy-paste error in xua_accept_cb() ...................................................................... osmo_ss7.c: fix copy-paste error in xua_accept_cb() Change-Id: I3d991849459378b35a5b4f248cc208f956e494be --- M src/osmo_ss7.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/90/15990/1 diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 38b21ef..7ff3efe 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1765,7 +1765,7 @@ asp->cfg.is_server = true; asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; asp->cfg.local.host[0] = NULL; - asp->cfg.remote.host_cnt = 1; + asp->cfg.local.host_cnt = 1; asp->cfg.remote.port = atoi(portbuf); asp->cfg.remote.host[0] = talloc_strdup(asp, hostbuf); asp->cfg.remote.host_cnt = 1; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15990 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I3d991849459378b35a5b4f248cc208f956e494be Gerrit-Change-Number: 15990 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 14:07:56 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 14:07:56 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: fix copy-paste error in xua_accept_cb() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15990 ) Change subject: osmo_ss7.c: fix copy-paste error in xua_accept_cb() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15990 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I3d991849459378b35a5b4f248cc208f956e494be Gerrit-Change-Number: 15990 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Wed, 06 Nov 2019 14:07:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 14:19:33 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 6 Nov 2019 14:19:33 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: general handling of NOPE / IDLE indications In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15989 ) Change subject: osmo-bts-trx: general handling of NOPE / IDLE indications ...................................................................... Patch Set 1: (1 comment) > Are you sure it makes sense to have a specific function for IDLE/NOPE burst indications? Well, we don't really need this feature for the most logical channels. It's only required for those which change their state. For example, both TCH/F and TCH/H handlers need to shift the burst buffer due to block-diagonal interleaving. We may also want to avoid involving the Viterbi decoding when at least one TCH burst is lost, while for xCCH we can still try (because its redundancy is much higher). > afaik we don't have that in other osmo-bts models... Of course. Other BTS models deal with bursts internally, so you only get L2 frames from them. https://gerrit.osmocom.org/c/osmo-bts/+/15989/1/src/common/scheduler.c File src/common/scheduler.c: https://gerrit.osmocom.org/c/osmo-bts/+/15989/1/src/common/scheduler.c at 1363 PS1, Line 1363: /* omit bursts which have no handler, like IDLE bursts */ > In here it says it will return on IDLE bursts, but are adding code below this point to handle them.. [?] '... like IDLE bursts' is just an example meaning that TRXC_IDLE has no Uplink burst handler. Both SCH and FCCH also have no Uplink handlers, neither they exist on the Uplink part of the multiframe layouts. This comment is a bit misleading. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Gerrit-Change-Number: 15989 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 14:19:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 15:06:07 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 6 Nov 2019 15:06:07 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: fix copy-paste error in xua_accept_cb() In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15990 ) Change subject: osmo_ss7.c: fix copy-paste error in xua_accept_cb() ...................................................................... osmo_ss7.c: fix copy-paste error in xua_accept_cb() Change-Id: I3d991849459378b35a5b4f248cc208f956e494be --- M src/osmo_ss7.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 1b9e3d1..77e8f72 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1764,7 +1764,7 @@ sock_name, asp->cfg.name); asp->cfg.is_server = true; asp->cfg.local.host[0] = NULL; - asp->cfg.remote.host_cnt = 1; + asp->cfg.local.host_cnt = 1; asp->cfg.remote.port = atoi(portbuf); asp->cfg.remote.host[0] = talloc_strdup(asp, hostbuf); asp->cfg.remote.host_cnt = 1; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15990 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I3d991849459378b35a5b4f248cc208f956e494be Gerrit-Change-Number: 15990 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 15:06:29 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 6 Nov 2019 15:06:29 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: fix xua_accept_cb(): properly assign role In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 ) Change subject: osmo_ss7.c: fix xua_accept_cb(): properly assign role ...................................................................... Patch Set 3: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib904ecf0e5d192a1024863f6f0fdf79301055655 Gerrit-Change-Number: 15988 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 06 Nov 2019 15:06:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 15:14:21 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 15:14:21 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: fix xua_accept_cb(): properly assign role In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 ) Change subject: osmo_ss7.c: fix xua_accept_cb(): properly assign role ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib904ecf0e5d192a1024863f6f0fdf79301055655 Gerrit-Change-Number: 15988 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 15:14:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 15:25:02 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 15:25:02 +0000 Subject: Change in libosmo-sccp[master]: xua: Reset AS traffic mode set by peer during shutdown References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15991 ) Change subject: xua: Reset AS traffic mode set by peer during shutdown ...................................................................... xua: Reset AS traffic mode set by peer during shutdown This way the AS can be configured to use different traffic modes over time as long as they don't overlap in time. That is in this case where no specific traffic mode is specified in AS local configuration (VTY). Some RFC4666 state similar behvor of deleting data set by ASPs during AS shutdown. For instance: """ Other ASPs may continue to be associated with the Application Server, in which case the Routing Key data SHOULD NOT be deleted. If a Deregistration results in no more ASPs in an Application Server, an SG MAY delete the Routing Key data. """ This allows for tests to easily re-use same AS to test different traffic modes as long as they wait for the recovery timeout (2 secs by default, configurable via VTY). Related: OS#4220 Change-Id: I370aa3b5ddfc456c1be5b2585f2f470d5aa8d289 --- M src/xua_as_fsm.c 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/91/15991/1 diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index b0fbd2a..04e592c 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -252,6 +252,17 @@ case XUA_AS_S_PENDING: npar.status_info = M3UA_NOTIFY_I_AS_PEND; break; + case XUA_AS_S_DOWN: + /* RFC4666 sec 4.3.2 AS States: + If we end up here, it means no ASP is ACTIVE or INACTIVE, + meaning no ASP can have already configured the traffic mode + in ASPAC or REG REQ. Hence, we can clear traffic mode defined + by peers and allow next first peer to request a new traffic + mode. */ + as->cfg.mode_set_by_peer = false; + if (!as->cfg.mode_set_by_vty) + as->cfg.mode = OSMO_SS7_AS_TMOD_OVERRIDE; + return; default: return; } @@ -374,6 +385,7 @@ S(XUA_AS_S_INACTIVE), .name = "AS_DOWN", .action = xua_as_fsm_down, + .onenter = xua_as_fsm_onenter, }, [XUA_AS_S_INACTIVE] = { .in_event_mask = S(XUA_ASPAS_ASP_DOWN_IND) | -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15991 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I370aa3b5ddfc456c1be5b2585f2f470d5aa8d289 Gerrit-Change-Number: 15991 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 15:53:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 15:53:14 +0000 Subject: Change in libosmo-sccp[master]: xua: Reset AS traffic mode set by peer during shutdown In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15991 ) Change subject: xua: Reset AS traffic mode set by peer during shutdown ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15991 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I370aa3b5ddfc456c1be5b2585f2f470d5aa8d289 Gerrit-Change-Number: 15991 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 06 Nov 2019 15:53:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 15:53:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 15:53:15 +0000 Subject: Change in libosmo-sccp[master]: xua: Reset AS traffic mode set by peer during shutdown In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15991 ) Change subject: xua: Reset AS traffic mode set by peer during shutdown ...................................................................... xua: Reset AS traffic mode set by peer during shutdown This way the AS can be configured to use different traffic modes over time as long as they don't overlap in time. That is in this case where no specific traffic mode is specified in AS local configuration (VTY). Some RFC4666 state similar behvor of deleting data set by ASPs during AS shutdown. For instance: """ Other ASPs may continue to be associated with the Application Server, in which case the Routing Key data SHOULD NOT be deleted. If a Deregistration results in no more ASPs in an Application Server, an SG MAY delete the Routing Key data. """ This allows for tests to easily re-use same AS to test different traffic modes as long as they wait for the recovery timeout (2 secs by default, configurable via VTY). Related: OS#4220 Change-Id: I370aa3b5ddfc456c1be5b2585f2f470d5aa8d289 --- M src/xua_as_fsm.c 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index b0fbd2a..04e592c 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -252,6 +252,17 @@ case XUA_AS_S_PENDING: npar.status_info = M3UA_NOTIFY_I_AS_PEND; break; + case XUA_AS_S_DOWN: + /* RFC4666 sec 4.3.2 AS States: + If we end up here, it means no ASP is ACTIVE or INACTIVE, + meaning no ASP can have already configured the traffic mode + in ASPAC or REG REQ. Hence, we can clear traffic mode defined + by peers and allow next first peer to request a new traffic + mode. */ + as->cfg.mode_set_by_peer = false; + if (!as->cfg.mode_set_by_vty) + as->cfg.mode = OSMO_SS7_AS_TMOD_OVERRIDE; + return; default: return; } @@ -374,6 +385,7 @@ S(XUA_AS_S_INACTIVE), .name = "AS_DOWN", .action = xua_as_fsm_down, + .onenter = xua_as_fsm_onenter, }, [XUA_AS_S_INACTIVE] = { .in_event_mask = S(XUA_ASPAS_ASP_DOWN_IND) | -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15991 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I370aa3b5ddfc456c1be5b2585f2f470d5aa8d289 Gerrit-Change-Number: 15991 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 15:53:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 15:53:58 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: fix xua_accept_cb(): properly assign role In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 ) Change subject: osmo_ss7.c: fix xua_accept_cb(): properly assign role ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib904ecf0e5d192a1024863f6f0fdf79301055655 Gerrit-Change-Number: 15988 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 15:53:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 15:54:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 6 Nov 2019 15:54:00 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7.c: fix xua_accept_cb(): properly assign role In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 ) Change subject: osmo_ss7.c: fix xua_accept_cb(): properly assign role ...................................................................... osmo_ss7.c: fix xua_accept_cb(): properly assign role Most likely, we want all dynamically allocated ASPs to play the SG role by default. Otherwise when using the following configuration: cs7 instance 0 xua rkm routing-key-allocation dynamic-permitted listen m3ua 2905 accept-asp-connections dynamic-permitted both OsmoMSC and OsmoBSC fail to establish connections. Change-Id: Ib904ecf0e5d192a1024863f6f0fdf79301055655 Fixes: I2df9cd9747ad5c9a05d567d9a71bab6184c53674 Related: OS#4247 --- M src/osmo_ss7.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 77e8f72..7ff3efe 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1763,6 +1763,7 @@ LOGP(DLSS7, LOGL_INFO, "%s: created dynamic ASP %s\n", sock_name, asp->cfg.name); asp->cfg.is_server = true; + asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; asp->cfg.local.host[0] = NULL; asp->cfg.local.host_cnt = 1; asp->cfg.remote.port = atoi(portbuf); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib904ecf0e5d192a1024863f6f0fdf79301055655 Gerrit-Change-Number: 15988 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 17:46:48 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 17:46:48 +0000 Subject: Change in libosmo-sccp[master]: xua: Select only active ASPs during tx in Override traffic mode References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15992 ) Change subject: xua: Select only active ASPs during tx in Override traffic mode ...................................................................... xua: Select only active ASPs during tx in Override traffic mode Change-Id: I7eb049011b81c5141fd3edf6f0ae0202ffb2c6c9 --- M src/xua_as_fsm.c 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/92/15992/1 diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 04e592c..5d0b327 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -83,9 +83,7 @@ /* FIXME: proper selection of the ASP based on the SLS! */ for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { asp = as->cfg.asps[i]; - if (!asp) - continue; - if (asp) + if (asp && osmo_ss7_asp_active(asp)) break; } return asp; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I7eb049011b81c5141fd3edf6f0ae0202ffb2c6c9 Gerrit-Change-Number: 15992 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 17:46:49 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 17:46:49 +0000 Subject: Change in libosmo-sccp[master]: xua: On new ASPAC, set and notify other ASPs as inactive References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15993 ) Change subject: xua: On new ASPAC, set and notify other ASPs as inactive ...................................................................... xua: On new ASPAC, set and notify other ASPs as inactive RFC4666 sec 4.3.4.3. ASP Active Procedures: """ In the case of an Override mode AS, receipt of an ASP Active message at an SGP causes the (re)direction of all traffic for the AS to the ASP that sent the ASP Active message. Any previously active ASP in the AS is now considered to be in the state ASP-INACTIVE and SHOULD no longer receive traffic from the SGP within the AS. The SGP or IPSP then MUST send a Notify message ("Alternate ASP_Active") to the previously active ASP in the AS and SHOULD stop traffic to/from that ASP. The ASP receiving this Notify MUST consider itself now in the ASP-INACTIVE state, if it is not already aware of this via inter-ASP communication with the Overriding ASP. """ Change-Id: I474f5cc1f6cbab72d010d1f8ac7ed2285e4c1c45 --- M src/xua_as_fsm.c 1 file changed, 35 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/93/15993/1 diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 5d0b327..c25902e 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -211,6 +211,37 @@ return false; } +/* Tell other previously-active ASPs that a new ASP has been activated and mark + them as inactive. Used in override mode when an ASP becomes active. */ +static void notify_any_other_active_asp_as_inactive(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp_cmp) +{ + unsigned int i; + struct msgb *msg; + struct osmo_xlm_prim_notify npar = { + .status_type = M3UA_NOTIFY_T_OTHER, + .status_info = M3UA_NOTIFY_I_OT_ALT_ASP_ACT, + }; + + if (asp_cmp->asp_id_present) + npar.asp_id = asp_cmp->asp_id; + + for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + struct osmo_ss7_asp *asp = as->cfg.asps[i]; + if (!asp || !osmo_ss7_asp_active(asp)) + continue; + + if (asp_cmp == asp) + continue; + + msg = encode_notify(&npar); + osmo_ss7_asp_send(asp, msg); + + osmo_fsm_inst_state_chg(asp->fi, XUA_ASP_S_INACTIVE, 0, 0); + } + + return; +} + static void t_r_callback(void *_fi) { struct osmo_fsm_inst *fi = _fi; @@ -321,7 +352,10 @@ } break; case XUA_ASPAS_ASP_ACTIVE_IND: - /* ignore */ + asp = data; + /* RFC466 sec 4.3.4.3 ASP Active Procedures*/ + if (xafp->as->cfg.mode == OSMO_SS7_AS_TMOD_OVERRIDE) + notify_any_other_active_asp_as_inactive(xafp->as, asp); break; case XUA_AS_E_TRANSFER_REQ: /* message for transmission */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15993 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I474f5cc1f6cbab72d010d1f8ac7ed2285e4c1c45 Gerrit-Change-Number: 15993 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 18:02:54 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 6 Nov 2019 18:02:54 +0000 Subject: Change in libosmo-sccp[master]: tests/sccp/Makefile.am: use sccp.o from $(top_builddir) References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15994 ) Change subject: tests/sccp/Makefile.am: use sccp.o from $(top_builddir) ...................................................................... tests/sccp/Makefile.am: use sccp.o from $(top_builddir) This change suspends the warnings about option 'subdir-objects', by using the existing object file from the build directory. Change-Id: I4dc2abb19c58fce0a12cc9799019878194c667d1 --- M tests/sccp/Makefile.am 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/94/15994/1 diff --git a/tests/sccp/Makefile.am b/tests/sccp/Makefile.am index 8cce20c..85dbe64 100644 --- a/tests/sccp/Makefile.am +++ b/tests/sccp/Makefile.am @@ -5,6 +5,9 @@ noinst_PROGRAMS = sccp_test -sccp_test_SOURCES = sccp_test.c $(top_srcdir)/src/sccp.c -sccp_test_LDADD = $(LIBOSMOCORE_LIBS) +sccp_test_SOURCES = sccp_test.c +sccp_test_LDADD = \ + $(LIBOSMOCORE_LIBS) \ + $(top_builddir)/src/sccp.o \ + $(NULL) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15994 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4dc2abb19c58fce0a12cc9799019878194c667d1 Gerrit-Change-Number: 15994 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 18:24:13 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 6 Nov 2019 18:24:13 +0000 Subject: Change in libosmo-sccp[master]: tests/sccp/Makefile.am: use sccp.o from $(top_builddir) In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15994 ) Change subject: tests/sccp/Makefile.am: use sccp.o from $(top_builddir) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15994 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4dc2abb19c58fce0a12cc9799019878194c667d1 Gerrit-Change-Number: 15994 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 06 Nov 2019 18:24:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 6 19:52:37 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 6 Nov 2019 19:52:37 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 ) Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 --- M src/osmo_ss7_vty.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/95/15995/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 35640df..f70ee52 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1096,7 +1096,8 @@ continue; if (filter && !strcmp(filter, "sua") && as->cfg.proto != OSMO_SS7_ASP_PROT_SUA) continue; - /* FIXME: active filter */ + if (filter && !strcmp(filter, "active") && as->fi.state != XUA_AS_S_ACTIVE) + continue; vty_out(vty, "%-12s %-12s %-10u %-13s %4s %13s %3s %5s %4s %10s%s", as->cfg.name, osmo_fsm_inst_state_name(as->fi), as->cfg.routing_key.context, osmo_ss7_pointcode_print(as->inst, as->cfg.routing_key.pc), -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Thu Nov 7 08:09:52 2019 From: admin at opensuse.org (OBS Notification) Date: Thu, 07 Nov 2019 08:09:52 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5dc3d160615bf_36382b0c6774c5f417515b@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 269s] | #define STDC_HEADERS 1 [ 269s] | #define HAVE_SYS_TYPES_H 1 [ 269s] | #define HAVE_SYS_STAT_H 1 [ 269s] | #define HAVE_STDLIB_H 1 [ 269s] | #define HAVE_STRING_H 1 [ 269s] | #define HAVE_MEMORY_H 1 [ 269s] | #define HAVE_STRINGS_H 1 [ 269s] | #define HAVE_INTTYPES_H 1 [ 269s] | #define HAVE_STDINT_H 1 [ 269s] | #define HAVE_UNISTD_H 1 [ 269s] | #define HAVE_DLFCN_H 1 [ 269s] | #define LT_OBJDIR ".libs/" [ 269s] | #define PACKAGE "osmo-hlr" [ 269s] | #define VERSION "1.1.0.10-5b65" [ 269s] | #define STDC_HEADERS 1 [ 269s] | [ 269s] | configure: exit 0 [ 269s] [ 269s] # -*- compilation -*- [ 269s] 6. testsuite.at:40: testing db_upgrade ... [ 269s] ./testsuite.at:44: $abs_srcdir/db_upgrade/db_upgrade_test.sh $abs_srcdir/db_upgrade $abs_builddir/db_upgrade [ 269s] --- experr 2019-11-07 08:09:35.216885885 +0000 [ 269s] +++ /usr/src/packages/BUILD/tests/testsuite.dir/at-groups/6/stderr 2019-11-07 08:09:35.236885886 +0000 [ 272s] @@ -0,0[ 247.842290] sysrq: SysRq : Power Off [ 272s] [ 247.846922] reboot: Power down [ 272s] ### VM INTERACTION END ### [ 272s] [ 272s] cloud103 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Thu Nov 7 08:09:39 UTC 2019. [ 272s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 7 08:12:25 2019 From: admin at opensuse.org (OBS Notification) Date: Thu, 07 Nov 2019 08:12:25 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5dc3d1f4c08d6_36382b0c6774c5f4175484@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/i586 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 258s] -subscriber_id|INTEGER|0||0 [ 258s] - [ 258s] -Table subscriber_multi_msisdn contents: [ 258s] - [ 258s] -Verify that osmo-hlr can open it: [ 258s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 258s] -rc = 0 [ 258s] -DMAIN hlr starting [ 258s] -DDB using database: test.db [ 258s] -DDB Database test.db' has HLR DB schema version 2 [ 258s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 258s] ./testsuite.at:44: exit code was 1, expected 0 [ 258s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 258s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 258s] make[1]: *** [override_dh_auto_test] Error 1 [ 258s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 258s] debian/rules:7: recipe for target 'build' failed [ 258s] make: *** [build] Error 2 [ 258s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 258s] [ 258s] lamb59 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Thu Nov 7 08:11:37 UTC 2019. [ 258s] [ 258s] ### VM INTERACTION START ### [ 259s] Powering off. [ 259s] [ 244.177567] reboot: Power down [ 259s] ### VM INTERACTION END ### [ 259s] [ 259s] lamb59 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Thu Nov 7 08:11:39 UTC 2019. [ 259s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 7 08:12:42 2019 From: admin at opensuse.org (OBS Notification) Date: Thu, 07 Nov 2019 08:12:42 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5dc3d213eb5cc_36382b0c6774c5f41756f9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 185s] | #define HAVE_MEMORY_H 1 [ 185s] | #define HAVE_STRINGS_H 1 [ 185s] | #define HAVE_INTTYPES_H 1 [ 185s] | #define HAVE_STDINT_H 1 [ 185s] | #define HAVE_UNISTD_H 1 [ 185s] | #define HAVE_DLFCN_H 1 [ 185s] | #define LT_OBJDIR ".libs/" [ 185s] | #define PACKAGE "osmo-hlr" [ 185s] | #define VERSION "1.1.0.10-5b65" [ 185s] | #define STDC_HEADERS 1 [ 185s] | [ 185s] | configure: exit 0 [ 185s] [ 185s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 185s] make[1]: *** [override_dh_auto_test] Error 1 [ 185s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 185s] debian/rules:7: recipe for target 'build' failed [ 185s] make: *** [build] Error 2 [ 185s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 185s] [ 185s] lamb14 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Thu Nov 7 08:11:52 UTC 2019. [ 185s] [ 185s] ### VM INTERACTION START ### [ 186s] Powering off. [ 186s] [ 173.385087] reboot: Power down [ 187s] ### VM INTERACTION END ### [ 187s] [ 187s] lamb14 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Thu Nov 7 08:11:54 UTC 2019. [ 187s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Thu Nov 7 08:13:00 2019 From: admin at opensuse.org (OBS Notification) Date: Thu, 07 Nov 2019 08:13:00 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5dc3d2151ecd9_36382b0c6774c5f417571f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 196s] -subscriber_id|INTEGER|0||0 [ 196s] - [ 196s] -Table subscriber_multi_msisdn contents: [ 196s] - [ 196s] -Verify that osmo-hlr can open it: [ 196s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 196s] -rc = 0 [ 196s] -DMAIN hlr starting [ 196s] -DDB using database: test.db [ 196s] -DDB Database test.db' has HLR DB schema version 2 [ 196s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 196s] ./testsuite.at:44: exit code was 1, expected 0 [ 196s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 196s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 196s] make[1]: *** [override_dh_auto_test] Error 1 [ 196s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 196s] debian/rules:7: recipe for target 'build' failed [ 196s] make: *** [build] Error 2 [ 196s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 196s] [ 196s] lamb11 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Thu Nov 7 08:12:03 UTC 2019. [ 196s] [ 196s] ### VM INTERACTION START ### [ 198s] [ 185.322231] sysrq: SysRq : Power Off [ 198s] [ 185.329531] reboot: Power down [ 198s] ### VM INTERACTION END ### [ 198s] [ 198s] lamb11 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Thu Nov 7 08:12:07 UTC 2019. [ 198s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Thu Nov 7 08:54:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 08:54:37 +0000 Subject: Change in libosmo-abis[master]: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/15996 ) Change subject: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u ...................................................................... dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u It appears that opening "/dev/dahdi/channel" and using ioctl(DAHDI_SPECIFY) is possible at least since dahdi 2.4 (from 2010), and opening "/dev/dahdi/%u" has been deprecated ever since. One advantage of the new interface is that you can use channel numbers larger than 250, which is quite easily possible if you have more than eight E1 lines on a system. It also makes libosmo-abis work on systems where there are no udev rules for creating the legacy device nodes. Change-Id: Id6c8f27d7ae948b50e9cf5a38f039d782ff78e1d --- M src/input/dahdi.c 1 file changed, 35 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/96/15996/1 diff --git a/src/input/dahdi.c b/src/input/dahdi.c index 47276a7..6594eea 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -1,6 +1,6 @@ /* OpenBSC Abis input driver for DAHDI */ -/* (C) 2008-2011 by Harald Welte +/* (C) 2008-2019 by Harald Welte * (C) 2009 by Holger Hans Peter Freyther * (C) 2010 by Digium and Matthew Fredrickson * @@ -603,6 +603,33 @@ return 0; } +static int dahdi_open_slot(int dahdi_chan_nr) +{ + int rc, fd; +#ifndef DAHDI_SPECIFY + char openstr[128]; + snprintf(openstr, sizeof(openstr), "/dev/dahdi/%d", dev_nr); +#else + const char *openstr = "/dev/dahdi/channel"; +#endif + rc = open(openstr, O_RDWR | O_NONBLOCK); + if (rc < 0) { + LOGP(DLINP, LOGL_ERROR, "DAHDI: could not open %s %s\n", openstr, strerror(errno)); + return -EIO; + } + fd = rc; +#ifdef DAHDI_SPECIFY + rc = ioctl(fd, DAHDI_SPECIFY, &dahdi_chan_nr); + if (rc < 0) { + close(fd); + LOGP(DLINP, LOGL_ERROR, "DAHDI: could not DAHDI_SPECIFY %d: %s\n", + dahdi_chan_nr, strerror(errno)); + return -EIO; + } +#endif + return fd; +} + static int dahdi_e1_setup(struct e1inp_line *line) { struct span_cfg *scfg; @@ -623,7 +650,6 @@ /* TS0 is CRC4, don't need any fd for it */ for (ts = 1; ts <= scfg->chan_num; ts++) { unsigned int idx = ts-1; - char openstr[128]; struct e1inp_ts *e1i_ts = &line->ts[idx]; struct osmo_fd *bfd = &e1i_ts->driver.dahdi.fd; int dev_nr; @@ -640,7 +666,6 @@ bfd->data = line; bfd->priv_nr = ts; bfd->cb = dahdi_fd_cb; - snprintf(openstr, sizeof(openstr), "/dev/dahdi/%d", dev_nr); switch (e1i_ts->type) { case E1INP_TS_TYPE_NONE: @@ -657,13 +682,9 @@ break; case E1INP_TS_TYPE_SIGN: if (!bfd->fd) - bfd->fd = open(openstr, O_RDWR | O_NONBLOCK); - if (bfd->fd == -1) { - LOGP(DLINP, LOGL_ERROR, - "%s could not open %s %s\n", - __func__, openstr, strerror(errno)); + bfd->fd = dahdi_open_slot(dev_nr); + if (bfd->fd < 0) return -EIO; - } bfd->when = BSC_FD_READ | BSC_FD_EXCEPT; ret = dahdi_set_bufinfo(bfd->fd, 1); if (ret < 0) @@ -676,13 +697,9 @@ break; case E1INP_TS_TYPE_HDLC: if (!bfd->fd) - bfd->fd = open(openstr, O_RDWR | O_NONBLOCK); - if (bfd->fd == -1) { - LOGP(DLINP, LOGL_ERROR, - "%s could not open %s %s\n", - __func__, openstr, strerror(errno)); + bfd->fd = dahdi_open_slot(dev_nr); + if (bfd->fd < 0) return -EIO; - } bfd->when = BSC_FD_READ | BSC_FD_EXCEPT; ret = dahdi_set_bufinfo(bfd->fd, 1); if (ret < 0) @@ -696,13 +713,9 @@ e1i_ts->lapd = NULL; } if (!bfd->fd) - bfd->fd = open(openstr, O_RDWR | O_NONBLOCK); - if (bfd->fd == -1) { - LOGP(DLINP, LOGL_ERROR, - "%s could not open %s %s\n", - __func__, openstr, strerror(errno)); + bfd->fd = dahdi_open_slot(dev_nr); + if (bfd->fd < 0) return -EIO; - } ret = dahdi_set_bufinfo(bfd->fd, 0); if (ret < 0) return -EIO; @@ -713,12 +726,8 @@ break; } - if (bfd->fd < 0) { - LOGP(DLINP, LOGL_ERROR, - "%s could not open %s %s\n", - __func__, openstr, strerror(errno)); + if (bfd->fd < 0) return bfd->fd; - } ret = osmo_fd_register(bfd); if (ret < 0) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/15996 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id6c8f27d7ae948b50e9cf5a38f039d782ff78e1d Gerrit-Change-Number: 15996 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 09:40:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 09:40:11 +0000 Subject: Change in libosmocore[master]: select: Make file descriptor lists per-thread In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13537 ) Change subject: select: Make file descriptor lists per-thread ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/13537 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5082ed3e500ad1a7516e1785bc57e008da2fac9a Gerrit-Change-Number: 13537 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 09:40:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 09:40:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 09:40:29 +0000 Subject: Change in libosmocore[master]: select: Make file descriptor lists per-thread In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13537 ) Change subject: select: Make file descriptor lists per-thread ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/13537 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5082ed3e500ad1a7516e1785bc57e008da2fac9a Gerrit-Change-Number: 13537 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 09:40:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 09:40:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 09:40:32 +0000 Subject: Change in libosmocore[master]: select: Make file descriptor lists per-thread In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13537 ) Change subject: select: Make file descriptor lists per-thread ...................................................................... select: Make file descriptor lists per-thread In a multi-threaded environemnt, it's likely that each thread will have its own, distinct set of file descriptors that it wants to watch. Hence, let's make the osmo_fd_* functions configure not one global list of file descriptors, but a thread-local list of file descriptors. Change-Id: I5082ed3e500ad1a7516e1785bc57e008da2fac9a --- M include/osmocom/core/select.h M src/select.c 2 files changed, 18 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve diff --git a/include/osmocom/core/select.h b/include/osmocom/core/select.h index a200b6f..92904e2 100644 --- a/include/osmocom/core/select.h +++ b/include/osmocom/core/select.h @@ -52,6 +52,7 @@ void osmo_fd_close(struct osmo_fd *fd); int osmo_select_main(int polling); int osmo_select_main_ctx(int polling); +void osmo_select_init(void); struct osmo_fd *osmo_fd_get_by_fd(int fd); diff --git a/src/select.c b/src/select.c index 394a59d..b997122 100644 --- a/src/select.c +++ b/src/select.c @@ -50,9 +50,11 @@ * * \file select.c */ -static int maxfd = 0; -static LLIST_HEAD(osmo_fds); -static int unregistered_count; +/* keep a set of file descriptors per-thread, so that each thread can have its own + * distinct set of file descriptors to interact with */ +static __thread int maxfd = 0; +static __thread struct llist_head osmo_fds; /* TLS cannot use LLIST_HEAD() */ +static __thread int unregistered_count; /*! Set up an osmo-fd. Will not register it. * \param[inout] ofd Osmo FD to be set-up @@ -307,6 +309,18 @@ return NULL; } +/*! initialize the osmocom select abstraction for the current thread */ +void osmo_select_init(void) +{ + INIT_LLIST_HEAD(&osmo_fds); +} + +/* ensure main thread always has pre-initialized osmo_fds */ +static __attribute__((constructor)) void on_dso_load_select(void) +{ + osmo_select_init(); +} + #ifdef HAVE_SYS_TIMERFD_H #include -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/13537 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5082ed3e500ad1a7516e1785bc57e008da2fac9a Gerrit-Change-Number: 13537 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 11:37:21 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 11:37:21 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 ) Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15995/1/src/osmo_ss7_vty.c File src/osmo_ss7_vty.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15995/1/src/osmo_ss7_vty.c at 1099 PS1, Line 1099: if (filter && !strcmp(filter, "active") && as->fi.state != XUA_AS_S_ACTIVE) Use !osmo_ss7_asp_active(as) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 11:37:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 11:40:32 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 11:40:32 +0000 Subject: Change in libosmo-abis[master]: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/15996 ) Change subject: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/libosmo-abis/+/15996/1/src/input/dahdi.c File src/input/dahdi.c: https://gerrit.osmocom.org/c/libosmo-abis/+/15996/1/src/input/dahdi.c at 609 PS1, Line 609: #ifndef DAHDI_SPECIFY What about simply checking if /dev/dahdi/channel exists and ioctl succeeds, and otherwise open /dev/dahdi/%d ? This way both ways are supported. -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/15996 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id6c8f27d7ae948b50e9cf5a38f039d782ff78e1d Gerrit-Change-Number: 15996 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 11:40:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 11:40:32 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 11:40:32 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 to look at the new patch set (#2). Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 --- M src/osmo_ss7_vty.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/95/15995/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 11:41:32 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 11:41:32 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 ) Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... Patch Set 2: Thanks Pau! Somehow I missed that function. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 11:41:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 11:43:43 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 11:43:43 +0000 Subject: Change in libosmocore[master]: select: Make file descriptor lists per-thread In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13537 ) Change subject: select: Make file descriptor lists per-thread ...................................................................... Patch Set 5: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/13537/5/src/select.c File src/select.c: https://gerrit.osmocom.org/c/libosmocore/+/13537/5/src/select.c at 321 PS5, Line 321: osmo_select_init(); Does that mean that now threads different than main one have to call osmo_select_init() manually? I wouldn't expect constructor to be called for each thread created. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/13537 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5082ed3e500ad1a7516e1785bc57e008da2fac9a Gerrit-Change-Number: 13537 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 11:43:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 11:46:24 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 11:46:24 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 ) Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15995/2/src/osmo_ss7_vty.c File src/osmo_ss7_vty.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15995/2/src/osmo_ss7_vty.c at 1099 PS2, Line 1099: if (filter && !strcmp(filter, "active") && !osmo_ss7_asp_active(as)) Ah sorry, it's an as, not an asp ;) Then you need to use the fi->state (or add a similar function). -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 11:46:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 12:13:36 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 12:13:36 +0000 Subject: Change in osmo-remsim[master]: bankd_client_fsm: close IPA client connection before re-establishing it References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/15997 ) Change subject: bankd_client_fsm: close IPA client connection before re-establishing it ...................................................................... bankd_client_fsm: close IPA client connection before re-establishing it ipa_client_conn_destroy() really only destroys the object, but not close the underlying file descriptor. This leads to old connections lingering around, which in turn (in case of the remsim client) will occupy banksim worker threads. Change-Id: If87f4bbc133e4dc812fa96a75e8495bad65275aa --- M src/bankd_client_fsm.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/97/15997/1 diff --git a/src/bankd_client_fsm.c b/src/bankd_client_fsm.c index 8cc773a..cedb597 100644 --- a/src/bankd_client_fsm.c +++ b/src/bankd_client_fsm.c @@ -152,6 +152,7 @@ /* re-create bankd_conn */ if (bc->bankd_conn) { LOGPFSML(fi, LOGL_INFO, "Destroying existing connection to bankd\n"); + ipa_client_conn_close(bc->bankd_conn); ipa_client_conn_destroy(bc->bankd_conn); bc->bankd_conn = NULL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/15997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: If87f4bbc133e4dc812fa96a75e8495bad65275aa Gerrit-Change-Number: 15997 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 13:36:38 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 13:36:38 +0000 Subject: Change in libosmo-sccp[master]: xua: Select only active ASPs during tx in Override traffic mode In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15992 ) Change subject: xua: Select only active ASPs during tx in Override traffic mode ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I7eb049011b81c5141fd3edf6f0ae0202ffb2c6c9 Gerrit-Change-Number: 15992 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 07 Nov 2019 13:36:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 13:37:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 13:37:01 +0000 Subject: Change in libosmo-sccp[master]: xua: On new ASPAC, set and notify other ASPs as inactive In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15993 ) Change subject: xua: On new ASPAC, set and notify other ASPs as inactive ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15993 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I474f5cc1f6cbab72d010d1f8ac7ed2285e4c1c45 Gerrit-Change-Number: 15993 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 07 Nov 2019 13:37:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 13:37:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 13:37:02 +0000 Subject: Change in libosmo-sccp[master]: xua: Select only active ASPs during tx in Override traffic mode In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15992 ) Change subject: xua: Select only active ASPs during tx in Override traffic mode ...................................................................... xua: Select only active ASPs during tx in Override traffic mode Change-Id: I7eb049011b81c5141fd3edf6f0ae0202ffb2c6c9 --- M src/xua_as_fsm.c 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 04e592c..5d0b327 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -83,9 +83,7 @@ /* FIXME: proper selection of the ASP based on the SLS! */ for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { asp = as->cfg.asps[i]; - if (!asp) - continue; - if (asp) + if (asp && osmo_ss7_asp_active(asp)) break; } return asp; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I7eb049011b81c5141fd3edf6f0ae0202ffb2c6c9 Gerrit-Change-Number: 15992 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 13:37:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 13:37:02 +0000 Subject: Change in libosmo-sccp[master]: xua: On new ASPAC, set and notify other ASPs as inactive In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15993 ) Change subject: xua: On new ASPAC, set and notify other ASPs as inactive ...................................................................... xua: On new ASPAC, set and notify other ASPs as inactive RFC4666 sec 4.3.4.3. ASP Active Procedures: """ In the case of an Override mode AS, receipt of an ASP Active message at an SGP causes the (re)direction of all traffic for the AS to the ASP that sent the ASP Active message. Any previously active ASP in the AS is now considered to be in the state ASP-INACTIVE and SHOULD no longer receive traffic from the SGP within the AS. The SGP or IPSP then MUST send a Notify message ("Alternate ASP_Active") to the previously active ASP in the AS and SHOULD stop traffic to/from that ASP. The ASP receiving this Notify MUST consider itself now in the ASP-INACTIVE state, if it is not already aware of this via inter-ASP communication with the Overriding ASP. """ Change-Id: I474f5cc1f6cbab72d010d1f8ac7ed2285e4c1c45 --- M src/xua_as_fsm.c 1 file changed, 35 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 5d0b327..c25902e 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -211,6 +211,37 @@ return false; } +/* Tell other previously-active ASPs that a new ASP has been activated and mark + them as inactive. Used in override mode when an ASP becomes active. */ +static void notify_any_other_active_asp_as_inactive(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp_cmp) +{ + unsigned int i; + struct msgb *msg; + struct osmo_xlm_prim_notify npar = { + .status_type = M3UA_NOTIFY_T_OTHER, + .status_info = M3UA_NOTIFY_I_OT_ALT_ASP_ACT, + }; + + if (asp_cmp->asp_id_present) + npar.asp_id = asp_cmp->asp_id; + + for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + struct osmo_ss7_asp *asp = as->cfg.asps[i]; + if (!asp || !osmo_ss7_asp_active(asp)) + continue; + + if (asp_cmp == asp) + continue; + + msg = encode_notify(&npar); + osmo_ss7_asp_send(asp, msg); + + osmo_fsm_inst_state_chg(asp->fi, XUA_ASP_S_INACTIVE, 0, 0); + } + + return; +} + static void t_r_callback(void *_fi) { struct osmo_fsm_inst *fi = _fi; @@ -321,7 +352,10 @@ } break; case XUA_ASPAS_ASP_ACTIVE_IND: - /* ignore */ + asp = data; + /* RFC466 sec 4.3.4.3 ASP Active Procedures*/ + if (xafp->as->cfg.mode == OSMO_SS7_AS_TMOD_OVERRIDE) + notify_any_other_active_asp_as_inactive(xafp->as, asp); break; case XUA_AS_E_TRANSFER_REQ: /* message for transmission */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15993 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I474f5cc1f6cbab72d010d1f8ac7ed2285e4c1c45 Gerrit-Change-Number: 15993 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 13:37:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 13:37:39 +0000 Subject: Change in libosmo-sccp[master]: tests/sccp/Makefile.am: use sccp.o from $(top_builddir) In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15994 ) Change subject: tests/sccp/Makefile.am: use sccp.o from $(top_builddir) ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15994 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4dc2abb19c58fce0a12cc9799019878194c667d1 Gerrit-Change-Number: 15994 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 13:37:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 13:37:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 13:37:40 +0000 Subject: Change in libosmo-sccp[master]: tests/sccp/Makefile.am: use sccp.o from $(top_builddir) In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15994 ) Change subject: tests/sccp/Makefile.am: use sccp.o from $(top_builddir) ...................................................................... tests/sccp/Makefile.am: use sccp.o from $(top_builddir) This change suspends the warnings about option 'subdir-objects', by using the existing object file from the build directory. Change-Id: I4dc2abb19c58fce0a12cc9799019878194c667d1 --- M tests/sccp/Makefile.am 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/sccp/Makefile.am b/tests/sccp/Makefile.am index 8cce20c..85dbe64 100644 --- a/tests/sccp/Makefile.am +++ b/tests/sccp/Makefile.am @@ -5,6 +5,9 @@ noinst_PROGRAMS = sccp_test -sccp_test_SOURCES = sccp_test.c $(top_srcdir)/src/sccp.c -sccp_test_LDADD = $(LIBOSMOCORE_LIBS) +sccp_test_SOURCES = sccp_test.c +sccp_test_LDADD = \ + $(LIBOSMOCORE_LIBS) \ + $(top_builddir)/src/sccp.o \ + $(NULL) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15994 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4dc2abb19c58fce0a12cc9799019878194c667d1 Gerrit-Change-Number: 15994 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 13:38:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 13:38:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: update 'deps' to use M3UA libraries with proper NOTIFY support In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15820 ) Change subject: update 'deps' to use M3UA libraries with proper NOTIFY support ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15820 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ifb90c815adae8e30f57c188d1f9db6d6c77d199b Gerrit-Change-Number: 15820 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 13:38:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 13:38:18 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 7 Nov 2019 13:38:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: update 'deps' to use M3UA libraries with proper NOTIFY support In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15820 ) Change subject: update 'deps' to use M3UA libraries with proper NOTIFY support ...................................................................... update 'deps' to use M3UA libraries with proper NOTIFY support Change-Id: Ifb90c815adae8e30f57c188d1f9db6d6c77d199b --- M deps/Makefile 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/deps/Makefile b/deps/Makefile index ab41ac1..2d8f687 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -24,7 +24,6 @@ titan.ProtocolModules.IP \ titan.ProtocolModules.JSON_v07_2006 \ titan.ProtocolModules.L2TP \ - titan.ProtocolModules.M3UA \ titan.ProtocolModules.SMPP \ titan.ProtocolModules.TCP \ titan.ProtocolModules.UDP \ @@ -64,6 +63,7 @@ titan.ProtocolModules.LLC_v7.1.0 \ titan.ProtocolModules.SGsAP_13.2.0 \ titan.TestPorts.MTP3asp \ + titan.ProtocolModules.M3UA \ titan.ProtocolEmulations.M3UA OSMOGIT_REPOS= titan.ProtocolModules.MAP \ @@ -75,7 +75,7 @@ # In order to keep local changes in the repository of a dependency, set its commit to the # name of a local branch here (e.g. 'master'). titan.Libraries.TCCUsefulFunctions_commit= R.30.A -titan.ProtocolEmulations.M3UA_commit= R.2.A-6-ge2965cc +titan.ProtocolEmulations.M3UA_commit= 06b0f71a7d13fafc6f778974f6b4379ad87511ea titan.ProtocolEmulations.SCCP_commit= R.7.A-2-g724c83f titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A titan.ProtocolModules.BSSGP_v13.0.0_commit= R.2.A @@ -92,7 +92,7 @@ titan.ProtocolModules.LLC_v7.1.0_commit= 2a3c09fbf7bae22f802aa88689800f38a1f3732d titan.ProtocolModules.MAP_commit= R.2.A-1-g79c6a3d titan.ProtocolModules.M2PA_commit= R.2.A -titan.ProtocolModules.M3UA_commit= R.2.A +titan.ProtocolModules.M3UA_commit= 2544b6bdc76d18313a235fbfdaf0cac04ebdd603 titan.ProtocolModules.MobileL3_v13.4.0_commit= R.2.A titan.ProtocolModules.NAS_EPS_15.2.0.1_commit= 2ba853c7d197f7f39d97b76fca4726a7143fb4ad titan.ProtocolModules.NS_v7.3.0_commit= R.2.A -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15820 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ifb90c815adae8e30f57c188d1f9db6d6c77d199b Gerrit-Change-Number: 15820 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 13:56:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 13:56:55 +0000 Subject: Change in docker-playground[master]: ttcn3-stp/Makefile: Set branch to laforge/stp only if envvar not set References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/15998 ) Change subject: ttcn3-stp/Makefile: Set branch to laforge/stp only if envvar not set ...................................................................... ttcn3-stp/Makefile: Set branch to laforge/stp only if envvar not set Change-Id: I1f4061f2b1d62e6a42af4629ce462269cfaf317f --- M ttcn3-stp-test/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/98/15998/1 diff --git a/ttcn3-stp-test/Makefile b/ttcn3-stp-test/Makefile index 76fdbfc..4bf2fff 100644 --- a/ttcn3-stp-test/Makefile +++ b/ttcn3-stp-test/Makefile @@ -1,4 +1,4 @@ RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.2.202 -v ggsn-test-vol:/data -OSMO_TTCN3_BRANCH="laforge/stp" +OSMO_TTCN3_BRANCH?="laforge/stp" include ../make/Makefile -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15998 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I1f4061f2b1d62e6a42af4629ce462269cfaf317f Gerrit-Change-Number: 15998 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 13:56:56 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 13:56:56 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/15999 ) Change subject: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies ...................................................................... ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 --- M ttcn3-stp-test/osmo-stp.cfg 1 file changed, 41 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/99/15999/1 diff --git a/ttcn3-stp-test/osmo-stp.cfg b/ttcn3-stp-test/osmo-stp.cfg index d50e7c2..d6ad038 100644 --- a/ttcn3-stp-test/osmo-stp.cfg +++ b/ttcn3-stp-test/osmo-stp.cfg @@ -47,6 +47,9 @@ ! cs7 instance 0 point-code format 24 +! +!M3UA AS/ASP: +! asp asp-sender 9999 2905 m3ua local-ip 172.18.19.200 remote-ip 172.18.19.203 @@ -56,6 +59,11 @@ asp asp-receiver1 10001 2905 m3ua local-ip 172.18.19.200 remote-ip 172.18.19.203 + asp asp-client0 10002 2906 m3ua + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + sctp-role client + role asp as as-sender m3ua asp asp-sender routing-key 1023 23 @@ -63,12 +71,42 @@ asp asp-receiver0 asp asp-receiver1 routing-key 1042 42 - as mahlzeit ipa - routing-key 0 5 - point-code override dpc 23 + as as-client m3ua + routing-key 1055 55 + asp asp-client0 +! +! IPA AS/ASP: +! + asp ipa-asp-loadshare-sender 20000 5000 ipa + local-ip 172.18.19.200 + remote-ip 172.18.19.203 + as ipa-as-loadshare-sender ipa + routing-key 0 6 + point-code override dpc 31 + asp ipa-asp-loadshare-sender + asp ipa-asp-loadshare-receiver0 20001 5000 ipa + local-ip 172.18.19.200 + remote-ip 172.18.19.203 + asp ipa-asp-loadshare-receiver1 20002 5000 ipa + local-ip 172.18.19.200 + remote-ip 172.18.19.203 + as ipa-as-loadshare-receiver ipa + traffic-mode loadshare + routing-key 0 7 + point-code override dpc 32 + asp ipa-asp-loadshare-receiver0 + asp ipa-asp-loadshare-receiver1 +! +! ROUTING TABLE: +! route-table system update route 23 16777215 linkset as-sender update route 42 16777215 linkset as-receiver + update route 55 16777215 linkset as-client + update route 31 16777215 linkset ipa-as-loadshare-receiver +! +!SERVERS: +! listen m3ua 2905 accept-asp-connections dynamic-permitted listen ipa 5000 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 Gerrit-Change-Number: 15999 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 14:00:19 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 14:00:19 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 to look at the new patch set (#3). Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 --- M src/osmo_ss7_vty.c M src/xua_as_fsm.c M src/xua_as_fsm.h 3 files changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/95/15995/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 14:44:49 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 14:44:49 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 to look at the new patch set (#4). Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 --- M src/osmo_ss7_vty.c M src/xua_as_fsm.c M src/xua_as_fsm.h M tests/vty/ss7_asp_test.vty 4 files changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/95/15995/4 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 14:45:30 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 14:45:30 +0000 Subject: Change in libosmocore[master]: libosmogsm: add support for XOR authentication In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/7310 ) Change subject: libosmogsm: add support for XOR authentication ...................................................................... Patch Set 5: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/7310 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1afaf0a9e2dce43aec87964bacefb21ed4d3d565 Gerrit-Change-Number: 7310 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Thu, 07 Nov 2019 14:45:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 15:12:51 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 15:12:51 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies In-Reply-To: References: Message-ID: pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/docker-playground/+/15999 ) Change subject: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies ...................................................................... ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 --- M ttcn3-stp-test/osmo-stp.cfg 1 file changed, 41 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/99/15999/2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 Gerrit-Change-Number: 15999 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 15:20:12 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 15:20:12 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 ) Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15995/4/src/xua_as_fsm.h File src/xua_as_fsm.h: https://gerrit.osmocom.org/c/libosmo-sccp/+/15995/4/src/xua_as_fsm.h at 18 PS4, Line 18: bool xua_as_active(const struct osmo_ss7_as *as); Please rather add it here, like we do for asp: include/osmocom/sigtran/osmo_ss7.h:445:bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 15:20:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 15:20:36 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 15:20:36 +0000 Subject: Change in libosmocore[master]: core/defs.h: introduce and use OSMO_DEPRECATED_OUTSIDE In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14864 ) Change subject: core/defs.h: introduce and use OSMO_DEPRECATED_OUTSIDE ...................................................................... Patch Set 3: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14864 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1b0eff1396776900c1286e41da3aee3ff78b326e Gerrit-Change-Number: 14864 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 15:20:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 15:23:12 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 15:23:12 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 ) Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15995/4/src/xua_as_fsm.h File src/xua_as_fsm.h: https://gerrit.osmocom.org/c/libosmo-sccp/+/15995/4/src/xua_as_fsm.h at 18 PS4, Line 18: bool xua_as_active(const struct osmo_ss7_as *as); > Please rather add it here, like we do for asp: [?] Here means 'include/osmocom/sigtran/osmo_ss7.h', right? So it would be a part of the public API? -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 15:23:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 15:30:58 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 15:30:58 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 ) Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15995/4/src/xua_as_fsm.h File src/xua_as_fsm.h: https://gerrit.osmocom.org/c/libosmo-sccp/+/15995/4/src/xua_as_fsm.h at 18 PS4, Line 18: bool xua_as_active(const struct osmo_ss7_as *as); > Here means 'include/osmocom/sigtran/osmo_ss7. [?] Yes -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 15:30:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 15:45:20 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 15:45:20 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 to look at the new patch set (#5). Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/xua_as_fsm.c M src/xua_as_fsm.h M tests/vty/ss7_asp_test.vty 6 files changed, 20 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/95/15995/5 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 15:47:48 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 15:47:48 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 ) Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 15:47:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 16:07:31 2019 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Thu, 7 Nov 2019 16:07:31 +0000 Subject: Change in osmo-sysmon[master]: simple_ctrl: Don't cause an error if GET response is empty References: Message-ID: daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16000 ) Change subject: simple_ctrl: Don't cause an error if GET response is empty ...................................................................... simple_ctrl: Don't cause an error if GET response is empty Change-Id: I0be48c89595e71ac4dfa1b8ad1890296f2013476 Sponsored-by: On-Waves ehf. --- M src/simple_ctrl.c 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sysmon refs/changes/00/16000/1 diff --git a/src/simple_ctrl.c b/src/simple_ctrl.c index 883e92f..9407218 100644 --- a/src/simple_ctrl.c +++ b/src/simple_ctrl.c @@ -283,7 +283,11 @@ return NULL; rc = sscanf(msgb_l2(resp), "GET_REPLY %u %ms %ms", &rx_id, &rx_var, &rx_val); - if (rc == 3) { + if ((rc == 2) || (rc == 3)) { + /* If body is empty return an empty string */ + if (rc == 2) + rx_val = strdup(""); + if (rx_id == sch->next_id-1 && !strcmp(var, rx_var)) { free(rx_var); msgb_free(resp); -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: I0be48c89595e71ac4dfa1b8ad1890296f2013476 Gerrit-Change-Number: 16000 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 16:07:32 2019 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Thu, 7 Nov 2019 16:07:32 +0000 Subject: Change in osmo-sysmon[master]: Cleaner output if sections are empty References: Message-ID: daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 ) Change subject: Cleaner output if sections are empty ...................................................................... Cleaner output if sections are empty Even with a completely empty config we still get the following output: root sysinfo load: 0.87/0.92/0.98 ram: 243/168/0 uptime: 1d 22:18:19 netdev ping file shellcmd With this patch the sections are skipped if there are no entries and the command no sysinfo can be used to skip displaying the system information. Change-Id: I429fe7626b43aef74ff7458f5c2864888fa9a562 --- M src/osysmon_file.c M src/osysmon_ping.c M src/osysmon_rtnl.c M src/osysmon_shellcmd.c M src/osysmon_sysinfo.c 5 files changed, 59 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sysmon refs/changes/01/16001/1 diff --git a/src/osysmon_file.c b/src/osysmon_file.c index 1dec3db..8e52497 100644 --- a/src/osysmon_file.c +++ b/src/osysmon_file.c @@ -153,6 +153,9 @@ struct value_node *vn_file; struct osysmon_file *of; + if (llist_empty(&g_oss->files)) + return 0; + vn_file = value_node_add(parent, "file", NULL); llist_for_each_entry(of, &g_oss->files, list) diff --git a/src/osysmon_ping.c b/src/osysmon_ping.c index f736798..3484374 100644 --- a/src/osysmon_ping.c +++ b/src/osysmon_ping.c @@ -229,6 +229,10 @@ struct value_node *vn_host; int num_host = iterator_count(g_oss->pings->ping_handle); pingobj_iter_t *iter; + + if (!num_host) + return 0; + struct value_node *vn_ping = value_node_add(parent, "ping", NULL); if (!vn_ping) return -ENOMEM; @@ -257,8 +261,5 @@ add_ttl(iter, vn_host); } - if (num_host) - return ping_send(g_oss->pings->ping_handle); - - return 0; + return ping_send(g_oss->pings->ping_handle); } diff --git a/src/osysmon_rtnl.c b/src/osysmon_rtnl.c index 9fd4251..f1e5a0e 100644 --- a/src/osysmon_rtnl.c +++ b/src/osysmon_rtnl.c @@ -401,6 +401,9 @@ { struct value_node *vn_net; + if (llist_empty(&g_oss->netdevs)) + return 0; + if (!g_oss->rcs) g_oss->rcs = rtnl_init(NULL); diff --git a/src/osysmon_shellcmd.c b/src/osysmon_shellcmd.c index 347b982..83dc0c9 100644 --- a/src/osysmon_shellcmd.c +++ b/src/osysmon_shellcmd.c @@ -165,6 +165,9 @@ struct value_node *vn_file; struct osysmon_shellcmd *oc; + if (llist_empty(&g_oss->shellcmds)) + return 0; + vn_file = value_node_add(parent, "shellcmd", NULL); llist_for_each_entry(oc, &g_oss->shellcmds, list) diff --git a/src/osysmon_sysinfo.c b/src/osysmon_sysinfo.c index 85d9ee9..98b834f 100644 --- a/src/osysmon_sysinfo.c +++ b/src/osysmon_sysinfo.c @@ -30,16 +30,6 @@ #include "osysmon.h" #include "value_node.h" -/*********************************************************************** - * Runtime Code - ***********************************************************************/ - -/* called once on startup before config file parsing */ -int osysmon_sysinfo_init() -{ - return 0; -} - static float loadfac(unsigned long in) { return in/65536.0; } @@ -55,6 +45,48 @@ #define to_minutes(in) (((in)/(SECS_PER_MIN))%MINS_PER_HOUR) #define to_seconds(in) ((in)%SECS_PER_MIN) +static bool sysinfo_enabled = 1; + +/*********************************************************************** + * VTY + ***********************************************************************/ + +#define CMD_STR "Display sysinfo\n" +DEFUN(cfg_sysinfo, cfg_sysinfo_cmd, + "sysinfo", + CMD_STR) +{ + sysinfo_enabled = true; + + return CMD_SUCCESS; +} + +DEFUN(cfg_no_sysinfo, cfg_no_sysinfo_cmd, + "no sysinfo", + NO_STR CMD_STR) +{ + sysinfo_enabled = false; + + return CMD_SUCCESS; +} + +static void osysmon_sysinfo_vty_init(void) +{ + install_element(CONFIG_NODE, &cfg_sysinfo_cmd); + install_element(CONFIG_NODE, &cfg_no_sysinfo_cmd); +} + +/*********************************************************************** + * Runtime Code + ***********************************************************************/ + +/* called once on startup before config file parsing */ +int osysmon_sysinfo_init() +{ + osysmon_sysinfo_vty_init(); + return 0; +} + /* called periodically */ int osysmon_sysinfo_poll(struct value_node *parent) { @@ -63,6 +95,9 @@ char buf[32]; int rc; + if (!sysinfo_enabled) + return 0; + vn_sysinfo = value_node_add(parent, "sysinfo", NULL); rc = sysinfo(&si); -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: I429fe7626b43aef74ff7458f5c2864888fa9a562 Gerrit-Change-Number: 16001 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 16:07:34 2019 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Thu, 7 Nov 2019 16:07:34 +0000 Subject: Change in osmo-sysmon[master]: Add oneshot mode that exits after one iteration References: Message-ID: daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16002 ) Change subject: Add oneshot mode that exits after one iteration ...................................................................... Add oneshot mode that exits after one iteration Change-Id: Id920c4afee633b8da6919b7b318f9c868890a176 --- M src/osysmon_main.c 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sysmon refs/changes/02/16002/1 diff --git a/src/osysmon_main.c b/src/osysmon_main.c index fb01f5e..07a065e 100644 --- a/src/osysmon_main.c +++ b/src/osysmon_main.c @@ -118,6 +118,7 @@ static void print_help() { printf(" -h --help This text.\n"); + printf(" -o --oneshot Oneshot mode. Execute queries once, then exit.\n"); printf(" -c --config-file filename The config file to use.\n"); printf(" -d option --debug=DRLL:DCC:DMM:DRR:DRSL:DNM Enable debugging.\n"); printf(" -D --daemonize Fork the process into a background daemon.\n"); @@ -130,9 +131,11 @@ static struct { const char *config_file; bool daemonize; + bool oneshot; } cmdline_opts = { .config_file = "osmo-sysmon.cfg", .daemonize = false, + .oneshot = false, }; static void handle_options(int argc, char **argv) @@ -141,6 +144,7 @@ int option_index = 0, c; static struct option long_options[] = { {"help", 0, 0, 'h'}, + {"oneshot", 0, 0, 'o'}, {"config-file", 1, 0, 'c'}, {"debug", 1, 0, 'd'}, {"daemonize", 0, 0, 'D'}, @@ -151,7 +155,7 @@ {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hc:d:Dse:TV", + c = getopt_long(argc, argv, "hoc:d:Dse:TV", long_options, &option_index); if (c == -1) break; @@ -161,6 +165,9 @@ print_usage(); print_help(); exit(0); + case 'o': + cmdline_opts.oneshot = true; + break; case 'c': cmdline_opts.config_file = optarg; break; @@ -212,6 +219,9 @@ display_update(root); value_node_del(root); + if (cmdline_opts.oneshot) + exit(0); + osmo_timer_schedule(&print_timer, 1, 0); } -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16002 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: Id920c4afee633b8da6919b7b318f9c868890a176 Gerrit-Change-Number: 16002 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 16:15:10 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 16:15:10 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15999 ) Change subject: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies ...................................................................... Patch Set 3: I had to do some more modifications after first version of the patch since tests from other .ttcn stp files were not passing. It's working fine now with latest laforge/stp osmo-ttcn3-hacks branch. -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 Gerrit-Change-Number: 15999 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 16:15:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 16:15:14 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 16:15:14 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15999 ) Change subject: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies ...................................................................... Patch Set 3: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 Gerrit-Change-Number: 15999 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 16:15:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 17:38:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 17:38:55 +0000 Subject: Change in libosmo-sccp[master]: xua: Don't send NOTIFY messages to IPA ASPs References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16003 ) Change subject: xua: Don't send NOTIFY messages to IPA ASPs ...................................................................... xua: Don't send NOTIFY messages to IPA ASPs Change-Id: Ice3d948e4d2f57a8f52cfb93792d5f4d23284b96 --- M src/xua_as_fsm.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/03/16003/1 diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index c25902e..394061b 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -233,8 +233,10 @@ if (asp_cmp == asp) continue; - msg = encode_notify(&npar); - osmo_ss7_asp_send(asp, msg); + if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA) { + msg = encode_notify(&npar); + osmo_ss7_asp_send(asp, msg); + } osmo_fsm_inst_state_chg(asp->fi, XUA_ASP_S_INACTIVE, 0, 0); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16003 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ice3d948e4d2f57a8f52cfb93792d5f4d23284b96 Gerrit-Change-Number: 16003 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 17:38:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 17:38:55 +0000 Subject: Change in libosmo-sccp[master]: xua: ipa_asp_fsm: Allow moving ASP to inactive state References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 ) Change subject: xua: ipa_asp_fsm: Allow moving ASP to inactive state ...................................................................... xua: ipa_asp_fsm: Allow moving ASP to inactive state If AS is configured with Traffic Mode Override, then if a new ASP becomes active, all previous ASPs are considered to be inactive and new data is sent to the newly activated ASP. Remark: It's still unclear which methodology/implementation will follow when the last activated ASP becomes inactive/shutdown. Then probably another one should be activated at that time, but that logic is not there implemented as far as I know. Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15 --- M src/xua_asp_fsm.c 1 file changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/04/16004/1 diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 3f3d69a..169f80a 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -750,6 +750,7 @@ enum ipa_asp_state { IPA_ASP_S_DOWN = XUA_ASP_S_DOWN, IPA_ASP_S_ACTIVE = XUA_ASP_S_ACTIVE, + IPA_ASP_S_INACTIVE = XUA_ASP_S_INACTIVE, IPA_ASP_S_WAIT_ID_RESP, /* Waiting for ID_RESP from peer */ IPA_ASP_S_WAIT_ID_GET, /* Waiting for ID_GET from peer */ IPA_ASP_S_WAIT_ID_ACK, /* Waiting for ID_ACK from peer */ @@ -977,6 +978,16 @@ } } +static void ipa_asp_fsm_inactive(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case XUA_ASP_E_M_ASP_DOWN_REQ: + ipa_asp_fsm_del_route(fi->priv); + osmo_fsm_inst_state_chg(fi, IPA_ASP_S_DOWN, 0, 0); + break; + } +} + static void ipa_asp_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct ipa_asp_fsm_priv *iafp = fi->priv; @@ -1010,6 +1021,11 @@ dispatch_to_all_as(fi, XUA_ASPAS_ASP_ACTIVE_IND); } +static void ipa_asp_fsm_inactive_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + dispatch_to_all_as(fi, XUA_ASPAS_ASP_INACTIVE_IND); +} + static void ipa_pong_timer_cb(void *_fi) { struct osmo_fsm_inst *fi = _fi; @@ -1074,11 +1090,20 @@ [IPA_ASP_S_ACTIVE] = { .in_event_mask = S(XUA_ASP_E_M_ASP_DOWN_REQ) | S(XUA_ASP_E_M_ASP_INACTIVE_REQ), - .out_state_mask = S(IPA_ASP_S_DOWN), + .out_state_mask = S(IPA_ASP_S_DOWN) | + S(IPA_ASP_S_INACTIVE), .name = "ASP_ACTIVE", .action = ipa_asp_fsm_active, .onenter = ipa_asp_fsm_active_onenter, }, + [IPA_ASP_S_INACTIVE] = { + .in_event_mask = S(XUA_ASP_E_M_ASP_DOWN_REQ), + .out_state_mask = S(IPA_ASP_S_DOWN) | + S(IPA_ASP_S_ACTIVE), + .name = "ASP_INACTIVE", + .action = ipa_asp_fsm_inactive, + .onenter = ipa_asp_fsm_inactive_onenter, + }, }; static void ipa_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15 Gerrit-Change-Number: 16004 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 17:39:40 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 17:39:40 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies In-Reply-To: References: Message-ID: pespin has uploaded a new patch set (#4). ( https://gerrit.osmocom.org/c/docker-playground/+/15999 ) Change subject: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies ...................................................................... ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 --- M ttcn3-stp-test/osmo-stp.cfg 1 file changed, 66 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/99/15999/4 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 Gerrit-Change-Number: 15999 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 17:42:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 17:42:27 +0000 Subject: Change in osmo-sysmon[master]: simple_ctrl: Don't cause an error if GET response is empty In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16000 ) Change subject: simple_ctrl: Don't cause an error if GET response is empty ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: I0be48c89595e71ac4dfa1b8ad1890296f2013476 Gerrit-Change-Number: 16000 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 17:42:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 17:45:26 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 17:45:26 +0000 Subject: Change in osmo-sysmon[master]: Cleaner output if sections are empty In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 ) Change subject: Cleaner output if sections are empty ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-sysmon/+/16001/1/src/osysmon_sysinfo.c File src/osysmon_sysinfo.c: https://gerrit.osmocom.org/c/osmo-sysmon/+/16001/1/src/osysmon_sysinfo.c at 48 PS1, Line 48: static bool sysinfo_enabled = 1; = true; -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: I429fe7626b43aef74ff7458f5c2864888fa9a562 Gerrit-Change-Number: 16001 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 17:45:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 17:46:23 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 17:46:23 +0000 Subject: Change in osmo-sysmon[master]: Add oneshot mode that exits after one iteration In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16002 ) Change subject: Add oneshot mode that exits after one iteration ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16002 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: Id920c4afee633b8da6919b7b318f9c868890a176 Gerrit-Change-Number: 16002 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 07 Nov 2019 17:46:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 18:29:35 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 18:29:35 +0000 Subject: Change in libosmo-sccp[master]: xua: ipa_asp_fsm: Allow moving ASP to inactive state In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 to look at the new patch set (#2). Change subject: xua: ipa_asp_fsm: Allow moving ASP to inactive state ...................................................................... xua: ipa_asp_fsm: Allow moving ASP to inactive state If AS is configured with Traffic Mode Override, then if a new ASP becomes active, all previous ASPs are considered to be inactive and new data is sent to the newly activated ASP. Remark: It's still unclear which methodology/implementation will follow when the last activated ASP becomes inactive/shutdown. Then probably another one should be activated at that time, but that logic is not there implemented as far as I know. Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15 --- M src/xua_asp_fsm.c 1 file changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/04/16004/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15 Gerrit-Change-Number: 16004 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 18:47:08 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 7 Nov 2019 18:47:08 +0000 Subject: Change in libosmo-sccp[master]: xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESP References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16005 ) Change subject: xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESP ...................................................................... xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESP Since there's no official spec for IPA and some implementations seem to like sending the IPA ID ACK before the IPA ID RESP, let's catch it and feed it after we receive the IPA ID RESP and we are in correct state. Otherwise the connection would deadlock during the initial handshake. That's the case with our TTCN3 IPA implementation running STP_Tests suite. Change-Id: I99f5346a3854ca07979020245897334197f3cd3b --- M src/xua_asp_fsm.c 1 file changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/05/16005/1 diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 0a84f28..e09c46c 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -768,6 +768,8 @@ struct ipaccess_unit *ipa_unit; /* Timer for tracking if no PONG is received in response to PING */ struct osmo_timer_list pong_timer; + /* Did we receive IPA ID ACK before IPA ID RESP ? */ + bool ipa_id_ack_rcvd; }; enum ipa_asp_fsm_t { @@ -857,8 +859,20 @@ if (fd >= 0) { ipaccess_send_id_ack(fd); osmo_fsm_inst_state_chg(fi, IPA_ASP_S_WAIT_ID_ACK2, 10, T_WAIT_ID_ACK); + /* If we received the ACK beforehand, submit it now */ + if (iafp->ipa_id_ack_rcvd) { + iafp->ipa_id_ack_rcvd = false; + osmo_fsm_inst_dispatch(fi, IPA_ASP_E_ID_ACK, NULL); + } } break; + case IPA_ASP_E_ID_ACK: + /* Since there's no official spec for IPA and some + implementations seem to like sending the IPA ID ACK before + the IPA ID RESP, let's catch it and feed it after we receive + the IPA ID RESP and we are in correct state */ + iafp->ipa_id_ack_rcvd = true; + break; } return; out_err: @@ -1058,7 +1072,8 @@ }, /* Server Side */ [IPA_ASP_S_WAIT_ID_RESP] = { - .in_event_mask = S(IPA_ASP_E_ID_RESP), + .in_event_mask = S(IPA_ASP_E_ID_RESP) | + S(IPA_ASP_E_ID_ACK), .out_state_mask = S(IPA_ASP_S_WAIT_ID_ACK2) | S(IPA_ASP_S_DOWN), .name = "WAIT_ID_RESP", -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16005 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I99f5346a3854ca07979020245897334197f3cd3b Gerrit-Change-Number: 16005 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 21:22:15 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 21:22:15 +0000 Subject: Change in osmo-pcu[master]: BSSGP: do not reject SUSPEND ACK / NACK messages References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16006 ) Change subject: BSSGP: do not reject SUSPEND ACK / NACK messages ...................................................................... BSSGP: do not reject SUSPEND ACK / NACK messages Both BSSGP SUSPEND ACK and NACK messages use BVCI=0 (signaling), which always exists. Claiming that BVCI=0 is unknown is wrong. Instead of adding both BSSGP_PDUT_SUSPEND_{ACK,NACK} to the 'if' statement, let's rather avoid rejection for all BVCI=0 messages, as there may be other unlisted message types. Change-Id: I780657c1e8f67e0bef0e92a31db7ba61b57d7ec4 Related: OS#4111 --- M src/gprs_bssgp_pcu.cpp 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/06/16006/1 diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index abcb106..f99058a 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -407,10 +407,7 @@ /* look-up or create the BTS context for this BVC */ bctx = btsctx_by_bvci_nsei(ns_bvci, msgb_nsei(msg)); - if (!bctx - && pdu_type != BSSGP_PDUT_BVC_RESET_ACK - && pdu_type != BSSGP_PDUT_BVC_UNBLOCK_ACK - && pdu_type != BSSGP_PDUT_PAGING_PS) + if (!bctx && ns_bvci != BVCI_SIGNALLING) { LOGP(DBSSGP, LOGL_NOTICE, "NSEI=%u/BVCI=%u Rejecting PDU type %s for unknown BVCI\n", nsei, ns_bvci, bssgp_pdu_str(pdu_type)); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I780657c1e8f67e0bef0e92a31db7ba61b57d7ec4 Gerrit-Change-Number: 16006 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 21:22:16 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 21:22:16 +0000 Subject: Change in osmo-pcu[master]: BSSGP: properly print BVCI for signalling messages (BVCI=0) References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16007 ) Change subject: BSSGP: properly print BVCI for signalling messages (BVCI=0) ...................................................................... BSSGP: properly print BVCI for signalling messages (BVCI=0) Change-Id: I4ac0f48d2e62cd0545e8a1e1b26c9e43ef5e8dde --- M src/gprs_bssgp_pcu.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/07/16007/1 diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index f99058a..dd9eb68 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -281,7 +281,7 @@ struct bssgp_normal_hdr *bgph = (struct bssgp_normal_hdr *) msgb_bssgph(msg); enum bssgp_pdu_type pdu_type = (enum bssgp_pdu_type) bgph->pdu_type; int rc = 0; - int bvci = bctx ? bctx->bvci : -1; + int bvci = bctx ? bctx->bvci : msgb_bvci(msg); switch (pdu_type) { case BSSGP_PDUT_STATUS: /* already handled in libosmogb */ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16007 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4ac0f48d2e62cd0545e8a1e1b26c9e43ef5e8dde Gerrit-Change-Number: 16007 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 21:46:10 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 21:46:10 +0000 Subject: Change in osmo-pcu[master]: tests/tbf: suspend warnings about the link quality measurements References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16008 ) Change subject: tests/tbf: suspend warnings about the link quality measurements ...................................................................... tests/tbf: suspend warnings about the link quality measurements Share a single instance of 'pcu_l1_meas' between all unit tests, set initial measurement values in main(). This way we can get rid of the following warnings: Unable to update UL (M)CS CS-X because we don't have link quality measurements. Change-Id: I1c82076df6cd0833d243e1e6afb140bae3bd2ec9 Fixes: OS#3828 --- M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err 2 files changed, 17 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/08/16008/1 diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bd4fbc1..bdbc138 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -50,6 +50,9 @@ int16_t spoof_mnc = 0, spoof_mcc = 0; bool spoof_mnc_3_digits = false; +/* Measurements shared by all unit tests */ +static struct pcu_l1_meas meas; + static void check_tbf(gprs_rlcmac_tbf *tbf) { OSMO_ASSERT(tbf); @@ -575,7 +578,6 @@ gprs_rlcmac_ul_tbf *ul_tbf; uint8_t trx_no = 0; struct gprs_rlcmac_pdch *pdch; - struct pcu_l1_meas meas; tfi = the_bts->tfi_find_free(GPRS_RLCMAC_UL_TBF, &trx_no, -1); @@ -610,9 +612,6 @@ uint8_t buf[64]; int num_bytes; struct gprs_rlcmac_pdch *pdch; - struct pcu_l1_meas meas; - - meas.set_rssi(31); rlc_block = bitvec_alloc(23, tall_pcu_ctx); @@ -657,11 +656,9 @@ struct gprs_rlcmac_pdch *pdch; gprs_rlcmac_bts *bts; RlcMacUplink_t ulreq = {0}; - struct pcu_l1_meas meas; struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; GprsCodingScheme cs; - meas.set_rssi(31); bts = the_bts->bts_data(); /* needed to set last_rts_fn in the PDCH object */ @@ -808,11 +805,9 @@ struct gprs_rlcmac_pdch *pdch; gprs_rlcmac_bts *bts; RlcMacUplink_t ulreq = {0}; - struct pcu_l1_meas meas; struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; GprsCodingScheme cs; - meas.set_rssi(31); bts = the_bts->bts_data(); /* needed to set last_rts_fn in the PDCH object */ @@ -1257,10 +1252,8 @@ gprs_rlcmac_ul_tbf *ul_tbf; gprs_rlcmac_bts *bts; RlcMacUplink_t ulreq = {0}; - struct pcu_l1_meas meas; GprsCodingScheme cs; - meas.set_rssi(31); bts = the_bts->bts_data(); /* needed to set last_rts_fn in the PDCH object */ @@ -1326,7 +1319,6 @@ uint8_t trx_no = 0; int tfi = 0; struct gprs_rlcmac_pdch *pdch; - struct pcu_l1_meas meas; GprsCodingScheme cs; @@ -1409,7 +1401,6 @@ uint8_t trx_no = 0; int tfi = 0; struct gprs_rlcmac_pdch *pdch; - struct pcu_l1_meas meas; GprsCodingScheme cs; check_tbf(ul_tbf); @@ -1492,7 +1483,6 @@ int tfi = 0; gprs_rlcmac_ul_tbf *ul_tbf; struct gprs_rlcmac_pdch *pdch; - struct pcu_l1_meas meas; GprsCodingScheme cs; @@ -1583,8 +1573,6 @@ struct gprs_rlcmac_pdch *pdch; gprs_rlcmac_bts *bts; RlcMacUplink_t ulreq = {0}; - struct pcu_l1_meas meas; - meas.set_rssi(31); bts = the_bts->bts_data(); @@ -2370,14 +2358,12 @@ struct gprs_rlcmac_pdch *pdch; gprs_rlcmac_bts *bts; RlcMacUplink_t ulreq = {0}; - struct pcu_l1_meas meas; struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; GprsCodingScheme cs; Packet_Resource_Request_t *presreq = NULL; MS_Radio_Access_capability_t *pmsradiocap = NULL; Multislot_capability_t *pmultislotcap = NULL; - meas.set_rssi(31); bts = the_bts->bts_data(); /* needed to set last_rts_fn in the PDCH object */ @@ -3298,6 +3284,10 @@ vty_init(&pcu_vty_info); pcu_vty_init(); + /* Initialize shared UL measurements */ + meas.set_link_qual(12); + meas.set_rssi(31); + test_tbf_base(); test_tbf_tlli_update(); test_tbf_final_ack(TEST_MODE_STANDARD); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 7dd14f4..6e638af 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1470,7 +1470,7 @@ - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=0 USF=0 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1548,7 +1548,6 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -1563,7 +1562,6 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1632,7 +1630,6 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -1647,7 +1644,6 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1764,7 +1760,6 @@ Modifying MS object, TLLI = 0xf5667788, TA 220 -> 7 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. Received RTS for PDCH: TRX=0 TS=7 FN=2654335 block_nr=11 scheduling USF=0 for required uplink resource of UL TFI=0 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ @@ -1780,7 +1775,6 @@ TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=1, CPS=0, RSB=0, rc=184 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) UL DATA TFI=1 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1833,7 +1827,7 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -1848,7 +1842,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1926,7 +1920,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI 0011223344): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-3 -> CS-4 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -1962,7 +1956,6 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec, cur_fn=0 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2006,7 +1999,7 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -2021,7 +2014,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2092,7 +2085,7 @@ - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=0 USF=0 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2157,7 +2150,7 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -2172,7 +2165,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2836,7 +2829,7 @@ TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) set ass. type PACCH [prev CCCH:0, PACCH:0] TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec, cur_fn=0 -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI 0011223344): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-3 -> CS-4 Received RTS for PDCH: TRX=0 TS=7 FN=2654400 block_nr=2 scheduling USF=0 for required uplink resource of UL TFI=0 TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) start Packet Downlink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16008 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1c82076df6cd0833d243e1e6afb140bae3bd2ec9 Gerrit-Change-Number: 16008 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 22:37:37 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 22:37:37 +0000 Subject: Change in osmo-pcu[master]: GprsMs::update_cs_ul(): clarify the meaning of old_link_qual References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16009 ) Change subject: GprsMs::update_cs_ul(): clarify the meaning of old_link_qual ...................................................................... GprsMs::update_cs_ul(): clarify the meaning of old_link_qual Change-Id: Iad703a573621c64613b9b8c229079dc63fcaeb9e --- M src/gprs_ms.cpp 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/09/16009/1 diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp index 5b35e65..d271bc4 100644 --- a/src/gprs_ms.cpp +++ b/src/gprs_ms.cpp @@ -648,8 +648,6 @@ return; } - old_link_qual = meas->link_qual; - if (mcs_is_gprs(m_current_cs_ul)) { if (current_cs >= MAX_GPRS_CS) current_cs = MAX_GPRS_CS - 1; @@ -667,8 +665,12 @@ return; } + /* To avoid rapid changes of the coding scheme, we also take + * the old link quality value into account (if present). */ if (m_l1_meas.have_link_qual) old_link_qual = m_l1_meas.link_qual; + else + old_link_qual = meas->link_qual; if (meas->link_qual < low && old_link_qual < low) new_cs_ul.dec(mode()); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iad703a573621c64613b9b8c229079dc63fcaeb9e Gerrit-Change-Number: 16009 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 7 23:21:00 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 7 Nov 2019 23:21:00 +0000 Subject: Change in osmo-pcu[master]: GprsMs::update_cs_ul(): clarify the meaning of old_link_qual In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/16009 to look at the new patch set (#2). Change subject: GprsMs::update_cs_ul(): clarify the meaning of old_link_qual ...................................................................... GprsMs::update_cs_ul(): clarify the meaning of old_link_qual Change-Id: Iad703a573621c64613b9b8c229079dc63fcaeb9e --- M src/gprs_ms.cpp M tests/tbf/TbfTest.err 2 files changed, 15 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/09/16009/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iad703a573621c64613b9b8c229079dc63fcaeb9e Gerrit-Change-Number: 16009 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 00:12:59 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 00:12:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010 ) Change subject: PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf ...................................................................... PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf As it turned out, OsmoPCU is not supposed to change the Coding Scheme immediately when the recent link quality value leaves the current window. Instead, in order to avoid rapid changes of the Coding Scheme, it also takes the previous value into account. Thus the current Coding Scheme is only changed if both current and old values fit into a new window. This change makes the test case pass. Change-Id: I5d503d5a9c46cb9de84fbabd2d591afbe4216fdb --- M pcu/PCU_Tests_RAW.ttcn 1 file changed, 20 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/10/16010/1 diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index af1ef99..6a5f5d0 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -912,8 +912,11 @@ tai6_ta := ?)); } -/* Default link quality adaptation (Coding Scheme) ranges: -/* CS1: ... 6 dB, CS2: 5 .. 8 dB, CS3: 7 .. 13 db, CS4: 12 ... dB */ +/* Default link quality adaptation (Coding Scheme) ranges (inclusive). + * OsmoPCU (VTY): cs link-quality-ranges cs1 6 cs2 5 8 cs3 7 13 cs4 12 + * + * NOTE: the ranges are intentionally overlapping because OsmoPCU + * does not change CS/MCS on the range borders (5-6, 7-8, 12-13). */ private template integer CS1_lqual_dB_range := (-infinity .. 6); private template integer CS2_lqual_dB_range := (5 .. 8); private template integer CS3_lqual_dB_range := (7 .. 13); @@ -952,14 +955,22 @@ /* HACK: patch missing TLLI; otherwise OsmoPCU rejects DATA.req */ ul_data.data.tlli := '00000001'O; - /* 16 UL blocks (0 .. 32 dB, step = 2 dB) */ + /* The actual / old link quality values. We need to keep track of the old + * (basically previous) link quality value, because OsmoPCU actually + * changes the coding scheme if not only the actual, but also the old + * value leaves the current link quality range (window). */ + var integer lqual := 0; + var integer lqual_old; + + /* 16 UL blocks (0 .. 15 dB, step = 1 dB) */ for (var integer i := 0; i < 16; i := i + 1) { /* Prepare a new UL block (CV, random payload) */ ul_data.data.mac_hdr.countdown := (15 - i); ul_data.data.blocks := { valueof(t_RLCMAC_LLCBLOCK(f_rnd_octstring(10))) }; - /* Link quality in dB and our CS1-4 expectations */ - var integer lqual := i * 2; + /* Update the old / actual link quality */ + lqual_old := lqual; + lqual := i; /* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */ log("Sending DATA.ind with link quality (dB): ", lqual); @@ -971,9 +982,11 @@ log("Rx Packet Uplink ACK / NACK with Channel Coding Command: ", dl_block.ctrl.payload.u.ul_ack_nack.gprs.ch_coding_cmd); - /* Match the received Channel Coding Command */ + /* Match the received Channel Coding Command. Since we are increasing + * the link quality value on each iteration and not decreasing, there + * is no need to check the both old and current link quality values. */ var template ChCodingCommand ch_coding; - select (lqual) { + select (lqual_old) { case (CS1_lqual_dB_range) { ch_coding := CH_CODING_CS1; } case (CS2_lqual_dB_range) { ch_coding := CH_CODING_CS2; } case (CS3_lqual_dB_range) { ch_coding := CH_CODING_CS3; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5d503d5a9c46cb9de84fbabd2d591afbe4216fdb Gerrit-Change-Number: 16010 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Fri Nov 8 02:02:15 2019 From: admin at opensuse.org (OBS Notification) Date: Fri, 08 Nov 2019 02:02:15 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5dc4ccb997651_3b652aef8e89a5f01686ae@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 295s] | #define HAVE_MEMORY_H 1 [ 295s] | #define HAVE_STRINGS_H 1 [ 295s] | #define HAVE_INTTYPES_H 1 [ 295s] | #define HAVE_STDINT_H 1 [ 295s] | #define HAVE_UNISTD_H 1 [ 295s] | #define HAVE_DLFCN_H 1 [ 295s] | #define LT_OBJDIR ".libs/" [ 295s] | #define PACKAGE "osmo-hlr" [ 295s] | #define VERSION "1.1.0.10-5b65" [ 295s] | #define STDC_HEADERS 1 [ 295s] | [ 295s] | configure: exit 0 [ 295s] [ 295s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 295s] make[1]: *** [override_dh_auto_test] Error 1 [ 295s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 295s] debian/rules:7: recipe for target 'build' failed [ 295s] make: *** [build] Error 2 [ 295s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 295s] [ 295s] lamb06 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Fri Nov 8 02:02:08 UTC 2019. [ 295s] [ 295s] ### VM INTERACTION START ### [ 298s] [ 273.446799] sysrq: SysRq : Power Off [ 298s] [ 273.507479] reboot: Power down [ 298s] ### VM INTERACTION END ### [ 298s] [ 298s] lamb06 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Fri Nov 8 02:02:12 UTC 2019. [ 298s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 8 02:05:58 2019 From: admin at opensuse.org (OBS Notification) Date: Fri, 08 Nov 2019 02:05:58 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5dc4cda925f27_3b652aef8e89a5f0169388@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 184s] -subscriber_id|INTEGER|0||0 [ 184s] - [ 184s] -Table subscriber_multi_msisdn contents: [ 184s] - [ 184s] -Verify that osmo-hlr can open it: [ 184s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 184s] -rc = 0 [ 184s] -DMAIN hlr starting [ 184s] -DDB using database: test.db [ 184s] -DDB Database test.db' has HLR DB schema version 2 [ 184s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 184s] ./testsuite.at:44: exit code was 1, expected 0 [ 184s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 184s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 184s] make[1]: *** [override_dh_auto_test] Error 1 [ 184s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 184s] debian/rules:7: recipe for target 'build' failed [ 184s] make: *** [build] Error 2 [ 184s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 184s] [ 184s] lamb13 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Fri Nov 8 02:05:51 UTC 2019. [ 184s] [ 184s] ### VM INTERACTION START ### [ 185s] Powering off. [ 185s] [ 171.558274] reboot: Power down [ 185s] ### VM INTERACTION END ### [ 185s] [ 185s] lamb13 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Fri Nov 8 02:05:53 UTC 2019. [ 185s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 8 02:06:15 2019 From: admin at opensuse.org (OBS Notification) Date: Fri, 08 Nov 2019 02:06:15 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5dc4cdaa32469_3b652aef8e89a5f016947f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/i586 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 504s] -subscriber_id|INTEGER|0||0 [ 504s] - [ 504s] -Table subscriber_multi_msisdn contents: [ 504s] - [ 504s] -Verify that osmo-hlr can open it: [ 504s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 504s] -rc = 0 [ 504s] -DMAIN hlr starting [ 504s] -DDB using database: test.db [ 504s] -DDB Database test.db' has HLR DB schema version 2 [ 504s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 504s] ./testsuite.at:44: exit code was 1, expected 0 [ 504s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 504s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 504s] make[1]: *** [override_dh_auto_test] Error 1 [ 504s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 504s] debian/rules:7: recipe for target 'build' failed [ 504s] make: *** [build] Error 2 [ 504s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 504s] [ 504s] lamb53 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Fri Nov 8 02:06:03 UTC 2019. [ 504s] [ 504s] ### VM INTERACTION START ### [ 505s] Powering off. [ 505s] [ 457.776608] reboot: Power down [ 505s] ### VM INTERACTION END ### [ 505s] [ 505s] lamb53 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Fri Nov 8 02:06:05 UTC 2019. [ 505s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Fri Nov 8 02:07:06 2019 From: admin at opensuse.org (OBS Notification) Date: Fri, 08 Nov 2019 02:07:06 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5dc4cde327755_3b652aef8e89a5f01695b4@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 270s] | #define HAVE_MEMORY_H 1 [ 270s] | #define HAVE_STRINGS_H 1 [ 270s] | #define HAVE_INTTYPES_H 1 [ 270s] | #define HAVE_STDINT_H 1 [ 270s] | #define HAVE_UNISTD_H 1 [ 270s] | #define HAVE_DLFCN_H 1 [ 270s] | #define LT_OBJDIR ".libs/" [ 270s] | #define PACKAGE "osmo-hlr" [ 270s] | #define VERSION "1.1.0.10-5b65" [ 270s] | #define STDC_HEADERS 1 [ 270s] | [ 270s] | configure: exit 0 [ 270s] [ 270s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 270s] make[1]: *** [override_dh_auto_test] Error 1 [ 270s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 270s] debian/rules:7: recipe for target 'build' failed [ 270s] make: *** [build] Error 2 [ 270s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 270s] [ 270s] lamb01 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Fri Nov 8 02:06:56 UTC 2019. [ 270s] [ 270s] ### VM INTERACTION START ### [ 273s] [ 254.568599] sysrq: SysRq : Power Off [ 273s] [ 254.575584] reboot: Power down [ 273s] ### VM INTERACTION END ### [ 273s] [ 273s] lamb01 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Fri Nov 8 02:07:00 UTC 2019. [ 273s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 8 11:58:14 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 11:58:14 +0000 Subject: Change in osmo-pcu[master]: BSSGP: do not reject SUSPEND ACK / NACK messages In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16006 ) Change subject: BSSGP: do not reject SUSPEND ACK / NACK messages ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I780657c1e8f67e0bef0e92a31db7ba61b57d7ec4 Gerrit-Change-Number: 16006 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 11:58:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 11:59:02 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 11:59:02 +0000 Subject: Change in osmo-pcu[master]: BSSGP: properly print BVCI for signalling messages (BVCI=0) In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16007 ) Change subject: BSSGP: properly print BVCI for signalling messages (BVCI=0) ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16007 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4ac0f48d2e62cd0545e8a1e1b26c9e43ef5e8dde Gerrit-Change-Number: 16007 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 11:59:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 12:01:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 12:01:27 +0000 Subject: Change in osmo-pcu[master]: tests/tbf: suspend warnings about the link quality measurements In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16008 ) Change subject: tests/tbf: suspend warnings about the link quality measurements ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/16008/1/tests/tbf/TbfTest.cpp File tests/tbf/TbfTest.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/16008/1/tests/tbf/TbfTest.cpp at 3288 PS1, Line 3288: meas.set_link_qual(12); This line looks non-related? I mean, it was not set before, or I don't see any related comment in the commit message. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16008 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1c82076df6cd0833d243e1e6afb140bae3bd2ec9 Gerrit-Change-Number: 16008 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 12:01:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 12:03:02 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 12:03:02 +0000 Subject: Change in osmo-pcu[master]: GprsMs::update_cs_ul(): clarify the meaning of old_link_qual In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16009 ) Change subject: GprsMs::update_cs_ul(): clarify the meaning of old_link_qual ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iad703a573621c64613b9b8c229079dc63fcaeb9e Gerrit-Change-Number: 16009 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 12:03:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 12:05:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 12:05:52 +0000 Subject: Change in osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010 ) Change subject: PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010/1/pcu/PCU_Tests_RAW.ttcn File pcu/PCU_Tests_RAW.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010/1/pcu/PCU_Tests_RAW.ttcn at 987 PS1, Line 987: * is no need to check the both old and current link quality values. */ "check both the old" -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5d503d5a9c46cb9de84fbabd2d591afbe4216fdb Gerrit-Change-Number: 16010 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 12:05:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 12:34:17 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 12:34:17 +0000 Subject: Change in osmo-pcu[master]: tests/tbf: suspend warnings about the link quality measurements In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16008 ) Change subject: tests/tbf: suspend warnings about the link quality measurements ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/16008/1/tests/tbf/TbfTest.cpp File tests/tbf/TbfTest.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/16008/1/tests/tbf/TbfTest.cpp at 3288 PS1, Line 3288: meas.set_link_qual(12); > This line looks non-related? I mean, it was not set before, or I don't see any related comment in th [?] That's actually the fix for OS#3828, so of course it's related. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16008 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1c82076df6cd0833d243e1e6afb140bae3bd2ec9 Gerrit-Change-Number: 16008 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 12:34:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 13:39:00 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 13:39:00 +0000 Subject: Change in osmo-pcu[master]: tests/tbf: suspend warnings about the link quality measurements In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16008 ) Change subject: tests/tbf: suspend warnings about the link quality measurements ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16008 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1c82076df6cd0833d243e1e6afb140bae3bd2ec9 Gerrit-Change-Number: 16008 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 13:39:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 14:08:58 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 14:08:58 +0000 Subject: Change in libosmo-sccp[master]: ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16011 ) Change subject: ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY ...................................................................... ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY Similar to what we do with local address. Should fix creating the stream when no remote address is provided on an ASP configured through VTY. Related: OS#4260 Change-Id: I33672e76a51a5d5a483906749d30e4c4e08b66ce --- M src/osmo_ss7_vty.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/11/16011/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 35640df..1a246db 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1775,6 +1775,11 @@ asp->cfg.local.host[0] = NULL; asp->cfg.local.host_cnt = 1; } + /* If no remote addr was set */ + if (!asp->cfg.remote.host_cnt) { + asp->cfg.remote.host[0] = "127.0.0.1"; + asp->cfg.remote.host_cnt = 1; + } osmo_ss7_asp_restart(asp); vty->node = L_CS7_NODE; vty->index = asp->inst; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16011 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I33672e76a51a5d5a483906749d30e4c4e08b66ce Gerrit-Change-Number: 16011 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 14:20:15 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 14:20:15 +0000 Subject: Change in libosmo-sccp[master]: ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16011 ) Change subject: ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16011 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I33672e76a51a5d5a483906749d30e4c4e08b66ce Gerrit-Change-Number: 16011 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 08 Nov 2019 14:20:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 14:41:13 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 14:41:13 +0000 Subject: Change in libosmo-sccp[master]: ss7: Improve log formatting during ASP restart References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16012 ) Change subject: ss7: Improve log formatting during ASP restart ...................................................................... ss7: Improve log formatting during ASP restart Since it may act sometimes as a server and sometimes as a client, let's better use one more neutral (2-side arrow) connector, and mark which address is the local and which is the remote. We already use same formatting in other osmocom code. Change-Id: I42feaa16790f02b98bcda65281de8cd9295ddcb6 --- M src/osmo_ss7.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/12/16012/1 diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 7ff3efe..4d5c349 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1292,8 +1292,8 @@ OSMO_ASSERT(ss7_initialized); osmo_ss7_asp_peer_snprintf(bufloc, sizeof(bufloc), &asp->cfg.local); osmo_ss7_asp_peer_snprintf(bufrem, sizeof(bufrem), &asp->cfg.remote); - LOGPASP(asp, DLSS7, LOGL_INFO, "Restarting ASP %s, %s ==> %s\n", - asp->cfg.name, bufloc, bufrem); + LOGPASP(asp, DLSS7, LOGL_INFO, "Restarting ASP %s, r=%s<->l=%s\n", + asp->cfg.name, bufrem, bufloc); if (!asp->cfg.is_server) { /* We are in client mode now */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16012 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I42feaa16790f02b98bcda65281de8cd9295ddcb6 Gerrit-Change-Number: 16012 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 14:54:53 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 8 Nov 2019 14:54:53 +0000 Subject: Change in libosmo-sccp[master]: ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16011 ) Change subject: ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16011 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I33672e76a51a5d5a483906749d30e4c4e08b66ce Gerrit-Change-Number: 16011 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-Comment-Date: Fri, 08 Nov 2019 14:54:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 14:57:26 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 14:57:26 +0000 Subject: Change in libosmo-sccp[master]: ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16011 ) Change subject: ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY ...................................................................... ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY Similar to what we do with local address. Should fix creating the stream when no remote address is provided on an ASP configured through VTY. Related: OS#4260 Change-Id: I33672e76a51a5d5a483906749d30e4c4e08b66ce --- M src/osmo_ss7_vty.c 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve neels: Looks good to me, approved diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 35640df..1a246db 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1775,6 +1775,11 @@ asp->cfg.local.host[0] = NULL; asp->cfg.local.host_cnt = 1; } + /* If no remote addr was set */ + if (!asp->cfg.remote.host_cnt) { + asp->cfg.remote.host[0] = "127.0.0.1"; + asp->cfg.remote.host_cnt = 1; + } osmo_ss7_asp_restart(asp); vty->node = L_CS7_NODE; vty->index = asp->inst; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16011 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I33672e76a51a5d5a483906749d30e4c4e08b66ce Gerrit-Change-Number: 16011 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 14:57:40 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 14:57:40 +0000 Subject: Change in libosmo-sccp[master]: ss7: Set correct local addr and port during dynamic ASP creation References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16013 ) Change subject: ss7: Set correct local addr and port during dynamic ASP creation ...................................................................... ss7: Set correct local addr and port during dynamic ASP creation Change-Id: I54aada351d5fb74f5015fdfe691d0b237354743c --- M src/osmo_ss7.c 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/13/16013/1 diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 4d5c349..0d49d1a 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1718,6 +1718,7 @@ struct osmo_xua_server *oxs = osmo_stream_srv_link_get_data(link); struct osmo_stream_srv *srv; struct osmo_ss7_asp *asp; + int i; char *sock_name = osmo_sock_get_name(link, fd); const char *proto_name = get_value_string(osmo_ss7_asp_protocol_vals, oxs->cfg.proto); @@ -1764,8 +1765,10 @@ sock_name, asp->cfg.name); asp->cfg.is_server = true; asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; - asp->cfg.local.host[0] = NULL; - asp->cfg.local.host_cnt = 1; + asp->cfg.local.port = oxs->cfg.local.port; + for (i = 0; i < oxs->cfg.local.host_cnt; i++) + asp->cfg.local.host[i] = talloc_strdup(asp, oxs->cfg.local.host[i]); + asp->cfg.local.host_cnt = oxs->cfg.local.host_cnt; asp->cfg.remote.port = atoi(portbuf); asp->cfg.remote.host[0] = talloc_strdup(asp, hostbuf); asp->cfg.remote.host_cnt = 1; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16013 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I54aada351d5fb74f5015fdfe691d0b237354743c Gerrit-Change-Number: 16013 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:15:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:15:59 +0000 Subject: Change in libosmo-sccp[master]: xua: Don't send NOTIFY messages to IPA ASPs In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16003 ) Change subject: xua: Don't send NOTIFY messages to IPA ASPs ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16003 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ice3d948e4d2f57a8f52cfb93792d5f4d23284b96 Gerrit-Change-Number: 16003 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 08 Nov 2019 15:15:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:16:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:16:03 +0000 Subject: Change in libosmo-sccp[master]: xua: Don't send NOTIFY messages to IPA ASPs In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16003 ) Change subject: xua: Don't send NOTIFY messages to IPA ASPs ...................................................................... xua: Don't send NOTIFY messages to IPA ASPs Change-Id: Ice3d948e4d2f57a8f52cfb93792d5f4d23284b96 --- M src/xua_as_fsm.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index c25902e..394061b 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -233,8 +233,10 @@ if (asp_cmp == asp) continue; - msg = encode_notify(&npar); - osmo_ss7_asp_send(asp, msg); + if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA) { + msg = encode_notify(&npar); + osmo_ss7_asp_send(asp, msg); + } osmo_fsm_inst_state_chg(asp->fi, XUA_ASP_S_INACTIVE, 0, 0); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16003 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ice3d948e4d2f57a8f52cfb93792d5f4d23284b96 Gerrit-Change-Number: 16003 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:16:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:16:40 +0000 Subject: Change in libosmo-sccp[master]: xua: ipa_asp_fsm: Allow moving ASP to inactive state In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 ) Change subject: xua: ipa_asp_fsm: Allow moving ASP to inactive state ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15 Gerrit-Change-Number: 16004 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 08 Nov 2019 15:16:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:17:04 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:17:04 +0000 Subject: Change in libosmo-sccp[master]: xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESP In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16005 ) Change subject: xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESP ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16005 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I99f5346a3854ca07979020245897334197f3cd3b Gerrit-Change-Number: 16005 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 08 Nov 2019 15:17:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:17:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:17:30 +0000 Subject: Change in libosmo-sccp[master]: ss7: Improve log formatting during ASP restart In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16012 ) Change subject: ss7: Improve log formatting during ASP restart ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16012 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I42feaa16790f02b98bcda65281de8cd9295ddcb6 Gerrit-Change-Number: 16012 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 08 Nov 2019 15:17:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:18:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:18:01 +0000 Subject: Change in libosmo-sccp[master]: ss7: Set correct local addr and port during dynamic ASP creation In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16013 ) Change subject: ss7: Set correct local addr and port during dynamic ASP creation ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16013 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I54aada351d5fb74f5015fdfe691d0b237354743c Gerrit-Change-Number: 16013 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 08 Nov 2019 15:18:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:18:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:18:40 +0000 Subject: Change in osmo-pcu[master]: BSSGP: do not reject SUSPEND ACK / NACK messages In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16006 ) Change subject: BSSGP: do not reject SUSPEND ACK / NACK messages ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I780657c1e8f67e0bef0e92a31db7ba61b57d7ec4 Gerrit-Change-Number: 16006 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 15:18:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:18:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:18:49 +0000 Subject: Change in osmo-pcu[master]: BSSGP: properly print BVCI for signalling messages (BVCI=0) In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16007 ) Change subject: BSSGP: properly print BVCI for signalling messages (BVCI=0) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16007 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4ac0f48d2e62cd0545e8a1e1b26c9e43ef5e8dde Gerrit-Change-Number: 16007 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 15:18:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:19:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:19:14 +0000 Subject: Change in osmo-pcu[master]: tests/tbf: suspend warnings about the link quality measurements In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16008 ) Change subject: tests/tbf: suspend warnings about the link quality measurements ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16008 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1c82076df6cd0833d243e1e6afb140bae3bd2ec9 Gerrit-Change-Number: 16008 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 15:19:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:19:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:19:30 +0000 Subject: Change in osmo-pcu[master]: GprsMs::update_cs_ul(): clarify the meaning of old_link_qual In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16009 ) Change subject: GprsMs::update_cs_ul(): clarify the meaning of old_link_qual ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iad703a573621c64613b9b8c229079dc63fcaeb9e Gerrit-Change-Number: 16009 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 15:19:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:19:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:19:31 +0000 Subject: Change in osmo-pcu[master]: BSSGP: do not reject SUSPEND ACK / NACK messages In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16006 ) Change subject: BSSGP: do not reject SUSPEND ACK / NACK messages ...................................................................... BSSGP: do not reject SUSPEND ACK / NACK messages Both BSSGP SUSPEND ACK and NACK messages use BVCI=0 (signaling), which always exists. Claiming that BVCI=0 is unknown is wrong. Instead of adding both BSSGP_PDUT_SUSPEND_{ACK,NACK} to the 'if' statement, let's rather avoid rejection for all BVCI=0 messages, as there may be other unlisted message types. Change-Id: I780657c1e8f67e0bef0e92a31db7ba61b57d7ec4 Related: OS#4111 --- M src/gprs_bssgp_pcu.cpp 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index abcb106..f99058a 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -407,10 +407,7 @@ /* look-up or create the BTS context for this BVC */ bctx = btsctx_by_bvci_nsei(ns_bvci, msgb_nsei(msg)); - if (!bctx - && pdu_type != BSSGP_PDUT_BVC_RESET_ACK - && pdu_type != BSSGP_PDUT_BVC_UNBLOCK_ACK - && pdu_type != BSSGP_PDUT_PAGING_PS) + if (!bctx && ns_bvci != BVCI_SIGNALLING) { LOGP(DBSSGP, LOGL_NOTICE, "NSEI=%u/BVCI=%u Rejecting PDU type %s for unknown BVCI\n", nsei, ns_bvci, bssgp_pdu_str(pdu_type)); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I780657c1e8f67e0bef0e92a31db7ba61b57d7ec4 Gerrit-Change-Number: 16006 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:19:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:19:32 +0000 Subject: Change in osmo-pcu[master]: BSSGP: properly print BVCI for signalling messages (BVCI=0) In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16007 ) Change subject: BSSGP: properly print BVCI for signalling messages (BVCI=0) ...................................................................... BSSGP: properly print BVCI for signalling messages (BVCI=0) Change-Id: I4ac0f48d2e62cd0545e8a1e1b26c9e43ef5e8dde --- M src/gprs_bssgp_pcu.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index f99058a..dd9eb68 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -281,7 +281,7 @@ struct bssgp_normal_hdr *bgph = (struct bssgp_normal_hdr *) msgb_bssgph(msg); enum bssgp_pdu_type pdu_type = (enum bssgp_pdu_type) bgph->pdu_type; int rc = 0; - int bvci = bctx ? bctx->bvci : -1; + int bvci = bctx ? bctx->bvci : msgb_bvci(msg); switch (pdu_type) { case BSSGP_PDUT_STATUS: /* already handled in libosmogb */ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16007 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4ac0f48d2e62cd0545e8a1e1b26c9e43ef5e8dde Gerrit-Change-Number: 16007 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:19:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:19:32 +0000 Subject: Change in osmo-pcu[master]: tests/tbf: suspend warnings about the link quality measurements In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16008 ) Change subject: tests/tbf: suspend warnings about the link quality measurements ...................................................................... tests/tbf: suspend warnings about the link quality measurements Share a single instance of 'pcu_l1_meas' between all unit tests, set initial measurement values in main(). This way we can get rid of the following warnings: Unable to update UL (M)CS CS-X because we don't have link quality measurements. Change-Id: I1c82076df6cd0833d243e1e6afb140bae3bd2ec9 Fixes: OS#3828 --- M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err 2 files changed, 17 insertions(+), 34 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bd4fbc1..bdbc138 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -50,6 +50,9 @@ int16_t spoof_mnc = 0, spoof_mcc = 0; bool spoof_mnc_3_digits = false; +/* Measurements shared by all unit tests */ +static struct pcu_l1_meas meas; + static void check_tbf(gprs_rlcmac_tbf *tbf) { OSMO_ASSERT(tbf); @@ -575,7 +578,6 @@ gprs_rlcmac_ul_tbf *ul_tbf; uint8_t trx_no = 0; struct gprs_rlcmac_pdch *pdch; - struct pcu_l1_meas meas; tfi = the_bts->tfi_find_free(GPRS_RLCMAC_UL_TBF, &trx_no, -1); @@ -610,9 +612,6 @@ uint8_t buf[64]; int num_bytes; struct gprs_rlcmac_pdch *pdch; - struct pcu_l1_meas meas; - - meas.set_rssi(31); rlc_block = bitvec_alloc(23, tall_pcu_ctx); @@ -657,11 +656,9 @@ struct gprs_rlcmac_pdch *pdch; gprs_rlcmac_bts *bts; RlcMacUplink_t ulreq = {0}; - struct pcu_l1_meas meas; struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; GprsCodingScheme cs; - meas.set_rssi(31); bts = the_bts->bts_data(); /* needed to set last_rts_fn in the PDCH object */ @@ -808,11 +805,9 @@ struct gprs_rlcmac_pdch *pdch; gprs_rlcmac_bts *bts; RlcMacUplink_t ulreq = {0}; - struct pcu_l1_meas meas; struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; GprsCodingScheme cs; - meas.set_rssi(31); bts = the_bts->bts_data(); /* needed to set last_rts_fn in the PDCH object */ @@ -1257,10 +1252,8 @@ gprs_rlcmac_ul_tbf *ul_tbf; gprs_rlcmac_bts *bts; RlcMacUplink_t ulreq = {0}; - struct pcu_l1_meas meas; GprsCodingScheme cs; - meas.set_rssi(31); bts = the_bts->bts_data(); /* needed to set last_rts_fn in the PDCH object */ @@ -1326,7 +1319,6 @@ uint8_t trx_no = 0; int tfi = 0; struct gprs_rlcmac_pdch *pdch; - struct pcu_l1_meas meas; GprsCodingScheme cs; @@ -1409,7 +1401,6 @@ uint8_t trx_no = 0; int tfi = 0; struct gprs_rlcmac_pdch *pdch; - struct pcu_l1_meas meas; GprsCodingScheme cs; check_tbf(ul_tbf); @@ -1492,7 +1483,6 @@ int tfi = 0; gprs_rlcmac_ul_tbf *ul_tbf; struct gprs_rlcmac_pdch *pdch; - struct pcu_l1_meas meas; GprsCodingScheme cs; @@ -1583,8 +1573,6 @@ struct gprs_rlcmac_pdch *pdch; gprs_rlcmac_bts *bts; RlcMacUplink_t ulreq = {0}; - struct pcu_l1_meas meas; - meas.set_rssi(31); bts = the_bts->bts_data(); @@ -2370,14 +2358,12 @@ struct gprs_rlcmac_pdch *pdch; gprs_rlcmac_bts *bts; RlcMacUplink_t ulreq = {0}; - struct pcu_l1_meas meas; struct gprs_rlc_ul_header_egprs_3 *egprs3 = NULL; GprsCodingScheme cs; Packet_Resource_Request_t *presreq = NULL; MS_Radio_Access_capability_t *pmsradiocap = NULL; Multislot_capability_t *pmultislotcap = NULL; - meas.set_rssi(31); bts = the_bts->bts_data(); /* needed to set last_rts_fn in the PDCH object */ @@ -3298,6 +3284,10 @@ vty_init(&pcu_vty_info); pcu_vty_init(); + /* Initialize shared UL measurements */ + meas.set_link_qual(12); + meas.set_rssi(31); + test_tbf_base(); test_tbf_tlli_update(); test_tbf_final_ack(TEST_MODE_STANDARD); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 7dd14f4..6e638af 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1470,7 +1470,7 @@ - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=0 USF=0 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1548,7 +1548,6 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -1563,7 +1562,6 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1632,7 +1630,6 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -1647,7 +1644,6 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1764,7 +1760,6 @@ Modifying MS object, TLLI = 0xf5667788, TA 220 -> 7 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. Received RTS for PDCH: TRX=0 TS=7 FN=2654335 block_nr=11 scheduling USF=0 for required uplink resource of UL TFI=0 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ @@ -1780,7 +1775,6 @@ TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=1, CPS=0, RSB=0, rc=184 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) UL DATA TFI=1 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-4 because we don't have link quality measurements. TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1833,7 +1827,7 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -1848,7 +1842,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1926,7 +1920,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI 0011223344): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-3 -> CS-4 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -1962,7 +1956,6 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec, cur_fn=0 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2006,7 +1999,7 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -2021,7 +2014,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2092,7 +2085,7 @@ - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=0 USF=0 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2157,7 +2150,7 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -2172,7 +2165,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2836,7 +2829,7 @@ TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) set ass. type PACCH [prev CCCH:0, PACCH:0] TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec, cur_fn=0 -Unable to update UL (M)CS CS-1 because we don't have link quality measurements. +MS (IMSI 0011223344): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-3 -> CS-4 Received RTS for PDCH: TRX=0 TS=7 FN=2654400 block_nr=2 scheduling USF=0 for required uplink resource of UL TFI=0 TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) start Packet Downlink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16008 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1c82076df6cd0833d243e1e6afb140bae3bd2ec9 Gerrit-Change-Number: 16008 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:19:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:19:33 +0000 Subject: Change in osmo-pcu[master]: GprsMs::update_cs_ul(): clarify the meaning of old_link_qual In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16009 ) Change subject: GprsMs::update_cs_ul(): clarify the meaning of old_link_qual ...................................................................... GprsMs::update_cs_ul(): clarify the meaning of old_link_qual Change-Id: Iad703a573621c64613b9b8c229079dc63fcaeb9e --- M src/gprs_ms.cpp M tests/tbf/TbfTest.err 2 files changed, 15 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp index 5b35e65..8074cb4 100644 --- a/src/gprs_ms.cpp +++ b/src/gprs_ms.cpp @@ -648,8 +648,6 @@ return; } - old_link_qual = meas->link_qual; - if (mcs_is_gprs(m_current_cs_ul)) { if (current_cs >= MAX_GPRS_CS) current_cs = MAX_GPRS_CS - 1; @@ -667,8 +665,12 @@ return; } + /* To avoid rapid changes of the coding scheme, we also take + * the old link quality value into account (if present). */ if (m_l1_meas.have_link_qual) old_link_qual = m_l1_meas.link_qual; + else + old_link_qual = meas->link_qual; if (meas->link_qual < low && old_link_qual < low) new_cs_ul.dec(mode()); @@ -679,7 +681,7 @@ if (m_current_cs_ul != new_cs_ul) { LOGP(DRLCMACMEAS, LOGL_INFO, "MS (IMSI %s): " - "Link quality %ddB (%ddB) left window [%d, %d], " + "Link quality %ddB (old %ddB) left window [%d, %d], " "modifying uplink CS level: %s -> %s\n", imsi(), meas->link_qual, old_link_qual, low, high, diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 6e638af..8ec3e80 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1470,7 +1470,7 @@ - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=0 USF=0 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 +MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1827,7 +1827,7 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 +MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -1842,7 +1842,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 +MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -1920,7 +1920,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -MS (IMSI 0011223344): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-3 -> CS-4 +MS (IMSI 0011223344): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-3 -> CS-4 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -1999,7 +1999,7 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 +MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -2014,7 +2014,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 +MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2085,7 +2085,7 @@ - TRX=0 (0) TS=7 TA=7 TSC=0 TFI=0 USF=0 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 +MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2150,7 +2150,7 @@ Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assinment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS -MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 +MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- @@ -2165,7 +2165,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -MS (IMSI ): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 +MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-2 -> CS-3 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer T3169 [acked (data)] with 5 sec. 0 microsec, cur_fn=0 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=15, BSN=0, SPB=0, PI=0, E=1, TI=0, bitoffs=24 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) @@ -2829,7 +2829,7 @@ TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=NULL) changes state from NULL to ASSIGN TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) set ass. type PACCH [prev CCCH:0, PACCH:0] TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PACCH)] with 2 sec. 0 microsec, cur_fn=0 -MS (IMSI 0011223344): Link quality 12dB (12dB) left window [0, 0], modifying uplink CS level: CS-3 -> CS-4 +MS (IMSI 0011223344): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-3 -> CS-4 Received RTS for PDCH: TRX=0 TS=7 FN=2654400 block_nr=2 scheduling USF=0 for required uplink resource of UL TFI=0 TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) start Packet Downlink Assignment (PACCH) +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16009 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iad703a573621c64613b9b8c229079dc63fcaeb9e Gerrit-Change-Number: 16009 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:19:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:19:52 +0000 Subject: Change in osmo-sysmon[master]: simple_ctrl: Don't cause an error if GET response is empty In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16000 ) Change subject: simple_ctrl: Don't cause an error if GET response is empty ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: I0be48c89595e71ac4dfa1b8ad1890296f2013476 Gerrit-Change-Number: 16000 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 15:19:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:20:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:20:24 +0000 Subject: Change in osmo-sysmon[master]: simple_ctrl: Don't cause an error if GET response is empty In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16000 ) Change subject: simple_ctrl: Don't cause an error if GET response is empty ...................................................................... simple_ctrl: Don't cause an error if GET response is empty Change-Id: I0be48c89595e71ac4dfa1b8ad1890296f2013476 Sponsored-by: On-Waves ehf. --- M src/simple_ctrl.c 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/simple_ctrl.c b/src/simple_ctrl.c index 883e92f..9407218 100644 --- a/src/simple_ctrl.c +++ b/src/simple_ctrl.c @@ -283,7 +283,11 @@ return NULL; rc = sscanf(msgb_l2(resp), "GET_REPLY %u %ms %ms", &rx_id, &rx_var, &rx_val); - if (rc == 3) { + if ((rc == 2) || (rc == 3)) { + /* If body is empty return an empty string */ + if (rc == 2) + rx_val = strdup(""); + if (rx_id == sch->next_id-1 && !strcmp(var, rx_var)) { free(rx_var); msgb_free(resp); -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: I0be48c89595e71ac4dfa1b8ad1890296f2013476 Gerrit-Change-Number: 16000 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 15:21:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 15:21:05 +0000 Subject: Change in osmo-sysmon[master]: Add oneshot mode that exits after one iteration In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16002 ) Change subject: Add oneshot mode that exits after one iteration ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16002 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: Id920c4afee633b8da6919b7b318f9c868890a176 Gerrit-Change-Number: 16002 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 15:21:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 16:30:58 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 16:30:58 +0000 Subject: Change in libosmo-abis[master]: ipa: Allow setting local addr and port for struct ipa_client_conn References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/16014 ) Change subject: ipa: Allow setting local addr and port for struct ipa_client_conn ...................................................................... ipa: Allow setting local addr and port for struct ipa_client_conn Change-Id: I3133c6b01647506a5b9c67e4699bcad3ff59f843 --- M TODO-RELEASE M include/osmocom/abis/ipa.h M src/input/ipa.c M src/input/ipaccess.c M src/ipa_proxy.c 5 files changed, 41 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/14/16014/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..4fe42c6 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,5 @@ # 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 +libosmo-abis struct ipa_client_conn Fields added at the end (no ABI break because instance is created through API func) +libosmo-abis ipa_client_conn_create2() New API added diff --git a/include/osmocom/abis/ipa.h b/include/osmocom/abis/ipa.h index ff00697..4764a95 100644 --- a/include/osmocom/abis/ipa.h +++ b/include/osmocom/abis/ipa.h @@ -78,6 +78,8 @@ int (*write_cb)(struct ipa_client_conn *link); void *data; struct msgb *pending_msg; + const char *local_addr; + uint16_t local_port; }; struct ipa_client_conn * @@ -86,7 +88,16 @@ void (*updown)(struct ipa_client_conn *link, int), int (*read_cb)(struct ipa_client_conn *link, struct msgb *msgb), int (*write_cb)(struct ipa_client_conn *link), - void *data); + void *data) OSMO_DEPRECATED("Use ipa_client_conn_create2() instead"); +struct ipa_client_conn * +ipa_client_conn_create2(void *ctx, struct e1inp_ts *ts, + int priv_nr, const char *loc_addr, uint16_t loc_port, + const char *rem_addr, uint16_t rem_port, + void (*updown_cb)(struct ipa_client_conn *link, int up), + int (*read_cb)(struct ipa_client_conn *link, + struct msgb *msgb), + int (*write_cb)(struct ipa_client_conn *link), + void *data); void ipa_client_conn_destroy(struct ipa_client_conn *link); int ipa_client_conn_open(struct ipa_client_conn *link); diff --git a/src/input/ipa.c b/src/input/ipa.c index b4dbcb0..0f67dca 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -155,6 +155,20 @@ int (*write_cb)(struct ipa_client_conn *link), void *data) { + return ipa_client_conn_create2(ctx, ts, priv_nr, NULL, 0, addr, port, + updown_cb, read_cb, write_cb, data); +} + +struct ipa_client_conn * +ipa_client_conn_create2(void *ctx, struct e1inp_ts *ts, + int priv_nr, const char *loc_addr, uint16_t loc_port, + const char *rem_addr, uint16_t rem_port, + void (*updown_cb)(struct ipa_client_conn *link, int up), + int (*read_cb)(struct ipa_client_conn *link, + struct msgb *msgb), + int (*write_cb)(struct ipa_client_conn *link), + void *data) +{ struct ipa_client_conn *ipa_link; ipa_link = talloc_zero(ctx, struct ipa_client_conn); @@ -181,8 +195,10 @@ ipa_link->ofd->data = ipa_link; ipa_link->ofd->fd = -1; ipa_link->state = IPA_CLIENT_LINK_STATE_CONNECTING; - ipa_link->addr = talloc_strdup(ipa_link, addr); - ipa_link->port = port; + ipa_link->local_addr = talloc_strdup(ipa_link, loc_addr); + ipa_link->local_port = loc_port; + ipa_link->addr = talloc_strdup(ipa_link, rem_addr); + ipa_link->port = rem_port; ipa_link->updown_cb = updown_cb; ipa_link->read_cb = read_cb; /* default to generic write callback if not set. */ @@ -209,9 +225,10 @@ int ret; link->state = IPA_CLIENT_LINK_STATE_CONNECTING; - ret = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP, + ret = osmo_sock_init2(AF_INET, SOCK_STREAM, IPPROTO_TCP, + link->local_addr, link->local_port, link->addr, link->port, - OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK); + OSMO_SOCK_F_BIND|OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK); if (ret < 0) return ret; link->ofd->fd = ret; diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 474bfb4..0f8e2d5 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -896,9 +896,10 @@ "OML connecting to %s:%u\n", line->ops->cfg.ipa.addr, IPA_TCP_PORT_OML); - link = ipa_client_conn_create(tall_ipa_ctx, + link = ipa_client_conn_create2(tall_ipa_ctx, e1inp_line_ipa_oml_ts(line), E1INP_SIGN_OML, + NULL, 0, line->ops->cfg.ipa.addr, IPA_TCP_PORT_OML, ipaccess_bts_updown_cb, @@ -946,9 +947,10 @@ return -EINVAL; } - rsl_link = ipa_client_conn_create(tall_ipa_ctx, + rsl_link = ipa_client_conn_create2(tall_ipa_ctx, e1inp_line_ipa_rsl_ts(line, trx_nr), E1INP_SIGN_RSL+trx_nr, + NULL, 0, rem_addr, rem_port, ipaccess_bts_updown_cb, ipaccess_bts_read_cb, diff --git a/src/ipa_proxy.c b/src/ipa_proxy.c index 44f5baf..980add7 100644 --- a/src/ipa_proxy.c +++ b/src/ipa_proxy.c @@ -184,7 +184,8 @@ LOGP(DLINP, LOGL_NOTICE, "now trying to connect to destination\n"); - conn->dst = ipa_client_conn_create(NULL, NULL, 0, + conn->dst = ipa_client_conn_create2(NULL, NULL, 0, + NULL, 0, route->shared->dst.inst->net.addr, route->shared->dst.inst->net.port, NULL, -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/16014 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I3133c6b01647506a5b9c67e4699bcad3ff59f843 Gerrit-Change-Number: 16014 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 17:33:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 17:33:03 +0000 Subject: Change in libosmo-abis[master]: ipa: Allow setting local addr and port for struct ipa_client_conn In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/16014 ) Change subject: ipa: Allow setting local addr and port for struct ipa_client_conn ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/16014 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I3133c6b01647506a5b9c67e4699bcad3ff59f843 Gerrit-Change-Number: 16014 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 08 Nov 2019 17:33:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 17:33:27 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 17:33:27 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15999 ) Change subject: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies ...................................................................... Patch Set 4: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 Gerrit-Change-Number: 15999 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 17:33:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 17:33:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 17:33:40 +0000 Subject: Change in docker-playground[master]: ttcn3-stp/Makefile: Set branch to laforge/stp only if envvar not set In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15998 ) Change subject: ttcn3-stp/Makefile: Set branch to laforge/stp only if envvar not set ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15998 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I1f4061f2b1d62e6a42af4629ce462269cfaf317f Gerrit-Change-Number: 15998 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 08 Nov 2019 17:33:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 17:33:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 17:33:42 +0000 Subject: Change in docker-playground[master]: ttcn3-stp/Makefile: Set branch to laforge/stp only if envvar not set In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15998 ) Change subject: ttcn3-stp/Makefile: Set branch to laforge/stp only if envvar not set ...................................................................... ttcn3-stp/Makefile: Set branch to laforge/stp only if envvar not set Change-Id: I1f4061f2b1d62e6a42af4629ce462269cfaf317f --- M ttcn3-stp-test/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ttcn3-stp-test/Makefile b/ttcn3-stp-test/Makefile index 76fdbfc..4bf2fff 100644 --- a/ttcn3-stp-test/Makefile +++ b/ttcn3-stp-test/Makefile @@ -1,4 +1,4 @@ RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.2.202 -v ggsn-test-vol:/data -OSMO_TTCN3_BRANCH="laforge/stp" +OSMO_TTCN3_BRANCH?="laforge/stp" include ../make/Makefile -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15998 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I1f4061f2b1d62e6a42af4629ce462269cfaf317f Gerrit-Change-Number: 15998 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 17:33:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 8 Nov 2019 17:33:42 +0000 Subject: Change in docker-playground[master]: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/15999 ) Change subject: ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies ...................................................................... ttcn3-stp: Update osmo-stp.cfg to match new TTCN3 tests expectancies Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 --- M ttcn3-stp-test/osmo-stp.cfg 1 file changed, 66 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ttcn3-stp-test/osmo-stp.cfg b/ttcn3-stp-test/osmo-stp.cfg index d50e7c2..a9e377f 100644 --- a/ttcn3-stp-test/osmo-stp.cfg +++ b/ttcn3-stp-test/osmo-stp.cfg @@ -47,6 +47,9 @@ ! cs7 instance 0 point-code format 24 +! +!M3UA AS/ASP: +! asp asp-sender 9999 2905 m3ua local-ip 172.18.19.200 remote-ip 172.18.19.203 @@ -56,6 +59,11 @@ asp asp-receiver1 10001 2905 m3ua local-ip 172.18.19.200 remote-ip 172.18.19.203 + asp asp-client0 10002 2906 m3ua + local-ip 172.18.19.200 + remote-ip 172.18.19.203 + sctp-role client + role asp as as-sender m3ua asp asp-sender routing-key 1023 23 @@ -63,12 +71,69 @@ asp asp-receiver0 asp asp-receiver1 routing-key 1042 42 - as mahlzeit ipa + as as-client m3ua + routing-key 1055 55 + asp asp-client0 +! +! IPA AS/ASP: +! + asp ipa-asp-loadshare-sender 20000 5000 ipa + local-ip 172.18.19.200 + remote-ip 172.18.19.203 +! LOADSHARE: + as ipa-as-loadshare-sender ipa + routing-key 0 6 + point-code override dpc 31 + asp ipa-asp-loadshare-sender + asp ipa-asp-loadshare-receiver0 20001 5000 ipa + local-ip 172.18.19.200 + remote-ip 172.18.19.203 + asp ipa-asp-loadshare-receiver1 20002 5000 ipa + local-ip 172.18.19.200 + remote-ip 172.18.19.203 + as ipa-as-loadshare-receiver ipa + traffic-mode loadshare + routing-key 0 7 + point-code override dpc 32 + asp ipa-asp-loadshare-receiver0 + asp ipa-asp-loadshare-receiver1 +! OVERRIDE: + asp ipa-asp-override-sender 20004 5000 ipa + local-ip 172.18.19.200 + remote-ip 172.18.19.203 + as ipa-as-override-sender ipa + routing-key 0 6 + point-code override dpc 33 + asp ipa-asp-override-sender + asp ipa-asp-override-receiver0 20005 5000 ipa + local-ip 172.18.19.200 + remote-ip 172.18.19.203 + asp ipa-asp-override-receiver1 20006 5000 ipa + local-ip 172.18.19.200 + remote-ip 172.18.19.203 + as ipa-as-override-receiver ipa + traffic-mode override + routing-key 0 8 + point-code override dpc 34 + asp ipa-asp-override-receiver0 + asp ipa-asp-override-receiver1 +! DYNAMIC AS: + as ipa-as-dynamic-asp ipa routing-key 0 5 point-code override dpc 23 +! +! ROUTING TABLE: +! route-table system update route 23 16777215 linkset as-sender update route 42 16777215 linkset as-receiver + update route 55 16777215 linkset as-client + update route 31 16777215 linkset ipa-as-loadshare-receiver + update route 33 16777215 linkset ipa-as-override-receiver + update route 5 16777215 linkset ipa-as-dynamic-asp +! +!SERVERS: +! listen m3ua 2905 accept-asp-connections dynamic-permitted listen ipa 5000 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/15999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: If3b3b7f1c05bcd2b0ea2b1ef6f432eb5f0013026 Gerrit-Change-Number: 15999 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Fri Nov 8 18:01:27 2019 From: admin at opensuse.org (OBS Notification) Date: Fri, 08 Nov 2019 18:01:27 +0000 Subject: Build failure of network:osmocom:latest/limesuite in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5dc5ad8b8d82a_6bd52aaf8692e5f4163657@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/limesuite/Raspbian_10/armv7l Package network:osmocom:latest/limesuite failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest limesuite Last lines of build log: [ 567s] [ 85%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o [ 567s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -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 -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/LTEpackets -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/src/HPM7 -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -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 -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlLimeSDR.cpp [ 567s] [ 86%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o [ 567s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -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 -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/LTEpackets -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/src/HPM7 -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -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 -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlGPIO.cpp [ 579s] [ 87%] Linking CXX executable ../bin/LimeSuiteGUI [ 579s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/LimeSuiteGUI.dir/link.txt --verbose=1 [ 579s] /usr/bin/c++ -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 -O3 -DNDEBUG -Wl,-z,relro -rdynamic CMakeFiles/LimeSuiteGUI.dir/ADF4002/ADF4002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlXBUF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCalibrations_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTRF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCDS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLimeLightPAD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIST_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewIRAM.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_gui_utilities.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlSX_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgVCOfrequencies.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLDO_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlAFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlGains_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/CoefficientFileParser.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_mainPanel.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/pnlBoardControls.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewSFR.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCLKGEN_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlMCU_BD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIAS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgGFIR_Coefficients.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlR3.cpp.o CMakeFiles/LimeSuiteGUI.dir/LMS_Programing/LMS_Programing_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgConnectionSettings.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlMiniLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/SPI_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgFullMessageLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgDeviceInfo.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/utilities_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteAppFrame.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/lms7002m_novena_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/RFSpark/RFSpark_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/Si5351C/Si5351C_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp.cpp.o CMakeFiles/LimeSuiteGUI.dir/FPGAcontrols_wxgui/FPGAcontrols_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/HPM7/HPM7_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/dlgAbout.cpp.o CMakeFiles/LimeSuiteGUI.dir/numericSlider/numericSlider.cpp.o CMakeFiles/LimeSuiteGUI.dir/myriad7/myriad7_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_frFFTviewer.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteEvents/lms7suiteEvents.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlQSpark.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnluLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlUltimateEVB.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBuffers.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlCoreSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeNetMicro.cpp.o CMakeFiles/LimeSuiteGUI.dir/__/external/kissFFT/kiss_fft.c.o CMakeFiles/LimeSuiteGUI.dir/windowFunction.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -o ../bin/LimeSuiteGUI -Wl,-rpath,/usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src: libLimeSuite.so.19.04.0 oglGraph/liboglGraph.a -L/usr/lib/arm-linux-gnueabihf -pthread -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 -lusb-1.0 -lGL -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 [ 584s] /usr/bin/ld: libLimeSuite.so.19.04.0: undefined reference to `__atomic_store_8' [ 584s] /usr/bin/ld: libLimeSuite.so.19.04.0: undefined reference to `__atomic_load_8' [ 584s] collect2: error: ld returned 1 exit status [ 584s] make[3]: *** [src/CMakeFiles/LimeSuiteGUI.dir/build.make:975: bin/LimeSuiteGUI] Error 1 [ 584s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 584s] make[2]: *** [CMakeFiles/Makefile2:142: src/CMakeFiles/LimeSuiteGUI.dir/all] Error 2 [ 584s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 584s] make[1]: *** [Makefile:133: all] Error 2 [ 584s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 584s] dh_auto_build: cd obj-arm-linux-gnueabihf && make -j4 returned exit code 2 [ 584s] make: *** [debian/rules:28: binary] Error 2 [ 584s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 584s] [ 584s] armbuild21 failed "build limesuite_19.04.0-1.dsc" at Fri Nov 8 18:01:08 UTC 2019. [ 584s] [ 584s] ### VM INTERACTION START ### [ 587s] [ 566.303767] sysrq: SysRq : Power Off [ 587s] [ 566.351204] reboot: Power down [ 588s] ### VM INTERACTION END ### [ 588s] [ 588s] armbuild21 failed "build limesuite_19.04.0-1.dsc" at Fri Nov 8 18:01:12 UTC 2019. [ 588s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 8 18:10:46 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 18:10:46 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_destroy(): fix NULL-pointer dereference In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/15281 ) Change subject: gprs_bssgp_destroy(): fix NULL-pointer dereference ...................................................................... Patch Set 3: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/15281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I42cb911a679b9198fd06e74b42f1e2cb28323de9 Gerrit-Change-Number: 15281 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 18:10:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 18:24:51 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 18:24:51 +0000 Subject: Change in osmo-sgsn[master]: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 ) Change subject: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach ...................................................................... gmm: Fix assertion hit during RA UPD REQ before completting gmm attach Output: 20191107021548500 DMM <0002> gprs_gb.c:40 MM_STATE_Gb(2596296189)[0x6120000084a0]{Idle}: Received Event E_MM_PDU_RECEPTION 20191107021548500 DMM <0002> gprs_gmm.c:1531 MM(/d4b6d7af) -> GMM RA UPDATE REQUEST type="RA updating" 20191107021548501 DMM <0002> gprs_gmm.c:1615 MM(/d4b6d7af) The MM context cannot be used, RA: 901-70-2758-208 Assert failed mmctx->gb.llme == NULL gprs_gmm.c:1620 Scenario reproducing the crash can be triggered with TTCN3 SGSN_Tests.TC_attach_req_id_req_ra_update. Basically, SGSN first receives an ATTACH REQ with a given RA ID, then SGSN switches to state CommonProcedureInitiated and sends GMM ID REQ, and MS/PCU answers immediatelly with a RA Update instead with a new RA ID. Related: OS#3957, OS#4245 Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6 --- M src/sgsn/gprs_gmm.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/15/16015/1 diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index b6b1685..17daa7d 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1615,9 +1615,9 @@ osmo_rai_name(&mmctx->ra)); /* mmctx is set to NULL and gprs_llgmm_unassign(llme) will be called below, let's make sure we don't keep dangling llme - pointers in mmctx (OS#3957). */ + pointers in mmctx (OS#3957, OS#4245). */ if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) - OSMO_ASSERT(mmctx->gb.llme == NULL); + mmctx->gb.llme = NULL; mmctx = NULL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6 Gerrit-Change-Number: 16015 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 18:30:56 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 18:30:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 ) Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update ...................................................................... sgsn: Introduce test TC_attach_req_id_req_ra_update The scenario in this test triggers a crash in osmo-sgsn fixed by osmo-sgsn.git I64fa5cf1b427d3abb99e553e584897261a827ce6. With that osmo-sgsn patch applied, the process doesn't crash anymore but the test still fails due to an XID message being sent with a new yet-not-seen-by-ttcn3 TLLI and as a result TTCN3 BSSGP_Emulation fails: BSSGP_Emulation.ttcn:390 setverdict(fail): none -> fail reason: "Couldn't find Component for TLLI 'FE791757'O", new component reason: "Couldn't find Component for TLLI 'FE791757'O" Other than that, the test runs fine. It still needs to be clarified whether the new TLLI sent by osmo-sgsn is expected and test needs to be fixed, or whether it's an sgsn bug. Related: OS#3957, OS#4245 Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 --- M sgsn/SGSN_Tests.ttcn M sgsn/expected-results.xml 2 files changed, 36 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/16016/1 diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index a89a949..a643ce4 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -2814,6 +2814,38 @@ f_cleanup(); } +private function f_TC_attach_req_id_req_ra_update(charstring id) runs on BSSGP_ConnHdlr { + var RoutingAreaIdentificationV old_ra := f_random_RAI(); + var RoutingAreaIdentificationV new_ra := f_random_RAI(); /* TODO: make sure old_ra != new_ra */ + var template PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit); + var PDU_L3_SGSN_MS l3_mt; + + f_send_l3(attach_req, 0); + + BSSGP[0].receive(tr_GMM_ID_REQ('010'B)); + + f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, new_ra, false, omit, omit)); + alt { + [] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) { + setverdict(pass); + } + [] BSSGP[0].receive { repeat; } + } +} + +testcase TC_attach_req_id_req_ra_update() runs on test_CT { + /* + * MS --> SGSN: Attach Req (TMSI, RAI=901-70-356-101) + * MS <-- SGSN: Identity Request (IMEI) + * MS --> SGSN: RA Updating (RAI=901-70-2758-208) + */ + var BSSGP_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_TC_attach_req_id_req_ra_update), testcasename(), g_gb, 26); + vc_conn.done; + f_cleanup(); +} + control { execute( TC_attach() ); execute( TC_attach_mnc3() ); @@ -2870,6 +2902,9 @@ execute( TC_llc_null() ); execute( TC_llc_sabm_dm_llgmm() ); execute( TC_llc_sabm_dm_ll5() ); + + /* At the end, may crash osmo-sgsn, see OS#3957, OS#4245 */ + execute( TC_attach_req_id_req_ra_update() ); } diff --git a/sgsn/expected-results.xml b/sgsn/expected-results.xml index fc8856a..8381064 100644 --- a/sgsn/expected-results.xml +++ b/sgsn/expected-results.xml @@ -62,4 +62,5 @@ + -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 Gerrit-Change-Number: 16016 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 18:45:36 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 18:45:36 +0000 Subject: Change in libosmocore[master]: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16017 ) Change subject: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() ...................................................................... GPRS/BSSGP: introduce bssgp_bvc_ctx_free() Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 --- M TODO-RELEASE M include/osmocom/gprs/gprs_bssgp.h M src/gb/gprs_bssgp.c M src/gb/libosmogb.map 4 files changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/16017/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 9af92c1..692bdc1 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -10,3 +10,4 @@ core osmo_tdef_get() change val_if_not_present arg from unsigned long to long to allow passing -1 core struct osmo_tdef fields min_val,max_val added, ABI break (arrays of structs used in programs) gsm API added osmo_gsm48_rfpowercap2powerclass() +gb API added bssgp_bvc_ctx_free() diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h index 400c3e0..0f87333 100644 --- a/include/osmocom/gprs/gprs_bssgp.h +++ b/include/osmocom/gprs/gprs_bssgp.h @@ -112,6 +112,8 @@ struct bssgp_bvc_ctx *btsctx_by_raid_cid(const struct gprs_ra_id *raid, uint16_t cid); /* Find a BTS context based on BVCI+NSEI tuple */ struct bssgp_bvc_ctx *btsctx_by_bvci_nsei(uint16_t bvci, uint16_t nsei); +/* Free a given BTS context */ +void bssgp_bvc_ctx_free(struct bssgp_bvc_ctx *ctx); #define BVC_F_BLOCKED 0x0001 diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index b695c28..d98e4fa 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -141,6 +141,13 @@ return ctx; } +void bssgp_bvc_ctx_free(struct bssgp_bvc_ctx *ctx) +{ + rate_ctr_group_free(ctx->ctrg); + llist_del(&ctx->list); + talloc_free(ctx); +} + /* Chapter 10.4.5: Flow Control BVC ACK */ static int bssgp_tx_fc_bvc_ack(uint16_t nsei, uint8_t tag, uint16_t ns_bvci) { diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map index 5e675a6..ad139c1 100644 --- a/src/gb/libosmogb.map +++ b/src/gb/libosmogb.map @@ -80,6 +80,7 @@ gprs_log_filter_fn; btsctx_alloc; +bssgp_bvc_ctx_free; btsctx_by_bvci_nsei; btsctx_by_raid_cid; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 Gerrit-Change-Number: 16017 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 18:52:49 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 18:52:49 +0000 Subject: Change in libosmocore[master]: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16017 to look at the new patch set (#2). Change subject: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() ...................................................................... GPRS/BSSGP: introduce bssgp_bvc_ctx_free() So far we had a function to allocate a new bssgp_bvc_ctx, but not the opposite one. Let's finally introduce it, so it will be used at least in OsmoPCU. Please note that the new symbol has 'bssgp_' prefix, not 'btsctx_'. Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 --- M TODO-RELEASE M include/osmocom/gprs/gprs_bssgp.h M src/gb/gprs_bssgp.c M src/gb/libosmogb.map 4 files changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/16017/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 Gerrit-Change-Number: 16017 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:05:14 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 19:05:14 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_destroy(): fix NULL-pointer dereference In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/15281 to look at the new patch set (#4). Change subject: gprs_bssgp_destroy(): fix NULL-pointer dereference ...................................................................... gprs_bssgp_destroy(): fix NULL-pointer dereference The 'gprs_bssgp_pcu' may not be initialized in some cases, e.g. when OsmoPCU is terminated before connecting to the SGSN. Make sure it was allocated before trying to release it. Change-Id: I42cb911a679b9198fd06e74b42f1e2cb28323de9 --- M src/gprs_bssgp_pcu.cpp 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/81/15281/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/15281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I42cb911a679b9198fd06e74b42f1e2cb28323de9 Gerrit-Change-Number: 15281 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:05:14 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 19:05:14 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_destroy(): fix memleak: use bssgp_bvc_ctx_free() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16018 ) Change subject: gprs_bssgp_destroy(): fix memleak: use bssgp_bvc_ctx_free() ...................................................................... gprs_bssgp_destroy(): fix memleak: use bssgp_bvc_ctx_free() So far there was a memory leak, because free()ing 'the_pcu.bctx' would cause ASAN to complain. And that's reasonable, because it needs to be freed properly. Use the new libosmogb's API for that. Change-Id: I274e79e1746c7678b81720ec11e8a564befe38ba Depends: Ia78979379dbdccd6e4628c16f00d0c06d9212172 --- M src/gprs_bssgp_pcu.cpp 1 file changed, 1 insertion(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/18/16018/1 diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index abcb106..f367ae2 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -974,12 +974,7 @@ gprs_ns_destroy(nsi); - /* FIXME: move this to libgb: btsctx_free() */ - llist_del(&the_pcu.bctx->list); -#warning "This causes ASAN to complain. It is not critical for normal operation but should be fixed nevertheless" -#if 0 - talloc_free(the_pcu.bctx); -#endif + bssgp_bvc_ctx_free(the_pcu.bctx); the_pcu.bctx = NULL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I274e79e1746c7678b81720ec11e8a564befe38ba Gerrit-Change-Number: 16018 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:06:11 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 19:06:11 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 to look at the new patch set (#2). Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update ...................................................................... sgsn: Introduce test TC_attach_req_id_req_ra_update The scenario in this test triggers a crash in osmo-sgsn fixed by osmo-sgsn.git I64fa5cf1b427d3abb99e553e584897261a827ce6. With that osmo-sgsn patch applied, the process doesn't crash anymore but the test still fails due to an XID message being sent with a new yet-not-seen-by-ttcn3 TLLI and as a result TTCN3 BSSGP_Emulation fails: BSSGP_Emulation.ttcn:390 setverdict(fail): none -> fail reason: "Couldn't find Component for TLLI 'FE791757'O", new component reason: "Couldn't find Component for TLLI 'FE791757'O" Other than that, the test runs fine. It still needs to be clarified whether the new TLLI sent by osmo-sgsn is expected and test needs to be fixed, or whether it's an sgsn bug. Related: OS#3957, OS#4245 Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 --- M sgsn/SGSN_Tests.ttcn M sgsn/expected-results.xml 2 files changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/16016/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 Gerrit-Change-Number: 16016 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:09:12 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 19:09:12 +0000 Subject: Change in libosmocore[master]: core/defs.h: introduce and use OSMO_DEPRECATED_OUTSIDE In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14864 ) Change subject: core/defs.h: introduce and use OSMO_DEPRECATED_OUTSIDE ...................................................................... Patch Set 3: (2 comments) Please explain better why you are changing the behavior. https://gerrit.osmocom.org/c/libosmocore/+/14864/3/include/osmocom/core/defs.h File include/osmocom/core/defs.h: https://gerrit.osmocom.org/c/libosmocore/+/14864/3/include/osmocom/core/defs.h at 46 PS3, Line 46: # define OSMO_DEPRECATED_OUTSIDE(text) It's more clear if you keep and extend older name: OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE_TXT(text) https://gerrit.osmocom.org/c/libosmocore/+/14864/3/include/osmocom/gsm/gsm48_ie.h File include/osmocom/gsm/gsm48_ie.h: https://gerrit.osmocom.org/c/libosmocore/+/14864/3/include/osmocom/gsm/gsm48_ie.h at 18 PS3, Line 18: OSMO_DEPRECATED_OUTSIDE("Use gsm48_decode_bcd_number2() for improved bounds checking"); Why shouldn't libosmocore use gsm48_decode_bcd_number2? In some specific cases, it may make more sense to disable the relative pragma for deprecation and enable it afterwards after using the function. I'm pretty sure that can be done and is far more clear. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14864 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1b0eff1396776900c1286e41da3aee3ff78b326e Gerrit-Change-Number: 14864 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 19:09:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:10:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 19:10:27 +0000 Subject: Change in libosmocore[master]: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16017 ) Change subject: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() ...................................................................... Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16017/2/src/gb/gprs_bssgp.c File src/gb/gprs_bssgp.c: https://gerrit.osmocom.org/c/libosmocore/+/16017/2/src/gb/gprs_bssgp.c at 146 PS2, Line 146: rate_ctr_group_free(ctx->ctrg); Missing check against ctx being NULL. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 Gerrit-Change-Number: 16017 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 19:10:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:11:03 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 19:11:03 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_destroy(): fix memleak: use bssgp_bvc_ctx_free() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16018 ) Change subject: gprs_bssgp_destroy(): fix memleak: use bssgp_bvc_ctx_free() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I274e79e1746c7678b81720ec11e8a564befe38ba Gerrit-Change-Number: 16018 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 19:11:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:11:35 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 19:11:35 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_destroy(): fix NULL-pointer dereference In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/15281 ) Change subject: gprs_bssgp_destroy(): fix NULL-pointer dereference ...................................................................... Patch Set 4: Code-Review-2 (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/15281/4/src/gprs_bssgp_pcu.cpp File src/gprs_bssgp_pcu.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/15281/4/src/gprs_bssgp_pcu.cpp at 977 PS4, Line 977: if (the_pcu.bctx != NULL) { Better move this into the free() API. free() APIs are usually expected to allow NULL pointers. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/15281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I42cb911a679b9198fd06e74b42f1e2cb28323de9 Gerrit-Change-Number: 15281 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 19:11:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:15:23 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 19:15:23 +0000 Subject: Change in libosmocore[master]: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16017 to look at the new patch set (#3). Change subject: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() ...................................................................... GPRS/BSSGP: introduce bssgp_bvc_ctx_free() So far we had a function to allocate a new bssgp_bvc_ctx, but not the opposite one. Let's finally introduce it, so it will be used at least in OsmoPCU. Please note that the new symbol has 'bssgp_' prefix, not 'btsctx_'. Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 --- M TODO-RELEASE M include/osmocom/gprs/gprs_bssgp.h M src/gb/gprs_bssgp.c M src/gb/libosmogb.map 4 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/16017/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 Gerrit-Change-Number: 16017 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:16:18 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 8 Nov 2019 19:16:18 +0000 Subject: Change in libosmocore[master]: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16017 ) Change subject: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 Gerrit-Change-Number: 16017 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 08 Nov 2019 19:16:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:20:55 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 19:20:55 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_destroy(): fix memleak and NULL-pointer dereference In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/16018 to look at the new patch set (#2). Change subject: gprs_bssgp_destroy(): fix memleak and NULL-pointer dereference ...................................................................... gprs_bssgp_destroy(): fix memleak and NULL-pointer dereference So far there was a memory leak, because free()ing 'the_pcu.bctx' would cause ASAN to complain. And that's reasonable, because it needs to be freed properly. Moreover, 'the_pcu.bctx' may simply be uninitialized in some cases, e.g. when OsmoPCU is terminated before connecting to the SGSN. Let's use the new bssgp_bvc_ctx_free() from libosmogb. Change-Id: I274e79e1746c7678b81720ec11e8a564befe38ba Depends: Ia78979379dbdccd6e4628c16f00d0c06d9212172 --- M src/gprs_bssgp_pcu.cpp 1 file changed, 1 insertion(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/18/16018/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I274e79e1746c7678b81720ec11e8a564befe38ba Gerrit-Change-Number: 16018 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 8 19:21:22 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 8 Nov 2019 19:21:22 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_destroy(): fix NULL-pointer dereference In-Reply-To: References: Message-ID: fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/15281 ) Change subject: gprs_bssgp_destroy(): fix NULL-pointer dereference ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/15281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I42cb911a679b9198fd06e74b42f1e2cb28323de9 Gerrit-Change-Number: 15281 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sat Nov 9 02:42:18 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 09 Nov 2019 02:42:18 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5dc6279a79108_6bd52aaf8692e5f4250463@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/i586 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 193s] | #define HAVE_MEMORY_H 1 [ 193s] | #define HAVE_STRINGS_H 1 [ 193s] | #define HAVE_INTTYPES_H 1 [ 193s] | #define HAVE_STDINT_H 1 [ 193s] | #define HAVE_UNISTD_H 1 [ 193s] | #define HAVE_DLFCN_H 1 [ 193s] | #define LT_OBJDIR ".libs/" [ 193s] | #define PACKAGE "osmo-hlr" [ 193s] | #define VERSION "1.1.0.10-5b65" [ 193s] | #define STDC_HEADERS 1 [ 193s] | [ 193s] | configure: exit 0 [ 193s] [ 193s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 193s] make[1]: *** [override_dh_auto_test] Error 1 [ 193s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 193s] debian/rules:7: recipe for target 'build' failed [ 193s] make: *** [build] Error 2 [ 193s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 193s] [ 193s] lamb15 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sat Nov 9 02:42:10 UTC 2019. [ 193s] [ 193s] ### VM INTERACTION START ### [ 194s] Powering off. [ 194s] [ 181.414526] reboot: Power down [ 194s] ### VM INTERACTION END ### [ 194s] [ 194s] lamb15 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sat Nov 9 02:42:12 UTC 2019. [ 194s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Nov 9 02:48:52 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 09 Nov 2019 02:48:52 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5dc62922c0edb_6bd52aaf8692e5f425206@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 251s] -subscriber_id|INTEGER|0||0 [ 251s] - [ 251s] -Table subscriber_multi_msisdn contents: [ 251s] - [ 251s] -Verify that osmo-hlr can open it: [ 251s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 251s] -rc = 0 [ 251s] -DMAIN hlr starting [ 251s] -DDB using database: test.db [ 251s] -DDB Database test.db' has HLR DB schema version 2 [ 251s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 251s] ./testsuite.at:44: exit code was 1, expected 0 [ 251s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 251s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 251s] make[1]: *** [override_dh_auto_test] Error 1 [ 251s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 251s] debian/rules:7: recipe for target 'build' failed [ 251s] make: *** [build] Error 2 [ 251s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 251s] [ 251s] lamb07 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sat Nov 9 02:48:42 UTC 2019. [ 251s] [ 251s] ### VM INTERACTION START ### [ 254s] [ 240.185239] sysrq: SysRq : Power Off [ 254s] [ 240.193300] reboot: Power down [ 254s] ### VM INTERACTION END ### [ 254s] [ 254s] lamb07 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sat Nov 9 02:48:46 UTC 2019. [ 254s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Nov 9 03:25:08 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 09 Nov 2019 03:25:08 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5dc631adacf22_6bd52aaf8692e5f42585df@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 218s] | #define HAVE_MEMORY_H 1 [ 218s] | #define HAVE_STRINGS_H 1 [ 218s] | #define HAVE_INTTYPES_H 1 [ 218s] | #define HAVE_STDINT_H 1 [ 218s] | #define HAVE_UNISTD_H 1 [ 218s] | #define HAVE_DLFCN_H 1 [ 218s] | #define LT_OBJDIR ".libs/" [ 218s] | #define PACKAGE "osmo-hlr" [ 218s] | #define VERSION "1.1.0.10-5b65" [ 218s] | #define STDC_HEADERS 1 [ 218s] | [ 218s] | configure: exit 0 [ 218s] [ 218s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 218s] make[1]: *** [override_dh_auto_test] Error 1 [ 218s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 218s] debian/rules:7: recipe for target 'build' failed [ 218s] make: *** [build] Error 2 [ 218s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 218s] [ 218s] lamb09 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sat Nov 9 03:24:53 UTC 2019. [ 218s] [ 218s] ### VM INTERACTION START ### [ 219s] Powering off. [ 219s] [ 205.881122] reboot: Power down [ 219s] ### VM INTERACTION END ### [ 219s] [ 219s] lamb09 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sat Nov 9 03:24:55 UTC 2019. [ 219s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Nov 9 03:26:18 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 09 Nov 2019 03:26:18 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5dc631eaa7536_6bd52aaf8692e5f4258947@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 308s] | CFLAGS='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security' [ 308s] | CPP='gcc -E' [ 308s] | CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=2' [ 308s] | CYGPATH_W='echo' [ 308s] | DB_SQLITE_DEBUG_FALSE='' [ 308s] | DB_SQLITE_DEBUG_TRUE='#' [ 308s] | DEFS='-DPACKAGE_NAME=\"osmo-hlr\" -DPACKAGE_TARNAME=\"osmo-hlr\" -DPACKAGE_VERSION=\"1.1.0.10-5b65\" -DPACKAGE_STRING=\"osmo-hlr\ 1.1.0.10-5b65\" -DPACKAGE_BUGREPORT=\"openbsc at lists.osmocom.org\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DPACKAGE=\"osmo-hlr\" -DVERSION=\"1.1.0.10-5b65\" -DSTDC_HEADERS=1' [ 308s] | DEPDIR='.deps' [ 308s] | DLLTOOL='false' [ 308s] | DSYMUTIL='' [ 308s] | DUMPBIN='' [ 308s] | ECHO_C='' [ 308s] | ECHO_N='-n' [ 308s] | ECHO_T='' [ 308s] | EGREP='/bin/grep -E' [ 308s] | ENABLE_EXT_TESTS_FALSE='' [ 308s] | ENABLE_EXT_TESTS_TRUE='#' [ 308s] | EXEEXT='' [ 308s] | FGREP='/bin/grep -F' [ 308s] | GREP='/bin/grep' [ 308s] | HAVE_SYSTEMD_FALSE='#' [ 308s] | HAVE_SYSTEMD_TRUE='' [ 308s] | INSTALL_DATA='${INSTALL} -m 644' [ 310s] | INSTALL_PROGRAM=[ 258.081864] sysrq: SysRq : Power Off [ 310s] [ 258.086519] reboot: Power down [ 311s] ### VM INTERACTION END ### [ 311s] [ 311s] cloud113 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sat Nov 9 03:26:14 UTC 2019. [ 311s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sat Nov 9 18:31:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 9 Nov 2019 18:31:05 +0000 Subject: Change in osmo-sgsn[master]: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 ) Change subject: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6 Gerrit-Change-Number: 16015 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 09 Nov 2019 18:31:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 9 18:34:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 9 Nov 2019 18:34:32 +0000 Subject: Change in libosmocore[master]: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16017 ) Change subject: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 Gerrit-Change-Number: 16017 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 09 Nov 2019 18:34:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 9 18:34:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 9 Nov 2019 18:34:37 +0000 Subject: Change in libosmocore[master]: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16017 ) Change subject: GPRS/BSSGP: introduce bssgp_bvc_ctx_free() ...................................................................... GPRS/BSSGP: introduce bssgp_bvc_ctx_free() So far we had a function to allocate a new bssgp_bvc_ctx, but not the opposite one. Let's finally introduce it, so it will be used at least in OsmoPCU. Please note that the new symbol has 'bssgp_' prefix, not 'btsctx_'. Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 --- M TODO-RELEASE M include/osmocom/gprs/gprs_bssgp.h M src/gb/gprs_bssgp.c M src/gb/libosmogb.map 4 files changed, 13 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index 9af92c1..692bdc1 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -10,3 +10,4 @@ core osmo_tdef_get() change val_if_not_present arg from unsigned long to long to allow passing -1 core struct osmo_tdef fields min_val,max_val added, ABI break (arrays of structs used in programs) gsm API added osmo_gsm48_rfpowercap2powerclass() +gb API added bssgp_bvc_ctx_free() diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h index 400c3e0..0f87333 100644 --- a/include/osmocom/gprs/gprs_bssgp.h +++ b/include/osmocom/gprs/gprs_bssgp.h @@ -112,6 +112,8 @@ struct bssgp_bvc_ctx *btsctx_by_raid_cid(const struct gprs_ra_id *raid, uint16_t cid); /* Find a BTS context based on BVCI+NSEI tuple */ struct bssgp_bvc_ctx *btsctx_by_bvci_nsei(uint16_t bvci, uint16_t nsei); +/* Free a given BTS context */ +void bssgp_bvc_ctx_free(struct bssgp_bvc_ctx *ctx); #define BVC_F_BLOCKED 0x0001 diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index b695c28..896f1c5 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -141,6 +141,15 @@ return ctx; } +void bssgp_bvc_ctx_free(struct bssgp_bvc_ctx *ctx) +{ + if (!ctx) + return; + rate_ctr_group_free(ctx->ctrg); + llist_del(&ctx->list); + talloc_free(ctx); +} + /* Chapter 10.4.5: Flow Control BVC ACK */ static int bssgp_tx_fc_bvc_ack(uint16_t nsei, uint8_t tag, uint16_t ns_bvci) { diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map index 5e675a6..ad139c1 100644 --- a/src/gb/libosmogb.map +++ b/src/gb/libosmogb.map @@ -80,6 +80,7 @@ gprs_log_filter_fn; btsctx_alloc; +bssgp_bvc_ctx_free; btsctx_by_bvci_nsei; btsctx_by_raid_cid; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172 Gerrit-Change-Number: 16017 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 9 18:35:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 9 Nov 2019 18:35:52 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_destroy(): fix memleak and NULL-pointer dereference In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16018 ) Change subject: gprs_bssgp_destroy(): fix memleak and NULL-pointer dereference ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I274e79e1746c7678b81720ec11e8a564befe38ba Gerrit-Change-Number: 16018 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 09 Nov 2019 18:35:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 9 18:38:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 9 Nov 2019 18:38:59 +0000 Subject: Change in libosmo-abis[master]: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/15996 ) Change subject: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/libosmo-abis/+/15996/1/src/input/dahdi.c File src/input/dahdi.c: https://gerrit.osmocom.org/c/libosmo-abis/+/15996/1/src/input/dahdi.c at 609 PS1, Line 609: #ifndef DAHDI_SPECIFY > What about simply checking if /dev/dahdi/channel exists and ioctl succeeds, and otherwise open /dev/ [?] As indicated, it was introduced in 2010.. Im sure there are lots oft other problrems if you build Osmo* master in a 10 year old OS... -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/15996 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id6c8f27d7ae948b50e9cf5a38f039d782ff78e1d Gerrit-Change-Number: 15996 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 09 Nov 2019 18:38:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sun Nov 10 02:13:45 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 10 Nov 2019 02:13:45 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5dc77267a6a57_6bd52aaf8692e5f45360be@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/i586 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 232s] | #define HAVE_MEMORY_H 1 [ 232s] | #define HAVE_STRINGS_H 1 [ 232s] | #define HAVE_INTTYPES_H 1 [ 232s] | #define HAVE_STDINT_H 1 [ 232s] | #define HAVE_UNISTD_H 1 [ 232s] | #define HAVE_DLFCN_H 1 [ 232s] | #define LT_OBJDIR ".libs/" [ 232s] | #define PACKAGE "osmo-hlr" [ 232s] | #define VERSION "1.1.0.10-5b65" [ 232s] | #define STDC_HEADERS 1 [ 232s] | [ 232s] | configure: exit 0 [ 232s] [ 232s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 232s] make[1]: *** [override_dh_auto_test] Error 1 [ 232s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 232s] debian/rules:7: recipe for target 'build' failed [ 232s] make: *** [build] Error 2 [ 232s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 232s] [ 232s] cloud101 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sun Nov 10 02:13:29 UTC 2019. [ 232s] [ 232s] ### VM INTERACTION START ### [ 233s] Powering off. [ 233s] [ 216.884169] reboot: Power down [ 233s] ### VM INTERACTION END ### [ 233s] [ 233s] cloud101 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sun Nov 10 02:13:31 UTC 2019. [ 233s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 10 02:18:53 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 10 Nov 2019 02:18:53 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5dc7739393f67_6bd52aaf8692e5f45366fa@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 245s] -subscriber_id|INTEGER|0||0 [ 245s] - [ 245s] -Table subscriber_multi_msisdn contents: [ 245s] - [ 245s] -Verify that osmo-hlr can open it: [ 245s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 245s] -rc = 0 [ 245s] -DMAIN hlr starting [ 245s] -DDB using database: test.db [ 245s] -DDB Database test.db' has HLR DB schema version 2 [ 245s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 245s] ./testsuite.at:44: exit code was 1, expected 0 [ 245s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 245s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 245s] make[1]: *** [override_dh_auto_test] Error 1 [ 245s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 245s] debian/rules:7: recipe for target 'build' failed [ 245s] make: *** [build] Error 2 [ 245s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 245s] [ 245s] cloud122 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sun Nov 10 02:18:48 UTC 2019. [ 245s] [ 245s] ### VM INTERACTION START ### [ 248s] [ 220.885742] sysrq: SysRq : Power Off [ 248s] [ 220.898698] reboot: Power down [ 249s] ### VM INTERACTION END ### [ 249s] [ 249s] cloud122 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sun Nov 10 02:18:52 UTC 2019. [ 249s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 10 02:24:19 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 10 Nov 2019 02:24:19 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5dc774de94e6b_6bd52aaf8692e5f4537131@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 187s] | #define HAVE_MEMORY_H 1 [ 187s] | #define HAVE_STRINGS_H 1 [ 187s] | #define HAVE_INTTYPES_H 1 [ 187s] | #define HAVE_STDINT_H 1 [ 187s] | #define HAVE_UNISTD_H 1 [ 187s] | #define HAVE_DLFCN_H 1 [ 187s] | #define LT_OBJDIR ".libs/" [ 187s] | #define PACKAGE "osmo-hlr" [ 187s] | #define VERSION "1.1.0.10-5b65" [ 187s] | #define STDC_HEADERS 1 [ 187s] | [ 187s] | configure: exit 0 [ 187s] [ 187s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 187s] make[1]: *** [override_dh_auto_test] Error 1 [ 187s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 187s] debian/rules:7: recipe for target 'build' failed [ 187s] make: *** [build] Error 2 [ 187s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 187s] [ 187s] lamb52 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sun Nov 10 02:24:06 UTC 2019. [ 187s] [ 187s] ### VM INTERACTION START ### [ 188s] Powering off. [ 188s] [ 174.868612] reboot: Power down [ 188s] ### VM INTERACTION END ### [ 188s] [ 188s] lamb52 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sun Nov 10 02:24:08 UTC 2019. [ 188s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Nov 10 02:24:53 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 10 Nov 2019 02:24:53 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5dc774fe13a0_6bd52aaf8692e5f453724c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 224s] -subscriber_id|INTEGER|0||0 [ 224s] - [ 224s] -Table subscriber_multi_msisdn contents: [ 224s] - [ 224s] -Verify that osmo-hlr can open it: [ 224s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 224s] -rc = 0 [ 224s] -DMAIN hlr starting [ 224s] -DDB using database: test.db [ 224s] -DDB Database test.db' has HLR DB schema version 2 [ 224s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 224s] ./testsuite.at:44: exit code was 1, expected 0 [ 224s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 224s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 224s] make[1]: *** [override_dh_auto_test] Error 1 [ 224s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 224s] debian/rules:7: recipe for target 'build' failed [ 224s] make: *** [build] Error 2 [ 224s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 224s] [ 224s] lamb25 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sun Nov 10 02:24:43 UTC 2019. [ 224s] [ 224s] ### VM INTERACTION START ### [ 227s] [ 213.451108] sysrq: SysRq : Power Off [ 227s] [ 213.461425] reboot: Power down [ 227s] ### VM INTERACTION END ### [ 227s] [ 227s] lamb25 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Sun Nov 10 02:24:47 UTC 2019. [ 227s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sun Nov 10 09:04:15 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 10 Nov 2019 09:04:15 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_destroy(): fix memleak and NULL-pointer dereference In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16018 ) Change subject: gprs_bssgp_destroy(): fix memleak and NULL-pointer dereference ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I274e79e1746c7678b81720ec11e8a564befe38ba Gerrit-Change-Number: 16018 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 10 Nov 2019 09:04:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 10 09:04:21 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 10 Nov 2019 09:04:21 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_destroy(): fix memleak and NULL-pointer dereference In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16018 ) Change subject: gprs_bssgp_destroy(): fix memleak and NULL-pointer dereference ...................................................................... gprs_bssgp_destroy(): fix memleak and NULL-pointer dereference So far there was a memory leak, because free()ing 'the_pcu.bctx' would cause ASAN to complain. And that's reasonable, because it needs to be freed properly. Moreover, 'the_pcu.bctx' may simply be uninitialized in some cases, e.g. when OsmoPCU is terminated before connecting to the SGSN. Let's use the new bssgp_bvc_ctx_free() from libosmogb. Change-Id: I274e79e1746c7678b81720ec11e8a564befe38ba Depends: Ia78979379dbdccd6e4628c16f00d0c06d9212172 --- M src/gprs_bssgp_pcu.cpp 1 file changed, 1 insertion(+), 6 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index dd9eb68..914afc0 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -971,12 +971,7 @@ gprs_ns_destroy(nsi); - /* FIXME: move this to libgb: btsctx_free() */ - llist_del(&the_pcu.bctx->list); -#warning "This causes ASAN to complain. It is not critical for normal operation but should be fixed nevertheless" -#if 0 - talloc_free(the_pcu.bctx); -#endif + bssgp_bvc_ctx_free(the_pcu.bctx); the_pcu.bctx = NULL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16018 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I274e79e1746c7678b81720ec11e8a564befe38ba Gerrit-Change-Number: 16018 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 10 09:05:24 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 10 Nov 2019 09:05:24 +0000 Subject: Change in osmocom-bb[master]: trxcon: refactor trxcon_fsm finite state machine In-Reply-To: References: Message-ID: fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/12585 ) Change subject: trxcon: refactor trxcon_fsm finite state machine ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/12585 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I035b2cb701e2d0b3fedec4d569507b79d400df5b Gerrit-Change-Number: 12585 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 10 09:05:31 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 10 Nov 2019 09:05:31 +0000 Subject: Change in osmocom-bb[master]: trxcon: make trxcon_fsm parent for both l1ctl_fsm and trx_fsm In-Reply-To: References: Message-ID: fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/12589 ) Change subject: trxcon: make trxcon_fsm parent for both l1ctl_fsm and trx_fsm ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/12589 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I6262726f2b6e23abe543d6d67edfd634eece1b71 Gerrit-Change-Number: 12589 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 10 09:05:39 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 10 Nov 2019 09:05:39 +0000 Subject: Change in osmocom-bb[master]: trxcon/trxcon.h: do not expose pointer to trxcon_fsm instance In-Reply-To: References: Message-ID: fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/12590 ) Change subject: trxcon/trxcon.h: do not expose pointer to trxcon_fsm instance ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/12590 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I37812573a33e090e6edb45713d3132cb43bd4ffb Gerrit-Change-Number: 12590 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 10 09:05:47 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 10 Nov 2019 09:05:47 +0000 Subject: Change in osmocom-bb[master]: trxcon/trxcon.h: introduce and use struct 'trxcon_inst' In-Reply-To: References: Message-ID: fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/12610 ) Change subject: trxcon/trxcon.h: introduce and use struct 'trxcon_inst' ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/12610 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Id868dac54693be9a67527dba06a2b80c0ecb7bd4 Gerrit-Change-Number: 12610 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 10 09:05:58 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 10 Nov 2019 09:05:58 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl_link.c: use TRXCON_EV_L1CTL_REQ event In-Reply-To: References: Message-ID: fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/12611 ) Change subject: trxcon/l1ctl_link.c: use TRXCON_EV_L1CTL_REQ event ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/12611 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9ad19c158397f73ab1b6639a34ce20fc7a7431b3 Gerrit-Change-Number: 12611 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 10 09:06:05 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 10 Nov 2019 09:06:05 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl.c: pass trxcon_inst pointer to RX handlers In-Reply-To: References: Message-ID: fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/12612 ) Change subject: trxcon/l1ctl.c: pass trxcon_inst pointer to RX handlers ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/12612 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I4e59f547a165b30aa9538ae8f9d6bd822067315b Gerrit-Change-Number: 12612 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 10 09:06:13 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 10 Nov 2019 09:06:13 +0000 Subject: Change in osmocom-bb[master]: trxcon/l1ctl_link.h: get rid of pointer to a trx_instance In-Reply-To: References: Message-ID: fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/12614 ) Change subject: trxcon/l1ctl_link.h: get rid of pointer to a trx_instance ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/12614 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie154a9d25dd0e8828fa2c278c98f9d8ba8c037e3 Gerrit-Change-Number: 12614 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Mon Nov 11 02:02:00 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 11 Nov 2019 02:02:00 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5dc8c13397794_6bd52aaf8692e5f47153d1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/i586 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 188s] | #define HAVE_MEMORY_H 1 [ 188s] | #define HAVE_STRINGS_H 1 [ 188s] | #define HAVE_INTTYPES_H 1 [ 188s] | #define HAVE_STDINT_H 1 [ 188s] | #define HAVE_UNISTD_H 1 [ 188s] | #define HAVE_DLFCN_H 1 [ 188s] | #define LT_OBJDIR ".libs/" [ 188s] | #define PACKAGE "osmo-hlr" [ 188s] | #define VERSION "1.1.0.10-5b65" [ 188s] | #define STDC_HEADERS 1 [ 188s] | [ 188s] | configure: exit 0 [ 188s] [ 188s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 188s] make[1]: *** [override_dh_auto_test] Error 1 [ 188s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 188s] debian/rules:7: recipe for target 'build' failed [ 188s] make: *** [build] Error 2 [ 188s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 188s] [ 188s] lamb70 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Mon Nov 11 02:01:47 UTC 2019. [ 188s] [ 188s] ### VM INTERACTION START ### [ 189s] Powering off. [ 189s] [ 177.454437] reboot: Power down [ 189s] ### VM INTERACTION END ### [ 189s] [ 189s] lamb70 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Mon Nov 11 02:01:48 UTC 2019. [ 189s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 11 02:03:25 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 11 Nov 2019 02:03:25 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5dc8c18d461f2_6bd52aaf8692e5f47157a6@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 479s] -subscriber_id|INTEGER|0||0 [ 479s] - [ 479s] -Table subscriber_multi_msisdn contents: [ 479s] - [ 479s] -Verify that osmo-hlr can open it: [ 479s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 479s] -rc = 0 [ 479s] -DMAIN hlr starting [ 479s] -DDB using database: test.db [ 479s] -DDB Database test.db' has HLR DB schema version 2 [ 479s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 479s] ./testsuite.at:44: exit code was 1, expected 0 [ 479s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 479s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 479s] make[1]: *** [override_dh_auto_test] Error 1 [ 479s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 479s] debian/rules:7: recipe for target 'build' failed [ 479s] make: *** [build] Error 2 [ 479s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 479s] [ 479s] cloud101 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Mon Nov 11 02:03:04 UTC 2019. [ 479s] [ 479s] ### VM INTERACTION START ### [ 482s] [ 464.683711] sysrq: SysRq : Power Off [ 482s] [ 464.702521] reboot: Power down [ 483s] ### VM INTERACTION END ### [ 483s] [ 483s] cloud101 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Mon Nov 11 02:03:09 UTC 2019. [ 483s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 11 02:05:26 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 11 Nov 2019 02:05:26 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5dc8c1f23d36a_6bd52aaf8692e5f47160e0@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 223s] -subscriber_id|INTEGER|0||0 [ 223s] - [ 223s] -Table subscriber_multi_msisdn contents: [ 223s] - [ 223s] -Verify that osmo-hlr can open it: [ 223s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 223s] -rc = 0 [ 223s] -DMAIN hlr starting [ 223s] -DDB using database: test.db [ 223s] -DDB Database test.db' has HLR DB schema version 2 [ 223s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 223s] ./testsuite.at:44: exit code was 1, expected 0 [ 223s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 223s] debian/rules:17: 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:7: recipe for target 'build' failed [ 223s] make: *** [build] Error 2 [ 223s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 223s] [ 223s] lamb51 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Mon Nov 11 02:05:21 UTC 2019. [ 223s] [ 223s] ### VM INTERACTION START ### [ 224s] Powering off. [ 224s] [ 207.960318] reboot: Power down [ 224s] ### VM INTERACTION END ### [ 224s] [ 224s] lamb51 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Mon Nov 11 02:05:23 UTC 2019. [ 224s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 11 02:09:43 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 11 Nov 2019 02:09:43 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5dc8c2f4e251d_6bd52aaf8692e5f4717648@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 206s] -subscriber_id|INTEGER|0||0 [ 206s] - [ 206s] -Table subscriber_multi_msisdn contents: [ 206s] - [ 206s] -Verify that osmo-hlr can open it: [ 206s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 206s] -rc = 0 [ 206s] -DMAIN hlr starting [ 206s] -DDB using database: test.db [ 206s] -DDB Database test.db' has HLR DB schema version 2 [ 206s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 206s] ./testsuite.at:44: exit code was 1, expected 0 [ 206s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 206s] debian/rules:17: 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:7: recipe for target 'build' failed [ 206s] make: *** [build] Error 2 [ 206s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 206s] [ 206s] lamb14 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Mon Nov 11 02:09:34 UTC 2019. [ 206s] [ 206s] ### VM INTERACTION START ### [ 210s] [ 197.193187] sysrq: SysRq : Power Off [ 210s] [ 197.199401] reboot: Power down [ 210s] ### VM INTERACTION END ### [ 210s] [ 210s] lamb14 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Mon Nov 11 02:09:38 UTC 2019. [ 210s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Mon Nov 11 02:14:34 2019 From: admin at opensuse.org (OBS Notification) Date: Mon, 11 Nov 2019 02:14:34 +0000 Subject: Build failure of network:osmocom:nightly/osmo-iuh in Debian_10/i586 In-Reply-To: References: Message-ID: <5dc8c421d7ebe_6bd52aaf8692e5f471873d@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-iuh/Debian_10/i586 Package network:osmocom:nightly/osmo-iuh failed to build in Debian_10/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-iuh Last lines of build log: [ 520s] make[5]: Nothing to be done for 'check'. [ 520s] make[5]: Leaving directory '/usr/src/packages/BUILD/contrib/systemd' [ 520s] make[5]: Entering directory '/usr/src/packages/BUILD/contrib' [ 520s] make[5]: Nothing to be done for 'check-am'. [ 520s] make[5]: Leaving directory '/usr/src/packages/BUILD/contrib' [ 520s] make[4]: Leaving directory '/usr/src/packages/BUILD/contrib' [ 520s] make[4]: Entering directory '/usr/src/packages/BUILD' [ 520s] make[4]: Nothing to be done for 'check-am'. [ 520s] make[4]: Leaving directory '/usr/src/packages/BUILD' [ 520s] make[3]: Leaving directory '/usr/src/packages/BUILD' [ 520s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 520s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 520s] fakeroot debian/rules binary [ 520s] dh binary --with autoreconf [ 520s] Unrecognized character \x01; marked by <-- HERE after package De<-- HERE near column 11 at /usr/share/perl5/Debian/Debhelper/SequencerUtil.pm line 5. [ 520s] Compilation failed in require at /usr/bin/dh line 15. [ 520s] BEGIN failed--compilation aborted at /usr/bin/dh line 15. [ 520s] make: *** [debian/rules:9: binary] Error 255 [ 520s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 520s] [ 520s] lamb57 failed "build osmo-iuh_0.5.0.18.9fb8.dsc" at Mon Nov 11 02:14:29 UTC 2019. [ 520s] [ 520s] ### VM INTERACTION START ### [ 524s] [ 508.977293] sysrq: SysRq : Power Off [ 524s] [ 508.982710] reboot: Power down [ 524s] ### VM INTERACTION END ### [ 524s] [ 524s] lamb57 failed "build osmo-iuh_0.5.0.18.9fb8.dsc" at Mon Nov 11 02:14:33 UTC 2019. [ 524s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Nov 11 04:32:24 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 04:32:24 +0000 Subject: Change in osmo-hlr[master]: fix upgrade test in presence of ~/.sqliterc References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16019 ) Change subject: fix upgrade test in presence of ~/.sqliterc ...................................................................... fix upgrade test in presence of ~/.sqliterc db_upgrade_test.sh: - If an ~/.sqliterc file exists, it causes output of '-- Loading resources from ~/.sqliterc'. Use -batch option to omit that. - To make sure that column headers are off when required, add -noheaders in some places. Change-Id: I279a39984563594a4a3914b2ce3d803ad9468fe8 --- M tests/db_upgrade/db_upgrade_test.sh 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/19/16019/1 diff --git a/tests/db_upgrade/db_upgrade_test.sh b/tests/db_upgrade/db_upgrade_test.sh index bf56c56..8e2b498 100755 --- a/tests/db_upgrade/db_upgrade_test.sh +++ b/tests/db_upgrade/db_upgrade_test.sh @@ -11,21 +11,21 @@ dump_sorted_schema(){ db_file="$1" - tables="$(sqlite3 "$db_file" "SELECT name FROM sqlite_master WHERE type = 'table' order by name")" + tables="$(sqlite3 -batch -noheader "$db_file" "SELECT name FROM sqlite_master WHERE type = 'table' order by name")" for table in $tables; do echo echo "Table: $table" - sqlite3 -header "$db_file" "SELECT name,type,\"notnull\",dflt_value,pk FROM PRAGMA_TABLE_INFO('$table') order by name;" + sqlite3 -batch -header "$db_file" "SELECT name,type,\"notnull\",dflt_value,pk FROM PRAGMA_TABLE_INFO('$table') order by name;" echo echo "Table $table contents:" - columns="$(sqlite3 "$db_file" "SELECT name FROM PRAGMA_TABLE_INFO('$table') order by name;")" - sqlite3 -header "$db_file" "SELECT $(echo $columns | sed 's/ /,/g') from $table;" + columns="$(sqlite3 -batch -noheader "$db_file" "SELECT name FROM PRAGMA_TABLE_INFO('$table') order by name;")" + sqlite3 -batch -header "$db_file" "SELECT $(echo $columns | sed 's/ /,/g') from $table;" done } rm -f "$db" echo "Creating db in schema version 0" -sqlite3 "$db" < "$srcdir/hlr_db_v0.sql" +sqlite3 -batch "$db" < "$srcdir/hlr_db_v0.sql" echo echo "Version 0 db:" @@ -61,7 +61,7 @@ -n OsmoHLR -p 4258 \ -r "$osmo_hlr -c $cfg -l $mint_db" \ "$srcdir/create_subscribers.vty" - sqlite3 "$mint_db" < "$srcdir/create_subscribers_step2.sql" + sqlite3 -batch "$mint_db" < "$srcdir/create_subscribers_step2.sql" set +x test_dump="$builddir/test.dump" -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I279a39984563594a4a3914b2ce3d803ad9468fe8 Gerrit-Change-Number: 16019 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 04:50:34 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 04:50:34 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: stop on various failures References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020 ) Change subject: hlr: stop on various failures ...................................................................... hlr: stop on various failures I found some of the tests hard to analyse when geting failures, because they don't stop the test on failure. Spread some 'mtc.stop' so that the test stops at the failed message instead of carrying on. Change-Id: I804aca84d0ccf4767a5c097cf6c882ccbd87c4e1 --- M hlr/HLR_Tests.ttcn 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/16020/1 diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index f309575..f8d7483 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -425,15 +425,19 @@ } [exp_fail] GSUP.receive(tr_GSUP_UL_ERR(imsi, ?)) -> value ret { setverdict(fail, "Unexpected UL ERROR Cause"); + mtc.stop; } [exp_fail] GSUP.receive(tr_GSUP_UL_RES(imsi)) -> value ret { setverdict(fail, "Unexpected UL.res for unknown IMSI"); + mtc.stop; } [exp_fail] GSUP.receive(tr_GSUP_ISD_REQ(imsi)) -> value ret { setverdict(fail, "Unexpected ISD.req in error case"); + mtc.stop; } [not exp_fail] GSUP.receive(tr_GSUP_UL_ERR(imsi, ?)) -> value ret { setverdict(fail, "Unexpected UL ERROR"); + mtc.stop; } [not exp_fail and not isd_done] GSUP.receive(tr_GSUP_ISD_REQ(imsi, msisdn)) -> value ret { GSUP.send(ts_GSUP_ISD_RES(imsi)); @@ -540,12 +544,14 @@ alt { [] GSUP.receive(tr_GSUP_PROC_SS_ERR(imsi, sid, ?, ?)) -> value ret { setverdict(fail, "Unexpected PROC_SS ERROR Cause"); + mtc.stop; } [not exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, omit)) -> value ret { setverdict(pass); } [exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, omit)) -> value ret { setverdict(fail, "Unexpected PROC_SS.res without SS IE"); + mtc.stop; } /* [exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, decmatch facility)) -> value ret { @@ -562,9 +568,13 @@ setverdict(pass); } else { setverdict(fail, "Unexpected PROC_SS.res with non-matching facility IE"); + mtc.stop; } } - [] GSUP.receive { repeat; } + [] GSUP.receive { + setverdict(fail, "Unexpected GSUP"); + mtc.stop; + } [] T.timeout { setverdict(fail, "Timeout waiting for PROC_SS response"); self.stop; @@ -593,18 +603,22 @@ } [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, ?)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI ERROR Cause: ", pdu); + mtc.stop; } [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, ?)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI RES instead of ERR"); + mtc.stop; } [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, ?)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI ERROR"); + mtc.stop; } [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, result)) -> value pdu { setverdict(pass); } [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, ?)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI RES"); + mtc.stop; } [] GSUP.receive { repeat; } [] T.timeout { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I804aca84d0ccf4767a5c097cf6c882ccbd87c4e1 Gerrit-Change-Number: 16020 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 04:50:34 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 04:50:34 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add tests for GSUP proxy routing References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 ) Change subject: hlr: add tests for GSUP proxy routing ...................................................................... hlr: add tests for GSUP proxy routing GSUP proxy routing, as it is implemented in an upcoming osmo-hlr patch, requires that osmo-hlr returns a received Source Name IE back as Destination Name IE. Add tests for these, for various situations. At the time of writing, these tests still fail on master, and will pass as soon as GSUP request handling with request->response association is introduced to osmo-hlr in an upcoming patch (I179ebb0385b5b355f4740e14d43be97bf93622e3). Implement this by adding a source_name to the g_pars, which should be sent out in ts_GSUP_* to osmo-hlr, and expected back as destination_name in returned messages. Add source_name and destination_name to various templates, with default := omit. Add f_gen_ts_ies() and f_gen_tr_ies() to compose expected IEs more generically. Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa --- M hlr/HLR_Tests.ttcn M library/GSUP_Types.ttcn 2 files changed, 233 insertions(+), 65 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/16021/1 diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index f8d7483..c3bddab 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -81,26 +81,38 @@ type record HLR_ConnHdlrPars { HlrSubscriber sub, - HLR_ConnHdlrParsUssd ussd optional + HLR_ConnHdlrParsUssd ussd optional, + octetstring source_name optional } type record HLR_ConnHdlrParsUssd { OCT4 sid } -template (value) HLR_ConnHdlrPars t_Pars(hexstring imsi, hexstring msisdn := ''H) := { +template (value) HLR_ConnHdlrPars t_Pars(hexstring imsi, hexstring msisdn := ''H, + template (omit) octetstring source_name := omit) := { sub := { imsi := imsi, msisdn := msisdn, aud2g := omit, aud3g := omit }, - ussd := omit + ussd := omit, + source_name := source_name } +template (value) HLR_ConnHdlrPars t_Pars_via_proxy(hexstring imsi, hexstring msisdn := ''H) := + t_Pars(imsi, msisdn, source_name := '7468652d736f757263650a'O); // "the-source" template (value) HLR_ConnHdlrPars t_Pars_sub(HlrSubscriber sub) := { sub := sub, - ussd := omit + ussd := omit, + source_name := omit +} + +template (value) HLR_ConnHdlrPars t_Pars_sub_via_proxy(HlrSubscriber sub) := { + sub := sub, + ussd := omit, + source_name := '7468652d736f757263650a'O // "the-source" } type function void_fn() runs on HLR_ConnHdlr; @@ -407,7 +419,8 @@ } function f_perform_UL(hexstring imsi, template hexstring msisdn, - template (omit) integer exp_err_cause := omit) + template (omit) integer exp_err_cause := omit, + template (omit) octetstring source_name := omit) runs on HLR_ConnHdlr return GSUP_PDU { var GSUP_PDU ret; timer T := 3.0; @@ -417,34 +430,34 @@ exp_fail := true; } - GSUP.send(valueof(ts_GSUP_UL_REQ(imsi))); + GSUP.send(valueof(ts_GSUP_UL_REQ(imsi, source_name := source_name))); T.start; alt { - [exp_fail] GSUP.receive(tr_GSUP_UL_ERR(imsi, exp_err_cause)) -> value ret { + [exp_fail] GSUP.receive(tr_GSUP_UL_ERR(imsi, exp_err_cause, destination_name := source_name)) -> value ret { setverdict(pass); } - [exp_fail] GSUP.receive(tr_GSUP_UL_ERR(imsi, ?)) -> value ret { + [exp_fail] GSUP.receive(tr_GSUP_UL_ERR(imsi, ?, destination_name := source_name)) -> value ret { setverdict(fail, "Unexpected UL ERROR Cause"); mtc.stop; } - [exp_fail] GSUP.receive(tr_GSUP_UL_RES(imsi)) -> value ret { + [exp_fail] GSUP.receive(tr_GSUP_UL_RES(imsi, destination_name := source_name)) -> value ret { setverdict(fail, "Unexpected UL.res for unknown IMSI"); mtc.stop; } - [exp_fail] GSUP.receive(tr_GSUP_ISD_REQ(imsi)) -> value ret { + [exp_fail] GSUP.receive(tr_GSUP_ISD_REQ(imsi, destination_name := source_name)) -> value ret { setverdict(fail, "Unexpected ISD.req in error case"); mtc.stop; } - [not exp_fail] GSUP.receive(tr_GSUP_UL_ERR(imsi, ?)) -> value ret { + [not exp_fail] GSUP.receive(tr_GSUP_UL_ERR(imsi, ?, destination_name := source_name)) -> value ret { setverdict(fail, "Unexpected UL ERROR"); mtc.stop; } - [not exp_fail and not isd_done] GSUP.receive(tr_GSUP_ISD_REQ(imsi, msisdn)) -> value ret { - GSUP.send(ts_GSUP_ISD_RES(imsi)); + [not exp_fail and not isd_done] GSUP.receive(tr_GSUP_ISD_REQ(imsi, msisdn, destination_name := source_name)) -> value ret { + GSUP.send(ts_GSUP_ISD_RES(imsi, source_name := source_name)); isd_done := true; repeat; } - [not exp_fail and isd_done] GSUP.receive(tr_GSUP_UL_RES(imsi)) -> value ret { + [not exp_fail and isd_done] GSUP.receive(tr_GSUP_UL_RES(imsi, destination_name := source_name)) -> value ret { setverdict(pass); } [] GSUP.receive { repeat; } @@ -532,7 +545,8 @@ } private function f_SS_expect(hexstring imsi, OCT4 sid, GSUP_SessionState state, - template SS_FacilityInformation facility := *) + template SS_FacilityInformation facility := *, + template octetstring destination_name := omit) runs on HLR_ConnHdlr return GSUP_PDU { var GSUP_PDU ret; timer T := 3.0; @@ -540,13 +554,14 @@ if (istemplatekind(facility, "omit")) { exp_ss := false; } + T.start; alt { [] GSUP.receive(tr_GSUP_PROC_SS_ERR(imsi, sid, ?, ?)) -> value ret { setverdict(fail, "Unexpected PROC_SS ERROR Cause"); mtc.stop; } - [not exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, omit)) -> value ret { + [not exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, omit, destination_name := destination_name)) -> value ret { setverdict(pass); } [exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, omit)) -> value ret { @@ -559,7 +574,7 @@ } */ - [exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, ?)) -> value ret { + [exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, ?, destination_name := destination_name)) -> value ret { var GSUP_IeValue ss_ie; f_gsup_find_ie(ret, OSMO_GSUP_SS_INFO_IE, ss_ie); var SS_FacilityInformation dec_fac := dec_SS_FacilityInformation(ss_ie.ss_info); @@ -586,7 +601,8 @@ function f_perform_CHECK_IMEI(hexstring imsi, hexstring imei, template (omit) integer exp_err_cause := omit, - template (omit) GSUP_IMEIResult result := omit) + template (omit) GSUP_IMEIResult result := omit, + template (omit) octetstring source_name := omit) runs on HLR_ConnHdlr { var GSUP_PDU pdu; timer T := 3.0; @@ -595,28 +611,28 @@ exp_fail := true; } - GSUP.send(valueof(ts_GSUP_CHECK_IMEI_REQ(imsi, imei))); + GSUP.send(valueof(ts_GSUP_CHECK_IMEI_REQ(imsi, imei, source_name := source_name))); T.start; alt { - [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, exp_err_cause)) -> value pdu { + [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, exp_err_cause, destination_name := source_name)) -> value pdu { setverdict(pass); } - [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, ?)) -> value pdu { + [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, ?, destination_name := source_name)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI ERROR Cause: ", pdu); mtc.stop; } - [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, ?)) -> value pdu { + [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, ?, destination_name := source_name)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI RES instead of ERR"); mtc.stop; } - [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, ?)) -> value pdu { + [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, ?, destination_name := source_name)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI ERROR"); mtc.stop; } - [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, result)) -> value pdu { + [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, result, destination_name := source_name)) -> value pdu { setverdict(pass); } - [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, ?)) -> value pdu { + [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, ?, destination_name := source_name)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI RES"); mtc.stop; } @@ -665,10 +681,15 @@ vc_conn.done; } -function f_start_handler_per_sub(void_fn fn, HlrSubscriberList sl) runs on test_CT { +function f_start_handler_per_sub(void_fn fn, HlrSubscriberList sl, boolean via_proxy := false) runs on test_CT { for (var integer i := 0; i < sizeof(sl); i := i+1) { var HlrSubscriber sub := sl[i]; - var HLR_ConnHdlrPars pars := valueof(t_Pars_sub(sub)); + var HLR_ConnHdlrPars pars; + if (via_proxy) { + pars := valueof(t_Pars_sub_via_proxy(sub)); + } else { + pars := valueof(t_Pars_sub(sub)); + } var HLR_ConnHdlr vc_conn; f_vty_subscr_create(VTY, sub); @@ -699,8 +720,7 @@ /* test UL for unknown IMSI */ private function f_TC_ul_unknown_imsi() runs on HLR_ConnHdlr { - var GSUP_PDU res; - res := f_perform_UL(g_pars.sub.imsi, ?, 2); + f_perform_UL(g_pars.sub.imsi, ?, 2, source_name := g_pars.source_name); setverdict(pass); } testcase TC_gsup_ul_unknown_imsi() runs on test_CT { @@ -712,11 +732,20 @@ vc_conn := f_start_handler(refers(f_TC_ul_unknown_imsi), pars); vc_conn.done; } +testcase TC_gsup_ul_unknown_imsi_via_proxy() runs on test_CT { + var hexstring imsi := f_rnd_imsi('26242'H); + var HLR_ConnHdlrPars pars := valueof(t_Pars_via_proxy(imsi)); + var HLR_ConnHdlr vc_conn; + + f_init(false); + vc_conn := f_start_handler(refers(f_TC_ul_unknown_imsi), pars); + vc_conn.done; +} /* test UL for a number of different subscriber cases (algo, 2g/3g, ...) */ private function f_TC_gsup_ul() runs on HLR_ConnHdlr { var GSUP_PDU res; - res := f_perform_UL(g_pars.sub.imsi, g_pars.sub.msisdn); + res := f_perform_UL(g_pars.sub.imsi, g_pars.sub.msisdn, source_name := g_pars.source_name); setverdict(pass); } testcase TC_gsup_ul() runs on test_CT { @@ -729,6 +758,16 @@ setverdict(pass); } +testcase TC_gsup_ul_via_proxy() runs on test_CT { + var HlrSubscriberList sl; + var GSUP_PDU res; + + f_init(false); + sl := f_gen_subs(); + f_start_handler_per_sub(refers(f_TC_gsup_ul), sl, via_proxy := true); + + setverdict(pass); +} /* Test only the VTY commands */ testcase TC_vty() runs on test_CT { @@ -919,12 +958,14 @@ op_code := SS_OP_CODE_PROCESS_USS_REQ, ussd_string := "*#101#"); GSUP.send(valueof(ts_GSUP_PROC_SS_REQ(g_pars.sub.imsi, g_pars.ussd.sid, - OSMO_GSUP_SESSION_STATE_BEGIN, ss))); + OSMO_GSUP_SESSION_STATE_BEGIN, ss, + source_name := g_pars.source_name))); resp_str := "Your IMSI is " & hex2str(g_pars.sub.imsi); res := f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid, OSMO_GSUP_SESSION_STATE_END, tr_SS_USSD_FACILITY_RETURN_RESULT(1, 59, SS_USSD_DEFAULT_DCS, - f_encGSM7bit(resp_str))); + f_encGSM7bit(resp_str)), + destination_name := g_pars.source_name); } testcase TC_mo_ussd_iuse_imsi() runs on test_CT { var HlrSubscriberList sl; @@ -940,6 +981,20 @@ vc_conn.done; } } +testcase TC_mo_ussd_iuse_imsi_via_proxy() runs on test_CT { + var HlrSubscriberList sl; + var HLR_ConnHdlr vc_conn; + + f_init(false); + sl := f_gen_subs(); + for (var integer i := 0; i < sizeof(sl); i := i+1) { + var HLR_ConnHdlrPars pars := valueof(t_Pars_sub_via_proxy(sl[i])); + pars.ussd.sid := f_rnd_octstring(4); + f_vty_subscr_create(VTY, pars.sub); + vc_conn := f_start_handler(refers(f_TC_mo_ussd_iuse_imsi), pars); + vc_conn.done; + } +} /* Test for USSD request to internal own-msisdn IUSE. */ private function f_TC_mo_ussd_iuse_msisdn() runs on HLR_ConnHdlr { @@ -949,12 +1004,14 @@ op_code := SS_OP_CODE_PROCESS_USS_REQ, ussd_string := "*#100#"); GSUP.send(valueof(ts_GSUP_PROC_SS_REQ(g_pars.sub.imsi, g_pars.ussd.sid, - OSMO_GSUP_SESSION_STATE_BEGIN, ss))); + OSMO_GSUP_SESSION_STATE_BEGIN, ss, + source_name := g_pars.source_name))); resp_str := "Your extension is " & hex2str(g_pars.sub.msisdn); res := f_SS_expect(g_pars.sub.imsi, g_pars.ussd.sid, OSMO_GSUP_SESSION_STATE_END, tr_SS_USSD_FACILITY_RETURN_RESULT(1, 59, SS_USSD_DEFAULT_DCS, - f_encGSM7bit(resp_str))); + f_encGSM7bit(resp_str)), + destination_name := g_pars.source_name); } testcase TC_mo_ussd_iuse_msisdn() runs on test_CT { var HlrSubscriberList sl; @@ -970,6 +1027,20 @@ vc_conn.done; } } +testcase TC_mo_ussd_iuse_msisdn_via_proxy() runs on test_CT { + var HlrSubscriberList sl; + var HLR_ConnHdlr vc_conn; + + f_init(false); + sl := f_gen_subs(); + for (var integer i := 0; i < sizeof(sl); i := i+1) { + var HLR_ConnHdlrPars pars := valueof(t_Pars_sub_via_proxy(sl[i])); + pars.ussd.sid := f_rnd_octstring(4); + f_vty_subscr_create(VTY, pars.sub); + vc_conn := f_start_handler(refers(f_TC_mo_ussd_iuse_msisdn), pars); + vc_conn.done; + } +} /* Test routing of USSD to EUSE by a specific route */ private function f_TC_mo_ussd_100() runs on HLR_ConnHdlr { @@ -1150,12 +1221,14 @@ private function f_TC_gsup_check_imei() runs on HLR_ConnHdlr { /* store-imei disabled */ f_vty_config(VTY, "hlr", "no store-imei"); - f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, result := OSMO_GSUP_IMEI_RESULT_ACK); + f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, result := OSMO_GSUP_IMEI_RESULT_ACK, + source_name := g_pars.source_name); f_vty_subscr_show_nomatch(VTY, g_pars.sub, pattern "*IMEI: *12345678901234*"); /* store-imei enabled */ f_vty_config(VTY, "hlr", "store-imei"); - f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, result := OSMO_GSUP_IMEI_RESULT_ACK); + f_perform_CHECK_IMEI(g_pars.sub.imsi, '12345678901234'H, result := OSMO_GSUP_IMEI_RESULT_ACK, + source_name := g_pars.source_name); f_vty_subscr_show(VTY, g_pars.sub, pattern "*IMEI: *12345678901234*"); } testcase TC_gsup_check_imei() runs on test_CT { @@ -1167,6 +1240,15 @@ setverdict(pass); } +testcase TC_gsup_check_imei_via_proxy() runs on test_CT { + var HlrSubscriberList sl; + + f_init(false); + sl := f_gen_subs(); + f_start_handler_per_sub(refers(f_TC_gsup_check_imei), sl, via_proxy := true); + + setverdict(pass); +} /* Test Check IMEI with invalid IMEI length */ private function f_TC_gsup_check_imei_invalid_len() runs on HLR_ConnHdlr { @@ -1398,8 +1480,10 @@ execute( TC_gsup_sai_err_invalid_imsi() ); execute( TC_gsup_sai() ); execute( TC_gsup_ul_unknown_imsi() ); + execute( TC_gsup_ul_unknown_imsi_via_proxy() ); execute( TC_gsup_sai_err_unknown_imsi() ); execute( TC_gsup_ul() ); + execute( TC_gsup_ul_via_proxy() ); execute( TC_vty() ); execute( TC_vty_msisdn_isd() ); execute( TC_gsup_purge_cs() ); @@ -1409,7 +1493,9 @@ execute( TC_mo_ussd_unknown() ); execute( TC_mo_ussd_euse_disc() ); execute( TC_mo_ussd_iuse_imsi() ); + execute( TC_mo_ussd_iuse_imsi_via_proxy() ); execute( TC_mo_ussd_iuse_msisdn() ); + execute( TC_mo_ussd_iuse_msisdn_via_proxy() ); execute( TC_mo_ussd_euse() ); execute( TC_mo_ussd_euse_continue() ); execute( TC_mo_ussd_euse_defaultroute() ); @@ -1418,6 +1504,7 @@ execute( TC_mo_sss_reject() ); execute( TC_gsup_check_imei() ); + execute( TC_gsup_check_imei_via_proxy() ); execute( TC_gsup_check_imei_invalid_len() ); execute( TC_gsup_check_imei_unknown_imsi() ); execute( TC_subscr_create_on_demand_check_imei_early() ); diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 74fbfc4..e0535ad 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -464,9 +464,8 @@ tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT, { tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE(OSMO_GSUP_AUTH_TUPLE_IE), * }); -template (value) GSUP_PDU ts_GSUP_UL_REQ(hexstring imsi) := - ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, { - valueof(ts_GSUP_IE_IMSI(imsi)) }); +template GSUP_PDU ts_GSUP_UL_REQ(hexstring imsi, template octetstring source_name := omit) := + ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, f_gen_ts_ies(imsi, source_name := source_name)); template GSUP_PDU tr_GSUP_UL_REQ(template hexstring imsi) := tr_GSUP_IMSI(OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, imsi); @@ -474,28 +473,29 @@ template (value) GSUP_PDU ts_GSUP_UL_RES(hexstring imsi) := ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, { valueof(ts_GSUP_IE_IMSI(imsi)) }); -template GSUP_PDU tr_GSUP_UL_RES(template hexstring imsi) := - tr_GSUP_IMSI(OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, imsi); +template GSUP_PDU tr_GSUP_UL_RES(template hexstring imsi, template octetstring destination_name := omit) := + tr_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, f_gen_tr_ies(imsi, destination_name := destination_name)); template (value) GSUP_PDU ts_GSUP_UL_ERR(hexstring imsi, integer cause) := ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR, { valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_Cause(cause)) }); -template GSUP_PDU tr_GSUP_UL_ERR(template hexstring imsi, template integer cause := ?) := - tr_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR, { - tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) }); +template GSUP_PDU tr_GSUP_UL_ERR(template hexstring imsi, template integer cause := ?, + template octetstring destination_name := omit) := + tr_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR, + f_gen_tr_ies(imsi, cause := cause, destination_name := destination_name)); template (value) GSUP_PDU ts_GSUP_ISD_REQ(hexstring imsi, hexstring msisdn) := ts_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_REQUEST, { valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_MSISDN(msisdn)) }); -template GSUP_PDU tr_GSUP_ISD_REQ(template hexstring imsi, template hexstring msisdn := ?) := - tr_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_REQUEST, { - tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE_MSISDN(msisdn), * }); +template GSUP_PDU tr_GSUP_ISD_REQ(template hexstring imsi, template hexstring msisdn := ?, + template octetstring destination_name := omit) := + tr_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_REQUEST, + f_gen_tr_ies(imsi, msisdn := msisdn, destination_name := destination_name)); -template (value) GSUP_PDU ts_GSUP_ISD_RES(hexstring imsi) := - ts_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, { - valueof(ts_GSUP_IE_IMSI(imsi)) }); +template GSUP_PDU ts_GSUP_ISD_RES(hexstring imsi, template octetstring source_name := omit) := + ts_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, f_gen_ts_ies(imsi, source_name := source_name)); template GSUP_PDU tr_GSUP_ISD_RES(template hexstring imsi) := tr_GSUP_IMSI(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, imsi); @@ -534,9 +534,9 @@ tr_GSUP(OSMO_GSUP_MSGT_PURGE_MS_ERROR, { tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) }); -template (value) GSUP_PDU ts_GSUP_CHECK_IMEI_REQ(hexstring imsi, hexstring imei) := - ts_GSUP(OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST, { - valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_IMEI(imei)) }); +template (value) GSUP_PDU ts_GSUP_CHECK_IMEI_REQ(hexstring imsi, hexstring imei, + template (omit) octetstring source_name := omit) := + ts_GSUP(OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST, f_gen_ts_ies(imsi, imei := imei, source_name := source_name)); template GSUP_PDU tr_GSUP_CHECK_IMEI_REQ( template hexstring imsi, @@ -554,17 +554,18 @@ ts_GSUP(OSMO_GSUP_MSGT_CHECK_IMEI_RESULT, { valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_IMEI_Result(result)) }); -template GSUP_PDU tr_GSUP_CHECK_IMEI_RES(template hexstring imsi, template GSUP_IMEIResult result) := - tr_GSUP(OSMO_GSUP_MSGT_CHECK_IMEI_RESULT, { - tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_IMEI_Result(result) }); +template GSUP_PDU tr_GSUP_CHECK_IMEI_RES(template hexstring imsi, template GSUP_IMEIResult result, + template octetstring destination_name := omit) := + tr_GSUP(OSMO_GSUP_MSGT_CHECK_IMEI_RESULT, + f_gen_tr_ies(imsi, imei_result := result, destination_name := destination_name)); template (value) GSUP_PDU ts_GSUP_CHECK_IMEI_ERR(hexstring imsi, integer cause) := ts_GSUP(OSMO_GSUP_MSGT_CHECK_IMEI_ERROR, { valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_Cause(cause)) }); -template GSUP_PDU tr_GSUP_CHECK_IMEI_ERR(template hexstring imsi, template integer cause) := - tr_GSUP(OSMO_GSUP_MSGT_CHECK_IMEI_ERROR, { - tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) }); +template GSUP_PDU tr_GSUP_CHECK_IMEI_ERR(template hexstring imsi, template integer cause, + template octetstring destination_name := omit) := + tr_GSUP(OSMO_GSUP_MSGT_CHECK_IMEI_ERROR, f_gen_tr_ies(imsi, cause := cause, destination_name := destination_name)); template (value) GSUP_IE ts_GSUP_IE_CancelType(GSUP_CancelType ctype) := { @@ -1105,12 +1106,80 @@ } } +private function f_gen_ts_ies(hexstring imsi, + template hexstring imei := omit, + template octetstring source_name := omit, + template octetstring destination_name := omit + ) return GSUP_IEs { + var GSUP_IEs ies := { + valueof(ts_GSUP_IE_IMSI(imsi)) + }; + + if (isvalue(imei)) { + ies := ies & { valueof(ts_GSUP_IE_IMEI(valueof(imei))) }; + } + + if (isvalue(source_name)) { + ies := ies & { valueof(ts_GSUP_IE_Source_Name(valueof(source_name))) }; + } + + if (isvalue(destination_name)) { + ies := ies & { valueof(ts_GSUP_IE_Destination_Name(valueof(destination_name))) }; + } + + return ies; +} + +private function f_gen_tr_ies(template hexstring imsi, + template integer cause := omit, + template hexstring msisdn := omit, + template GSUP_IMEIResult imei_result := omit, + template octetstring source_name := omit, + template octetstring destination_name := omit + ) return template GSUP_IEs { + var template GSUP_IEs ies := { + tr_GSUP_IE_IMSI(imsi) + }; + var integer idx := 1; + + if (isvalue(cause)) { + ies[idx] := tr_GSUP_IE_Cause(cause); + idx := idx + 1; + } + + if (isvalue(msisdn)) { + ies[idx] := tr_GSUP_IE_MSISDN(msisdn); + idx := idx + 1; + } + + if (isvalue(imei_result)) { + ies[idx] := tr_GSUP_IE_IMEI_Result(imei_result); + idx := idx + 1; + } + + if (isvalue(source_name)) { + ies[idx] := tr_GSUP_IE_Source_Name(source_name); + idx := idx + 1; + } + + ies[idx] := *; + idx := idx + 1; + + if (isvalue(destination_name)) { + ies[idx] := tr_GSUP_IE_Destination_Name(destination_name); + idx := idx + 1; + } + + return ies; +} + private function f_gen_ts_ss_ies( hexstring imsi, OCT4 sid, GSUP_SessionState state, template (omit) octetstring ss := omit, - template (omit) integer cause := omit + template (omit) integer cause := omit, + template octetstring source_name := omit ) return GSUP_IEs { /* Mandatory IEs */ var GSUP_IEs ies := { @@ -1131,6 +1200,10 @@ ies := ies & { valueof(ts_GSUP_IE_SSInfo(valueof(ss))) }; } + if (isvalue(source_name)) { + ies := ies & { valueof(ts_GSUP_IE_Source_Name(valueof(source_name))) }; + } + return ies; } private function f_gen_tr_ss_ies( @@ -1138,7 +1211,8 @@ template OCT4 sid := ?, template GSUP_SessionState state := ?, template octetstring ss := omit, - template integer cause := omit + template integer cause := omit, + template octetstring destination_name := omit ) return template GSUP_IEs { /* Mandatory IEs */ var template GSUP_IEs ies := { @@ -1169,6 +1243,11 @@ idx := idx + 1; } + if (isvalue(destination_name)) { + ies[idx] := tr_GSUP_IE_Destination_Name(destination_name); + idx := idx + 1; + } + /* the GSUP Message Class IE is optional, as old implementations don't have it yet */ var template GSUP_IEs ies2 := ies; ies2[idx] := tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_USSD); @@ -1181,10 +1260,11 @@ hexstring imsi, OCT4 sid, GSUP_SessionState state, - template (omit) octetstring ss := omit + template (omit) octetstring ss := omit, + template (omit) octetstring source_name := omit ) := ts_GSUP( OSMO_GSUP_MSGT_PROC_SS_REQUEST, - f_gen_ts_ss_ies(imsi, sid, state, ss) + f_gen_ts_ss_ies(imsi, sid, state, ss, source_name := source_name) ); template GSUP_PDU tr_GSUP_PROC_SS_REQ( template hexstring imsi, @@ -1209,10 +1289,11 @@ template hexstring imsi, template OCT4 sid := ?, template GSUP_SessionState state := ?, - template octetstring ss := * + template octetstring ss := *, + template octetstring destination_name := omit ) := tr_GSUP( OSMO_GSUP_MSGT_PROC_SS_RESULT, - f_gen_tr_ss_ies(imsi, sid, state, ss) + f_gen_tr_ss_ies(imsi, sid, state, ss, destination_name := destination_name) ); template (value) GSUP_PDU ts_GSUP_PROC_SS_ERR( -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa Gerrit-Change-Number: 16021 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 08:45:17 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 11 Nov 2019 08:45:17 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: stop on various failures In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020 ) Change subject: hlr: stop on various failures ...................................................................... Patch Set 1: Code-Review+1 (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020/1//COMMIT_MSG at 9 PS1, Line 9: tests hard to analyse Do you have VERDICTOP in your FileMask / ConsoleMask? I find it very useful, because you can see all setverdict() invocations. Even if a test case continues after a failure. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020/1/hlr/HLR_Tests.ttcn File hlr/HLR_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020/1/hlr/HLR_Tests.ttcn at 575 PS1, Line 575: "Unexpected GSUP" Let's log received message. That's the first thing I would want to see while investigating a failed test case... -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I804aca84d0ccf4767a5c097cf6c882ccbd87c4e1 Gerrit-Change-Number: 16020 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Mon, 11 Nov 2019 08:45:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 10:08:37 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 10:08:37 +0000 Subject: Change in pysim[master]: cards.py: do not use spaces in card names References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/16022 ) Change subject: cards.py: do not use spaces in card names ...................................................................... cards.py: do not use spaces in card names pySim-prog.py features a way to detect which card type is in the reader. The returned value is often used as filename for testfiles and other automated operations. Therefore lets not have spaces in simcard names Change-Id: Ib7428fab767874dd53478d7c64601ff8938e05aa --- M pySim/cards.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/22/16022/1 diff --git a/pySim/cards.py b/pySim/cards.py index 41723c4..758ec0e 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -636,7 +636,7 @@ 3F00/7F20/FF02: Ki """ - name = 'Fairwaves SIM' + name = 'Fairwaves-SIM' # Propriatary files _EF_num = { 'Ki': 'FF02', @@ -774,7 +774,7 @@ """ - name = 'OpenCells SIM' + name = 'OpenCells-SIM' def __init__(self, ssc): super(OpenCellsSim, self).__init__(ssc) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16022 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib7428fab767874dd53478d7c64601ff8938e05aa Gerrit-Change-Number: 16022 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 12:37:40 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 12:37:40 +0000 Subject: Change in osmo-bts[master]: scheduler_trx: initalize n_errors, n_bursts_bits, n_bits_total In-Reply-To: References: Message-ID: dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15908 ) Change subject: scheduler_trx: initalize n_errors, n_bursts_bits, n_bits_total ...................................................................... Patch Set 3: Code-Review+2 (2 comments) https://gerrit.osmocom.org/c/osmo-bts/+/15908/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/15908/1//COMMIT_MSG at 9 PS1, Line 9: the variables n_errors, n_bursts_bits, n_bits_total are always : initalized > As far as I can see from the code, you only initialize n_bits_total. Done https://gerrit.osmocom.org/c/osmo-bts/+/15908/2/src/osmo-bts-trx/scheduler_trx.c File src/osmo-bts-trx/scheduler_trx.c: https://gerrit.osmocom.org/c/osmo-bts/+/15908/2/src/osmo-bts-trx/scheduler_trx.c at 786 PS2, Line 786: int n_errors = 0;; > Extra ";". Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15908 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: If28ea11cc111c7d73ca47b25e65ce399e5baa4c1 Gerrit-Change-Number: 15908 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 11 Nov 2019 12:37:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 12:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 12:37:50 +0000 Subject: Change in osmo-bts[master]: scheduler_trx: initalize n_errors, n_bursts_bits, n_bits_total In-Reply-To: References: Message-ID: dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15908 ) Change subject: scheduler_trx: initalize n_errors, n_bursts_bits, n_bits_total ...................................................................... scheduler_trx: initalize n_errors, n_bursts_bits, n_bits_total Make sure the variables n_errors, n_bursts_bits, n_bits_total are always initalized. For example in rx_tchh_fn() the value for n_errors is defined in a switch statement, where the default lets n_errors uninitalized, which is in that particular case a theoretical problem, however, lets make sure that the variables n_errors, n_bursts_bits and n_bits_total are always initalized with 0 Related: CID#205452 Related: CID#205451 Change-Id: If28ea11cc111c7d73ca47b25e65ce399e5baa4c1 --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve dexter: Looks good to me, approved diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 88e4f3a..9945b2c 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -783,7 +783,8 @@ uint8_t bid, const struct trx_ul_burst_ind *bi) { struct osmo_phsap_prim l1sap; - int n_errors, n_bits_total; + int n_errors = 0; + int n_bits_total = 0; uint16_t ra11; uint8_t ra; int rc; @@ -904,7 +905,8 @@ int32_t *ci_cb_sum = &chan_state->ci_cb_sum; uint8_t *ci_cb_num = &chan_state->ci_cb_num; uint8_t l2[GSM_MACBLOCK_LEN], l2_len; - int n_errors, n_bits_total; + int n_errors = 0; + int n_bits_total = 0; int16_t lqual_cb; uint16_t ber10k; int rc; @@ -1020,7 +1022,9 @@ int32_t *ci_cb_sum = &chan_state->ci_cb_sum; uint8_t *ci_cb_num = &chan_state->ci_cb_num; uint8_t l2[EGPRS_0503_MAX_BYTES]; - int n_errors, n_bursts_bits, n_bits_total; + int n_errors = 0; + int n_bursts_bits = 0; + int n_bits_total = 0; int16_t lqual_cb; uint16_t ber10k; int rc; @@ -1139,7 +1143,8 @@ uint8_t tch_mode = chan_state->tch_mode; uint8_t tch_data[128]; /* just to be safe */ int rc, amr = 0; - int n_errors, n_bits_total; + int n_errors = 0; + int n_bits_total = 0; bool bfi_flag = false; struct gsm_lchan *lchan = get_lchan_by_chan_nr(l1t->trx, trx_chan_desc[chan].chan_nr | bi->tn); @@ -1335,7 +1340,8 @@ uint8_t tch_mode = chan_state->tch_mode; uint8_t tch_data[128]; /* just to be safe */ int rc, amr = 0; - int n_errors, n_bits_total; + int n_errors = 0; + int n_bits_total = 0; bool bfi_flag = false; struct gsm_lchan *lchan = get_lchan_by_chan_nr(l1t->trx, trx_chan_desc[chan].chan_nr | bi->tn); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15908 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: If28ea11cc111c7d73ca47b25e65ce399e5baa4c1 Gerrit-Change-Number: 15908 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 12:42:11 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 12:42:11 +0000 Subject: Change in osmo-msc[master]: a_iface_bssap: check bssmap length field In-Reply-To: References: Message-ID: dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/13307 ) Change subject: a_iface_bssap: check bssmap length field ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/13307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I3b89dd5a66ec83b03860b58b6b8eb58007f433a4 Gerrit-Change-Number: 13307 Gerrit-PatchSet: 5 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 12:51:10 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 12:51:10 +0000 Subject: Change in osmo-bts[master]: remove dummy UL measurement results for lost sacch frames In-Reply-To: References: Message-ID: dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/14762 ) Change subject: remove dummy UL measurement results for lost sacch frames ...................................................................... Patch Set 1: -Code-Review I wonder if this is still relevant or if it can be abandoned. I still do not get why leaving the measurement indication out when a block is missing. To me it makes more sense keeping the measurement indication. The upper layers should see a "bad" measurement result. (Still as I said, with the new model we are forced to add a measurement result anyway.) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/14762 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idfa123f8d02a9d8be1f6de6923fc2a8628020145 Gerrit-Change-Number: 14762 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 11 Nov 2019 12:51:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 13:06:58 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 13:06:58 +0000 Subject: Change in libosmocore[master]: l1sap: add measurement related struct members In-Reply-To: References: Message-ID: dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15888 ) Change subject: l1sap: add measurement related struct members ...................................................................... Patch Set 5: (5 comments) https://gerrit.osmocom.org/c/libosmocore/+/15888/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/15888/2//COMMIT_MSG at 7 PS2, Line 7: l1sap: add measurement related struct memebers > members Done https://gerrit.osmocom.org/c/libosmocore/+/15888/2//COMMIT_MSG at 9 PS2, Line 9: disolve > disSolve Done https://gerrit.osmocom.org/c/libosmocore/+/15888/3/include/osmocom/gsm/l1sap.h File include/osmocom/gsm/l1sap.h: https://gerrit.osmocom.org/c/libosmocore/+/15888/3/include/osmocom/gsm/l1sap.h at 99 PS3, Line 99: int16_t ta_offs_qbits; /*!< timing advance offset (in qbits) */ : int16_t ta_offs_256bits;/*!< timing advance offset (in 1/256th bits) */ > why a union why not always stort 256ths? If somebody has or wants a quarter-bit, they cna do the bi [?] To me this union does not make sense, its two times the same type, so regardless which of thetwo I access, I will get the same result. Do I miss some magic here? https://gerrit.osmocom.org/c/libosmocore/+/15888/2/include/osmocom/gsm/l1sap.h File include/osmocom/gsm/l1sap.h: https://gerrit.osmocom.org/c/libosmocore/+/15888/2/include/osmocom/gsm/l1sap.h at 87 PS2, Line 87: flags > What is the purpose of these flags? And why only one bit? As far as I know this has something to do with DTX, the purpose is to mark the frame as sub-frame. osmo-bts-trx seems not to make use of this flag, but maybe the phy-based BTSs do. In l1sap.c this value is indeed picked up and transfered to struct bts_ul_meas, so it is needed indeed needed for the calculation. https://gerrit.osmocom.org/c/libosmocore/+/15888/2/include/osmocom/gsm/l1sap.h at 99 PS2, Line 99: ta_offs_qbits > Do we really need this field in the new API? Basically, QTA == (ToA256 >> 6). The measurement processing makes use of this field, so its needed. However I do not fully understand why it is this union. (maybe this API needs a bit of renovation. I also do not get why it is defined in libosmocore, its only used by osmo-bts?) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15888 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2c34b02d329f9df190c5035c396403ca0a4f9c42 Gerrit-Change-Number: 15888 Gerrit-PatchSet: 5 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 11 Nov 2019 13:06:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: fixeria Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 13:07:46 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 13:07:46 +0000 Subject: Change in libosmocore[master]: l1sap: add measurement related struct members In-Reply-To: References: Message-ID: dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15888 ) Change subject: l1sap: add measurement related struct members ...................................................................... Patch Set 5: (ensure draft replies are sent) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15888 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2c34b02d329f9df190c5035c396403ca0a4f9c42 Gerrit-Change-Number: 15888 Gerrit-PatchSet: 5 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 11 Nov 2019 13:07:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 13:08:22 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 13:08:22 +0000 Subject: Change in osmo-bts[master]: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH In-Reply-To: References: Message-ID: dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15918 ) Change subject: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH ...................................................................... Patch Set 4: (9 comments) (ensure draft replies are sent) https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/common/l1sap.c File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/common/l1sap.c at 67 PS1, Line 67: * indication for itsself that is passed up in parallel to the payload data > itself Done https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/common/l1sap.c at 74 PS1, Line 74: static bool tch_data_meas_present = true; > ACK. I wonder if there is a failsafe way to do this. We could have a function in l1sap.c that is called by the bts model and then does the switching. A per-bts-model API is usually a very difficult thing as in theory it would require a test with each model and I do not even have the hardware for each and every BTS, so its always blind flying. https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/common/l1sap.c at 646 PS1, Line 646: struct info_meas_ind_param *info_meas_ind = &l1sap->u.info.u.meas_ind; > Let's rather move these assignments under each switch case. Done https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/common/l1sap.c at 695 PS1, Line 695: "%s MPH_INFO meas ind, ta_offs_256bits=%d, ber10k=%d, inv_rssi=%u\n", > MPH_INFO only on some case right? maybe add a string pointing to the name in the switch case. Done https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/common/l1sap.c at 740 PS1, Line 740: rc = 0; > rc is already zero here, it can be dropped. Done https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/common/scheduler.c File src/common/scheduler.c: https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/common/scheduler.c at 760 PS1, Line 760: l1sap->u.tch. > How about 'is_sub'? (still not aware of its meaning) I am also a bit confused about the is_sub struct member. As far as I know it is used for DTX to mark special frames which must not be removed by DTX. I think this is to distinguish between real bad frames and those what are just not sent. My guess is that osmo-bts-trx seems not to support this for some reason, but phy based BTS might support it and set the flag then? I am not sure. https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/osmo-bts-trx/scheduler_trx.c File src/osmo-bts-trx/scheduler_trx.c: https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/osmo-bts-trx/scheduler_trx.c at a205 PS1, Line 205: /* FIXME: use actual values for BER etc */ > Not sure why you're removing this comment... The problem here is that we can not use actual values for BER. This part of the code generates an artificial frame to satisfy the higher layers. We can only use artificial values. A BER value of 10000 is basically 100% Error, which matches the reality here. The rssi of -110 is fake, but realistic. I wonder about the ta_offs_256bits, maybe we should try to find some better approximation than 0 here... https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/osmo-bts-trx/scheduler_trx.c at a991 PS1, Line 991: /* Send uplink measurement information to L2 */ > This comment does not make sense anymore. Done https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/osmo-bts-trx/scheduler_trx.c at a1105 PS1, Line 1105: /* Send uplink measurement information to L2 */ > Same. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15918 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84 Gerrit-Change-Number: 15918 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 11 Nov 2019 13:08:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 13:08:45 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 13:08:45 +0000 Subject: Change in osmo-bts[master]: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH In-Reply-To: References: Message-ID: dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15918 ) Change subject: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH ...................................................................... Patch Set 4: (ensure draft replies are sent) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15918 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84 Gerrit-Change-Number: 15918 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 11 Nov 2019 13:08:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 13:10:32 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 13:10:32 +0000 Subject: Change in osmo-ttcn3-hacks[master]: MSC_Tests: add test to try two LU from different BSCs In-Reply-To: References: Message-ID: dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/9204 ) Change subject: MSC_Tests: add test to try two LU from different BSCs ...................................................................... Abandoned Probably no longer relevant. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/9204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib3eabf8537066f43faed8fb983d9e1f4092ec515 Gerrit-Change-Number: 9204 Gerrit-PatchSet: 6 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 13:41:52 2019 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Mon, 11 Nov 2019 13:41:52 +0000 Subject: Change in pysim[master]: cards.py: do not use spaces in card names In-Reply-To: References: Message-ID: daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16022 ) Change subject: cards.py: do not use spaces in card names ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16022 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib7428fab767874dd53478d7c64601ff8938e05aa Gerrit-Change-Number: 16022 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: dexter Gerrit-Comment-Date: Mon, 11 Nov 2019 13:41:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 14:00:38 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 11 Nov 2019 14:00:38 +0000 Subject: Change in pysim[master]: cards.py: do not use spaces in card names In-Reply-To: References: Message-ID: dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16022 ) Change subject: cards.py: do not use spaces in card names ...................................................................... cards.py: do not use spaces in card names pySim-prog.py features a way to detect which card type is in the reader. The returned value is often used as filename for testfiles and other automated operations. Therefore lets not have spaces in simcard names Change-Id: Ib7428fab767874dd53478d7c64601ff8938e05aa --- M pySim/cards.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, approved diff --git a/pySim/cards.py b/pySim/cards.py index 41723c4..758ec0e 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -636,7 +636,7 @@ 3F00/7F20/FF02: Ki """ - name = 'Fairwaves SIM' + name = 'Fairwaves-SIM' # Propriatary files _EF_num = { 'Ki': 'FF02', @@ -774,7 +774,7 @@ """ - name = 'OpenCells SIM' + name = 'OpenCells-SIM' def __init__(self, ssc): super(OpenCellsSim, self).__init__(ssc) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16022 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib7428fab767874dd53478d7c64601ff8938e05aa Gerrit-Change-Number: 16022 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: dexter Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 14:04:33 2019 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Mon, 11 Nov 2019 14:04:33 +0000 Subject: Change in osmo-sysmon[master]: Cleaner output if sections are empty In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 to look at the new patch set (#2). Change subject: Cleaner output if sections are empty ...................................................................... Cleaner output if sections are empty Even with a completely empty config we still get the following output: root sysinfo load: 0.87/0.92/0.98 ram: 243/168/0 uptime: 1d 22:18:19 netdev ping file shellcmd With this patch the sections are skipped if there are no entries and the command no sysinfo can be used to skip displaying the system information. Change-Id: I429fe7626b43aef74ff7458f5c2864888fa9a562 --- M src/osysmon_file.c M src/osysmon_ping.c M src/osysmon_rtnl.c M src/osysmon_shellcmd.c M src/osysmon_sysinfo.c 5 files changed, 59 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sysmon refs/changes/01/16001/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: I429fe7626b43aef74ff7458f5c2864888fa9a562 Gerrit-Change-Number: 16001 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 14:29:43 2019 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Mon, 11 Nov 2019 14:29:43 +0000 Subject: Change in osmo-sysmon[master]: Cleaner output if sections are empty In-Reply-To: References: Message-ID: daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 ) Change subject: Cleaner output if sections are empty ...................................................................... Patch Set 2: (1 comment) Thanks https://gerrit.osmocom.org/c/osmo-sysmon/+/16001/1/src/osysmon_sysinfo.c File src/osysmon_sysinfo.c: https://gerrit.osmocom.org/c/osmo-sysmon/+/16001/1/src/osysmon_sysinfo.c at 48 PS1, Line 48: static bool sysinfo_enabled = 1; > = true; Done -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: I429fe7626b43aef74ff7458f5c2864888fa9a562 Gerrit-Change-Number: 16001 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 11 Nov 2019 14:29:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 16:02:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 11 Nov 2019 16:02:25 +0000 Subject: Change in libosmo-abis[master]: Enable DAHDI support by default; require --disable-dahdi otherwise References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/16023 ) Change subject: Enable DAHDI support by default; require --disable-dahdi otherwise ...................................................................... Enable DAHDI support by default; require --disable-dahdi otherwise libosmo-abis was built with DAHDI support, if the related header files were present at built time, and without if not. This kind of automagic enabling/disabling of features is wrong. Let's require DAHDI support by default, and force the user to take a conscious decision by using an explicit --disable-dahdi if he doesn't want it. At the same time, update debian/control to list dahdi-source as build dependency. Change-Id: Id9f7f063e7ca9e3ab4aa96fc93f243caf50fb66a Closes: OS#4248 --- M configure.ac M debian/control M src/Makefile.am M src/input/dahdi.c 4 files changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/23/16023/1 diff --git a/configure.ac b/configure.ac index ba33ed9..5a83eb1 100644 --- a/configure.ac +++ b/configure.ac @@ -64,7 +64,16 @@ PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.0.0) PKG_CHECK_MODULES(ORTP, ortp >= 0.22.0) -AC_CHECK_HEADERS(dahdi/user.h,,AC_MSG_WARN(DAHDI input driver will not be built)) +AC_ARG_ENABLE([dahdi], + AC_HELP_STRING([--disable-dahdi], + [disable support for DAHID ISDN (E1/T1) cards [default=yes]]), + [enable_dahdi="$enableval"], [enable_dahdi="yes"]) +AM_CONDITIONAL(ENABLE_DAHDI, test "x$enable_dahdi" = "xyes") +if test "x$enable_dahdi" = "xyes"; then + AC_CHECK_HEADERS([dahdi/user.h],[],[AC_MSG_ERROR([DAHDI input driver enabled but DAHDI not found])]) +else + AC_MSG_WARN([DAHDI input driver will not be built]) +fi AC_ARG_ENABLE(sanitize, [AS_HELP_STRING( diff --git a/debian/control b/debian/control index 24a082e..b9e2078 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ autotools-dev, autoconf, automake, + dahdi-source, libtool, dh-autoreconf, libdpkg-perl, diff --git a/src/Makefile.am b/src/Makefile.am index f4277ae..9c438c9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,7 +19,6 @@ ipa_proxy.c \ subchan_demux.c \ trau_frame.c \ - input/dahdi.c \ input/ipa.c \ input/ipa_keepalive.c \ input/ipaccess.c \ @@ -28,6 +27,9 @@ input/misdn.c \ input/rs232.c \ input/unixsocket.c +if ENABLE_DAHDI +libosmoabis_la_SOURCES += input/dahdi.c +endif libosmotrau_la_CFLAGS = $(AM_CFLAGS) $(ORTP_CFLAGS) libosmotrau_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(TRAU_LIBVERSION) diff --git a/src/input/dahdi.c b/src/input/dahdi.c index 6594eea..5da0a2d 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -26,8 +26,6 @@ #include "config.h" -#ifdef HAVE_DAHDI_USER_H - #include #include #include @@ -756,5 +754,3 @@ /* register the driver with the core */ return e1inp_driver_register(&dahdi_driver); } - -#endif /* HAVE_DAHDI_USER_H */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/16023 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id9f7f063e7ca9e3ab4aa96fc93f243caf50fb66a Gerrit-Change-Number: 16023 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 16:13:54 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 11 Nov 2019 16:13:54 +0000 Subject: Change in osmo-ci[master]: osmocom_build_deps: Add libaio-dev for osmo-ccid-client References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16024 ) Change subject: osmocom_build_deps: Add libaio-dev for osmo-ccid-client ...................................................................... osmocom_build_deps: Add libaio-dev for osmo-ccid-client Change-Id: I6c3b536bee3d1bbd6f526bc3765fc4ad9aa4a0dd --- M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/24/16024/1 diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index efbf94a..c780ccf 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -91,6 +91,7 @@ - libusb-dev - libzmq3-dev - sqlite3 + - libaio-dev - name: install liblua for jessie apt: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16024 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6c3b536bee3d1bbd6f526bc3765fc4ad9aa4a0dd Gerrit-Change-Number: 16024 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 16:13:54 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 11 Nov 2019 16:13:54 +0000 Subject: Change in osmo-ci[master]: osmocom_build_deps.yml: Add dahdi-source for libosmo-abis References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16025 ) Change subject: osmocom_build_deps.yml: Add dahdi-source for libosmo-abis ...................................................................... osmocom_build_deps.yml: Add dahdi-source for libosmo-abis Change-Id: Ic314c992f83d9fe1ea6035d67070d7c6004cc9e3 --- M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/25/16025/1 diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index c780ccf..097dcb1 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -58,6 +58,7 @@ update_cache: yes install_recommends: no with_items: + - dahdi-source - docbook5-xml - libboost-dev - libc-ares-dev -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ic314c992f83d9fe1ea6035d67070d7c6004cc9e3 Gerrit-Change-Number: 16025 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 16:38:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 11 Nov 2019 16:38:59 +0000 Subject: Change in osmo-ci[master]: osmocom_build_deps.yml: Add dahdi-source for libosmo-abis In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16025 ) Change subject: osmocom_build_deps.yml: Add dahdi-source for libosmo-abis ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ic314c992f83d9fe1ea6035d67070d7c6004cc9e3 Gerrit-Change-Number: 16025 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 11 Nov 2019 16:38:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 16:39:04 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 11 Nov 2019 16:39:04 +0000 Subject: Change in osmo-ci[master]: osmocom_build_deps: Add libaio-dev for osmo-ccid-client In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16024 ) Change subject: osmocom_build_deps: Add libaio-dev for osmo-ccid-client ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16024 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6c3b536bee3d1bbd6f526bc3765fc4ad9aa4a0dd Gerrit-Change-Number: 16024 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 11 Nov 2019 16:39:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 16:39:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 11 Nov 2019 16:39:06 +0000 Subject: Change in osmo-ci[master]: osmocom_build_deps: Add libaio-dev for osmo-ccid-client In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16024 ) Change subject: osmocom_build_deps: Add libaio-dev for osmo-ccid-client ...................................................................... osmocom_build_deps: Add libaio-dev for osmo-ccid-client Change-Id: I6c3b536bee3d1bbd6f526bc3765fc4ad9aa4a0dd --- M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index efbf94a..c780ccf 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -91,6 +91,7 @@ - libusb-dev - libzmq3-dev - sqlite3 + - libaio-dev - name: install liblua for jessie apt: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16024 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6c3b536bee3d1bbd6f526bc3765fc4ad9aa4a0dd Gerrit-Change-Number: 16024 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 16:39:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 11 Nov 2019 16:39:07 +0000 Subject: Change in osmo-ci[master]: osmocom_build_deps.yml: Add dahdi-source for libosmo-abis In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16025 ) Change subject: osmocom_build_deps.yml: Add dahdi-source for libosmo-abis ...................................................................... osmocom_build_deps.yml: Add dahdi-source for libosmo-abis Change-Id: Ic314c992f83d9fe1ea6035d67070d7c6004cc9e3 --- M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index c780ccf..097dcb1 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -58,6 +58,7 @@ update_cache: yes install_recommends: no with_items: + - dahdi-source - docbook5-xml - libboost-dev - libc-ares-dev -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16025 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ic314c992f83d9fe1ea6035d67070d7c6004cc9e3 Gerrit-Change-Number: 16025 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 18:21:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 11 Nov 2019 18:21:05 +0000 Subject: Change in osmo-asf4-dfu[master]: include board (target) in filename, files are now called like References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16026 ) Change subject: include board (target) in filename, files are now called like ...................................................................... include board (target) in filename, files are now called like bootloader-sysmooctsim-0.1.1-5554-dirty.elf Change-Id: Ibdde1c02d5dd3bcd714bae1d374397d9596fede0 --- M README.md M gcc/Makefile 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-asf4-dfu refs/changes/26/16026/1 diff --git a/README.md b/README.md index dd61824..e63565e 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The board name can be set in 'gcc/Makefile' *BOARD* variable, or provided while compiling (e.g. `make BOARD=SAME54_XPLAINED_PRO`). *SAME54_XPLAINED_PRO* is the default value. -The resulting firmware binary is `bootloader.bin`. +The resulting firmware binary is `bootloader-$(BOARD)-$(GIT_VERSION).bin`. Flashing ======== @@ -66,7 +66,7 @@ To flash the USB DFU bootloader, perform the following actions: * remove reserved bootloader space so we can erase it: `edbg --target atmel_cm4v2 --fuse wv,29:26,15` * erase the whole flash: `edbg --target atmel_cm4v2 --fuse v,29:26,15 --erase` -* program the bootloader: `edbg --target atmel_cm4v2 --fuse v,29:26,15 --program --verify --file bootloader.bin` +* program the bootloader: `edbg --target atmel_cm4v2 --fuse v,29:26,15 --program --verify --file bootloader-BOARD-XXXX.bin` * reserve bootloader space: `edbg --target atmel_cm4v2 --fuse wv,29:26,13` SWJ diff --git a/gcc/Makefile b/gcc/Makefile index 41779c3..86d199c 100644 --- a/gcc/Makefile +++ b/gcc/Makefile @@ -169,7 +169,8 @@ "gcc/system_same54.d" \ "atmel_start.d" -OUTPUT_FILE_NAME := bootloader-$(GIT_VERSION) +BOARD_LC := $(shell echo $(BOARD) | tr A-Z a-z) +OUTPUT_FILE_NAME := bootloader-$(BOARD_LC)-$(GIT_VERSION) QUOTE := " OUTPUT_FILE_PATH +=$(OUTPUT_FILE_NAME).elf OUTPUT_FILE_PATH_AS_ARGS +=$(OUTPUT_FILE_NAME).elf -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: Ibdde1c02d5dd3bcd714bae1d374397d9596fede0 Gerrit-Change-Number: 16026 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 18:21:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 11 Nov 2019 18:21:05 +0000 Subject: Change in osmo-asf4-dfu[master]: create bootloader-$(BOARD).{elf, bin} symlinks References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16027 ) Change subject: create bootloader-$(BOARD).{elf,bin} symlinks ...................................................................... create bootloader-$(BOARD).{elf,bin} symlinks Change-Id: I3a1eb038e51f4b38ae2e2154bd53c615d98db517 --- M gcc/Makefile 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-asf4-dfu refs/changes/27/16027/1 diff --git a/gcc/Makefile b/gcc/Makefile index 86d199c..06404ad 100644 --- a/gcc/Makefile +++ b/gcc/Makefile @@ -180,7 +180,7 @@ vpath %.S ../ # All Target -all: $(SUB_DIRS) $(OUTPUT_FILE_PATH) +all: $(SUB_DIRS) $(OUTPUT_FILE_PATH) symlink # Linker target @@ -203,7 +203,10 @@ "arm-none-eabi-objdump" -h -S "$(OUTPUT_FILE_NAME).elf" > "$(OUTPUT_FILE_NAME).lss" "arm-none-eabi-size" "$(OUTPUT_FILE_NAME).elf" - +.PHONY: symlink +symlink: $(OUTPUT_FILE_PATH) + ln -sf $(OUTPUT_FILE_NAME).bin bootloader-$(BOARD_LC).bin + ln -sf $(OUTPUT_FILE_NAME).elf bootloader-$(BOARD_LC).elf # Compiler targets @@ -253,4 +256,4 @@ rm -f $(DEPS_AS_ARGS) rm -f $(OUTPUT_FILE_NAME).a $(OUTPUT_FILE_NAME).hex $(OUTPUT_FILE_NAME).bin \ $(OUTPUT_FILE_NAME).lss $(OUTPUT_FILE_NAME).eep $(OUTPUT_FILE_NAME).map \ - $(OUTPUT_FILE_NAME).srec + $(OUTPUT_FILE_NAME).srec bootloader-$(BOARD_LC).bin bootloader-$(BOARD_LC).elf -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16027 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: I3a1eb038e51f4b38ae2e2154bd53c615d98db517 Gerrit-Change-Number: 16027 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 18:29:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 11 Nov 2019 18:29:07 +0000 Subject: Change in osmo-ccid-firmware[master]: fix usb descriptors for CDC_ACM References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16028 ) Change subject: fix usb descriptors for CDC_ACM ...................................................................... fix usb descriptors for CDC_ACM This should resolve the following error reported on the Linux host: [1929282.072955] cdc_acm 1-4.1.1:1.1: Control and data interfaces are not separated! Change-Id: Iabd53b4146ffd3b4a4667beba47f15cccd08aa55 --- M sysmoOCTSIM/usb_descriptors.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/28/16028/1 diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index ddb925b..944e43b 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -113,7 +113,7 @@ .bDescriptorType = CDC_CS_INTERFACE, .bDescriptorSubtype = CDC_SCS_UNION, .bMasterInterface = CONF_USB_CDCD_ACM_COMM_BIFCNUM, - .bSlaveInterface0 = 0x01, + .bSlaveInterface0 = CONF_USB_CDCD_ACM_DATA_BIFCNUM, }, .ep = { { -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16028 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iabd53b4146ffd3b4a4667beba47f15cccd08aa55 Gerrit-Change-Number: 16028 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 18:31:32 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 18:31:32 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 3: nice catch, thx! -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 11 Nov 2019 18:31:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 18:43:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 18:43:05 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() and _str_ip_cmp() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15961 ) Change subject: add osmo_sockaddr_str_cmp() and _str_ip_cmp() ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15961/4/src/sockaddr_str.c File src/sockaddr_str.c: https://gerrit.osmocom.org/c/libosmocore/+/15961/4/src/sockaddr_str.c at 104 PS4, Line 104: int osmo_sockaddr_str_cmp(const struct osmo_sockaddr_str *a, const struct osmo_sockaddr_str *b) > It's not clear to me why do you want to have this one as a public API having the other. [?] This patch first had only this one, and later I figured it would be very useful to also compare by actual resulting IP address. I figured, to sort a list of addresses by the string representation chosen by the user, then this cmp() would be more desirable, so I was just going to keep this. indeed I don't currently have a caller for it... I'm slightly reluctant, but fair enough then. In that case I'll just have one osmo_sockaddr_str_cmp() that compares resulting IP addresses and keep the pure string variant static. If we need it later it can be called osmo_sockaddr_str_cmp_by_string() or something. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 11 Nov 2019 18:43:05 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 19:12:40 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 19:12:40 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15957 to look at the new patch set (#4). Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... utils.h: add OSMO_NAME_C_IMPL() macro Provide a common implementation for foo_name_c() functions that base on foo_name_buf() functions. char *foo_name_c(void *ctx, example_t arg) { OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg) } Rationale: the most efficient way of composing strings that have optional parts or require loops for composition is by writing to a ready char[], and this in turn is easiest done by using OSMO_STRBUF_* API. Using such a basic name string implementation which typically returns a length, I often want a more convenient version that returns a char*, which can just be inlined in a "%s" string format -- crucially: skipping string composition when inlined in a LOGP(). This common implementation allows saving code dup, only the function signature is needed. Why not include the function signature in the macro? The two sets of varargs (1: signature args, 2: function call args) are hard to do. Also, having an explicit signature is good for readability and code grepping / ctags. Upcoming uses: in libosmocore in the mslookup (D-GSM) implementation (osmo_mslookup_result_name_c()), and in osmo_msc's codec negotiation implementation (sdp_audio_codecs_name_c(), sdp_msg_name_c(), ...). I54b6c0810f181259da307078977d9ef3d90458c9 (libosmocore) If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 (osmo-msc) Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 --- M include/osmocom/core/utils.h M tests/utils/utils_test.c M tests/utils/utils_test.ok 3 files changed, 156 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/15957/4 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 19:12:40 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 19:12:40 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15961 to look at the new patch set (#5). Change subject: add osmo_sockaddr_str_cmp() ...................................................................... add osmo_sockaddr_str_cmp() Currently planned user: for Distributed GSM in osmo-hlr: setting per-MSC service addresses in VTY: replace/remove existing entries. osmo_sockaddr_str_cmp() is useful to catch identical resulting IP addresses, regardless of differing strings (e.g. '0::' and '::' are equal but differ in strings). Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 --- M include/osmocom/core/sockaddr_str.h M include/osmocom/core/utils.h M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 5 files changed, 681 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/15961/5 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 19:12:42 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 19:12:42 +0000 Subject: Change in libosmocore[master]: fix osmo_quote_str_c() to alloc sufficient size References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16029 ) Change subject: fix osmo_quote_str_c() to alloc sufficient size ...................................................................... fix osmo_quote_str_c() to alloc sufficient size osmo_quote_str_c() allocates too small buffers when the quoted string also contains unprintable characters that need escaping (which of course are longer than strlen() + 3 that it currently naively assumes). Add osmo_quote_str_buf3() to actually return the required buffer size (sb.chars_needed), osmo_quote_str_buf2() unfortunately returns the char buffer itself. Hence implement osmo_quote_str_c() using OSMO_NAME_C_IMPL(), which now always allocates sufficient size. Change-Id: I04d97e8eec93ffb74006503c356a68cceaf429ac --- M include/osmocom/core/utils.h M src/utils.c 2 files changed, 18 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/16029/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index ef58eeb..cb69b64 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -151,6 +151,7 @@ char *osmo_escape_str_c(const void *ctx, const char *str, int in_len); const char *osmo_quote_str(const char *str, int in_len); char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int in_len); +size_t osmo_quote_str_buf3(char *buf, size_t bufsize, const char *str, int in_len); const char *osmo_quote_str_buf(const char *str, int in_len, char *buf, size_t bufsize); char *osmo_quote_str_c(const void *ctx, const char *str, int in_len); diff --git a/src/utils.c b/src/utils.c index ea1de0f..95245f5 100644 --- a/src/utils.c +++ b/src/utils.c @@ -756,6 +756,20 @@ return osmo_escape_str_buf2(buf, in_len+1, str, in_len); } +/*! Like osmo_quote_str_buf3(), but returning the buf instead of the required number of characters. + * The function signature is suitable for OSMO_STRBUF_APPEND_NOLEN(). + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length. + * \return buf. + */ +char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) +{ + osmo_quote_str_buf3(buf, bufsize, str, in_len); + return buf; +} + /*! Like osmo_escape_str_buf2(), but returns double-quotes around a string, or "NULL" for a NULL string. * This allows passing any char* value and get its C representation as string. * The function signature is suitable for OSMO_STRBUF_APPEND_NOLEN(). @@ -765,7 +779,7 @@ * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length. * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). */ -char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) +size_t osmo_quote_str_buf3(char *buf, size_t bufsize, const char *str, int in_len) { struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; if (!str) @@ -775,7 +789,7 @@ OSMO_STRBUF_APPEND_NOLEN(sb, osmo_escape_str_buf2, str, in_len); OSMO_STRBUF_PRINTF(sb, "\""); } - return buf; + return sb.chars_needed; } /*! Like osmo_quote_str_buf2, but with unusual ordering of arguments, and may sometimes return string constants instead @@ -815,21 +829,7 @@ */ char *osmo_quote_str_c(const void *ctx, const char *str, int in_len) { - size_t len = in_len == -1 ? strlen(str) : in_len; - char *buf; - - /* account for two quote characters + terminating NUL */ - len += 3; - - /* some minimum length for things like "NULL" or "(error)" */ - if (len < 32) - len = 32; - - buf = talloc_size(ctx, len); - if (!buf) - return NULL; - - return osmo_quote_str_buf2(buf, len, str, in_len); + OSMO_NAME_C_IMPL(ctx, 32, "(error)", osmo_quote_str_buf3, str, in_len) } /*! perform an integer square root operation on unsigned 32bit integer. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I04d97e8eec93ffb74006503c356a68cceaf429ac Gerrit-Change-Number: 16029 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 19:12:43 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 19:12:43 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order ...................................................................... osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order Of course both v4 and v6 addresses are kept in network byte order when represented in bytes, but when writing, I somehow must have assumed that inet_pton() returns host byte order. Fix that mixup: osmo_sockaddr_str_from_32() and osmo_sockaddr_str_to_32() actually use network byte order. Fix the doc strings. osmo_sockaddr_str_from_32n() and osmo_sockaddr_str_to_32n() actually use host byte order, though reflecting 'n' in their name. Deprecate these. Add osmo_sockaddr_str_from_32h() and osmo_sockaddr_str_to_32h() that are identical to the "32n" variants, but without the confusing names. sockaddr_str_test: use hexdump instead of %x to show the osmo_sockaddr_str_to_32*() conversions so that the error becomes obvious. (Printing %x reverses the bytes again and made it look correct.) Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 --- M TODO-RELEASE M include/osmocom/core/sockaddr_str.h M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 5 files changed, 92 insertions(+), 66 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/16030/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 692bdc1..be858ae 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -11,3 +11,7 @@ core struct osmo_tdef fields min_val,max_val added, ABI break (arrays of structs used in programs) gsm API added osmo_gsm48_rfpowercap2powerclass() gb API added bssgp_bvc_ctx_free() +core osmo_sockaddr_str_from_32n(), + osmo_sockaddr_str_to_32n() Deprecate: named 'n' but use host byte order. +core osmo_sockaddr_str_from_32h(), + osmo_sockaddr_str_to_32h() New, use host byte order and are named appropriately. diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index d7a8cdf..e42216a 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -31,6 +31,7 @@ #include #include #include +#include struct in_addr; struct in6_addr; @@ -77,7 +78,7 @@ int osmo_sockaddr_str_from_in_addr(struct osmo_sockaddr_str *sockaddr_str, const struct in_addr *addr, uint16_t port); int osmo_sockaddr_str_from_in6_addr(struct osmo_sockaddr_str *sockaddr_str, const struct in6_addr *addr, uint16_t port); int osmo_sockaddr_str_from_32(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port); -int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port); +int osmo_sockaddr_str_from_32h(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port); int osmo_sockaddr_str_from_sockaddr_in(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_in *src); int osmo_sockaddr_str_from_sockaddr_in6(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_in6 *src); int osmo_sockaddr_str_from_sockaddr(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_storage *src); @@ -85,9 +86,14 @@ int osmo_sockaddr_str_to_in_addr(const struct osmo_sockaddr_str *sockaddr_str, struct in_addr *dst); int osmo_sockaddr_str_to_in6_addr(const struct osmo_sockaddr_str *sockaddr_str, struct in6_addr *dst); int osmo_sockaddr_str_to_32(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip); -int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip); +int osmo_sockaddr_str_to_32h(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip); int osmo_sockaddr_str_to_sockaddr_in(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_in *dst); int osmo_sockaddr_str_to_sockaddr_in6(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_in6 *dst); int osmo_sockaddr_str_to_sockaddr(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_storage *dst); +int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) + OSMO_DEPRECATED("osmo_sockaddr_str_from_32n() actually uses *host* byte order. Use osmo_sockaddr_str_from_32h() instead"); +int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) + OSMO_DEPRECATED("osmo_sockaddr_str_to_32n() actually uses *host* byte order. Use osmo_sockaddr_str_to_32h() instead"); + /*! @} */ diff --git a/src/sockaddr_str.c b/src/sockaddr_str.c index 7a81866..72534b3 100644 --- a/src/sockaddr_str.c +++ b/src/sockaddr_str.c @@ -258,7 +258,7 @@ return 0; } -/*! Convert IPv4 address from 32bit host-byte-order to osmo_sockaddr_str, and set port. +/*! Convert IPv4 address from 32bit network-byte-order to osmo_sockaddr_str, and set port. * \param[out] sockaddr_str The instance to copy to. * \param[in] addr 32bit IPv4 address data. * \param[in] port Port number. @@ -273,19 +273,26 @@ return osmo_sockaddr_str_from_in_addr(sockaddr_str, &addr, port); } -/*! Convert IPv4 address from 32bit network-byte-order to osmo_sockaddr_str, and set port. +/*! Convert IPv4 address from 32bit host-byte-order to osmo_sockaddr_str, and set port. * \param[out] sockaddr_str The instance to copy to. * \param[in] addr 32bit IPv4 address data. * \param[in] port Port number. * \return 0 on success, negative on error. */ -int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) +int osmo_sockaddr_str_from_32h(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) { if (!sockaddr_str) return -ENOSPC; return osmo_sockaddr_str_from_32(sockaddr_str, osmo_ntohl(ip), port); } +/*! DEPRECATED: the name suggests a conversion from network byte order, but actually converts from host byte order. Use + * osmo_sockaddr_str_from_32 for network byte order and osmo_sockaddr_str_from_32h for host byte order. */ +int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) +{ + return osmo_sockaddr_str_from_32h(sockaddr_str, ip, port); +} + /*! Convert IPv4 address and port to osmo_sockaddr_str. * \param[out] sockaddr_str The instance to copy to. * \param[in] src IPv4 address and port data. @@ -379,9 +386,9 @@ return 0; } -/*! Convert osmo_sockaddr_str address string to IPv4 address data in host-byte-order. +/*! Convert osmo_sockaddr_str address string to IPv4 address data in network-byte-order. * \param[in] sockaddr_str The instance to convert the IP of. - * \param[out] dst IPv4 address data in 32bit host-byte-order format to write to. + * \param[out] dst IPv4 address data in 32bit network-byte-order format to write to. * \return 0 on success, negative on error (e.g. invalid IPv4 address string). */ int osmo_sockaddr_str_to_32(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) @@ -399,12 +406,12 @@ return 0; } -/*! Convert osmo_sockaddr_str address string to IPv4 address data in network-byte-order. +/*! Convert osmo_sockaddr_str address string to IPv4 address data in host-byte-order. * \param[in] sockaddr_str The instance to convert the IP of. - * \param[out] dst IPv4 address data in 32bit network-byte-order format to write to. + * \param[out] dst IPv4 address data in 32bit host-byte-order format to write to. * \return 0 on success, negative on error (e.g. invalid IPv4 address string). */ -int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) +int osmo_sockaddr_str_to_32h(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) { int rc; uint32_t ip_h; @@ -419,6 +426,13 @@ return 0; } +/*! DEPRECATED: the name suggests a conversion to network byte order, but actually converts to host byte order. Use + * osmo_sockaddr_str_to_32() for network byte order and osmo_sockaddr_str_to_32h() for host byte order. */ +int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) +{ + return osmo_sockaddr_str_to_32h(sockaddr_str, ip); +} + /*! Convert osmo_sockaddr_str address string and port to IPv4 address and port data. * \param[in] sockaddr_str The instance to convert the IP and port of. * \param[out] dst IPv4 address and port data to write to. diff --git a/tests/sockaddr_str/sockaddr_str_test.c b/tests/sockaddr_str/sockaddr_str_test.c index f1e844e..c4827e0 100644 --- a/tests/sockaddr_str/sockaddr_str_test.c +++ b/tests/sockaddr_str/sockaddr_str_test.c @@ -149,7 +149,8 @@ uint32_t a = 0; rc = osmo_sockaddr_str_to_32(x, &a); - printf(" osmo_sockaddr_str_to_32() %s uint32_t=0x%x\n", rc_name(rc), a); + printf(" osmo_sockaddr_str_to_32() %s uint8_t[4]=[ %s]\n", rc_name(rc), + osmo_hexdump((void*)&a, sizeof(a))); if (rc == 0) { struct osmo_sockaddr_str back; @@ -164,13 +165,14 @@ { uint32_t a = 0; - rc = osmo_sockaddr_str_to_32n(x, &a); - printf(" osmo_sockaddr_str_to_32n() %s uint32_t=0x%x\n", rc_name(rc), a); + rc = osmo_sockaddr_str_to_32h(x, &a); + printf(" osmo_sockaddr_str_to_32h() %s uint8_t[4]=[ %s]\n", rc_name(rc), + osmo_hexdump((void*)&a, sizeof(a))); if (rc == 0) { struct osmo_sockaddr_str back; - rc = osmo_sockaddr_str_from_32n(&back, a, x->port); - printf(" -> osmo_sockaddr_str_from_32n() %s ", rc_name(rc)); + rc = osmo_sockaddr_str_from_32h(&back, a, x->port); + printf(" -> osmo_sockaddr_str_from_32h() %s ", rc_name(rc)); dump_oip(&back); if (memcmp(x, &back, sizeof(back))) printf(" DIFFERS!\n"); diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index 31f630f..910e919 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -7,10 +7,10 @@ osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=01020304 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc == 0 uint32_t=0x4030201 + osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 01 02 03 04 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } - osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0x1020304 - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 04 03 02 01 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005010203040000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -26,10 +26,10 @@ osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=00000000 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc == 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } - osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0x0 - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 00 00 00 00 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -45,10 +45,10 @@ osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=ffffffff -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc == 0 uint32_t=0xffffffff + osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ ff ff ff ff ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } - osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0xffffffff - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ ff ff ff ff ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=0200ffffffffffff0000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -63,8 +63,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000001000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -77,8 +77,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000001000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -92,8 +92,8 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00010002000300000000000000000004 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000001000200030000000000000000000400000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } @@ -109,8 +109,8 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000000000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } @@ -126,8 +126,8 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000001 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000000000000000000000000000000000000000000000100000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } @@ -143,8 +143,8 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=ffffffffffffffffffffffffffffffff -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a00ffff00000000ffffffffffffffffffffffffffffffff00000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -161,8 +161,8 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=ffffffffffffffffffffffffffffffff -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } DIFFERS! - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a00ffff00000000ffffffffffffffffffffffffffffffff00000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -179,8 +179,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000001000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -193,8 +193,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000001000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -207,8 +207,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -222,8 +222,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000005000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -237,8 +237,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -252,8 +252,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000005000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -266,8 +266,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -281,10 +281,10 @@ osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=01020304 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc == 0 uint32_t=0x4030201 + osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 01 02 03 04 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } - osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0x1020304 - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 04 03 02 01 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000000010203040000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -299,8 +299,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -316,8 +316,8 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=0000000000000000000000010a090807 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } DIFFERS! - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000001000000000000000000000000000000010a09080700000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } @@ -335,10 +335,10 @@ osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=00000000 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc == 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } - osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0x0 - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 00 00 00 00 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -354,8 +354,8 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } @@ -372,8 +372,8 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } DIFFERS! - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 19:37:47 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 19:37:47 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15957 to look at the new patch set (#6). Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... utils.h: add OSMO_NAME_C_IMPL() macro Provide a common implementation for foo_name_c() functions that base on foo_name_buf() functions. char *foo_name_c(void *ctx, example_t arg) { OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg) } Rationale: the most efficient way of composing strings that have optional parts or require loops for composition is by writing to a ready char[], and this in turn is easiest done by using OSMO_STRBUF_* API. Using such a basic name string implementation which typically returns a length, I often want a more convenient version that returns a char*, which can just be inlined in a "%s" string format -- crucially: skipping string composition when inlined in a LOGP(). This common implementation allows saving code dup, only the function signature is needed. Why not include the function signature in the macro? The two sets of varargs (1: signature args, 2: function call args) are hard to do. Also, having an explicit signature is good for readability and code grepping / ctags. Upcoming uses: in libosmocore in the mslookup (D-GSM) implementation (osmo_mslookup_result_name_c()), and in osmo_msc's codec negotiation implementation (sdp_audio_codecs_name_c(), sdp_msg_name_c(), ...). I54b6c0810f181259da307078977d9ef3d90458c9 (libosmocore) If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 (osmo-msc) Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 --- M include/osmocom/core/utils.h M tests/utils/utils_test.c M tests/utils/utils_test.ok 3 files changed, 157 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/15957/6 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 19:38:10 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 19:38:10 +0000 Subject: Change in libosmocore[master]: test: add OSMO_SOCKADDR_STR_FMT to sockaddr_str_test.c In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15958 ) Change subject: test: add OSMO_SOCKADDR_STR_FMT to sockaddr_str_test.c ...................................................................... test: add OSMO_SOCKADDR_STR_FMT to sockaddr_str_test.c This shows the weird format choice for showing IPv6 addresses' port, fixed in subsequent patch. Change-Id: I8e5ebfbbc3a2b88aed820e8f845d9f6ededb29de --- M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 2 files changed, 24 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/tests/sockaddr_str/sockaddr_str_test.c b/tests/sockaddr_str/sockaddr_str_test.c index 4284387..bf7d738 100644 --- a/tests/sockaddr_str/sockaddr_str_test.c +++ b/tests/sockaddr_str/sockaddr_str_test.c @@ -107,6 +107,8 @@ printf("\n\n"); dump_oip(x); + printf(" OSMO_SOCKADDR_STR_FMT: '" OSMO_SOCKADDR_STR_FMT "'\n", + OSMO_SOCKADDR_STR_FMT_ARGS(x)); printf(" osmo_sockaddr_str_is_set() = %s\n", osmo_sockaddr_str_is_set(x) ? "true" : "false"); printf(" osmo_sockaddr_str_is_nonzero() = %s\n", osmo_sockaddr_str_is_nonzero(x) ? "true" : "false"); diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index 781e9d1..5ebf7be 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -1,6 +1,7 @@ { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '1.2.3.4:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=01020304 @@ -19,6 +20,7 @@ { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } + OSMO_SOCKADDR_STR_FMT: '0.0.0.0:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=00000000 @@ -37,6 +39,7 @@ { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } + OSMO_SOCKADDR_STR_FMT: '255.255.255.255:65535' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=ffffffff @@ -55,6 +58,7 @@ { .af = AF_INET, .ip = "0.0.0.256", .port = 1 } + OSMO_SOCKADDR_STR_FMT: '0.0.0.256:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -68,6 +72,7 @@ { .af = AF_INET, .ip = "not an ip address", .port = 1 } + OSMO_SOCKADDR_STR_FMT: 'not an ip address:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -81,6 +86,7 @@ { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '1:2:3::4:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -97,6 +103,7 @@ { .af = AF_INET6, .ip = "::", .port = 0 } + OSMO_SOCKADDR_STR_FMT: ':::0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -113,6 +120,7 @@ { .af = AF_INET6, .ip = "::1", .port = 0 } + OSMO_SOCKADDR_STR_FMT: '::1:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -129,6 +137,7 @@ { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } + OSMO_SOCKADDR_STR_FMT: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff:65535' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -145,6 +154,7 @@ { .af = AF_INET6, .ip = "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", .port = 65535 } + OSMO_SOCKADDR_STR_FMT: 'FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:65535' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -164,6 +174,7 @@ { .af = AF_INET6, .ip = "::fffff", .port = 1 } + OSMO_SOCKADDR_STR_FMT: '::fffff:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -177,6 +188,7 @@ { .af = AF_INET6, .ip = "not an ip address", .port = 1 } + OSMO_SOCKADDR_STR_FMT: 'not an ip address:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -190,6 +202,7 @@ { .af = AF_INET6, .ip = "1.2.3.4", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '1.2.3.4:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -204,6 +217,7 @@ { .af = AF_INET, .ip = "1:2:3::4", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '1:2:3::4:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -218,6 +232,7 @@ { .af = AF_UNSPEC, .ip = "1.2.3.4", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '1.2.3.4:5' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -232,6 +247,7 @@ { .af = AF_INET, .ip = "", .port = 5 } + OSMO_SOCKADDR_STR_FMT: ':5' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -245,6 +261,7 @@ { .af = AF_INET6, .ip = "", .port = 5 } + OSMO_SOCKADDR_STR_FMT: ':5' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -258,6 +275,7 @@ { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } + OSMO_SOCKADDR_STR_FMT: '1.2.3.4:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=01020304 @@ -276,6 +294,7 @@ { .af = AF_INET, .ip = "1.2.3:4:5", .port = 0 } + OSMO_SOCKADDR_STR_FMT: '1.2.3:4:5:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -290,6 +309,7 @@ { .af = AF_INET6, .ip = "::1:10.9.8.7", .port = 1 } + OSMO_SOCKADDR_STR_FMT: '::1:10.9.8.7:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -309,6 +329,7 @@ { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '0.0.0.0:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=00000000 @@ -327,6 +348,7 @@ { .af = AF_INET6, .ip = "::", .port = 5 } + OSMO_SOCKADDR_STR_FMT: ':::5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15958 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I8e5ebfbbc3a2b88aed820e8f845d9f6ededb29de Gerrit-Change-Number: 15958 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 19:38:11 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 19:38:11 +0000 Subject: Change in libosmocore[master]: fix OSMO_SOCKADDR_STR_FMT for IPv6 In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15959 ) Change subject: fix OSMO_SOCKADDR_STR_FMT for IPv6 ...................................................................... fix OSMO_SOCKADDR_STR_FMT for IPv6 The format prints IP:port separated by a colon, which of course is confusing when the IPv6 address itself contains mostly colons. The new format adds square braces. cafe:face::1:42 -> [cafe:face::1]:42 The IPv4 format remains unchanged: 1.2.3.4:42 Change-Id: I161f8427729ae31be0eac719b7a4a9290715e37f --- M include/osmocom/core/sockaddr_str.h M tests/sockaddr_str/sockaddr_str_test.ok 2 files changed, 17 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, approved diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index d47b2a4..6dd428c 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -61,8 +61,12 @@ * struct osmo_sockaddr_str *my_sockaddr_str = ...; * printf("got " OSMO_SOCKADDR_STR_FMT "\n", OSMO_SOCKADDR_STR_FMT_ARGS(my_sockaddr_str)); */ -#define OSMO_SOCKADDR_STR_FMT "%s:%u" -#define OSMO_SOCKADDR_STR_FMT_ARGS(R) ((R)? (R)->ip : "NULL"), ((R)? (R)->port : 0) +#define OSMO_SOCKADDR_STR_FMT "%s%s%s:%u" +#define OSMO_SOCKADDR_STR_FMT_ARGS(R) \ + ((R) && (R)->af == AF_INET6)? "[" : "", \ + (R)? (R)->ip : "NULL", \ + ((R) && (R)->af == AF_INET6)? "]" : "", \ + (R)? (R)->port : 0 bool osmo_sockaddr_str_is_set(const struct osmo_sockaddr_str *sockaddr_str); bool osmo_sockaddr_str_is_nonzero(const struct osmo_sockaddr_str *sockaddr_str); diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index 5ebf7be..bc18225 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -86,7 +86,7 @@ { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } - OSMO_SOCKADDR_STR_FMT: '1:2:3::4:5' + OSMO_SOCKADDR_STR_FMT: '[1:2:3::4]:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -103,7 +103,7 @@ { .af = AF_INET6, .ip = "::", .port = 0 } - OSMO_SOCKADDR_STR_FMT: ':::0' + OSMO_SOCKADDR_STR_FMT: '[::]:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -120,7 +120,7 @@ { .af = AF_INET6, .ip = "::1", .port = 0 } - OSMO_SOCKADDR_STR_FMT: '::1:0' + OSMO_SOCKADDR_STR_FMT: '[::1]:0' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -137,7 +137,7 @@ { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } - OSMO_SOCKADDR_STR_FMT: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff:65535' + OSMO_SOCKADDR_STR_FMT: '[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -154,7 +154,7 @@ { .af = AF_INET6, .ip = "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", .port = 65535 } - OSMO_SOCKADDR_STR_FMT: 'FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:65535' + OSMO_SOCKADDR_STR_FMT: '[FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -174,7 +174,7 @@ { .af = AF_INET6, .ip = "::fffff", .port = 1 } - OSMO_SOCKADDR_STR_FMT: '::fffff:1' + OSMO_SOCKADDR_STR_FMT: '[::fffff]:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -188,7 +188,7 @@ { .af = AF_INET6, .ip = "not an ip address", .port = 1 } - OSMO_SOCKADDR_STR_FMT: 'not an ip address:1' + OSMO_SOCKADDR_STR_FMT: '[not an ip address]:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -202,7 +202,7 @@ { .af = AF_INET6, .ip = "1.2.3.4", .port = 5 } - OSMO_SOCKADDR_STR_FMT: '1.2.3.4:5' + OSMO_SOCKADDR_STR_FMT: '[1.2.3.4]:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -261,7 +261,7 @@ { .af = AF_INET6, .ip = "", .port = 5 } - OSMO_SOCKADDR_STR_FMT: ':5' + OSMO_SOCKADDR_STR_FMT: '[]:5' osmo_sockaddr_str_is_set() = false osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -309,7 +309,7 @@ { .af = AF_INET6, .ip = "::1:10.9.8.7", .port = 1 } - OSMO_SOCKADDR_STR_FMT: '::1:10.9.8.7:1' + OSMO_SOCKADDR_STR_FMT: '[::1:10.9.8.7]:1' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = true osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 @@ -348,7 +348,7 @@ { .af = AF_INET6, .ip = "::", .port = 5 } - OSMO_SOCKADDR_STR_FMT: ':::5' + OSMO_SOCKADDR_STR_FMT: '[::]:5' osmo_sockaddr_str_is_set() = true osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15959 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I161f8427729ae31be0eac719b7a4a9290715e37f Gerrit-Change-Number: 15959 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 19:43:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 19:43:04 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15957 to look at the new patch set (#7). Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... utils.h: add OSMO_NAME_C_IMPL() macro Provide a common implementation for foo_name_c() functions that base on foo_name_buf() functions. char *foo_name_c(void *ctx, example_t arg) { OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg) } Rationale: the most efficient way of composing strings that have optional parts or require loops for composition is by writing to a ready char[], and this in turn is easiest done by using OSMO_STRBUF_* API. Using such a basic name string implementation which typically returns a length, I often want a more convenient version that returns a char*, which can just be inlined in a "%s" string format -- crucially: skipping string composition when inlined in a LOGP(). This common implementation allows saving code dup, only the function signature is needed. Why not include the function signature in the macro? The two sets of varargs (1: signature args, 2: function call args) are hard to do. Also, having an explicit signature is good for readability and code grepping / ctags. Upcoming uses: in libosmocore in the mslookup (D-GSM) implementation (osmo_mslookup_result_name_c()), and in osmo_msc's codec negotiation implementation (sdp_audio_codecs_name_c(), sdp_msg_name_c(), ...). I54b6c0810f181259da307078977d9ef3d90458c9 (libosmocore) If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 (osmo-msc) Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 --- M include/osmocom/core/utils.h M tests/utils/utils_test.c M tests/utils/utils_test.ok 3 files changed, 157 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/15957/7 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 20:19:47 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 20:19:47 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 7: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h File include/osmocom/core/utils.h: https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h at 313 PS7, Line 313: _str = (char*)talloc_named_const(CTX, _len, __func__); \ I also had to not use realloc here, for embedded builds (pseudotalloc cannot do talloc_realloc_size()) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 11 Nov 2019 20:19:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 20:25:40 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 20:25:40 +0000 Subject: Change in libosmocore[master]: fix osmo_quote_str_c() to alloc sufficient size In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16029 ) Change subject: fix osmo_quote_str_c() to alloc sufficient size ...................................................................... Patch Set 4: (1 comment) osmo_quote_str* functions would make for an interesting anecdotal review of various ways of composing strings that we (I?) thought were great but later needed improving upon. https://gerrit.osmocom.org/c/libosmocore/+/16029/4/src/utils.c File src/utils.c: https://gerrit.osmocom.org/c/libosmocore/+/16029/4/src/utils.c at 780 PS4, Line 780: * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). interestingly enough, the \return doc didn't need any change, it was plain wrong for osmo_quote_str_buf2() :/ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I04d97e8eec93ffb74006503c356a68cceaf429ac Gerrit-Change-Number: 16029 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Comment-Date: Mon, 11 Nov 2019 20:25:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 20:26:27 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 20:26:27 +0000 Subject: Change in osmo-msc[master]: cc trans: remove unused tch_rtp_create In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15962 ) Change subject: cc trans: remove unused tch_rtp_create ...................................................................... cc trans: remove unused tch_rtp_create Use of this flag was dropped when adding inter-BSC and inter-MSC Handover support, I forgot to remove it. Change-Id: I5ec78e30eb36fbe78a3f7c46bfa44af5a4eb7bf2 --- M include/osmocom/msc/transaction.h M src/libmsc/gsm_04_08_cc.c 2 files changed, 0 insertions(+), 18 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index 61d8c1a..928b137 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -87,10 +87,6 @@ /* bearer capabilities (rate and codec) */ struct gsm_mncc_bearer_cap bearer_cap; - /* if true, TCH_RTP_CREATE is sent after the - * assignment is done */ - bool tch_rtp_create; - union { struct { diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 792ab61..7e2d70b 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -1655,20 +1655,6 @@ } LOG_TRANS_CAT(trans, DMNCC, LOGL_DEBUG, "rx %s\n", get_mncc_name(MNCC_RTP_CREATE)); - /* 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_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_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. */ - trans->tch_rtp_create = true; - /* Assign call (if not done yet) */ return msc_a_try_call_assignment(trans); } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15962 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5ec78e30eb36fbe78a3f7c46bfa44af5a4eb7bf2 Gerrit-Change-Number: 15962 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 20:26:52 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 20:26:52 +0000 Subject: Change in osmo-msc[master]: fix msc_vlr_test_call.c In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15347 ) Change subject: fix msc_vlr_test_call.c ...................................................................... Patch Set 3: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie995e264eb1e3dd9558a1753ff6f9b55c1d084e1 Gerrit-Change-Number: 15347 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 11 Nov 2019 20:26:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 20:33:15 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 20:33:15 +0000 Subject: Change in osmo-msc[master]: BSSMAP: decode Codec List (BSS Supported) In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15946 ) Change subject: BSSMAP: decode Codec List (BSS Supported) ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/c/osmo-msc/+/15946/1/src/libmsc/ran_msg_a.c File src/libmsc/ran_msg_a.c: https://gerrit.osmocom.org/c/osmo-msc/+/15946/1/src/libmsc/ran_msg_a.c at 127 PS1, Line 127: /* This IE is not critical, do not abort with error. */ > then probably set log level as WARN/NOTICE? I still think it's an error, because the IE was present, but wasn't decodable. We can continue but might end up with a working phone call, or we might end up with codec mismatches or codecs that the BSS doesn't support. I chose to continue to maybe provide the user with a working setup "by coincidence", but the IE was broken. https://gerrit.osmocom.org/c/osmo-msc/+/15946/1/src/libmsc/ran_msg_a.c at 129 PS1, Line 129: ran_dec_msg.compl_l3.codec_list_bss_supported = &codec_list_bss_supported; > I have the feeling that's intended and fine here. [?] ran_decoded() is the only scope that is using the decoded message. It is intended this way to avoid a lot of allocation and ownership issues. So, to decode a RAN message, the caller provides a callback which ran_decoded() below invokes. Anything that should remain after the callback returns must be copied. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e Gerrit-Change-Number: 15946 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 11 Nov 2019 20:33:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 20:47:53 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 11 Nov 2019 20:47:53 +0000 Subject: Change in osmo-msc[master]: MNCC: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC: add optional SDP to the socket protocol ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/15948/1/src/libmsc/mncc.c File src/libmsc/mncc.c: https://gerrit.osmocom.org/c/osmo-msc/+/15948/1/src/libmsc/mncc.c at 266 PS1, Line 266: * char sdp[] starts with a '\0'. */ > for performance reasons I would expect at some point msgb cease to be zero-initialized. [?] The core problem here: I must not assume anything about bytes that remain after the "official" data section in the msgb. So I'll think of a different solution. (We were discussing how msgb might change in API. You are saying that it might not be zero initialized at some point. But also we might choose to randomize unused data for security testing. All that is moot, the byte after the data section in the buffer must not ever matter / be assumed to be anything / be accessed in the first place. Even though it might be an allocated byte of the msgb, the fact that it was never msgb_put() or is later removed again makes it a no-go byte.) -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 11 Nov 2019 20:47:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 11 21:08:43 2019 From: gerrit-no-reply at lists.osmocom.org (roox) Date: Mon, 11 Nov 2019 21:08:43 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix some typos References: Message-ID: roox has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16031 ) Change subject: Fix some typos ...................................................................... Fix some typos Change-Id: Idd9f9640101816ab979b11cc13ffa12d2245108d --- M common/chapters/abis.adoc M common/chapters/control_if.adoc M common/chapters/gb.adoc M common/chapters/gsup.adoc M common/chapters/mncc.adoc M common/chapters/oap.adoc M common/chapters/osmux/mgcp_extension_osmux.adoc M common/chapters/sigtran-osmocom.adoc M common/chapters/sigtran.adoc M common/chapters/smpp.adoc 10 files changed, 20 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/31/16031/1 diff --git a/common/chapters/abis.adoc b/common/chapters/abis.adoc index 7524661..a46abfa 100644 --- a/common/chapters/abis.adoc +++ b/common/chapters/abis.adoc @@ -82,11 +82,11 @@ ==== ipaccess-config This program is very helpful tool which is used to configure Unit ID and -Primarly OML IP. You can find this tool in the OsmoBSC repository under: +Primary OML IP. You can find this tool in the OsmoBSC repository under: './src/ipaccess' -.Example: using ipaccess-config to configure Unit ID and Primarly OML IP of +.Example: using ipaccess-config to configure Unit ID and Primary OML IP of nanoBTS ---- $ ./ipaccess-config -u 1801/0/0<1> 10.9.1.195<2> -o 10.9.1.154<3> diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index cd639c7..67ac045 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -169,7 +169,7 @@ 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+" +The old-style counters available via "+counter.*+" variables are superseded by "+rate_ctr.abs+" so its use is discouraged. There might still be some applications not yet converted to rate_ctr. diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc index 6a6f65c..3e33eea 100644 --- a/common/chapters/gb.adoc +++ b/common/chapters/gb.adoc @@ -91,7 +91,7 @@ ALIVE ACK missing count : 0 (0/s 0/m 0/h 0/d) RESET ACK missing count : 0 (0/s 0/m 0/h 0/d) NSVC Peer Statistics: - ALIVE reponse time : 0 ms + ALIVE response time : 0 ms ---- .Example: Inspecting BSSGP state diff --git a/common/chapters/gsup.adoc b/common/chapters/gsup.adoc index c67dfca..e0034f9 100644 --- a/common/chapters/gsup.adoc +++ b/common/chapters/gsup.adoc @@ -363,7 +363,7 @@ |=== The conditional 'AUTS' and 'RAND' IEs are both present in case the SIM -(via UE) requests an UMTS AKA re-synchronization procedure. Eiter +(via UE) requests an UMTS AKA re-synchronization procedure. Either both optional IEs are present, or none of them. ==== Send Authentication Info Error @@ -1181,7 +1181,7 @@ |27|RES|<>|C|TLV|2-18 |=== -The conditional IEs 'IK', 'CK', 'AUTN' and 'RES' are onl present in +The conditional IEs 'IK', 'CK', 'AUTN' and 'RES' are only present in case the subscriber supports UMTS AKA. [[gsup-ie-rand]] @@ -1197,7 +1197,7 @@ [[gsup-ie-kc]] ==== Kc -The 8-byte Encryption Key of the GSM Authentication and Key Agreemnt +The 8-byte Encryption Key of the GSM Authentication and Key Agreement Algorithm. [[gsup-ie-ik]] diff --git a/common/chapters/mncc.adoc b/common/chapters/mncc.adoc index 3adbf7f..15c9982 100644 --- a/common/chapters/mncc.adoc +++ b/common/chapters/mncc.adoc @@ -68,7 +68,7 @@ signaled using START/STOP DTMF messages which are hauled through various protocols upwards into the core network. -Contrary to that, a mobile terminated DTMF tone is not transfered as an out of +Contrary to that, a mobile terminated DTMF tone is not transferred as an out of band message. Instead, in-band signaling is used, which means a tone is injected early inside a PBX or MGW. diff --git a/common/chapters/oap.adoc b/common/chapters/oap.adoc index 3c5ad35..ad91f36 100644 --- a/common/chapters/oap.adoc +++ b/common/chapters/oap.adoc @@ -209,7 +209,7 @@ [options="header",cols="15%,85%"] |=== -|0x04|Register Requst +|0x04|Register Request |0x05|Register Error |0x06|Register Result |0x08|Challenge Request diff --git a/common/chapters/osmux/mgcp_extension_osmux.adoc b/common/chapters/osmux/mgcp_extension_osmux.adoc index c12e9ef..e2b0947 100644 --- a/common/chapters/osmux/mgcp_extension_osmux.adoc +++ b/common/chapters/osmux/mgcp_extension_osmux.adoc @@ -98,7 +98,7 @@ In OmoMGW, Osmux support is managed through VTY. -.Example: Sample config file section with Osmux configuation +.Example: Sample config file section with Osmux configuration ---- mgcp ... diff --git a/common/chapters/sigtran-osmocom.adoc b/common/chapters/sigtran-osmocom.adoc index a0bc475..3fbaac2 100644 --- a/common/chapters/sigtran-osmocom.adoc +++ b/common/chapters/sigtran-osmocom.adoc @@ -14,7 +14,7 @@ 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 +implemented something 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. @@ -197,7 +197,7 @@ 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 +This is also why most GSM network 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 diff --git a/common/chapters/sigtran.adoc b/common/chapters/sigtran.adoc index fd7d3cc..9e02f38 100644 --- a/common/chapters/sigtran.adoc +++ b/common/chapters/sigtran.adoc @@ -89,9 +89,9 @@ SCCP provides both connectionless (datagram) and connection-oriented services. Both are used in the context of cellular networks. -==== SCCP Adresses +==== SCCP Addresses -SCCP Adresses are quite complex. This is due to the fact that it is +SCCP Addresses 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. @@ -136,11 +136,11 @@ |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 +|ES|Encoding Scheme |Just a peculiar way to indicate the length of the digits |- |Signals |The actual "phone number digits" |==== -For more information about SCCP Adresses and Global Titles, please +For more information about SCCP Addresses and Global Titles, please refer to <> @@ -189,7 +189,7 @@ 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 +Instead, an STP would have to perform _connection coupling_, which is basically the equivalent of an application-level proxy between two SCCP connections, each over one of the two MTP networks. @@ -233,7 +233,7 @@ ===== Signaling Gateway (SG) -The Signaling Gateway (SG) interconnects the SS7 network wit external +The Signaling Gateway (SG) interconnects the SS7 network with 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 diff --git a/common/chapters/smpp.adoc b/common/chapters/smpp.adoc index e62a844..4efb46d 100644 --- a/common/chapters/smpp.adoc +++ b/common/chapters/smpp.adoc @@ -128,7 +128,7 @@ |=== All of the above values reflect the *last measurement report* as -recieved vi A-bis RSL from the BTS. It is thus a snapshot value (of +received vi A-bis RSL from the BTS. It is thus a snapshot value (of the average within one 480ms SACCH period), and not an average over all the SACCH periods during which the channel was open or the SMS was received. Not all measurement reports contain all the values. So you @@ -143,5 +143,5 @@ [options="header", cols="3,1,1,5"] |=== | TLV | IEI | Length | Purpose -| TLVID_osmo_imei | 0x2306 | variable | IMEI of the subscibers phone (ME) +| TLVID_osmo_imei | 0x2306 | variable | IMEI of the subscribers phone (ME) |=== -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16031 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Idd9f9640101816ab979b11cc13ffa12d2245108d Gerrit-Change-Number: 16031 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 01:49:14 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 12 Nov 2019 01:49:14 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add sdp to MNCC References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032 ) Change subject: msc: add sdp to MNCC ...................................................................... msc: add sdp to MNCC SDP is added to the MNCC protocol in osmo-msc Ie16f0804c4d99760cd4a0c544d0889b6313eebb7. This patch adds SDP to the ttcn3 MNCC messaging. These changes still work with current osmo-msc master that doesn't send SDP / ignores received SDP in MNCC. Change-Id: Ic9568c8927507e161aadfad1a4d20aa896d8ae30 --- M library/MNCC_EncDec.cc M library/MNCC_Types.ttcn M library/mncc.h 3 files changed, 106 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/32/16032/1 diff --git a/library/MNCC_EncDec.cc b/library/MNCC_EncDec.cc index b4937e7..f2692d7 100644 --- a/library/MNCC_EncDec.cc +++ b/library/MNCC_EncDec.cc @@ -259,7 +259,7 @@ case MNCC_RTP_FREE: in_rtp = (const struct gsm_mncc_rtp *) in_mncc; rtp = MNCC__PDU__Rtp(in_rtp->callref, in_rtp->ip, in_rtp->port, in_rtp->payload_type, - in_rtp->payload_msg_type); + in_rtp->payload_msg_type, in_rtp->sdp); u.rtp() = rtp; break; default: @@ -315,6 +315,7 @@ sign.imsi() = CHARSTRING(in_mncc->imsi); sign.lchan__type() = in_mncc->lchan_type; sign.lchan__mode() = in_mncc->lchan_mode; + sign.sdp() = in_mncc->sdp; u.signal() = sign; break; } diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn index 828f341..5296579 100644 --- a/library/MNCC_Types.ttcn +++ b/library/MNCC_Types.ttcn @@ -360,7 +360,9 @@ charstring imsi, uint8_t lchan_type, /* empty in OSmoMSC */ - uint8_t lchan_mode /* empty in OsmoMSC */ + uint8_t lchan_mode, /* empty in OsmoMSC */ + + charstring sdp optional }; @@ -374,7 +376,9 @@ uint32_t ip, uint16_t rtp_port, uint32_t payload_type, - uint32_t payload_msg_type + uint32_t payload_msg_type, + + charstring sdp optional }; type record MNCC_PDU_Hello { @@ -464,7 +468,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -494,7 +499,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -527,7 +533,8 @@ emergency := omit, imsi := imsi, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } }; @@ -559,7 +566,8 @@ emergency := *, imsi := imsi, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } }; @@ -592,7 +600,8 @@ emergency := omit, imsi := imsi, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } }; @@ -623,7 +632,8 @@ emergency := omit, imsi := imsi, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } }; @@ -656,7 +666,8 @@ emergency := *, imsi := imsi, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -688,7 +699,8 @@ emergency := omit, imsi := imsi, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -719,7 +731,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -750,7 +763,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -791,7 +805,8 @@ emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -822,7 +837,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -855,7 +871,8 @@ emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -887,7 +904,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -922,7 +940,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -955,7 +974,8 @@ emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -988,7 +1008,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1021,7 +1042,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1053,7 +1075,8 @@ emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1088,7 +1111,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1120,7 +1144,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1152,7 +1177,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1183,7 +1209,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1217,7 +1244,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1249,7 +1277,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1283,7 +1312,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1316,7 +1346,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1349,7 +1380,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1381,7 +1413,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1413,7 +1446,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1443,7 +1477,8 @@ emergency := omit, imsi := ?, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1490,7 +1525,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1521,7 +1557,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1552,7 +1589,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1583,7 +1621,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1614,7 +1653,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1653,7 +1693,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1684,7 +1725,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1715,7 +1757,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1747,7 +1790,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1778,7 +1822,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1810,7 +1855,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1849,7 +1895,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1877,7 +1924,8 @@ ip := 0, rtp_port := 0, payload_type := 0, - payload_msg_type := 0 + payload_msg_type := 0, + sdp := "" } } } @@ -1897,7 +1945,8 @@ ip := ip, rtp_port := rtp_port, payload_type := payload_type, - payload_msg_type := ? + payload_msg_type := ?, + sdp := * } } } @@ -1911,7 +1960,8 @@ ip := ip, rtp_port := rtp_port, payload_type := pt, - payload_msg_type := 0 + payload_msg_type := 0, + sdp := "" } } } @@ -1926,7 +1976,8 @@ ip := ip, rtp_port := rtp_port, payload_type := pt, - payload_msg_type := 0 + payload_msg_type := 0, + sdp := "" } } } diff --git a/library/mncc.h b/library/mncc.h index 3e00db8..9aff948 100644 --- a/library/mncc.h +++ b/library/mncc.h @@ -265,6 +265,8 @@ unsigned char lchan_type; unsigned char lchan_mode; + + char sdp[1024]; }; struct gsm_data_frame { @@ -296,6 +298,8 @@ uint16_t port; uint32_t payload_type; uint32_t payload_msg_type; + + char sdp[1024]; }; struct gsm_mncc_bridge { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic9568c8927507e161aadfad1a4d20aa896d8ae30 Gerrit-Change-Number: 16032 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Tue Nov 12 01:52:31 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 12 Nov 2019 01:52:31 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/i586 In-Reply-To: References: Message-ID: <5dca10641c5b3_6bd52aaf8692e5f410072e1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/i586 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 207s] -subscriber_id|INTEGER|0||0 [ 207s] - [ 207s] -Table subscriber_multi_msisdn contents: [ 207s] - [ 207s] -Verify that osmo-hlr can open it: [ 207s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 207s] -rc = 0 [ 207s] -DMAIN hlr starting [ 207s] -DDB using database: test.db [ 207s] -DDB Database test.db' has HLR DB schema version 2 [ 207s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 207s] ./testsuite.at:44: exit code was 1, expected 0 [ 207s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 207s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 207s] make[1]: *** [override_dh_auto_test] Error 1 [ 207s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 207s] debian/rules:7: recipe for target 'build' failed [ 207s] make: *** [build] Error 2 [ 207s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 207s] [ 207s] lamb11 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 12 01:52:15 UTC 2019. [ 207s] [ 207s] ### VM INTERACTION START ### [ 210s] [ 197.917146] sysrq: SysRq : Power Off [ 210s] [ 197.923202] reboot: Power down [ 210s] ### VM INTERACTION END ### [ 210s] [ 210s] lamb11 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 12 01:52:18 UTC 2019. [ 210s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Nov 12 01:53:05 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 12 Nov 2019 01:53:05 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/i586 In-Reply-To: References: Message-ID: <5dca109dbae93_6bd52aaf8692e5f410073e9@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/i586 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/i586 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 190s] | #define HAVE_MEMORY_H 1 [ 190s] | #define HAVE_STRINGS_H 1 [ 190s] | #define HAVE_INTTYPES_H 1 [ 190s] | #define HAVE_STDINT_H 1 [ 190s] | #define HAVE_UNISTD_H 1 [ 190s] | #define HAVE_DLFCN_H 1 [ 190s] | #define LT_OBJDIR ".libs/" [ 190s] | #define PACKAGE "osmo-hlr" [ 190s] | #define VERSION "1.1.0.10-5b65" [ 190s] | #define STDC_HEADERS 1 [ 190s] | [ 190s] | configure: exit 0 [ 190s] [ 190s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 190s] make[1]: *** [override_dh_auto_test] Error 1 [ 190s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 190s] debian/rules:7: recipe for target 'build' failed [ 190s] make: *** [build] Error 2 [ 190s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 190s] [ 190s] build85 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 12 01:52:56 UTC 2019. [ 190s] [ 190s] ### VM INTERACTION START ### [ 190s] Powering off. [ 190s] [ 177.933489] reboot: Power down [ 190s] ### VM INTERACTION END ### [ 190s] [ 190s] build85 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 12 01:52:57 UTC 2019. [ 190s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Nov 12 01:59:22 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 12 Nov 2019 01:59:22 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in xUbuntu_16.04/x86_64 In-Reply-To: References: Message-ID: <5dca1205d84dc_6bd52aaf8692e5f41008068@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 296s] | #define HAVE_MEMORY_H 1 [ 296s] | #define HAVE_STRINGS_H 1 [ 296s] | #define HAVE_INTTYPES_H 1 [ 296s] | #define HAVE_STDINT_H 1 [ 296s] | #define HAVE_UNISTD_H 1 [ 296s] | #define HAVE_DLFCN_H 1 [ 296s] | #define LT_OBJDIR ".libs/" [ 296s] | #define PACKAGE "osmo-hlr" [ 296s] | #define VERSION "1.1.0.10-5b65" [ 296s] | #define STDC_HEADERS 1 [ 296s] | [ 296s] | configure: exit 0 [ 296s] [ 296s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 296s] make[1]: *** [override_dh_auto_test] Error 1 [ 296s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 296s] debian/rules:7: recipe for target 'build' failed [ 296s] make: *** [build] Error 2 [ 296s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 296s] [ 296s] lamb62 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 12 01:59:04 UTC 2019. [ 296s] [ 296s] ### VM INTERACTION START ### [ 299s] [ 282.661144] sysrq: SysRq : Power Off [ 299s] [ 282.684174] reboot: Power down [ 299s] ### VM INTERACTION END ### [ 299s] [ 299s] lamb62 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 12 01:59:08 UTC 2019. [ 299s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Nov 12 02:01:05 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 12 Nov 2019 02:01:05 +0000 Subject: Build failure of network:osmocom:nightly/osmo-hlr in Debian_8.0/x86_64 In-Reply-To: References: Message-ID: <5dca127b51459_6bd52aaf8692e5f410083fd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-hlr/Debian_8.0/x86_64 Package network:osmocom:nightly/osmo-hlr failed to build in Debian_8.0/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-hlr Last lines of build log: [ 196s] -subscriber_id|INTEGER|0||0 [ 196s] - [ 196s] -Table subscriber_multi_msisdn contents: [ 196s] - [ 196s] -Verify that osmo-hlr can open it: [ 196s] -osmo-hlr --database $db --db-check --config-file $srcdir/osmo-hlr.cfg [ 196s] -rc = 0 [ 196s] -DMAIN hlr starting [ 196s] -DDB using database: test.db [ 196s] -DDB Database test.db' has HLR DB schema version 2 [ 196s] -DMAIN Cmdline option --db-check: Database was opened successfully, quitting. [ 196s] ./testsuite.at:44: exit code was 1, expected 0 [ 196s] 6. testsuite.at:40: 6. db_upgrade (testsuite.at:40): FAILED (testsuite.at:44) [ 196s] debian/rules:17: recipe for target 'override_dh_auto_test' failed [ 196s] make[1]: *** [override_dh_auto_test] Error 1 [ 196s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 196s] debian/rules:7: recipe for target 'build' failed [ 196s] make: *** [build] Error 2 [ 196s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 196s] [ 196s] wildcard2 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 12 02:00:59 UTC 2019. [ 196s] [ 196s] ### VM INTERACTION START ### [ 198s] Powering off. [ 198s] [ 173.679536] reboot: Power down [ 198s] ### VM INTERACTION END ### [ 198s] [ 198s] wildcard2 failed "build osmo-hlr_1.1.0.10.5b65.dsc" at Tue Nov 12 02:01:02 UTC 2019. [ 198s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Tue Nov 12 02:12:48 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 12 Nov 2019 02:12:48 +0000 Subject: Build failure of network:osmocom:nightly/osmo-sgsn in xUbuntu_18.04/x86_64 In-Reply-To: References: Message-ID: <5dca152ea135a_6bd52aaf8692e5f4101055a@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-sgsn/xUbuntu_18.04/x86_64 Package network:osmocom:nightly/osmo-sgsn failed to build in xUbuntu_18.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-sgsn Last lines of build log: [ 178s] This may take some time... done. [ 178s] Building e-tex based formats --byhyphen language.def. [ 181s] This may take some time... done. [ 181s] [381/405] installing gpg-wks-client-2.2.4-1ubuntu1 [ 181s] Processing triggers for man-db (2.8.3-2) ... [ 181s] [382/405] installing libpangocairo-1.0-0-1.40.14-1 [ 181s] Processing triggers for libc-bin (2.27-3ubuntu1) ... [ 181s] [383/405] installing python-blockdiag-1.5.3+dfsg-5.1 [ 182s] Processing triggers for man-db (2.8.3-2) ... [ 182s] [384/405] installing libosmo-gsup-client-dev-1.1.0.10.5b65 [ 182s] [385/405] installing libosmo-netif-dev-0.6.0.15.856c [ 182s] [386/405] installing texlive-bibtex-extra-2017.20180305-2 [ 187s] dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt [ 187s] dpkg-deb: error: subprocess returned error exit status 2 [ 187s] dpkg: error processing archive .init_b_cache/texlive-bibtex-extra.deb (--install): [ 187s] cannot copy extracted data for './usr/share/doc/texlive-doc/latex/munich/example_munich_Bibtex_style.pdf' to '/usr/share/doc/texlive-doc/latex/munich/example_munich_Bibtex_style.pdf.dpkg-new': unexpected end of file or stream [ 187s] Errors were encountered while processing: [ 187s] .init_b_cache/texlive-bibtex-extra.deb [ 187s] exit ... [ 187s] [ 187s] build34 failed "build osmo-sgsn_1.5.0.76.28431.dsc" at Tue Nov 12 02:12:32 UTC 2019. [ 187s] [ 187s] ### VM INTERACTION START ### [ 190s] [ 174.488359] sysrq: SysRq : Power Off [ 190s] [ 174.524102] reboot: Power down [ 191s] ### VM INTERACTION END ### [ 191s] [ 191s] build34 failed "build osmo-sgsn_1.5.0.76.28431.dsc" at Tue Nov 12 02:12:36 UTC 2019. [ 191s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Nov 12 06:38:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 06:38:53 +0000 Subject: Change in osmo-ci[master]: dockerfile: Add 'dahdi-source' for libosmo-abis References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16033 ) Change subject: dockerfile: Add 'dahdi-source' for libosmo-abis ...................................................................... dockerfile: Add 'dahdi-source' for libosmo-abis Change-Id: Icfd244268958be71f538d27307cdf0fabeecd956 --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/33/16033/1 diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 1ff2d0b..12c68c7 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -21,6 +21,7 @@ bzip2 \ coccinelle \ cppcheck \ + dahdi-source \ dblatex \ dbus \ debhelper \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Icfd244268958be71f538d27307cdf0fabeecd956 Gerrit-Change-Number: 16033 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 06:39:38 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 06:39:38 +0000 Subject: Change in osmo-ci[master]: dockerfile: Add 'dahdi-source' for libosmo-abis In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16033 ) Change subject: dockerfile: Add 'dahdi-source' for libosmo-abis ...................................................................... Patch Set 1: @osmith: Do I need to trigger a rebuild of this dockerfile somehow somewhere, or are changes picked up automatically? -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Icfd244268958be71f538d27307cdf0fabeecd956 Gerrit-Change-Number: 16033 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 12 Nov 2019 06:39:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 06:41:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 06:41:32 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix some typos In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16031 ) Change subject: Fix some typos ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16031/1/common/chapters/gb.adoc File common/chapters/gb.adoc: https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16031/1/common/chapters/gb.adoc at 94 PS1, Line 94: ALIVE response just verified this has actually also been fixed in the source code, great. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16031 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Idd9f9640101816ab979b11cc13ffa12d2245108d Gerrit-Change-Number: 16031 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 06:41:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 06:41:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 06:41:33 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix some typos In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16031 ) Change subject: Fix some typos ...................................................................... Fix some typos Change-Id: Idd9f9640101816ab979b11cc13ffa12d2245108d --- M common/chapters/abis.adoc M common/chapters/control_if.adoc M common/chapters/gb.adoc M common/chapters/gsup.adoc M common/chapters/mncc.adoc M common/chapters/oap.adoc M common/chapters/osmux/mgcp_extension_osmux.adoc M common/chapters/sigtran-osmocom.adoc M common/chapters/sigtran.adoc M common/chapters/smpp.adoc 10 files changed, 20 insertions(+), 20 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/common/chapters/abis.adoc b/common/chapters/abis.adoc index 7524661..a46abfa 100644 --- a/common/chapters/abis.adoc +++ b/common/chapters/abis.adoc @@ -82,11 +82,11 @@ ==== ipaccess-config This program is very helpful tool which is used to configure Unit ID and -Primarly OML IP. You can find this tool in the OsmoBSC repository under: +Primary OML IP. You can find this tool in the OsmoBSC repository under: './src/ipaccess' -.Example: using ipaccess-config to configure Unit ID and Primarly OML IP of +.Example: using ipaccess-config to configure Unit ID and Primary OML IP of nanoBTS ---- $ ./ipaccess-config -u 1801/0/0<1> 10.9.1.195<2> -o 10.9.1.154<3> diff --git a/common/chapters/control_if.adoc b/common/chapters/control_if.adoc index cd639c7..67ac045 100644 --- a/common/chapters/control_if.adoc +++ b/common/chapters/control_if.adoc @@ -169,7 +169,7 @@ 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+" +The old-style counters available via "+counter.*+" variables are superseded by "+rate_ctr.abs+" so its use is discouraged. There might still be some applications not yet converted to rate_ctr. diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc index 6a6f65c..3e33eea 100644 --- a/common/chapters/gb.adoc +++ b/common/chapters/gb.adoc @@ -91,7 +91,7 @@ ALIVE ACK missing count : 0 (0/s 0/m 0/h 0/d) RESET ACK missing count : 0 (0/s 0/m 0/h 0/d) NSVC Peer Statistics: - ALIVE reponse time : 0 ms + ALIVE response time : 0 ms ---- .Example: Inspecting BSSGP state diff --git a/common/chapters/gsup.adoc b/common/chapters/gsup.adoc index c67dfca..e0034f9 100644 --- a/common/chapters/gsup.adoc +++ b/common/chapters/gsup.adoc @@ -363,7 +363,7 @@ |=== The conditional 'AUTS' and 'RAND' IEs are both present in case the SIM -(via UE) requests an UMTS AKA re-synchronization procedure. Eiter +(via UE) requests an UMTS AKA re-synchronization procedure. Either both optional IEs are present, or none of them. ==== Send Authentication Info Error @@ -1181,7 +1181,7 @@ |27|RES|<>|C|TLV|2-18 |=== -The conditional IEs 'IK', 'CK', 'AUTN' and 'RES' are onl present in +The conditional IEs 'IK', 'CK', 'AUTN' and 'RES' are only present in case the subscriber supports UMTS AKA. [[gsup-ie-rand]] @@ -1197,7 +1197,7 @@ [[gsup-ie-kc]] ==== Kc -The 8-byte Encryption Key of the GSM Authentication and Key Agreemnt +The 8-byte Encryption Key of the GSM Authentication and Key Agreement Algorithm. [[gsup-ie-ik]] diff --git a/common/chapters/mncc.adoc b/common/chapters/mncc.adoc index 3adbf7f..15c9982 100644 --- a/common/chapters/mncc.adoc +++ b/common/chapters/mncc.adoc @@ -68,7 +68,7 @@ signaled using START/STOP DTMF messages which are hauled through various protocols upwards into the core network. -Contrary to that, a mobile terminated DTMF tone is not transfered as an out of +Contrary to that, a mobile terminated DTMF tone is not transferred as an out of band message. Instead, in-band signaling is used, which means a tone is injected early inside a PBX or MGW. diff --git a/common/chapters/oap.adoc b/common/chapters/oap.adoc index 3c5ad35..ad91f36 100644 --- a/common/chapters/oap.adoc +++ b/common/chapters/oap.adoc @@ -209,7 +209,7 @@ [options="header",cols="15%,85%"] |=== -|0x04|Register Requst +|0x04|Register Request |0x05|Register Error |0x06|Register Result |0x08|Challenge Request diff --git a/common/chapters/osmux/mgcp_extension_osmux.adoc b/common/chapters/osmux/mgcp_extension_osmux.adoc index c12e9ef..e2b0947 100644 --- a/common/chapters/osmux/mgcp_extension_osmux.adoc +++ b/common/chapters/osmux/mgcp_extension_osmux.adoc @@ -98,7 +98,7 @@ In OmoMGW, Osmux support is managed through VTY. -.Example: Sample config file section with Osmux configuation +.Example: Sample config file section with Osmux configuration ---- mgcp ... diff --git a/common/chapters/sigtran-osmocom.adoc b/common/chapters/sigtran-osmocom.adoc index a0bc475..3fbaac2 100644 --- a/common/chapters/sigtran-osmocom.adoc +++ b/common/chapters/sigtran-osmocom.adoc @@ -14,7 +14,7 @@ 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 +implemented something 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. @@ -197,7 +197,7 @@ 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 +This is also why most GSM network 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 diff --git a/common/chapters/sigtran.adoc b/common/chapters/sigtran.adoc index fd7d3cc..9e02f38 100644 --- a/common/chapters/sigtran.adoc +++ b/common/chapters/sigtran.adoc @@ -89,9 +89,9 @@ SCCP provides both connectionless (datagram) and connection-oriented services. Both are used in the context of cellular networks. -==== SCCP Adresses +==== SCCP Addresses -SCCP Adresses are quite complex. This is due to the fact that it is +SCCP Addresses 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. @@ -136,11 +136,11 @@ |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 +|ES|Encoding Scheme |Just a peculiar way to indicate the length of the digits |- |Signals |The actual "phone number digits" |==== -For more information about SCCP Adresses and Global Titles, please +For more information about SCCP Addresses and Global Titles, please refer to <> @@ -189,7 +189,7 @@ 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 +Instead, an STP would have to perform _connection coupling_, which is basically the equivalent of an application-level proxy between two SCCP connections, each over one of the two MTP networks. @@ -233,7 +233,7 @@ ===== Signaling Gateway (SG) -The Signaling Gateway (SG) interconnects the SS7 network wit external +The Signaling Gateway (SG) interconnects the SS7 network with 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 diff --git a/common/chapters/smpp.adoc b/common/chapters/smpp.adoc index e62a844..4efb46d 100644 --- a/common/chapters/smpp.adoc +++ b/common/chapters/smpp.adoc @@ -128,7 +128,7 @@ |=== All of the above values reflect the *last measurement report* as -recieved vi A-bis RSL from the BTS. It is thus a snapshot value (of +received vi A-bis RSL from the BTS. It is thus a snapshot value (of the average within one 480ms SACCH period), and not an average over all the SACCH periods during which the channel was open or the SMS was received. Not all measurement reports contain all the values. So you @@ -143,5 +143,5 @@ [options="header", cols="3,1,1,5"] |=== | TLV | IEI | Length | Purpose -| TLVID_osmo_imei | 0x2306 | variable | IMEI of the subscibers phone (ME) +| TLVID_osmo_imei | 0x2306 | variable | IMEI of the subscribers phone (ME) |=== -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16031 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Idd9f9640101816ab979b11cc13ffa12d2245108d Gerrit-Change-Number: 16031 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 06:45:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 06:45:44 +0000 Subject: Change in osmo-msc[master]: fix msc_vlr_test_call.c In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15347 ) Change subject: fix msc_vlr_test_call.c ...................................................................... fix msc_vlr_test_call.c Substantial parts of the CC / MNCC call establishment were so far completely missing from the msc_vlr_test_call.c tests. With my new insights on CC and MNCC procedures, complete the tests. Root reason: since I am going to re-order the sequence of events to enable codec negotiation via SDP in MNCC, I want to have comprehensive tests of the CC procedures to see the effect as diffs in the test output. Change-Id: Ie995e264eb1e3dd9558a1753ff6f9b55c1d084e1 --- M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 4 files changed, 433 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index 065af25..392d38d 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -213,6 +213,25 @@ OSMO_ASSERT(cc_to_mncc_tx_confirmed); mncc.callref = cc_to_mncc_tx_got_callref; + btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN"); + expect_crcx(RTP_TO_RAN); + mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc); + OSMO_ASSERT(got_crcx); + + btw("MGW acknowledges the CRCX, triggering Assignment"); + expect_iu_rab_assignment(); + crcx_ok(RTP_TO_RAN); + OSMO_ASSERT(iu_rab_assignment_sent); + + btw("Assignment succeeds, triggering CRCX to CN"); + expect_crcx(RTP_TO_CN); + ms_sends_assignment_complete(CODEC_AMR_8000_1); + OSMO_ASSERT(got_crcx); + + btw("CN RTP address is available, trigger MNCC_RTP_CREATE"); + cc_to_mncc_expect_tx("", MNCC_RTP_CREATE); + crcx_ok(RTP_TO_CN); + btw("MNCC says that's fine"); dtap_expect_tx("8302" /* CC: Call Proceeding */); mncc_sends_to_cc(MNCC_CALL_PROC_REQ, &mncc); @@ -298,11 +317,32 @@ dtap_expect_tx("0305" /* CC: Setup */); ms_sends_security_mode_complete(); + btw("MS confirms call, we create a RAN-side RTP and forward MNCC_CALL_CONF_IND"); + expect_crcx(RTP_TO_RAN); 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 */); + OSMO_ASSERT(got_crcx); + OSMO_ASSERT(cc_to_mncc_tx_confirmed); + + btw("MNCC sends MNCC_RTP_CREATE"); + mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc); + + btw("MGW acknowledges the CRCX to RAN, triggering Assignment"); + expect_iu_rab_assignment(); + crcx_ok(RTP_TO_RAN); + OSMO_ASSERT(iu_rab_assignment_sent); + + btw("Assignment completes, triggering CRCX to CN"); + expect_crcx(RTP_TO_CN); + ms_sends_assignment_complete(CODEC_AMR_8000_1); + OSMO_ASSERT(got_crcx); + + btw("When the CN side RTP address is known, send MNCC_RTP_CREATE"); + cc_to_mncc_expect_tx("", MNCC_RTP_CREATE); + crcx_ok(RTP_TO_CN); fake_time_passes(1, 23); @@ -380,13 +420,32 @@ dtap_expect_tx("0305" /* CC: Setup */); ms_sends_security_mode_complete(); + btw("MS confirms call, we create a RAN-side RTP and forward MNCC_CALL_CONF_IND"); + expect_crcx(RTP_TO_RAN); 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 */); + OSMO_ASSERT(got_crcx); OSMO_ASSERT(cc_to_mncc_tx_confirmed); + btw("MNCC sends MNCC_RTP_CREATE"); + mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc); + + btw("MGW acknowledges the CRCX to RAN, triggering Assignment"); + expect_iu_rab_assignment(); + crcx_ok(RTP_TO_RAN); + OSMO_ASSERT(iu_rab_assignment_sent); + + btw("Assignment completes, triggering CRCX to CN"); + expect_crcx(RTP_TO_CN); + ms_sends_assignment_complete(CODEC_AMR_8000_1); + OSMO_ASSERT(got_crcx); + + btw("When the CN side RTP address is known, send MNCC_RTP_CREATE"); + cc_to_mncc_expect_tx("", MNCC_RTP_CREATE); + crcx_ok(RTP_TO_CN); fake_time_passes(1, 23); cc_to_mncc_expect_tx("", MNCC_ALERT_IND); @@ -470,6 +529,25 @@ OSMO_ASSERT(cc_to_mncc_tx_confirmed); mncc.callref = cc_to_mncc_tx_got_callref; + btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN"); + expect_crcx(RTP_TO_RAN); + mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc); + OSMO_ASSERT(got_crcx); + + btw("MGW acknowledges the CRCX, triggering Assignment"); + expect_iu_rab_assignment(); + crcx_ok(RTP_TO_RAN); + OSMO_ASSERT(iu_rab_assignment_sent); + + btw("Assignment succeeds, triggering CRCX to CN"); + expect_crcx(RTP_TO_CN); + ms_sends_assignment_complete(CODEC_AMR_8000_1); + OSMO_ASSERT(got_crcx); + + btw("CN RTP address is available, trigger MNCC_RTP_CREATE"); + cc_to_mncc_expect_tx("", MNCC_RTP_CREATE); + crcx_ok(RTP_TO_CN); + btw("MNCC says that's fine"); dtap_expect_tx("8302" /* CC: Call Proceeding */); mncc_sends_to_cc(MNCC_CALL_PROC_REQ, &mncc); @@ -547,6 +625,25 @@ OSMO_ASSERT(cc_to_mncc_tx_confirmed); mncc.callref = cc_to_mncc_tx_got_callref; + btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN"); + expect_crcx(RTP_TO_RAN); + mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc); + OSMO_ASSERT(got_crcx); + + btw("MGW acknowledges the CRCX, triggering Assignment"); + expect_iu_rab_assignment(); + crcx_ok(RTP_TO_RAN); + OSMO_ASSERT(iu_rab_assignment_sent); + + btw("Assignment succeeds, triggering CRCX to CN"); + expect_crcx(RTP_TO_CN); + ms_sends_assignment_complete(CODEC_AMR_8000_1); + OSMO_ASSERT(got_crcx); + + btw("CN RTP address is available, trigger MNCC_RTP_CREATE"); + cc_to_mncc_expect_tx("", MNCC_RTP_CREATE); + crcx_ok(RTP_TO_CN); + btw("MNCC says that's fine"); dtap_expect_tx("8302" /* CC: Call Proceeding */); mncc_sends_to_cc(MNCC_CALL_PROC_REQ, &mncc); diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 4f8f925..7f9940b 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -296,6 +296,37 @@ DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) tx MNCC_SETUP_IND MSC --> MNCC: callref 0x80000001: MNCC_SETUP_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) +- MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN +DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_RTP_CREATE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: is child of msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) + MGW <--CRCX to RTP_TO_RAN-- MSC: callref=0x80000001 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: Allocated +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +- MGW acknowledges the CRCX, triggering Assignment + MGW --CRCX OK to RTP_TO_RAN--> MSC +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: MGW endpoint's RTP address available for the CI RTP_TO_RAN: 10.23.23.1:23 (osmux=no:-2) +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: RAN encode: ASSIGNMENT_COMMAND on UTRAN-Iu +DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST +- Assignment succeeds, triggering CRCX to CN +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: RAN decode: ASSIGNMENT_COMPLETE +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting codec to AMR/8000/1 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: setting remote addr to :0 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Not committing: no MGW endpoint CI set up + MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x80000001 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: Allocated +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codec to AMR/8000/1 +- CN RTP address is available, trigger MNCC_RTP_CREATE + MGW --CRCX OK to RTP_TO_CN--> MSC +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: MGW endpoint's RTP address available for the CI RTP_TO_CN: 10.23.23.1:23 (osmux=no:-2) +DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) tx MNCC_RTP_CREATE + MSC --> MNCC: callref 0x80000001: MNCC_RTP_CREATE - MNCC says that's fine DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_CALL_PROC_REQ DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) stopping pending guard timer @@ -307,10 +338,7 @@ - DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_CALL_PROC: 8302 - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: is child of msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) - MS <--Call Assignment-- MSC: callref=0x80000001 +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - Total time passed: 1.000023 s - The other call leg got established (not shown here), MNCC tells us so DMNCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_ALERT_REQ @@ -394,9 +422,15 @@ DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - vlr_subscr_cancel_attach_fsm: now used by 3 (attached,active-conn,msc_a_fsm_releasing_onenter) DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: state_chg to RELEASING DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_CN:no-CI){UNINITIALIZED}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ)) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_CN:no-CI){UNINITIALIZED}: Removing from parent call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_CN:no-CI){UNINITIALIZED}: Deferring: will deallocate with call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ)) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Removing from parent call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Deferring: will deallocate with call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Removing from parent msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_RELEASING}: Received Event MSC_EV_CALL_LEG_TERM -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Deallocated +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Deallocated, including all deferred deallocations DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_RELEASING}: + wait-Clear-Complete: now used by 1 (wait-Clear-Complete) DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_RELEASING}: RAN encode: CLEAR_COMMAND on UTRAN-Iu DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST @@ -726,6 +760,7 @@ DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - Paging: now used by 3 (attached,CC,active-conn) DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - paging-response: now used by 1 (cc) +- MS confirms call, we create a RAN-side RTP and forward MNCC_CALL_CONF_IND MSC <--UTRAN-Iu-- MS: GSM48_MT_CC_CALL_CONF DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: + rx_from_ms: now used by 2 (cc,rx_from_ms) DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: RAN decode: DTAP @@ -737,10 +772,38 @@ DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Starting call assignment DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: Allocated DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: is child of msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) - MS <--Call Assignment-- MSC: callref=0x423 + MGW <--CRCX to RTP_TO_RAN-- MSC: callref=0x423 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: Allocated +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) DMNCC trans(CC:MO_TERM_CALL_CONF IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) tx MNCC_CALL_CONF_IND MSC --> MNCC: callref 0x423: MNCC_CALL_CONF_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) +- MNCC sends MNCC_RTP_CREATE +DMNCC trans(CC:MO_TERM_CALL_CONF IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_RTP_CREATE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier +- MGW acknowledges the CRCX to RAN, triggering Assignment + MGW --CRCX OK to RTP_TO_RAN--> MSC +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: MGW endpoint's RTP address available for the CI RTP_TO_RAN: 10.23.23.1:23 (osmux=no:-2) +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: RAN encode: ASSIGNMENT_COMMAND on UTRAN-Iu +DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST +- Assignment completes, triggering CRCX to CN +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: RAN decode: ASSIGNMENT_COMPLETE +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting codec to AMR/8000/1 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: setting remote addr to :0 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Not committing: no MGW endpoint CI set up + MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x423 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: Allocated +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codec to AMR/8000/1 +- When the CN side RTP address is known, send MNCC_RTP_CREATE + MGW --CRCX OK to RTP_TO_CN--> MSC +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: MGW endpoint's RTP address available for the CI RTP_TO_CN: 10.23.23.1:23 (osmux=no:-2) +DMNCC trans(CC:MO_TERM_CALL_CONF IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) tx MNCC_RTP_CREATE + MSC --> MNCC: callref 0x423: MNCC_RTP_CREATE - Total time passed: 1.000023 s MSC <--UTRAN-Iu-- MS: GSM48_MT_CC_ALERTING DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: + rx_from_ms: now used by 2 (cc,rx_from_ms) @@ -822,9 +885,15 @@ DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - vlr_subscr_cancel_attach_fsm: now used by 3 (attached,active-conn,msc_a_fsm_releasing_onenter) DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: state_chg to RELEASING DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){RELEASING}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP)) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: Removing from parent call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: Deferring: will deallocate with call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP)) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Removing from parent call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Deferring: will deallocate with call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){RELEASING}: Removing from parent msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_RELEASING}: Received Event MSC_EV_CALL_LEG_TERM -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){RELEASING}: Deallocated +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){RELEASING}: Deallocated, including all deferred deallocations DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_RELEASING}: + wait-Clear-Complete: now used by 1 (wait-Clear-Complete) DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_RELEASING}: RAN encode: CLEAR_COMMAND on UTRAN-Iu DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST @@ -1154,6 +1223,7 @@ DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - Paging: now used by 3 (attached,CC,active-conn) DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - paging-response: now used by 1 (cc) +- MS confirms call, we create a RAN-side RTP and forward MNCC_CALL_CONF_IND MSC <--UTRAN-Iu-- MS: GSM48_MT_CC_CALL_CONF DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: + rx_from_ms: now used by 2 (cc,rx_from_ms) DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: RAN decode: DTAP @@ -1165,10 +1235,38 @@ DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Starting call assignment DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: Allocated DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: is child of msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) - MS <--Call Assignment-- MSC: callref=0x423 + MGW <--CRCX to RTP_TO_RAN-- MSC: callref=0x423 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: Allocated +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) DMNCC trans(CC:MO_TERM_CALL_CONF IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) tx MNCC_CALL_CONF_IND MSC --> MNCC: callref 0x423: MNCC_CALL_CONF_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) +- MNCC sends MNCC_RTP_CREATE +DMNCC trans(CC:MO_TERM_CALL_CONF IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_RTP_CREATE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier +- MGW acknowledges the CRCX to RAN, triggering Assignment + MGW --CRCX OK to RTP_TO_RAN--> MSC +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: MGW endpoint's RTP address available for the CI RTP_TO_RAN: 10.23.23.1:23 (osmux=no:-2) +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: RAN encode: ASSIGNMENT_COMMAND on UTRAN-Iu +DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST +- Assignment completes, triggering CRCX to CN +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: RAN decode: ASSIGNMENT_COMPLETE +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting codec to AMR/8000/1 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: setting remote addr to :0 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Not committing: no MGW endpoint CI set up + MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x423 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: Allocated +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codec to AMR/8000/1 +- When the CN side RTP address is known, send MNCC_RTP_CREATE + MGW --CRCX OK to RTP_TO_CN--> MSC +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: MGW endpoint's RTP address available for the CI RTP_TO_CN: 10.23.23.1:23 (osmux=no:-2) +DMNCC trans(CC:MO_TERM_CALL_CONF IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) tx MNCC_RTP_CREATE + MSC --> MNCC: callref 0x423: MNCC_RTP_CREATE - Total time passed: 1.000023 s MSC <--UTRAN-Iu-- MS: GSM48_MT_CC_ALERTING DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: + rx_from_ms: now used by 2 (cc,rx_from_ms) @@ -1207,9 +1305,15 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_RELEASING}: Received Event MSC_A_EV_UNUSED DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: state_chg to RELEASING DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){RELEASING}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP)) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: Removing from parent call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: Deferring: will deallocate with call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP)) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Removing from parent call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Deferring: will deallocate with call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){RELEASING}: Removing from parent msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP) DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_RELEASING}: Received Event MSC_EV_CALL_LEG_TERM -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){RELEASING}: Deallocated +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){RELEASING}: Deallocated, including all deferred deallocations DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_RELEASING}: + wait-Clear-Complete: now used by 1 (wait-Clear-Complete) DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_RELEASING}: RAN encode: CLEAR_COMMAND on UTRAN-Iu DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST @@ -1540,6 +1644,37 @@ DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) tx MNCC_SETUP_IND MSC --> MNCC: callref 0x80000002: MNCC_SETUP_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) +- MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN +DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) rx MNCC_RTP_CREATE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: is child of msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) + MGW <--CRCX to RTP_TO_RAN-- MSC: callref=0x80000002 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: Allocated +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +- MGW acknowledges the CRCX, triggering Assignment + MGW --CRCX OK to RTP_TO_RAN--> MSC +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: MGW endpoint's RTP address available for the CI RTP_TO_RAN: 10.23.23.1:23 (osmux=no:-2) +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: RAN encode: ASSIGNMENT_COMMAND on UTRAN-Iu +DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST +- Assignment succeeds, triggering CRCX to CN +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: RAN decode: ASSIGNMENT_COMPLETE +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting codec to AMR/8000/1 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: setting remote addr to :0 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Not committing: no MGW endpoint CI set up + MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x80000002 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: Allocated +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codec to AMR/8000/1 +- CN RTP address is available, trigger MNCC_RTP_CREATE + MGW --CRCX OK to RTP_TO_CN--> MSC +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: MGW endpoint's RTP address available for the CI RTP_TO_CN: 10.23.23.1:23 (osmux=no:-2) +DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) tx MNCC_RTP_CREATE + MSC --> MNCC: callref 0x80000002: MNCC_RTP_CREATE - MNCC says that's fine DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) rx MNCC_CALL_PROC_REQ DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) stopping pending guard timer @@ -1551,10 +1686,7 @@ - DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_CALL_PROC: 8302 - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: is child of msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) - MS <--Call Assignment-- MSC: callref=0x80000002 +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - But the other side's MSISDN could not be resolved, MNCC tells us to cancel DMNCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) rx MNCC_REL_REQ DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) stopping pending guard timer @@ -1596,9 +1728,15 @@ DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - vlr_subscr_cancel_attach_fsm: now used by 3 (attached,active-conn,msc_a_fsm_releasing_onenter) DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: state_chg to RELEASING DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_CN:no-CI){UNINITIALIZED}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ)) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_CN:no-CI){UNINITIALIZED}: Removing from parent call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_CN:no-CI){UNINITIALIZED}: Deferring: will deallocate with call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ)) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Removing from parent call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Deferring: will deallocate with call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Removing from parent msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_RELEASING}: Received Event MSC_EV_CALL_LEG_TERM -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Deallocated +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Deallocated, including all deferred deallocations DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_RELEASING}: + wait-Clear-Complete: now used by 1 (wait-Clear-Complete) DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_RELEASING}: RAN encode: CLEAR_COMMAND on UTRAN-Iu DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST @@ -1928,6 +2066,37 @@ DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) tx MNCC_SETUP_IND MSC --> MNCC: callref 0x80000003: MNCC_SETUP_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) +- MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN +DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) rx MNCC_RTP_CREATE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: is child of msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) + MGW <--CRCX to RTP_TO_RAN-- MSC: callref=0x80000003 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: Allocated +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +- MGW acknowledges the CRCX, triggering Assignment + MGW --CRCX OK to RTP_TO_RAN--> MSC +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: MGW endpoint's RTP address available for the CI RTP_TO_RAN: 10.23.23.1:23 (osmux=no:-2) +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: RAN encode: ASSIGNMENT_COMMAND on UTRAN-Iu +DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST +- Assignment succeeds, triggering CRCX to CN +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: RAN decode: ASSIGNMENT_COMPLETE +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting codec to AMR/8000/1 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: setting remote addr to :0 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Not committing: no MGW endpoint CI set up + MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x80000003 +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: Allocated +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codec to AMR/8000/1 +- CN RTP address is available, trigger MNCC_RTP_CREATE + MGW --CRCX OK to RTP_TO_CN--> MSC +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE +DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: MGW endpoint's RTP address available for the CI RTP_TO_CN: 10.23.23.1:23 (osmux=no:-2) +DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) tx MNCC_RTP_CREATE + MSC --> MNCC: callref 0x80000003: MNCC_RTP_CREATE - MNCC says that's fine DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) rx MNCC_CALL_PROC_REQ DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) stopping pending guard timer @@ -1939,10 +2108,7 @@ - DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_CALL_PROC: 8302 - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST -DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: is child of msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) - MS <--Call Assignment-- MSC: callref=0x80000003 +DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - But the other side's MSISDN could not be resolved, MNCC tells us to cancel DMNCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) rx MNCC_REL_REQ DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) stopping pending guard timer @@ -1980,9 +2146,15 @@ DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - vlr_subscr_cancel_attach_fsm: now used by 3 (attached,active-conn,msc_a_fsm_releasing_onenter) DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: state_chg to RELEASING DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_CN:no-CI){UNINITIALIZED}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ)) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_CN:no-CI){UNINITIALIZED}: Removing from parent call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_CN:no-CI){UNINITIALIZED}: Deferring: will deallocate with call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ)) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Removing from parent call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) +DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: Deferring: will deallocate with call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Removing from parent msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ) DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_RELEASING}: Received Event MSC_EV_CALL_LEG_TERM -DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Deallocated +DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){RELEASING}: Deallocated, including all deferred deallocations DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_RELEASING}: + wait-Clear-Complete: now used by 1 (wait-Clear-Complete) DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_RELEASING}: RAN encode: CLEAR_COMMAND on UTRAN-Iu DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 3d69ae8..de4913a 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -73,11 +73,19 @@ bool bssap_clear_expected = false; bool bssap_clear_sent = false; +bool bssap_assignment_expected = false; +bool bssap_assignment_sent = false; +bool iu_rab_assignment_expected = false; +bool iu_rab_assignment_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; +enum rtp_direction expecting_crcx = -1; +bool got_crcx = false; + extern int ran_dec_dtap_undup_pdisc_ctr_bin(uint8_t pdisc); /* static state variables for the L3 send sequence numbers */ @@ -296,6 +304,20 @@ return 0; } +static void bssap_validate_assignment_cmd() +{ + OSMO_ASSERT(bssap_assignment_expected); + bssap_assignment_expected = false; + bssap_assignment_sent = true; +} + +static void iucs_validate_assignment_cmd() +{ + OSMO_ASSERT(iu_rab_assignment_expected); + iu_rab_assignment_expected = false; + iu_rab_assignment_sent = true; +} + static int iucs_validate_security_mode_ctrl(const struct ran_cipher_mode_command *cmd) { const char *got_ik; @@ -346,6 +368,18 @@ OSMO_ASSERT(false); } break; + case RAN_MSG_ASSIGNMENT_COMMAND: + switch (ran_type) { + case OSMO_RAT_GERAN_A: + bssap_validate_assignment_cmd(); + break; + case OSMO_RAT_UTRAN_IU: + iucs_validate_assignment_cmd(); + break; + default: + OSMO_ASSERT(false); + } + break; default: break; } @@ -602,6 +636,14 @@ bssap_clear_sent = false; osmo_gettimeofday_override = false; + + expecting_crcx = -1; + got_crcx = false; + + bssap_assignment_expected = false; + bssap_assignment_sent = false; + iu_rab_assignment_expected = false; + iu_rab_assignment_sent = false; } static struct log_info_cat test_categories[] = { @@ -763,14 +805,73 @@ return 0; } -/* override, requires '-Wl,--wrap=call_leg_ensure_ci' */ -int __real_call_leg_ensure_ci(struct call_leg *cl, enum rtp_direction dir, uint32_t call_id, struct gsm_trans *for_trans); -int __wrap_call_leg_ensure_ci(struct call_leg *cl, enum rtp_direction dir, uint32_t call_id, struct gsm_trans *for_trans) +struct rtp_stream fake_rtp[2] = { + { + .dir = RTP_TO_RAN, + .local = { + .ip = "10.23.42.1", + .port = 99, + }, + .remote = { + .ip = "10.23.42.2", + .port = 100, + }, + }, + { + .dir = RTP_TO_CN, + .local = { + .ip = "10.23.42.1", + .port = 23, + }, + .remote = { + .ip = "10.23.42.2", + .port = 42, + }, + }, +}; + +void expect_crcx(enum rtp_direction towards) { - log("MS <--Call Assignment-- MSC: callref=0x%x", call_id); + OSMO_ASSERT(expecting_crcx == -1); + expecting_crcx = towards; + got_crcx = false; +} + +/* override, requires '-Wl,--wrap=call_leg_ensure_ci' */ +int __real_call_leg_ensure_ci(struct call_leg *cl, enum rtp_direction dir, uint32_t call_id, struct gsm_trans *for_trans, + const enum mgcp_codecs *codec_if_known, const struct osmo_sockaddr_str *remote_addr_if_known); +int __wrap_call_leg_ensure_ci(struct call_leg *cl, enum rtp_direction dir, uint32_t call_id, struct gsm_trans *for_trans, + const enum mgcp_codecs *codec_if_known, const struct osmo_sockaddr_str *remote_addr_if_known) +{ + if (!cl->rtp[dir]) { + log("MGW <--CRCX to %s-- MSC: callref=0x%x", rtp_direction_name(dir), call_id); + + OSMO_ASSERT(expecting_crcx == dir); + expecting_crcx = -1; + got_crcx = true; + + call_leg_ensure_rtp_alloc(cl, dir, call_id, for_trans); + if (codec_if_known) + rtp_stream_set_codec(cl->rtp[dir], *codec_if_known); + if (remote_addr_if_known && osmo_sockaddr_str_is_nonzero(remote_addr_if_known)) + rtp_stream_set_remote_addr(cl->rtp[dir], remote_addr_if_known); + } + return 0; } +void crcx_ok(enum rtp_direction dir) +{ + struct msc_a *msc_a = msub_msc_a(g_msub); + struct call_leg *cl = msc_a->cc.call_leg; + OSMO_ASSERT(cl); + OSMO_ASSERT(cl->rtp[dir]); + osmo_sockaddr_str_from_str(&cl->rtp[dir]->local, "10.23.23.1", 23); + //osmo_sockaddr_str_from_str(&cl->rtp[dir].remote, "10.42.42.1", 42); + log("MGW --CRCX OK to %s--> MSC", rtp_direction_name(dir)); + osmo_fsm_inst_dispatch(cl->fi, CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE, cl->rtp[dir]); +} + static int fake_vlr_tx_lu_acc(void *msc_conn_ref, uint32_t send_tmsi) { struct msc_a *msc_a = msc_conn_ref; @@ -895,6 +996,22 @@ g_msub = NULL; } +void ms_sends_assignment_complete(enum mgcp_codecs assigned_codec) +{ + struct ran_msg ran_dec; + + ran_dec = (struct ran_msg){ + .msg_type = RAN_MSG_ASSIGNMENT_COMPLETE, + .assignment_complete = { + .codec = assigned_codec, + }, + }; + fake_msc_a_ran_dec(&ran_dec); + + if (!conn_exists(g_msub)) + g_msub = NULL; +} + void ran_sends_clear_complete() { struct ran_msg ran_dec; diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index 9df9cf0..57022b4 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -31,6 +31,8 @@ #include #include #include +#include +#include extern bool _log_lines; #define _log(fmt, args...) do { \ @@ -140,6 +142,23 @@ } } +extern bool bssap_assignment_expected; +extern bool bssap_assignment_sent; +extern bool iu_rab_assignment_expected; +extern bool iu_rab_assignment_sent; + +static inline void expect_bssap_assignment() +{ + bssap_assignment_expected = true; + bssap_assignment_sent = false; +} + +static inline void expect_iu_rab_assignment() +{ + iu_rab_assignment_expected = true; + iu_rab_assignment_sent = false; +} + struct msc_vlr_test_cmdline_opts { bool verbose; int run_test_nr; @@ -163,10 +182,12 @@ void ms_sends_classmark_update(const struct osmo_gsm48_classmark *classmark); void ms_sends_ciphering_mode_complete(const char *inner_nas_msg); void ms_sends_security_mode_complete(); +void ms_sends_assignment_complete(enum mgcp_codecs assigned_codec); void gsup_rx(const char *rx_hex, const char *expect_tx_hex); void send_sms(struct vlr_subscr *receiver, struct vlr_subscr *sender, char *str); +void crcx_ok(enum rtp_direction dir); void ran_sends_clear_complete(); @@ -248,3 +269,6 @@ #define VLR_TO_HLR "0a0101" #define EUSE_TO_MSC_USSD "0a0103" #define MSC_USSD_TO_EUSE "0a0103" + +extern bool got_crcx; +void expect_crcx(enum rtp_direction towards); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie995e264eb1e3dd9558a1753ff6f9b55c1d084e1 Gerrit-Change-Number: 15347 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 06:48:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 06:48:06 +0000 Subject: Change in osmo-msc[master]: BSSMAP: decode Codec List (BSS Supported) In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15946 ) Change subject: BSSMAP: decode Codec List (BSS Supported) ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e Gerrit-Change-Number: 15946 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 06:48:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 06:48:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 06:48:08 +0000 Subject: Change in osmo-msc[master]: BSSMAP: decode Codec List (BSS Supported) In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15946 ) Change subject: BSSMAP: decode Codec List (BSS Supported) ...................................................................... BSSMAP: decode Codec List (BSS Supported) Actually decode the Codec List (BSS Supported) in BSSMAP, in both the Complete Layer 3 Information and the Assignment Complete messages. An upcoming patch improves codec negotiation and requires the BSS supported codecs, which are so far ignored (which is/was a pity as osmo-bsc goes at great lengths to compose those IEs). Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e --- M include/osmocom/msc/ran_msg.h M src/libmsc/ran_msg_a.c 2 files changed, 32 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h index 081c7ad..1b0e2e8 100644 --- a/include/osmocom/msc/ran_msg.h +++ b/include/osmocom/msc/ran_msg.h @@ -192,6 +192,7 @@ union { struct { const struct gsm0808_cell_id *cell_id; + const struct gsm0808_speech_codec_list *codec_list_bss_supported; struct msgb *msg; } compl_l3; struct msgb *dtap; @@ -226,6 +227,7 @@ struct osmo_sockaddr_str remote_rtp; bool codec_present; enum mgcp_codecs codec; + const struct gsm0808_speech_codec_list *codec_list_bss_supported; bool osmux_present; uint8_t osmux_cid; } assignment_complete; diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index fc9a9d7..59789b0 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -52,6 +52,8 @@ struct gsm0808_cell_id cell_id; struct tlv_p_entry *ie_cell_id = TLVP_GET(tp, GSM0808_IE_CELL_IDENTIFIER); struct tlv_p_entry *ie_l3_info = TLVP_GET(tp, GSM0808_IE_LAYER_3_INFORMATION); + struct tlv_p_entry *ie_codec_list_bss_supported = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC_LIST); + struct gsm0808_speech_codec_list codec_list_bss_supported; struct ran_msg ran_dec_msg = { .msg_type = RAN_MSG_COMPL_L3, .msg_name = "BSSMAP Complete Layer 3 Information", @@ -114,6 +116,19 @@ return -ENODATA; } + /* Decode Codec List (BSS Supported) */ + if (ie_codec_list_bss_supported) { + rc = gsm0808_dec_speech_codec_list(&codec_list_bss_supported, + ie_codec_list_bss_supported->val, ie_codec_list_bss_supported->len); + if (rc < 0) { + LOG_RAN_A_DEC_MSG(LOGL_ERROR, + "Complete Layer 3 Information: unable to decode IE Codec List (BSS Supported)" + " (rc=%d), continuing anyway\n", rc); + /* This IE is not critical, do not abort with error. */ + } else + ran_dec_msg.compl_l3.codec_list_bss_supported = &codec_list_bss_supported; + } + return ran_decoded(ran_dec, &ran_dec_msg); } @@ -261,10 +276,12 @@ { struct tlv_p_entry *ie_aoip_transp_addr = TLVP_GET(tp, GSM0808_IE_AOIP_TRASP_ADDR); struct tlv_p_entry *ie_speech_codec = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC); + struct tlv_p_entry *ie_codec_list_bss_supported = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC_LIST); struct tlv_p_entry *ie_osmux_cid = TLVP_GET(tp, GSM0808_IE_OSMO_OSMUX_CID); struct sockaddr_storage rtp_addr; struct sockaddr_in *rtp_addr_in; struct gsm0808_speech_codec sc; + struct gsm0808_speech_codec_list codec_list_bss_supported; int rc; struct ran_msg ran_dec_msg = { .msg_type = RAN_MSG_ASSIGNMENT_COMPLETE, @@ -314,6 +331,19 @@ ran_dec_msg.assignment_complete.codec = ran_a_mgcp_codec_from_sc(&sc); } + if (ie_codec_list_bss_supported) { + /* Decode Codec List (BSS Supported) */ + rc = gsm0808_dec_speech_codec_list(&codec_list_bss_supported, + ie_codec_list_bss_supported->val, ie_codec_list_bss_supported->len); + if (rc < 0) { + LOG_RAN_A_DEC_MSG(LOGL_ERROR, + "Assignment Complete: unable to decode IE Codec List (BSS Supported)" + " (rc=%d), continuing anyway\n", rc); + /* This IE is not critical, do not abort with error. */ + } else + ran_dec_msg.assignment_complete.codec_list_bss_supported = &codec_list_bss_supported; + } + return ran_decoded(ran_dec, &ran_dec_msg); } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I66c735c79e982388f06b5de783aa584c9d13569e Gerrit-Change-Number: 15946 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 08:06:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 08:06:12 +0000 Subject: Change in osmo-ci[master]: dockerfile: Add 'dahdi-source' for libosmo-abis In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16033 ) Change subject: dockerfile: Add 'dahdi-source' for libosmo-abis ...................................................................... Patch Set 1: Code-Review+2 > Patch Set 1: > > @osmith: Do I need to trigger a rebuild of this dockerfile somehow somewhere, or are changes picked up automatically? The docker image gets rebuilt automatically, as soon as this is merged to master. By this job: https://jenkins.osmocom.org/jenkins/job/update-osmo-ci-on-slaves/ -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Icfd244268958be71f538d27307cdf0fabeecd956 Gerrit-Change-Number: 16033 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 12 Nov 2019 08:06:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 08:24:27 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 08:24:27 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15961 ) Change subject: add osmo_sockaddr_str_cmp() ...................................................................... Patch Set 6: Code-Review+1 (3 comments) LGTM, only cosmetics. https://gerrit.osmocom.org/c/libosmocore/+/15961/6/src/sockaddr_str.c File src/sockaddr_str.c: https://gerrit.osmocom.org/c/libosmocore/+/15961/6/src/sockaddr_str.c at 99 PS6, Line 99: ingore (ignore) https://gerrit.osmocom.org/c/libosmocore/+/15961/6/src/sockaddr_str.c at 117 PS6, Line 117: if (cmp) : return cmp; : return 0; Why this instead of simply "return cmp"? https://gerrit.osmocom.org/c/libosmocore/+/15961/6/tests/sockaddr_str/sockaddr_str_test.c File tests/sockaddr_str/sockaddr_str_test.c: https://gerrit.osmocom.org/c/libosmocore/+/15961/6/tests/sockaddr_str/sockaddr_str_test.c at 257 PS6, Line 257: 0? (missing space) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 08:24:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 08:29:31 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 08:29:31 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 12 Nov 2019 08:29:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 08:36:49 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 08:36:49 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 08:36:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 08:50:29 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 08:50:29 +0000 Subject: Change in libosmocore[master]: fix osmo_quote_str_c() to alloc sufficient size In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16029 ) Change subject: fix osmo_quote_str_c() to alloc sufficient size ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16029/4/src/utils.c File src/utils.c: https://gerrit.osmocom.org/c/libosmocore/+/16029/4/src/utils.c at 775 PS4, Line 775: The function signature is suitable for OSMO_STRBUF_APPEND_NOLEN(). This seems to be wrong, the description of OSMO_STRBUF_APPEND_NOLEN is: > Like OSMO_STRBUF_APPEND(), but for function signatures that return the char* buffer instead of a length. But this function does return the length. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I04d97e8eec93ffb74006503c356a68cceaf429ac Gerrit-Change-Number: 16029 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: osmith Gerrit-Comment-Date: Tue, 12 Nov 2019 08:50:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 08:53:57 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 08:53:57 +0000 Subject: Change in osmo-asf4-dfu[master]: include board (target) in filename, files are now called like In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16026 ) Change subject: include board (target) in filename, files are now called like ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: Ibdde1c02d5dd3bcd714bae1d374397d9596fede0 Gerrit-Change-Number: 16026 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 12 Nov 2019 08:53:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 08:55:17 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 08:55:17 +0000 Subject: Change in osmo-asf4-dfu[master]: create bootloader-$(BOARD).{elf, bin} symlinks In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16027 ) Change subject: create bootloader-$(BOARD).{elf,bin} symlinks ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16027 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: I3a1eb038e51f4b38ae2e2154bd53c615d98db517 Gerrit-Change-Number: 16027 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 12 Nov 2019 08:55:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 10:07:45 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 10:07:45 +0000 Subject: Change in libosmo-abis[master]: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/15996 ) Change subject: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/15996 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id6c8f27d7ae948b50e9cf5a38f039d782ff78e1d Gerrit-Change-Number: 15996 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 10:07:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 10:09:50 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 10:09:50 +0000 Subject: Change in osmo-hlr[master]: fix upgrade test in presence of ~/.sqliterc In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16019 ) Change subject: fix upgrade test in presence of ~/.sqliterc ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I279a39984563594a4a3914b2ce3d803ad9468fe8 Gerrit-Change-Number: 16019 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 10:09:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 10:11:16 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 10:11:16 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: stop on various failures In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020 ) Change subject: hlr: stop on various failures ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I804aca84d0ccf4767a5c097cf6c882ccbd87c4e1 Gerrit-Change-Number: 16020 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 10:11:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 10:15:44 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 10:15:44 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add tests for GSUP proxy routing In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 ) Change subject: hlr: add tests for GSUP proxy routing ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021/1/hlr/HLR_Tests.ttcn File hlr/HLR_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021/1/hlr/HLR_Tests.ttcn at 433 PS1, Line 433: GSUP.send(valueof(ts_GSUP_UL_REQ(imsi, source_name := source_name))); Don't mix position and keyword arguments. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa Gerrit-Change-Number: 16021 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 10:15:44 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 10:24:04 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 10:24:04 +0000 Subject: Change in osmo-bts[master]: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15918 ) Change subject: l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH ...................................................................... Patch Set 4: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/common/l1sap.c File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/15918/1/src/common/l1sap.c at 74 PS1, Line 74: static bool tch_data_meas_present = true; > I wonder if there is a failsafe way to do this. We could have a function in l1sap. [?] AFAIU You don't need to do any switching, simply have an API bool bts_model_tch_data_meas_present() { return true; (or false) } Make it return true or false depending on the BTS being compiled (so the API is in bts specific code). -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15918 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84 Gerrit-Change-Number: 15918 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 10:24:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: dexter Comment-In-Reply-To: fixeria Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 10:24:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 10:24:52 +0000 Subject: Change in osmo-sysmon[master]: Cleaner output if sections are empty In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 ) Change subject: Cleaner output if sections are empty ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: I429fe7626b43aef74ff7458f5c2864888fa9a562 Gerrit-Change-Number: 16001 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 10:24:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 10:30:24 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 10:30:24 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add sdp to MNCC In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032 ) Change subject: msc: add sdp to MNCC ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032/1//COMMIT_MSG at 13 PS1, Line 13: These changes still work with current osmo-msc master that doesn't send SDP / Will it make tests again osmo-msc latest to fail then? In that case you should add some module param to avoid sending it, and set it to some value in docker-playground.git and use sed in one of the jenkins.sh to modify the value. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic9568c8927507e161aadfad1a4d20aa896d8ae30 Gerrit-Change-Number: 16032 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 10:30:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 10:38:20 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 10:38:20 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order ...................................................................... Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16030/2/src/sockaddr_str.c File src/sockaddr_str.c: https://gerrit.osmocom.org/c/libosmocore/+/16030/2/src/sockaddr_str.c at 409 PS2, Line 409: /*! Convert osmo_sockaddr_str address string to IPv4 address data in host-byte-order. The API (osmo_sockaddr_str_to_32n) was already defined correctly, since it states it converted from network byte order. The problem was implementation related, so it should not be deprecated. So simply keep osmo_sockaddr_str_to_32n() fixing its implementation, and same for osmo_sockaddr_str_to_32 for host byte order. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 10:38:20 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 10:45:47 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 10:45:47 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 7: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h File include/osmocom/core/utils.h: https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h at 313 PS7, Line 313: _str = (char*)talloc_named_const(CTX, _len, __func__); \ > I also had to not use realloc here, for embedded builds (pseudotalloc cannot do talloc_realloc_size( [?] Why not implementing talloc_realloz_size() with realloc() in pseudotalloc? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 10:45:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:18:50 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:18:50 +0000 Subject: Change in osmo-ccid-firmware[master]: jenkins.sh: add --disable-libsctp References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16034 ) Change subject: jenkins.sh: add --disable-libsctp ...................................................................... jenkins.sh: add --disable-libsctp Somehow the logic in libosmocore configure.ac dosen;t work: Using --enable-embedded should automatically select --disable-libsctp, but doesn't :( Change-Id: Id51153863bf7db2843805779723f340228b5ddaf --- M contrib/jenkins.sh 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/34/16034/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index fb324cc..f3a0169 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -38,7 +38,10 @@ mkdir -p "$inst/stow" autoreconf --install --force -./configure --enable-static --prefix="$inst/stow/libosmocore" --host=arm-none-eabi --enable-embedded --disable-doxygen --disable-shared --disable-pseudotalloc --enable-external-tests CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp -mthumb -Os -mlong-calls -g3 -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -I /home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM -Wno-error=format" +./configure --enable-static --prefix="$inst/stow/libosmocore" --host=arm-none-eabi \ + --enable-embedded --disable-doxygen --disable-shared --disable-pseudotalloc \ + --disable-libsctp --enable-external-tests \ + CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp -mthumb -Os -mlong-calls -g3 -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -I /home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM -Wno-error=format" make $PARALLEL_MAKE install make clean STOW_DIR="$inst/stow" stow --restow libosmocore -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16034 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id51153863bf7db2843805779723f340228b5ddaf Gerrit-Change-Number: 16034 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:20:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:20:05 +0000 Subject: Change in osmo-ccid-firmware[master]: jenkins.sh: add --disable-libsctp In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16034 to look at the new patch set (#2). Change subject: jenkins.sh: add --disable-libsctp ...................................................................... jenkins.sh: add --disable-libsctp Somehow the logic in libosmocore configure.ac dosen;t work: Using --enable-embedded should automatically select --disable-libsctp, but doesn't :( Related: OS#4265 Change-Id: Id51153863bf7db2843805779723f340228b5ddaf --- M contrib/jenkins.sh 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/34/16034/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16034 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id51153863bf7db2843805779723f340228b5ddaf Gerrit-Change-Number: 16034 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:20:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:20:11 +0000 Subject: Change in osmo-ccid-firmware[master]: jenkins.sh: add --disable-libsctp In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16034 ) Change subject: jenkins.sh: add --disable-libsctp ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16034 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id51153863bf7db2843805779723f340228b5ddaf Gerrit-Change-Number: 16034 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 11:20:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:20:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:20:13 +0000 Subject: Change in osmo-ccid-firmware[master]: jenkins.sh: add --disable-libsctp In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16034 ) Change subject: jenkins.sh: add --disable-libsctp ...................................................................... jenkins.sh: add --disable-libsctp Somehow the logic in libosmocore configure.ac dosen;t work: Using --enable-embedded should automatically select --disable-libsctp, but doesn't :( Related: OS#4265 Change-Id: Id51153863bf7db2843805779723f340228b5ddaf --- M contrib/jenkins.sh 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index fb324cc..f3a0169 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -38,7 +38,10 @@ mkdir -p "$inst/stow" autoreconf --install --force -./configure --enable-static --prefix="$inst/stow/libosmocore" --host=arm-none-eabi --enable-embedded --disable-doxygen --disable-shared --disable-pseudotalloc --enable-external-tests CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp -mthumb -Os -mlong-calls -g3 -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -I /home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM -Wno-error=format" +./configure --enable-static --prefix="$inst/stow/libosmocore" --host=arm-none-eabi \ + --enable-embedded --disable-doxygen --disable-shared --disable-pseudotalloc \ + --disable-libsctp --enable-external-tests \ + CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp -mthumb -Os -mlong-calls -g3 -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -I /home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM -Wno-error=format" make $PARALLEL_MAKE install make clean STOW_DIR="$inst/stow" stow --restow libosmocore -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16034 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id51153863bf7db2843805779723f340228b5ddaf Gerrit-Change-Number: 16034 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:20:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:20:51 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Fix memory leaks in ccid_handle_out() error paths References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 ) Change subject: ccid_device: Fix memory leaks in ccid_handle_out() error paths ...................................................................... ccid_device: Fix memory leaks in ccid_handle_out() error paths Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57 --- M ccid_common/ccid_device.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/35/16035/1 diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index 049b1cf..8183b16 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -644,6 +644,7 @@ if (len < sizeof(*ch)) { /* FIXME */ + msgb_free(msg); return -1; } @@ -652,6 +653,7 @@ if (!cs) { LOGPCI(ci, LOGL_ERROR, "Invalid bSlot %u\n", ch->bSlot); resp = gen_err_resp(ch->bMessageType, ch->bSlot, CCID_ICC_STATUS_NO_ICC, ch->bSeq, 5); + msgb_free(msg); return ccid_send(ci, resp); } @@ -661,6 +663,7 @@ /* FIXME: ABORT logic as per section 5.3.1 of CCID Spec v1.1 */ resp = gen_err_resp(ch->bMessageType, ch->bSlot, get_icc_status(cs), ch->bSeq, CCID_ERR_CMD_SLOT_BUSY); + msgb_free(msg); return ccid_send(ci, resp); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57 Gerrit-Change-Number: 16035 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:20:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:20:52 +0000 Subject: Change in osmo-ccid-firmware[master]: main: Add missing #include to osmocom/timer.h References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16036 ) Change subject: main: Add missing #include to osmocom/timer.h ...................................................................... main: Add missing #include to osmocom/timer.h Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076 --- M sysmoOCTSIM/main.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/36/16036/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 6e2d6ac..15e2004 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -24,6 +24,7 @@ #include #include +#include #include #include -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076 Gerrit-Change-Number: 16036 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:20:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:20:52 +0000 Subject: Change in osmo-ccid-firmware[master]: add talloc_log_fn() to print talloc errors References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16037 ) Change subject: add talloc_log_fn() to print talloc errors ...................................................................... add talloc_log_fn() to print talloc errors Change-Id: I7c7dac94eb813d963fc0312d808bd0674243f9e2 --- M sysmoOCTSIM/main.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/37/16037/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 15e2004..58c0278 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -1065,6 +1065,11 @@ strcat(out, "BACKUP "); } +static void talloc_log_stdout(const char *message) +{ + printf("%s", message); +} + int main(void) { char sernr_buf[16*2+1]; @@ -1101,6 +1106,7 @@ printf("Chip ID: %s\r\n", sernr_buf); printf("Reset cause: %s\r\n", rstcause_buf); + talloc_set_log_fn(talloc_log_stdout); talloc_enable_null_tracking(); g_tall_ctx = talloc_named_const(NULL, 0, "global"); printf("g_tall_ctx=%p\r\n", g_tall_ctx); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16037 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I7c7dac94eb813d963fc0312d808bd0674243f9e2 Gerrit-Change-Number: 16037 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:20:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:20:52 +0000 Subject: Change in osmo-ccid-firmware[master]: add panic handler printing talloc context References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16038 ) Change subject: add panic handler printing talloc context ...................................................................... add panic handler printing talloc context Change-Id: I0f3a112b67dc94aaee2ee788976e14eeda4e452d --- M sysmoOCTSIM/main.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/38/16038/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 58c0278..3a6efd0 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -994,6 +994,13 @@ #include void *g_tall_ctx; +static void octsim_panic_handler(const char *fmt, va_list args) +{ + vfprintf(stdout, fmt, args); + talloc_report_full(NULL, stdout); + while (1); +} + DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc report") { talloc_report_full(g_tall_ctx, stdout); @@ -1112,6 +1119,7 @@ printf("g_tall_ctx=%p\r\n", g_tall_ctx); libosmo_emb_init(); + osmo_set_panic_handler(octsim_panic_handler); LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16038 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I0f3a112b67dc94aaee2ee788976e14eeda4e452d Gerrit-Change-Number: 16038 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:20:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:20:53 +0000 Subject: Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Create symlinks of last-built .bin and .elf References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 ) Change subject: sysmoOCTSIM: Create symlinks of last-built .bin and .elf ...................................................................... sysmoOCTSIM: Create symlinks of last-built .bin and .elf Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4 --- M sysmoOCTSIM/gcc/Makefile 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/39/16039/1 diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 3d89b25..4b591ca 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -157,7 +157,7 @@ # Linker target -$(OUTPUT_FILE_PATH): $(OBJS) +$(OUTPUT_FILE_PATH): $(OBJS) sysmoOCTSIM.elf sysmoOCTSIM.bin @echo Building target: $@ @echo Invoking: ARM/GNU Linker $(CC) -o $(OUTPUT_FILE_NAME).elf $(OBJS) $(EXTRA_LIBS) -Wl,--start-group -lm -Wl,--end-group -mthumb \ @@ -176,6 +176,11 @@ $(OBJDUMP) -h -S "$(OUTPUT_FILE_NAME).elf" > "$(OUTPUT_FILE_NAME).lss" $(SIZE) "$(OUTPUT_FILE_NAME).elf" +sysmoOCTSIM.elf: $(OUTPUT_FILE_PATH) + ln -sf $(OUTPUT_FILE_NAME).elf $@ + +sysmoOCTSIM.bin: $(OUTPUT_FILE_PATH) + ln -sf $(OUTPUT_FILE_NAME).bin $@ # Compiler targets -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4 Gerrit-Change-Number: 16039 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:32:31 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 11:32:31 +0000 Subject: Change in osmo-bts[master]: rsl: Assign recv pwr to lchan's max ms power In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15970 ) Change subject: rsl: Assign recv pwr to lchan's max ms power ...................................................................... Patch Set 1: ping -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 Gerrit-Change-Number: 15970 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 11:32:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:39:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:39:52 +0000 Subject: Change in osmo-ccid-firmware[master]: fix usb descriptors for CDC_ACM In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16028 ) Change subject: fix usb descriptors for CDC_ACM ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16028 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iabd53b4146ffd3b4a4667beba47f15cccd08aa55 Gerrit-Change-Number: 16028 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 11:39:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:39:54 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:39:54 +0000 Subject: Change in osmo-ccid-firmware[master]: fix usb descriptors for CDC_ACM In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16028 ) Change subject: fix usb descriptors for CDC_ACM ...................................................................... fix usb descriptors for CDC_ACM This should resolve the following error reported on the Linux host: [1929282.072955] cdc_acm 1-4.1.1:1.1: Control and data interfaces are not separated! Change-Id: Iabd53b4146ffd3b4a4667beba47f15cccd08aa55 --- M sysmoOCTSIM/usb_descriptors.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index ddb925b..944e43b 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -113,7 +113,7 @@ .bDescriptorType = CDC_CS_INTERFACE, .bDescriptorSubtype = CDC_SCS_UNION, .bMasterInterface = CONF_USB_CDCD_ACM_COMM_BIFCNUM, - .bSlaveInterface0 = 0x01, + .bSlaveInterface0 = CONF_USB_CDCD_ACM_DATA_BIFCNUM, }, .ep = { { -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16028 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iabd53b4146ffd3b4a4667beba47f15cccd08aa55 Gerrit-Change-Number: 16028 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:52:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:52:35 +0000 Subject: Change in libosmo-sccp[master]: xua: ipa_asp_fsm: Allow moving ASP to inactive state In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 ) Change subject: xua: ipa_asp_fsm: Allow moving ASP to inactive state ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15 Gerrit-Change-Number: 16004 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 11:52:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:53:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:53:11 +0000 Subject: Change in libosmo-sccp[master]: ss7: Improve log formatting during ASP restart In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16012 ) Change subject: ss7: Improve log formatting during ASP restart ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16012 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I42feaa16790f02b98bcda65281de8cd9295ddcb6 Gerrit-Change-Number: 16012 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 11:53:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:53:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:53:15 +0000 Subject: Change in libosmo-sccp[master]: ss7: Set correct local addr and port during dynamic ASP creation In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16013 ) Change subject: ss7: Set correct local addr and port during dynamic ASP creation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16013 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I54aada351d5fb74f5015fdfe691d0b237354743c Gerrit-Change-Number: 16013 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 11:53:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 11:53:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 11:53:17 +0000 Subject: Change in libosmo-sccp[master]: xua: ipa_asp_fsm: Allow moving ASP to inactive state In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 ) Change subject: xua: ipa_asp_fsm: Allow moving ASP to inactive state ...................................................................... xua: ipa_asp_fsm: Allow moving ASP to inactive state If AS is configured with Traffic Mode Override, then if a new ASP becomes active, all previous ASPs are considered to be inactive and new data is sent to the newly activated ASP. Remark: It's still unclear which methodology/implementation will follow when the last activated ASP becomes inactive/shutdown. Then probably another one should be activated at that time, but that logic is not there implemented as far as I know. Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15 --- M src/xua_asp_fsm.c 1 file changed, 26 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 3f3d69a..0a84f28 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -749,6 +749,7 @@ enum ipa_asp_state { IPA_ASP_S_DOWN = XUA_ASP_S_DOWN, + IPA_ASP_S_INACTIVE = XUA_ASP_S_INACTIVE, IPA_ASP_S_ACTIVE = XUA_ASP_S_ACTIVE, IPA_ASP_S_WAIT_ID_RESP, /* Waiting for ID_RESP from peer */ IPA_ASP_S_WAIT_ID_GET, /* Waiting for ID_GET from peer */ @@ -977,6 +978,16 @@ } } +static void ipa_asp_fsm_inactive(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case XUA_ASP_E_M_ASP_DOWN_REQ: + ipa_asp_fsm_del_route(fi->priv); + osmo_fsm_inst_state_chg(fi, IPA_ASP_S_DOWN, 0, 0); + break; + } +} + static void ipa_asp_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct ipa_asp_fsm_priv *iafp = fi->priv; @@ -1010,6 +1021,11 @@ dispatch_to_all_as(fi, XUA_ASPAS_ASP_ACTIVE_IND); } +static void ipa_asp_fsm_inactive_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + dispatch_to_all_as(fi, XUA_ASPAS_ASP_INACTIVE_IND); +} + static void ipa_pong_timer_cb(void *_fi) { struct osmo_fsm_inst *fi = _fi; @@ -1074,11 +1090,20 @@ [IPA_ASP_S_ACTIVE] = { .in_event_mask = S(XUA_ASP_E_M_ASP_DOWN_REQ) | S(XUA_ASP_E_M_ASP_INACTIVE_REQ), - .out_state_mask = S(IPA_ASP_S_DOWN), + .out_state_mask = S(IPA_ASP_S_DOWN) | + S(IPA_ASP_S_INACTIVE), .name = "ASP_ACTIVE", .action = ipa_asp_fsm_active, .onenter = ipa_asp_fsm_active_onenter, }, + [IPA_ASP_S_INACTIVE] = { + .in_event_mask = S(XUA_ASP_E_M_ASP_DOWN_REQ), + .out_state_mask = S(IPA_ASP_S_DOWN) | + S(IPA_ASP_S_ACTIVE), + .name = "ASP_INACTIVE", + .action = ipa_asp_fsm_inactive, + .onenter = ipa_asp_fsm_inactive_onenter, + }, }; static void ipa_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16004 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4ff246b2f899aaa3cf63bbdb3f3d317dc89b3d15 Gerrit-Change-Number: 16004 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:06:26 2019 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Tue, 12 Nov 2019 12:06:26 +0000 Subject: Change in osmo-sysmon[master]: Cleaner output if sections are empty In-Reply-To: References: Message-ID: daniel has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 ) Change subject: Cleaner output if sections are empty ...................................................................... Cleaner output if sections are empty Even with a completely empty config we still get the following output: root sysinfo load: 0.87/0.92/0.98 ram: 243/168/0 uptime: 1d 22:18:19 netdev ping file shellcmd With this patch the sections are skipped if there are no entries and the command no sysinfo can be used to skip displaying the system information. Change-Id: I429fe7626b43aef74ff7458f5c2864888fa9a562 --- M src/osysmon_file.c M src/osysmon_ping.c M src/osysmon_rtnl.c M src/osysmon_shellcmd.c M src/osysmon_sysinfo.c 5 files changed, 59 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osysmon_file.c b/src/osysmon_file.c index 1dec3db..8e52497 100644 --- a/src/osysmon_file.c +++ b/src/osysmon_file.c @@ -153,6 +153,9 @@ struct value_node *vn_file; struct osysmon_file *of; + if (llist_empty(&g_oss->files)) + return 0; + vn_file = value_node_add(parent, "file", NULL); llist_for_each_entry(of, &g_oss->files, list) diff --git a/src/osysmon_ping.c b/src/osysmon_ping.c index f736798..3484374 100644 --- a/src/osysmon_ping.c +++ b/src/osysmon_ping.c @@ -229,6 +229,10 @@ struct value_node *vn_host; int num_host = iterator_count(g_oss->pings->ping_handle); pingobj_iter_t *iter; + + if (!num_host) + return 0; + struct value_node *vn_ping = value_node_add(parent, "ping", NULL); if (!vn_ping) return -ENOMEM; @@ -257,8 +261,5 @@ add_ttl(iter, vn_host); } - if (num_host) - return ping_send(g_oss->pings->ping_handle); - - return 0; + return ping_send(g_oss->pings->ping_handle); } diff --git a/src/osysmon_rtnl.c b/src/osysmon_rtnl.c index 9fd4251..f1e5a0e 100644 --- a/src/osysmon_rtnl.c +++ b/src/osysmon_rtnl.c @@ -401,6 +401,9 @@ { struct value_node *vn_net; + if (llist_empty(&g_oss->netdevs)) + return 0; + if (!g_oss->rcs) g_oss->rcs = rtnl_init(NULL); diff --git a/src/osysmon_shellcmd.c b/src/osysmon_shellcmd.c index 347b982..83dc0c9 100644 --- a/src/osysmon_shellcmd.c +++ b/src/osysmon_shellcmd.c @@ -165,6 +165,9 @@ struct value_node *vn_file; struct osysmon_shellcmd *oc; + if (llist_empty(&g_oss->shellcmds)) + return 0; + vn_file = value_node_add(parent, "shellcmd", NULL); llist_for_each_entry(oc, &g_oss->shellcmds, list) diff --git a/src/osysmon_sysinfo.c b/src/osysmon_sysinfo.c index 85d9ee9..9cb434c 100644 --- a/src/osysmon_sysinfo.c +++ b/src/osysmon_sysinfo.c @@ -30,16 +30,6 @@ #include "osysmon.h" #include "value_node.h" -/*********************************************************************** - * Runtime Code - ***********************************************************************/ - -/* called once on startup before config file parsing */ -int osysmon_sysinfo_init() -{ - return 0; -} - static float loadfac(unsigned long in) { return in/65536.0; } @@ -55,6 +45,48 @@ #define to_minutes(in) (((in)/(SECS_PER_MIN))%MINS_PER_HOUR) #define to_seconds(in) ((in)%SECS_PER_MIN) +static bool sysinfo_enabled = true; + +/*********************************************************************** + * VTY + ***********************************************************************/ + +#define CMD_STR "Display sysinfo\n" +DEFUN(cfg_sysinfo, cfg_sysinfo_cmd, + "sysinfo", + CMD_STR) +{ + sysinfo_enabled = true; + + return CMD_SUCCESS; +} + +DEFUN(cfg_no_sysinfo, cfg_no_sysinfo_cmd, + "no sysinfo", + NO_STR CMD_STR) +{ + sysinfo_enabled = false; + + return CMD_SUCCESS; +} + +static void osysmon_sysinfo_vty_init(void) +{ + install_element(CONFIG_NODE, &cfg_sysinfo_cmd); + install_element(CONFIG_NODE, &cfg_no_sysinfo_cmd); +} + +/*********************************************************************** + * Runtime Code + ***********************************************************************/ + +/* called once on startup before config file parsing */ +int osysmon_sysinfo_init() +{ + osysmon_sysinfo_vty_init(); + return 0; +} + /* called periodically */ int osysmon_sysinfo_poll(struct value_node *parent) { @@ -63,6 +95,9 @@ char buf[32]; int rc; + if (!sysinfo_enabled) + return 0; + vn_sysinfo = value_node_add(parent, "sysinfo", NULL); rc = sysinfo(&si); -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16001 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: I429fe7626b43aef74ff7458f5c2864888fa9a562 Gerrit-Change-Number: 16001 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:06:27 2019 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Tue, 12 Nov 2019 12:06:27 +0000 Subject: Change in osmo-sysmon[master]: Add oneshot mode that exits after one iteration In-Reply-To: References: Message-ID: daniel has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sysmon/+/16002 ) Change subject: Add oneshot mode that exits after one iteration ...................................................................... Add oneshot mode that exits after one iteration Change-Id: Id920c4afee633b8da6919b7b318f9c868890a176 --- M src/osysmon_main.c 1 file changed, 11 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, approved diff --git a/src/osysmon_main.c b/src/osysmon_main.c index fb01f5e..07a065e 100644 --- a/src/osysmon_main.c +++ b/src/osysmon_main.c @@ -118,6 +118,7 @@ static void print_help() { printf(" -h --help This text.\n"); + printf(" -o --oneshot Oneshot mode. Execute queries once, then exit.\n"); printf(" -c --config-file filename The config file to use.\n"); printf(" -d option --debug=DRLL:DCC:DMM:DRR:DRSL:DNM Enable debugging.\n"); printf(" -D --daemonize Fork the process into a background daemon.\n"); @@ -130,9 +131,11 @@ static struct { const char *config_file; bool daemonize; + bool oneshot; } cmdline_opts = { .config_file = "osmo-sysmon.cfg", .daemonize = false, + .oneshot = false, }; static void handle_options(int argc, char **argv) @@ -141,6 +144,7 @@ int option_index = 0, c; static struct option long_options[] = { {"help", 0, 0, 'h'}, + {"oneshot", 0, 0, 'o'}, {"config-file", 1, 0, 'c'}, {"debug", 1, 0, 'd'}, {"daemonize", 0, 0, 'D'}, @@ -151,7 +155,7 @@ {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hc:d:Dse:TV", + c = getopt_long(argc, argv, "hoc:d:Dse:TV", long_options, &option_index); if (c == -1) break; @@ -161,6 +165,9 @@ print_usage(); print_help(); exit(0); + case 'o': + cmdline_opts.oneshot = true; + break; case 'c': cmdline_opts.config_file = optarg; break; @@ -212,6 +219,9 @@ display_update(root); value_node_del(root); + if (cmdline_opts.oneshot) + exit(0); + osmo_timer_schedule(&print_timer, 1, 0); } -- To view, visit https://gerrit.osmocom.org/c/osmo-sysmon/+/16002 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sysmon Gerrit-Branch: master Gerrit-Change-Id: Id920c4afee633b8da6919b7b318f9c868890a176 Gerrit-Change-Number: 16002 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:07:58 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 12:07:58 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Make sure all AS are shutdown when test finishes References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16040 ) Change subject: stp: Make sure all AS are shutdown when test finishes ...................................................................... stp: Make sure all AS are shutdown when test finishes This way traffic modes set dynamically by peers are cleared and can be reset by next tests easily. Change-Id: I177441b2d43298b3836ccf78fe11267333e80665 --- M stp/STP_Tests.ttcn M stp/STP_Tests_M3UA.ttcn 2 files changed, 56 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/16040/1 diff --git a/stp/STP_Tests.ttcn b/stp/STP_Tests.ttcn index 023c53d..82bc03b 100644 --- a/stp/STP_Tests.ttcn +++ b/stp/STP_Tests.ttcn @@ -170,6 +170,8 @@ /* expect to receive it via IPA */ f_IPA_exp(0, sccp_enc); + + f_clear_m3ua(); } /* test routing an SCCP message from IPA ASP to M3UA ASP */ @@ -199,6 +201,8 @@ var template (present) M3UA_Protocol_Data rx_pd; rx_pd := tr_M3UA_protocol_data(pc_sender, pc_receiver, c_M3UA_SI_SCCP, '00'O, '00'O, '00'O, sccp_enc); f_M3UA_exp(0, tr_M3UA_DATA(rctx_receiver, rx_pd)); + + f_clear_m3ua(); } /* test routing an SCCP message from IPA ASP to M3UA ASP while patching PC into SCCP addresses */ @@ -233,6 +237,8 @@ rx_pd := tr_M3UA_protocol_data(pc_sender, pc_receiver, c_M3UA_SI_SCCP, '00'O, '00'O, '00'O, enc_PDU_SCCP(sccp_exp)); f_M3UA_exp(0, tr_M3UA_DATA(rctx_receiver, rx_pd)); + + f_clear_m3ua(); } diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn index 5c15c6f..c550d40 100644 --- a/stp/STP_Tests_M3UA.ttcn +++ b/stp/STP_Tests_M3UA.ttcn @@ -38,6 +38,7 @@ integer mp_stp_m3ua_port := 2905; integer mp_stp_m3ua_clnt_port := 2906; integer mp_local_m3ua_port := 9999; + integer mp_recovery_timeout_msec := 2000; } private const integer NR_M3UA := 3; /* number of M3UA clients in ATS */ @@ -103,6 +104,12 @@ g_m3ua_conn_id[i] := res.connId; } +friend function f_M3UA_close(integer i) runs on RAW_M3UA_CT { + var Result res; + res := M3UA_CodecPort_CtrlFunct.f_IPL4_close(M3UA[i], g_m3ua_conn_id[i], {sctp:=valueof(ts_SCTP)}); + g_m3ua_conn_id[i] := 0; +} + friend function f_M3UA_listen(integer i) runs on RAW_M3UA_CT { var Result res; res := M3UA_CodecPort_CtrlFunct.f_IPL4_listen(M3UA[i], mp_local_ip, mp_local_m3ua_port+i, @@ -126,6 +133,19 @@ } } +friend function f_clear_m3ua() runs on RAW_M3UA_CT { + var integer i; + + log("Clearing M3UA..."); + + for (i := 0; i < NR_M3UA; i:=i+1) { + f_M3UA_close(i); + } + /* Wait for recovery timer to trigger and shutdown all AS: */ + f_sleep(int2float(mp_recovery_timeout_msec)/1000.0 + 0.5); + setverdict(pass, "M3UA cleared"); +} + friend function f_init_m3ua_srv() runs on RAW_M3UA_CT { var integer i; var PortEvent sctp_evt; @@ -192,6 +212,7 @@ f_init_m3ua(); f_M3UA_asp_up(0); f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_INACTIVE, *)); + f_clear_m3ua(); } /* Test the heartbeat procedure without optional heartbeat data payload */ @@ -200,6 +221,7 @@ f_M3UA_asp_up(0); f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_INACTIVE, *)); f_M3UA_beat(0, omit); + f_clear_m3ua(); } /* Test the heartbeat procedure with optional heartbeat data payload */ @@ -208,30 +230,35 @@ f_M3UA_asp_up(0); f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_INACTIVE, *)); f_M3UA_beat(0, 'a1a2a3a4a5'O); + f_clear_m3ua(); } /* Test the ASP-ACTIVATE procedure (without traffic-mode or routing ctx) */ testcase TC_asp_act() runs on RAW_M3UA_CT { f_init_m3ua(); f_M3UA_asp_up_act(0); + f_clear_m3ua(); } /* Test the ASP-ACTIVATE procedure with traffic-mode override */ testcase TC_asp_act_override() runs on RAW_M3UA_CT { f_init_m3ua(); f_M3UA_asp_up_act(0, c_M3UA_TMT_override, omit); + f_clear_m3ua(); } /* Test the ASP-ACTIVATE procedure with traffic-mode override */ testcase TC_asp_act_loadshare() runs on RAW_M3UA_CT { f_init_m3ua(); f_M3UA_asp_up_act(0, c_M3UA_TMT_loadshare, omit); + f_clear_m3ua(); } /* Test the ASP-ACTIVATE procedure with traffic-mode broadcast */ testcase TC_asp_act_broadcast() runs on RAW_M3UA_CT { f_init_m3ua(); f_M3UA_asp_up_act(0, c_M3UA_TMT_broadcast, omit); + f_clear_m3ua(); } /* Test if traffic is routed from idx_tx/pc_tx to idx_rx/pc_rx */ @@ -274,6 +301,7 @@ /* verify traffic is routed from sender to new receiver */ f_test_traffic(0, rctx_sender, pc_sender, 2, rctx_receiver, pc_receiver); + f_clear_m3ua(); } private altstep as_count_rx(integer idx, template (present) PDU_M3UA exp, inout integer counter) @@ -332,6 +360,8 @@ } } setverdict(pass); + + f_clear_m3ua(); } /* test "traffic-mode broadcast" behavior */ @@ -373,6 +403,8 @@ f_M3UA_exp(2, tr_M3UA_DATA(rctx_receiver, rx_pd)); } setverdict(pass); + + f_clear_m3ua(); } private function f_M3UA_rkm_register(OCT4 id, OCT3 dpc, OCT4 rctx, @@ -390,6 +422,8 @@ f_M3UA_send(0, ts_M3UA_REG_REQ({ts_M3UA_rkey(id:='00000099'O, dpc:='aabbcc'O)})); f_M3UA_exp(0, tr_M3UA_REG_RSP({tr_M3UA_reg_res(id:='00000099'O, status:=c_M3UA_REGSTS_ERR_EPERM, rctx:=?)})); + + f_clear_m3ua(); } /* Send RKM registration; expect OK as RCTX does match config */ @@ -402,6 +436,8 @@ f_M3UA_send(0, ts_M3UA_REG_REQ({ts_M3UA_rkey(id:='10000099'O, dpc:=dpc, rctx:=rctx)})); f_M3UA_exp(0, tr_M3UA_REG_RSP({tr_M3UA_reg_res(id:='10000099'O, status:=c_M3UA_REGSTS_SUCCESS, rctx:=rctx)})); + + f_clear_m3ua(); } /* Send RKM registration; expect OK as dynamic not permitted */ @@ -415,6 +451,8 @@ rctx:=?)})); f_vty_config2(VTY, {"cs7 instance 0"}, "xua rkm routing-key-allocation static-only"); + + f_clear_m3ua(); } /* try to de-register a routing key that was never registered -> error */ @@ -422,6 +460,7 @@ f_init_m3ua(); f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(1023,4)))); f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_ERR_NOT_REG)})); + f_clear_m3ua(); } /* try to de-register a routing key that is invalid (non-existant) -> error */ @@ -429,6 +468,7 @@ f_init_m3ua(); f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(1234,4)))); f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_ERR_INVAL_RCTX)})); + f_clear_m3ua(); } /* try to de-register a routing key that was registered -> OK*/ @@ -436,6 +476,7 @@ f_init_m3ua(); f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(1023,4)))); f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_SUCCESS)})); + f_clear_m3ua(); } /* try to de-register a routing key for an active ASP -> ERROR */ @@ -455,6 +496,8 @@ f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(rctx))); f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_ERR_ASP_ACTIVE)})); /* FIXME: we now may have changed the state on the STP side! */ + + f_clear_m3ua(); } /*********************************************************************** @@ -497,6 +540,8 @@ f_init_m3ua_srv(); f_M3UA_CLNT_asp_up(M3UA_SRV(0)); + + f_clear_m3ua(); } /* Expect inbound connection from ASP/SCTP-client, followed by ASP-UP + ASP-ACT */ @@ -505,6 +550,8 @@ f_init_m3ua_srv(); f_M3UA_CLNT_asp_up_act(M3UA_SRV(0)); + + f_clear_m3ua(); } /* Test traffic being routed through "server" side STP (M3UA SG), coming back in "client" @@ -525,6 +572,8 @@ /* verify traffic is routed from sender to [sole] receiver */ f_test_traffic(0, rctx_sender, pc_sender, M3UA_SRV(0), rctx_receiver, pc_receiver); + + f_clear_m3ua(); } /* Test traffic being routed through "client" side STP (M3UA ASP), coming back in "server" @@ -545,6 +594,7 @@ /* verify traffic is routed from sender to [sole] receiver */ f_test_traffic(M3UA_SRV(0), rctx_sender, pc_sender, 0, rctx_receiver, pc_receiver); + f_clear_m3ua(); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I177441b2d43298b3836ccf78fe11267333e80665 Gerrit-Change-Number: 16040 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:07:58 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 12:07:58 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: osmo-stp.cfg: Fix missing ASP relation in AS References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16041 ) Change subject: stp: osmo-stp.cfg: Fix missing ASP relation in AS ...................................................................... stp: osmo-stp.cfg: Fix missing ASP relation in AS Change-Id: Idcfbff548076abc17f0f6c9b13a820c8ef3033e1 --- M stp/osmo-stp.cfg 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/41/16041/1 diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg index d8630d2..5a1741f 100644 --- a/stp/osmo-stp.cfg +++ b/stp/osmo-stp.cfg @@ -55,6 +55,7 @@ routing-key 1023 23 as as-receiver m3ua asp asp-receiver0 + asp asp-receiver1 routing-key 1042 42 as mahlzeit ipa routing-key 0 5 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16041 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idcfbff548076abc17f0f6c9b13a820c8ef3033e1 Gerrit-Change-Number: 16041 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:07:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 12:07:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 ) Change subject: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare ...................................................................... stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare Infrastructure in STP_Tests_IPA changed to be more similar to what is done in STP_Tests_M3UA, which already contain more advanced tests. Array of AS names mp_ipa_as_names is added in order to let TTCN3 port which AS is configured in STP for each src port. Change-Id: Iae213c58598cc0207503fd10f09d2d57aab941fe --- M stp/STP_Tests.ttcn M stp/STP_Tests_IPA.ttcn M stp/osmo-stp.cfg 3 files changed, 136 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/16042/1 diff --git a/stp/STP_Tests.ttcn b/stp/STP_Tests.ttcn index 82bc03b..032a900 100644 --- a/stp/STP_Tests.ttcn +++ b/stp/STP_Tests.ttcn @@ -156,6 +156,7 @@ f_init_m3ua(); f_init_ipa(); + f_connect_ipa(3); f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx /* send a well-formed, encoded SCCP message via M3UA */ @@ -169,7 +170,7 @@ f_M3UA_send(0, ts_M3UA_DATA(rctx_sender, tx_pd), 1); /* expect to receive it via IPA */ - f_IPA_exp(0, sccp_enc); + f_IPA_exp(3, sccp_enc); f_clear_m3ua(); } @@ -181,12 +182,13 @@ var OCT4 pc_receiver := int2oct(23, 4); f_init_common(); - f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"}, + f_vty_config2(VTY, {"cs7 instance 0", "as ipa-as-dynamic-asp ipa"}, "point-code override patch-sccp disabled"); f_init_m3ua(); f_init_ipa(); + f_connect_ipa(3); f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx /* send a well-formed, encoded SCCP message via IPA */ @@ -195,7 +197,7 @@ var SCCP_PAR_Address calling := valueof(ts_SccpAddr_GT('5678'H)); var PDU_SCCP sccp := valueof(ts_SCCP_UDT(called, calling, data)); var octetstring sccp_enc := enc_PDU_SCCP(sccp); - f_IPA_send(0, sccp_enc); + f_IPA_send(3, sccp_enc); /* expect to receive it via M3UA */ var template (present) M3UA_Protocol_Data rx_pd; @@ -212,12 +214,13 @@ var OCT4 pc_receiver := int2oct(23, 4); f_init_common(); - f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"}, + f_vty_config2(VTY, {"cs7 instance 0", "as ipa-as-dynamic-asp ipa"}, "point-code override patch-sccp both"); f_init_m3ua(); f_init_ipa(); + f_connect_ipa(3); f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx /* send a well-formed, encoded SCCP message via IPA */ @@ -225,7 +228,7 @@ var SCCP_PAR_Address called := valueof(ts_SccpAddr_GT('1234'H)); var SCCP_PAR_Address calling := valueof(ts_SccpAddr_GT('5678'H)); var PDU_SCCP sccp := valueof(ts_SCCP_UDT(called, calling, data)); - f_IPA_send(0, enc_PDU_SCCP(sccp)); + f_IPA_send(3, enc_PDU_SCCP(sccp)); /* patch point codes into addresses */ called := valueof(ts_SccpAddr_PC_GT(oct2int(pc_receiver), '83'O, "mtp3_itu", '1234'H)); diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn index 0a36921..f7273dc 100644 --- a/stp/STP_Tests_IPA.ttcn +++ b/stp/STP_Tests_IPA.ttcn @@ -33,11 +33,18 @@ import from STP_Tests_Common all; -private const integer NR_IPA := 1; +private const integer NR_IPA := 4; + +type record of charstring AspNameArray; modulepar { integer mp_stp_ipa_port := 5000; integer mp_local_ipa_port := 20000; + AspNameArray mp_ipa_as_names := {"ipa-as-loadshare-sender", + "ipa-as-loadshare-receiver", + "ipa-as-loadshare-receiver", + "ipa-as-dynamic-asp" + }; } type component IPA_CT extends Test_CT { @@ -45,6 +52,7 @@ * having to re-invent IPA CCM handling here */ port MTP3asp_PT IPA[NR_IPA]; var IPA_Emulation_CT vc_IPA[NR_IPA]; + var IPA_CCM_Parameters g_ccm_pars[NR_IPA]; } friend function f_IPA_send(integer idx, octetstring data) runs on IPA_CT { @@ -53,7 +61,6 @@ } friend function f_IPA_exp(integer idx, template (present) octetstring data) runs on IPA_CT { - var M3UA_RecvFrom rx; alt { [] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, data)) { setverdict(pass); @@ -65,6 +72,23 @@ } } +private function f_rnd_ipa_len() runs on IPA_CT return integer { + var integer rnd_len := f_rnd_int(100); + /* We need at least 1 byte of data, othewise osmocom IPA stack will discard and close the socket */ + if (rnd_len == 0) { + rnd_len := 1; + } + return rnd_len; +} + +/* Test if traffic is routed from idx_tx to idx_rx */ +private function f_test_traffic(integer idx_tx, integer idx_rx) +runs on IPA_CT { + var octetstring data := f_rnd_octstring(f_rnd_ipa_len()); + f_IPA_send(idx_tx, data); + f_IPA_exp(idx_rx, data); +} + friend function f_init_ipa() runs on IPA_CT { var integer i; @@ -74,11 +98,15 @@ vc_IPA[i] := IPA_Emulation_CT.create("IPA" & int2str(i)); map(vc_IPA[i]:IPA_PORT, system:IPA_CODEC_PT); connect(self:IPA[i], vc_IPA[i]:MTP3_SP_PORT); - vc_IPA[i].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+i)); + g_ccm_pars[i] := c_IPA_default_ccm_pars; + g_ccm_pars[i].name := mp_ipa_as_names[i]; } } +friend function f_connect_ipa(integer idx) runs on IPA_CT { + vc_IPA[idx].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, + mp_local_ipa_port+idx, g_ccm_pars[idx])); +} /* "accept-asp-connections pre-configured" and client from unknown source */ @@ -87,6 +115,10 @@ f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections pre-configured"); f_init_ipa(); + /* Add 100 to the port since we know that port is not configured in any + ASP only up to NR_IPA are configured. */ + vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, + mp_local_ipa_port+100, g_ccm_pars[0])); f_sleep(1.0); if (IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be disconnected"); @@ -103,9 +135,8 @@ f_init_common(); f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections pre-configured"); - f_vty_config2(VTY, {"cs7 instance 0"}, "asp ipa-mahlzeit0 20000 5000 ipa"); - f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"}, "asp ipa-mahlzeit0"); f_init_ipa(); + f_connect_ipa(0); f_sleep(1.0); if (not IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be connected"); @@ -115,7 +146,6 @@ /* switch back to default */ f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections dynamic-permitted"); - f_vty_config2(VTY, {"cs7 instance 0"}, "no asp ipa-mahlzeit0"); } @@ -123,6 +153,10 @@ testcase TC_unknown_client_dynamic() runs on IPA_CT { f_init_common(); f_init_ipa(); + /* Add 100 to the port since we know that port is not configured in any + ASP only up to NR_IPA are configured. */ + vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, + mp_local_ipa_port+100, g_ccm_pars[0])); f_sleep(1.0); if (not IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be connected"); @@ -131,11 +165,61 @@ } } +private altstep as_count_rx(integer idx, template (present) octetstring exp, inout integer counter) +runs on IPA_CT { + [] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, exp)) { + counter := counter + 1; + } +} + +/* test "traffic-mode load-share" behavior */ +testcase TC_tmt_loadshare() runs on IPA_CT { + var integer i; + + f_init_ipa(); + + /* bring up the 'sender' side (single ASP in AS) */ + f_connect_ipa(0); + /* activate the first 'receiver' side ASP */ + f_connect_ipa(1); + f_sleep(1.0); + + /* verify traffic is routed from sender to [sole] receiver */ + for (i := 0; i < 10; i := i+1) { + f_test_traffic(0, 1); + } + + /* activate the second 'receiver' side ASP */ + f_connect_ipa(2); + f_sleep(1.0); + + /* verify traffic is routed from sender to new receiver */ + const integer iter_per_asp := 5; + var integer num_rx[3] := { 0, 0, 0 }; + for (i := 0; i < 2*iter_per_asp; i := i+1) { + var octetstring data := f_rnd_octstring(f_rnd_ipa_len()); + f_IPA_send(0, data); + alt { + [] as_count_rx(1, data, num_rx[1]) + [] as_count_rx(2, data, num_rx[2]) + } + } + /* FIXME: check for extraneous messages? */ + for (i := 1; i <= 2; i := i+1) { + if (num_rx[i] != iter_per_asp) { + setverdict(fail, "Received ", num_rx[i], " out of expected ", iter_per_asp, + "DATA messages at IPA port ", i); + } + } + setverdict(pass); +} + control { execute( TC_unknown_client_nodynamic() ); execute( TC_known_client_nodynamic() ); execute( TC_unknown_client_dynamic() ); + execute( TC_tmt_loadshare() ); } diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg index 5a1741f..26ab7f6 100644 --- a/stp/osmo-stp.cfg +++ b/stp/osmo-stp.cfg @@ -36,6 +36,9 @@ ! cs7 instance 0 point-code format 24 +! +!M3UA AS/ASP: +! asp asp-sender 9999 2905 m3ua local-ip 127.0.0.1 remote-ip 127.0.0.1 @@ -57,16 +60,47 @@ asp asp-receiver0 asp asp-receiver1 routing-key 1042 42 - as mahlzeit ipa - routing-key 0 5 - point-code override dpc 23 as as-client m3ua routing-key 1055 55 asp asp-client0 +! +! IPA AS/ASP: +! + asp ipa-asp-loadshare-sender 20000 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + as ipa-as-loadshare-sender ipa + routing-key 0 6 + point-code override dpc 31 + asp ipa-asp-loadshare-sender + asp ipa-asp-loadshare-receiver0 20001 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + asp ipa-asp-loadshare-receiver1 20002 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + as ipa-as-loadshare-receiver ipa + traffic-mode loadshare + routing-key 0 7 + point-code override dpc 32 + asp ipa-asp-loadshare-receiver0 + asp ipa-asp-loadshare-receiver1 + !Used by STP_Tests.ttcn: + as ipa-as-dynamic-asp ipa + routing-key 0 5 + point-code override dpc 23 +! +! ROUTING TABLE: +! route-table system update route 23 16777215 linkset as-sender update route 42 16777215 linkset as-receiver update route 55 16777215 linkset as-client + update route 31 16777215 linkset ipa-as-loadshare-receiver + update route 5 16777215 linkset ipa-as-dynamic-asp +! +!SERVERS: +! listen m3ua 2905 accept-asp-connections dynamic-permitted listen ipa 5000 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iae213c58598cc0207503fd10f09d2d57aab941fe Gerrit-Change-Number: 16042 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:07:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 12:07:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Introduce TC_tmt_override References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16043 ) Change subject: stp: Introduce TC_tmt_override ...................................................................... stp: Introduce TC_tmt_override Change-Id: Id99ec3eaa431512114817d2a2af77013762ab2b9 --- M stp/STP_Tests_IPA.ttcn M stp/osmo-stp.cfg 2 files changed, 49 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/43/16043/1 diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn index f7273dc..946a950 100644 --- a/stp/STP_Tests_IPA.ttcn +++ b/stp/STP_Tests_IPA.ttcn @@ -33,7 +33,7 @@ import from STP_Tests_Common all; -private const integer NR_IPA := 4; +private const integer NR_IPA := 7; type record of charstring AspNameArray; @@ -43,7 +43,10 @@ AspNameArray mp_ipa_as_names := {"ipa-as-loadshare-sender", "ipa-as-loadshare-receiver", "ipa-as-loadshare-receiver", - "ipa-as-dynamic-asp" + "ipa-as-dynamic-asp", + "ipa-as-override-sender", + "ipa-as-override-receiver", + "ipa-as-override-receiver" }; } @@ -165,6 +168,27 @@ } } +/* test "traffic-mode override" behavior */ +testcase TC_tmt_override() runs on IPA_CT { + f_init_ipa(); + + /* bring up the 'sender' side (single ASP in AS) */ + f_connect_ipa(4); + /* activate the first 'receiver' side ASP */ + f_connect_ipa(5); + f_sleep(1.0); + + /* verify traffic is routed from sender to [sole] receiver */ + f_test_traffic(4, 5); + + /* activate the second 'receiver' side ASP */ + f_connect_ipa(6); + f_sleep(1.0); + + /* verify traffic is routed from sender to new receiver */ + f_test_traffic(4, 6); +} + private altstep as_count_rx(integer idx, template (present) octetstring exp, inout integer counter) runs on IPA_CT { [] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, exp)) { @@ -214,11 +238,11 @@ setverdict(pass); } - control { execute( TC_unknown_client_nodynamic() ); execute( TC_known_client_nodynamic() ); execute( TC_unknown_client_dynamic() ); + execute (TC_tmt_override() ); execute( TC_tmt_loadshare() ); } diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg index 26ab7f6..50c80d3 100644 --- a/stp/osmo-stp.cfg +++ b/stp/osmo-stp.cfg @@ -85,7 +85,27 @@ point-code override dpc 32 asp ipa-asp-loadshare-receiver0 asp ipa-asp-loadshare-receiver1 - !Used by STP_Tests.ttcn: +! OVERRIDE: + asp ipa-asp-override-sender 20004 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + as ipa-as-override-sender ipa + routing-key 0 6 + point-code override dpc 33 + asp ipa-asp-override-sender + asp ipa-asp-override-receiver0 20005 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + asp ipa-asp-override-receiver1 20006 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + as ipa-as-override-receiver ipa + traffic-mode override + routing-key 0 8 + point-code override dpc 34 + asp ipa-asp-override-receiver0 + asp ipa-asp-override-receiver1 +! DYNAMIC AS: as ipa-as-dynamic-asp ipa routing-key 0 5 point-code override dpc 23 @@ -97,6 +117,7 @@ update route 42 16777215 linkset as-receiver update route 55 16777215 linkset as-client update route 31 16777215 linkset ipa-as-loadshare-receiver + update route 33 16777215 linkset ipa-as-override-receiver update route 5 16777215 linkset ipa-as-dynamic-asp ! !SERVERS: -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id99ec3eaa431512114817d2a2af77013762ab2b9 Gerrit-Change-Number: 16043 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:07:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 12:07:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Move logic to create unknwon dynamic ASP to f_connect_ipa() References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16044 ) Change subject: stp: Move logic to create unknwon dynamic ASP to f_connect_ipa() ...................................................................... stp: Move logic to create unknwon dynamic ASP to f_connect_ipa() This type of scenario is used in several tests and will be used in more tests in the future, so let's move there for easiness. Change-Id: Ic65ff2ff9dc3cc82ae3fefcf3caf406279cd6b97 --- M stp/STP_Tests_IPA.ttcn 1 file changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/44/16044/1 diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn index 946a950..beb2aa9 100644 --- a/stp/STP_Tests_IPA.ttcn +++ b/stp/STP_Tests_IPA.ttcn @@ -106,9 +106,15 @@ } } -friend function f_connect_ipa(integer idx) runs on IPA_CT { +friend function f_connect_ipa(integer idx, boolean use_unknown_asp_port := false) runs on IPA_CT { + var integer port_offset := 0; + if (use_unknown_asp_port) { + /* Add 100 to the port since we know that port is not configured in any + ASP only up to NR_IPA are configured. */ + port_offset := 100; + } vc_IPA[idx].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+idx, g_ccm_pars[idx])); + mp_local_ipa_port + idx + port_offset, g_ccm_pars[idx])); } @@ -118,10 +124,7 @@ f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections pre-configured"); f_init_ipa(); - /* Add 100 to the port since we know that port is not configured in any - ASP only up to NR_IPA are configured. */ - vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+100, g_ccm_pars[0])); + f_connect_ipa(0, true); f_sleep(1.0); if (IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be disconnected"); @@ -139,7 +142,7 @@ f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections pre-configured"); f_init_ipa(); - f_connect_ipa(0); + f_connect_ipa(0, false); f_sleep(1.0); if (not IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be connected"); @@ -156,10 +159,7 @@ testcase TC_unknown_client_dynamic() runs on IPA_CT { f_init_common(); f_init_ipa(); - /* Add 100 to the port since we know that port is not configured in any - ASP only up to NR_IPA are configured. */ - vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+100, g_ccm_pars[0])); + f_connect_ipa(0, true); f_sleep(1.0); if (not IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be connected"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16044 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic65ff2ff9dc3cc82ae3fefcf3caf406279cd6b97 Gerrit-Change-Number: 16044 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:08:00 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 12:08:00 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Introduce traffic mode type tests with unknwon dynamic ASPs References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16045 ) Change subject: stp: Introduce traffic mode type tests with unknwon dynamic ASPs ...................................................................... stp: Introduce traffic mode type tests with unknwon dynamic ASPs Change-Id: Ib142b021bb6d268831479723ad629be9ed378f81 --- M stp/STP_Tests_IPA.ttcn 1 file changed, 33 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/45/16045/1 diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn index beb2aa9..48652b8 100644 --- a/stp/STP_Tests_IPA.ttcn +++ b/stp/STP_Tests_IPA.ttcn @@ -168,27 +168,37 @@ } } -/* test "traffic-mode override" behavior */ -testcase TC_tmt_override() runs on IPA_CT { +private function f_tc_tmt_override(boolean unknwon_dynamic_asp) +runs on IPA_CT { f_init_ipa(); /* bring up the 'sender' side (single ASP in AS) */ - f_connect_ipa(4); + f_connect_ipa(4, unknwon_dynamic_asp); /* activate the first 'receiver' side ASP */ - f_connect_ipa(5); + f_connect_ipa(5, unknwon_dynamic_asp); f_sleep(1.0); /* verify traffic is routed from sender to [sole] receiver */ f_test_traffic(4, 5); /* activate the second 'receiver' side ASP */ - f_connect_ipa(6); + f_connect_ipa(6, unknwon_dynamic_asp); f_sleep(1.0); /* verify traffic is routed from sender to new receiver */ f_test_traffic(4, 6); } +/* test "traffic-mode override" behavior */ +testcase TC_tmt_override() runs on IPA_CT { + f_tc_tmt_override(false); +} + +/* test "traffic-mode override" behavior, with "accept-asp-connections dynamic-permitted" and clients from unknown ASPs */ +testcase TC_unknown_client_dynamic_tmt_override() runs on IPA_CT { + f_tc_tmt_override(true); +} + private altstep as_count_rx(integer idx, template (present) octetstring exp, inout integer counter) runs on IPA_CT { [] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, exp)) { @@ -196,16 +206,16 @@ } } -/* test "traffic-mode load-share" behavior */ -testcase TC_tmt_loadshare() runs on IPA_CT { +private function f_tc_tmt_loadshare(boolean unknwon_dynamic_asp) +runs on IPA_CT { var integer i; f_init_ipa(); /* bring up the 'sender' side (single ASP in AS) */ - f_connect_ipa(0); + f_connect_ipa(0, unknwon_dynamic_asp); /* activate the first 'receiver' side ASP */ - f_connect_ipa(1); + f_connect_ipa(1, unknwon_dynamic_asp); f_sleep(1.0); /* verify traffic is routed from sender to [sole] receiver */ @@ -214,7 +224,7 @@ } /* activate the second 'receiver' side ASP */ - f_connect_ipa(2); + f_connect_ipa(2, unknwon_dynamic_asp); f_sleep(1.0); /* verify traffic is routed from sender to new receiver */ @@ -238,12 +248,24 @@ setverdict(pass); } +/* test "traffic-mode load-share" behavior */ +testcase TC_tmt_loadshare() runs on IPA_CT { + f_tc_tmt_loadshare(false); +} + +/* test "traffic-mode override" behavior, with "accept-asp-connections dynamic-permitted" and clients from unknown ASPs */ +testcase TC_unknown_client_dynamic_tmt_loadshare() runs on IPA_CT { + f_tc_tmt_override(true); +} + control { execute( TC_unknown_client_nodynamic() ); execute( TC_known_client_nodynamic() ); execute( TC_unknown_client_dynamic() ); - execute (TC_tmt_override() ); + execute( TC_tmt_override() ); + execute( TC_unknown_client_dynamic_tmt_override() ); execute( TC_tmt_loadshare() ); + execute( TC_unknown_client_dynamic_tmt_loadshare() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16045 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib142b021bb6d268831479723ad629be9ed378f81 Gerrit-Change-Number: 16045 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:09:37 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 12 Nov 2019 12:09:37 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: general handling of NOPE / IDLE indications In-Reply-To: References: Message-ID: dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15989 ) Change subject: osmo-bts-trx: general handling of NOPE / IDLE indications ...................................................................... Patch Set 1: This looks interesting. I have done some experiments with this, however, I do not see any NOPE / IDLE indication arrive at trx_data_read_cb(). Is this even implemented in osmo-trx? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Gerrit-Change-Number: 15989 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: dexter Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 12:09:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:09:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 12:09:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Introduce STP_Tests*.ttcn for testing OsmoSTP In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15822 ) Change subject: stp: Introduce STP_Tests*.ttcn for testing OsmoSTP ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15822 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I628a87385cac0dfe708a0d74a5088fbd5a4790cd Gerrit-Change-Number: 15822 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 12:09:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:10:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 12:10:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Introduce STP_Tests*.ttcn for testing OsmoSTP In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15822 ) Change subject: stp: Introduce STP_Tests*.ttcn for testing OsmoSTP ...................................................................... stp: Introduce STP_Tests*.ttcn for testing OsmoSTP In the past, we were automatically running [large parts of] the nplab M3UA and SUA test suites, but those implement only a fraction of the functionality. Particularly, they don't cover the non-standard IPA behavior, and they don't cover RKM (routing key management). Let's introduce an initial set of STP tests with this patch. We try to not duplicate nplab here, and implement bits not covered there. Change-Id: I628a87385cac0dfe708a0d74a5088fbd5a4790cd --- M Makefile A library/M3UA_CodecPort.ttcn A library/M3UA_CodecPort_CtrlFunct.ttcn A library/M3UA_CodecPort_CtrlFunctDef.cc A library/M3UA_Templates.ttcn M library/SCCP_Templates.ttcn A stp/STP_Tests.cfg A stp/STP_Tests.default A stp/STP_Tests.ttcn A stp/STP_Tests_Common.ttcn A stp/STP_Tests_IPA.ttcn A stp/STP_Tests_M3UA.ttcn A stp/gen_links.sh A stp/osmo-stp.cfg A stp/regen_makefile.sh 15 files changed, 2,048 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/Makefile b/Makefile index 99243d6..4ceacf3 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -SUBDIRS=bsc bsc-nat bts ggsn_tests hlr mgw msc pcu remsim sccp selftest sgsn sip sysinfo +SUBDIRS=bsc bsc-nat bts ggsn_tests hlr mgw msc pcu remsim sccp selftest sgsn sip stp sysinfo NPROC=$(shell nproc 2>/dev/null) ifeq ($(NPROC),) diff --git a/library/M3UA_CodecPort.ttcn b/library/M3UA_CodecPort.ttcn new file mode 100644 index 0000000..94d16d6 --- /dev/null +++ b/library/M3UA_CodecPort.ttcn @@ -0,0 +1,84 @@ +module M3UA_CodecPort { + +/* Simple M3UA Codec Port, translating between raw SCTP primitives with + * octetstring payload towards the IPL4asp provider, and M3UA primitives + * which carry the decoded M3UA data types as payload. + * + * (C) 2019 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + + import from IPL4asp_PortType all; + import from IPL4asp_Types all; + import from M3UA_Types all; + + type record M3UA_RecvFrom { + ConnectionId connId, + HostName remName, + PortNumber remPort, + HostName locName, + PortNumber locPort, + PDU_M3UA msg + }; + + template M3UA_RecvFrom t_M3UA_RecvFrom(template PDU_M3UA msg) := { + connId := ?, + remName := ?, + remPort := ?, + locName := ?, + locPort := ?, + msg := msg + } + + type record M3UA_Send { + ConnectionId connId, + integer stream, + PDU_M3UA msg + } + + template M3UA_Send t_M3UA_Send(template ConnectionId connId, template PDU_M3UA msg, + template (omit) integer stream := omit) := { + connId := connId, + stream := stream, + msg := msg + } + + private function IPL4_to_M3UA_RecvFrom(in ASP_RecvFrom pin, out M3UA_RecvFrom pout) { + pout.connId := pin.connId; + pout.remName := pin.remName; + pout.remPort := pin.remPort; + pout.locName := pin.locName; + pout.locPort := pin.locPort; + pout.msg := dec_PDU_M3UA(pin.msg); + } with { extension "prototype(fast)" }; + + private function M3UA_to_IPL4_Send(in M3UA_Send pin, out ASP_Send pout) { + pout.connId := pin.connId; + pout.proto := { + sctp := { + sinfo_stream := pin.stream, + sinfo_ppid := 3, + remSocks := omit, + assocId := omit + } + }; + pout.msg := enc_PDU_M3UA(pin.msg); + } with { extension "prototype(fast)" }; + + type port M3UA_CODEC_PT message { + out M3UA_Send; + in M3UA_RecvFrom, + ASP_ConnId_ReadyToRelease, + ASP_Event; + } with { extension "user IPL4asp_PT + out(M3UA_Send -> ASP_Send:function(M3UA_to_IPL4_Send)) + in(ASP_RecvFrom -> M3UA_RecvFrom: function(IPL4_to_M3UA_RecvFrom); + ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple; + ASP_Event -> ASP_Event: simple)" + } +} diff --git a/library/M3UA_CodecPort_CtrlFunct.ttcn b/library/M3UA_CodecPort_CtrlFunct.ttcn new file mode 100644 index 0000000..fc38e43 --- /dev/null +++ b/library/M3UA_CodecPort_CtrlFunct.ttcn @@ -0,0 +1,44 @@ +module M3UA_CodecPort_CtrlFunct { + + import from M3UA_CodecPort all; + import from IPL4asp_Types all; + + external function f_IPL4_listen( + inout M3UA_CODEC_PT portRef, + in HostName locName, + in PortNumber locPort, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_connect( + inout M3UA_CODEC_PT portRef, + in HostName remName, + in PortNumber remPort, + in HostName locName, + in PortNumber locPort, + in ConnectionId connId, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_close( + inout M3UA_CODEC_PT portRef, + in ConnectionId id, + in ProtoTuple proto := { unspecified := {} } + ) return Result; + + external function f_IPL4_setUserData( + inout M3UA_CODEC_PT portRef, + in ConnectionId id, + in UserData userData + ) return Result; + + external function f_IPL4_getUserData( + inout M3UA_CODEC_PT portRef, + in ConnectionId id, + out UserData userData + ) return Result; + +} + diff --git a/library/M3UA_CodecPort_CtrlFunctDef.cc b/library/M3UA_CodecPort_CtrlFunctDef.cc new file mode 100644 index 0000000..62533de --- /dev/null +++ b/library/M3UA_CodecPort_CtrlFunctDef.cc @@ -0,0 +1,56 @@ +#include "IPL4asp_PortType.hh" +#include "M3UA_CodecPort.hh" +#include "IPL4asp_PT.hh" + +namespace M3UA__CodecPort__CtrlFunct { + + IPL4asp__Types::Result f__IPL4__listen( + M3UA__CodecPort::M3UA__CODEC__PT& portRef, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options); + } + + IPL4asp__Types::Result f__IPL4__connect( + M3UA__CodecPort::M3UA__CODEC__PT& portRef, + const IPL4asp__Types::HostName& remName, + const IPL4asp__Types::PortNumber& remPort, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__connect(portRef, remName, remPort, + locName, locPort, connId, proto, options); + } + + IPL4asp__Types::Result f__IPL4__close( + M3UA__CodecPort::M3UA__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto) + { + return f__IPL4__PROVIDER__close(portRef, connId, proto); + } + + IPL4asp__Types::Result f__IPL4__setUserData( + M3UA__CodecPort::M3UA__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__setUserData(portRef, connId, userData); + } + + IPL4asp__Types::Result f__IPL4__getUserData( + M3UA__CodecPort::M3UA__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__getUserData(portRef, connId, userData); + } + +} + diff --git a/library/M3UA_Templates.ttcn b/library/M3UA_Templates.ttcn new file mode 100644 index 0000000..02b493c --- /dev/null +++ b/library/M3UA_Templates.ttcn @@ -0,0 +1,771 @@ +module M3UA_Templates { + +/* M3UA Templates, building on top of M3UA_Types from Ericsson. + * + * (C) 2019 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +import from M3UA_Types all; +import from General_Types all; +import from Osmocom_Types all; + +const OCT1 c_M3UA_VERSION := '01'O; + +const OCT2 c_M3UA_ST_T_STATE_CHG := '0001'O; +const OCT2 c_M3UA_ST_I_RESERVED := '0001'O; +const OCT2 c_M3UA_ST_I_AS_INACTIVE := '0002'O; +const OCT2 c_M3UA_ST_I_AS_ACTIVE := '0003'O; +const OCT2 c_M3UA_ST_I_AS_PENDING := '0004'O; + +const OCT2 c_M3UA_ST_T_OTHER := '0002'O; +const OCT2 c_M3UA_ST_I_INSUFF_RESRC := '0001'O +const OCT2 c_M3UA_ST_I_ALTERNATE_ASP := '0002'O +const OCT2 c_M3UA_ST_I_ASP_FAILUREP := '0003'O + +private function f_aspid_or_omit(template (omit) OCT4 aspid) +return template (omit) M3UA_ASP_Identifier { + var template (omit) M3UA_ASP_Identifier id; + if (istemplatekind(aspid, "omit")) { + return omit; + } else { + id.tag := '0011'O; + id.lengthInd := 8; + id.aSPIdentifier := aspid; + return id; + } +} + +function tr_M3UA_asp_id(template OCT4 aspid) +return template M3UA_ASP_Identifier { + var template M3UA_ASP_Identifier id := { + tag := '0011'O, + lengthInd := 8, + aSPIdentifier := aspid + }; + if (istemplatekind(aspid, "omit")) { + return omit; + } else if (istemplatekind(aspid, "*")) { + return *; + } else { + return id; + } +} + + +/*********************************************************************** + * ASPSM Class + ***********************************************************************/ + +template (value) PDU_M3UA ts_M3UA_ASPUP(template (omit) OCT4 aspid := omit, + template (omit) octetstring infostr := omit) := { + m3UA_ASPUP := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0301'O, + messageLength := 0, // overwritten + messageParameters := { + aSP_Identifier := f_aspid_or_omit(aspid), + info_String := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_ASPUP(template OCT4 aspid := *, + template octetstring infostr := omit) := { + m3UA_ASPUP := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0301'O, + messageLength := 0, // overwritten + messageParameters := { + aSP_Identifier := tr_M3UA_asp_id(aspid), + info_String := * + } + } +} + +template (value) PDU_M3UA ts_M3UA_ASPUP_ACK := { + m3UA_ASPUP_Ack := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0304'O, + messageLength := 0, // overwritten + messageParameters := { + info_String := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_ASPUP_ACK := { + m3UA_ASPUP_Ack := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0304'O, + messageLength := ?, + messageParameters := { + info_String := * + } + } +} + +template (value) PDU_M3UA ts_M3UA_ASPDN := { + m3UA_ASPDN := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0302'O, + messageLength := 0, // overwritten + messageParameters := { + info_String := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_ASPDN := { + m3UA_ASPDN := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0302'O, + messageLength := ?, + messageParameters := { + info_String := * + } + } +} + +template (value) PDU_M3UA ts_M3UA_ASPDN_ACK := { + m3UA_ASPUP_Ack := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0305'O, + messageLength := 0, // overwritten + messageParameters := { + info_String := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_ASPDN_ACK := { + m3UA_ASPUP_Ack := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0305'O, + messageLength := ?, + messageParameters := { + info_String := * + } + } +} + +template (value) M3UA_Heartbeat_Data ts_M3UA_hb_data(template (value) octetstring hb_data) := { + tag := '0009'O, + lengthInd := 0, // overwritten + heartbeat_Data := hb_data +} + +template (present) M3UA_Heartbeat_Data tr_M3UA_hb_data(template (present) octetstring hb_data) := { + tag := '0009'O, + lengthInd := ?, + heartbeat_Data := hb_data +} + +template (value) PDU_M3UA ts_M3UA_BEAT(template (omit) M3UA_Heartbeat_Data hbd := omit) := { + m3UA_BEAT := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0303'O, + messageLength := 0, // overwritten + messageParameters := { + heartbeat_Data := hbd + } + } +} +template (present) PDU_M3UA tr_M3UA_BEAT(template M3UA_Heartbeat_Data hbd := *) := { + m3UA_BEAT := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0303'O, + messageLength := ?, + messageParameters := { + heartbeat_Data := hbd + } + } +} + +template (value) PDU_M3UA ts_M3UA_BEAT_ACK(template (omit) M3UA_Heartbeat_Data hb_data) := { + m3UA_BEAT_Ack := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0306'O, + messageLength := 0, // overwritten + messageParameters := { + heartbeat_Data := hb_data + } + } +} +template (present) PDU_M3UA tr_M3UA_BEAT_ACK(template M3UA_Heartbeat_Data hb_data := *) := { + m3UA_BEAT_Ack := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0306'O, + messageLength := ?, + messageParameters := { + heartbeat_Data := hb_data + } + } +} + + + + +/*********************************************************************** + * ASPTM Class + ***********************************************************************/ + + +const M3UA_Traffic_Mode_Type c_M3UA_TMT_override := { + tag := '000B'O, + lengthInd := 8, + trafficModeType := int2oct(1, 4) +} + +const M3UA_Traffic_Mode_Type c_M3UA_TMT_loadshare := { + tag := '000B'O, + lengthInd := 8, + trafficModeType := int2oct(2, 4) +} + +const M3UA_Traffic_Mode_Type c_M3UA_TMT_broadcast := { + tag := '000B'O, + lengthInd := 8, + trafficModeType := int2oct(3, 4) +} + +function ts_M3UA_routing_ctx(template (omit) octetstring rctx) +return template (omit) M3UA_Routing_Context { + var template (omit) M3UA_Routing_Context id; + if (istemplatekind(rctx, "omit")) { + return omit; + } else { + id.tag := '0006'O; + id.lengthInd := 0; // overwritten + id.routingContext := rctx; + return id; + } +} + +function tr_M3UA_routing_ctx(template octetstring rctx) +return template M3UA_Routing_Context { + var template M3UA_Routing_Context id; + if (istemplatekind(rctx, "omit")) { + return omit; + } else if (istemplatekind(rctx, "*")) { + return *; + } else { + id.tag := '0006'O; + id.lengthInd := ?; + id.routingContext := rctx; + return id; + } +} + +template (value) PDU_M3UA ts_M3UA_ASPAC(template (omit) M3UA_Traffic_Mode_Type tmt, + template (omit) OCT4 rctx) := { + m3UA_ASPAC := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0401'O, + messageLength := 0, // overwritten + messageParameters := { + traffic_Mode_Type := tmt, + routing_Context := ts_M3UA_routing_ctx(rctx), + info_String := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_ASPAC(template M3UA_Traffic_Mode_Type tmt, + template OCT4 rctx) := { + m3UA_ASPAC := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0401'O, + messageLength := ?, + messageParameters := { + traffic_Mode_Type := tmt, + routing_Context := tr_M3UA_routing_ctx(rctx), + info_String := * + } + } +} + +template (value) PDU_M3UA ts_M3UA_ASPAC_ACK(template (omit) M3UA_Traffic_Mode_Type tmt, + template (omit) OCT4 rctx) := { + m3UA_ASPAC_Ack := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0403'O, + messageLength := 0, // overwritten + messageParameters := { + traffic_Mode_Type := tmt, + routing_Context := ts_M3UA_routing_ctx(rctx), + info_String := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_ASPAC_ACK(template M3UA_Traffic_Mode_Type tmt, + template OCT4 rctx) := { + m3UA_ASPAC_Ack := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0403'O, + messageLength := ?, + messageParameters := { + traffic_Mode_Type := tmt, + routing_Context := tr_M3UA_routing_ctx(rctx), + info_String := * + } + } +} + +template (value) PDU_M3UA ts_M3UA_ASPIA(template (omit) OCT4 rctx) := { + m3UA_ASPIA := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0402'O, + messageLength := 0, // overwritten + messageParameters := { + routing_Context := ts_M3UA_routing_ctx(rctx), + info_String := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_ASPIA(template OCT4 rctx) := { + m3UA_ASPIA := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0402'O, + messageLength := ?, + messageParameters := { + routing_Context := tr_M3UA_routing_ctx(rctx), + info_String := * + } + } +} + + +template (value) PDU_M3UA ts_M3UA_ASPIA_ACK(template (omit) OCT4 rctx) := { + m3UA_ASPIA_Ack := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0404'O, + messageLength := 0, // overwritten + messageParameters := { + routing_Context := ts_M3UA_routing_ctx(rctx), + info_String := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_ASPIA_ACK(template OCT4 rctx) := { + m3UA_ASPIA_Ack := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0404'O, + messageLength := ?, + messageParameters := { + routing_Context := tr_M3UA_routing_ctx(rctx), + info_String := * + } + } +} + + +/*********************************************************************** + * MGMT Class + ***********************************************************************/ + +template (value) M3UA_Error_Code ts_M3UA_err_code(template (value) OCT4 val) := { + tag := '000C'O, + lengthInd := 8, + errorCode := val +} +template (present) M3UA_Error_Code tr_M3UA_err_code(template (present) OCT4 val) := { + tag := '000C'O, + lengthInd := 8, + errorCode := val +} + +template (value) M3UA_Status ts_M3UA_status(template (value) OCT2 status_type, + template (value) OCT2 status_info) := { + tag := '000D'O, + lengthInd := 8, + statusType := status_type, + statusInfo := status_info +} + +template (present) M3UA_Status tr_M3UA_status(template (present) OCT2 status_type, + template (present) OCT2 status_info) := { + tag := '000D'O, + lengthInd := 8, + statusType := status_type, + statusInfo := status_info +} + + +template (value) PDU_M3UA ts_M3UA_ERR(template (value) OCT4 err_code, + template (omit) OCT4 rctx) := { + m3UA_ERR := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0000'O, + messageLength := 0, // overwritten + messageParameters := { + error_Code := ts_M3UA_err_code(err_code), + routing_Context := ts_M3UA_routing_ctx(rctx), + affected_Point_Codes := omit, + network_Appearance := omit, + diagnostic_information := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_ERR(template (present) OCT4 err_code, + template OCT4 rctx) := { + m3UA_ERR := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0000'O, + messageLength := ?, + messageParameters := { + error_Code := tr_M3UA_err_code(err_code), + routing_Context := tr_M3UA_routing_ctx(rctx), + affected_Point_Codes := *, + network_Appearance := *, + diagnostic_information := * + } + } +} + + +template (value) PDU_M3UA ts_M3UA_NOTIFY(template (value) OCT2 status_type, + template (value) OCT2 status_info, + template (omit) OCT4 rctx, + template (omit) OCT4 aspid := omit, + template (omit) octetstring infostr := omit) := { + m3UA_NOTIFY := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0001'O, + messageLength := 0, // overwritten + messageParameters := { + status := ts_M3UA_status(status_type, status_info), + aSP_Identifier := f_aspid_or_omit(aspid), + routing_Context := ts_M3UA_routing_ctx(rctx), + info_String := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_NOTIFY(template (present) OCT2 status_type, + template (present) OCT2 status_info, + template OCT4 rctx, + template OCT4 aspid := *, + template octetstring infostr := *) := { + m3UA_NOTIFY := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0001'O, + messageLength := ?, + messageParameters := { + status := tr_M3UA_status(status_type, status_info), + aSP_Identifier := *, + routing_Context := tr_M3UA_routing_ctx(rctx), + info_String := * + } + } +} + +/*********************************************************************** + * Message Transfer Class + ***********************************************************************/ + +template (value) M3UA_Protocol_Data ts_M3UA_protocol_data(template (value) OCT4 opc, + template (value) OCT4 dpc, + template (value) OCT1 si, + template (value) OCT1 ni, + template (value) OCT1 mp, + template (value) OCT1 sls, + template (value) octetstring data) := { + tag := '0210'O, + lengthInd := 0, // overwritten + oPC := opc, + dPC := dpc, + sI := si, + nI := ni, + mP := mp, + sLS := sls, + userProtocolData := data +} +template (present) M3UA_Protocol_Data tr_M3UA_protocol_data(template (present) OCT4 opc, + template (present) OCT4 dpc, + template (present) OCT1 si, + template (present) OCT1 ni, + template (present) OCT1 mp, + template (present) OCT1 sls, + template (present) octetstring data) := { + tag := '0210'O, + lengthInd := ?, + oPC := opc, + dPC := dpc, + sI := si, + nI := ni, + mP := mp, + sLS := sls, + userProtocolData := data +} + + +template (value) PDU_M3UA ts_M3UA_DATA(template (omit) OCT4 rctx, + template (value) M3UA_Protocol_Data data) := { + m3UA_DATA := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0101'O, + messageLength := 0, // overwritten + messageParameters :={ + network_Appearance := omit, + routing_Context := ts_M3UA_routing_ctx(rctx), + protocol_Data := data, + correlation_ID := omit + } + } +} +template (present) PDU_M3UA tr_M3UA_DATA(template OCT4 rctx, + template (present) M3UA_Protocol_Data data) := { + m3UA_DATA := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0101'O, + messageLength := ?, // overwritten + messageParameters := { + network_Appearance := *, + routing_Context := tr_M3UA_routing_ctx(rctx), + protocol_Data := data, + correlation_ID := * + } + } +} + +/*********************************************************************** + * Routing Key Management + ***********************************************************************/ + +template (value) M3UA_Local_Routing_Key_Id ts_M3UA_lrkid(template (value) OCT4 id) := { + tag := '020a'O, + lengthInd := 8, + localRkId := id +} + +template (present) M3UA_Local_Routing_Key_Id tr_M3UA_lrkid(template (present) OCT4 id) := { + tag := '020a'O, + lengthInd := 8, + localRkId := id +} + + +template (value) M3UA_Routing_Key ts_M3UA_rkey(OCT4 id, OCT3 dpc, + template (omit) M3UA_Traffic_Mode_Type tmt := omit, + template (omit) OCT4 rctx := omit) := { + tag := '0207'O, + lengthInd := 0, // overwritten + routingKey := { + local_Routing_Key_Id := ts_M3UA_lrkid(id), + routing_Context := ts_M3UA_routing_ctx(rctx), + traffic_Mode_Type := tmt, + destination_Point_Code := { + tag := '020b'O, + lengthInd := 8, + pointCode := { '00'O, dpc } + }, + network_Appearance := omit, + service_Indicators := omit, + opc_List := omit + } +} +template (present) M3UA_Routing_Key tr_M3UA_rkey(template (present) OCT4 id, template (present) OCT3 dpc, + template M3UA_Traffic_Mode_Type tmt := *, + template OCT4 rctx := *) := { + tag := '0207'O, + lengthInd := ?, + routingKey := { + local_Routing_Key_Id := tr_M3UA_lrkid(id), + routing_Context := tr_M3UA_routing_ctx(rctx), + traffic_Mode_Type := tmt, + destination_Point_Code := { + tag := '020b'O, + lengthInd := 8, + pointCode := { '00'O, dpc } + }, + network_Appearance := omit, + service_Indicators := omit, + opc_List := omit + } +} + + +const OCT4 c_M3UA_REGSTS_SUCCESS := '00000000'O; +const OCT4 c_M3UA_REGSTS_ERR_UNKNOWN := '00000001'O; +const OCT4 c_M3UA_REGSTS_ERR_INVAL_DPC := '00000002'O; +const OCT4 c_M3UA_REGSTS_ERR_INVAL_NA := '00000003'O; +const OCT4 c_M3UA_REGSTS_ERR_INVAL_RKEY := '00000004'O; +const OCT4 c_M3UA_REGSTS_ERR_EPERM := '00000005'O; +// ... + +const OCT4 c_m3UA_DEREGSTS_SUCCESS := '00000000'O; +const OCT4 c_m3UA_DEREGSTS_ERR_UNKNOWN := '00000001'O; +const OCT4 c_m3UA_DEREGSTS_ERR_INVAL_RCTX := '00000002'O; +const OCT4 c_m3UA_DEREGSTS_ERR_EPERM := '00000003'O; +const OCT4 c_m3UA_DEREGSTS_ERR_NOT_REG := '00000004'O; +const OCT4 c_m3UA_DEREGSTS_ERR_ASP_ACTIVE := '00000005'O; + +template (value) M3UA_Registration_Result ts_M3UA_reg_res(template (value) OCT4 id, + template (value) OCT4 status, + template (value) OCT4 rctx) := { + tag := '0208'O, + lengthInd := 0, // overwritten + registrationResult := { + local_Routing_Key_Id := ts_M3UA_lrkid(id), + registration_Status := { + tag := '0212'O, + lengthInd := 8, + registrationStatus := status + }, + routing_Context := ts_M3UA_routing_ctx(rctx) + } +} +template (present) M3UA_Registration_Result tr_M3UA_reg_res(template (present) OCT4 id, + template (present) OCT4 status, + template (present) OCT4 rctx) := { + tag := '0208'O, + lengthInd := ?, + registrationResult := { + local_Routing_Key_Id := tr_M3UA_lrkid(id), + registration_Status := { + tag := '0212'O, + lengthInd := 8, + registrationStatus := status + }, + routing_Context := tr_M3UA_routing_ctx(rctx) + } +} + +template (value) M3UA_Deregistration_Result ts_M3UA_dereg_res(template (value) OCT4 rctx, + template (value) OCT4 status) := { + tag := '0209'O, + lengthInd := 0, // overwritten + deregistrationResult := { + routing_Context := ts_M3UA_routing_ctx(rctx), + deregistration_Status := { + tag := '0213'O, + lengthInd := 8, + deregistrationStatus := status + } + } +} +template (present) M3UA_Deregistration_Result tr_M3UA_dereg_res(template (present) OCT4 rctx, + template (present) OCT4 status) := { + tag := '0209'O, + lengthInd := ?, + deregistrationResult := { + routing_Context := tr_M3UA_routing_ctx(rctx), + deregistration_Status := { + tag := '0213'O, + lengthInd := 8, + deregistrationStatus := status + } + } +} + + +template (value) PDU_M3UA ts_M3UA_REG_REQ(template (value) M3UA_Routing_Keys rkeys) := { + m3UA_REG_REQ := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0901'O, + messageLength := 0, // overwritten + messageParameters := rkeys + } +} +template (present) PDU_M3UA tr_M3UA_REG_REQ(template (present) M3UA_Routing_Keys rkeys) := { + m3UA_REG_REQ := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0901'O, + messageLength := ?, + messageParameters := rkeys + } +} + + +template (value) PDU_M3UA ts_M3UA_REG_RSP(template (value) M3UA_Registration_Results res) := { + m3UA_REG_RSP := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0902'O, + messageLength := 0, // overwritten + messageParameters := res + } +} +template (present) PDU_M3UA tr_M3UA_REG_RSP(template (present) M3UA_Registration_Results res) := { + m3UA_REG_RSP := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0902'O, + messageLength := ?, + messageParameters := res + } +} + +template (value) PDU_M3UA ts_M3UA_DEREG_REQ(template (value) M3UA_Routing_Context rctx) := { + m3UA_DEREG_REQ := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0903'O, + messageLength := 0, // overwritten + messageParameters := { + routing_Context := rctx + } + } +} +template (present) PDU_M3UA tr_M3UA_DEREG_REQ(template (present) M3UA_Routing_Context rctx) := { + m3UA_DEREG_REQ := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0903'O, + messageLength := ?, + messageParameters := { + routing_Context := rctx + } + } +} + +template (value) PDU_M3UA ts_M3UA_DEREG_RSP(template (value) M3UA_Deregistration_Results res) := { + m3UA_DEREG_RSP := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0904'O, + messageLength := 0, // overwritten + messageParameters := res + } +} +template (present) PDU_M3UA tr_M3UA_DEREG_RSP(template (present) M3UA_Deregistration_Results res) := { + m3UA_DEREG_RSP := { + version := c_M3UA_VERSION, + reserved := '00'O, + messageClassAndType := '0904'O, + messageLength := ?, + messageParameters := res + } +} + + + +} diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn index a5af073..7c2ffa6 100644 --- a/library/SCCP_Templates.ttcn +++ b/library/SCCP_Templates.ttcn @@ -46,4 +46,25 @@ } } +/* construct a SCCP_PAR_Address with PC + SSN and GT */ +template (value) SCCP_PAR_Address ts_SccpAddr_PC_GT(integer pc, octetstring sio, + charstring sccp_srv_type, hexstring gt_addr) := { + addressIndicator := { + pointCodeIndic := '1'B, + ssnIndicator := '0'B, + globalTitleIndic := '0001'B, // NAI only + routingIndicator := cg_route_on_GT // route on GT + }, + signPointCode := SCCP_SPC_int2bit(pc, sccp_srv_type, sio), + subsystemNumber := omit, + globalTitle := { + gti0001 := { + natureOfAddress := '0000011'B, + oddeven := '0'B, + globalTitleAddress := gt_addr + } + } +} + + } diff --git a/stp/STP_Tests.cfg b/stp/STP_Tests.cfg new file mode 100644 index 0000000..3ba2d13 --- /dev/null +++ b/stp/STP_Tests.cfg @@ -0,0 +1,18 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./STP_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] +STP_Tests.control diff --git a/stp/STP_Tests.default b/stp/STP_Tests.default new file mode 100644 index 0000000..6417e8c --- /dev/null +++ b/stp/STP_Tests.default @@ -0,0 +1,20 @@ +[LOGGING] +FileMask := LOG_ALL | TTCN_MATCHING; + +[TESTPORT_PARAMETERS] +*.VTY.CTRL_MODE := "client" +*.VTY.CTRL_HOSTNAME := "127.0.0.1" +*.VTY.CTRL_PORTNUM := "4239" +*.VTY.CTRL_LOGIN_SKIPPED := "yes" +*.VTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes" +*.VTY.CTRL_READMODE := "buffered" +*.VTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes" +*.VTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes" +*.VTY.PROMPT1 := "OsmoSTP> " + +[MODULE_PARAMETERS] +Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoSTP"; + +[MAIN_CONTROLLER] + +[EXECUTE] diff --git a/stp/STP_Tests.ttcn b/stp/STP_Tests.ttcn new file mode 100644 index 0000000..023c53d --- /dev/null +++ b/stp/STP_Tests.ttcn @@ -0,0 +1,249 @@ +module STP_Tests { + +/* Osmocom STP test suite in in TTCN-3 + * (C) 2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +import from General_Types all; +import from Osmocom_Types all; +import from IPL4asp_Types all; + +import from Osmocom_VTY_Functions all; + +import from M3UA_Types all; +import from M3UA_Templates all; +import from M3UA_CodecPort all; +import from M3UA_CodecPort_CtrlFunct all; + +import from M3UA_Emulation all; +import from MTP3asp_Types all; +import from MTP3asp_PortType all; + +import from SCCP_Types all; +import from SCCP_Templates all; +import from SCCPasp_Types all; +import from SCCP_Emulation all; + +import from IPA_Emulation all; + +import from STP_Tests_Common all; +import from STP_Tests_IPA all; +import from STP_Tests_M3UA all; + + +type component IPA_M3UA_CT extends RAW_M3UA_CT, IPA_CT { +}; + +const OCT1 c_M3UA_SI_SCCP := '03'O; + + +/* copy+pasted from SCCP_Emulation.ttcn, where for some reason it is marked as "runs on SCCP_CT" + * without depending on anything of that component */ + function ConvertASPAddressToEncodedAddress_itu( in SCCP_PAR_Address pl_ASPAddress) + return SCCP_param_CPartyAddressEnc + { + + var SCCP_param_CPartyAddress_itu vl_PDUAddress; //structured fit to encoding + var SCCP_param_CPartyAddressEnc vl_PDUAddressEncoded; + + vl_PDUAddress.addressIndicator.pointCodeIndic:= + pl_ASPAddress.addressIndicator.pointCodeIndic; + + vl_PDUAddress.addressIndicator.ssnIndicator:= + pl_ASPAddress.addressIndicator.ssnIndicator; + + vl_PDUAddress.addressIndicator.globalTitleIndic:= + pl_ASPAddress.addressIndicator.globalTitleIndic; + + vl_PDUAddress.addressIndicator.routingIndicator:= + pl_ASPAddress.addressIndicator.routingIndicator; + + vl_PDUAddress.addressIndicator.reserved:='0'B; + // if (ischosen(pl_ASPAddress.signPointCode) ) not used because it is mandatory field (???) + + //----signPointCode handling + if ( ispresent( pl_ASPAddress.signPointCode )) { + vl_PDUAddress.signPointCode := + '00'B&pl_ASPAddress.signPointCode; + } else { + vl_PDUAddress.signPointCode := omit; + }; + + //----subsystemNumber handling + if ( ispresent( pl_ASPAddress.subsystemNumber ) ){ + vl_PDUAddress.subsystemNumber := pl_ASPAddress.subsystemNumber; + } else { + vl_PDUAddress.subsystemNumber :=omit; + }; + + // --- globalTitle handling-- + if ( ispresent(pl_ASPAddress.globalTitle)) + {//startif1 + + var SCCP_ASPfield_GlobalTitle tmpGT ; + tmpGT := pl_ASPAddress.globalTitle; + + if (ischosen(tmpGT.gti0001)) + { + vl_PDUAddress.globalTitle.gti0001.natureOfAddress:=tmpGT.gti0001.natureOfAddress; + vl_PDUAddress.globalTitle.gti0001.oddeven:=tmpGT.gti0001.oddeven; + vl_PDUAddress.globalTitle.gti0001.globalTitleAddress:=tmpGT.gti0001.globalTitleAddress; + } + else if (ischosen(tmpGT.gti0010)) + { + vl_PDUAddress.globalTitle.gti0010.translationType:=tmpGT.gti0010.translationType; + vl_PDUAddress.globalTitle.gti0010.globalTitleAddress:=tmpGT.gti0010.globalTitleAddress; + } + else if (ischosen(tmpGT.gti0011)) + { + vl_PDUAddress.globalTitle.gti0011.translationType:=tmpGT.gti0011.translationType; + vl_PDUAddress.globalTitle.gti0011.encodingScheme:=tmpGT.gti0011.encodingScheme; + vl_PDUAddress.globalTitle.gti0011.numberingPlan:=tmpGT.gti0011.numberingPlan; + vl_PDUAddress.globalTitle.gti0011.globalTitleAddress:=tmpGT.gti0011.globalTitleAddress; + } + else if (ischosen(tmpGT.gti0100)) + { + vl_PDUAddress.globalTitle.gti0100.translationType:=tmpGT.gti0100.translationType; + vl_PDUAddress.globalTitle.gti0100.encodingScheme:=tmpGT.gti0100.encodingScheme; + vl_PDUAddress.globalTitle.gti0100.numberingPlan:=tmpGT.gti0100.numberingPlan; + vl_PDUAddress.globalTitle.gti0100.natureOfAddress:=tmpGT.gti0100.natureOfAddress; + vl_PDUAddress.globalTitle.gti0100.reserved:='0'B; + vl_PDUAddress.globalTitle.gti0100.globalTitleAddress:=tmpGT.gti0100.globalTitleAddress; + } + } + else + { + vl_PDUAddress.globalTitle := omit; + }; + + vl_PDUAddressEncoded.addr:= enc_PDU_SCCP_Address_itu( vl_PDUAddress); + vl_PDUAddressEncoded.paramLength:= lengthof(vl_PDUAddressEncoded.addr); + + return vl_PDUAddressEncoded; + + } //ConvertASPAddressToEncodedAddress_itu + +template (value) PDU_SCCP ts_SCCP_UDT(SCCP_PAR_Address called, SCCP_PAR_Address calling, + template (value) octetstring data, + template (value) BIT4 msg_hdl := '0000'B) := { + unitdata := { + messageType := udt, + protClass := {'0000'B, msg_hdl}, + pointer1 := 0, + pointer2 := 0, + pointer3 := 0, + calledPAddress := ConvertASPAddressToEncodedAddress_itu(called), + callingPAddress := ConvertASPAddressToEncodedAddress_itu(calling), + data := { + paramLength := 0, + data := data + } + } +} + +/* Test routing of SCCP between an M3UA and an IPA ASP */ +testcase TC_m3ua_to_ipa() runs on IPA_M3UA_CT { + var OCT4 rctx_sender := int2oct(1023, 4); + var OCT4 pc_sender := int2oct(23, 4); + var OCT4 pc_receiver := int2oct(5, 4); + + f_init_m3ua(); + f_init_ipa(); + + f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx + + /* send a well-formed, encoded SCCP message via M3UA */ + var octetstring data := f_rnd_octstring(f_rnd_int(100)); + var SCCP_PAR_Address called := valueof(ts_SccpAddr_GT('1234'H)); + var SCCP_PAR_Address calling := valueof(ts_SccpAddr_GT('5678'H)); + var PDU_SCCP sccp := valueof(ts_SCCP_UDT(called, calling, data)); + var octetstring sccp_enc := enc_PDU_SCCP(sccp); + var template (value) M3UA_Protocol_Data tx_pd; + tx_pd := ts_M3UA_protocol_data(pc_sender, pc_receiver, c_M3UA_SI_SCCP, '00'O, '00'O, '00'O, sccp_enc); + f_M3UA_send(0, ts_M3UA_DATA(rctx_sender, tx_pd), 1); + + /* expect to receive it via IPA */ + f_IPA_exp(0, sccp_enc); +} + +/* test routing an SCCP message from IPA ASP to M3UA ASP */ +testcase TC_ipa_to_m3ua() runs on IPA_M3UA_CT { + var OCT4 pc_sender := int2oct(5, 4); + var OCT4 rctx_receiver := int2oct(1023, 4); + var OCT4 pc_receiver := int2oct(23, 4); + + f_init_common(); + f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"}, + "point-code override patch-sccp disabled"); + + f_init_m3ua(); + f_init_ipa(); + + f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx + + /* send a well-formed, encoded SCCP message via IPA */ + var octetstring data := f_rnd_octstring(f_rnd_int(100)); + var SCCP_PAR_Address called := valueof(ts_SccpAddr_GT('1234'H)); + var SCCP_PAR_Address calling := valueof(ts_SccpAddr_GT('5678'H)); + var PDU_SCCP sccp := valueof(ts_SCCP_UDT(called, calling, data)); + var octetstring sccp_enc := enc_PDU_SCCP(sccp); + f_IPA_send(0, sccp_enc); + + /* expect to receive it via M3UA */ + var template (present) M3UA_Protocol_Data rx_pd; + rx_pd := tr_M3UA_protocol_data(pc_sender, pc_receiver, c_M3UA_SI_SCCP, '00'O, '00'O, '00'O, sccp_enc); + f_M3UA_exp(0, tr_M3UA_DATA(rctx_receiver, rx_pd)); +} + +/* test routing an SCCP message from IPA ASP to M3UA ASP while patching PC into SCCP addresses */ +testcase TC_ipa_to_m3ua_patch_sccp() runs on IPA_M3UA_CT { + var OCT4 pc_sender := int2oct(5, 4); + var OCT4 rctx_receiver := int2oct(1023, 4); + var OCT4 pc_receiver := int2oct(23, 4); + + f_init_common(); + f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"}, + "point-code override patch-sccp both"); + + f_init_m3ua(); + f_init_ipa(); + + f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx + + /* send a well-formed, encoded SCCP message via IPA */ + var octetstring data := f_rnd_octstring(f_rnd_int(100)); + var SCCP_PAR_Address called := valueof(ts_SccpAddr_GT('1234'H)); + var SCCP_PAR_Address calling := valueof(ts_SccpAddr_GT('5678'H)); + var PDU_SCCP sccp := valueof(ts_SCCP_UDT(called, calling, data)); + f_IPA_send(0, enc_PDU_SCCP(sccp)); + + /* patch point codes into addresses */ + called := valueof(ts_SccpAddr_PC_GT(oct2int(pc_receiver), '83'O, "mtp3_itu", '1234'H)); + calling := valueof(ts_SccpAddr_PC_GT(oct2int(pc_sender), '83'O, "mtp3_itu", '5678'H)); + var PDU_SCCP sccp_exp := valueof(ts_SCCP_UDT(called, calling, data)); + + /* expect to receive it via M3UA */ + var template (present) M3UA_Protocol_Data rx_pd; + rx_pd := tr_M3UA_protocol_data(pc_sender, pc_receiver, c_M3UA_SI_SCCP, '00'O, '00'O, '00'O, + enc_PDU_SCCP(sccp_exp)); + f_M3UA_exp(0, tr_M3UA_DATA(rctx_receiver, rx_pd)); +} + + + +control { + /* M3UA <-> IPA Tests */ + execute( TC_m3ua_to_ipa() ); + execute( TC_ipa_to_m3ua() ); + execute( TC_ipa_to_m3ua_patch_sccp() ); +} + + + +} diff --git a/stp/STP_Tests_Common.ttcn b/stp/STP_Tests_Common.ttcn new file mode 100644 index 0000000..aee5a88 --- /dev/null +++ b/stp/STP_Tests_Common.ttcn @@ -0,0 +1,64 @@ +module STP_Tests_Common { + +/* Osmocom STP test suite in in TTCN-3 + * (C) 2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +friend module STP_Tests; +friend module STP_Tests_M3UA; +friend module STP_Tests_IPA; + +import from TELNETasp_PortType all; +import from Osmocom_VTY_Functions all; + +import from IPL4asp_Types all; + +modulepar { + charstring mp_stp_ip := "127.0.0.1"; + charstring mp_local_ip := "127.0.0.1"; +} + +friend template (value) SctpTuple ts_SCTP(template (omit) integer ppid := 3, + template (omit) integer stream := 0) := { + sinfo_stream := stream, + sinfo_ppid := ppid, + remSocks := omit, + assocId := omit +} + +type component Test_CT { + port TELNETasp_PT VTY; + timer g_Tguard := 30.0; + var boolean g_test_initialized := false; +} + +private altstep as_gTguard() runs on Test_CT { + [] g_Tguard.timeout { + setverdict(fail, "Global guard timer timed out"); + mtc.stop; + } +} + +friend function f_init_common() runs on Test_CT { + if (g_test_initialized) { + return; + } + g_test_initialized := true; + + map(self:VTY, system:VTY); + f_vty_set_prompts(VTY); + f_vty_transceive(VTY, "enable"); + + activate(as_gTguard()); + g_Tguard.start; +} + + + +} diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn new file mode 100644 index 0000000..0a36921 --- /dev/null +++ b/stp/STP_Tests_IPA.ttcn @@ -0,0 +1,142 @@ +module STP_Tests_IPA { + +/* Osmocom STP test suite in in TTCN-3 + * (C) 2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +friend module STP_Tests; + +import from General_Types all; +import from Osmocom_Types all; +import from IPL4asp_Types all; + +import from TELNETasp_PortType all; +import from Osmocom_VTY_Functions all; + +import from SCCP_Types all; +import from SCCP_Templates all; +import from SCCPasp_Types all; +import from SCCP_Emulation all; + +import from IPA_Emulation all; + +import from M3UA_Emulation all; +import from M3UA_CodecPort all; +import from MTP3asp_Types all; +import from MTP3asp_PortType all; + +import from STP_Tests_Common all; + +private const integer NR_IPA := 1; + +modulepar { + integer mp_stp_ipa_port := 5000; + integer mp_local_ipa_port := 20000; +} + +type component IPA_CT extends Test_CT { + /* for IPA we use the IPA_Emulation and not directly IPA_CodecPort to avoid + * having to re-invent IPA CCM handling here */ + port MTP3asp_PT IPA[NR_IPA]; + var IPA_Emulation_CT vc_IPA[NR_IPA]; +} + +friend function f_IPA_send(integer idx, octetstring data) runs on IPA_CT { + var MTP3_Field_sio sio := { ni := '00'B, prio := '00'B, si := '0011'B }; + IPA[idx].send(t_ASP_MTP3_TRANSFERreq(sio, 0, 0, 0, data)); +} + +friend function f_IPA_exp(integer idx, template (present) octetstring data) runs on IPA_CT { + var M3UA_RecvFrom rx; + alt { + [] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, data)) { + setverdict(pass); + } + [] IPA[idx].receive { + setverdict(fail, "Received unexpected data on IPA port while waiting for ", data); + mtc.stop; + } + } +} + +friend function f_init_ipa() runs on IPA_CT { + var integer i; + + f_init_common(); + + for (i := 0; i < NR_IPA; i:=i+1) { + vc_IPA[i] := IPA_Emulation_CT.create("IPA" & int2str(i)); + map(vc_IPA[i]:IPA_PORT, system:IPA_CODEC_PT); + connect(self:IPA[i], vc_IPA[i]:MTP3_SP_PORT); + vc_IPA[i].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, + mp_local_ipa_port+i)); + } +} + + + +/* "accept-asp-connections pre-configured" and client from unknown source */ +testcase TC_unknown_client_nodynamic() runs on IPA_CT { + f_init_common(); + f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, + "accept-asp-connections pre-configured"); + f_init_ipa(); + f_sleep(1.0); + if (IPA[0].checkstate("Connected")) { + setverdict(fail, "Expected IPA port to be disconnected"); + } else { + setverdict(pass); + } + /* switch back to default */ + f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, + "accept-asp-connections dynamic-permitted"); +} + +/* "accept-asp-connections pre-configured" and client from known source */ +testcase TC_known_client_nodynamic() runs on IPA_CT { + f_init_common(); + f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, + "accept-asp-connections pre-configured"); + f_vty_config2(VTY, {"cs7 instance 0"}, "asp ipa-mahlzeit0 20000 5000 ipa"); + f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"}, "asp ipa-mahlzeit0"); + f_init_ipa(); + f_sleep(1.0); + if (not IPA[0].checkstate("Connected")) { + setverdict(fail, "Expected IPA port to be connected"); + } else { + setverdict(pass); + } + /* switch back to default */ + f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, + "accept-asp-connections dynamic-permitted"); + f_vty_config2(VTY, {"cs7 instance 0"}, "no asp ipa-mahlzeit0"); +} + + +/* "accept-asp-connections dynamic-permitted" and client from unknown source */ +testcase TC_unknown_client_dynamic() runs on IPA_CT { + f_init_common(); + f_init_ipa(); + f_sleep(1.0); + if (not IPA[0].checkstate("Connected")) { + setverdict(fail, "Expected IPA port to be connected"); + } else { + setverdict(pass); + } +} + + +control { + execute( TC_unknown_client_nodynamic() ); + execute( TC_known_client_nodynamic() ); + execute( TC_unknown_client_dynamic() ); +} + + +} diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn new file mode 100644 index 0000000..29e85f9 --- /dev/null +++ b/stp/STP_Tests_M3UA.ttcn @@ -0,0 +1,451 @@ +module STP_Tests_M3UA { + +/* Osmocom STP test suite in in TTCN-3 + * (C) 2019 Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +friend module STP_Tests; + +import from General_Types all; +import from Osmocom_Types all; +import from IPL4asp_Types all; + +import from Osmocom_VTY_Functions all; + +import from M3UA_Types all; +import from M3UA_Templates all; +import from M3UA_CodecPort all; +import from M3UA_CodecPort_CtrlFunct all; + +import from M3UA_Emulation all; +import from MTP3asp_Types all; +import from MTP3asp_PortType all; + +import from SCCP_Types all; +import from SCCP_Templates all; +import from SCCPasp_Types all; +import from SCCP_Emulation all; + +import from STP_Tests_Common all; + +modulepar { + integer mp_stp_m3ua_port := 2905; + integer mp_local_m3ua_port := 9999; +} + +private const integer NR_M3UA := 3; + +type component RAW_M3UA_CT extends Test_CT { + port M3UA_CODEC_PT M3UA[NR_M3UA]; + var integer g_m3ua_conn_id[NR_M3UA]; +} + +private template PortEvent tr_SctpAssocChange := { + sctpEvent := { + sctpAssocChange := ? + } +} +private template PortEvent tr_SctpPeerAddrChange := { + sctpEvent := { + sctpPeerAddrChange := ? + } +} + +private altstep as_m3ua_sctp() runs on RAW_M3UA_CT { + [] any from M3UA.receive(tr_SctpAssocChange) { repeat; } + [] any from M3UA.receive(tr_SctpPeerAddrChange) { repeat; } +} + +friend function f_M3UA_send(integer idx, template (present) PDU_M3UA msg, template integer stream := 0) +runs on RAW_M3UA_CT { + M3UA[idx].send(t_M3UA_Send(g_m3ua_conn_id[idx], msg, stream)); +} + +friend function f_M3UA_exp(integer idx, template (present) PDU_M3UA msg) runs on RAW_M3UA_CT { + var M3UA_RecvFrom rx; + alt { + [] M3UA[idx].receive(t_M3UA_RecvFrom(msg)) { + setverdict(pass); + } + [] M3UA[idx].receive(t_M3UA_RecvFrom(?)) -> value rx { + setverdict(fail, "Received unexpected M3UA[", idx, "] ", rx, + "while waiting for ", msg); + mtc.stop; + } + } +} + +friend function f_M3UA_connect(integer i) runs on RAW_M3UA_CT { + var Result res; + res := M3UA_CodecPort_CtrlFunct.f_IPL4_connect(M3UA[i], mp_stp_ip, mp_stp_m3ua_port, + mp_local_ip, mp_local_m3ua_port+i, -1, + {sctp:=valueof(ts_SCTP)}); + if (not ispresent(res.connId)) { + setverdict(fail, "Could not connect M3UA socket, check your configuration"); + mtc.stop; + } + g_m3ua_conn_id[i] := res.connId; +} + +friend function f_init_m3ua() runs on RAW_M3UA_CT { + var integer i; + + f_init_common(); + + activate(as_m3ua_sctp()); + + for (i := 0; i < NR_M3UA; i:=i+1) { + map(self:M3UA[i], system:M3UA_CODEC_PT); + f_M3UA_connect(i); + } +} + +/* perform an outbound ASP-UP procedure */ +friend function f_M3UA_asp_up(integer idx, template (omit) OCT4 aspid := omit) runs on RAW_M3UA_CT { + f_M3UA_send(idx, ts_M3UA_ASPUP(aspid)); + f_M3UA_exp(idx, tr_M3UA_ASPUP_ACK); +} + +/* perform an outbound BEAT procedure */ +friend function f_M3UA_beat(integer idx, template (omit) octetstring hbd) runs on RAW_M3UA_CT { + if (istemplatekind(hbd, "omit")) { + f_M3UA_send(idx, ts_M3UA_BEAT(omit)); + f_M3UA_exp(idx, tr_M3UA_BEAT_ACK(omit)); + } else { + f_M3UA_send(idx, ts_M3UA_BEAT(ts_M3UA_hb_data(hbd))); + f_M3UA_exp(idx, tr_M3UA_BEAT_ACK(tr_M3UA_hb_data(hbd))); + } +} + +/* perform an outbound ASP-ACTIVATE procedure */ +friend function f_M3UA_asp_act(integer idx, template (omit) M3UA_Traffic_Mode_Type tmt := omit, + template (omit) OCT4 rctx := omit) runs on RAW_M3UA_CT { + f_M3UA_send(idx, ts_M3UA_ASPAC(tmt, rctx)); + f_M3UA_exp(idx, tr_M3UA_ASPAC_ACK(tmt, rctx)); +} + +/* perform outbound ASP-UP and ASP-ACT, optionally expect interemittent NOTIFY */ +friend function f_M3UA_asp_up_act(integer idx, template (omit) M3UA_Traffic_Mode_Type tmt := omit, + template (omit) OCT4 rctx := omit, + template (omit) OCT2 ntfy_after_up := c_M3UA_ST_I_AS_INACTIVE, + template (omit) OCT2 ntfy_after_act := c_M3UA_ST_I_AS_ACTIVE) +runs on RAW_M3UA_CT { + f_M3UA_asp_up(idx, omit); + if (not istemplatekind(ntfy_after_up, "omit")) { + f_M3UA_exp(idx, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, ntfy_after_up, *)); + } + f_M3UA_asp_act(idx, tmt, rctx); + if (not istemplatekind(ntfy_after_act, "omit")) { + f_M3UA_exp(idx, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, ntfy_after_act, *)); + } +} + + +/* Test the ASP-UP procedure */ +testcase TC_connect_asp_up() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_M3UA_asp_up(0); + f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_INACTIVE, *)); +} + +/* Test the heartbeat procedure without optional heartbeat data payload */ +testcase TC_beat() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_M3UA_asp_up(0); + f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_INACTIVE, *)); + f_M3UA_beat(0, omit); +} + +/* Test the heartbeat procedure with optional heartbeat data payload */ +testcase TC_beat_payload() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_M3UA_asp_up(0); + f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_INACTIVE, *)); + f_M3UA_beat(0, 'a1a2a3a4a5'O); +} + +/* Test the ASP-ACTIVATE procedure (without traffic-mode or routing ctx) */ +testcase TC_asp_act() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_M3UA_asp_up_act(0); +} + +/* Test the ASP-ACTIVATE procedure with traffic-mode override */ +testcase TC_asp_act_override() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_M3UA_asp_up_act(0, c_M3UA_TMT_override, omit); +} + +/* Test the ASP-ACTIVATE procedure with traffic-mode override */ +testcase TC_asp_act_loadshare() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_M3UA_asp_up_act(0, c_M3UA_TMT_loadshare, omit); +} + +/* Test the ASP-ACTIVATE procedure with traffic-mode broadcast */ +testcase TC_asp_act_broadcast() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_M3UA_asp_up_act(0, c_M3UA_TMT_broadcast, omit); +} + +/* Test if traffic is routed from idx_tx/pc_tx to idx_rx/pc_rx */ +private function f_test_traffic(integer idx_tx, template (omit) OCT4 rctx_sender, OCT4 pc_tx, + integer idx_rx, template (omit) OCT4 rctx_receiver, OCT4 pc_rx, + OCT1 si := '23'O, OCT1 ni := '00'O, OCT1 mp := '00'O, OCT1 sls := '00'O) +runs on RAW_M3UA_CT { + var octetstring data := f_rnd_octstring(f_rnd_int(100)); + f_M3UA_send(idx_tx, ts_M3UA_DATA(rctx_sender, + ts_M3UA_protocol_data(pc_tx, pc_rx, si, ni, mp, sls, data)), 1); + f_M3UA_exp(idx_rx, tr_M3UA_DATA(rctx_receiver, + tr_M3UA_protocol_data(pc_tx, pc_rx, si, ni, mp, sls, data))); +} + + +/* test "traffic-mode override" behavior */ +testcase TC_tmt_override() runs on RAW_M3UA_CT { + var OCT4 rctx_sender := int2oct(1023, 4); + var OCT4 pc_sender := int2oct(23, 4); + var OCT4 rctx_receiver := int2oct(1042, 4); + var OCT4 pc_receiver := int2oct(42, 4); + + f_init_m3ua(); + + /* bring up the 'sender' side (single ASP in AS) */ + f_M3UA_asp_up_act(0, omit, omit); + + /* activate the first 'receiver' side ASP */ + f_M3UA_asp_up_act(1, c_M3UA_TMT_override, rctx_receiver); + + /* verify traffic is routed from sender to [sole] receiver */ + f_test_traffic(0, rctx_sender, pc_sender, 1, rctx_receiver, pc_receiver); + + /* activate the second 'receiver' side ASP (no NOTIFY as AS state doesn't change) */ + f_M3UA_asp_up_act(2, c_M3UA_TMT_override, rctx_receiver, omit, omit); + + /* we expect a NOTIFY to the *other* ASP Other/Alternat-ASP-Active */ + f_M3UA_exp(1, tr_M3UA_NOTIFY(c_M3UA_ST_T_OTHER, c_M3UA_ST_I_ALTERNATE_ASP, *)); + + /* verify traffic is routed from sender to new receiver */ + f_test_traffic(0, rctx_sender, pc_sender, 2, rctx_receiver, pc_receiver); + +} + +private altstep as_count_rx(integer idx, template (present) PDU_M3UA exp, inout integer counter) +runs on RAW_M3UA_CT { + [] M3UA[idx].receive(t_M3UA_RecvFrom(exp)) { + counter := counter + 1; + } +} + +/* test "traffic-mode load-share" behavior */ +testcase TC_tmt_loadshare() runs on RAW_M3UA_CT { + var OCT4 rctx_sender := int2oct(1023, 4); + var OCT4 pc_sender := int2oct(23, 4); + var OCT4 rctx_receiver := int2oct(1042, 4); + var OCT4 pc_receiver := int2oct(42, 4); + var integer i; + + f_init_m3ua(); + + /* FIXME: configure the STP via VTY to set traffic-mode */ + + /* bring up the 'sender' side (single ASP in AS) */ + f_M3UA_asp_up_act(0, omit, rctx_sender); + + /* activate the first 'receiver' side ASP */ + f_M3UA_asp_up(1); + f_M3UA_asp_up_act(1, c_M3UA_TMT_loadshare, omit); // TODO: rctx + + /* verify traffic is routed from sender to [sole] receiver */ + for (i := 0; i < 10; i := i+1) { + f_test_traffic(0, rctx_sender, pc_sender, 1, rctx_receiver, pc_receiver); + } + + /* activate the second 'receiver' side ASP (no NOTIFY) */ + f_M3UA_asp_up_act(2, c_M3UA_TMT_loadshare, omit, omit, omit); // TODO: rctx + + /* verify traffic is routed from sender to new receiver */ + const integer iter_per_asp := 5; + var integer num_rx[NR_M3UA] := { 0, 0, 0 }; + for (i := 0; i < 2*iter_per_asp; i := i+1) { + var octetstring data := f_rnd_octstring(f_rnd_int(100)); + var template (value) M3UA_Protocol_Data tx_pd; + var template (present) M3UA_Protocol_Data rx_pd; + tx_pd := ts_M3UA_protocol_data(pc_sender, pc_receiver, '23'O, '00'O, '00'O, '00'O, data); + rx_pd := tr_M3UA_protocol_data(pc_sender, pc_receiver, '23'O, '00'O, '00'O, '00'O, data); + f_M3UA_send(0, ts_M3UA_DATA(rctx_sender, tx_pd), 1); + alt { + [] as_count_rx(1, tr_M3UA_DATA(rctx_receiver, rx_pd), num_rx[1]) + [] as_count_rx(2, tr_M3UA_DATA(rctx_receiver, rx_pd), num_rx[2]) + } + } + /* FIXME: check for extraneous messages? */ + for (i := 1; i <= 2; i := i+1) { + if (num_rx[i] != iter_per_asp) { + setverdict(fail, "Received only ", num_rx[i], " out of expected ", iter_per_asp, + "M3UA DATA messages"); + } + } + setverdict(pass); +} + +/* test "traffic-mode broadcast" behavior */ +testcase TC_tmt_broadcast() runs on RAW_M3UA_CT { + var OCT4 rctx_sender := int2oct(1023, 4); + var OCT4 pc_sender := int2oct(23, 4); + var OCT4 rctx_receiver := int2oct(1042, 4); + var OCT4 pc_receiver := int2oct(42, 4); + var integer i; + + f_init_m3ua(); + + /* FIXME: configure the STP via VTY to set traffic-mode */ + + /* bring up the 'sender' side (single ASP in AS) */ + f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx + + /* activate the first 'receiver' side ASP */ + f_M3UA_asp_up(1); + f_M3UA_asp_up_act(1, c_M3UA_TMT_broadcast, omit); // TODO: rctx + + /* verify traffic is routed from sender to [sole] receiver */ + for (i := 0; i < 10; i := i+1) { + f_test_traffic(0, rctx_sender, pc_sender, 1, rctx_receiver, pc_receiver); + } + + /* activate the second 'receiver' side ASP */ + f_M3UA_asp_up_act(2, c_M3UA_TMT_broadcast, omit, omit, omit); // TODO: rctx + + /* verify traffic is routed from sender to new receiver */ + for (i := 0; i < 10; i := i+1) { + var octetstring data := f_rnd_octstring(f_rnd_int(100)); + var template (value) M3UA_Protocol_Data tx_pd; + var template (present) M3UA_Protocol_Data rx_pd; + tx_pd := ts_M3UA_protocol_data(pc_sender, pc_receiver, '23'O, '00'O, '00'O, '00'O, data); + rx_pd := tr_M3UA_protocol_data(pc_sender, pc_receiver, '23'O, '00'O, '00'O, '00'O, data); + f_M3UA_send(0, ts_M3UA_DATA(rctx_sender, tx_pd), 1); + /* each message must be received both on 1 and 2 */ + f_M3UA_exp(1, tr_M3UA_DATA(rctx_receiver, rx_pd)); + f_M3UA_exp(2, tr_M3UA_DATA(rctx_receiver, rx_pd)); + } + setverdict(pass); +} + +private function f_M3UA_rkm_register(OCT4 id, OCT3 dpc, OCT4 rctx, + template (present) OCT4 exp_status := c_M3UA_REGSTS_SUCCESS) +runs on RAW_M3UA_CT +{ + f_M3UA_send(0, ts_M3UA_REG_REQ({ts_M3UA_rkey(id:=id, dpc:=dpc, rctx:=rctx)})); + f_M3UA_exp(0, tr_M3UA_REG_RSP({tr_M3UA_reg_res(id:=id, status:=exp_status, rctx:=rctx)})); +} + +/* Send RKM registration; expect -EPERM as RCTX doesn't match config and dynamic not permitted */ +testcase TC_rkm_reg_static_notpermitted() runs on RAW_M3UA_CT { + f_init_m3ua(); + + f_M3UA_send(0, ts_M3UA_REG_REQ({ts_M3UA_rkey(id:='00000099'O, dpc:='aabbcc'O)})); + f_M3UA_exp(0, tr_M3UA_REG_RSP({tr_M3UA_reg_res(id:='00000099'O, status:=c_M3UA_REGSTS_ERR_EPERM, + rctx:=?)})); +} + +/* Send RKM registration; expect OK as RCTX does match config */ +testcase TC_rkm_reg_static_permitted() runs on RAW_M3UA_CT { + var OCT3 dpc := int2oct(23, 3); // must match config + var OCT4 rctx := int2oct(1023, 4); // must match config + + f_init_m3ua(); + + f_M3UA_send(0, ts_M3UA_REG_REQ({ts_M3UA_rkey(id:='10000099'O, dpc:=dpc, rctx:=rctx)})); + f_M3UA_exp(0, tr_M3UA_REG_RSP({tr_M3UA_reg_res(id:='10000099'O, status:=c_M3UA_REGSTS_SUCCESS, + rctx:=rctx)})); +} + +/* Send RKM registration; expect OK as dynamic not permitted */ +testcase TC_rkm_reg_dynamic_permitted() runs on RAW_M3UA_CT { + f_init_common(); + f_vty_config2(VTY, {"cs7 instance 0"}, "xua rkm routing-key-allocation dynamic-permitted"); + f_init_m3ua(); + + f_M3UA_send(0, ts_M3UA_REG_REQ({ts_M3UA_rkey(id:='20000099'O, dpc:='aabbcc'O)})); + f_M3UA_exp(0, tr_M3UA_REG_RSP({tr_M3UA_reg_res(id:='20000099'O, status:=c_M3UA_REGSTS_SUCCESS, + rctx:=?)})); + + f_vty_config2(VTY, {"cs7 instance 0"}, "xua rkm routing-key-allocation static-only"); +} + +/* try to de-register a routing key that was never registered -> error */ +testcase TC_rkm_unreg_never_registered() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(1023,4)))); + f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_ERR_NOT_REG)})); +} + +/* try to de-register a routing key that is invalid (non-existant) -> error */ +testcase TC_rkm_unreg_invalid() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(1234,4)))); + f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_ERR_INVAL_RCTX)})); +} + +/* try to de-register a routing key that was registered -> OK*/ +testcase TC_rkm_unreg_registered() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(1023,4)))); + f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_SUCCESS)})); +} + +/* try to de-register a routing key for an active ASP -> ERROR */ +testcase TC_rkm_unreg_active() runs on RAW_M3UA_CT { + var OCT3 dpc := int2oct(23, 3); // must match config + var OCT4 rctx := int2oct(1023, 4); // must match config + + f_init_m3ua(); + + /* first register the routing key */ + f_M3UA_rkm_register(id:='30000099'O, dpc:=dpc, rctx:=rctx); + + /* then activate the ASP */ + f_M3UA_asp_up_act(0); + + /* then try to de-regsiter */ + f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(rctx))); + f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_ERR_ASP_ACTIVE)})); + /* FIXME: we now may have changed the state on the STP side! */ +} + + +control { + /* M3UA Tests */ + execute( TC_connect_asp_up() ); + execute( TC_beat() ); + execute( TC_beat_payload() ); + execute( TC_asp_act() ); + execute( TC_asp_act_override() ); + execute( TC_asp_act_loadshare() ); + execute( TC_asp_act_broadcast() ); + execute( TC_tmt_override() ); + execute( TC_tmt_loadshare() ); + execute( TC_tmt_broadcast() ); + + /* M3UA RKM tests */ + execute( TC_rkm_reg_static_notpermitted() ); + execute( TC_rkm_reg_static_permitted() ); + execute( TC_rkm_reg_dynamic_permitted() ); + execute( TC_rkm_unreg_never_registered() ); + execute( TC_rkm_unreg_invalid() ); + execute( TC_rkm_unreg_registered() ); + execute( TC_rkm_unreg_active() ); + /* TODO: test RKM with unsupported routing keys: NA, SI, OPC */ + /* TODO: register/unregister multiple routing contexts in one message; including mixed + success/failure situations */ +} + + + +} diff --git a/stp/gen_links.sh b/stp/gen_links.sh new file mode 100755 index 0000000..aaf3421 --- /dev/null +++ b/stp/gen_links.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +BASEDIR=../deps + +. ../gen_links.sh.inc + +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" +FILES+=" TCCEncoding_Functions.ttcn TCCEncoding.cc " # GSM 7-bit coding +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src +FILES="Socket_API_Definitions.ttcn" +gen_links $DIR $FILES + +# Required by MGCP and IPA +DIR=$BASEDIR/titan.TestPorts.IPL4asp/src +FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +gen_links $DIR $FILES + +# required by M3UA_Emulation +DIR=$BASEDIR/titan.ProtocolModules.M3UA/src +FILES="M3UA_Types.ttcn" +gen_links $DIR $FILES + +# required by M3UA_Emulation +DIR=$BASEDIR/titan.TestPorts.SCTPasp/src +FILES="SCTPasp_PT.cc SCTPasp_PT.hh SCTPasp_PortType.ttcn SCTPasp_Types.ttcn" +gen_links $DIR $FILES + +# required by M3UA Emulation +DIR=$BASEDIR/titan.TestPorts.MTP3asp/src +FILES="MTP3asp_PortType.ttcn MTP3asp_Types.ttcn" +gen_links $DIR $FILES + +# required by SCCP Emulation +DIR=$BASEDIR/titan.ProtocolEmulations.M3UA/src +FILES="M3UA_Emulation.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolEmulations.SCCP/src +FILES="SCCP_Emulation.ttcn SCCP_EncDec.cc SCCP_Mapping.ttcnpp SCCP_Types.ttcn SCCPasp_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.TELNETasp/src +FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" +gen_links $DIR $FILES + +DIR=../library +FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc " +FILES+="IPA_Types.ttcn IPA_Emulation.ttcnpp IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc " +FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn " +FILES+="SCCP_Templates.ttcn " +FILES+="M3UA_Templates.ttcn M3UA_CodecPort.ttcn M3UA_CodecPort_CtrlFunct.ttcn M3UA_CodecPort_CtrlFunctDef.cc " +gen_links $DIR $FILES + +ignore_pp_results diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg new file mode 100644 index 0000000..d5eccba --- /dev/null +++ b/stp/osmo-stp.cfg @@ -0,0 +1,63 @@ +! +! OsmoSTP (1.1.0.2-3884) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category-hex 1 + logging print category 1 + logging timestamp 0 + logging print file 1 + 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 notice + logging level lstats notice + logging level lgsup notice + logging level loap notice + logging level lss7 debug + logging level lsccp debug + logging level lsua debug + logging level lm3ua debug + logging level lmgcp notice + logging level ljibuf notice + logging level lrspro notice +! +stats interval 5 +! +line vty + no login +! +cs7 instance 0 + point-code format 24 + asp asp-sender 9999 2905 m3ua + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + asp asp-receiver0 10000 2905 m3ua + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + asp asp-receiver1 10001 2905 m3ua + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + as as-sender m3ua + asp asp-sender + routing-key 1023 23 + as as-receiver m3ua + asp asp-receiver0 + routing-key 1042 42 + as mahlzeit ipa + routing-key 0 5 + point-code override dpc 23 + route-table system + update route 23 16777215 linkset as-sender + update route 42 16777215 linkset as-receiver + listen m3ua 2905 + accept-asp-connections dynamic-permitted + listen ipa 5000 + accept-asp-connections dynamic-permitted diff --git a/stp/regen_makefile.sh b/stp/regen_makefile.sh new file mode 100755 index 0000000..be96829 --- /dev/null +++ b/stp/regen_makefile.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +FILES="*.ttcn *.ttcnpp SCCP_EncDec.cc SCTPasp_PT.cc TCCConversion.cc TCCInterface.cc IPL4asp_PT.cc IPL4asp_discovery.cc IPA_CodecPort_CtrlFunctDef.cc TELNETasp_PT.cc Native_FunctionDefs.cc TCCEncoding.cc M3UA_CodecPort_CtrlFunctDef.cc " + +export CPPFLAGS_TTCN3="-DIPA_EMULATION_CTRL -DIPA_EMULATION_SCCP -DUSE_MTP3_DISTRIBUTOR" + +../regen-makefile.sh STP_Tests.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15822 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I628a87385cac0dfe708a0d74a5088fbd5a4790cd Gerrit-Change-Number: 15822 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:10:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 12:10:01 +0000 Subject: Change in osmo-ttcn3-hacks[master]: STP_Tests_M3UA.TC_tmt_{loadshare, override}: Fix double-ASPUP In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15982 ) Change subject: STP_Tests_M3UA.TC_tmt_{loadshare,override}: Fix double-ASPUP ...................................................................... STP_Tests_M3UA.TC_tmt_{loadshare,override}: Fix double-ASPUP Change-Id: I3acf1ce18d1a232c9ce457a19a6d36be380c42dd --- M stp/STP_Tests_M3UA.ttcn 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn index 29e85f9..1ad2279 100644 --- a/stp/STP_Tests_M3UA.ttcn +++ b/stp/STP_Tests_M3UA.ttcn @@ -259,7 +259,6 @@ f_M3UA_asp_up_act(0, omit, rctx_sender); /* activate the first 'receiver' side ASP */ - f_M3UA_asp_up(1); f_M3UA_asp_up_act(1, c_M3UA_TMT_loadshare, omit); // TODO: rctx /* verify traffic is routed from sender to [sole] receiver */ @@ -311,7 +310,6 @@ f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx /* activate the first 'receiver' side ASP */ - f_M3UA_asp_up(1); f_M3UA_asp_up_act(1, c_M3UA_TMT_broadcast, omit); // TODO: rctx /* verify traffic is routed from sender to [sole] receiver */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3acf1ce18d1a232c9ce457a19a6d36be380c42dd Gerrit-Change-Number: 15982 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:10:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 12:10:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: STP_Tests_M3UA.TC_tmt_loadshare: Clarify log message in failure case In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15983 ) Change subject: STP_Tests_M3UA.TC_tmt_loadshare: Clarify log message in failure case ...................................................................... STP_Tests_M3UA.TC_tmt_loadshare: Clarify log message in failure case Change-Id: I28a86f0ea0f8df28d8d22732a8647a07a936c100 --- M stp/STP_Tests_M3UA.ttcn 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn index 1ad2279..3415e52 100644 --- a/stp/STP_Tests_M3UA.ttcn +++ b/stp/STP_Tests_M3UA.ttcn @@ -287,8 +287,8 @@ /* FIXME: check for extraneous messages? */ for (i := 1; i <= 2; i := i+1) { if (num_rx[i] != iter_per_asp) { - setverdict(fail, "Received only ", num_rx[i], " out of expected ", iter_per_asp, - "M3UA DATA messages"); + setverdict(fail, "Received ", num_rx[i], " out of expected ", iter_per_asp, + "M3UA DATA messages at M3UA port ", i); } } setverdict(pass); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I28a86f0ea0f8df28d8d22732a8647a07a936c100 Gerrit-Change-Number: 15983 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:11:38 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 12:11:38 +0000 Subject: Change in docker-playground[master]: ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/16046 ) Change subject: ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp ...................................................................... ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp Once osmo-ttcn3-hacks.git branch laforge/stp has been merged (where STP_Tests devel was done), we can use master like we do for other suites. Change-Id: I844ecf8a636ead55b7b406cb97424a4a35a6b674 --- M ttcn3-stp-test/Makefile 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/46/16046/1 diff --git a/ttcn3-stp-test/Makefile b/ttcn3-stp-test/Makefile index 4bf2fff..cbcd544 100644 --- a/ttcn3-stp-test/Makefile +++ b/ttcn3-stp-test/Makefile @@ -1,4 +1,3 @@ RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.2.202 -v ggsn-test-vol:/data -OSMO_TTCN3_BRANCH?="laforge/stp" include ../make/Makefile -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I844ecf8a636ead55b7b406cb97424a4a35a6b674 Gerrit-Change-Number: 16046 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:13:30 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 12:13:30 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: general handling of NOPE / IDLE indications In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15989 ) Change subject: osmo-bts-trx: general handling of NOPE / IDLE indications ...................................................................... Patch Set 1: > Patch Set 1: > > This looks interesting. I have done some experiments with this, however, I do not see any NOPE / IDLE indication arrive at trx_data_read_cb(). Is this even implemented in osmo-trx? It should, but make sure you use a recent osmo-trx and TRXDv1 configured in osmo-bts. TRXDv1 should be used by default with a recent osmo-bts-trx, unless you have this line in your config file: osmotrx trxd-max-version 0 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Gerrit-Change-Number: 15989 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: dexter Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 12:13:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:23:13 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 12 Nov 2019 12:23:13 +0000 Subject: Change in pysim[master]: Fairwaves-SIM: Add test data References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/16047 ) Change subject: Fairwaves-SIM: Add test data ...................................................................... Fairwaves-SIM: Add test data Add test-data in order to be able to run our hardware read/write tests on Fairwaves-SIM as well. Change-Id: I04713e8cb1098521eafa4594100fcc7226978e21 --- A pysim-testdata/Fairwaves-SIM.data A pysim-testdata/Fairwaves-SIM.ok 2 files changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/47/16047/1 diff --git a/pysim-testdata/Fairwaves-SIM.data b/pysim-testdata/Fairwaves-SIM.data new file mode 100644 index 0000000..b8c6d75 --- /dev/null +++ b/pysim-testdata/Fairwaves-SIM.data @@ -0,0 +1,5 @@ +MCC=001 +MNC=01 +IMSI=001010000000111 +ADM_HEX=CAE743DB9C5B5A58 + diff --git a/pysim-testdata/Fairwaves-SIM.ok b/pysim-testdata/Fairwaves-SIM.ok new file mode 100644 index 0000000..6150469 --- /dev/null +++ b/pysim-testdata/Fairwaves-SIM.ok @@ -0,0 +1,41 @@ +Using PC/SC reader (dev=0) interface +Reading ... +ICCID: 8988219000000117833 +IMSI: 001010000000111 +SMSP: e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000ffffffffffffffffffffffffffff +PLMNsel: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + +OPLMNwAcT: + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + +HPLMNAcT: + fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + +ACC: 0008 +MSISDN: Not available +AD: 00000002 +Done ! + -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I04713e8cb1098521eafa4594100fcc7226978e21 Gerrit-Change-Number: 16047 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:36:28 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 12 Nov 2019 12:36:28 +0000 Subject: Change in pysim[master]: Fairwaves-SIM: Add test data In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/16047 to look at the new patch set (#2). Change subject: Fairwaves-SIM: Add test data ...................................................................... Fairwaves-SIM: Add test data Add test-data in order to be able to run our hardware read/write tests on Fairwaves-SIM as well. Change-Id: I04713e8cb1098521eafa4594100fcc7226978e21 --- A pysim-testdata/Fairwaves-SIM.data A pysim-testdata/Fairwaves-SIM.ok 2 files changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/47/16047/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I04713e8cb1098521eafa4594100fcc7226978e21 Gerrit-Change-Number: 16047 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:38:51 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 12 Nov 2019 12:38:51 +0000 Subject: Change in pysim[master]: Fairwaves-SIM: Add test data In-Reply-To: References: Message-ID: dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16047 ) Change subject: Fairwaves-SIM: Add test data ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I04713e8cb1098521eafa4594100fcc7226978e21 Gerrit-Change-Number: 16047 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Comment-Date: Tue, 12 Nov 2019 12:38:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:39:01 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 12 Nov 2019 12:39:01 +0000 Subject: Change in pysim[master]: Fairwaves-SIM: Add test data In-Reply-To: References: Message-ID: dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16047 ) Change subject: Fairwaves-SIM: Add test data ...................................................................... Fairwaves-SIM: Add test data Add test-data in order to be able to run our hardware read/write tests on Fairwaves-SIM as well. Change-Id: I04713e8cb1098521eafa4594100fcc7226978e21 --- A pysim-testdata/Fairwaves-SIM.data A pysim-testdata/Fairwaves-SIM.ok 2 files changed, 46 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/pysim-testdata/Fairwaves-SIM.data b/pysim-testdata/Fairwaves-SIM.data new file mode 100644 index 0000000..b8c6d75 --- /dev/null +++ b/pysim-testdata/Fairwaves-SIM.data @@ -0,0 +1,5 @@ +MCC=001 +MNC=01 +IMSI=001010000000111 +ADM_HEX=CAE743DB9C5B5A58 + diff --git a/pysim-testdata/Fairwaves-SIM.ok b/pysim-testdata/Fairwaves-SIM.ok new file mode 100644 index 0000000..7f60765 --- /dev/null +++ b/pysim-testdata/Fairwaves-SIM.ok @@ -0,0 +1,41 @@ +Using PC/SC reader (dev=4) interface +Reading ... +ICCID: 8988219000000117833 +IMSI: 001010000000111 +SMSP: e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000ffffffffffffffffffffffffffff +PLMNsel: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + +OPLMNwAcT: + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + +HPLMNAcT: + fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + +ACC: 0008 +MSISDN: Not available +AD: 00000002 +Done ! + -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I04713e8cb1098521eafa4594100fcc7226978e21 Gerrit-Change-Number: 16047 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:42:26 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 12:42:26 +0000 Subject: Change in osmo-hlr[master]: tests/db_upgrade: disable for old sqlite versions References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16048 ) Change subject: tests/db_upgrade: disable for old sqlite versions ...................................................................... tests/db_upgrade: disable for old sqlite versions Skip the test if the installed sqlite version is older than 3.16.2 (current version of debian 9). This prevents test failures caused by the way we dump tables in the test, which does not work with older versions. This patch is a middle ground between reverting the db upgrade patch, and spending lots of time to replace the table dumping code with something that works with old sqlite versions to fix current build failures in OBS. Usually version checking is done in configure.ac, however I could not find a good way to pass the result to testsuite.at. So I decided to use pkg-config to do the test there. Fixes: 5b65461d686327ead0cb2a6d8493dfa9173d376c ("add db_upgrade test") Related: https://lists.osmocom.org/pipermail/openbsc/2019-November/013063.html Change-Id: I348c133003a95badbd6807d1519aa669115872fb --- M tests/testsuite.at 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/48/16048/1 diff --git a/tests/testsuite.at b/tests/testsuite.at index a8efe42..bd758c9 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -37,7 +37,10 @@ AT_CHECK([$abs_top_builddir/tests/db/db_test], [], [expout], [experr]) AT_CLEANUP +# AT_SKIP_IF: disable for old sqlite versions, because the way we dump tables in the test doesn't work with it. +# https://lists.osmocom.org/pipermail/openbsc/2019-November/013063.html AT_SETUP([db_upgrade]) +AT_SKIP_IF([ ! pkg-config sqlite3 --exists --atleast-version=3.16.2 ]) AT_KEYWORDS([db_upgrade]) cat $abs_srcdir/db_upgrade/db_upgrade_test.ok > expout cat $abs_srcdir/db_upgrade/db_upgrade_test.err > experr -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16048 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I348c133003a95badbd6807d1519aa669115872fb Gerrit-Change-Number: 16048 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:46:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 12:46:59 +0000 Subject: Change in osmo-hlr[master]: tests/db_upgrade: disable for old sqlite versions In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16048 ) Change subject: tests/db_upgrade: disable for old sqlite versions ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16048 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I348c133003a95badbd6807d1519aa669115872fb Gerrit-Change-Number: 16048 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 12:46:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:48:26 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 12:48:26 +0000 Subject: Change in osmo-hlr[master]: hlr db schema 3: hlr_number -> msc_number In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15914 ) Change subject: hlr db schema 3: hlr_number -> msc_number ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15914 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I527e8627b24b79f3e9eec32675c7f5a3a6d25440 Gerrit-Change-Number: 15914 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 12:48:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:49:48 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 12 Nov 2019 12:49:48 +0000 Subject: Change in pysim[master]: TEST References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/16049 ) Change subject: TEST ...................................................................... TEST Change-Id: I90e699bcd06e2102fdba33be6774228a9a777a5e --- A testme 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/16049/1 diff --git a/testme b/testme new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/testme -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I90e699bcd06e2102fdba33be6774228a9a777a5e Gerrit-Change-Number: 16049 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:51:24 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 12 Nov 2019 12:51:24 +0000 Subject: Change in pysim[master]: TEST In-Reply-To: References: Message-ID: dexter has abandoned this change. ( https://gerrit.osmocom.org/c/pysim/+/16049 ) Change subject: TEST ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I90e699bcd06e2102fdba33be6774228a9a777a5e Gerrit-Change-Number: 16049 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:52:15 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 12:52:15 +0000 Subject: Change in osmo-bts[master]: rsl: Assign recv pwr to lchan's max ms power In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15970 ) Change subject: rsl: Assign recv pwr to lchan's max ms power ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/15970/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/15970/1//COMMIT_MSG at 19 PS1, Line 19: """ (I find this hard to read :p - maybe remove the extra spaces and fix "theMS" -> "the MS") -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 Gerrit-Change-Number: 15970 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 12:52:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 12:55:06 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 12 Nov 2019 12:55:06 +0000 Subject: Change in osmo-hlr[master]: tests/db_upgrade: disable for old sqlite versions In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16048 ) Change subject: tests/db_upgrade: disable for old sqlite versions ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16048 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I348c133003a95badbd6807d1519aa669115872fb Gerrit-Change-Number: 16048 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 12:55:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 13:00:16 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 13:00:16 +0000 Subject: Change in osmo-hlr[master]: tests/db_upgrade: disable for old sqlite versions In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16048 ) Change subject: tests/db_upgrade: disable for old sqlite versions ...................................................................... Patch Set 1: Code-Review+2 1+1=2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16048 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I348c133003a95badbd6807d1519aa669115872fb Gerrit-Change-Number: 16048 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 13:00:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 13:00:19 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 13:00:19 +0000 Subject: Change in osmo-hlr[master]: tests/db_upgrade: disable for old sqlite versions In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16048 ) Change subject: tests/db_upgrade: disable for old sqlite versions ...................................................................... tests/db_upgrade: disable for old sqlite versions Skip the test if the installed sqlite version is older than 3.16.2 (current version of debian 9). This prevents test failures caused by the way we dump tables in the test, which does not work with older versions. This patch is a middle ground between reverting the db upgrade patch, and spending lots of time to replace the table dumping code with something that works with old sqlite versions to fix current build failures in OBS. Usually version checking is done in configure.ac, however I could not find a good way to pass the result to testsuite.at. So I decided to use pkg-config to do the test there. Fixes: 5b65461d686327ead0cb2a6d8493dfa9173d376c ("add db_upgrade test") Related: https://lists.osmocom.org/pipermail/openbsc/2019-November/013063.html Change-Id: I348c133003a95badbd6807d1519aa669115872fb --- M tests/testsuite.at 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/tests/testsuite.at b/tests/testsuite.at index a8efe42..bd758c9 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -37,7 +37,10 @@ AT_CHECK([$abs_top_builddir/tests/db/db_test], [], [expout], [experr]) AT_CLEANUP +# AT_SKIP_IF: disable for old sqlite versions, because the way we dump tables in the test doesn't work with it. +# https://lists.osmocom.org/pipermail/openbsc/2019-November/013063.html AT_SETUP([db_upgrade]) +AT_SKIP_IF([ ! pkg-config sqlite3 --exists --atleast-version=3.16.2 ]) AT_KEYWORDS([db_upgrade]) cat $abs_srcdir/db_upgrade/db_upgrade_test.ok > expout cat $abs_srcdir/db_upgrade/db_upgrade_test.err > experr -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16048 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I348c133003a95badbd6807d1519aa669115872fb Gerrit-Change-Number: 16048 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 13:30:04 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 13:30:04 +0000 Subject: Change in osmo-bts[master]: rsl: Assign recv pwr to lchan's max ms power In-Reply-To: References: Message-ID: Hello dexter, fixeria, laforge, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/15970 to look at the new patch set (#2). Change subject: rsl: Assign recv pwr to lchan's max ms power ...................................................................... rsl: Assign recv pwr to lchan's max ms power Otherwise older ms_power value will be kept and used as a maximum. >From TS 08.58 sec 4.8 "MS power control": """ If power control is supported by BTS and it is to be used, this is indicated by optional parameters in the MS POWER CONTROL message (or the CHANNEL ACTIVATION message). Based on the measurements performed on the uplink, TRX then attempts to keep the power control parameters within the limits set by the MS POWER CONTROL message (or by the CHANNEL ACTIVATION message). """ Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 --- M src/common/rsl.c 1 file changed, 22 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/15970/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 Gerrit-Change-Number: 15970 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:12:50 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:12:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: M3UA_Templates: Fix tr_M3UA_ASPUP() length value copy+paste error In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15984 ) Change subject: M3UA_Templates: Fix tr_M3UA_ASPUP() length value copy+paste error ...................................................................... M3UA_Templates: Fix tr_M3UA_ASPUP() length value copy+paste error Change-Id: I7ef53b93fcdfe1ce7914bd4edb1fed8a8351b1b4 --- M library/M3UA_Templates.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/library/M3UA_Templates.ttcn b/library/M3UA_Templates.ttcn index 02b493c..1063b50 100644 --- a/library/M3UA_Templates.ttcn +++ b/library/M3UA_Templates.ttcn @@ -81,7 +81,7 @@ version := c_M3UA_VERSION, reserved := '00'O, messageClassAndType := '0301'O, - messageLength := 0, // overwritten + messageLength := ?, // overwritten messageParameters := { aSP_Identifier := tr_M3UA_asp_id(aspid), info_String := * -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15984 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7ef53b93fcdfe1ce7914bd4edb1fed8a8351b1b4 Gerrit-Change-Number: 15984 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:12:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:12:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Add tests for running STP in M3UA ASP role In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15985 ) Change subject: stp: Add tests for running STP in M3UA ASP role ...................................................................... stp: Add tests for running STP in M3UA ASP role Change-Id: Ifec443858256ad79fbe29e26c609322809dd07b1 Related: OS#2005 --- M stp/STP_Tests_M3UA.ttcn M stp/osmo-stp.cfg 2 files changed, 149 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn index 3415e52..5c15c6f 100644 --- a/stp/STP_Tests_M3UA.ttcn +++ b/stp/STP_Tests_M3UA.ttcn @@ -36,14 +36,20 @@ modulepar { integer mp_stp_m3ua_port := 2905; + integer mp_stp_m3ua_clnt_port := 2906; integer mp_local_m3ua_port := 9999; } -private const integer NR_M3UA := 3; +private const integer NR_M3UA := 3; /* number of M3UA clients in ATS */ +private const integer NR_M3UA_SRV := 1; /* number of M3UA servres in ATS */ + +private function M3UA_SRV(integer idx) return integer { + return NR_M3UA+idx; +} type component RAW_M3UA_CT extends Test_CT { - port M3UA_CODEC_PT M3UA[NR_M3UA]; - var integer g_m3ua_conn_id[NR_M3UA]; + port M3UA_CODEC_PT M3UA[NR_M3UA+NR_M3UA_SRV]; + var integer g_m3ua_conn_id[NR_M3UA+NR_M3UA_SRV]; } private template PortEvent tr_SctpAssocChange := { @@ -56,6 +62,10 @@ sctpPeerAddrChange := ? } } +private template PortEvent tr_SctpConnOpened := { + connOpened := ? +} + private altstep as_m3ua_sctp() runs on RAW_M3UA_CT { [] any from M3UA.receive(tr_SctpAssocChange) { repeat; } @@ -93,6 +103,16 @@ g_m3ua_conn_id[i] := res.connId; } +friend function f_M3UA_listen(integer i) runs on RAW_M3UA_CT { + var Result res; + res := M3UA_CodecPort_CtrlFunct.f_IPL4_listen(M3UA[i], mp_local_ip, mp_local_m3ua_port+i, + {sctp:=valueof(ts_SCTP)}); + if (not ispresent(res.connId)) { + setverdict(fail, "Could not bind M3UA socket, check your configuration"); + mtc.stop; + } +} + friend function f_init_m3ua() runs on RAW_M3UA_CT { var integer i; @@ -106,6 +126,26 @@ } } +friend function f_init_m3ua_srv() runs on RAW_M3UA_CT { + var integer i; + var PortEvent sctp_evt; + + for (i := NR_M3UA; i < NR_M3UA+NR_M3UA_SRV; i:=i+1) { + map(self:M3UA[i], system:M3UA_CODEC_PT); + /* bind+ listen */ + f_M3UA_listen(i); + /* wait for accept() */ + M3UA[i].receive(tr_SctpConnOpened) -> value sctp_evt { + g_m3ua_conn_id[i] := sctp_evt.connOpened.connId; + } + } +} + + +/*********************************************************************** + * Test the STP in M3UA SG role (we are ASP) + ***********************************************************************/ + /* perform an outbound ASP-UP procedure */ friend function f_M3UA_asp_up(integer idx, template (omit) OCT4 aspid := omit) runs on RAW_M3UA_CT { f_M3UA_send(idx, ts_M3UA_ASPUP(aspid)); @@ -417,6 +457,97 @@ /* FIXME: we now may have changed the state on the STP side! */ } +/*********************************************************************** + * Test the STP in M3UA ASP role (we are SG) + ***********************************************************************/ + +/* expect/perform an inbound ASP-UP procedure */ +friend function f_M3UA_CLNT_asp_up(integer idx, template OCT4 aspid := omit) runs on RAW_M3UA_CT { + f_M3UA_exp(idx, tr_M3UA_ASPUP(aspid)); + f_M3UA_send(idx, ts_M3UA_ASPUP_ACK); +} + +/* expect/perform an inbound ASP-ACTIVATE procedure */ +friend function f_M3UA_CLNT_asp_act(integer idx, template M3UA_Traffic_Mode_Type tmt := omit, + template (omit) OCT4 rctx := omit) runs on RAW_M3UA_CT { + f_M3UA_exp(idx, tr_M3UA_ASPAC(tmt, rctx)); + f_M3UA_send(idx, ts_M3UA_ASPAC_ACK(tmt, rctx)); +} + +/* expect/perform inbound ASP-UP and ASP-ACT, optionally send interemittent NOTIFY */ +friend function f_M3UA_CLNT_asp_up_act(integer idx, template M3UA_Traffic_Mode_Type tmt := omit, + template OCT4 rctx := omit, + template (omit) OCT2 ntfy_after_up := c_M3UA_ST_I_AS_INACTIVE, + template (omit) OCT2 ntfy_after_act := c_M3UA_ST_I_AS_ACTIVE) +runs on RAW_M3UA_CT { + f_M3UA_CLNT_asp_up(idx, omit); + if (not istemplatekind(ntfy_after_up, "omit")) { + f_M3UA_send(idx, ts_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, ntfy_after_up, rctx)); + } + f_M3UA_CLNT_asp_act(idx, tmt, rctx); + if (not istemplatekind(ntfy_after_act, "omit")) { + f_M3UA_send(idx, ts_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, ntfy_after_act, rctx)); + } +} + + +/* Expect inbound connection from ASP/SCTP-client, followed by ASP-UP */ +testcase TC_clnt_connect_asp_up() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_init_m3ua_srv(); + + f_M3UA_CLNT_asp_up(M3UA_SRV(0)); +} + +/* Expect inbound connection from ASP/SCTP-client, followed by ASP-UP + ASP-ACT */ +testcase TC_clnt_asp_act() runs on RAW_M3UA_CT { + f_init_m3ua(); + f_init_m3ua_srv(); + + f_M3UA_CLNT_asp_up_act(M3UA_SRV(0)); +} + +/* Test traffic being routed through "server" side STP (M3UA SG), coming back in "client" + * side STP (M3UA ASP) */ +testcase TC_clnt_sg_to_asp() runs on RAW_M3UA_CT { + var OCT4 rctx_sender := int2oct(1023, 4); + var OCT4 pc_sender := int2oct(23, 4); + var OCT4 rctx_receiver := int2oct(1055, 4); + var OCT4 pc_receiver := int2oct(55, 4); + + f_init_m3ua(); + f_M3UA_asp_up_act(0); + + f_init_m3ua_srv(); + f_M3UA_CLNT_asp_up_act(M3UA_SRV(0)); + + f_sleep(1.0); + + /* verify traffic is routed from sender to [sole] receiver */ + f_test_traffic(0, rctx_sender, pc_sender, M3UA_SRV(0), rctx_receiver, pc_receiver); +} + +/* Test traffic being routed through "client" side STP (M3UA ASP), coming back in "server" + * side STP (M3UA SG) */ +testcase TC_clnt_asp_to_sg() runs on RAW_M3UA_CT { + var OCT4 rctx_sender := int2oct(1055, 4); + var OCT4 pc_sender := int2oct(55, 4); + var OCT4 rctx_receiver := int2oct(1023, 4); + var OCT4 pc_receiver := int2oct(23, 4); + + f_init_m3ua(); + f_M3UA_asp_up_act(0); + + f_init_m3ua_srv(); + f_M3UA_CLNT_asp_up_act(M3UA_SRV(0)); + + f_sleep(1.0); + + /* verify traffic is routed from sender to [sole] receiver */ + f_test_traffic(M3UA_SRV(0), rctx_sender, pc_sender, 0, rctx_receiver, pc_receiver); +} + + control { /* M3UA Tests */ @@ -442,6 +573,12 @@ /* TODO: test RKM with unsupported routing keys: NA, SI, OPC */ /* TODO: register/unregister multiple routing contexts in one message; including mixed success/failure situations */ + + /* Test STP as SCTP client + M3UA ASP role */ + execute( TC_clnt_connect_asp_up() ); + execute( TC_clnt_asp_act() ); + execute( TC_clnt_sg_to_asp() ); + execute( TC_clnt_asp_to_sg() ); } diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg index d5eccba..d8630d2 100644 --- a/stp/osmo-stp.cfg +++ b/stp/osmo-stp.cfg @@ -45,6 +45,11 @@ asp asp-receiver1 10001 2905 m3ua local-ip 127.0.0.1 remote-ip 127.0.0.1 + asp asp-client0 10002 2906 m3ua + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + sctp-role client + role asp as as-sender m3ua asp asp-sender routing-key 1023 23 @@ -54,9 +59,13 @@ as mahlzeit ipa routing-key 0 5 point-code override dpc 23 + as as-client m3ua + routing-key 1055 55 + asp asp-client0 route-table system update route 23 16777215 linkset as-sender update route 42 16777215 linkset as-receiver + update route 55 16777215 linkset as-client listen m3ua 2905 accept-asp-connections dynamic-permitted listen ipa 5000 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15985 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ifec443858256ad79fbe29e26c609322809dd07b1 Gerrit-Change-Number: 15985 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:14:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:14:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Make sure all AS are shutdown when test finishes In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16040 ) Change subject: stp: Make sure all AS are shutdown when test finishes ...................................................................... Patch Set 1: Code-Review+1 we could add a [hidden] vty command for this to avoid extending test duration by 2s for each test. But that can always be done as a later optimization. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I177441b2d43298b3836ccf78fe11267333e80665 Gerrit-Change-Number: 16040 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 14:14:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:15:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:15:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: osmo-stp.cfg: Fix missing ASP relation in AS In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16041 ) Change subject: stp: osmo-stp.cfg: Fix missing ASP relation in AS ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16041 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idcfbff548076abc17f0f6c9b13a820c8ef3033e1 Gerrit-Change-Number: 16041 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 14:15:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:16:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:16:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 ) Change subject: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare ...................................................................... Patch Set 1: Code-Review+1 you removed "mahlzeit". outrageous! -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iae213c58598cc0207503fd10f09d2d57aab941fe Gerrit-Change-Number: 16042 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 14:16:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:16:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:16:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Introduce TC_tmt_override In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16043 ) Change subject: stp: Introduce TC_tmt_override ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id99ec3eaa431512114817d2a2af77013762ab2b9 Gerrit-Change-Number: 16043 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 14:16:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:16:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:16:40 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Move logic to create unknwon dynamic ASP to f_connect_ipa() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16044 ) Change subject: stp: Move logic to create unknwon dynamic ASP to f_connect_ipa() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16044 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic65ff2ff9dc3cc82ae3fefcf3caf406279cd6b97 Gerrit-Change-Number: 16044 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 14:16:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:16:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:16:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Introduce traffic mode type tests with unknwon dynamic ASPs In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16045 ) Change subject: stp: Introduce traffic mode type tests with unknwon dynamic ASPs ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16045 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib142b021bb6d268831479723ad629be9ed378f81 Gerrit-Change-Number: 16045 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 14:16:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:18:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:18:03 +0000 Subject: Change in osmo-bts[master]: rsl: Assign recv pwr to lchan's max ms power In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15970 ) Change subject: rsl: Assign recv pwr to lchan's max ms power ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 Gerrit-Change-Number: 15970 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 14:18:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:18:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:18:07 +0000 Subject: Change in osmo-bts[master]: rsl: Assign recv pwr to lchan's max ms power In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15970 ) Change subject: rsl: Assign recv pwr to lchan's max ms power ...................................................................... rsl: Assign recv pwr to lchan's max ms power Otherwise older ms_power value will be kept and used as a maximum. >From TS 08.58 sec 4.8 "MS power control": """ If power control is supported by BTS and it is to be used, this is indicated by optional parameters in the MS POWER CONTROL message (or the CHANNEL ACTIVATION message). Based on the measurements performed on the uplink, TRX then attempts to keep the power control parameters within the limits set by the MS POWER CONTROL message (or by the CHANNEL ACTIVATION message). """ Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 --- M src/common/rsl.c 1 file changed, 22 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/common/rsl.c b/src/common/rsl.c index de51e6f..e460693 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -1623,8 +1624,10 @@ { struct abis_rsl_dchan_hdr *dch = msgb_l2(msg); struct gsm_lchan *lchan = msg->lchan; + struct gsm_bts *bts = lchan->ts->trx->bts; struct tlv_parsed tp; uint8_t pwr; + int max_pwr, curr_pwr; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); @@ -1633,9 +1636,9 @@ return rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &dch->chan_nr, NULL, msg); pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; - lchan->ms_power_ctrl.current = pwr; + lchan->ms_power = pwr; - LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Rx MS POWER CONTROL %d\n", lchan->ms_power_ctrl.current); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx MS POWER CONTROL %d\n", lchan->ms_power_ctrl.current); /* 9.3.31 MS Power Parameters (O) */ if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) @@ -1647,6 +1650,23 @@ lchan->ms_power_ctrl.fixed = 1; } + /* Only set current to lchan->ms_power if actual value of current + in dBm > value in dBm from lchan->ms_power, or if fixed=1. */ + if (lchan->ms_power_ctrl.fixed) { + lchan->ms_power_ctrl.current = lchan->ms_power; + } else { + max_pwr = ms_pwr_dbm(bts->band, lchan->ms_power); + curr_pwr = ms_pwr_dbm(bts->band, lchan->ms_power_ctrl.current); + if (max_pwr < 0 || curr_pwr < 0) { + LOGPLCHAN(lchan, DRSL, LOGL_ERROR, + "Unable to calculate power levels to dBm: %" PRIu8 " -> %d, %" PRIu8 " -> %d\n", + lchan->ms_power, max_pwr, + lchan->ms_power_ctrl.current, curr_pwr); + } else if (curr_pwr > max_pwr) { + lchan->ms_power_ctrl.current = lchan->ms_power; + } + } + bts_model_adjst_ms_pwr(lchan); return 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15970 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0583eef477c33279ee5bfcda80141f365413a276 Gerrit-Change-Number: 15970 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:18:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:18:08 +0000 Subject: Change in osmo-bts[master]: bts-trx: Implement MS Power control loop calculations using dBm inste... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15971 ) Change subject: bts-trx: Implement MS Power control loop calculations using dBm instead of ctl levels ...................................................................... bts-trx: Implement MS Power control loop calculations using dBm instead of ctl levels Some bands, such as DCS1800, contain power levels such as 29, 30 and 31 not following same unified sequence other power levels follow regarding conversion to dBm values. This makes extremly complex and prone to error comparing different power levels. Let's instead use dBm values to calculate and crop desired new value, and then convert it back to TS 05.05 ms power control level value. With this commit the control loop should be able to manage correctly the MS power levels explained above. Related: OS#4244 Change-Id: I0160637c5ffa606ee3081ad30be8e6f2a42b725b --- M src/osmo-bts-trx/loops.c M src/osmo-bts-trx/loops.h 2 files changed, 58 insertions(+), 31 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index 4e77bca..b2b163a 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -23,11 +23,13 @@ #include #include #include +#include #include #include #include #include +#include #include "trx_if.h" #include "l1_if.h" @@ -39,45 +41,70 @@ /*! compute the new MS POWER LEVEL communicated to the MS and store it in lchan. * \param lchan logical channel for which to compute (and in which to store) new power value. - * \param[in] diff input delta value (in dB) */ + * \param[in] diff input delta value (in dB). How many dBs measured power + * should be increased (+) or decreased (-) to reach expected power. + */ static void ms_power_diff(struct gsm_lchan *lchan, int8_t diff) { struct gsm_bts_trx *trx = lchan->ts->trx; enum gsm_band band = trx->bts->band; - uint16_t arfcn = trx->arfcn; int8_t new_power; /* TS 05.05 power level */ + int8_t new_dbm, current_dbm, bsc_max_dbm, pwclass_max_dbm; - /* compute new target MS output power level based on current value subtracted by 'diff/2' */ - new_power = lchan->ms_power_ctrl.current - (diff >> 1); - - if (diff == 0) + /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */ + if (diff < 2 && diff > -2) return; - /* ms transmit power level cannot become negative */ - if (new_power < 0) - new_power = 0; - - /* Don't ask for smaller ms power level than the one set by BSC upon RSL CHAN ACT */ - if (new_power < lchan->ms_power) - new_power = lchan->ms_power; - - /* saturate at the maximum possible power level for the given band */ - // FIXME: to go above 1W, we need to know classmark of MS - if (arfcn >= 512 && arfcn <= 885) { - if (new_power > 15) - new_power = 15; - } else { - if (new_power > 19) - new_power = 19; + current_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.current); + if (current_dbm < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", + lchan->ms_power_ctrl.current, gsm_band_name(band)); + return; + } + bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power); + if (bsc_max_dbm < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", + lchan->ms_power, gsm_band_name(band)); + return; } - /* don't ever change more than MS_{LOWER,RAISE}_MAX during one loop iteration, i.e. + /* don't ever change more than MS_{LOWER,RAISE}_MAX_DBM during one loop iteration, i.e. * reduce the speed at which the MS transmit power can change */ /* a higher value means a lower level (and vice versa) */ - if (new_power > lchan->ms_power_ctrl.current + MS_LOWER_MAX) - new_power = lchan->ms_power_ctrl.current + MS_LOWER_MAX; - else if (new_power < lchan->ms_power_ctrl.current - MS_RAISE_MAX) - new_power = lchan->ms_power_ctrl.current - MS_RAISE_MAX; + if (diff > MS_RAISE_MAX_DB) + diff = MS_RAISE_MAX_DB; + else if (diff < -MS_LOWER_MAX_DB) + diff = -MS_LOWER_MAX_DB; + + new_dbm = current_dbm + diff; + + /* Make sure new_dbm is never negative. ms_pwr_ctl_lvl() can later on + cope with any unsigned dbm value, regardless of band minimal value. */ + if (new_dbm < 0) + new_dbm = 0; + + /* Don't ask for smaller ms power level than the one set by BSC upon RSL CHAN ACT */ + if (new_dbm > bsc_max_dbm) + new_dbm = bsc_max_dbm; + + /* Make sure in no case the dBm value is higher than the one of ms + power class 1 (the one with more output power) for the given band. + Ideally we should catch the MS specific power class and apply it + here, but for now let's assume the BSC sent us one taking the power + class into account. */ + pwclass_max_dbm = (int)ms_class_gmsk_dbm(band, 1); + if (pwclass_max_dbm >= 0 && new_dbm > pwclass_max_dbm) + new_dbm = pwclass_max_dbm; + + new_power = ms_pwr_ctl_lvl(band, new_dbm); + if (new_power < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to retrieve power level for %" PRId8 " dBm on band %d\n", + new_dbm, band); + return; + } if (lchan->ms_power_ctrl.current == new_power) { LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d (%d dBm)\n", @@ -138,8 +165,8 @@ /* if no burst was received from MS at clock */ if (chan_state->meas.rssi_count == 0) { - LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, "LOST SACCH frame, so we raise MS power\n"); - ms_power_diff(lchan, MS_RAISE_MAX); + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, "LOST SACCH frame, so we raise MS power output\n"); + ms_power_diff(lchan, MS_RAISE_MAX_DB); return; } diff --git a/src/osmo-bts-trx/loops.h b/src/osmo-bts-trx/loops.h index 0db01d7..7869903 100644 --- a/src/osmo-bts-trx/loops.h +++ b/src/osmo-bts-trx/loops.h @@ -8,8 +8,8 @@ */ /* how much power levels do we raise/lower as maximum (1 level = 2 dB) */ -#define MS_RAISE_MAX 4 -#define MS_LOWER_MAX 2 +#define MS_RAISE_MAX_DB 4 +#define MS_LOWER_MAX_DB 8 /* * loops api -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15971 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0160637c5ffa606ee3081ad30be8e6f2a42b725b Gerrit-Change-Number: 15971 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:18:36 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:18:36 +0000 Subject: Change in libosmo-sccp[master]: xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESP In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16005 ) Change subject: xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESP ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16005 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I99f5346a3854ca07979020245897334197f3cd3b Gerrit-Change-Number: 16005 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 14:18:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:18:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:18:40 +0000 Subject: Change in libosmo-sccp[master]: xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESP In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16005 ) Change subject: xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESP ...................................................................... xua: ipa_asp_fsm: Allow receiving IPA ID ACK before IPA ID RESP Since there's no official spec for IPA and some implementations seem to like sending the IPA ID ACK before the IPA ID RESP, let's catch it and feed it after we receive the IPA ID RESP and we are in correct state. Otherwise the connection would deadlock during the initial handshake. That's the case with our TTCN3 IPA implementation running STP_Tests suite. Change-Id: I99f5346a3854ca07979020245897334197f3cd3b --- M src/xua_asp_fsm.c 1 file changed, 16 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 0a84f28..e09c46c 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -768,6 +768,8 @@ struct ipaccess_unit *ipa_unit; /* Timer for tracking if no PONG is received in response to PING */ struct osmo_timer_list pong_timer; + /* Did we receive IPA ID ACK before IPA ID RESP ? */ + bool ipa_id_ack_rcvd; }; enum ipa_asp_fsm_t { @@ -857,8 +859,20 @@ if (fd >= 0) { ipaccess_send_id_ack(fd); osmo_fsm_inst_state_chg(fi, IPA_ASP_S_WAIT_ID_ACK2, 10, T_WAIT_ID_ACK); + /* If we received the ACK beforehand, submit it now */ + if (iafp->ipa_id_ack_rcvd) { + iafp->ipa_id_ack_rcvd = false; + osmo_fsm_inst_dispatch(fi, IPA_ASP_E_ID_ACK, NULL); + } } break; + case IPA_ASP_E_ID_ACK: + /* Since there's no official spec for IPA and some + implementations seem to like sending the IPA ID ACK before + the IPA ID RESP, let's catch it and feed it after we receive + the IPA ID RESP and we are in correct state */ + iafp->ipa_id_ack_rcvd = true; + break; } return; out_err: @@ -1058,7 +1072,8 @@ }, /* Server Side */ [IPA_ASP_S_WAIT_ID_RESP] = { - .in_event_mask = S(IPA_ASP_E_ID_RESP), + .in_event_mask = S(IPA_ASP_E_ID_RESP) | + S(IPA_ASP_E_ID_ACK), .out_state_mask = S(IPA_ASP_S_WAIT_ID_ACK2) | S(IPA_ASP_S_DOWN), .name = "WAIT_ID_RESP", -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16005 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I99f5346a3854ca07979020245897334197f3cd3b Gerrit-Change-Number: 16005 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:18:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:18:40 +0000 Subject: Change in libosmo-sccp[master]: ss7: Improve log formatting during ASP restart In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16012 ) Change subject: ss7: Improve log formatting during ASP restart ...................................................................... ss7: Improve log formatting during ASP restart Since it may act sometimes as a server and sometimes as a client, let's better use one more neutral (2-side arrow) connector, and mark which address is the local and which is the remote. We already use same formatting in other osmocom code. Change-Id: I42feaa16790f02b98bcda65281de8cd9295ddcb6 --- M src/osmo_ss7.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 7ff3efe..4d5c349 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1292,8 +1292,8 @@ OSMO_ASSERT(ss7_initialized); osmo_ss7_asp_peer_snprintf(bufloc, sizeof(bufloc), &asp->cfg.local); osmo_ss7_asp_peer_snprintf(bufrem, sizeof(bufrem), &asp->cfg.remote); - LOGPASP(asp, DLSS7, LOGL_INFO, "Restarting ASP %s, %s ==> %s\n", - asp->cfg.name, bufloc, bufrem); + LOGPASP(asp, DLSS7, LOGL_INFO, "Restarting ASP %s, r=%s<->l=%s\n", + asp->cfg.name, bufrem, bufloc); if (!asp->cfg.is_server) { /* We are in client mode now */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16012 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I42feaa16790f02b98bcda65281de8cd9295ddcb6 Gerrit-Change-Number: 16012 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:18:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:18:41 +0000 Subject: Change in libosmo-sccp[master]: ss7: Set correct local addr and port during dynamic ASP creation In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16013 ) Change subject: ss7: Set correct local addr and port during dynamic ASP creation ...................................................................... ss7: Set correct local addr and port during dynamic ASP creation Change-Id: I54aada351d5fb74f5015fdfe691d0b237354743c --- M src/osmo_ss7.c 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 4d5c349..0d49d1a 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1718,6 +1718,7 @@ struct osmo_xua_server *oxs = osmo_stream_srv_link_get_data(link); struct osmo_stream_srv *srv; struct osmo_ss7_asp *asp; + int i; char *sock_name = osmo_sock_get_name(link, fd); const char *proto_name = get_value_string(osmo_ss7_asp_protocol_vals, oxs->cfg.proto); @@ -1764,8 +1765,10 @@ sock_name, asp->cfg.name); asp->cfg.is_server = true; asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; - asp->cfg.local.host[0] = NULL; - asp->cfg.local.host_cnt = 1; + asp->cfg.local.port = oxs->cfg.local.port; + for (i = 0; i < oxs->cfg.local.host_cnt; i++) + asp->cfg.local.host[i] = talloc_strdup(asp, oxs->cfg.local.host[i]); + asp->cfg.local.host_cnt = oxs->cfg.local.host_cnt; asp->cfg.remote.port = atoi(portbuf); asp->cfg.remote.host[0] = talloc_strdup(asp, hostbuf); asp->cfg.remote.host_cnt = 1; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16013 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I54aada351d5fb74f5015fdfe691d0b237354743c Gerrit-Change-Number: 16013 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:26:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 14:26:13 +0000 Subject: Change in osmo-ccid-firmware[master]: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 ) Change subject: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist ...................................................................... Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a --- A sysmoOCTSIM/check_libccid_config.py 1 file changed, 60 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/50/16050/1 diff --git a/sysmoOCTSIM/check_libccid_config.py b/sysmoOCTSIM/check_libccid_config.py new file mode 100755 index 0000000..93cd202 --- /dev/null +++ b/sysmoOCTSIM/check_libccid_config.py @@ -0,0 +1,60 @@ +#!/usr/bin/python3 + +# This script checks your libccid configuration file if it contains a matching entry +# for the sysmoOCTSIM reader. If not, it will generate a modified config file + +import plistlib, sys + +INFILE="/etc/libccid_Info.plist" +OUTFILE="/tmp/libccid_Info.plist" + +VENDOR_ID=0x1d50 +PRODUCT_ID=0x6141 +NAME='sysmocom sysmoOCTSIM' + +def gen_reader_dictlist(prod_id, vend_id, names): + readers = [] + for i in range(0,len(prod_id)): + reader = {'vendor_id': vend_id[i], 'product_id': prod_id[i], 'name': names[i]} + readers.append(reader) + return readers + +def find_reader(readers, vend_id, prod_id): + for r in readers: + if int(r['vendor_id'], 16) == vend_id and int(r['product_id'], 16) == prod_id: + return r + return None + +def plist_add_reader(pl, vend_id, prod_id, name): + pl['ifdVendorID'].append(hex(vend_id)) + pl['ifdProductID'].append(hex(prod_id)) + pl['ifdFriendlyName'].append(name) + + +if len(sys.argv) > 1: + INFILE = sys.argv[1] +if len(sys.argv) > 2: + OUTFILE = sys.argv[2] + +# read the property list +print("Reading libccid config file at '%s'" % (INFILE)) +with open(INFILE, 'rb') as fp: + pl = plistlib.load(fp) + +# consistency check +if len(pl['ifdProductID']) != len(pl['ifdVendorID']) or len(pl['ifdProductID']) != len(pl['ifdFriendlyName']): + print("input file is corrupt", file=sys.stderr) + sys.exit(2) + +# convert into a better sorted form (one list of dicts; each dict one reader) +readers = gen_reader_dictlist(pl['ifdProductID'], pl['ifdVendorID'], pl['ifdFriendlyName']) + +if find_reader(readers, VENDOR_ID, PRODUCT_ID): + print("Matching reader already in libccid_Info.plist; no action required", file=sys.stderr) +else: + print("Reader not found in config file, it needs to be updated...") + plist_add_reader(pl, VENDOR_ID, PRODUCT_ID, NAME) + with open(OUTFILE, 'wb') as fp: + plistlib.dump(pl, fp) + print("Generated new config file stored as '%s'" % (OUTFILE)) + print("\tWARNING: The generated file doesn't preserve comments!") -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a Gerrit-Change-Number: 16050 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 14:33:42 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 14:33:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Make sure all AS are shutdown when test finishes In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16040 ) Change subject: stp: Make sure all AS are shutdown when test finishes ...................................................................... Patch Set 1: > Patch Set 1: Code-Review+1 > > we could add a [hidden] vty command for this to avoid extending test duration by 2s for each test. But that can always be done as a later optimization. Let's do that later once we have everything in place, tests are passing quite quickly in general anyway, and we don't yet have lots of them. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I177441b2d43298b3836ccf78fe11267333e80665 Gerrit-Change-Number: 16040 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 14:33:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 15:50:29 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 12 Nov 2019 15:50:29 +0000 Subject: Change in libosmo-abis[master]: ipa: Allow setting local addr and port for struct ipa_client_conn In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/16014 ) Change subject: ipa: Allow setting local addr and port for struct ipa_client_conn ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/16014 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I3133c6b01647506a5b9c67e4699bcad3ff59f843 Gerrit-Change-Number: 16014 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 15:50:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 15:56:29 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 15:56:29 +0000 Subject: Change in libosmo-abis[master]: ipa: Allow setting local addr and port for struct ipa_client_conn In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/16014 ) Change subject: ipa: Allow setting local addr and port for struct ipa_client_conn ...................................................................... ipa: Allow setting local addr and port for struct ipa_client_conn Change-Id: I3133c6b01647506a5b9c67e4699bcad3ff59f843 --- M TODO-RELEASE M include/osmocom/abis/ipa.h M src/input/ipa.c M src/input/ipaccess.c M src/ipa_proxy.c 5 files changed, 41 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..4fe42c6 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,5 @@ # 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 +libosmo-abis struct ipa_client_conn Fields added at the end (no ABI break because instance is created through API func) +libosmo-abis ipa_client_conn_create2() New API added diff --git a/include/osmocom/abis/ipa.h b/include/osmocom/abis/ipa.h index ff00697..4764a95 100644 --- a/include/osmocom/abis/ipa.h +++ b/include/osmocom/abis/ipa.h @@ -78,6 +78,8 @@ int (*write_cb)(struct ipa_client_conn *link); void *data; struct msgb *pending_msg; + const char *local_addr; + uint16_t local_port; }; struct ipa_client_conn * @@ -86,7 +88,16 @@ void (*updown)(struct ipa_client_conn *link, int), int (*read_cb)(struct ipa_client_conn *link, struct msgb *msgb), int (*write_cb)(struct ipa_client_conn *link), - void *data); + void *data) OSMO_DEPRECATED("Use ipa_client_conn_create2() instead"); +struct ipa_client_conn * +ipa_client_conn_create2(void *ctx, struct e1inp_ts *ts, + int priv_nr, const char *loc_addr, uint16_t loc_port, + const char *rem_addr, uint16_t rem_port, + void (*updown_cb)(struct ipa_client_conn *link, int up), + int (*read_cb)(struct ipa_client_conn *link, + struct msgb *msgb), + int (*write_cb)(struct ipa_client_conn *link), + void *data); void ipa_client_conn_destroy(struct ipa_client_conn *link); int ipa_client_conn_open(struct ipa_client_conn *link); diff --git a/src/input/ipa.c b/src/input/ipa.c index b4dbcb0..0f67dca 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -155,6 +155,20 @@ int (*write_cb)(struct ipa_client_conn *link), void *data) { + return ipa_client_conn_create2(ctx, ts, priv_nr, NULL, 0, addr, port, + updown_cb, read_cb, write_cb, data); +} + +struct ipa_client_conn * +ipa_client_conn_create2(void *ctx, struct e1inp_ts *ts, + int priv_nr, const char *loc_addr, uint16_t loc_port, + const char *rem_addr, uint16_t rem_port, + void (*updown_cb)(struct ipa_client_conn *link, int up), + int (*read_cb)(struct ipa_client_conn *link, + struct msgb *msgb), + int (*write_cb)(struct ipa_client_conn *link), + void *data) +{ struct ipa_client_conn *ipa_link; ipa_link = talloc_zero(ctx, struct ipa_client_conn); @@ -181,8 +195,10 @@ ipa_link->ofd->data = ipa_link; ipa_link->ofd->fd = -1; ipa_link->state = IPA_CLIENT_LINK_STATE_CONNECTING; - ipa_link->addr = talloc_strdup(ipa_link, addr); - ipa_link->port = port; + ipa_link->local_addr = talloc_strdup(ipa_link, loc_addr); + ipa_link->local_port = loc_port; + ipa_link->addr = talloc_strdup(ipa_link, rem_addr); + ipa_link->port = rem_port; ipa_link->updown_cb = updown_cb; ipa_link->read_cb = read_cb; /* default to generic write callback if not set. */ @@ -209,9 +225,10 @@ int ret; link->state = IPA_CLIENT_LINK_STATE_CONNECTING; - ret = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP, + ret = osmo_sock_init2(AF_INET, SOCK_STREAM, IPPROTO_TCP, + link->local_addr, link->local_port, link->addr, link->port, - OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK); + OSMO_SOCK_F_BIND|OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK); if (ret < 0) return ret; link->ofd->fd = ret; diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 474bfb4..0f8e2d5 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -896,9 +896,10 @@ "OML connecting to %s:%u\n", line->ops->cfg.ipa.addr, IPA_TCP_PORT_OML); - link = ipa_client_conn_create(tall_ipa_ctx, + link = ipa_client_conn_create2(tall_ipa_ctx, e1inp_line_ipa_oml_ts(line), E1INP_SIGN_OML, + NULL, 0, line->ops->cfg.ipa.addr, IPA_TCP_PORT_OML, ipaccess_bts_updown_cb, @@ -946,9 +947,10 @@ return -EINVAL; } - rsl_link = ipa_client_conn_create(tall_ipa_ctx, + rsl_link = ipa_client_conn_create2(tall_ipa_ctx, e1inp_line_ipa_rsl_ts(line, trx_nr), E1INP_SIGN_RSL+trx_nr, + NULL, 0, rem_addr, rem_port, ipaccess_bts_updown_cb, ipaccess_bts_read_cb, diff --git a/src/ipa_proxy.c b/src/ipa_proxy.c index 44f5baf..980add7 100644 --- a/src/ipa_proxy.c +++ b/src/ipa_proxy.c @@ -184,7 +184,8 @@ LOGP(DLINP, LOGL_NOTICE, "now trying to connect to destination\n"); - conn->dst = ipa_client_conn_create(NULL, NULL, 0, + conn->dst = ipa_client_conn_create2(NULL, NULL, 0, + NULL, 0, route->shared->dst.inst->net.addr, route->shared->dst.inst->net.port, NULL, -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/16014 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I3133c6b01647506a5b9c67e4699bcad3ff59f843 Gerrit-Change-Number: 16014 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 16:15:23 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 16:15:23 +0000 Subject: Change in libosmo-sccp[master]: xua: Avoid multiline log in xua_msg_dump() References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16051 ) Change subject: xua: Avoid multiline log in xua_msg_dump() ...................................................................... xua: Avoid multiline log in xua_msg_dump() In general we want to avoid multiline log messages since they make parsing more difficult. Also output in VTY over telnet looks strange (indentation incremented at each new line). Change-Id: Id9084d0e0f976bb374186db93d6ff8062b99e238 --- M src/xua_msg.c M tests/xua/xua_test.ok 2 files changed, 15 insertions(+), 54 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/51/16051/1 diff --git a/src/xua_msg.c b/src/xua_msg.c index ed0cdc7..91adcf1 100644 --- a/src/xua_msg.c +++ b/src/xua_msg.c @@ -496,18 +496,18 @@ static char buf[1024]; struct xua_msg_part *part; const struct xua_msg_class *xmc = NULL; - + bool comma = false; if (dialect) xmc = dialect->class[xua->hdr.msg_class]; buf[0] = '\0'; - append_to_buf(buf, NULL, "HDR=(%s,V=%u,LEN=%u)", + append_to_buf(buf, &comma, "HDR=(%s,V=%u,LEN=%u)", xua_hdr_dump(xua, dialect), xua->hdr.version, xua->hdr.msg_length); - buf[0] = ' '; + llist_for_each_entry(part, &xua->headers, entry) - append_to_buf(buf, NULL, "\n\tPART(T=%s,L=%u,D=%s)", + append_to_buf(buf, NULL, " PART(T=%s,L=%u,D=%s)", xua_class_iei_name(xmc, part->tag), part->len, osmo_hexdump_nospc(part->dat, part->len)); return buf; diff --git a/tests/xua/xua_test.ok b/tests/xua/xua_test.ok index f93b41e..6738cc0 100644 --- a/tests/xua/xua_test.ok +++ b/tests/xua/xua_test.ok @@ -18,116 +18,77 @@ => BSSMAP-RESET SCCP Input: [L2]> 09 00 03 05 07 02 42 fe 02 42 fe 06 00 04 30 04 01 20 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000000), - PART(T=Destination Address,L=12,D=0002000180030008000000fe), - PART(T=Source Address,L=12,D=0002000180030008000000fe), - PART(T=Data,L=6,D=000430040120) +Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000000), PART(T=Destination Address,L=12,D=0002000180030008000000fe), PART(T=Source Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=6,D=000430040120) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000000), - PART(T=Destination Address,L=20,D=00020003800200080000000180030008000000fe), - PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), - PART(T=Data,L=3,D=000131) +Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000000), PART(T=Destination Address,L=20,D=00020003800200080000000180030008000000fe), PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), PART(T=Data,L=3,D=000131) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000000), - PART(T=Destination Address,L=20,D=00020003800200080000000180030008000000fe), - PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), - PART(T=Data,L=16,D=000e52080829471002013197611a0106) +Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000000), PART(T=Destination Address,L=20,D=00020003800200080000000180030008000000fe), PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), PART(T=Data,L=16,D=000e52080829471002013197611a0106) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000000), - PART(T=Destination Address,L=12,D=0002000180030008000000fe), - PART(T=Source Address,L=12,D=0002000180030008000000fe), - PART(T=Data,L=16,D=000e52080829471002013197611a0106) +Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000000), PART(T=Destination Address,L=12,D=0002000180030008000000fe), PART(T=Source Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=16,D=000e52080829471002013197611a0106) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:CORE,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000002), - PART(T=Source Reference,L=4,D=00010203), - PART(T=Destination Address,L=12,D=0002000180030008000000fe), - PART(T=Data,L=31,D=001d5705080072f4802012c3501710052411033319a2082947100201319761) +Decoded SUA: HDR=(CO:CORE,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000002), PART(T=Source Reference,L=4,D=00010203), PART(T=Destination Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=31,D=001d5705080072f4802012c3501710052411033319a2082947100201319761) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:COAK,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000002), - PART(T=Destination Reference,L=4,D=00010203), - PART(T=Source Reference,L=4,D=00000003) +Decoded SUA: HDR=(CO:COAK,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000002), PART(T=Destination Reference,L=4,D=00010203), PART(T=Source Reference,L=4,D=00000003) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:CODT,V=0,LEN=0), - PART(T=Destination Reference,L=4,D=00000003), - PART(T=Segmentation,L=4,D=00000000), - PART(T=Data,L=15,D=01000c03055c0811813366021345f4) +Decoded SUA: HDR=(CO:CODT,V=0,LEN=0), PART(T=Destination Reference,L=4,D=00000003), PART(T=Segmentation,L=4,D=00000000), PART(T=Data,L=15,D=01000c03055c0811813366021345f4) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:CODT,V=0,LEN=0), - PART(T=Destination Reference,L=4,D=00000003), - PART(T=Segmentation,L=4,D=00000000), - PART(T=Data,L=6,D=000420040109) +Decoded SUA: HDR=(CO:CODT,V=0,LEN=0), PART(T=Destination Reference,L=4,D=00000003), PART(T=Segmentation,L=4,D=00000000), PART(T=Data,L=6,D=000420040109) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:RELRE,V=0,LEN=0), - PART(T=Destination Reference,L=4,D=00000003), - PART(T=Source Reference,L=4,D=00010203), - PART(T=Cause,L=4,D=00000300), - PART(T=Data,L=2,D=2342) +Decoded SUA: HDR=(CO:RELRE,V=0,LEN=0), PART(T=Destination Reference,L=4,D=00000003), PART(T=Source Reference,L=4,D=00010203), PART(T=Cause,L=4,D=00000300), PART(T=Data,L=2,D=2342) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:RELCO,V=0,LEN=0), - PART(T=Destination Reference,L=4,D=00010203), - PART(T=Source Reference,L=4,D=00000003) +Decoded SUA: HDR=(CO:RELCO,V=0,LEN=0), PART(T=Destination Reference,L=4,D=00010203), PART(T=Source Reference,L=4,D=00000003) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000081), - PART(T=Destination Address,L=32,D=0001000580010014000000040a00010453840900170000008003000800000007), - PART(T=Source Address,L=32,D=0001000580010014000000040c00010444872000206500008003000800000006), - PART(T=Data,L=154,D=6581974804260001984904510103df6c8188a181850201440201073080a780a08004012b30803012830110840107850791445776671697860120300682011884010400000000a306040142840105a306040151840105a306040131840105a309040112840105820102a309040111840105810101a306040114840100a30b0401418401043003830110a30b040141840104300382011800000000) +Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000081), PART(T=Destination Address,L=32,D=0001000580010014000000040a00010453840900170000008003000800000007), PART(T=Source Address,L=32,D=0001000580010014000000040c00010444872000206500008003000800000006), PART(T=Data,L=154,D=6581974804260001984904510103df6c8188a181850201440201073080a780a08004012b30803012830110840107850791445776671697860120300682011884010400000000a306040142840105a306040151840105a306040131840105a309040112840105820102a309040111840105810101a306040114840100a30b0401418401043003830110a30b040141840104300382011800000000) Re-Encoding decoded SUA to SCCP 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 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Id9084d0e0f976bb374186db93d6ff8062b99e238 Gerrit-Change-Number: 16051 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 16:23:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 16:23:48 +0000 Subject: Change in osmo-hlr[master]: hlr db schema 3: hlr_number -> msc_number In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15914 ) Change subject: hlr db schema 3: hlr_number -> msc_number ...................................................................... hlr db schema 3: hlr_number -> msc_number The osmo-hlr DB schema indicates a hlr_number column and references it as 3GPP TS 23.008 chapter 2.4.6. However, chapter 2.4.6 refers to the "MSC number", while the "HLR number" is chapter 2.4.7. Taking a closer look, 2.4.6 says "The MSC number is [...] stored in the HLR", while 2.4.7 says "The HLR number may be stored in the VLR". As quite obvious, the HLR does not store the HLR number. This was a typo from the start. The osmo-hlr code base so far does not use the hlr_number column at all, so we get away with renaming the column without any effects on the code base. However, let's rather make this a new schema version to be safe. Change-Id: I527e8627b24b79f3e9eec32675c7f5a3a6d25440 --- M doc/manuals/chapters/subscribers.adoc M sql/hlr.sql M src/db.c M tests/db_upgrade/db_upgrade_test.ok 4 files changed, 157 insertions(+), 14 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/manuals/chapters/subscribers.adoc b/doc/manuals/chapters/subscribers.adoc index e09e99a..ab41b0f 100644 --- a/doc/manuals/chapters/subscribers.adoc +++ b/doc/manuals/chapters/subscribers.adoc @@ -52,7 +52,7 @@ |aud3g.ind_bitlen|5|Nr of index bits at lower SQN end |apn|| |vlr_number||3GPP TS 23.008 chapter 2.4.5 -|hlr_number||3GPP TS 23.008 chapter 2.4.6 +|msc_number||3GPP TS 23.008 chapter 2.4.6 |sgsn_number||3GPP TS 23.008 chapter 2.4.8.1 |sgsn_address||3GPP TS 23.008 chapter 2.13.10 |ggsn_number||3GPP TS 23.008 chapter 2.4.8.2 diff --git a/sql/hlr.sql b/sql/hlr.sql index c1b0f1a..f8fdc0b 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -12,7 +12,7 @@ -- Chapter 2.4.5 vlr_number VARCHAR(15), -- Chapter 2.4.6 - hlr_number VARCHAR(15), + msc_number VARCHAR(15), -- Chapter 2.4.8.1 sgsn_number VARCHAR(15), -- Chapter 2.13.10 @@ -77,4 +77,4 @@ -- Set HLR database schema version number -- Note: This constant is currently duplicated in src/db.c and must be kept in sync! -PRAGMA user_version = 2; +PRAGMA user_version = 3; diff --git a/src/db.c b/src/db.c index 31c4ba5..d2564e6 100644 --- a/src/db.c +++ b/src/db.c @@ -28,7 +28,7 @@ #include "db_bootstrap.h" /* This constant is currently duplicated in sql/hlr.sql and must be kept in sync! */ -#define CURRENT_SCHEMA_VERSION 2 +#define CURRENT_SCHEMA_VERSION 3 #define SEL_COLUMNS \ "id," \ @@ -329,6 +329,140 @@ return rc; } +static int db_upgrade_v3(struct db_context *dbc) +{ + sqlite3_stmt *stmt; + int rc; + + /* A newer SQLite version would allow simply 'ATLER TABLE subscriber RENAME COLUMN hlr_number TO msc_number'. + * This is a really expensive workaround for that in order to cover earlier SQLite versions as well: + * Create a new table with the new column name and copy the data over (https://www.sqlite.org/faq.html#q11). + */ +#define SUBSCR_V3_CREATE \ +"(\n" \ +"-- OsmoHLR's DB scheme is modelled roughly after TS 23.008 version 13.3.0\n" \ +" id INTEGER PRIMARY KEY,\n" \ +" -- Chapter 2.1.1.1\n" \ +" imsi VARCHAR(15) UNIQUE NOT NULL,\n" \ +" -- Chapter 2.1.2\n" \ +" msisdn VARCHAR(15) UNIQUE,\n" \ +" -- Chapter 2.2.3: Most recent / current IMEISV\n" \ +" imeisv VARCHAR,\n" \ +" -- Chapter 2.1.9: Most recent / current IMEI\n" \ +" imei VARCHAR(14),\n" \ +" -- Chapter 2.4.5\n" \ +" vlr_number VARCHAR(15),\n" \ +" -- Chapter 2.4.6\n" \ +" msc_number VARCHAR(15),\n" \ +" -- Chapter 2.4.8.1\n" \ +" sgsn_number VARCHAR(15),\n" \ +" -- Chapter 2.13.10\n" \ +" sgsn_address VARCHAR,\n" \ +" -- Chapter 2.4.8.2\n" \ +" ggsn_number VARCHAR(15),\n" \ +" -- Chapter 2.4.9.2\n" \ +" gmlc_number VARCHAR(15),\n" \ +" -- Chapter 2.4.23\n" \ +" smsc_number VARCHAR(15),\n" \ +" -- Chapter 2.4.24\n" \ +" periodic_lu_tmr INTEGER,\n" \ +" -- Chapter 2.13.115\n" \ +" periodic_rau_tau_tmr INTEGER,\n" \ +" -- Chapter 2.1.1.2: network access mode\n" \ +" nam_cs BOOLEAN NOT NULL DEFAULT 1,\n" \ +" nam_ps BOOLEAN NOT NULL DEFAULT 1,\n" \ +" -- Chapter 2.1.8\n" \ +" lmsi INTEGER,\n" \ + \ +" -- The below purged flags might not even be stored non-volatile,\n" \ +" -- refer to TS 23.012 Chapter 3.6.1.4\n" \ +" -- Chapter 2.7.5\n" \ +" ms_purged_cs BOOLEAN NOT NULL DEFAULT 0,\n" \ +" -- Chapter 2.7.6\n" \ +" ms_purged_ps BOOLEAN NOT NULL DEFAULT 0,\n" \ + \ +" -- Timestamp of last location update seen from subscriber\n" \ +" -- The value is a string which encodes a UTC timestamp in granularity of seconds.\n" \ +" last_lu_seen TIMESTAMP default NULL\n" \ +")\n" + +#define SUBSCR_V2_COLUMN_NAMES \ + "id," \ + "imsi," \ + "msisdn," \ + "imeisv," \ + "imei," \ + "vlr_number," \ + "hlr_number," \ + "sgsn_number," \ + "sgsn_address," \ + "ggsn_number," \ + "gmlc_number," \ + "smsc_number," \ + "periodic_lu_tmr," \ + "periodic_rau_tau_tmr," \ + "nam_cs," \ + "nam_ps," \ + "lmsi," \ + "ms_purged_cs," \ + "ms_purged_ps," \ + "last_lu_seen" + +#define SUBSCR_V3_COLUMN_NAMES \ + "id," \ + "imsi," \ + "msisdn," \ + "imeisv," \ + "imei," \ + "vlr_number," \ + "msc_number," \ + "sgsn_number," \ + "sgsn_address," \ + "ggsn_number," \ + "gmlc_number," \ + "smsc_number," \ + "periodic_lu_tmr," \ + "periodic_rau_tau_tmr," \ + "nam_cs," \ + "nam_ps," \ + "lmsi," \ + "ms_purged_cs," \ + "ms_purged_ps," \ + "last_lu_seen" + + const char *statements[] = { + "BEGIN TRANSACTION", + "CREATE TEMPORARY TABLE subscriber_backup" SUBSCR_V3_CREATE, + "INSERT INTO subscriber_backup SELECT " SUBSCR_V2_COLUMN_NAMES " FROM subscriber", + "DROP TABLE subscriber", + "CREATE TABLE subscriber" SUBSCR_V3_CREATE, + "INSERT INTO subscriber SELECT " SUBSCR_V3_COLUMN_NAMES " FROM subscriber_backup", + "DROP TABLE subscriber_backup", + "COMMIT", + "PRAGMA user_version = 3", + }; + + int i; + for (i = 0; i < ARRAY_SIZE(statements); i++) { + const char *update_stmt_sql = statements[i]; + + rc = sqlite3_prepare_v2(dbc->db, update_stmt_sql, -1, &stmt, NULL); + if (rc != SQLITE_OK) { + LOGP(DDB, LOGL_ERROR, "Unable to prepare SQL statement '%s'\n", update_stmt_sql); + return rc; + } + rc = sqlite3_step(stmt); + db_remove_reset(stmt); + sqlite3_finalize(stmt); + if (rc != SQLITE_DONE) { + LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 3\n"); + return rc; + } + + } + return rc; +} + static int db_get_user_version(struct db_context *dbc) { const char *user_version_sql = "PRAGMA user_version"; @@ -459,6 +593,15 @@ } version = 2; /* fall through */ + case 2: + rc = db_upgrade_v3(dbc); + if (rc != SQLITE_DONE) { + LOGP(DDB, LOGL_ERROR, "Failed to upgrade HLR DB schema to version 3: (rc=%d) %s\n", + rc, sqlite3_errmsg(dbc->db)); + goto out_free; + } + version = 3; + /* fall through */ /* case N: ... */ default: break; diff --git a/tests/db_upgrade/db_upgrade_test.ok b/tests/db_upgrade/db_upgrade_test.ok index bce3eb4..c1f0f9d 100644 --- a/tests/db_upgrade/db_upgrade_test.ok +++ b/tests/db_upgrade/db_upgrade_test.ok @@ -80,7 +80,7 @@ DMAIN hlr starting DDB using database: test.db DDB Database test.db' has HLR DB schema version 0 -DDB Database test.db' has been upgraded to HLR DB schema version 2 +DDB Database test.db' has been upgraded to HLR DB schema version 3 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. Resulting db: @@ -117,7 +117,6 @@ name|type|notnull|dflt_value|pk ggsn_number|VARCHAR(15)|0||0 gmlc_number|VARCHAR(15)|0||0 -hlr_number|VARCHAR(15)|0||0 id|INTEGER|0||1 imei|VARCHAR(14)|0||0 imeisv|VARCHAR|0||0 @@ -126,6 +125,7 @@ lmsi|INTEGER|0||0 ms_purged_cs|BOOLEAN|1|0|0 ms_purged_ps|BOOLEAN|1|0|0 +msc_number|VARCHAR(15)|0||0 msisdn|VARCHAR(15)|0||0 nam_cs|BOOLEAN|1|1|0 nam_ps|BOOLEAN|1|1|0 @@ -137,13 +137,13 @@ vlr_number|VARCHAR(15)|0||0 Table subscriber contents: -ggsn_number|gmlc_number|hlr_number|id|imei|imeisv|imsi|last_lu_seen|lmsi|ms_purged_cs|ms_purged_ps|msisdn|nam_cs|nam_ps|periodic_lu_tmr|periodic_rau_tau_tmr|sgsn_address|sgsn_number|smsc_number|vlr_number -|||1|||123456789012345|||0|0|098765432109876|1|1||||||MSC-1 -|||2|||111111111|||1|0||1|1|||||| -|||3|||222222222|||0|1|22222|1|1|||||| -|||4|||333333|||0|0|3|0|1|||||| -|||5|||444444444444444|||0|0|4444|1|0|||||| -|||6|||5555555|||0|0|55555555555555|0|0|||||| +ggsn_number|gmlc_number|id|imei|imeisv|imsi|last_lu_seen|lmsi|ms_purged_cs|ms_purged_ps|msc_number|msisdn|nam_cs|nam_ps|periodic_lu_tmr|periodic_rau_tau_tmr|sgsn_address|sgsn_number|smsc_number|vlr_number +||1|||123456789012345|||0|0||098765432109876|1|1||||||MSC-1 +||2|||111111111|||1|0|||1|1|||||| +||3|||222222222|||0|1||22222|1|1|||||| +||4|||333333|||0|0||3|0|1|||||| +||5|||444444444444444|||0|0||4444|1|0|||||| +||6|||5555555|||0|0||55555555555555|0|0|||||| Table: subscriber_apn name|type|notnull|dflt_value|pk @@ -164,5 +164,5 @@ rc = 0 DMAIN hlr starting DDB using database: test.db -DDB Database test.db' has HLR DB schema version 2 +DDB Database test.db' has HLR DB schema version 3 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15914 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I527e8627b24b79f3e9eec32675c7f5a3a6d25440 Gerrit-Change-Number: 15914 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 16:23:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 16:23:48 +0000 Subject: Change in osmo-hlr[master]: db.c: code dup: add db_run_statements() for arrays of statements In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15929 ) Change subject: db.c: code dup: add db_run_statements() for arrays of statements ...................................................................... db.c: code dup: add db_run_statements() for arrays of statements The db bootstrap as well as the upgrade code all execute a number of statements, and have massive code dup around each statement execution. Instead have one db_run_statements() that takes an array of strings and runs all. Change-Id: I2721dfc0a9aadcc7f5ac81a1c0fa87452098996f --- M src/db.c 1 file changed, 34 insertions(+), 74 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/db.c b/src/db.c index d2564e6..75ca889 100644 --- a/src/db.c +++ b/src/db.c @@ -201,28 +201,38 @@ talloc_free(dbc); } -static int db_bootstrap(struct db_context *dbc) +static int db_run_statements(struct db_context *dbc, const char **statements, size_t statements_count) { + int rc; int i; - for (i = 0; i < ARRAY_SIZE(stmt_bootstrap_sql); i++) { - int rc; + for (i = 0; i < statements_count; i++) { + const char *stmt_str = statements[i]; sqlite3_stmt *stmt; - rc = sqlite3_prepare_v2(dbc->db, stmt_bootstrap_sql[i], -1, &stmt, NULL); + + rc = sqlite3_prepare_v2(dbc->db, stmt_str, -1, &stmt, NULL); if (rc != SQLITE_OK) { - LOGP(DDB, LOGL_ERROR, "Unable to prepare SQL statement '%s'\n", stmt_bootstrap_sql[i]); + LOGP(DDB, LOGL_ERROR, "Unable to prepare SQL statement '%s'\n", stmt_str); return rc; } - rc = sqlite3_step(stmt); db_remove_reset(stmt); sqlite3_finalize(stmt); if (rc != SQLITE_DONE) { - LOGP(DDB, LOGL_ERROR, "Cannot bootstrap database: SQL error: (%d) %s," - " during stmt '%s'", - rc, sqlite3_errmsg(dbc->db), stmt_bootstrap_sql[i]); + LOGP(DDB, LOGL_ERROR, "SQL error: (%d) %s, during stmt '%s'", + rc, sqlite3_errmsg(dbc->db), stmt_str); return rc; } } + return rc; +} + +static int db_bootstrap(struct db_context *dbc) +{ + int rc = db_run_statements(dbc, stmt_bootstrap_sql, ARRAY_SIZE(stmt_bootstrap_sql)); + if (rc != SQLITE_DONE) { + LOGP(DDB, LOGL_ERROR, "Cannot bootstrap database\n"); + return rc; + } return SQLITE_OK; } @@ -263,75 +273,38 @@ static int db_upgrade_v1(struct db_context *dbc) { - sqlite3_stmt *stmt; int rc; - const char *update_stmt_sql = "ALTER TABLE subscriber ADD COLUMN last_lu_seen TIMESTAMP default NULL"; - const char *set_schema_version_sql = "PRAGMA user_version = 1"; + const char *statements[] = { + "ALTER TABLE subscriber ADD COLUMN last_lu_seen TIMESTAMP default NULL", + "PRAGMA user_version = 1", + }; - rc = sqlite3_prepare_v2(dbc->db, update_stmt_sql, -1, &stmt, NULL); - if (rc != SQLITE_OK) { - LOGP(DDB, LOGL_ERROR, "Unable to prepare SQL statement '%s'\n", update_stmt_sql); - return rc; - } - rc = sqlite3_step(stmt); - db_remove_reset(stmt); - sqlite3_finalize(stmt); + rc = db_run_statements(dbc, statements, ARRAY_SIZE(statements)); if (rc != SQLITE_DONE) { - LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version %d\n", 1); + LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 1\n"); return rc; } - - rc = sqlite3_prepare_v2(dbc->db, set_schema_version_sql, -1, &stmt, NULL); - if (rc != SQLITE_OK) { - LOGP(DDB, LOGL_ERROR, "Unable to prepare SQL statement '%s'\n", set_schema_version_sql); - return rc; - } - rc = sqlite3_step(stmt); - if (rc != SQLITE_DONE) - LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version %d\n", 1); - - db_remove_reset(stmt); - sqlite3_finalize(stmt); return rc; } static int db_upgrade_v2(struct db_context *dbc) { - sqlite3_stmt *stmt; int rc; - const char *update_stmt_sql = "ALTER TABLE subscriber ADD COLUMN imei VARCHAR(14)"; - const char *set_schema_version_sql = "PRAGMA user_version = 2"; + const char *statements[] = { + "ALTER TABLE subscriber ADD COLUMN imei VARCHAR(14)", + "PRAGMA user_version = 2", + }; - rc = sqlite3_prepare_v2(dbc->db, update_stmt_sql, -1, &stmt, NULL); - if (rc != SQLITE_OK) { - LOGP(DDB, LOGL_ERROR, "Unable to prepare SQL statement '%s'\n", update_stmt_sql); - return rc; - } - rc = sqlite3_step(stmt); - db_remove_reset(stmt); - sqlite3_finalize(stmt); + rc = db_run_statements(dbc, statements, ARRAY_SIZE(statements)); if (rc != SQLITE_DONE) { LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 2\n"); return rc; } - - rc = sqlite3_prepare_v2(dbc->db, set_schema_version_sql, -1, &stmt, NULL); - if (rc != SQLITE_OK) { - LOGP(DDB, LOGL_ERROR, "Unable to prepare SQL statement '%s'\n", set_schema_version_sql); - return rc; - } - rc = sqlite3_step(stmt); - if (rc != SQLITE_DONE) - LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 2\n"); - - db_remove_reset(stmt); - sqlite3_finalize(stmt); return rc; } static int db_upgrade_v3(struct db_context *dbc) { - sqlite3_stmt *stmt; int rc; /* A newer SQLite version would allow simply 'ATLER TABLE subscriber RENAME COLUMN hlr_number TO msc_number'. @@ -442,23 +415,10 @@ "PRAGMA user_version = 3", }; - int i; - for (i = 0; i < ARRAY_SIZE(statements); i++) { - const char *update_stmt_sql = statements[i]; - - rc = sqlite3_prepare_v2(dbc->db, update_stmt_sql, -1, &stmt, NULL); - if (rc != SQLITE_OK) { - LOGP(DDB, LOGL_ERROR, "Unable to prepare SQL statement '%s'\n", update_stmt_sql); - return rc; - } - rc = sqlite3_step(stmt); - db_remove_reset(stmt); - sqlite3_finalize(stmt); - if (rc != SQLITE_DONE) { - LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 3\n"); - return rc; - } - + rc = db_run_statements(dbc, statements, ARRAY_SIZE(statements)); + if (rc != SQLITE_DONE) { + LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 3\n"); + return rc; } return rc; } -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I2721dfc0a9aadcc7f5ac81a1c0fa87452098996f Gerrit-Change-Number: 15929 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 16:24:20 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 16:24:20 +0000 Subject: Change in libosmo-sccp[master]: xua: Avoid multiline log in xua_msg_dump() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16051 ) Change subject: xua: Avoid multiline log in xua_msg_dump() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Id9084d0e0f976bb374186db93d6ff8062b99e238 Gerrit-Change-Number: 16051 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 12 Nov 2019 16:24:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 16:47:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 16:47:09 +0000 Subject: Change in osmo-bts[master]: rsl: Fix logged value in rx MS Power Control References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16052 ) Change subject: rsl: Fix logged value in rx MS Power Control ...................................................................... rsl: Fix logged value in rx MS Power Control The interesting value in this case is the incoming new ms max power. Change-Id: Ib6fcb21b1b4bdbc8b749a1b8543d97331699ef3b --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/52/16052/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index e460693..d8ce016 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1638,7 +1638,7 @@ pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; lchan->ms_power = pwr; - LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx MS POWER CONTROL %d\n", lchan->ms_power_ctrl.current); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx MS POWER CONTROL %" PRIu8 "\n", pwr); /* 9.3.31 MS Power Parameters (O) */ if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16052 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib6fcb21b1b4bdbc8b749a1b8543d97331699ef3b Gerrit-Change-Number: 16052 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 16:53:46 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 16:53:46 +0000 Subject: Change in osmo-bsc[master]: comsetic: bs11_config: clean trailing whitespace References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16053 ) Change subject: comsetic: bs11_config: clean trailing whitespace ...................................................................... comsetic: bs11_config: clean trailing whitespace Change-Id: I55f478c753c38baa576abc6ba53c4f6c9cbe61c0 --- M src/utils/bs11_config.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/53/16053/1 diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c index 7fac3e3..39acb7f 100644 --- a/src/utils/bs11_config.c +++ b/src/utils/bs11_config.c @@ -103,7 +103,7 @@ abis_nm_bs11_conn_oml_tei(bts, 0, 1, 0xff, TEI_OML); abis_nm_bs11_set_trx_power(bts->c0, BS11_TRX_POWER_GSM_30mW); - + sleep(1); abis_nm_bs11_set_trx1_pw(bts, trx1_password); @@ -136,7 +136,7 @@ abis_nm_bs11_create_object(bts, BS11_OBJ_PA, 1, sizeof(obj_pa0_attr), obj_pa0_attr); abis_nm_bs11_set_trx_power(trx, BS11_TRX_POWER_GSM_30mW); - + return 0; } @@ -201,7 +201,7 @@ break; case NM_MT_ACTIVATE_SW_ACK: bs11cfg_state = STATE_NONE; - + break; case NM_MT_LOAD_SEG_ACK: percent = abis_nm_software_load_status(g_bts); @@ -281,7 +281,7 @@ static const char *trx_power_name(uint8_t pwr) { switch (pwr) { - case BS11_TRX_POWER_GSM_2W: + case BS11_TRX_POWER_GSM_2W: return "2W (GSM)"; case BS11_TRX_POWER_GSM_250mW: return "250mW (GSM)"; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I55f478c753c38baa576abc6ba53c4f6c9cbe61c0 Gerrit-Change-Number: 16053 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 16:53:46 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 12 Nov 2019 16:53:46 +0000 Subject: Change in osmo-bsc[master]: bsc: Send MS Power Control msg upon max MS power change References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16054 ) Change subject: bsc: Send MS Power Control msg upon max MS power change ...................................................................... bsc: Send MS Power Control msg upon max MS power change Lots of times, the MS power class is unknown until after the first channel has been activated, at which point the MS power class is received in messages such as LU update or CM Service Requet. Since the MS Power level is sent upon CHAN ACT, the only way to communicate the change of maximum MS Power (based on MS power class) after CHAN ACT is to send a MS Power Control msg. Let's do that. Related: OS#4244 Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 --- M src/ipaccess/ipaccess-config.c M src/ipaccess/ipaccess-proxy.c M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/gsm_data.c M src/utils/bs11_config.c M src/utils/meas_json.c M tests/abis/abis_test.c M tests/bsc/bsc_test.c M tests/gsm0408/gsm0408_test.c M tests/nanobts_omlattr/nanobts_omlattr_test.c 10 files changed, 33 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/54/16054/1 diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index 54e4efd..4fb3426 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -1141,3 +1141,9 @@ { return 0; } + +/* Stub */ +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) +{ + return 0; +} diff --git a/src/ipaccess/ipaccess-proxy.c b/src/ipaccess/ipaccess-proxy.c index 26c5bcd..5ce1128 100644 --- a/src/ipaccess/ipaccess-proxy.c +++ b/src/ipaccess/ipaccess-proxy.c @@ -1248,3 +1248,9 @@ osmo_select_main(0); } } + +/* Stub */ +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) +{ + return 0; +} diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index fe6fa13..be4d488 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -301,6 +302,9 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); + LOG_LCHAN(lchan, LOGL_DEBUG, "Tx MS POWER CONTROL %" PRIu8 "\n", + lchan->ms_power); + msg = rsl_msgb_alloc(); dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 7745449..0662c80 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -39,6 +39,7 @@ #include #include +#include #include #include #include @@ -1705,6 +1706,7 @@ struct gsm_bts *bts = lchan->ts->trx->bts; struct gsm_subscriber_connection *conn = lchan->conn; int max_pwr_dbm_pwclass, new_pwr; + bool send_pwr_ctrl_msg = false; LOG_LCHAN(lchan, LOGL_DEBUG, "MS Power level update requested: %d dBm\n", ms_power_dbm); @@ -1741,10 +1743,15 @@ "MS Power level update (power class %" PRIu8 "): %" PRIu8 " -> %d\n", conn ? conn->ms_power_class : 0, lchan->ms_power, new_pwr); + /* If chan was already activated and max ms_power changes (due to power + classmark received), send an MS Power Control message */ + if (lchan->activate.activ_ack && new_pwr != lchan->ms_power) + send_pwr_ctrl_msg = true; + lchan->ms_power = new_pwr; - /* FIXME: if chan is active and lchan->ms_power != new_pwr, consider - sending an MS Power Control message (RSL) towards BTS to announce the - new max ms power lvl, see rsl_chan_ms_power_ctrl() */ + + if (send_pwr_ctrl_msg) + rsl_chan_ms_power_ctrl(lchan); } const struct value_string lchan_activate_mode_names[] = { diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c index 39acb7f..2a2340c 100644 --- a/src/utils/bs11_config.c +++ b/src/utils/bs11_config.c @@ -983,3 +983,4 @@ void ts_fsm_alloc(struct gsm_bts_trx_ts *ts) {} int abis_rsl_rcvmsg(struct msgb *msg) { return 0; } +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } diff --git a/src/utils/meas_json.c b/src/utils/meas_json.c index 365b450..a3526de 100644 --- a/src/utils/meas_json.c +++ b/src/utils/meas_json.c @@ -190,3 +190,4 @@ void ts_fsm_alloc(struct gsm_bts_trx_ts *ts) {} int abis_rsl_rcvmsg(struct msgb *msg) { return 0; } +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c index 5102aea..43934f3 100644 --- a/tests/abis/abis_test.c +++ b/tests/abis/abis_test.c @@ -189,3 +189,4 @@ bool on_gsm_ts_init(struct gsm_bts_trx_ts *ts) { return true; } void ts_fsm_alloc(struct gsm_bts_trx_ts *ts) {} +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index 103e0bb..86b7282 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -252,3 +252,4 @@ void lchan_activate(struct gsm_lchan *lchan, void *info) {} bool neighbor_ident_bts_entry_exists(uint8_t from_bts) { return false; } const char *handover_status(struct gsm_subscriber_connection *conn) { return "x"; } +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index a30aaf8..f850274 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -996,3 +996,5 @@ int rsl_data_request(struct msgb *msg, uint8_t link_id) { return 0; } int rsl_encryption_cmd(struct msgb *msg) { return 0; } + +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c b/tests/nanobts_omlattr/nanobts_omlattr_test.c index 65eb055..a3ba8e0 100644 --- a/tests/nanobts_omlattr/nanobts_omlattr_test.c +++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c @@ -318,3 +318,4 @@ { return true; } void ts_fsm_alloc(struct gsm_bts_trx_ts *ts) {} +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 Gerrit-Change-Number: 16054 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 18:16:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 18:16:02 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Fix memory leaks in ccid_handle_out() error paths In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 to look at the new patch set (#2). Change subject: ccid_device: Fix memory leaks in ccid_handle_out() error paths ...................................................................... ccid_device: Fix memory leaks in ccid_handle_out() error paths Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57 --- M ccid_common/ccid_device.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/35/16035/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57 Gerrit-Change-Number: 16035 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 18:16:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 18:16:02 +0000 Subject: Change in osmo-ccid-firmware[master]: main: Add missing #include to osmocom/timer.h In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16036 to look at the new patch set (#2). Change subject: main: Add missing #include to osmocom/timer.h ...................................................................... main: Add missing #include to osmocom/timer.h Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076 --- M sysmoOCTSIM/main.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/36/16036/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076 Gerrit-Change-Number: 16036 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 18:16:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 18:16:02 +0000 Subject: Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Create symlinks of last-built .bin and .elf In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 to look at the new patch set (#2). Change subject: sysmoOCTSIM: Create symlinks of last-built .bin and .elf ...................................................................... sysmoOCTSIM: Create symlinks of last-built .bin and .elf Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4 --- M sysmoOCTSIM/gcc/Makefile 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/39/16039/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4 Gerrit-Change-Number: 16039 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 18:16:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 18:16:03 +0000 Subject: Change in osmo-ccid-firmware[master]: Avoid endless loop while printing debug uart ringbuffer References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 ) Change subject: Avoid endless loop while printing debug uart ringbuffer ...................................................................... Avoid endless loop while printing debug uart ringbuffer Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a --- M sysmoOCTSIM/hal/src/hal_usart_async_rings.c 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/55/16055/1 diff --git a/sysmoOCTSIM/hal/src/hal_usart_async_rings.c b/sysmoOCTSIM/hal/src/hal_usart_async_rings.c index 38bdca4..704c6ab 100644 --- a/sysmoOCTSIM/hal/src/hal_usart_async_rings.c +++ b/sysmoOCTSIM/hal/src/hal_usart_async_rings.c @@ -321,7 +321,11 @@ ASSERT(descr && buf && length); for (uint16_t i = 0; i < length; i++) { - while (ringbuffer_num(&descr->tx) > descr->tx.size); // WARNING blocking until there is space in the buffer + /* HACK: disabling this to avoid getting stuck indefinitely. In theory, this while loop below + * would exit at some point as the UART is supposedly transmitting data. However, in some + * situations it is not transmitting, and hence the condition becomes never true, waiting here + * indefinitely. We will now simply ovewrite old log data if it isn't sent fast enough */ + //while (ringbuffer_num(&descr->tx) > descr->tx.size); // WARNING blocking until there is space in the buffer ringbuffer_put(&descr->tx, buf[i]); } descr->stat = USART_ASYNC_RINGS_STATUS_BUSY; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a Gerrit-Change-Number: 16055 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:20:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:20:08 +0000 Subject: Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Proper Makefile targets References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 ) Change subject: sysmoOCTSIM: Proper Makefile targets ...................................................................... sysmoOCTSIM: Proper Makefile targets It's really bad practsie to generate different output files from one target, which breaks dependency generation and the like. Let's have separate Makefile targets for each output file we generate, all depending on the .elf file. Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba --- M sysmoOCTSIM/gcc/Makefile 1 file changed, 18 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/56/16056/1 diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index d98277a..4a03a3a 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -153,7 +153,13 @@ vpath %.S ../ # All Target -all: $(SUB_DIRS) $(OUTPUT_FILE_PATH) sysmoOCTSIM.elf sysmoOCTSIM.bin +all: $(SUB_DIRS) elf bin ihex eep lss + +elf: $(OUTPUT_FILE_NAME).elf sysmoOCTSIM.elf +bin: $(OUTPUT_FILE_NAME).bin sysmoOCTSIM.elf +ihex: $(OUTPUT_FILE_NAME).ihex +eep: $(OUTPUT_FILE_NAME).eep +lss: $(OUTPUT_FILE_NAME).lss # Linker target @@ -167,13 +173,18 @@ -L"../gcc/gcc" @echo Finished building target: $@ - $(OBJCOPY) -O binary "$(OUTPUT_FILE_NAME).elf" "$(OUTPUT_FILE_NAME).bin" - $(OBJCOPY) -O ihex -R .eeprom -R .fuse -R .lock -R .signature \ - "$(OUTPUT_FILE_NAME).elf" "$(OUTPUT_FILE_NAME).hex" +%.bin: %.elf + $(OBJCOPY) -O binary $< $@ + +%.ihex: %.elf + $(OBJCOPY) -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@ + +%.eep: %.elf $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma \ - .eeprom=0 --no-change-warnings -O binary "$(OUTPUT_FILE_NAME).elf" \ - "$(OUTPUT_FILE_NAME).eep" || exit 0 - $(OBJDUMP) -h -S "$(OUTPUT_FILE_NAME).elf" > "$(OUTPUT_FILE_NAME).lss" + .eeprom=0 --no-change-warnings -O binary $< $@ || exit 0 + +%.lss: %.elf + $(OBJDUMP) -h -S $< > $@ $(SIZE) "$(OUTPUT_FILE_NAME).elf" sysmoOCTSIM.elf: $(OUTPUT_FILE_PATH) -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba Gerrit-Change-Number: 16056 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:20:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:20:08 +0000 Subject: Change in osmo-ccid-firmware[master]: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 ) Change subject: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files ...................................................................... Makefile: Add 'make mrproper' for removing all bin/elf/etc output files Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc --- M sysmoOCTSIM/gcc/Makefile 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/57/16057/1 diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 4a03a3a..79ecc50 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -234,3 +234,6 @@ rm -f $(OUTPUT_FILE_NAME).a $(OUTPUT_FILE_NAME).hex $(OUTPUT_FILE_NAME).bin \ $(OUTPUT_FILE_NAME).lss $(OUTPUT_FILE_NAME).eep $(OUTPUT_FILE_NAME).map \ $(OUTPUT_FILE_NAME).srec + +mrproper: clean + rm -f *.o *.d *.a *.elf *.bin *.ihex *.eep *.lss *.map *.srec -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc Gerrit-Change-Number: 16057 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:21:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:21:45 +0000 Subject: Change in osmo-bts[master]: rsl: Fix logged value in rx MS Power Control In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16052 ) Change subject: rsl: Fix logged value in rx MS Power Control ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16052 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib6fcb21b1b4bdbc8b749a1b8543d97331699ef3b Gerrit-Change-Number: 16052 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 21:21:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:21:46 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:21:46 +0000 Subject: Change in osmo-bts[master]: rsl: Fix logged value in rx MS Power Control In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16052 ) Change subject: rsl: Fix logged value in rx MS Power Control ...................................................................... rsl: Fix logged value in rx MS Power Control The interesting value in this case is the incoming new ms max power. Change-Id: Ib6fcb21b1b4bdbc8b749a1b8543d97331699ef3b --- M src/common/rsl.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/common/rsl.c b/src/common/rsl.c index e460693..d8ce016 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1638,7 +1638,7 @@ pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; lchan->ms_power = pwr; - LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx MS POWER CONTROL %d\n", lchan->ms_power_ctrl.current); + LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx MS POWER CONTROL %" PRIu8 "\n", pwr); /* 9.3.31 MS Power Parameters (O) */ if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16052 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib6fcb21b1b4bdbc8b749a1b8543d97331699ef3b Gerrit-Change-Number: 16052 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:24:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:24:42 +0000 Subject: Change in osmo-bsc[master]: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15926 ) Change subject: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class ...................................................................... Patch Set 6: in teerms of layering, The BSC only terminates RR. I would hence presume that the BSC is designed never to look into MM/CC messsages, and hence it's the MSCs responsibility to send a a CLASSMARK UPDATE over A? This is all just from "general feeling" rather than looking at the specs. We are of course free to do things differently, but I would _expect_ it as indicated above -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15926 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6bff440b7797e710bca5af94fae546e5d55e6972 Gerrit-Change-Number: 15926 Gerrit-PatchSet: 6 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 21:24:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:26:34 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 12 Nov 2019 21:26:34 +0000 Subject: Change in libosmo-sccp[master]: xua: Avoid multiline log in xua_msg_dump() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16051 ) Change subject: xua: Avoid multiline log in xua_msg_dump() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Id9084d0e0f976bb374186db93d6ff8062b99e238 Gerrit-Change-Number: 16051 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 21:26:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:33:54 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:33:54 +0000 Subject: Change in osmo-bsc[master]: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15926 ) Change subject: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class ...................................................................... Patch Set 6: Code-Review+1 well, my last comment was a bit confused I guess. There is no way how the MSC can update the classmark over A. I guess the orignal GSM specs (before early classmark sending) contained a classmark only if inquired by the netwokr (RR classmark enqiury), which would be sent from the BSC and hence the classmark returned to the BSC. Later they added classmark to MM messages like CM SERV REQ / LU REQ , which are CM/MM messages formally to be only relayed by the BSC to the MSC, but then we have to look inside to know the classmark :/ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15926 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6bff440b7797e710bca5af94fae546e5d55e6972 Gerrit-Change-Number: 15926 Gerrit-PatchSet: 6 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 21:33:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:34:18 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:34:18 +0000 Subject: Change in osmo-bsc[master]: comsetic: bs11_config: clean trailing whitespace In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16053 ) Change subject: comsetic: bs11_config: clean trailing whitespace ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-bsc/+/16053/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bsc/+/16053/1//COMMIT_MSG at 7 PS1, Line 7: comsetic cosmetic: fix comsetic -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I55f478c753c38baa576abc6ba53c4f6c9cbe61c0 Gerrit-Change-Number: 16053 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 21:34:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:35:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:35:15 +0000 Subject: Change in osmo-bsc[master]: bsc: Send MS Power Control msg upon max MS power change In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16054 ) Change subject: bsc: Send MS Power Control msg upon max MS power change ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 Gerrit-Change-Number: 16054 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 21:35:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:35:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:35:22 +0000 Subject: Change in libosmo-sccp[master]: xua: Avoid multiline log in xua_msg_dump() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16051 ) Change subject: xua: Avoid multiline log in xua_msg_dump() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Id9084d0e0f976bb374186db93d6ff8062b99e238 Gerrit-Change-Number: 16051 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 Nov 2019 21:35:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:35:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:35:24 +0000 Subject: Change in libosmo-sccp[master]: xua: Avoid multiline log in xua_msg_dump() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16051 ) Change subject: xua: Avoid multiline log in xua_msg_dump() ...................................................................... xua: Avoid multiline log in xua_msg_dump() In general we want to avoid multiline log messages since they make parsing more difficult. Also output in VTY over telnet looks strange (indentation incremented at each new line). Change-Id: Id9084d0e0f976bb374186db93d6ff8062b99e238 --- M src/xua_msg.c M tests/xua/xua_test.ok 2 files changed, 15 insertions(+), 54 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/xua_msg.c b/src/xua_msg.c index ed0cdc7..91adcf1 100644 --- a/src/xua_msg.c +++ b/src/xua_msg.c @@ -496,18 +496,18 @@ static char buf[1024]; struct xua_msg_part *part; const struct xua_msg_class *xmc = NULL; - + bool comma = false; if (dialect) xmc = dialect->class[xua->hdr.msg_class]; buf[0] = '\0'; - append_to_buf(buf, NULL, "HDR=(%s,V=%u,LEN=%u)", + append_to_buf(buf, &comma, "HDR=(%s,V=%u,LEN=%u)", xua_hdr_dump(xua, dialect), xua->hdr.version, xua->hdr.msg_length); - buf[0] = ' '; + llist_for_each_entry(part, &xua->headers, entry) - append_to_buf(buf, NULL, "\n\tPART(T=%s,L=%u,D=%s)", + append_to_buf(buf, NULL, " PART(T=%s,L=%u,D=%s)", xua_class_iei_name(xmc, part->tag), part->len, osmo_hexdump_nospc(part->dat, part->len)); return buf; diff --git a/tests/xua/xua_test.ok b/tests/xua/xua_test.ok index f93b41e..6738cc0 100644 --- a/tests/xua/xua_test.ok +++ b/tests/xua/xua_test.ok @@ -18,116 +18,77 @@ => BSSMAP-RESET SCCP Input: [L2]> 09 00 03 05 07 02 42 fe 02 42 fe 06 00 04 30 04 01 20 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000000), - PART(T=Destination Address,L=12,D=0002000180030008000000fe), - PART(T=Source Address,L=12,D=0002000180030008000000fe), - PART(T=Data,L=6,D=000430040120) +Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000000), PART(T=Destination Address,L=12,D=0002000180030008000000fe), PART(T=Source Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=6,D=000430040120) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000000), - PART(T=Destination Address,L=20,D=00020003800200080000000180030008000000fe), - PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), - PART(T=Data,L=3,D=000131) +Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000000), PART(T=Destination Address,L=20,D=00020003800200080000000180030008000000fe), PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), PART(T=Data,L=3,D=000131) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000000), - PART(T=Destination Address,L=20,D=00020003800200080000000180030008000000fe), - PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), - PART(T=Data,L=16,D=000e52080829471002013197611a0106) +Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000000), PART(T=Destination Address,L=20,D=00020003800200080000000180030008000000fe), PART(T=Source Address,L=20,D=00020003800200080000005c80030008000000fe), PART(T=Data,L=16,D=000e52080829471002013197611a0106) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000000), - PART(T=Destination Address,L=12,D=0002000180030008000000fe), - PART(T=Source Address,L=12,D=0002000180030008000000fe), - PART(T=Data,L=16,D=000e52080829471002013197611a0106) +Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000000), PART(T=Destination Address,L=12,D=0002000180030008000000fe), PART(T=Source Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=16,D=000e52080829471002013197611a0106) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:CORE,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000002), - PART(T=Source Reference,L=4,D=00010203), - PART(T=Destination Address,L=12,D=0002000180030008000000fe), - PART(T=Data,L=31,D=001d5705080072f4802012c3501710052411033319a2082947100201319761) +Decoded SUA: HDR=(CO:CORE,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000002), PART(T=Source Reference,L=4,D=00010203), PART(T=Destination Address,L=12,D=0002000180030008000000fe), PART(T=Data,L=31,D=001d5705080072f4802012c3501710052411033319a2082947100201319761) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:COAK,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000002), - PART(T=Destination Reference,L=4,D=00010203), - PART(T=Source Reference,L=4,D=00000003) +Decoded SUA: HDR=(CO:COAK,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000002), PART(T=Destination Reference,L=4,D=00010203), PART(T=Source Reference,L=4,D=00000003) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:CODT,V=0,LEN=0), - PART(T=Destination Reference,L=4,D=00000003), - PART(T=Segmentation,L=4,D=00000000), - PART(T=Data,L=15,D=01000c03055c0811813366021345f4) +Decoded SUA: HDR=(CO:CODT,V=0,LEN=0), PART(T=Destination Reference,L=4,D=00000003), PART(T=Segmentation,L=4,D=00000000), PART(T=Data,L=15,D=01000c03055c0811813366021345f4) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:CODT,V=0,LEN=0), - PART(T=Destination Reference,L=4,D=00000003), - PART(T=Segmentation,L=4,D=00000000), - PART(T=Data,L=6,D=000420040109) +Decoded SUA: HDR=(CO:CODT,V=0,LEN=0), PART(T=Destination Reference,L=4,D=00000003), PART(T=Segmentation,L=4,D=00000000), PART(T=Data,L=6,D=000420040109) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:RELRE,V=0,LEN=0), - PART(T=Destination Reference,L=4,D=00000003), - PART(T=Source Reference,L=4,D=00010203), - PART(T=Cause,L=4,D=00000300), - PART(T=Data,L=2,D=2342) +Decoded SUA: HDR=(CO:RELRE,V=0,LEN=0), PART(T=Destination Reference,L=4,D=00000003), PART(T=Source Reference,L=4,D=00010203), PART(T=Cause,L=4,D=00000300), PART(T=Data,L=2,D=2342) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CO:RELCO,V=0,LEN=0), - PART(T=Destination Reference,L=4,D=00010203), - PART(T=Source Reference,L=4,D=00000003) +Decoded SUA: HDR=(CO:RELCO,V=0,LEN=0), PART(T=Destination Reference,L=4,D=00010203), PART(T=Source Reference,L=4,D=00000003) Re-Encoding decoded SUA to SCCP 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 Transcoding message SCCP -> XUA -Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), - PART(T=Protocol Class,L=4,D=00000081), - PART(T=Destination Address,L=32,D=0001000580010014000000040a00010453840900170000008003000800000007), - PART(T=Source Address,L=32,D=0001000580010014000000040c00010444872000206500008003000800000006), - PART(T=Data,L=154,D=6581974804260001984904510103df6c8188a181850201440201073080a780a08004012b30803012830110840107850791445776671697860120300682011884010400000000a306040142840105a306040151840105a306040131840105a309040112840105820102a309040111840105810101a306040114840100a30b0401418401043003830110a30b040141840104300382011800000000) +Decoded SUA: HDR=(CL:CLDT,V=0,LEN=0), PART(T=Protocol Class,L=4,D=00000081), PART(T=Destination Address,L=32,D=0001000580010014000000040a00010453840900170000008003000800000007), PART(T=Source Address,L=32,D=0001000580010014000000040c00010444872000206500008003000800000006), PART(T=Data,L=154,D=6581974804260001984904510103df6c8188a181850201440201073080a780a08004012b30803012830110840107850791445776671697860120300682011884010400000000a306040142840105a306040151840105a306040131840105a309040112840105820102a309040111840105810101a306040114840100a30b0401418401043003830110a30b040141840104300382011800000000) Re-Encoding decoded SUA to SCCP 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 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Id9084d0e0f976bb374186db93d6ff8062b99e238 Gerrit-Change-Number: 16051 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:35:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:35:45 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Make sure all AS are shutdown when test finishes In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16040 ) Change subject: stp: Make sure all AS are shutdown when test finishes ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I177441b2d43298b3836ccf78fe11267333e80665 Gerrit-Change-Number: 16040 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 Nov 2019 21:35:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:35:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:35:55 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Make sure all AS are shutdown when test finishes In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16040 ) Change subject: stp: Make sure all AS are shutdown when test finishes ...................................................................... stp: Make sure all AS are shutdown when test finishes This way traffic modes set dynamically by peers are cleared and can be reset by next tests easily. Change-Id: I177441b2d43298b3836ccf78fe11267333e80665 --- M stp/STP_Tests.ttcn M stp/STP_Tests_M3UA.ttcn 2 files changed, 56 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/stp/STP_Tests.ttcn b/stp/STP_Tests.ttcn index 023c53d..82bc03b 100644 --- a/stp/STP_Tests.ttcn +++ b/stp/STP_Tests.ttcn @@ -170,6 +170,8 @@ /* expect to receive it via IPA */ f_IPA_exp(0, sccp_enc); + + f_clear_m3ua(); } /* test routing an SCCP message from IPA ASP to M3UA ASP */ @@ -199,6 +201,8 @@ var template (present) M3UA_Protocol_Data rx_pd; rx_pd := tr_M3UA_protocol_data(pc_sender, pc_receiver, c_M3UA_SI_SCCP, '00'O, '00'O, '00'O, sccp_enc); f_M3UA_exp(0, tr_M3UA_DATA(rctx_receiver, rx_pd)); + + f_clear_m3ua(); } /* test routing an SCCP message from IPA ASP to M3UA ASP while patching PC into SCCP addresses */ @@ -233,6 +237,8 @@ rx_pd := tr_M3UA_protocol_data(pc_sender, pc_receiver, c_M3UA_SI_SCCP, '00'O, '00'O, '00'O, enc_PDU_SCCP(sccp_exp)); f_M3UA_exp(0, tr_M3UA_DATA(rctx_receiver, rx_pd)); + + f_clear_m3ua(); } diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn index 5c15c6f..c550d40 100644 --- a/stp/STP_Tests_M3UA.ttcn +++ b/stp/STP_Tests_M3UA.ttcn @@ -38,6 +38,7 @@ integer mp_stp_m3ua_port := 2905; integer mp_stp_m3ua_clnt_port := 2906; integer mp_local_m3ua_port := 9999; + integer mp_recovery_timeout_msec := 2000; } private const integer NR_M3UA := 3; /* number of M3UA clients in ATS */ @@ -103,6 +104,12 @@ g_m3ua_conn_id[i] := res.connId; } +friend function f_M3UA_close(integer i) runs on RAW_M3UA_CT { + var Result res; + res := M3UA_CodecPort_CtrlFunct.f_IPL4_close(M3UA[i], g_m3ua_conn_id[i], {sctp:=valueof(ts_SCTP)}); + g_m3ua_conn_id[i] := 0; +} + friend function f_M3UA_listen(integer i) runs on RAW_M3UA_CT { var Result res; res := M3UA_CodecPort_CtrlFunct.f_IPL4_listen(M3UA[i], mp_local_ip, mp_local_m3ua_port+i, @@ -126,6 +133,19 @@ } } +friend function f_clear_m3ua() runs on RAW_M3UA_CT { + var integer i; + + log("Clearing M3UA..."); + + for (i := 0; i < NR_M3UA; i:=i+1) { + f_M3UA_close(i); + } + /* Wait for recovery timer to trigger and shutdown all AS: */ + f_sleep(int2float(mp_recovery_timeout_msec)/1000.0 + 0.5); + setverdict(pass, "M3UA cleared"); +} + friend function f_init_m3ua_srv() runs on RAW_M3UA_CT { var integer i; var PortEvent sctp_evt; @@ -192,6 +212,7 @@ f_init_m3ua(); f_M3UA_asp_up(0); f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_INACTIVE, *)); + f_clear_m3ua(); } /* Test the heartbeat procedure without optional heartbeat data payload */ @@ -200,6 +221,7 @@ f_M3UA_asp_up(0); f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_INACTIVE, *)); f_M3UA_beat(0, omit); + f_clear_m3ua(); } /* Test the heartbeat procedure with optional heartbeat data payload */ @@ -208,30 +230,35 @@ f_M3UA_asp_up(0); f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_INACTIVE, *)); f_M3UA_beat(0, 'a1a2a3a4a5'O); + f_clear_m3ua(); } /* Test the ASP-ACTIVATE procedure (without traffic-mode or routing ctx) */ testcase TC_asp_act() runs on RAW_M3UA_CT { f_init_m3ua(); f_M3UA_asp_up_act(0); + f_clear_m3ua(); } /* Test the ASP-ACTIVATE procedure with traffic-mode override */ testcase TC_asp_act_override() runs on RAW_M3UA_CT { f_init_m3ua(); f_M3UA_asp_up_act(0, c_M3UA_TMT_override, omit); + f_clear_m3ua(); } /* Test the ASP-ACTIVATE procedure with traffic-mode override */ testcase TC_asp_act_loadshare() runs on RAW_M3UA_CT { f_init_m3ua(); f_M3UA_asp_up_act(0, c_M3UA_TMT_loadshare, omit); + f_clear_m3ua(); } /* Test the ASP-ACTIVATE procedure with traffic-mode broadcast */ testcase TC_asp_act_broadcast() runs on RAW_M3UA_CT { f_init_m3ua(); f_M3UA_asp_up_act(0, c_M3UA_TMT_broadcast, omit); + f_clear_m3ua(); } /* Test if traffic is routed from idx_tx/pc_tx to idx_rx/pc_rx */ @@ -274,6 +301,7 @@ /* verify traffic is routed from sender to new receiver */ f_test_traffic(0, rctx_sender, pc_sender, 2, rctx_receiver, pc_receiver); + f_clear_m3ua(); } private altstep as_count_rx(integer idx, template (present) PDU_M3UA exp, inout integer counter) @@ -332,6 +360,8 @@ } } setverdict(pass); + + f_clear_m3ua(); } /* test "traffic-mode broadcast" behavior */ @@ -373,6 +403,8 @@ f_M3UA_exp(2, tr_M3UA_DATA(rctx_receiver, rx_pd)); } setverdict(pass); + + f_clear_m3ua(); } private function f_M3UA_rkm_register(OCT4 id, OCT3 dpc, OCT4 rctx, @@ -390,6 +422,8 @@ f_M3UA_send(0, ts_M3UA_REG_REQ({ts_M3UA_rkey(id:='00000099'O, dpc:='aabbcc'O)})); f_M3UA_exp(0, tr_M3UA_REG_RSP({tr_M3UA_reg_res(id:='00000099'O, status:=c_M3UA_REGSTS_ERR_EPERM, rctx:=?)})); + + f_clear_m3ua(); } /* Send RKM registration; expect OK as RCTX does match config */ @@ -402,6 +436,8 @@ f_M3UA_send(0, ts_M3UA_REG_REQ({ts_M3UA_rkey(id:='10000099'O, dpc:=dpc, rctx:=rctx)})); f_M3UA_exp(0, tr_M3UA_REG_RSP({tr_M3UA_reg_res(id:='10000099'O, status:=c_M3UA_REGSTS_SUCCESS, rctx:=rctx)})); + + f_clear_m3ua(); } /* Send RKM registration; expect OK as dynamic not permitted */ @@ -415,6 +451,8 @@ rctx:=?)})); f_vty_config2(VTY, {"cs7 instance 0"}, "xua rkm routing-key-allocation static-only"); + + f_clear_m3ua(); } /* try to de-register a routing key that was never registered -> error */ @@ -422,6 +460,7 @@ f_init_m3ua(); f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(1023,4)))); f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_ERR_NOT_REG)})); + f_clear_m3ua(); } /* try to de-register a routing key that is invalid (non-existant) -> error */ @@ -429,6 +468,7 @@ f_init_m3ua(); f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(1234,4)))); f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_ERR_INVAL_RCTX)})); + f_clear_m3ua(); } /* try to de-register a routing key that was registered -> OK*/ @@ -436,6 +476,7 @@ f_init_m3ua(); f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(1023,4)))); f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_SUCCESS)})); + f_clear_m3ua(); } /* try to de-register a routing key for an active ASP -> ERROR */ @@ -455,6 +496,8 @@ f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(rctx))); f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_ERR_ASP_ACTIVE)})); /* FIXME: we now may have changed the state on the STP side! */ + + f_clear_m3ua(); } /*********************************************************************** @@ -497,6 +540,8 @@ f_init_m3ua_srv(); f_M3UA_CLNT_asp_up(M3UA_SRV(0)); + + f_clear_m3ua(); } /* Expect inbound connection from ASP/SCTP-client, followed by ASP-UP + ASP-ACT */ @@ -505,6 +550,8 @@ f_init_m3ua_srv(); f_M3UA_CLNT_asp_up_act(M3UA_SRV(0)); + + f_clear_m3ua(); } /* Test traffic being routed through "server" side STP (M3UA SG), coming back in "client" @@ -525,6 +572,8 @@ /* verify traffic is routed from sender to [sole] receiver */ f_test_traffic(0, rctx_sender, pc_sender, M3UA_SRV(0), rctx_receiver, pc_receiver); + + f_clear_m3ua(); } /* Test traffic being routed through "client" side STP (M3UA ASP), coming back in "server" @@ -545,6 +594,7 @@ /* verify traffic is routed from sender to [sole] receiver */ f_test_traffic(M3UA_SRV(0), rctx_sender, pc_sender, 0, rctx_receiver, pc_receiver); + f_clear_m3ua(); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16040 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I177441b2d43298b3836ccf78fe11267333e80665 Gerrit-Change-Number: 16040 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 12 21:35:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 12 Nov 2019 21:35:55 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: osmo-stp.cfg: Fix missing ASP relation in AS In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16041 ) Change subject: stp: osmo-stp.cfg: Fix missing ASP relation in AS ...................................................................... stp: osmo-stp.cfg: Fix missing ASP relation in AS Change-Id: Idcfbff548076abc17f0f6c9b13a820c8ef3033e1 --- M stp/osmo-stp.cfg 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg index d8630d2..5a1741f 100644 --- a/stp/osmo-stp.cfg +++ b/stp/osmo-stp.cfg @@ -55,6 +55,7 @@ routing-key 1023 23 as as-receiver m3ua asp asp-receiver0 + asp asp-receiver1 routing-key 1042 42 as mahlzeit ipa routing-key 0 5 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16041 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idcfbff548076abc17f0f6c9b13a820c8ef3033e1 Gerrit-Change-Number: 16041 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 12:27:36 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 13 Nov 2019 12:27:36 +0000 Subject: Change in osmo-bts[master]: Unify common and bts-trx power control loop VTY command References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16058 ) Change subject: Unify common and bts-trx power control loop VTY command ...................................................................... Unify common and bts-trx power control loop VTY command osmotrx specific commands are marked as deprecated and their implementation changed to set the common code variables. osmo-bts-trx specific power control loop code is also changed to use the common variables. Related: OS#1851 Change-Id: I8fb310b2aee7780982bd9394bc5e758dfd66be25 --- M doc/examples/trx/osmo-bts-trx-calypso.cfg M include/osmo-bts/phy_link.h M src/osmo-bts-trx/loops.c M src/osmo-bts-trx/main.c M src/osmo-bts-trx/trx_vty.c 5 files changed, 17 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/58/16058/1 diff --git a/doc/examples/trx/osmo-bts-trx-calypso.cfg b/doc/examples/trx/osmo-bts-trx-calypso.cfg index 6b52fd2..d8cddbd 100644 --- a/doc/examples/trx/osmo-bts-trx-calypso.cfg +++ b/doc/examples/trx/osmo-bts-trx-calypso.cfg @@ -26,7 +26,6 @@ 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 @@ -36,3 +35,4 @@ band 900 trx 0 phy 0 instance 0 + uplink-power-target -65 diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 316a1ba..b2e7c0e 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -45,8 +45,6 @@ uint16_t base_port_remote; struct osmo_fd trx_ofd_clk; bool trx_ta_loop; - bool trx_ms_power_loop; - int8_t trx_target_rssi; uint32_t clock_advance; uint32_t rts_advance; bool use_legacy_setbsic; diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index b2b163a..70e566d 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -147,7 +148,6 @@ static void ms_power_clock(struct gsm_lchan *lchan, struct l1sched_chan_state *chan_state) { struct gsm_bts_trx *trx = lchan->ts->trx; - struct phy_instance *pinst = trx_phy_instance(trx); int rssi; int i; @@ -188,9 +188,9 @@ /* change RSSI */ LOGPLCHAN(lchan, DLOOP, LOGL_DEBUG, "Lowest RSSI: %d Target RSSI: %d Current " "MS power: %d (%d dBm)\n", rssi, - pinst->phy_link->u.osmotrx.trx_target_rssi, lchan->ms_power_ctrl.current, + trx->bts->ul_power_target, lchan->ms_power_ctrl.current, ms_pwr_dbm(trx->bts->band, lchan->ms_power_ctrl.current)); - ms_power_diff(lchan, pinst->phy_link->u.osmotrx.trx_target_rssi - rssi); + ms_power_diff(lchan, trx->bts->ul_power_target - rssi); } @@ -247,7 +247,7 @@ struct phy_instance *pinst = trx_phy_instance(l1t->trx); /* if MS power control loop is enabled, handle it */ - if (pinst->phy_link->u.osmotrx.trx_ms_power_loop) + if (trx_ms_pwr_ctrl_is_osmo(l1t->trx)) ms_power_val(lchan, chan_state, rssi); /* if TA loop is enabled, handle it */ @@ -261,12 +261,11 @@ { struct gsm_lchan *lchan = &l1t->trx->ts[L1SAP_CHAN2TS(chan_nr)] .lchan[l1sap_chan2ss(chan_nr)]; - struct phy_instance *pinst = trx_phy_instance(l1t->trx); if (lchan->ms_power_ctrl.fixed) return; - if (pinst->phy_link->u.osmotrx.trx_ms_power_loop) + if (trx_ms_pwr_ctrl_is_osmo(l1t->trx)) ms_power_clock(lchan, chan_state); /* count the number of SACCH clocks */ diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index cf40ea3..b5841b0 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -124,6 +124,8 @@ int bts_model_trx_init(struct gsm_bts_trx *trx) { + /* Enable software based algo for MS Power Control Loop: */ + trx->ms_power_control = true; return 0; } @@ -136,8 +138,6 @@ plink->u.osmotrx.clock_advance = 20; plink->u.osmotrx.rts_advance = 5; plink->u.osmotrx.trx_ta_loop = true; - plink->u.osmotrx.trx_ms_power_loop = false; - plink->u.osmotrx.trx_target_rssi = -10; /* attempt use newest TRXD version by default: */ plink->u.osmotrx.trxd_hdr_ver_max = TRX_DATA_FORMAT_VER; } diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c index 86f5712..5c6aea3 100644 --- a/src/osmo-bts-trx/trx_vty.c +++ b/src/osmo-bts-trx/trx_vty.c @@ -160,26 +160,28 @@ return CMD_SUCCESS; } -DEFUN(cfg_phy_ms_power_loop, cfg_phy_ms_power_loop_cmd, +DEFUN_DEPRECATED(cfg_phy_ms_power_loop, cfg_phy_ms_power_loop_cmd, "osmotrx ms-power-loop <-127-127>", OSMOTRX_STR "Enable MS power control loop\nTarget RSSI value (transceiver specific, " "should be 6dB or more above noise floor)\n") { - struct phy_link *plink = vty->index; + vty_out (vty, "'osmotrx ms-power-loop' is deprecated, use 'uplink-power-target' instead%s", VTY_NEWLINE); - plink->u.osmotrx.trx_target_rssi = atoi(argv[0]); - plink->u.osmotrx.trx_ms_power_loop = true; + vty_bts->ul_power_target = atoi(argv[0]); + /* Remark: workaround after deprecation only works for 1st TRX */ + vty_bts->c0->ms_power_control = true; return CMD_SUCCESS; } -DEFUN(cfg_phy_no_ms_power_loop, cfg_phy_no_ms_power_loop_cmd, +DEFUN_DEPRECATED(cfg_phy_no_ms_power_loop, cfg_phy_no_ms_power_loop_cmd, "no osmotrx ms-power-loop", NO_STR OSMOTRX_STR "Disable MS power control loop\n") { - struct phy_link *plink = vty->index; + vty_out (vty, "'no osmotrx ms-power-loop' is deprecated, use 'ms-power-control dsp' instead%s", VTY_NEWLINE); - plink->u.osmotrx.trx_ms_power_loop = false; + /* Remark: workaround after deprecation only works for 1st TRX */ + vty_bts->c0->ms_power_control = false; return CMD_SUCCESS; } @@ -525,10 +527,6 @@ vty_out(vty, " osmotrx ip remote %s%s", plink->u.osmotrx.remote_ip, VTY_NEWLINE); - if (plink->u.osmotrx.trx_ms_power_loop) - vty_out(vty, " osmotrx ms-power-loop %d%s", plink->u.osmotrx.trx_target_rssi, VTY_NEWLINE); - else - vty_out(vty, " no osmotrx ms-power-loop%s", VTY_NEWLINE); vty_out(vty, " %sosmotrx timing-advance-loop%s", (plink->u.osmotrx.trx_ta_loop) ? "" : "no ", VTY_NEWLINE); if (plink->u.osmotrx.base_port_local) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I8fb310b2aee7780982bd9394bc5e758dfd66be25 Gerrit-Change-Number: 16058 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 12:27:37 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 13 Nov 2019 12:27:37 +0000 Subject: Change in osmo-bts[master]: Change gsm_bts_trx field to bool and rename it References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16059 ) Change subject: Change gsm_bts_trx field to bool and rename it ...................................................................... Change gsm_bts_trx field to bool and rename it Thies field is used to store and retrieve whether MS power needs to be calculated and updated by osmo-bts software or autonomously by lower layers. Previous name was not clear and may have been understood as indicating whether MS Power Control loop is done or not in general, and the responsible for that is located under lchan's ms_power_ctrl.fixed. Related: OS#1851 Change-Id: Ic690ab69866a7377f1597e24aa7b0214831c1cbe --- M include/osmo-bts/bts.h M include/osmo-bts/gsm_data_shared.h M src/common/bts.c M src/common/vty.c M src/osmo-bts-trx/main.c M src/osmo-bts-trx/trx_vty.c M tests/power/power_test.c 7 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/59/16059/1 diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index 5c719f9..63412f9 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -49,7 +49,7 @@ uint8_t num_agch(struct gsm_bts_trx *trx, const char * arg); void bts_update_status(enum bts_global_status which, int on); -int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx); +bool trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx); struct gsm_time *get_time(struct gsm_bts *bts); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 1445ed2..8678ea5 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -417,7 +417,7 @@ struct trx_power_params power_params; - int ms_power_control; + bool ms_pwr_ctl_soft; /* is power control loop done by osmocom software? */ struct { void *l1h; diff --git a/src/common/bts.c b/src/common/bts.c index 60e27cc..3809eb3 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -778,9 +778,9 @@ return sup > 0; } -int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx) +bool trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx) { - return trx->ms_power_control == 1; + return trx->ms_pwr_ctl_soft; } struct gsm_time *get_time(struct gsm_bts *bts) diff --git a/src/common/vty.c b/src/common/vty.c index e775d99..6ae82d1 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -332,7 +332,7 @@ vty_out(vty, " power-ramp step-interval %d%s", tpp->ramp.step_interval_sec, VTY_NEWLINE); vty_out(vty, " ms-power-control %s%s", - trx->ms_power_control == 0 ? "dsp" : "osmo", + trx->ms_pwr_ctl_soft == 0 ? "dsp" : "osmo", VTY_NEWLINE); vty_out(vty, " phy %u instance %u%s", pinst->phy_link->num, pinst->num, VTY_NEWLINE); @@ -790,7 +790,7 @@ { struct gsm_bts_trx *trx = vty->index; - trx->ms_power_control = argv[0][0] == 'd' ? 0 : 1; + trx->ms_pwr_ctl_soft = !strcmp(argv[0], "osmo"); return CMD_SUCCESS; } diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index b5841b0..e962e9a 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -125,7 +125,7 @@ int bts_model_trx_init(struct gsm_bts_trx *trx) { /* Enable software based algo for MS Power Control Loop: */ - trx->ms_power_control = true; + trx->ms_pwr_ctl_soft = true; return 0; } diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c index 5c6aea3..b34114c 100644 --- a/src/osmo-bts-trx/trx_vty.c +++ b/src/osmo-bts-trx/trx_vty.c @@ -169,7 +169,7 @@ vty_bts->ul_power_target = atoi(argv[0]); /* Remark: workaround after deprecation only works for 1st TRX */ - vty_bts->c0->ms_power_control = true; + vty_bts->c0->ms_pwr_ctl_soft = true; return CMD_SUCCESS; } @@ -181,7 +181,7 @@ vty_out (vty, "'no osmotrx ms-power-loop' is deprecated, use 'ms-power-control dsp' instead%s", VTY_NEWLINE); /* Remark: workaround after deprecation only works for 1st TRX */ - vty_bts->c0->ms_power_control = false; + vty_bts->c0->ms_pwr_ctl_soft = false; return CMD_SUCCESS; } diff --git a/tests/power/power_test.c b/tests/power/power_test.c index a46a430..8df6d69 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -48,7 +48,7 @@ ts.trx = &trx; trx.bts = &bts; bts.band = GSM_BAND_1800; - trx.ms_power_control = 1; + trx.ms_pwr_ctl_soft = true; bts.ul_power_target = -75; lchan->state = LCHAN_S_NONE; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic690ab69866a7377f1597e24aa7b0214831c1cbe Gerrit-Change-Number: 16059 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 12:27:38 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 13 Nov 2019 12:27:38 +0000 Subject: Change in osmo-bts[master]: Change gsm_lchan field fixed to bool References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16060 ) Change subject: Change gsm_lchan field fixed to bool ...................................................................... Change gsm_lchan field fixed to bool Change-Id: I715ef151b67a21e325c574585a257e71b4b0ce2a --- M include/osmo-bts/gsm_data_shared.h M src/common/rsl.c M tests/power/power_test.c 3 files changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/16060/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 8678ea5..5061310 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -323,7 +323,7 @@ /* power handling */ struct { uint8_t current; - uint8_t fixed; + bool fixed; } ms_power_ctrl; struct msgb *pending_rel_ind_msg; diff --git a/src/common/rsl.c b/src/common/rsl.c index d8ce016..9a4afb3 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -999,7 +999,7 @@ * cleared, or we would enable encryption on PDCH with parameters remaining from the TCH. */ lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); lchan->ms_power_ctrl.current = lchan->ms_power; - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; lchan->rsl_cmode = 0; lchan->tch_mode = 0; memset(&lchan->encr, 0, sizeof(lchan->encr)); @@ -1104,7 +1104,7 @@ /* Initialize channel defaults */ lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); lchan->ms_power_ctrl.current = lchan->ms_power; - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); @@ -1156,7 +1156,7 @@ if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) { lchan->ms_power = *TLVP_VAL(&tp, RSL_IE_MS_POWER); lchan->ms_power_ctrl.current = lchan->ms_power; - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; } /* 9.3.24 Timing Advance */ if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1)) @@ -1165,12 +1165,12 @@ /* 9.3.32 BS Power Parameters */ /* 9.3.31 MS Power Parameters */ if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; else { /* Spec explicitly states BTS should only perform * autonomous MS power control loop in BTS if 'MS Power * Parameters' IE is present! */ - lchan->ms_power_ctrl.fixed = 1; + lchan->ms_power_ctrl.fixed = true; } /* 9.3.16 Physical Context */ @@ -1642,16 +1642,16 @@ /* 9.3.31 MS Power Parameters (O) */ if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; else { /* Spec explicitly states BTS should only perform * autonomous MS power control loop in BTS if 'MS Power * Parameters' IE is present! */ - lchan->ms_power_ctrl.fixed = 1; + lchan->ms_power_ctrl.fixed = true; } /* Only set current to lchan->ms_power if actual value of current - in dBm > value in dBm from lchan->ms_power, or if fixed=1. */ + in dBm > value in dBm from lchan->ms_power, or if fixed. */ if (lchan->ms_power_ctrl.fixed) { lchan->ms_power_ctrl.current = lchan->ms_power; } else { diff --git a/tests/power/power_test.c b/tests/power/power_test.c index 8df6d69..dbae8fa 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -68,11 +68,11 @@ apply_power_test(lchan, -100, 1, 0); /* Fix it and jump down */ - lchan->ms_power_ctrl.fixed = 1; + lchan->ms_power_ctrl.fixed = true; apply_power_test(lchan, -60, 0, 0); /* And leave it again */ - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; apply_power_test(lchan, -40, 1, 15); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16060 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I715ef151b67a21e325c574585a257e71b4b0ce2a Gerrit-Change-Number: 16060 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 12:27:38 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 13 Nov 2019 12:27:38 +0000 Subject: Change in osmo-bts[master]: rsl: Remove unneeded duplicate reset on some lchan fields References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16061 ) Change subject: rsl: Remove unneeded duplicate reset on some lchan fields ...................................................................... rsl: Remove unneeded duplicate reset on some lchan fields Both ms_power and ms_power_ctrl are reset to 0 again further below. Change-Id: Ia2a5da068d440232361d57bd5ac33eddebf05ebe --- M src/common/rsl.c 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/61/16061/1 diff --git a/src/common/rsl.c b/src/common/rsl.c index 9a4afb3..f88d2d7 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -997,9 +997,6 @@ { /* These values don't apply to PDCH, just clear them. Particularly the encryption must be * cleared, or we would enable encryption on PDCH with parameters remaining from the TCH. */ - lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); - lchan->ms_power_ctrl.current = lchan->ms_power; - lchan->ms_power_ctrl.fixed = false; lchan->rsl_cmode = 0; lchan->tch_mode = 0; memset(&lchan->encr, 0, sizeof(lchan->encr)); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia2a5da068d440232361d57bd5ac33eddebf05ebe Gerrit-Change-Number: 16061 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 12:27:38 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 13 Nov 2019 12:27:38 +0000 Subject: Change in osmo-bts[master]: Move and rename gsm_lchan.ms_power field References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16062 ) Change subject: Move and rename gsm_lchan.ms_power field ...................................................................... Move and rename gsm_lchan.ms_power field Make it clear that it contains the maximum MS power level (TS 05.05) and not the one to be used. The one aimed at is in ms_power_ctrl.current. Since it's used in related code, move it inside the ms_power_ctrl struct too. Related: OS#1851 Change-Id: Ib264ec7dac87355cef6415461ed74bd8e9c8ca52 --- M include/osmo-bts/gsm_data_shared.h M src/common/power_control.c M src/common/rsl.c M src/common/vty.c M src/osmo-bts-trx/loops.c M src/osmo-bts-virtual/l1_if.c 6 files changed, 18 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/62/16062/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 5061310..8a52fe9 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -199,9 +199,6 @@ /* State */ enum gsm_lchan_state state; const char *broken_reason; - /* Power levels for MS and BTS */ - uint8_t bs_power; - uint8_t ms_power; /* Encryption information */ struct { uint8_t alg_id; @@ -323,8 +320,11 @@ /* power handling */ struct { uint8_t current; + uint8_t max; bool fixed; } ms_power_ctrl; + /* Power levels for BTS */ + uint8_t bs_power; struct msgb *pending_rel_ind_msg; diff --git a/src/common/power_control.c b/src/common/power_control.c index f467cd5..38a7fb7 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -83,8 +83,8 @@ /* Don't ask for smaller ms power level than the one set * by BSC upon RSL CHAN ACT */ - if (new_pwr < lchan->ms_power) - new_pwr = lchan->ms_power; + if (new_pwr < lchan->ms_power_ctrl.max) + new_pwr = lchan->ms_power_ctrl.max; if (lchan->ms_power_ctrl.current != new_pwr) { lchan->ms_power_ctrl.current = new_pwr; diff --git a/src/common/rsl.c b/src/common/rsl.c index f88d2d7..86be47c 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1002,7 +1002,6 @@ memset(&lchan->encr, 0, sizeof(lchan->encr)); memset(&lchan->ho, 0, sizeof(lchan->ho)); lchan->bs_power = 0; - lchan->ms_power = 0; memset(&lchan->ms_power_ctrl, 0, sizeof(lchan->ms_power_ctrl)); lchan->rqd_ta = 0; copy_sacch_si_to_lchan(lchan); @@ -1099,8 +1098,8 @@ gsm_lchans_name(lchan->state)); /* Initialize channel defaults */ - lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); - lchan->ms_power_ctrl.current = lchan->ms_power; + lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); + lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; lchan->ms_power_ctrl.fixed = false; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); @@ -1151,8 +1150,8 @@ lchan->bs_power = *TLVP_VAL(&tp, RSL_IE_BS_POWER); /* 9.3.13 MS Power */ if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) { - lchan->ms_power = *TLVP_VAL(&tp, RSL_IE_MS_POWER); - lchan->ms_power_ctrl.current = lchan->ms_power; + lchan->ms_power_ctrl.max = *TLVP_VAL(&tp, RSL_IE_MS_POWER); + lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; lchan->ms_power_ctrl.fixed = false; } /* 9.3.24 Timing Advance */ @@ -1633,7 +1632,7 @@ return rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &dch->chan_nr, NULL, msg); pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; - lchan->ms_power = pwr; + lchan->ms_power_ctrl.max = pwr; LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx MS POWER CONTROL %" PRIu8 "\n", pwr); @@ -1650,17 +1649,17 @@ /* Only set current to lchan->ms_power if actual value of current in dBm > value in dBm from lchan->ms_power, or if fixed. */ if (lchan->ms_power_ctrl.fixed) { - lchan->ms_power_ctrl.current = lchan->ms_power; + lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; } else { - max_pwr = ms_pwr_dbm(bts->band, lchan->ms_power); + max_pwr = ms_pwr_dbm(bts->band, lchan->ms_power_ctrl.max); curr_pwr = ms_pwr_dbm(bts->band, lchan->ms_power_ctrl.current); if (max_pwr < 0 || curr_pwr < 0) { LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Unable to calculate power levels to dBm: %" PRIu8 " -> %d, %" PRIu8 " -> %d\n", - lchan->ms_power, max_pwr, + lchan->ms_power_ctrl.max, max_pwr, lchan->ms_power_ctrl.current, curr_pwr); } else if (curr_pwr > max_pwr) { - lchan->ms_power_ctrl.current = lchan->ms_power; + lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; } } diff --git a/src/common/vty.c b/src/common/vty.c index 6ae82d1..206b166 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -1173,7 +1173,7 @@ vty_out(vty, " BS Power: %d dBm, MS Power: %u dBm%s", lchan->ts->trx->nominal_power - lchan->ts->trx->max_power_red - lchan->bs_power*2, - ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power), + ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power_ctrl.max), VTY_NEWLINE); vty_out(vty, " Channel Mode / Codec: %s%s", get_value_string(gsm48_cmode_names, lchan->tch_mode), diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index 70e566d..f44dffa 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -63,11 +63,11 @@ lchan->ms_power_ctrl.current, gsm_band_name(band)); return; } - bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power); + bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.max); if (bsc_max_dbm < 0) { LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", - lchan->ms_power, gsm_band_name(band)); + lchan->ms_power_ctrl.max, gsm_band_name(band)); return; } diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c index 58f4781..ab2cb76 100644 --- a/src/osmo-bts-virtual/l1_if.c +++ b/src/osmo-bts-virtual/l1_if.c @@ -320,7 +320,7 @@ DEBUGPFN(DMEAS, fn, "RX L1 frame %s chan_nr=0x%02x MS pwr=%ddBm rssi=%.1f dBFS " "ber=%.2f%% (%d/%d bits) L1_ta=%d rqd_ta=%d toa=%.2f\n", - gsm_lchan_name(lchan), chan_nr, ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power), + gsm_lchan_name(lchan), chan_nr, ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power_ctrl.max), rssi, ber*100, n_errors, n_bits_total, lchan->meas.l1_info[1], lchan->rqd_ta, toa); l1if_fill_meas_res(&l1sap, chan_nr, lchan->rqd_ta + toa, ber, rssi, fn); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16062 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib264ec7dac87355cef6415461ed74bd8e9c8ca52 Gerrit-Change-Number: 16062 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 12:30:57 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 13 Nov 2019 12:30:57 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 ) Change subject: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare ...................................................................... Patch Set 1: > Patch Set 1: Code-Review+1 > > you removed "mahlzeit". outrageous! Sorry for that, I decided changing it to have more descriptive names, otherwise it's becoming too messy :) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iae213c58598cc0207503fd10f09d2d57aab941fe Gerrit-Change-Number: 16042 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 13 Nov 2019 12:30:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 15:45:50 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 13 Nov 2019 15:45:50 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16030/2/src/sockaddr_str.c File src/sockaddr_str.c: https://gerrit.osmocom.org/c/libosmocore/+/16030/2/src/sockaddr_str.c at 409 PS2, Line 409: /*! Convert osmo_sockaddr_str address string to IPv4 address data in host-byte-order. > The API (osmo_sockaddr_str_to_32n) was already defined correctly, since it states it converted from [?] no, that is not an option. osmo_sockaddr_str_to_32n() is already being used in programs. Regardless of what the API doc said and what I was thinking when using that function, if we modify the effect of this function, then we break those other programs. They are using host-byte-order and they need host-byte-order, and are calling osmo_sockaddr_str_{to,from}_32n() to obtain that. They should move to *_32h() whenever ready, we cannot change the behavior of this function without renaming. osmo_sockaddr_str_to_32() already does network byte order correctly. There we can just fix the API doc, because it remains ABI compatible. Actually almost no-one anywhere needs host byte order, except our MNCC socket it seems. I wish I had never added _32n()... but now that it's there, I followed through with the _32h() version. (should be just deprecate without replacement instead?) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 13 Nov 2019 15:45:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 15:47:01 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 13 Nov 2019 15:47:01 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 7: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h File include/osmocom/core/utils.h: https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h at 313 PS7, Line 313: _str = (char*)talloc_named_const(CTX, _len, __func__); \ > Why not implementing talloc_realloz_size() with realloc() in pseudotalloc? because pseudotalloc doesn't know the size of the allocated buffer. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 13 Nov 2019 15:47:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 15:49:46 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 13 Nov 2019 15:49:46 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 7: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h File include/osmocom/core/utils.h: https://gerrit.osmocom.org/c/libosmocore/+/15957/7/include/osmocom/core/utils.h at 313 PS7, Line 313: _str = (char*)talloc_named_const(CTX, _len, __func__); \ > because pseudotalloc doesn't know the size of the allocated buffer. hmm, now that I think of it, realloc() would work. But this is much simpler, particularly because we don't need to preserve the data in the buffer. A realloc would require the OS to keep the data intact, so free and new alloc is actually my favorite now anyway. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 13 Nov 2019 15:49:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:03:22 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 13 Nov 2019 16:03:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 ) Change subject: msc: overhaul voice call testing ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/2/library/BSSMAP_Templates.ttcn File library/BSSMAP_Templates.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938/2/library/BSSMAP_Templates.ttcn at a410 PS2, Line 410: template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr, : uint16_t udp_port, : integer len) := { > this looks odd. [?] curious, maybe it's a typo of sorts, i'll check... Now I know, we are lacking a tr_* variant of this and were somehow using the ts_* one for receiving an Assignment Request. I never noticed the ts_ name and assumed that the tr_ needs fixing. Adding a tr_. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:03:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:08:26 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 13 Nov 2019 16:08:26 +0000 Subject: Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Proper Makefile targets In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 ) Change subject: sysmoOCTSIM: Proper Makefile targets ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba Gerrit-Change-Number: 16056 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Wed, 13 Nov 2019 16:08:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:08:58 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 13 Nov 2019 16:08:58 +0000 Subject: Change in osmo-ccid-firmware[master]: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 ) Change subject: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc Gerrit-Change-Number: 16057 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Wed, 13 Nov 2019 16:08:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:09:20 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 13 Nov 2019 16:09:20 +0000 Subject: Change in docker-playground[master]: Update osmo-*/Dockerfile to log stdout+stderr of process to log file References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/16063 ) Change subject: Update osmo-*/Dockerfile to log stdout+stderr of process to log file ...................................................................... Update osmo-*/Dockerfile to log stdout+stderr of process to log file This way we get VTY parsing failures as well as backtraces upon process crash. Related: OS#4212 Change-Id: I9493ff73ef27c7c6d32b00cf827704b3f9cbf86a --- M osmo-bsc-latest/Dockerfile M osmo-bsc-master/Dockerfile M osmo-bts-latest/Dockerfile M osmo-bts-master/Dockerfile M osmo-ggsn-latest/Dockerfile M osmo-ggsn-latest/osmo-ggsn.cfg M osmo-ggsn-master/Dockerfile M osmo-ggsn-master/osmo-ggsn.cfg M osmo-hlr-latest/Dockerfile M osmo-hlr-master/Dockerfile M osmo-hnbgw-latest/Dockerfile M osmo-hnbgw-master/Dockerfile M osmo-mgw-latest/Dockerfile M osmo-mgw-latest/osmo-mgw.cfg M osmo-mgw-master/Dockerfile M osmo-msc-latest/Dockerfile M osmo-msc-master/Dockerfile M osmo-nitb-latest/Dockerfile M osmo-nitb-master/Dockerfile M osmo-remsim-latest/Dockerfile M osmo-remsim-master/Dockerfile M osmo-sgsn-latest/Dockerfile M osmo-sgsn-master/Dockerfile M osmo-sip-latest/Dockerfile M osmo-sip-master/Dockerfile M osmo-stp-latest/Dockerfile M osmo-stp-latest/osmo-stp.cfg M osmo-stp-master/Dockerfile M osmo-stp-master/osmo-stp.cfg 29 files changed, 34 insertions(+), 133 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/63/16063/1 diff --git a/osmo-bsc-latest/Dockerfile b/osmo-bsc-latest/Dockerfile index 1682dea..5206a08 100644 --- a/osmo-bsc-latest/Dockerfile +++ b/osmo-bsc-latest/Dockerfile @@ -29,6 +29,6 @@ COPY osmo-bsc.cfg /data/osmo-bsc.cfg WORKDIR /data -CMD ["/usr/bin/osmo-bsc", "-c", "/data/osmo-bsc.cfg"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-bsc -c /data/osmo-bsc.cfg >/data/osmo-bsc.log 2>&1"] EXPOSE 3003 3002 4242 diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index 3c3f90a..75afbb7 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -44,6 +44,6 @@ COPY osmo-bsc.cfg /data/osmo-bsc.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-bsc"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-bsc -c /data/osmo-bsc.cfg >/data/osmo-bsc.log 2>&1"] #EXPOSE diff --git a/osmo-bts-latest/Dockerfile b/osmo-bts-latest/Dockerfile index 05dcb24..05c27fd 100644 --- a/osmo-bts-latest/Dockerfile +++ b/osmo-bts-latest/Dockerfile @@ -33,6 +33,6 @@ WORKDIR /data # send GSMTAP data to .230 which is the ttcn3-sysinfo test -CMD ["/usr/bin/osmo-bts-virtual", "-i", "172.18.0.230"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-bts-virtual -c /data/osmo-bts.cfg -i 172.18.0.230 >>/data/osmo-bts-virtual.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index a7f1145..b73f2ac 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -46,6 +46,6 @@ WORKDIR /data # send GSMTAP data to .230 which is the ttcn3-sysinfo test -CMD ["/usr/local/bin/osmo-bts-virtual", "-i", "172.18.0.230"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-bts-virtual -c /data/osmo-bts.cfg -i 172.18.0.230 >>/data/osmo-bts-virtual.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-ggsn-latest/Dockerfile b/osmo-ggsn-latest/Dockerfile index c1ff3dc..5259d51 100644 --- a/osmo-ggsn-latest/Dockerfile +++ b/osmo-ggsn-latest/Dockerfile @@ -27,6 +27,6 @@ COPY osmo-ggsn.cfg /data/osmo-ggsn.cfg WORKDIR /data -CMD ["/usr/bin/osmo-ggsn"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-ggsn -c /data/osmo-ggsn.cfg >/data/osmo-ggsn.log 2>&1"] EXPOSE 3386/udp 2123/udp 2152/udp 4257/tcp 4260/tcp diff --git a/osmo-ggsn-latest/osmo-ggsn.cfg b/osmo-ggsn-latest/osmo-ggsn.cfg index 5337ac8..59a1c9c 100644 --- a/osmo-ggsn-latest/osmo-ggsn.cfg +++ b/osmo-ggsn-latest/osmo-ggsn.cfg @@ -2,38 +2,11 @@ ! OpenGGSN (0.94.1-adac) configuration saved from vty !! ! -log file /data/openggsn.log - logging filter all 1 - logging color 0 - logging print category 1 - logging timestamp 1 - logging level ip info - logging level tun info - logging level ggsn info - logging level sgsn notice - logging level icmp6 debug - 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 log stderr logging filter all 1 logging color 1 - logging print category 0 - logging timestamp 0 + logging print category 1 + logging timestamp 1 logging level ip info logging level tun info logging level ggsn info diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index f27bef9..3802670 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -38,6 +38,6 @@ COPY osmo-ggsn.cfg /data/osmo-ggsn.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-ggsn"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-ggsn -c /data/osmo-ggsn.cfg >/data/osmo-ggsn.log 2>&1"] EXPOSE 3386/udp 2123/udp 2152/udp 4257/tcp 4260/tcp diff --git a/osmo-ggsn-master/osmo-ggsn.cfg b/osmo-ggsn-master/osmo-ggsn.cfg index 5337ac8..59a1c9c 100644 --- a/osmo-ggsn-master/osmo-ggsn.cfg +++ b/osmo-ggsn-master/osmo-ggsn.cfg @@ -2,38 +2,11 @@ ! OpenGGSN (0.94.1-adac) configuration saved from vty !! ! -log file /data/openggsn.log - logging filter all 1 - logging color 0 - logging print category 1 - logging timestamp 1 - logging level ip info - logging level tun info - logging level ggsn info - logging level sgsn notice - logging level icmp6 debug - 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 log stderr logging filter all 1 logging color 1 - logging print category 0 - logging timestamp 0 + logging print category 1 + logging timestamp 1 logging level ip info logging level tun info logging level ggsn info diff --git a/osmo-hlr-latest/Dockerfile b/osmo-hlr-latest/Dockerfile index b54eef4..f00c2d9 100644 --- a/osmo-hlr-latest/Dockerfile +++ b/osmo-hlr-latest/Dockerfile @@ -28,6 +28,6 @@ COPY osmo-hlr.cfg /data/osmo-hlr.cfg WORKDIR /data -CMD ["/usr/bin/osmo-hlr"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-hlr -c /data/osmo-hlr.cfg >/data/osmo-hlr.log 2>&1"] EXPOSE 4222 4258 4259 diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index e9f9398..6a09b0d 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -42,6 +42,6 @@ COPY osmo-hlr.cfg /data/osmo-hlr.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-hlr"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-hlr -c /data/osmo-hlr.cfg >/data/osmo-hlr.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-hnbgw-latest/Dockerfile b/osmo-hnbgw-latest/Dockerfile index 4456c8e..161480b 100644 --- a/osmo-hnbgw-latest/Dockerfile +++ b/osmo-hnbgw-latest/Dockerfile @@ -27,4 +27,4 @@ COPY osmo-hnbgw.cfg /data/osmo-hnbgw.cfg WORKDIR /data -CMD ["/usr/bin/osmo-hnbgw", "-c", "/data/osmo-hnbgw.cfg"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-hnbgw -c /data/osmo-hnbgw.cfg >/data/osmo-hnbgw.log 2>&1"] diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index af5bc91..951b95b 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -43,4 +43,4 @@ COPY osmo-hnbgw.cfg /data/osmo-hnbgw.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-hnbgw", "-c", "/data/osmo-hnbgw.cfg"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-hnbgw -c /data/osmo-hnbgw.cfg >/data/osmo-hnbgw.log 2>&1"] diff --git a/osmo-mgw-latest/Dockerfile b/osmo-mgw-latest/Dockerfile index e0afb1c..9a403f8 100644 --- a/osmo-mgw-latest/Dockerfile +++ b/osmo-mgw-latest/Dockerfile @@ -28,4 +28,4 @@ COPY osmo-mgw.cfg /data/osmo-mgw.cfg WORKDIR /data -CMD ["/usr/bin/osmo-mgw"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-mgw -c /data/osmo-mgw.cfg >/data/osmo-mgw.log 2>&1"] diff --git a/osmo-mgw-latest/osmo-mgw.cfg b/osmo-mgw-latest/osmo-mgw.cfg index 44653e3..23d5603 100644 --- a/osmo-mgw-latest/osmo-mgw.cfg +++ b/osmo-mgw-latest/osmo-mgw.cfg @@ -6,7 +6,7 @@ logging filter all 1 logging color 1 logging print category 1 - logging timestamp 0 + logging timestamp 1 logging level all everything logging level rtp notice logging level lglobal notice diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index 3df37c1..f898c7e 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -43,4 +43,4 @@ COPY osmo-mgw.cfg /data/osmo-mgw.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-mgw"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-mgw -c /data/osmo-mgw.cfg >/data/osmo-mgw.log 2>&1"] diff --git a/osmo-msc-latest/Dockerfile b/osmo-msc-latest/Dockerfile index 928c93a..5780f71 100644 --- a/osmo-msc-latest/Dockerfile +++ b/osmo-msc-latest/Dockerfile @@ -29,6 +29,6 @@ COPY osmo-msc.cfg /data/osmo-msc.cfg WORKDIR /data -CMD ["/usr/bin/osmo-msc"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-msc -c /data/osmo-msc.cfg >/data/osmo-msc.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index 21c7eda..55e5d6e 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -49,6 +49,6 @@ COPY osmo-msc.cfg /data/osmo-msc.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-msc"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-msc -c /data/osmo-msc.cfg >/data/osmo-msc.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-nitb-latest/Dockerfile b/osmo-nitb-latest/Dockerfile index 48cdf70..9e7ebdf 100644 --- a/osmo-nitb-latest/Dockerfile +++ b/osmo-nitb-latest/Dockerfile @@ -31,6 +31,6 @@ COPY bscs.config /data/bscs.config WORKDIR /data -CMD ["/usr/bin/osmo-nitb"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-nitb -c /data/osmo-nitb.cfg >/data/osmo-nitb.log 2>&1"] EXPOSE 3002/tcp 3003/tcp 4242/tcp 2775/tcp 4249/tcp diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index 3e20ec8..0dad7fa 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -46,6 +46,6 @@ COPY bscs.config /data/bscs.config WORKDIR /data -CMD ["/usr/local/bin/osmo-nitb"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-nitb -c /data/osmo-nitb.cfg >/data/osmo-nitb.log 2>&1"] EXPOSE 3002/tcp 3003/tcp 4242/tcp 2775/tcp 4249/tcp diff --git a/osmo-remsim-latest/Dockerfile b/osmo-remsim-latest/Dockerfile index a39aadb..45c5601 100644 --- a/osmo-remsim-latest/Dockerfile +++ b/osmo-remsim-latest/Dockerfile @@ -33,6 +33,6 @@ #COPY osmo-bts.cfg /data/osmo-bts.cfg WORKDIR /data -CMD ["/usr/bin/osmo-resmim-server"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-resmim-server >/data/osmo-resmim-server.log 2>&1"] #EXPOSE diff --git a/osmo-remsim-master/Dockerfile b/osmo-remsim-master/Dockerfile index acc7078..18df831 100644 --- a/osmo-remsim-master/Dockerfile +++ b/osmo-remsim-master/Dockerfile @@ -48,6 +48,6 @@ #COPY osmo-bts.cfg /data/osmo-bts.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-resmim-server"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-resmim-server >/data/osmo-resmim-server.log 2>&1"] #EXPOSE diff --git a/osmo-sgsn-latest/Dockerfile b/osmo-sgsn-latest/Dockerfile index 87dbca2..6d89927 100644 --- a/osmo-sgsn-latest/Dockerfile +++ b/osmo-sgsn-latest/Dockerfile @@ -27,6 +27,6 @@ COPY osmo-sgsn.cfg /data/osmo-sgsn.cfg WORKDIR /data -CMD ["/usr/bin/osmo-sgsn"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-sgsn -c /data/osmo-sgsn.cfg >/data/osmo-sgsn.log 2>&1"] EXPOSE 23000/udp 4245/tcp 4249/tcp diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index 9f31788..10fc92e 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -48,6 +48,6 @@ COPY osmo-sgsn.cfg /data/osmo-sgsn.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-sgsn"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-sgsn -c /data/osmo-sgsn.cfg >/data/osmo-sgsn.log 2>&1"] EXPOSE 23000/udp 4245/tcp 4249/tcp diff --git a/osmo-sip-latest/Dockerfile b/osmo-sip-latest/Dockerfile index a468c9f..24dfefa 100644 --- a/osmo-sip-latest/Dockerfile +++ b/osmo-sip-latest/Dockerfile @@ -27,6 +27,6 @@ COPY osmo-sip-connector.cfg /data/osmo-sip-connector.cfg WORKDIR /data -CMD ["/usr/bin/osmo-sip-connector"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-sip-connector -c /data/osmo-sip-connector.cfg >/data/osmo-sip-connector.log 2>&1"] #EXPOSE diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index 4a9d49b..2407984 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -48,6 +48,6 @@ COPY osmo-sip-connector.cfg /data/osmo-sip-connector.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-sip-connector"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-sip-connector -c /data/osmo-sip-connector.cfg >/data/osmo-sip-connector.log 2>&1"] #EXPOSE diff --git a/osmo-stp-latest/Dockerfile b/osmo-stp-latest/Dockerfile index 053e2ab..72872a1 100644 --- a/osmo-stp-latest/Dockerfile +++ b/osmo-stp-latest/Dockerfile @@ -26,6 +26,6 @@ VOLUME /data COPY osmo-stp.cfg /data/ -CMD ["/usr/bin/osmo-stp", "-c", "/data/osmo-stp.cfg"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-stp -c /data/osmo-stp.cfg >/data/osmo-stp.log 2>&1"] EXPOSE 2905 14001 4239 diff --git a/osmo-stp-latest/osmo-stp.cfg b/osmo-stp-latest/osmo-stp.cfg index ada8378..e06a9e0 100644 --- a/osmo-stp-latest/osmo-stp.cfg +++ b/osmo-stp-latest/osmo-stp.cfg @@ -2,32 +2,9 @@ ! osmo-stp (0.0.6.3.179-b248) configuration saved from vty !! ! -log stderr logging filter all 1 logging color 1 logging print category 1 - logging timestamp 0 - logging level all everything - logging level lglobal notice - logging level llapd notice - logging level linp debug - logging level lmux notice - logging level lmi notice - logging level lmib notice - logging level lsms notice - logging level lctrl notice - logging level lgtp notice - logging level lstats notice - logging level lgsup notice - logging level loap notice - logging level lss7 debug - logging level lsccp debug - logging level lsua debug - logging level lm3ua debug -log file /data/osmo-stp.log - logging filter all 1 - logging color 0 - logging print category 1 logging timestamp 1 logging level all everything logging level lglobal notice diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index fa49085..622d0b9 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -38,6 +38,6 @@ COPY osmo-stp.cfg /data/ -CMD ["/usr/local/bin/osmo-stp", "-c", "/data/osmo-stp.cfg"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-stp -c /data/osmo-stp.cfg >/data/osmo-stp.log 2>&1"] EXPOSE 2905 14001 4239 diff --git a/osmo-stp-master/osmo-stp.cfg b/osmo-stp-master/osmo-stp.cfg index ada8378..1ab53ed 100644 --- a/osmo-stp-master/osmo-stp.cfg +++ b/osmo-stp-master/osmo-stp.cfg @@ -6,28 +6,6 @@ logging filter all 1 logging color 1 logging print category 1 - logging timestamp 0 - logging level all everything - logging level lglobal notice - logging level llapd notice - logging level linp debug - logging level lmux notice - logging level lmi notice - logging level lmib notice - logging level lsms notice - logging level lctrl notice - logging level lgtp notice - logging level lstats notice - logging level lgsup notice - logging level loap notice - logging level lss7 debug - logging level lsccp debug - logging level lsua debug - logging level lm3ua debug -log file /data/osmo-stp.log - logging filter all 1 - logging color 0 - logging print category 1 logging timestamp 1 logging level all everything logging level lglobal notice -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16063 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I9493ff73ef27c7c6d32b00cf827704b3f9cbf86a Gerrit-Change-Number: 16063 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:09:20 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 13 Nov 2019 16:09:20 +0000 Subject: Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/16064 ) Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file ...................................................................... Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file This way we get VTY parsing failures as well as backtraces upon process crash. Related: OS#4212 Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 --- M ttcn3-bsc-test/jenkins-sccplite.sh M ttcn3-bsc-test/jenkins.sh M ttcn3-bsc-test/osmo-bsc.cfg M ttcn3-bsc-test/osmo-stp.cfg M ttcn3-bsc-test/sccplite/osmo-bsc.cfg M ttcn3-bscnat-test/jenkins.sh M ttcn3-bscnat-test/osmo-bsc-nat.cfg M ttcn3-bts-test/jenkins.sh M ttcn3-bts-test/oml/osmo-bts.cfg M ttcn3-bts-test/osmo-bsc.cfg M ttcn3-bts-test/osmo-bts.cfg M ttcn3-bts-test/virtphy/osmo-bts.cfg M ttcn3-ggsn-test/osmo-ggsn.cfg M ttcn3-hlr-test/jenkins.sh M ttcn3-hlr-test/osmo-hlr.cfg M ttcn3-mgw-test/osmo-mgw.cfg M ttcn3-msc-test/jenkins.sh M ttcn3-msc-test/osmo-msc.cfg M ttcn3-msc-test/osmo-stp.cfg M ttcn3-pcu-test/jenkins-sns.sh M ttcn3-pcu-test/jenkins.sh M ttcn3-pcu-test/osmo-pcu.cfg M ttcn3-pcu-test/sns/osmo-pcu.cfg M ttcn3-remsim-test/jenkins.sh M ttcn3-sgsn-test/jenkins.sh M ttcn3-sgsn-test/osmo-sgsn.cfg M ttcn3-sgsn-test/osmo-stp.cfg M ttcn3-sip-test/jenkins.sh M ttcn3-sip-test/osmo-sip-connector.cfg M ttcn3-stp-test/osmo-stp.cfg 30 files changed, 50 insertions(+), 138 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/64/16064/1 diff --git a/ttcn3-bsc-test/jenkins-sccplite.sh b/ttcn3-bsc-test/jenkins-sccplite.sh index 0a2ff8b..ae62dc5 100755 --- a/ttcn3-bsc-test/jenkins-sccplite.sh +++ b/ttcn3-bsc-test/jenkins-sccplite.sh @@ -33,9 +33,7 @@ --network $NET_NAME --ip 172.18.12.10$i \ --name ${BUILD_TAG}-bts$i -d \ $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh \ - osmo-bts-omldummy \ - 172.18.12.20 $((i + 1234)) 1 + /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-omldummy 172.18.2.20 $((i + 1234)) 1 >>/data/osmo-bts-omldummy-${i}.log 2>&1" done echo Starting container with BSC testsuite diff --git a/ttcn3-bsc-test/jenkins.sh b/ttcn3-bsc-test/jenkins.sh index af5c965..3455dc1 100755 --- a/ttcn3-bsc-test/jenkins.sh +++ b/ttcn3-bsc-test/jenkins.sh @@ -41,8 +41,7 @@ --network $NET_NAME --ip 172.18.2.10$i \ --name ${BUILD_TAG}-bts$i -d \ $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh \ - osmo-bts-omldummy 172.18.2.20 $((i + 1234)) 1 + /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-omldummy 172.18.2.20 $((i + 1234)) 1 >>/data/osmo-bts-omldummy-${i}.log 2>&1" done echo Starting container with BSC testsuite diff --git a/ttcn3-bsc-test/osmo-bsc.cfg b/ttcn3-bsc-test/osmo-bsc.cfg index beee66b..4f8fdc2 100644 --- a/ttcn3-bsc-test/osmo-bsc.cfg +++ b/ttcn3-bsc-test/osmo-bsc.cfg @@ -7,9 +7,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bsc.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bsc-test/osmo-stp.cfg b/ttcn3-bsc-test/osmo-stp.cfg index cc734d4..9102114 100644 --- a/ttcn3-bsc-test/osmo-stp.cfg +++ b/ttcn3-bsc-test/osmo-stp.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-stp.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bsc-test/sccplite/osmo-bsc.cfg b/ttcn3-bsc-test/sccplite/osmo-bsc.cfg index 326a5c0..3519d3e 100644 --- a/ttcn3-bsc-test/sccplite/osmo-bsc.cfg +++ b/ttcn3-bsc-test/sccplite/osmo-bsc.cfg @@ -7,7 +7,7 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bsc.log +log stderr logging filter all 1 logging color 1 logging print category 1 diff --git a/ttcn3-bscnat-test/jenkins.sh b/ttcn3-bscnat-test/jenkins.sh index 61ea89b..d52e79a 100755 --- a/ttcn3-bscnat-test/jenkins.sh +++ b/ttcn3-bscnat-test/jenkins.sh @@ -23,7 +23,8 @@ --network $NET_NAME --ip 172.18.15.20 \ -v $VOL_BASE_DIR/bscnat:/data \ --name ${BUILD_TAG}-bscnat -d \ - $REPO_USER/osmo-nitb-$IMAGE_SUFFIX osmo-bsc_nat -c /data/osmo-bsc-nat.cfg + $REPO_USER/osmo-nitb-$IMAGE_SUFFIX \ + /bin/sh -c "osmo-bsc_nat -c /data/osmo-bsc-nat.cfg >/data/osmo-bsc-nat.log 2>&1" echo Starting container with BSCNAT testsuite docker run --rm \ diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg b/ttcn3-bscnat-test/osmo-bsc-nat.cfg index b873b21..c7518b7 100644 --- a/ttcn3-bscnat-test/osmo-bsc-nat.cfg +++ b/ttcn3-bscnat-test/osmo-bsc-nat.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bsc_nat.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index 2d49e0b..194720b 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -18,7 +18,7 @@ -v $VOL_BASE_DIR/bsc:/data \ --name ${BUILD_TAG}-bsc -d \ $REPO_USER/osmo-bsc-$IMAGE_SUFFIX \ - osmo-bsc -c /data/osmo-bsc.cfg + /bin/sh -c "osmo-bsc -c /data/osmo-bsc.cfg >>/data/osmo-bsc.log 2>&1" } start_bts() { @@ -35,7 +35,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-bts -d \ $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh osmo-bts-$variant -c /data/osmo-bts.cfg -i 172.18.9.10 + /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-$variant -c /data/osmo-bts.cfg -i 172.18.9.10 >>/data/osmo-bts.log 2>&1" } start_fake_trx() { @@ -59,7 +59,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-trxcon -d \ $REPO_USER/osmocom-bb-host-master \ - trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 + /bin/sh -c "trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 >>/data/trxcon.log 2>&1" } start_virtphy() { @@ -70,6 +70,7 @@ --name ${BUILD_TAG}-virtphy -d \ $REPO_USER/osmocom-bb-host-master \ virtphy -s /data/unix/osmocom_l2 + /bin/sh -c "virtphy -s /data/unix/osmocom_l2 >>/data/virtphy.log 2>&1" } start_testsuite() { diff --git a/ttcn3-bts-test/oml/osmo-bts.cfg b/ttcn3-bts-test/oml/osmo-bts.cfg index 2ed761a..a6e3a23 100644 --- a/ttcn3-bts-test/oml/osmo-bts.cfg +++ b/ttcn3-bts-test/oml/osmo-bts.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bts.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bts-test/osmo-bsc.cfg b/ttcn3-bts-test/osmo-bsc.cfg index 63bde9e..4675216 100644 --- a/ttcn3-bts-test/osmo-bsc.cfg +++ b/ttcn3-bts-test/osmo-bsc.cfg @@ -7,9 +7,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bsc.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bts-test/osmo-bts.cfg b/ttcn3-bts-test/osmo-bts.cfg index b8ad8ee..ca64f81 100644 --- a/ttcn3-bts-test/osmo-bts.cfg +++ b/ttcn3-bts-test/osmo-bts.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bts.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bts-test/virtphy/osmo-bts.cfg b/ttcn3-bts-test/virtphy/osmo-bts.cfg index ce47b6d..51e6128 100644 --- a/ttcn3-bts-test/virtphy/osmo-bts.cfg +++ b/ttcn3-bts-test/virtphy/osmo-bts.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bts.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-ggsn-test/osmo-ggsn.cfg b/ttcn3-ggsn-test/osmo-ggsn.cfg index 6644dae..7dff25f 100644 --- a/ttcn3-ggsn-test/osmo-ggsn.cfg +++ b/ttcn3-ggsn-test/osmo-ggsn.cfg @@ -6,39 +6,12 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-ggsn.log - logging filter all 1 - logging color 0 - logging print category 1 - logging timestamp 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 debug - 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 log stderr logging filter all 1 logging color 1 - logging print category 0 - logging timestamp 0 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 logging level ip info logging level tun info logging level ggsn info diff --git a/ttcn3-hlr-test/jenkins.sh b/ttcn3-hlr-test/jenkins.sh index 3d942de..2bf1f98 100755 --- a/ttcn3-hlr-test/jenkins.sh +++ b/ttcn3-hlr-test/jenkins.sh @@ -22,7 +22,7 @@ -v $VOL_BASE_DIR/hlr:/data \ --name ${BUILD_TAG}-hlr -d \ $REPO_USER/osmo-hlr-$IMAGE_SUFFIX \ - osmo-hlr + /bin/sh -c "osmo-hlr -c /data/osmo-hlr.cfg >/data/osmo-hlr.log 2>&1" echo Starting container with HLR testsuite docker run --rm \ diff --git a/ttcn3-hlr-test/osmo-hlr.cfg b/ttcn3-hlr-test/osmo-hlr.cfg index c5dcd89..5cda49e 100644 --- a/ttcn3-hlr-test/osmo-hlr.cfg +++ b/ttcn3-hlr-test/osmo-hlr.cfg @@ -8,15 +8,6 @@ log stderr logging filter all 1 logging color 1 - logging print category 1 - logging timestamp 1 - logging print extended-timestamp 1 - logging level all debug - logging level linp error -! -log file /data/osmo-hlr.log - logging filter all 1 - logging color 0 logging print level 1 logging print category 1 logging print category-hex 0 diff --git a/ttcn3-mgw-test/osmo-mgw.cfg b/ttcn3-mgw-test/osmo-mgw.cfg index 3c08ee0..b410dca 100644 --- a/ttcn3-mgw-test/osmo-mgw.cfg +++ b/ttcn3-mgw-test/osmo-mgw.cfg @@ -9,32 +9,6 @@ log stderr logging filter all 1 logging color 1 - logging print category 1 - logging timestamp 1 - logging print extended-timestamp 1 - logging level all everything - logging level rtp 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 notice - 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 debug -! -log file /data/osmo-mgw.log - logging filter all 1 - logging color 0 logging print level 1 logging print category 1 logging timestamp 1 diff --git a/ttcn3-msc-test/jenkins.sh b/ttcn3-msc-test/jenkins.sh index a0a5f87..28bc4b7 100755 --- a/ttcn3-msc-test/jenkins.sh +++ b/ttcn3-msc-test/jenkins.sh @@ -38,7 +38,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-msc -d \ $REPO_USER/osmo-msc-$IMAGE_SUFFIX \ - osmo-msc + /bin/sh -c "osmo-msc -c /data/osmo-msc.cfg >>/data/osmo-msc.log 2>&1" echo Starting container with MSC testsuite docker run --rm \ diff --git a/ttcn3-msc-test/osmo-msc.cfg b/ttcn3-msc-test/osmo-msc.cfg index 48765d2..a713786 100644 --- a/ttcn3-msc-test/osmo-msc.cfg +++ b/ttcn3-msc-test/osmo-msc.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-msc.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-msc-test/osmo-stp.cfg b/ttcn3-msc-test/osmo-stp.cfg index 620fa68..6d081fd 100644 --- a/ttcn3-msc-test/osmo-stp.cfg +++ b/ttcn3-msc-test/osmo-stp.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-stp.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-pcu-test/jenkins-sns.sh b/ttcn3-pcu-test/jenkins-sns.sh index fb6ccd3..51b5f64 100755 --- a/ttcn3-pcu-test/jenkins-sns.sh +++ b/ttcn3-pcu-test/jenkins-sns.sh @@ -27,7 +27,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-pcu-sns -d \ $REPO_USER/osmo-pcu-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg + /bin/sh -c "/usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg -i 172.18.14.10 >>/data/osmo-pcu.log 2>&1" echo Starting container with PCU testsuite docker run --rm \ diff --git a/ttcn3-pcu-test/jenkins.sh b/ttcn3-pcu-test/jenkins.sh index 8c855f1..d4e8be0 100755 --- a/ttcn3-pcu-test/jenkins.sh +++ b/ttcn3-pcu-test/jenkins.sh @@ -34,7 +34,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-pcu -d \ $REPO_USER/osmo-pcu-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg -i 172.18.13.10 + /bin/sh -c "/usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg -i 172.18.13.10 >>/data/osmo-pcu.log 2>&1" echo Starting container with PCU testsuite docker run --rm \ diff --git a/ttcn3-pcu-test/osmo-pcu.cfg b/ttcn3-pcu-test/osmo-pcu.cfg index e486362..d7ef445 100644 --- a/ttcn3-pcu-test/osmo-pcu.cfg +++ b/ttcn3-pcu-test/osmo-pcu.cfg @@ -2,7 +2,7 @@ logging level set-all debug logging filter all 1 -log file /data/osmo-pcu.log +log stderr logging filter all 1 logging color 1 logging print level 1 diff --git a/ttcn3-pcu-test/sns/osmo-pcu.cfg b/ttcn3-pcu-test/sns/osmo-pcu.cfg index 0b20ecb..884261a 100644 --- a/ttcn3-pcu-test/sns/osmo-pcu.cfg +++ b/ttcn3-pcu-test/sns/osmo-pcu.cfg @@ -2,9 +2,9 @@ logging level set-all debug logging filter all 1 -log file /data/osmo-pcu.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print level 1 logging print category 1 logging print category-hex 0 diff --git a/ttcn3-remsim-test/jenkins.sh b/ttcn3-remsim-test/jenkins.sh index 38da9b3..aff76f6 100755 --- a/ttcn3-remsim-test/jenkins.sh +++ b/ttcn3-remsim-test/jenkins.sh @@ -14,7 +14,7 @@ -v $VOL_BASE_DIR/server:/data \ --name ${BUILD_TAG}-server -d \ $REPO_USER/osmo-remsim-$IMAGE_SUFFIX \ - osmo-remsim-server + /bin/sh -c "osmo-remsim-server >/data/osmo-remsim-client.log 2>&1" } start_bankd() { @@ -24,7 +24,7 @@ -v $VOL_BASE_DIR/bankd:/data \ --name ${BUILD_TAG}-bankd -d \ $REPO_USER/osmo-remsim-$IMAGE_SUFFIX \ - osmo-remsim-bankd -i 172.18.17.10 + /bin/sh -c "osmo-remsim-bankd -i 172.18.17.10 >/data/osmo-remsim-bankd.log 2>&1" } start_client() { @@ -34,7 +34,7 @@ -v $VOL_BASE_DIR/client:/data \ --name ${BUILD_TAG}-client-d \ $REPO_USER/osmo-remsim-$IMAGE_SUFFIX \ - osmo-remsim-client + /bin/sh -c "osmo-remsim-client >/data/osmo-remsim-client.log 2>&1" } diff --git a/ttcn3-sgsn-test/jenkins.sh b/ttcn3-sgsn-test/jenkins.sh index 462c5b2..7f322f4 100755 --- a/ttcn3-sgsn-test/jenkins.sh +++ b/ttcn3-sgsn-test/jenkins.sh @@ -41,7 +41,7 @@ -v $VOL_BASE_DIR/sgsn:/data \ --name ${BUILD_TAG}-sgsn -d \ $REPO_USER/osmo-sgsn-$IMAGE_SUFFIX \ - osmo-sgsn + /bin/sh -c "osmo-sgsn -c /data/osmo-sgsn.cfg >/data/osmo-sgsn.log 2>&1" echo Starting container with SGSN testsuite docker run --rm \ diff --git a/ttcn3-sgsn-test/osmo-sgsn.cfg b/ttcn3-sgsn-test/osmo-sgsn.cfg index 5bf7325..68af562 100644 --- a/ttcn3-sgsn-test/osmo-sgsn.cfg +++ b/ttcn3-sgsn-test/osmo-sgsn.cfg @@ -6,7 +6,7 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-sgsn.log +log stderr logging filter all 1 logging color 1 logging print category 1 diff --git a/ttcn3-sgsn-test/osmo-stp.cfg b/ttcn3-sgsn-test/osmo-stp.cfg index 30adf32..a0b5b0b 100644 --- a/ttcn3-sgsn-test/osmo-stp.cfg +++ b/ttcn3-sgsn-test/osmo-stp.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-stp.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-sip-test/jenkins.sh b/ttcn3-sip-test/jenkins.sh index 02c7cd6..50671ee 100755 --- a/ttcn3-sip-test/jenkins.sh +++ b/ttcn3-sip-test/jenkins.sh @@ -28,6 +28,7 @@ --name ${BUILD_TAG}-sip-connector -d \ $REPO_USER/osmo-sip-$IMAGE_SUFFIX \ osmo-sip-connector + /bin/sh -c "osmo-sip-connector -c /data/osmo-sip-connector.cfg >>/data/osmo-sip-connector.log 2>&1" echo Starting container with SIP testsuite docker run --rm \ diff --git a/ttcn3-sip-test/osmo-sip-connector.cfg b/ttcn3-sip-test/osmo-sip-connector.cfg index 04ef19c..7f54c1c 100644 --- a/ttcn3-sip-test/osmo-sip-connector.cfg +++ b/ttcn3-sip-test/osmo-sip-connector.cfg @@ -6,11 +6,11 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-sip-connector.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 - logging timestamp 0 + logging timestamp 1 logging print extended-timestamp 1 logging print file basename logging level all everything diff --git a/ttcn3-stp-test/osmo-stp.cfg b/ttcn3-stp-test/osmo-stp.cfg index a9e377f..20fb298 100644 --- a/ttcn3-stp-test/osmo-stp.cfg +++ b/ttcn3-stp-test/osmo-stp.cfg @@ -5,39 +5,13 @@ log gsmtap 172.18.19.203 logging level set-all debug logging filter all 1 -log file /data/osmo-stp.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 logging level set-all debug -log stderr - logging filter all 1 - logging color 1 - logging print category-hex 1 - logging print category 1 - logging timestamp 0 - logging print file 1 - 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 notice - logging level lstats notice - logging level lgsup notice - logging level loap notice - logging level lss7 debug - logging level lsccp debug - logging level lsua debug - logging level lm3ua debug - logging level lmgcp notice - logging level ljibuf notice - logging level lrspro notice ! stats interval 5 ! -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 Gerrit-Change-Number: 16064 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:09:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 13 Nov 2019 16:09:56 +0000 Subject: Change in osmo-ccid-firmware[master]: Avoid endless loop while printing debug uart ringbuffer In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 ) Change subject: Avoid endless loop while printing debug uart ringbuffer ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a Gerrit-Change-Number: 16055 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Wed, 13 Nov 2019 16:09:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:10:12 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 13 Nov 2019 16:10:12 +0000 Subject: Change in osmo-ccid-firmware[master]: main: Add missing #include to osmocom/timer.h In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16036 ) Change subject: main: Add missing #include to osmocom/timer.h ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076 Gerrit-Change-Number: 16036 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Wed, 13 Nov 2019 16:10:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:11:39 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 13 Nov 2019 16:11:39 +0000 Subject: Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Create symlinks of last-built .bin and .elf In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 ) Change subject: sysmoOCTSIM: Create symlinks of last-built .bin and .elf ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4 Gerrit-Change-Number: 16039 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Wed, 13 Nov 2019 16:11:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:12:43 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 13 Nov 2019 16:12:43 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Fix memory leaks in ccid_handle_out() error paths In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 ) Change subject: ccid_device: Fix memory leaks in ccid_handle_out() error paths ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57 Gerrit-Change-Number: 16035 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Wed, 13 Nov 2019 16:12:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:13:08 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 13 Nov 2019 16:13:08 +0000 Subject: Change in osmo-ccid-firmware[master]: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 ) Change subject: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a Gerrit-Change-Number: 16050 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Wed, 13 Nov 2019 16:13:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:26:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:26:56 +0000 Subject: Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Proper Makefile targets In-Reply-To: References: Message-ID: Hello Jenkins Builder, Hoernchen, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 to look at the new patch set (#2). Change subject: sysmoOCTSIM: Proper Makefile targets ...................................................................... sysmoOCTSIM: Proper Makefile targets It's really bad practsie to generate different output files from one target, which breaks dependency generation and the like. Let's have separate Makefile targets for each output file we generate, all depending on the .elf file. Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba --- M sysmoOCTSIM/gcc/Makefile 1 file changed, 18 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/56/16056/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba Gerrit-Change-Number: 16056 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:27:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:27:03 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Fix memory leaks in ccid_handle_out() error paths In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 ) Change subject: ccid_device: Fix memory leaks in ccid_handle_out() error paths ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57 Gerrit-Change-Number: 16035 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:27:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:27:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:27:08 +0000 Subject: Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Create symlinks of last-built .bin and .elf In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 ) Change subject: sysmoOCTSIM: Create symlinks of last-built .bin and .elf ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4 Gerrit-Change-Number: 16039 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:27:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:27:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:27:11 +0000 Subject: Change in osmo-ccid-firmware[master]: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 ) Change subject: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a Gerrit-Change-Number: 16050 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:27:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:27:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:27:14 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid_device: Fix memory leaks in ccid_handle_out() error paths In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 ) Change subject: ccid_device: Fix memory leaks in ccid_handle_out() error paths ...................................................................... ccid_device: Fix memory leaks in ccid_handle_out() error paths Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57 --- M ccid_common/ccid_device.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Hoernchen: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index 049b1cf..8183b16 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -644,6 +644,7 @@ if (len < sizeof(*ch)) { /* FIXME */ + msgb_free(msg); return -1; } @@ -652,6 +653,7 @@ if (!cs) { LOGPCI(ci, LOGL_ERROR, "Invalid bSlot %u\n", ch->bSlot); resp = gen_err_resp(ch->bMessageType, ch->bSlot, CCID_ICC_STATUS_NO_ICC, ch->bSeq, 5); + msgb_free(msg); return ccid_send(ci, resp); } @@ -661,6 +663,7 @@ /* FIXME: ABORT logic as per section 5.3.1 of CCID Spec v1.1 */ resp = gen_err_resp(ch->bMessageType, ch->bSlot, get_icc_status(cs), ch->bSeq, CCID_ERR_CMD_SLOT_BUSY); + msgb_free(msg); return ccid_send(ci, resp); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I7c5e916992a7b55ca1ab006759c1f5c62b759d57 Gerrit-Change-Number: 16035 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:27:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:27:14 +0000 Subject: Change in osmo-ccid-firmware[master]: main: Add missing #include to osmocom/timer.h In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16036 ) Change subject: main: Add missing #include to osmocom/timer.h ...................................................................... main: Add missing #include to osmocom/timer.h Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076 --- M sysmoOCTSIM/main.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Hoernchen: Looks good to me, approved Jenkins Builder: Verified diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 6e2d6ac..15e2004 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -24,6 +24,7 @@ #include #include +#include #include #include -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9a062fbe9e0f25e45e9321048d8cbdecd4c49076 Gerrit-Change-Number: 16036 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:27:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:27:14 +0000 Subject: Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Create symlinks of last-built .bin and .elf In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 ) Change subject: sysmoOCTSIM: Create symlinks of last-built .bin and .elf ...................................................................... sysmoOCTSIM: Create symlinks of last-built .bin and .elf Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4 --- M sysmoOCTSIM/gcc/Makefile 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Hoernchen: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 3d89b25..d98277a 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -153,7 +153,7 @@ vpath %.S ../ # All Target -all: $(SUB_DIRS) $(OUTPUT_FILE_PATH) +all: $(SUB_DIRS) $(OUTPUT_FILE_PATH) sysmoOCTSIM.elf sysmoOCTSIM.bin # Linker target @@ -176,6 +176,11 @@ $(OBJDUMP) -h -S "$(OUTPUT_FILE_NAME).elf" > "$(OUTPUT_FILE_NAME).lss" $(SIZE) "$(OUTPUT_FILE_NAME).elf" +sysmoOCTSIM.elf: $(OUTPUT_FILE_PATH) + ln -sf $(OUTPUT_FILE_NAME).elf $@ + +sysmoOCTSIM.bin: $(OUTPUT_FILE_PATH) + ln -sf $(OUTPUT_FILE_NAME).bin $@ # Compiler targets -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16039 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I6046069dd74e8a6f9461d3089259bbd90425c1c4 Gerrit-Change-Number: 16039 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:27:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:27:15 +0000 Subject: Change in osmo-ccid-firmware[master]: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 ) Change subject: Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist ...................................................................... Add 'check_ccid_config.py' to test for USB VID/PID in libccid_Info.plist Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a --- A sysmoOCTSIM/check_libccid_config.py 1 file changed, 60 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Hoernchen: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/check_libccid_config.py b/sysmoOCTSIM/check_libccid_config.py new file mode 100755 index 0000000..93cd202 --- /dev/null +++ b/sysmoOCTSIM/check_libccid_config.py @@ -0,0 +1,60 @@ +#!/usr/bin/python3 + +# This script checks your libccid configuration file if it contains a matching entry +# for the sysmoOCTSIM reader. If not, it will generate a modified config file + +import plistlib, sys + +INFILE="/etc/libccid_Info.plist" +OUTFILE="/tmp/libccid_Info.plist" + +VENDOR_ID=0x1d50 +PRODUCT_ID=0x6141 +NAME='sysmocom sysmoOCTSIM' + +def gen_reader_dictlist(prod_id, vend_id, names): + readers = [] + for i in range(0,len(prod_id)): + reader = {'vendor_id': vend_id[i], 'product_id': prod_id[i], 'name': names[i]} + readers.append(reader) + return readers + +def find_reader(readers, vend_id, prod_id): + for r in readers: + if int(r['vendor_id'], 16) == vend_id and int(r['product_id'], 16) == prod_id: + return r + return None + +def plist_add_reader(pl, vend_id, prod_id, name): + pl['ifdVendorID'].append(hex(vend_id)) + pl['ifdProductID'].append(hex(prod_id)) + pl['ifdFriendlyName'].append(name) + + +if len(sys.argv) > 1: + INFILE = sys.argv[1] +if len(sys.argv) > 2: + OUTFILE = sys.argv[2] + +# read the property list +print("Reading libccid config file at '%s'" % (INFILE)) +with open(INFILE, 'rb') as fp: + pl = plistlib.load(fp) + +# consistency check +if len(pl['ifdProductID']) != len(pl['ifdVendorID']) or len(pl['ifdProductID']) != len(pl['ifdFriendlyName']): + print("input file is corrupt", file=sys.stderr) + sys.exit(2) + +# convert into a better sorted form (one list of dicts; each dict one reader) +readers = gen_reader_dictlist(pl['ifdProductID'], pl['ifdVendorID'], pl['ifdFriendlyName']) + +if find_reader(readers, VENDOR_ID, PRODUCT_ID): + print("Matching reader already in libccid_Info.plist; no action required", file=sys.stderr) +else: + print("Reader not found in config file, it needs to be updated...") + plist_add_reader(pl, VENDOR_ID, PRODUCT_ID, NAME) + with open(OUTFILE, 'wb') as fp: + plistlib.dump(pl, fp) + print("Generated new config file stored as '%s'" % (OUTFILE)) + print("\tWARNING: The generated file doesn't preserve comments!") -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I0399f03400b49d814825ca156ddb4824ec76ce0a Gerrit-Change-Number: 16050 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:27:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:27:17 +0000 Subject: Change in osmo-ccid-firmware[master]: Avoid endless loop while printing debug uart ringbuffer In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 ) Change subject: Avoid endless loop while printing debug uart ringbuffer ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a Gerrit-Change-Number: 16055 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:27:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:27:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:27:19 +0000 Subject: Change in osmo-ccid-firmware[master]: Avoid endless loop while printing debug uart ringbuffer In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 ) Change subject: Avoid endless loop while printing debug uart ringbuffer ...................................................................... Avoid endless loop while printing debug uart ringbuffer Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a --- M sysmoOCTSIM/hal/src/hal_usart_async_rings.c 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Hoernchen: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/hal/src/hal_usart_async_rings.c b/sysmoOCTSIM/hal/src/hal_usart_async_rings.c index 38bdca4..704c6ab 100644 --- a/sysmoOCTSIM/hal/src/hal_usart_async_rings.c +++ b/sysmoOCTSIM/hal/src/hal_usart_async_rings.c @@ -321,7 +321,11 @@ ASSERT(descr && buf && length); for (uint16_t i = 0; i < length; i++) { - while (ringbuffer_num(&descr->tx) > descr->tx.size); // WARNING blocking until there is space in the buffer + /* HACK: disabling this to avoid getting stuck indefinitely. In theory, this while loop below + * would exit at some point as the UART is supposedly transmitting data. However, in some + * situations it is not transmitting, and hence the condition becomes never true, waiting here + * indefinitely. We will now simply ovewrite old log data if it isn't sent fast enough */ + //while (ringbuffer_num(&descr->tx) > descr->tx.size); // WARNING blocking until there is space in the buffer ringbuffer_put(&descr->tx, buf[i]); } descr->stat = USART_ASYNC_RINGS_STATUS_BUSY; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16055 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I84bf6f47c785cfecec4764f7e86958103cf24f8a Gerrit-Change-Number: 16055 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:33:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:33:39 +0000 Subject: Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Proper Makefile targets In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 ) Change subject: sysmoOCTSIM: Proper Makefile targets ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba Gerrit-Change-Number: 16056 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:33:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:33:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:33:41 +0000 Subject: Change in osmo-ccid-firmware[master]: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 ) Change subject: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc Gerrit-Change-Number: 16057 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:33:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:33:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:33:55 +0000 Subject: Change in osmo-ccid-firmware[master]: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 ) Change subject: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc Gerrit-Change-Number: 16057 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:33:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:33:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:33:56 +0000 Subject: Change in osmo-ccid-firmware[master]: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 ) Change subject: Makefile: Add 'make mrproper' for removing all bin/elf/etc output files ...................................................................... Makefile: Add 'make mrproper' for removing all bin/elf/etc output files Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc --- M sysmoOCTSIM/gcc/Makefile 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified Hoernchen: Looks good to me, but someone else must approve diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index d98277a..c587fdd 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -223,3 +223,6 @@ rm -f $(OUTPUT_FILE_NAME).a $(OUTPUT_FILE_NAME).hex $(OUTPUT_FILE_NAME).bin \ $(OUTPUT_FILE_NAME).lss $(OUTPUT_FILE_NAME).eep $(OUTPUT_FILE_NAME).map \ $(OUTPUT_FILE_NAME).srec + +mrproper: clean + rm -f *.o *.d *.a *.elf *.bin *.ihex *.eep *.lss *.map *.srec -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16057 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I01e4b3f0224977fd38ed126f37f33ac9324f5abc Gerrit-Change-Number: 16057 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:34:10 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:34:10 +0000 Subject: Change in osmo-ccid-firmware[master]: sysmoOCTSIM: Proper Makefile targets In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 ) Change subject: sysmoOCTSIM: Proper Makefile targets ...................................................................... sysmoOCTSIM: Proper Makefile targets It's really bad practsie to generate different output files from one target, which breaks dependency generation and the like. Let's have separate Makefile targets for each output file we generate, all depending on the .elf file. Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba --- M sysmoOCTSIM/gcc/Makefile 1 file changed, 18 insertions(+), 7 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index c587fdd..595fd62 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -153,7 +153,13 @@ vpath %.S ../ # All Target -all: $(SUB_DIRS) $(OUTPUT_FILE_PATH) sysmoOCTSIM.elf sysmoOCTSIM.bin +all: $(SUB_DIRS) elf bin ihex eep lss + +elf: $(OUTPUT_FILE_NAME).elf sysmoOCTSIM.elf +bin: $(OUTPUT_FILE_NAME).bin sysmoOCTSIM.bin +ihex: $(OUTPUT_FILE_NAME).ihex +eep: $(OUTPUT_FILE_NAME).eep +lss: $(OUTPUT_FILE_NAME).lss # Linker target @@ -167,13 +173,18 @@ -L"../gcc/gcc" @echo Finished building target: $@ - $(OBJCOPY) -O binary "$(OUTPUT_FILE_NAME).elf" "$(OUTPUT_FILE_NAME).bin" - $(OBJCOPY) -O ihex -R .eeprom -R .fuse -R .lock -R .signature \ - "$(OUTPUT_FILE_NAME).elf" "$(OUTPUT_FILE_NAME).hex" +%.bin: %.elf + $(OBJCOPY) -O binary $< $@ + +%.ihex: %.elf + $(OBJCOPY) -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@ + +%.eep: %.elf $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma \ - .eeprom=0 --no-change-warnings -O binary "$(OUTPUT_FILE_NAME).elf" \ - "$(OUTPUT_FILE_NAME).eep" || exit 0 - $(OBJDUMP) -h -S "$(OUTPUT_FILE_NAME).elf" > "$(OUTPUT_FILE_NAME).lss" + .eeprom=0 --no-change-warnings -O binary $< $@ || exit 0 + +%.lss: %.elf + $(OBJDUMP) -h -S $< > $@ $(SIZE) "$(OUTPUT_FILE_NAME).elf" sysmoOCTSIM.elf: $(OUTPUT_FILE_PATH) -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16056 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie83722a9b61cfcd9865950ab4c088f59a15427ba Gerrit-Change-Number: 16056 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:36:36 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:36:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: HACK: make IPA_Emulation work as IPA client to OsmoSTP In-Reply-To: References: Message-ID: laforge has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15821 ) Change subject: HACK: make IPA_Emulation work as IPA client to OsmoSTP ...................................................................... Abandoned no longer needed -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15821 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7def6090ff95bc868cfc238d56bdb204707108a0 Gerrit-Change-Number: 15821 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Assignee: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:37:23 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:37:23 +0000 Subject: Change in docker-playground[master]: Update osmo-*/Dockerfile to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16063 ) Change subject: Update osmo-*/Dockerfile to log stdout+stderr of process to log file ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16063 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I9493ff73ef27c7c6d32b00cf827704b3f9cbf86a Gerrit-Change-Number: 16063 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:37:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:37:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:37:29 +0000 Subject: Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16064 ) Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 Gerrit-Change-Number: 16064 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:37:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:38:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:38:03 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 ) Change subject: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iae213c58598cc0207503fd10f09d2d57aab941fe Gerrit-Change-Number: 16042 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 13 Nov 2019 16:38:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:38:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:38:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Introduce TC_tmt_override In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16043 ) Change subject: stp: Introduce TC_tmt_override ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id99ec3eaa431512114817d2a2af77013762ab2b9 Gerrit-Change-Number: 16043 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:38:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:38:12 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:38:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 ) Change subject: stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare ...................................................................... stp: Refactor STP_Tests_IPA tests and introduce new TC_tmt_loadshare Infrastructure in STP_Tests_IPA changed to be more similar to what is done in STP_Tests_M3UA, which already contain more advanced tests. Array of AS names mp_ipa_as_names is added in order to let TTCN3 port which AS is configured in STP for each src port. Change-Id: Iae213c58598cc0207503fd10f09d2d57aab941fe --- M stp/STP_Tests.ttcn M stp/STP_Tests_IPA.ttcn M stp/osmo-stp.cfg 3 files changed, 136 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/stp/STP_Tests.ttcn b/stp/STP_Tests.ttcn index 82bc03b..032a900 100644 --- a/stp/STP_Tests.ttcn +++ b/stp/STP_Tests.ttcn @@ -156,6 +156,7 @@ f_init_m3ua(); f_init_ipa(); + f_connect_ipa(3); f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx /* send a well-formed, encoded SCCP message via M3UA */ @@ -169,7 +170,7 @@ f_M3UA_send(0, ts_M3UA_DATA(rctx_sender, tx_pd), 1); /* expect to receive it via IPA */ - f_IPA_exp(0, sccp_enc); + f_IPA_exp(3, sccp_enc); f_clear_m3ua(); } @@ -181,12 +182,13 @@ var OCT4 pc_receiver := int2oct(23, 4); f_init_common(); - f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"}, + f_vty_config2(VTY, {"cs7 instance 0", "as ipa-as-dynamic-asp ipa"}, "point-code override patch-sccp disabled"); f_init_m3ua(); f_init_ipa(); + f_connect_ipa(3); f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx /* send a well-formed, encoded SCCP message via IPA */ @@ -195,7 +197,7 @@ var SCCP_PAR_Address calling := valueof(ts_SccpAddr_GT('5678'H)); var PDU_SCCP sccp := valueof(ts_SCCP_UDT(called, calling, data)); var octetstring sccp_enc := enc_PDU_SCCP(sccp); - f_IPA_send(0, sccp_enc); + f_IPA_send(3, sccp_enc); /* expect to receive it via M3UA */ var template (present) M3UA_Protocol_Data rx_pd; @@ -212,12 +214,13 @@ var OCT4 pc_receiver := int2oct(23, 4); f_init_common(); - f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"}, + f_vty_config2(VTY, {"cs7 instance 0", "as ipa-as-dynamic-asp ipa"}, "point-code override patch-sccp both"); f_init_m3ua(); f_init_ipa(); + f_connect_ipa(3); f_M3UA_asp_up_act(0, omit, omit); // TODO: rctx /* send a well-formed, encoded SCCP message via IPA */ @@ -225,7 +228,7 @@ var SCCP_PAR_Address called := valueof(ts_SccpAddr_GT('1234'H)); var SCCP_PAR_Address calling := valueof(ts_SccpAddr_GT('5678'H)); var PDU_SCCP sccp := valueof(ts_SCCP_UDT(called, calling, data)); - f_IPA_send(0, enc_PDU_SCCP(sccp)); + f_IPA_send(3, enc_PDU_SCCP(sccp)); /* patch point codes into addresses */ called := valueof(ts_SccpAddr_PC_GT(oct2int(pc_receiver), '83'O, "mtp3_itu", '1234'H)); diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn index 0a36921..f7273dc 100644 --- a/stp/STP_Tests_IPA.ttcn +++ b/stp/STP_Tests_IPA.ttcn @@ -33,11 +33,18 @@ import from STP_Tests_Common all; -private const integer NR_IPA := 1; +private const integer NR_IPA := 4; + +type record of charstring AspNameArray; modulepar { integer mp_stp_ipa_port := 5000; integer mp_local_ipa_port := 20000; + AspNameArray mp_ipa_as_names := {"ipa-as-loadshare-sender", + "ipa-as-loadshare-receiver", + "ipa-as-loadshare-receiver", + "ipa-as-dynamic-asp" + }; } type component IPA_CT extends Test_CT { @@ -45,6 +52,7 @@ * having to re-invent IPA CCM handling here */ port MTP3asp_PT IPA[NR_IPA]; var IPA_Emulation_CT vc_IPA[NR_IPA]; + var IPA_CCM_Parameters g_ccm_pars[NR_IPA]; } friend function f_IPA_send(integer idx, octetstring data) runs on IPA_CT { @@ -53,7 +61,6 @@ } friend function f_IPA_exp(integer idx, template (present) octetstring data) runs on IPA_CT { - var M3UA_RecvFrom rx; alt { [] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, data)) { setverdict(pass); @@ -65,6 +72,23 @@ } } +private function f_rnd_ipa_len() runs on IPA_CT return integer { + var integer rnd_len := f_rnd_int(100); + /* We need at least 1 byte of data, othewise osmocom IPA stack will discard and close the socket */ + if (rnd_len == 0) { + rnd_len := 1; + } + return rnd_len; +} + +/* Test if traffic is routed from idx_tx to idx_rx */ +private function f_test_traffic(integer idx_tx, integer idx_rx) +runs on IPA_CT { + var octetstring data := f_rnd_octstring(f_rnd_ipa_len()); + f_IPA_send(idx_tx, data); + f_IPA_exp(idx_rx, data); +} + friend function f_init_ipa() runs on IPA_CT { var integer i; @@ -74,11 +98,15 @@ vc_IPA[i] := IPA_Emulation_CT.create("IPA" & int2str(i)); map(vc_IPA[i]:IPA_PORT, system:IPA_CODEC_PT); connect(self:IPA[i], vc_IPA[i]:MTP3_SP_PORT); - vc_IPA[i].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+i)); + g_ccm_pars[i] := c_IPA_default_ccm_pars; + g_ccm_pars[i].name := mp_ipa_as_names[i]; } } +friend function f_connect_ipa(integer idx) runs on IPA_CT { + vc_IPA[idx].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, + mp_local_ipa_port+idx, g_ccm_pars[idx])); +} /* "accept-asp-connections pre-configured" and client from unknown source */ @@ -87,6 +115,10 @@ f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections pre-configured"); f_init_ipa(); + /* Add 100 to the port since we know that port is not configured in any + ASP only up to NR_IPA are configured. */ + vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, + mp_local_ipa_port+100, g_ccm_pars[0])); f_sleep(1.0); if (IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be disconnected"); @@ -103,9 +135,8 @@ f_init_common(); f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections pre-configured"); - f_vty_config2(VTY, {"cs7 instance 0"}, "asp ipa-mahlzeit0 20000 5000 ipa"); - f_vty_config2(VTY, {"cs7 instance 0", "as mahlzeit ipa"}, "asp ipa-mahlzeit0"); f_init_ipa(); + f_connect_ipa(0); f_sleep(1.0); if (not IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be connected"); @@ -115,7 +146,6 @@ /* switch back to default */ f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections dynamic-permitted"); - f_vty_config2(VTY, {"cs7 instance 0"}, "no asp ipa-mahlzeit0"); } @@ -123,6 +153,10 @@ testcase TC_unknown_client_dynamic() runs on IPA_CT { f_init_common(); f_init_ipa(); + /* Add 100 to the port since we know that port is not configured in any + ASP only up to NR_IPA are configured. */ + vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, + mp_local_ipa_port+100, g_ccm_pars[0])); f_sleep(1.0); if (not IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be connected"); @@ -131,11 +165,61 @@ } } +private altstep as_count_rx(integer idx, template (present) octetstring exp, inout integer counter) +runs on IPA_CT { + [] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, exp)) { + counter := counter + 1; + } +} + +/* test "traffic-mode load-share" behavior */ +testcase TC_tmt_loadshare() runs on IPA_CT { + var integer i; + + f_init_ipa(); + + /* bring up the 'sender' side (single ASP in AS) */ + f_connect_ipa(0); + /* activate the first 'receiver' side ASP */ + f_connect_ipa(1); + f_sleep(1.0); + + /* verify traffic is routed from sender to [sole] receiver */ + for (i := 0; i < 10; i := i+1) { + f_test_traffic(0, 1); + } + + /* activate the second 'receiver' side ASP */ + f_connect_ipa(2); + f_sleep(1.0); + + /* verify traffic is routed from sender to new receiver */ + const integer iter_per_asp := 5; + var integer num_rx[3] := { 0, 0, 0 }; + for (i := 0; i < 2*iter_per_asp; i := i+1) { + var octetstring data := f_rnd_octstring(f_rnd_ipa_len()); + f_IPA_send(0, data); + alt { + [] as_count_rx(1, data, num_rx[1]) + [] as_count_rx(2, data, num_rx[2]) + } + } + /* FIXME: check for extraneous messages? */ + for (i := 1; i <= 2; i := i+1) { + if (num_rx[i] != iter_per_asp) { + setverdict(fail, "Received ", num_rx[i], " out of expected ", iter_per_asp, + "DATA messages at IPA port ", i); + } + } + setverdict(pass); +} + control { execute( TC_unknown_client_nodynamic() ); execute( TC_known_client_nodynamic() ); execute( TC_unknown_client_dynamic() ); + execute( TC_tmt_loadshare() ); } diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg index 5a1741f..26ab7f6 100644 --- a/stp/osmo-stp.cfg +++ b/stp/osmo-stp.cfg @@ -36,6 +36,9 @@ ! cs7 instance 0 point-code format 24 +! +!M3UA AS/ASP: +! asp asp-sender 9999 2905 m3ua local-ip 127.0.0.1 remote-ip 127.0.0.1 @@ -57,16 +60,47 @@ asp asp-receiver0 asp asp-receiver1 routing-key 1042 42 - as mahlzeit ipa - routing-key 0 5 - point-code override dpc 23 as as-client m3ua routing-key 1055 55 asp asp-client0 +! +! IPA AS/ASP: +! + asp ipa-asp-loadshare-sender 20000 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + as ipa-as-loadshare-sender ipa + routing-key 0 6 + point-code override dpc 31 + asp ipa-asp-loadshare-sender + asp ipa-asp-loadshare-receiver0 20001 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + asp ipa-asp-loadshare-receiver1 20002 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + as ipa-as-loadshare-receiver ipa + traffic-mode loadshare + routing-key 0 7 + point-code override dpc 32 + asp ipa-asp-loadshare-receiver0 + asp ipa-asp-loadshare-receiver1 + !Used by STP_Tests.ttcn: + as ipa-as-dynamic-asp ipa + routing-key 0 5 + point-code override dpc 23 +! +! ROUTING TABLE: +! route-table system update route 23 16777215 linkset as-sender update route 42 16777215 linkset as-receiver update route 55 16777215 linkset as-client + update route 31 16777215 linkset ipa-as-loadshare-receiver + update route 5 16777215 linkset ipa-as-dynamic-asp +! +!SERVERS: +! listen m3ua 2905 accept-asp-connections dynamic-permitted listen ipa 5000 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16042 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iae213c58598cc0207503fd10f09d2d57aab941fe Gerrit-Change-Number: 16042 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:38:12 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:38:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Introduce TC_tmt_override In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16043 ) Change subject: stp: Introduce TC_tmt_override ...................................................................... stp: Introduce TC_tmt_override Change-Id: Id99ec3eaa431512114817d2a2af77013762ab2b9 --- M stp/STP_Tests_IPA.ttcn M stp/osmo-stp.cfg 2 files changed, 49 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn index f7273dc..946a950 100644 --- a/stp/STP_Tests_IPA.ttcn +++ b/stp/STP_Tests_IPA.ttcn @@ -33,7 +33,7 @@ import from STP_Tests_Common all; -private const integer NR_IPA := 4; +private const integer NR_IPA := 7; type record of charstring AspNameArray; @@ -43,7 +43,10 @@ AspNameArray mp_ipa_as_names := {"ipa-as-loadshare-sender", "ipa-as-loadshare-receiver", "ipa-as-loadshare-receiver", - "ipa-as-dynamic-asp" + "ipa-as-dynamic-asp", + "ipa-as-override-sender", + "ipa-as-override-receiver", + "ipa-as-override-receiver" }; } @@ -165,6 +168,27 @@ } } +/* test "traffic-mode override" behavior */ +testcase TC_tmt_override() runs on IPA_CT { + f_init_ipa(); + + /* bring up the 'sender' side (single ASP in AS) */ + f_connect_ipa(4); + /* activate the first 'receiver' side ASP */ + f_connect_ipa(5); + f_sleep(1.0); + + /* verify traffic is routed from sender to [sole] receiver */ + f_test_traffic(4, 5); + + /* activate the second 'receiver' side ASP */ + f_connect_ipa(6); + f_sleep(1.0); + + /* verify traffic is routed from sender to new receiver */ + f_test_traffic(4, 6); +} + private altstep as_count_rx(integer idx, template (present) octetstring exp, inout integer counter) runs on IPA_CT { [] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, exp)) { @@ -214,11 +238,11 @@ setverdict(pass); } - control { execute( TC_unknown_client_nodynamic() ); execute( TC_known_client_nodynamic() ); execute( TC_unknown_client_dynamic() ); + execute (TC_tmt_override() ); execute( TC_tmt_loadshare() ); } diff --git a/stp/osmo-stp.cfg b/stp/osmo-stp.cfg index 26ab7f6..50c80d3 100644 --- a/stp/osmo-stp.cfg +++ b/stp/osmo-stp.cfg @@ -85,7 +85,27 @@ point-code override dpc 32 asp ipa-asp-loadshare-receiver0 asp ipa-asp-loadshare-receiver1 - !Used by STP_Tests.ttcn: +! OVERRIDE: + asp ipa-asp-override-sender 20004 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + as ipa-as-override-sender ipa + routing-key 0 6 + point-code override dpc 33 + asp ipa-asp-override-sender + asp ipa-asp-override-receiver0 20005 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + asp ipa-asp-override-receiver1 20006 5000 ipa + local-ip 127.0.0.1 + remote-ip 127.0.0.1 + as ipa-as-override-receiver ipa + traffic-mode override + routing-key 0 8 + point-code override dpc 34 + asp ipa-asp-override-receiver0 + asp ipa-asp-override-receiver1 +! DYNAMIC AS: as ipa-as-dynamic-asp ipa routing-key 0 5 point-code override dpc 23 @@ -97,6 +117,7 @@ update route 42 16777215 linkset as-receiver update route 55 16777215 linkset as-client update route 31 16777215 linkset ipa-as-loadshare-receiver + update route 33 16777215 linkset ipa-as-override-receiver update route 5 16777215 linkset ipa-as-dynamic-asp ! !SERVERS: -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id99ec3eaa431512114817d2a2af77013762ab2b9 Gerrit-Change-Number: 16043 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:38:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:38:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Move logic to create unknwon dynamic ASP to f_connect_ipa() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16044 ) Change subject: stp: Move logic to create unknwon dynamic ASP to f_connect_ipa() ...................................................................... stp: Move logic to create unknwon dynamic ASP to f_connect_ipa() This type of scenario is used in several tests and will be used in more tests in the future, so let's move there for easiness. Change-Id: Ic65ff2ff9dc3cc82ae3fefcf3caf406279cd6b97 --- M stp/STP_Tests_IPA.ttcn 1 file changed, 11 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn index 946a950..beb2aa9 100644 --- a/stp/STP_Tests_IPA.ttcn +++ b/stp/STP_Tests_IPA.ttcn @@ -106,9 +106,15 @@ } } -friend function f_connect_ipa(integer idx) runs on IPA_CT { +friend function f_connect_ipa(integer idx, boolean use_unknown_asp_port := false) runs on IPA_CT { + var integer port_offset := 0; + if (use_unknown_asp_port) { + /* Add 100 to the port since we know that port is not configured in any + ASP only up to NR_IPA are configured. */ + port_offset := 100; + } vc_IPA[idx].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+idx, g_ccm_pars[idx])); + mp_local_ipa_port + idx + port_offset, g_ccm_pars[idx])); } @@ -118,10 +124,7 @@ f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections pre-configured"); f_init_ipa(); - /* Add 100 to the port since we know that port is not configured in any - ASP only up to NR_IPA are configured. */ - vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+100, g_ccm_pars[0])); + f_connect_ipa(0, true); f_sleep(1.0); if (IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be disconnected"); @@ -139,7 +142,7 @@ f_vty_config2(VTY, {"cs7 instance 0", "listen ipa 5000"}, "accept-asp-connections pre-configured"); f_init_ipa(); - f_connect_ipa(0); + f_connect_ipa(0, false); f_sleep(1.0); if (not IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be connected"); @@ -156,10 +159,7 @@ testcase TC_unknown_client_dynamic() runs on IPA_CT { f_init_common(); f_init_ipa(); - /* Add 100 to the port since we know that port is not configured in any - ASP only up to NR_IPA are configured. */ - vc_IPA[0].start(IPA_Emulation.main_client(mp_stp_ip, mp_stp_ipa_port, mp_local_ip, - mp_local_ipa_port+100, g_ccm_pars[0])); + f_connect_ipa(0, true); f_sleep(1.0); if (not IPA[0].checkstate("Connected")) { setverdict(fail, "Expected IPA port to be connected"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16044 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic65ff2ff9dc3cc82ae3fefcf3caf406279cd6b97 Gerrit-Change-Number: 16044 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:38:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:38:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: stp: Introduce traffic mode type tests with unknwon dynamic ASPs In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16045 ) Change subject: stp: Introduce traffic mode type tests with unknwon dynamic ASPs ...................................................................... stp: Introduce traffic mode type tests with unknwon dynamic ASPs Change-Id: Ib142b021bb6d268831479723ad629be9ed378f81 --- M stp/STP_Tests_IPA.ttcn 1 file changed, 33 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn index beb2aa9..48652b8 100644 --- a/stp/STP_Tests_IPA.ttcn +++ b/stp/STP_Tests_IPA.ttcn @@ -168,27 +168,37 @@ } } -/* test "traffic-mode override" behavior */ -testcase TC_tmt_override() runs on IPA_CT { +private function f_tc_tmt_override(boolean unknwon_dynamic_asp) +runs on IPA_CT { f_init_ipa(); /* bring up the 'sender' side (single ASP in AS) */ - f_connect_ipa(4); + f_connect_ipa(4, unknwon_dynamic_asp); /* activate the first 'receiver' side ASP */ - f_connect_ipa(5); + f_connect_ipa(5, unknwon_dynamic_asp); f_sleep(1.0); /* verify traffic is routed from sender to [sole] receiver */ f_test_traffic(4, 5); /* activate the second 'receiver' side ASP */ - f_connect_ipa(6); + f_connect_ipa(6, unknwon_dynamic_asp); f_sleep(1.0); /* verify traffic is routed from sender to new receiver */ f_test_traffic(4, 6); } +/* test "traffic-mode override" behavior */ +testcase TC_tmt_override() runs on IPA_CT { + f_tc_tmt_override(false); +} + +/* test "traffic-mode override" behavior, with "accept-asp-connections dynamic-permitted" and clients from unknown ASPs */ +testcase TC_unknown_client_dynamic_tmt_override() runs on IPA_CT { + f_tc_tmt_override(true); +} + private altstep as_count_rx(integer idx, template (present) octetstring exp, inout integer counter) runs on IPA_CT { [] IPA[idx].receive(t_ASP_MTP3_TRANSFERind(?, ?, ?, ?, exp)) { @@ -196,16 +206,16 @@ } } -/* test "traffic-mode load-share" behavior */ -testcase TC_tmt_loadshare() runs on IPA_CT { +private function f_tc_tmt_loadshare(boolean unknwon_dynamic_asp) +runs on IPA_CT { var integer i; f_init_ipa(); /* bring up the 'sender' side (single ASP in AS) */ - f_connect_ipa(0); + f_connect_ipa(0, unknwon_dynamic_asp); /* activate the first 'receiver' side ASP */ - f_connect_ipa(1); + f_connect_ipa(1, unknwon_dynamic_asp); f_sleep(1.0); /* verify traffic is routed from sender to [sole] receiver */ @@ -214,7 +224,7 @@ } /* activate the second 'receiver' side ASP */ - f_connect_ipa(2); + f_connect_ipa(2, unknwon_dynamic_asp); f_sleep(1.0); /* verify traffic is routed from sender to new receiver */ @@ -238,12 +248,24 @@ setverdict(pass); } +/* test "traffic-mode load-share" behavior */ +testcase TC_tmt_loadshare() runs on IPA_CT { + f_tc_tmt_loadshare(false); +} + +/* test "traffic-mode override" behavior, with "accept-asp-connections dynamic-permitted" and clients from unknown ASPs */ +testcase TC_unknown_client_dynamic_tmt_loadshare() runs on IPA_CT { + f_tc_tmt_override(true); +} + control { execute( TC_unknown_client_nodynamic() ); execute( TC_known_client_nodynamic() ); execute( TC_unknown_client_dynamic() ); - execute (TC_tmt_override() ); + execute( TC_tmt_override() ); + execute( TC_unknown_client_dynamic_tmt_override() ); execute( TC_tmt_loadshare() ); + execute( TC_unknown_client_dynamic_tmt_loadshare() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16045 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib142b021bb6d268831479723ad629be9ed378f81 Gerrit-Change-Number: 16045 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:39:34 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:39:34 +0000 Subject: Change in docker-playground[master]: ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16046 ) Change subject: ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I844ecf8a636ead55b7b406cb97424a4a35a6b674 Gerrit-Change-Number: 16046 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:39:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:39:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:39:35 +0000 Subject: Change in docker-playground[master]: ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16046 ) Change subject: ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp ...................................................................... ttcn3-stp/Makefile: Drop defaulting to branch laforge/stp Once osmo-ttcn3-hacks.git branch laforge/stp has been merged (where STP_Tests devel was done), we can use master like we do for other suites. Change-Id: I844ecf8a636ead55b7b406cb97424a4a35a6b674 --- M ttcn3-stp-test/Makefile 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ttcn3-stp-test/Makefile b/ttcn3-stp-test/Makefile index 4bf2fff..cbcd544 100644 --- a/ttcn3-stp-test/Makefile +++ b/ttcn3-stp-test/Makefile @@ -1,4 +1,3 @@ RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.2.202 -v ggsn-test-vol:/data -OSMO_TTCN3_BRANCH?="laforge/stp" include ../make/Makefile -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16046 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I844ecf8a636ead55b7b406cb97424a4a35a6b674 Gerrit-Change-Number: 16046 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:44:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:44:44 +0000 Subject: Change in docker-playground[master]: ttcn3-stp-tests: laforge/stp has been merged master; use master References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/16065 ) Change subject: ttcn3-stp-tests: laforge/stp has been merged master; use master ...................................................................... ttcn3-stp-tests: laforge/stp has been merged master; use master Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b --- M ttcn3-stp-test/Dockerfile 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/65/16065/1 diff --git a/ttcn3-stp-test/Dockerfile b/ttcn3-stp-test/Dockerfile index 7e671b3..a755c94 100644 --- a/ttcn3-stp-test/Dockerfile +++ b/ttcn3-stp-test/Dockerfile @@ -4,11 +4,8 @@ RUN mkdir /root/projects && (cd /root/projects && ln -sf / git) RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git -# FIXME: Once M3UA dep update patches in laforge/stp is merged into master, the -# line checking it out can be removed. RUN cd osmo-ttcn3-hacks && \ git checkout -f -B master origin/master && \ - git fetch && git checkout -f -B laforge/stp origin/laforge/stp && \ make deps RUN git config --global user.email docker at dock.er && \ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b Gerrit-Change-Number: 16065 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:45:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:45:40 +0000 Subject: Change in docker-playground[master]: ttcn3-stp-tests: laforge/stp has been merged master; use master In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16065 ) Change subject: ttcn3-stp-tests: laforge/stp has been merged master; use master ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b Gerrit-Change-Number: 16065 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 13 Nov 2019 16:45:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:46:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 13 Nov 2019 16:46:00 +0000 Subject: Change in docker-playground[master]: ttcn3-stp-tests: laforge/stp has been merged master; use master In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16065 ) Change subject: ttcn3-stp-tests: laforge/stp has been merged master; use master ...................................................................... ttcn3-stp-tests: laforge/stp has been merged master; use master Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b --- M ttcn3-stp-test/Dockerfile 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ttcn3-stp-test/Dockerfile b/ttcn3-stp-test/Dockerfile index 7e671b3..a755c94 100644 --- a/ttcn3-stp-test/Dockerfile +++ b/ttcn3-stp-test/Dockerfile @@ -4,11 +4,8 @@ RUN mkdir /root/projects && (cd /root/projects && ln -sf / git) RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git -# FIXME: Once M3UA dep update patches in laforge/stp is merged into master, the -# line checking it out can be removed. RUN cd osmo-ttcn3-hacks && \ git checkout -f -B master origin/master && \ - git fetch && git checkout -f -B laforge/stp origin/laforge/stp && \ make deps RUN git config --global user.email docker at dock.er && \ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b Gerrit-Change-Number: 16065 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:48:12 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 13 Nov 2019 16:48:12 +0000 Subject: Change in docker-playground[master]: ttcn3-stp-tests: laforge/stp has been merged master; use master In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16065 ) Change subject: ttcn3-stp-tests: laforge/stp has been merged master; use master ...................................................................... Patch Set 1: Thanks, good catch! -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0ec887f40d00f7c24b67a4525b363abb869ad18b Gerrit-Change-Number: 16065 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 13 Nov 2019 16:48:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 16:52:50 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 13 Nov 2019 16:52:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 to look at the new patch set (#3). Change subject: msc: overhaul voice call testing ...................................................................... msc: overhaul voice call testing * Semantic: We don't really know which side the MSC first creates a CRCX for. Instead of assuming that the RAN side is always CRCX'd first, simply handle a "first" and a "second" CRCX, not making any assumptions which is for which side. Notably, there still are quite a few places assuming which CRCX corresponds to the RAN/CN side, but the changes are sufficient to still pass the tests when osmo-msc swaps the CRCX order; sometimes for slightly obscure reasons, for example because it doesn't matter that the wrong port number is returned during a subsequent MDCX... Cleaning up the rest is still todo for later. Remove code dup from call establishing code, particularly for MGCP. Use f_mo_call_establish() and f_mt_call() where ever possible, to make all of the call establishing tests handle upcoming changes in osmo-msc's order of messages, without re-implementing the changes for each test individually. The X-Osmux parameter was so far expected to appear in the first CRCX received, assuming that this first CRCX is for the RAN. Instead, detect whether X-Osmux is contained in a CRCX, and reply with an Osmux CID if so, regardless of it being the first or second CRCX. Count the number of X-Osmux parameters received in CRCX messages, and compare after call setup to verify X-Osmux presence. Since f_mo_call_establish() can't handle RANAP assignment, a few Iu tests that worked with the older code dup will break by this patch. This is fixed by a subsequent patch, see I0ead36333ab665147b8d222070ea5cf8afc555ec. * Details, per patch chunk: Change ts_BSSMAP_IE_AoIP_TLA4 to a non-value template, so that we can use a wildcard for the assigned port number from MGCP (depending on RAN or CN CRCX first, the RAN port number can be one or the other). In CallParameters, move MGCP handling instructions into a separate record "CrcxResponse", and have two of them for handling the first and the second CRCX, replacing mgw_rtp_{ip,port}_{bss,mss} and mgcp_connection_id_{bss,mss}. In CallParameters, add some flags for early-exiting call establishment with a particular desired behavior, for specialized tests. In CallParameters, use common default values and don't repeat them in each and every call establishing test. Set cpars.mo_call := {true,false} implicitly when f_{mo,mt}_call_establish() are invoked. Remove CRCX comments implying RAN or CN side, instead just talk of the "first" and the "second" CRCX. Implement one common f_handle_crcx() function, which is used by f_mo_call_establish(), f_mt_call_complete(), as_optional_mgcp_crcx(), and implicitly uses the first/second CRCX handling. For Assigment, use a wildcard RTP port so that we don't have to assume which CRCX was for the RAN side. In f_mo_call_establish(), insert special case conditions to make it enact errors at specific times, for individual tests. That saves re-implementing the entire call establishment (code dup). For error cases, add expectation of a CC Release message in the call establishment. This should not apply for normal successful operation, but because interleave does not support conditionals, add flags got_mncc_setup_compl_ind and got_cc_connect to break the interleave when establishing is complete, so that the CC Release is skipped. A CC Release always breaks the interleave, at whatever time it arrives. Tests adopting f_{mo,mt}_call instead of code dup: f_tc_mo_setup_and_nothing() f_tc_mo_crcx_ran_timeout() f_tc_mo_crcx_ran_reject() f_tc_mo_release_timeout() f_tc_mo_cc_bssmap_clear() Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f --- M library/BSSMAP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 3 files changed, 292 insertions(+), 335 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/38/15938/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 21:12:39 2019 From: gerrit-no-reply at lists.osmocom.org (roox) Date: Wed, 13 Nov 2019 21:12:39 +0000 Subject: Change in osmo-bsc[master]: Fix some typos References: Message-ID: roox has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16066 ) Change subject: Fix some typos ...................................................................... Fix some typos Fix typos and common misspellings in code comments and in the manual. Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c --- M doc/e1-data-model.txt M doc/handover.txt M doc/manuals/aoip-mgw-options.adoc M doc/manuals/chapters/counters_generated.adoc M doc/manuals/chapters/handover.adoc M doc/manuals/chapters/osmux_bsc.adoc M doc/manuals/message-sequences/mo_call-abis_a.msc M doc/manuals/mgw/classic-bsc.msc M doc/manuals/osmux-reference.adoc M doc/manuals/vty/bsc_vty_reference.xml M doc/manuals/vty/libbsc_vty_additions.xml M include/mISDNif.h M include/osmocom/bsc/a_reset.h M include/osmocom/bsc/abis_rsl.h M include/osmocom/bsc/acc_ramp.h M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/meas_feed.h M include/osmocom/bsc/osmo_bsc_reset.h M include/osmocom/bsc/osmo_bsc_sigtran.h M include/osmocom/bsc/penalty_timers.h M src/ipaccess/ipaccess-config.c M src/ipaccess/ipaccess-proxy.c M src/osmo-bsc/a_reset.c M src/osmo-bsc/abis_nm.c M src/osmo-bsc/abis_nm_vty.c M src/osmo-bsc/abis_om2000.c M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/assignment_fsm.c M src/osmo-bsc/bsc_subscr_conn_fsm.c M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/bts_siemens_bs11.c M src/osmo-bsc/codec_pref.c M src/osmo-bsc/gsm_04_08_rr.c M src/osmo-bsc/gsm_data.c M src/osmo-bsc/handover_decision.c M src/osmo-bsc/handover_decision_2.c M src/osmo-bsc/handover_fsm.c M src/osmo-bsc/lchan_rtp_fsm.c M src/osmo-bsc/neighbor_ident_vty.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_lcls.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/paging.c M src/osmo-bsc/pcu_sock.c M src/osmo-bsc/system_information.c M tests/codec_pref/codec_pref_test.c M tests/handover/handover_test.c 48 files changed, 88 insertions(+), 88 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/66/16066/1 diff --git a/doc/e1-data-model.txt b/doc/e1-data-model.txt index 509004f..06f9f30 100644 --- a/doc/e1-data-model.txt +++ b/doc/e1-data-model.txt @@ -8,7 +8,7 @@ E1 link, but it could also be abis-over-IP with a mixture of TCP and RTP/UDP. To further complicate the fact, multiple BTS can share one such pysical -link. On a single E1 line, we can easily accomodate up to three BTS with +link. On a single E1 line, we can easily accommodate up to three BTS with two TRX each. Thus, it is best for OpenBSC to have some kind of abstraction layer. The BSC's diff --git a/doc/handover.txt b/doc/handover.txt index ac19e87..c5fc331 100644 --- a/doc/handover.txt +++ b/doc/handover.txt @@ -38,7 +38,7 @@ Window RXLEV averaging: 10 SACCH frames (no weighting) Window RXQUAL averaging: 1 SACCH frame (no averaging) -Level Threashold: 1 of the last 1 AV-RXLEV values < -110dBm +Level Threshold: 1 of the last 1 AV-RXLEV values < -110dBm Quality Threshold: 3 of the last 4 AV-RXQUAL values >= 5 Interference Threshold: 1 of the last AV-RXLEV > -85 dBm & 3 of the last 4 AV-RXQUAL values >= 5 diff --git a/doc/manuals/aoip-mgw-options.adoc b/doc/manuals/aoip-mgw-options.adoc index f693093..124c03f 100644 --- a/doc/manuals/aoip-mgw-options.adoc +++ b/doc/manuals/aoip-mgw-options.adoc @@ -54,7 +54,7 @@ As more modern MSCs at operators tend to favor implementing 3GPP AoIP rather than the proprietary SCCPlite based A interface, it becomes -neccessary for OsmoBSC to support this. +necessary for OsmoBSC to support this. At the same time, for compatibility reasons, the classic SCCPlite support shall be kept, if possible with reasonable effort. diff --git a/doc/manuals/chapters/counters_generated.adoc b/doc/manuals/chapters/counters_generated.adoc index 65f4ca4..f668865 100644 --- a/doc/manuals/chapters/counters_generated.adoc +++ b/doc/manuals/chapters/counters_generated.adoc @@ -22,7 +22,7 @@ | codec:fr | <> | Count the usage of FR codec by channel mode requested. | codec:hr | <> | Count the usage of HR codec by channel mode requested. | paging:attempted | <> | Paging attempts for a subscriber. -| paging:already | <> | Paging attempts ignored as subsciber was already being paged. +| paging:already | <> | Paging attempts ignored as subscriber was already being paged. | paging:responded | <> | Paging attempts with successful paging response. | paging:expired | <> | Paging Request expired because of timeout T3113. | chan_act:total | <> | Total number of Channel Activations. @@ -48,7 +48,7 @@ | codec:fr | <> | Count the usage of FR codec by channel mode requested. | codec:hr | <> | Count the usage of HR codec by channel mode requested. | paging:attempted | <> | Paging attempts for a subscriber. -| paging:already | <> | Paging attempts ignored as subsciber was already being paged. +| paging:already | <> | Paging attempts ignored as subscriber was already being paged. | paging:responded | <> | Paging attempts with successful paging response. | paging:expired | <> | Paging Request expired because of timeout T3113. | chan_act:total | <> | Total number of Channel Activations. @@ -74,7 +74,7 @@ | codec:fr | <> | Count the usage of FR codec by channel mode requested. | codec:hr | <> | Count the usage of HR codec by channel mode requested. | paging:attempted | <> | Paging attempts for a subscriber. -| paging:already | <> | Paging attempts ignored as subsciber was already being paged. +| paging:already | <> | Paging attempts ignored as subscriber was already being paged. | paging:responded | <> | Paging attempts with successful paging response. | paging:expired | <> | Paging Request expired because of timeout T3113. | chan_act:total | <> | Total number of Channel Activations. @@ -105,14 +105,14 @@ | assignment:no_channel | <> | Failure to allocate lchan for Assignment. | assignment:timeout | <> | Assignment timed out. | assignment:failed | <> | Received Assignment Failure message. -| assignment:error | <> | Assigment failed for other reason. +| assignment:error | <> | Assignment failed for other reason. | handover:attempted | <> | Intra-BSC handover attempts. | handover:completed | <> | Intra-BSC handover completed. | handover:stopped | <> | Connection ended during HO. | handover:no_channel | <> | Failure to allocate lchan for HO. | handover:timeout | <> | Handover timed out. | handover:failed | <> | Received Handover Fail messages. -| handover:error | <> | Re-assigment failed for other reason. +| handover:error | <> | Re-assignment failed for other reason. | interbsc_ho_out:attempted | <> | Attempts to handover to remote BSS. | interbsc_ho_out:completed | <> | Handover to remote BSS completed. | interbsc_ho_out:stopped | <> | Connection ended during HO. diff --git a/doc/manuals/chapters/handover.adoc b/doc/manuals/chapters/handover.adoc index bb99751..d9805f7 100644 --- a/doc/manuals/chapters/handover.adoc +++ b/doc/manuals/chapters/handover.adoc @@ -61,7 +61,7 @@ The BSC is the point of decision whether to do handover or not. This can be a hugely complex combination of heuristics, knowledge of cell load and codec -capabilites. The most important indicator for handover though is: does an MS +capabilities. The most important indicator for handover though is: does an MS report a neighbor with a better signal than the current cell? See <>. diff --git a/doc/manuals/chapters/osmux_bsc.adoc b/doc/manuals/chapters/osmux_bsc.adoc index c9f387b..0a11d17 100644 --- a/doc/manuals/chapters/osmux_bsc.adoc +++ b/doc/manuals/chapters/osmux_bsc.adoc @@ -33,7 +33,7 @@ up. If _BSSMAP Assign Request_ from MSC contains _Osmux CID_ IE, {program-name} will instruct its MGW to set up an Osmux connection on the CN-side of the MGCP endpoint, and will provide the MSC with its _recvCID_ - through the extension IE _Osmux CID_ appened to the _BSSMAP Assign Complete_ + through the extension IE _Osmux CID_ appended to the _BSSMAP Assign Complete_ message. On the other hand, if _BSSMAP Assign Request_ doesn't contain an _Osmux CID_ IE, {program-name} will instruct its MGW to set up a regular RTP connection on the CN-side of the MGCP endpoint. diff --git a/doc/manuals/message-sequences/mo_call-abis_a.msc b/doc/manuals/message-sequences/mo_call-abis_a.msc index 4597ab1..ba7f0aa 100644 --- a/doc/manuals/message-sequences/mo_call-abis_a.msc +++ b/doc/manuals/message-sequences/mo_call-abis_a.msc @@ -107,7 +107,7 @@ ...; bsc <- m_sc [label="SCCP DT1 (BSSMAP CLEAR CMD)"]; bsc -> bsc [label="GSCON_EV_A_CLEAR_CMD", textcolor="red", linecolor="red"]; - --- [label="BSC must release terrestrial resoures before reporting CLEAR COMPLETE"]; + --- [label="BSC must release terrestrial resources before reporting CLEAR COMPLETE"]; mgw <- bsc [label="MGCP DLCX rtpbridge/2 at mgw", textcolor="blue", linecolor="blue"]; mgw box mgw [label="Release MSC-facing local RTP port (3000)", textcolor="blue", linecolor="blue"]; mgw -> bsc [label="MGCP DLCX rtpbridge/2 at mgw OK", textcolor="blue", linecolor="blue"]; diff --git a/doc/manuals/mgw/classic-bsc.msc b/doc/manuals/mgw/classic-bsc.msc index 56d2889..97b6513 100644 --- a/doc/manuals/mgw/classic-bsc.msc +++ b/doc/manuals/mgw/classic-bsc.msc @@ -1,5 +1,5 @@ # MO Call on a classic E1 Abis BTS with classic E1 A BSC -# not actually supported by OsmoBSC (nor planned), for refrence only +# not actually supported by OsmoBSC (nor planned), for reference only msc { hscale=2; ms [label="MS"], bts [label="E1 BTS"], bsc[label="OsmoBSC"], trau[label="TRAU"], m_sc[label="MSC"]; diff --git a/doc/manuals/osmux-reference.adoc b/doc/manuals/osmux-reference.adoc index 929f442..e28347a 100644 --- a/doc/manuals/osmux-reference.adoc +++ b/doc/manuals/osmux-reference.adoc @@ -5,7 +5,7 @@ In case of satellite based GSM systems, the transmission cost on the back-haul is relatively expensive. The billing for such SAT uplink is usually done in a -pay-per-byte basis. Thus, reducing the amount of bytes transfered would +pay-per-byte basis. Thus, reducing the amount of bytes transferred would significantly reduce the cost of such uplinks. In such environment, even seemingly small protocol optimizations, eg. message batching and trunking, can result in significant cost reduction. @@ -93,7 +93,7 @@ why: * TCP is a streaming protocol aimed at maximizing the throughput of a stream - withing the constraints of the underlying transport layer. This feature is + within the constraints of the underlying transport layer. This feature is not really required for the low-bandwidth and low-pps GSM signalling. Moreover, TCP is stream oriented and does not conserve message boundaries. As such, the IPA header has to serve as a boundary between messages in the @@ -114,7 +114,7 @@ LAPD has a very small header (3-5 octets) compared to TCPs 20 bytes. Even if LAPD is put inside UDP, the combination of 11 to 13 octets still saves a -noticable number of bytes per packet. Moreover, LAPD has been modified for less +noticeable number of bytes per packet. Moreover, LAPD has been modified for less reliable interfaces such as the GSM Um interface (LAPDm), as well as for the use in satellite systems (LAPsat in ETSI GMR). @@ -136,7 +136,7 @@ * FT == 2: Dummy * FT == 3: Reserved for Fture Use -There can be any number of OSmux messages batched up in one underlaying packet. +There can be any number of OSmux messages batched up in one underlying packet. In this case, the multiple OSmux messages are simply concatenated, i.e. the OSmux header control octet directly follows the last octet of the payload of the previous OSmux message. @@ -224,7 +224,7 @@ clock) as specified in AMR-RTP. AMR Codec Mode Request (AMR-FT): 4 bits:: -This is a mapping from te AMR FT field (Frame type index) in RFC3267 Section +This is a mapping from the AMR FT field (Frame type index) in RFC3267 Section 4.3.2. The length of each codec frame needs to be determined from this field. It is thus guaranteed that all frames for a specific stream in an OSmux batch are of the same AMR type. @@ -356,7 +356,7 @@ === Batching -Following chart shows how batching with a factor of 3 works. To easilly +Following chart shows how batching with a factor of 3 works. To easily illustrate batching, only uplink and one concurrent call is considered. It can be seen how 3 RTP packets from MSa arrive to the BSC from the BTS. The @@ -559,7 +559,7 @@ A batching factor of 8 provides very little improvement with regards to batching 4 messages. Still, we risk to degrade user experience. Thus, we consider a -batching factor of 3 and 4 is adecuate. +batching factor of 3 and 4 is adequate. == Other proposed follow-up works diff --git a/doc/manuals/vty/bsc_vty_reference.xml b/doc/manuals/vty/bsc_vty_reference.xml index 178e5b5..8401043 100644 --- a/doc/manuals/vty/bsc_vty_reference.xml +++ b/doc/manuals/vty/bsc_vty_reference.xml @@ -1336,7 +1336,7 @@ - + diff --git a/doc/manuals/vty/libbsc_vty_additions.xml b/doc/manuals/vty/libbsc_vty_additions.xml index dbf4080..8696252 100644 --- a/doc/manuals/vty/libbsc_vty_additions.xml +++ b/doc/manuals/vty/libbsc_vty_additions.xml @@ -118,7 +118,7 @@ The periodic location updating interval determines how often the MS will periodically perform a LOCATION UPDATE procedure, - despite not having actuall changed location. The value is + despite not having actually changed location. The value is specified in minutes. diff --git a/include/mISDNif.h b/include/mISDNif.h index 8e065d2..c8588cd 100644 --- a/include/mISDNif.h +++ b/include/mISDNif.h @@ -46,7 +46,7 @@ #define MISDN_RELEASE 20 /* primitives for information exchange - * generell format + * general format * <16 bit 0 > * <8 bit command> * BIT 8 = 1 LAYER private @@ -65,7 +65,7 @@ #define MISDN_CMDMASK 0xff00 #define MISDN_LAYERMASK 0x00ff -/* generell commands */ +/* general commands */ #define OPEN_CHANNEL 0x0100 #define CLOSE_CHANNEL 0x0200 #define CONTROL_CHANNEL 0x0300 @@ -110,7 +110,7 @@ #define DL_UNITDATA_IND 0x3108 #define DL_INFORMATION_IND 0x0008 -/* intern layer 2 managment */ +/* intern layer 2 management */ #define MDL_ASSIGN_REQ 0x1804 #define MDL_ASSIGN_IND 0x1904 #define MDL_REMOVE_REQ 0x1A04 diff --git a/include/osmocom/bsc/a_reset.h b/include/osmocom/bsc/a_reset.h index a09972e..46a392f 100644 --- a/include/osmocom/bsc/a_reset.h +++ b/include/osmocom/bsc/a_reset.h @@ -25,7 +25,7 @@ /* Create and start state machine which handles the reset/reset-ack procedure */ void a_reset_alloc(struct bsc_msc_data *msc, const char *name, void *cb); -/* Confirm that we sucessfully received a reset acknowlege message */ +/* Confirm that we successfully received a reset acknowledge message */ void a_reset_ack_confirm(struct bsc_msc_data *msc); /* Report a failed connection */ diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h index 4ccfd14..f7db779 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -60,7 +60,7 @@ /* Siemens vendor-specific RSL extensions */ int rsl_siemens_mrpci(struct gsm_lchan *lchan, struct rsl_mrpci *mrpci); -/* ip.access specfic RSL extensions */ +/* ip.access specific RSL extensions */ struct msgb *rsl_make_ipacc_mdcx(const struct gsm_lchan *lchan, uint32_t dest_ip, uint16_t dest_port); int rsl_tx_ipacc_crcx(const struct gsm_lchan *lchan); int rsl_tx_ipacc_mdcx(const struct gsm_lchan *lchan); diff --git a/include/osmocom/bsc/acc_ramp.h b/include/osmocom/bsc/acc_ramp.h index efb12b0..31fc74f 100644 --- a/include/osmocom/bsc/acc_ramp.h +++ b/include/osmocom/bsc/acc_ramp.h @@ -71,7 +71,7 @@ /*! * Ramping step interval in seconds. * This value depends on the current BTS channel load average, unless - * it has been overriden by VTY configuration. + * it has been overridden by VTY configuration. */ unsigned int step_interval_sec; bool step_interval_is_fixed; diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 23aacd6..fe626b1 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -273,7 +273,7 @@ /* for advanced ping/pong */ int send_ping; - /* SCCP connection realted */ + /* SCCP connection related */ struct bsc_msc_data *msc; /* Sigtran connection ID */ @@ -1010,7 +1010,7 @@ /* Geographical location of the BTS */ struct llist_head loc_list; - /* number of ths BTS in network */ + /* number of this BTS in network */ uint8_t nr; /* human readable name / description */ char *description; @@ -1084,7 +1084,7 @@ * receival of empty SI disabling unsupported SI. see OS#3707. */ bool si_unused_send_empty; - /* ip.accesss Unit ID's have Site/BTS/TRX layout */ + /* ip.access Unit ID's have Site/BTS/TRX layout */ union { struct { uint16_t site_id; @@ -1251,7 +1251,7 @@ struct llist_head local_neighbors; /* BTS-specific overrides for timer values from struct gsm_network. */ - uint8_t T3122; /* ASSIGMENT REJECT wait indication */ + uint8_t T3122; /* ASSIGNMENT REJECT wait indication */ bool T3113_dynamic; /* Calculate T3113 timeout dynamically based on BTS channel config and load */ /* Periodic channel load measurements are used to maintain T3122. */ @@ -1411,7 +1411,7 @@ [BTS_CTR_CODEC_V1_HR] = {"codec:hr", "Count the usage of HR codec by channel mode requested."}, [BTS_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a subscriber."}, - [BTS_CTR_PAGING_ALREADY] = {"paging:already", "Paging attempts ignored as subsciber was already being paged."}, + [BTS_CTR_PAGING_ALREADY] = {"paging:already", "Paging attempts ignored as subscriber was already being paged."}, [BTS_CTR_PAGING_RESPONDED] = {"paging:responded", "Paging attempts with successful paging response."}, [BTS_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, [BTS_CTR_CHAN_ACT_TOTAL] = {"chan_act:total", "Total number of Channel Activations."}, @@ -1476,7 +1476,7 @@ [BSC_CTR_ASSIGNMENT_NO_CHANNEL] = {"assignment:no_channel", "Failure to allocate lchan for Assignment."}, [BSC_CTR_ASSIGNMENT_TIMEOUT] = {"assignment:timeout", "Assignment timed out."}, [BSC_CTR_ASSIGNMENT_FAILED] = {"assignment:failed", "Received Assignment Failure message."}, - [BSC_CTR_ASSIGNMENT_ERROR] = {"assignment:error", "Assigment failed for other reason."}, + [BSC_CTR_ASSIGNMENT_ERROR] = {"assignment:error", "Assignment failed for other reason."}, [BSC_CTR_HANDOVER_ATTEMPTED] = {"handover:attempted", "Intra-BSC handover attempts."}, [BSC_CTR_HANDOVER_COMPLETED] = {"handover:completed", "Intra-BSC handover completed."}, @@ -1484,7 +1484,7 @@ [BSC_CTR_HANDOVER_NO_CHANNEL] = {"handover:no_channel", "Failure to allocate lchan for HO."}, [BSC_CTR_HANDOVER_TIMEOUT] = {"handover:timeout", "Handover timed out."}, [BSC_CTR_HANDOVER_FAILED] = {"handover:failed", "Received Handover Fail messages."}, - [BSC_CTR_HANDOVER_ERROR] = {"handover:error", "Re-assigment failed for other reason."}, + [BSC_CTR_HANDOVER_ERROR] = {"handover:error", "Re-assignment failed for other reason."}, [BSC_CTR_INTER_BSC_HO_OUT_ATTEMPTED] = {"interbsc_ho_out:attempted", "Attempts to handover to remote BSS."}, @@ -1630,7 +1630,7 @@ extern void *tall_bsc_ctx; -/* this actaully refers to the IPA transport, not the BTS model */ +/* this actually refers to the IPA transport, not the BTS model */ static inline int is_ipaccess_bts(struct gsm_bts *bts) { switch (bts->type) { diff --git a/include/osmocom/bsc/meas_feed.h b/include/osmocom/bsc/meas_feed.h index 1849a89..353278e 100644 --- a/include/osmocom/bsc/meas_feed.h +++ b/include/osmocom/bsc/meas_feed.h @@ -20,7 +20,7 @@ uint8_t lchan_type; /* The physical channel type, enum gsm_phys_chan_config */ uint8_t pchan_type; - /* number of ths BTS in network */ + /* number of this BTS in network */ uint8_t bts_nr; /* number of this TRX in the BTS */ uint8_t trx_nr; diff --git a/include/osmocom/bsc/osmo_bsc_reset.h b/include/osmocom/bsc/osmo_bsc_reset.h index 578f763..fb66df0 100644 --- a/include/osmocom/bsc/osmo_bsc_reset.h +++ b/include/osmocom/bsc/osmo_bsc_reset.h @@ -21,7 +21,7 @@ /* Create and start state machine which handles the reset/reset-ack procedure */ void start_reset_fsm(struct bsc_msc_data *msc); -/* Confirm that we sucessfully received a reset acknowlege message */ +/* Confirm that we successfully received a reset acknowledge message */ void reset_ack_confirm(struct bsc_msc_data *msc); /* Report a failed connection */ diff --git a/include/osmocom/bsc/osmo_bsc_sigtran.h b/include/osmocom/bsc/osmo_bsc_sigtran.h index b934d51..dc86fad 100644 --- a/include/osmocom/bsc/osmo_bsc_sigtran.h +++ b/include/osmocom/bsc/osmo_bsc_sigtran.h @@ -33,7 +33,7 @@ /* Send data to MSC */ int osmo_bsc_sigtran_send(struct gsm_subscriber_connection *conn, struct msgb *msg); -/* Initalize osmo sigtran backhaul */ +/* Initialize osmo sigtran backhaul */ int osmo_bsc_sigtran_init(struct llist_head *mscs); /* Close all open sigtran connections and channels */ diff --git a/include/osmocom/bsc/penalty_timers.h b/include/osmocom/bsc/penalty_timers.h index 3aae8a0..f5d1778 100644 --- a/include/osmocom/bsc/penalty_timers.h +++ b/include/osmocom/bsc/penalty_timers.h @@ -10,7 +10,7 @@ * returns an empty struct penalty_timers. */ struct penalty_timers *penalty_timers_init(void *ctx); -/* Add a penalty timer for an arbitary object. +/* Add a penalty timer for an arbitrary object. * Note: the ownership of for_object remains with the caller; it is handled as a mere void* value, so * invalid pointers can be handled without problems, while common sense dictates that invalidated * pointers (freed objects) should probably be removed from this list. More importantly, the pointer must diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index 54e4efd..f873809 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -192,7 +192,7 @@ static int ipacc_msg_ack(uint8_t mt, struct gsm_bts_trx *trx) { if (sw_load_state == 1) { - fprintf(stderr, "The new software is activaed.\n"); + fprintf(stderr, "The new software is activated.\n"); check_restart_or_exit(trx); } else if (oml_state == 1) { fprintf(stderr, "Set the NV Attributes.\n"); @@ -238,7 +238,7 @@ /* Create whitelist from results */ physconf_len = build_physconf(physconf_buf, &trx->ipaccess.rxlev_stat); - /* Start next test abbout BCCH channel usage */ + /* Start next test about BCCH channel usage */ ipac_nwl_test_start(trx, NM_IPACC_TESTNO_BCCH_CHAN_USAGE, physconf_buf, physconf_len); break; diff --git a/src/ipaccess/ipaccess-proxy.c b/src/ipaccess/ipaccess-proxy.c index 26c5bcd..a4ee10e 100644 --- a/src/ipaccess/ipaccess-proxy.c +++ b/src/ipaccess/ipaccess-proxy.c @@ -581,7 +581,7 @@ msgb_put(msg, ret); - /* then read te length as specified in header */ + /* then read the length as specified in header */ msg->l2h = msg->data + sizeof(*hh); len = ntohs(hh->len); ret = recv(bfd->fd, msg->l2h, len, 0); diff --git a/src/osmo-bsc/a_reset.c b/src/osmo-bsc/a_reset.c index b75272f..9e046be 100644 --- a/src/osmo-bsc/a_reset.c +++ b/src/osmo-bsc/a_reset.c @@ -163,11 +163,11 @@ OSMO_ASSERT(reset_fsm); msc->a.reset_fsm = reset_fsm; - /* Immediatelly (1ms) kick off reset sending mechanism */ + /* Immediately (1ms) kick off reset sending mechanism */ osmo_fsm_inst_state_chg_ms(reset_fsm, ST_DISC, 1, RESET_RESEND_TIMER_NO); } -/* Confirm that we sucessfully received a reset acknowlege message */ +/* Confirm that we successfully received a reset acknowledge message */ void a_reset_ack_confirm(struct bsc_msc_data *msc) { if (!msc) diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 48e9183..523cc38 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -2105,7 +2105,7 @@ { struct abis_om_hdr *oh; - DEBUGP(DNM, "PEFORM TEST %s\n", abis_nm_test_name(test_nr)); + DEBUGP(DNM, "PERFORM TEST %s\n", abis_nm_test_name(test_nr)); if (!msg) msg = nm_msgb_alloc(); @@ -2851,7 +2851,7 @@ LOG_TRX(trx, DRSL, LOGL_NOTICE, "RSL connection request timed out\n"); - /* Fake an RSL CONECT NACK message from the BTS. */ + /* Fake an RSL CONNECT NACK message from the BTS. */ signal.trx = trx; signal.msg_type = NM_MT_IPACC_RSL_CONNECT_NACK; osmo_signal_dispatch(SS_NM, S_NM_IPACC_NACK, &signal); diff --git a/src/osmo-bsc/abis_nm_vty.c b/src/osmo-bsc/abis_nm_vty.c index 3019eb8..b1c6d56 100644 --- a/src/osmo-bsc/abis_nm_vty.c +++ b/src/osmo-bsc/abis_nm_vty.c @@ -1,4 +1,4 @@ -/* VTY interface for A-bis OML (Netowrk Management) */ +/* VTY interface for A-bis OML (Network Management) */ /* (C) 2009-2018 by Harald Welte * diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c index fda273d..e6b06c3 100644 --- a/src/osmo-bsc/abis_om2000.c +++ b/src/osmo-bsc/abis_om2000.c @@ -1578,7 +1578,7 @@ abis_om2k_tx_op_info(omfp->trx->bts, &omfp->mo->addr, 1); return; case OM2K_MO_CLS_DP: - /* Transition directoy to WAIT_ENABLE_ACCEPT */ + /* Transition directory to WAIT_ENABLE_ACCEPT */ osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_ENABLE_ACCEPT, OM2K_TIMEOUT, 0); abis_om2k_tx_enable_req(omfp->trx->bts, &omfp->mo->addr); diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index d4917f2..8df0e81 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1391,7 +1391,7 @@ /* check availability / allocate channel * * - First try to allocate SDCCH. - * - If SDCCH is not available, try a TCH/H (less bandwith). + * - If SDCCH is not available, try a TCH/H (less bandwidth). * - If there is still no channel available, try a TCH/F. * */ @@ -1438,7 +1438,7 @@ uint8_t buf[GSM_MACBLOCK_LEN]; struct gsm48_imm_ass *ia = (struct gsm48_imm_ass *) buf; - /* create IMMEDIATE ASSIGN 04.08 messge */ + /* create IMMEDIATE ASSIGN 04.08 message */ memset(ia, 0, sizeof(*ia)); /* we set ia->l2_plen once we know the length of the MA below */ ia->proto_discr = GSM48_PDISC_RR; diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index aefa4af..16e04cd 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -434,7 +434,7 @@ conn->assignment.req = *req; req = &conn->assignment.req; - /* Check if we need a voice stream. If yes, set the approriate struct + /* Check if we need a voice stream. If yes, set the appropriate struct * members in conn */ if (check_requires_voice_stream(conn) < 0) return; diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 60f035d..a96adb3 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -543,7 +543,7 @@ const struct mgcp_conn_peer *prev_crcx_info = osmo_mgcpc_ep_ci_get_rtp_info(ci); if (!conn->user_plane.mgw_endpoint) { - LOGPFSML(conn->fi, LOGL_ERROR, "Internal error: conn has a CI but no endoint\n"); + LOGPFSML(conn->fi, LOGL_ERROR, "Internal error: conn has a CI but no endpoint\n"); return false; } diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 0fbff86..1195d65 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -2013,7 +2013,7 @@ bts = bsc_bts_alloc_register(gsmnet, GSM_BTS_TYPE_UNKNOWN, HARDCODED_BSIC); /* - * Initalize bts->acc_ramp here. Else we could segfault while + * Initialize bts->acc_ramp here. Else we could segfault while * processing a configuration file with ACC ramping settings. */ acc_ramp_init(&bts->acc_ramp, bts); @@ -3816,7 +3816,7 @@ } } -/* Give the current amr configuration a final consistency chack by feeding the +/* Give the current amr configuration a final consistency check by feeding the * the configuration into the gsm48 multirate IE generator function */ static int check_amr_config(struct vty *vty) { @@ -4610,7 +4610,7 @@ "BTS related commands\n" BTS_NR_STR "SMS Cell Broadcast\n" "Normal (one-shot) SMSCB Message; sent once over Abis+Um\n" - "Schedule (one-shot) SMSCB Messag; sent once over Abis+Um\n" + "Schedule (one-shot) SMSCB Message; sent once over Abis+Um\n" "Default (repeating) SMSCB Message; sent once over Abis, unlimited ovrer Um\n" "Last Valid Block\n" "Hex Encoded SMSCB message (up to 88 octets)\n") diff --git a/src/osmo-bsc/bts_siemens_bs11.c b/src/osmo-bsc/bts_siemens_bs11.c index b1688f3..d0fe38b 100644 --- a/src/osmo-bsc/bts_siemens_bs11.c +++ b/src/osmo-bsc/bts_siemens_bs11.c @@ -330,7 +330,7 @@ /* Object Class: Transceiver BTS relat. Number: 0 - Tranceiver number: 0 + Transceiver number: 0 Instance 3: FF SET TRX ATTRIBUTES aRFCNList (HEX): 0001 diff --git a/src/osmo-bsc/codec_pref.c b/src/osmo-bsc/codec_pref.c index b27defc..be442b5 100644 --- a/src/osmo-bsc/codec_pref.c +++ b/src/osmo-bsc/codec_pref.c @@ -189,7 +189,7 @@ bool rate_match = false; /* Check if the BTS provides a physical channel that matches the - * bandwith of the desired codec. */ + * bandwidth of the desired codec. */ rc = full_rate_from_perm_spch(&full_rate, perm_spch); if (rc < 0) return false; @@ -286,13 +286,13 @@ * However, only AoIP based networks will include a speech codec list * into the ASSIGNMENT COMMAND. For non AoIP based networks, no speech * codec (sc_match) will be available, so we will fully rely on the - * local configuration for thoses cases. */ + * local configuration for those cases. */ if (sc_match) ch_mode_rate->s15_s0 = sc_match->cfg & amr_s15_s0_supported; else ch_mode_rate->s15_s0 = amr_s15_s0_supported; - /* Prefer "Config-NB-Code = 1" (S1) over all other AMR rates setttings. + /* Prefer "Config-NB-Code = 1" (S1) over all other AMR rates settings. * When S1 is set, the active set will automatically include 12.2k, 7.4k, * 5.9k, 4.75k, in case of HR 12,2k is left out. */ if (ch_mode_rate->s15_s0 & GSM0808_SC_CFG_AMR_4_75_5_90_7_40_12_20) { diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c index 1fbbb57..586eeab 100644 --- a/src/osmo-bsc/gsm_04_08_rr.c +++ b/src/osmo-bsc/gsm_04_08_rr.c @@ -405,12 +405,12 @@ for (i = 0; i < num_modes; i++) { if (i > 0 && modes[i - 1].mode > modes[i].mode) { LOGP(DRR, LOGL_ERROR, - "BUG: Multirate codec with inconsistant config (mode order).\n"); + "BUG: Multirate codec with inconsistent config (mode order).\n"); return -EINVAL; } if (i > 0 && modes[i - 1].mode == modes[i].mode) { LOGP(DRR, LOGL_ERROR, - "BUG: Multirate codec with inconsistant config (duplicate modes).\n"); + "BUG: Multirate codec with inconsistent config (duplicate modes).\n"); return -EINVAL; } } @@ -460,7 +460,7 @@ } if (!mode_valid) { LOGP(DRR, LOGL_ERROR, - "BUG: Multirate codec with inconsistant config (no mode defined).\n"); + "BUG: Multirate codec with inconsistent config (no mode defined).\n"); return -EINVAL; } } diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index e7fe065..1c2c4d8 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -838,7 +838,7 @@ bts->chan_load_avg = 0; /* timer overrides */ - bts->T3122 = 0; /* not overriden by default */ + bts->T3122 = 0; /* not overridden by default */ bts->T3113_dynamic = true; /* dynamic by default */ bts->dtxu = GSM48_DTX_SHALL_NOT_BE_USED; diff --git a/src/osmo-bsc/handover_decision.c b/src/osmo-bsc/handover_decision.c index 0bfbce2..5338400 100644 --- a/src/osmo-bsc/handover_decision.c +++ b/src/osmo-bsc/handover_decision.c @@ -180,7 +180,7 @@ if (nmp->arfcn == 0) continue; - /* caculate average rxlev for this cell over the window */ + /* calculate average rxlev for this cell over the window */ avg = neigh_meas_avg(nmp, ho_get_hodec1_rxlev_neigh_avg_win(bts->ho)); /* check if hysteresis is fulfilled */ diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c index 0e24c0d..ab507e8 100644 --- a/src/osmo-bsc/handover_decision_2.c +++ b/src/osmo-bsc/handover_decision_2.c @@ -982,7 +982,7 @@ OSMO_ASSERT(candidates); - /* caculate average rxlev for this cell over the window */ + /* calculate average rxlev for this cell over the window */ av_rxlev = get_meas_rep_avg(lchan, ho_get_hodec2_full_tdma(bts->ho) ? MEAS_REP_DL_RXLEV_FULL : MEAS_REP_DL_RXLEV_SUB, @@ -990,7 +990,7 @@ if (_av_rxlev) *_av_rxlev = av_rxlev; - /* in case there is no measurment report (yet) */ + /* in case there is no measurement report (yet) */ if (av_rxlev < 0) { LOGPHOLCHAN(lchan, LOGL_DEBUG, "Not collecting candidates, not enough measurements" " (got %d, want %u)\n", @@ -1023,7 +1023,7 @@ * Do not perform this process, if handover and assignment are disabled for * the current cell. * Do not perform handover, if the minimum acceptable RX level - * is not reched for this cell. + * is not reached for this cell. * * If one or more 'better cells' are available, check the current and neighbor * cell measurements in descending order of their RX levels (down-link): @@ -1263,7 +1263,7 @@ return; } - /* get average levels. if not enought measurements yet, value is < 0 */ + /* get average levels. if not enough measurements yet, value is < 0 */ av_rxlev = get_meas_rep_avg(lchan, ho_get_hodec2_full_tdma(bts->ho) ? MEAS_REP_DL_RXLEV_FULL : MEAS_REP_DL_RXLEV_SUB, @@ -1366,7 +1366,7 @@ * Do not perform this process, if handover and assignment are disabled for * the current cell. * Do not perform handover, if the minimum acceptable RX level - * is not reched for this cell. + * is not reached for this cell. * Only check candidates that will solve/reduce congestion. * * If a cell is congested, all slots are checked for all their RX levels diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index d159347..e36aaae 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -848,7 +848,7 @@ if (result == HO_RESULT_OK) conn->ho.created_ci_for_msc = NULL; - /* If the performed handover was an INTRA BSC HANDOVER, inform the MSC that a handover has happend */ + /* If the performed handover was an INTRA BSC HANDOVER, inform the MSC that a handover has happened */ if (result == HO_RESULT_OK && ((ho->scope & HO_INTRA_CELL) || (ho->scope & HO_INTRA_BSC))) send_handover_performed(conn); diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index a5efa3d..da09aec 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -446,7 +446,7 @@ /* At this point, we are taking over an old lchan's MGW endpoint (if any). */ if (!lchan->mgw_endpoint_ci_bts && old_lchan) { - /* The old lchan shall forget the enpoint now. We might put it back upon ROLLBACK */ + /* The old lchan shall forget the endpoint now. We might put it back upon ROLLBACK */ lchan->mgw_endpoint_ci_bts = old_lchan->mgw_endpoint_ci_bts; old_lchan->mgw_endpoint_ci_bts = NULL; } diff --git a/src/osmo-bsc/neighbor_ident_vty.c b/src/osmo-bsc/neighbor_ident_vty.c index f158e7f..54d6944 100644 --- a/src/osmo-bsc/neighbor_ident_vty.c +++ b/src/osmo-bsc/neighbor_ident_vty.c @@ -425,7 +425,7 @@ bts->nr, neigh_bts->nr, VTY_NEWLINE); removed += rc; } else { - vty_out(vty, "%% Error while removing local neigbor bts %u to bts %u, aborted%s", + vty_out(vty, "%% Error while removing local neighbor bts %u to bts %u, aborted%s", bts->nr, neigh_bts->nr, VTY_NEWLINE); return CMD_WARNING; } diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index dcd06f3..74faae1 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -641,13 +641,13 @@ return 0; } -/* Select a prefered and an alternative codec rate depending on the available +/* Select a preferred and an alternative codec rate depending on the available * capabilities. This decision does not include the actual channel load yet, - * this is also the reason why the result is a prefered and an alternate + * this is also the reason why the result is a preferred and an alternate * setting. The final decision is made in assignment_fsm.c when the actual * lchan is requested. The preferred lchan will be requested first. If we * find an alternate setting here, this one will be tried secondly if our - * primary coice fails. */ + * primary choice fails. */ static int select_codecs(struct assignment_request *req, struct gsm0808_channel_type *ct, struct gsm_subscriber_connection *conn) { diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c index f0c62a1..4ab0441 100644 --- a/src/osmo-bsc/osmo_bsc_lcls.c +++ b/src/osmo-bsc/osmo_bsc_lcls.c @@ -743,7 +743,7 @@ struct gsm_subscriber_connection *conn = fi->priv; if (conn->lcls.other) { - /* inform the "other" side that we're dead, so it can disabe LS and send NOTIFY */ + /* inform the "other" side that we're dead, so it can disable LS and send NOTIFY */ if (conn->lcls.other->fi) osmo_fsm_inst_dispatch(conn->lcls.other->lcls.fi, LCLS_EV_OTHER_DEAD, conn); conn->lcls.other = NULL; diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 41e810b..0fe35b3 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -844,7 +844,7 @@ logging_vty_add_deprecated_subsys(tall_bsc_ctx, "cc"); logging_vty_add_deprecated_subsys(tall_bsc_ctx, "mgcp"); - /* Initalize SS7 */ + /* Initialize SS7 */ osmo_ss7_init(); osmo_ss7_vty_init_asp(tall_bsc_ctx); osmo_sccp_vty_init(); diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 543e6de..50b03ce 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -475,7 +475,7 @@ static int asp_rx_unknown(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg); -/* Initalize osmo sigtran backhaul */ +/* Initialize osmo sigtran backhaul */ int osmo_bsc_sigtran_init(struct llist_head *mscs) { bool free_attempt_used = false; @@ -567,7 +567,7 @@ /* If we have detected that the SS7 configuration of the MSC we have just initialized * was incomplete or completely missing, we can not tolerate another incomplete - * configuration. The reson for this is that we do only specify exactly one default + * configuration. The reason for this is that we do only specify exactly one default * pointcode pair. We also specify localhost as default IP-Address. If we have wanted * to support multiple MSCs with automatic configuration we would be forced to invent * a complex ruleset how to allocate the pointcodes and respective IP-Addresses. diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index ca52ee7..d32cded 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -306,7 +306,7 @@ /* TODO: take into account load of paging group for req->bsub */ /* MFRMS defines repeat interval of paging messages for MSs that belong - * to same paging group accross multiple 51 frame multiframes. + * to same paging group across multiple 51 frame multiframes. * MAXTRANS defines maximum number of RACH retransmissions. */ to_us = GSM51_MFRAME_DURATION_us * (bts->si_common.chan_desc.bs_pa_mfrms + 2) * diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 4425117..b041402 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -282,7 +282,7 @@ return pcu_sock_send(bts, msg); } -/* we need to decode the raw RR paging messsage (see PCU code +/* we need to decode the raw RR paging message (see PCU code * Encoding::write_paging_request) and extract the mobile identity * (P-TMSI) from it */ static int pcu_rx_rr_paging(struct gsm_bts *bts, uint8_t paging_group, @@ -607,7 +607,7 @@ return rc; } -/* accept connection comming from PCU */ +/* accept connection coming from PCU */ static int pcu_sock_accept(struct osmo_fd *bfd, unsigned int flags) { struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 4709f7f..6e58419 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -248,7 +248,7 @@ return r; } -/* Scrambling Code as defined in 3GPP TS 25.213 is 9 bit long so number below is unreacheable upper bound */ +/* Scrambling Code as defined in 3GPP TS 25.213 is 9 bit long so number below is unreachable upper bound */ #define SC_BOUND 600 /* Find position for a given UARFCN (take SC into consideration if it's available) in a sorted list @@ -518,7 +518,7 @@ for (i = 0; i < bv->data_len*8; i++) { /* in case of SI2 or SI5 allow all neighbours in same band - * in case of SI*bis, allow neighbours in same band ouside pgsm + * in case of SI*bis, allow neighbours in same band outside pgsm * in case of SI*ter, allow neighbours in different bands */ if (!bitvec_get_bit_pos(bv, i)) diff --git a/tests/codec_pref/codec_pref_test.c b/tests/codec_pref/codec_pref_test.c index ce82f3d..8bc31cd 100644 --- a/tests/codec_pref/codec_pref_test.c +++ b/tests/codec_pref/codec_pref_test.c @@ -325,7 +325,7 @@ cfg->m10_2 = 0; cfg->m12_2 = 0; - /* Initalize TRX with a TCH/F and a TCH/H channel */ + /* Initialize TRX with a TCH/F and a TCH/H channel */ memset(&trx, 0, sizeof(trx)); INIT_LLIST_HEAD(&bts->trx_list); llist_add(&trx.list, &bts->trx_list); diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index bedf6f9..0d98717 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -696,7 +696,7 @@ "Hysteresis\n\n" "If neighbor cell is better, handover is only performed if the\n" - "ammount of improvement is greater or equal hyteresis\n", + "amount of improvement is greater or equal hyteresis\n", "create-bts", "2", "create-ms", "0", "TCH/F", "AMR", @@ -817,7 +817,7 @@ "reports are received, before RXQUAL is checked.\n", /* (See also test 28, which tests for RXQUAL triggering HO to congested cell.) */ /* TODO: bad RXQUAL may want to prefer assignment within the same cell to avoid interference. - * See Performence Enhancements in a Frequency Hopping GSM Network (Nielsen Wigard 2002), Chapter + * See Performance Enhancements in a Frequency Hopping GSM Network (Nielsen Wigard 2002), Chapter * 2.1.1, "Interference" in the list of triggers on p.157. */ "create-bts", "2", @@ -1142,7 +1142,7 @@ "2", "No (or not enough) measurements for handover\n\n" "Do not solve congestion in cell, because there is no measurement.\n" - "As soon as enough measurments available (1 in our case), perform\n" + "As soon as enough measurements available (1 in our case), perform\n" "handover. Afterwards the old cell becomes congested and the new\n" "cell is not. Do not perform handover until new measurements are\n" "received.\n", -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c Gerrit-Change-Number: 16066 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 13 21:45:18 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 13 Nov 2019 21:45:18 +0000 Subject: Change in osmo-bsc[master]: Fix some typos In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16066 ) Change subject: Fix some typos ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c Gerrit-Change-Number: 16066 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 13 Nov 2019 21:45:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 05:53:02 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 14 Nov 2019 05:53:02 +0000 Subject: Change in osmo-bsc[master]: Fix some typos In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16066 ) Change subject: Fix some typos ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-bsc/+/16066/1/src/osmo-bsc/abis_om2000.c File src/osmo-bsc/abis_om2000.c: https://gerrit.osmocom.org/c/osmo-bsc/+/16066/1/src/osmo-bsc/abis_om2000.c at 1581 PS1, Line 1581: directory directly -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c Gerrit-Change-Number: 16066 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 05:53:02 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 10:29:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 10:29:29 +0000 Subject: Change in osmo-bsc[master]: Fix some typos In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16066 ) Change subject: Fix some typos ...................................................................... Fix some typos Fix typos and common misspellings in code comments and in the manual. Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c --- M doc/e1-data-model.txt M doc/handover.txt M doc/manuals/aoip-mgw-options.adoc M doc/manuals/chapters/counters_generated.adoc M doc/manuals/chapters/handover.adoc M doc/manuals/chapters/osmux_bsc.adoc M doc/manuals/message-sequences/mo_call-abis_a.msc M doc/manuals/mgw/classic-bsc.msc M doc/manuals/osmux-reference.adoc M doc/manuals/vty/bsc_vty_reference.xml M doc/manuals/vty/libbsc_vty_additions.xml M include/mISDNif.h M include/osmocom/bsc/a_reset.h M include/osmocom/bsc/abis_rsl.h M include/osmocom/bsc/acc_ramp.h M include/osmocom/bsc/gsm_data.h M include/osmocom/bsc/meas_feed.h M include/osmocom/bsc/osmo_bsc_reset.h M include/osmocom/bsc/osmo_bsc_sigtran.h M include/osmocom/bsc/penalty_timers.h M src/ipaccess/ipaccess-config.c M src/ipaccess/ipaccess-proxy.c M src/osmo-bsc/a_reset.c M src/osmo-bsc/abis_nm.c M src/osmo-bsc/abis_nm_vty.c M src/osmo-bsc/abis_om2000.c M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/assignment_fsm.c M src/osmo-bsc/bsc_subscr_conn_fsm.c M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/bts_siemens_bs11.c M src/osmo-bsc/codec_pref.c M src/osmo-bsc/gsm_04_08_rr.c M src/osmo-bsc/gsm_data.c M src/osmo-bsc/handover_decision.c M src/osmo-bsc/handover_decision_2.c M src/osmo-bsc/handover_fsm.c M src/osmo-bsc/lchan_rtp_fsm.c M src/osmo-bsc/neighbor_ident_vty.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_lcls.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc/osmo_bsc_sigtran.c M src/osmo-bsc/paging.c M src/osmo-bsc/pcu_sock.c M src/osmo-bsc/system_information.c M tests/codec_pref/codec_pref_test.c M tests/handover/handover_test.c 48 files changed, 88 insertions(+), 88 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve diff --git a/doc/e1-data-model.txt b/doc/e1-data-model.txt index 509004f..06f9f30 100644 --- a/doc/e1-data-model.txt +++ b/doc/e1-data-model.txt @@ -8,7 +8,7 @@ E1 link, but it could also be abis-over-IP with a mixture of TCP and RTP/UDP. To further complicate the fact, multiple BTS can share one such pysical -link. On a single E1 line, we can easily accomodate up to three BTS with +link. On a single E1 line, we can easily accommodate up to three BTS with two TRX each. Thus, it is best for OpenBSC to have some kind of abstraction layer. The BSC's diff --git a/doc/handover.txt b/doc/handover.txt index ac19e87..c5fc331 100644 --- a/doc/handover.txt +++ b/doc/handover.txt @@ -38,7 +38,7 @@ Window RXLEV averaging: 10 SACCH frames (no weighting) Window RXQUAL averaging: 1 SACCH frame (no averaging) -Level Threashold: 1 of the last 1 AV-RXLEV values < -110dBm +Level Threshold: 1 of the last 1 AV-RXLEV values < -110dBm Quality Threshold: 3 of the last 4 AV-RXQUAL values >= 5 Interference Threshold: 1 of the last AV-RXLEV > -85 dBm & 3 of the last 4 AV-RXQUAL values >= 5 diff --git a/doc/manuals/aoip-mgw-options.adoc b/doc/manuals/aoip-mgw-options.adoc index f693093..124c03f 100644 --- a/doc/manuals/aoip-mgw-options.adoc +++ b/doc/manuals/aoip-mgw-options.adoc @@ -54,7 +54,7 @@ As more modern MSCs at operators tend to favor implementing 3GPP AoIP rather than the proprietary SCCPlite based A interface, it becomes -neccessary for OsmoBSC to support this. +necessary for OsmoBSC to support this. At the same time, for compatibility reasons, the classic SCCPlite support shall be kept, if possible with reasonable effort. diff --git a/doc/manuals/chapters/counters_generated.adoc b/doc/manuals/chapters/counters_generated.adoc index 65f4ca4..f668865 100644 --- a/doc/manuals/chapters/counters_generated.adoc +++ b/doc/manuals/chapters/counters_generated.adoc @@ -22,7 +22,7 @@ | codec:fr | <> | Count the usage of FR codec by channel mode requested. | codec:hr | <> | Count the usage of HR codec by channel mode requested. | paging:attempted | <> | Paging attempts for a subscriber. -| paging:already | <> | Paging attempts ignored as subsciber was already being paged. +| paging:already | <> | Paging attempts ignored as subscriber was already being paged. | paging:responded | <> | Paging attempts with successful paging response. | paging:expired | <> | Paging Request expired because of timeout T3113. | chan_act:total | <> | Total number of Channel Activations. @@ -48,7 +48,7 @@ | codec:fr | <> | Count the usage of FR codec by channel mode requested. | codec:hr | <> | Count the usage of HR codec by channel mode requested. | paging:attempted | <> | Paging attempts for a subscriber. -| paging:already | <> | Paging attempts ignored as subsciber was already being paged. +| paging:already | <> | Paging attempts ignored as subscriber was already being paged. | paging:responded | <> | Paging attempts with successful paging response. | paging:expired | <> | Paging Request expired because of timeout T3113. | chan_act:total | <> | Total number of Channel Activations. @@ -74,7 +74,7 @@ | codec:fr | <> | Count the usage of FR codec by channel mode requested. | codec:hr | <> | Count the usage of HR codec by channel mode requested. | paging:attempted | <> | Paging attempts for a subscriber. -| paging:already | <> | Paging attempts ignored as subsciber was already being paged. +| paging:already | <> | Paging attempts ignored as subscriber was already being paged. | paging:responded | <> | Paging attempts with successful paging response. | paging:expired | <> | Paging Request expired because of timeout T3113. | chan_act:total | <> | Total number of Channel Activations. @@ -105,14 +105,14 @@ | assignment:no_channel | <> | Failure to allocate lchan for Assignment. | assignment:timeout | <> | Assignment timed out. | assignment:failed | <> | Received Assignment Failure message. -| assignment:error | <> | Assigment failed for other reason. +| assignment:error | <> | Assignment failed for other reason. | handover:attempted | <> | Intra-BSC handover attempts. | handover:completed | <> | Intra-BSC handover completed. | handover:stopped | <> | Connection ended during HO. | handover:no_channel | <> | Failure to allocate lchan for HO. | handover:timeout | <> | Handover timed out. | handover:failed | <> | Received Handover Fail messages. -| handover:error | <> | Re-assigment failed for other reason. +| handover:error | <> | Re-assignment failed for other reason. | interbsc_ho_out:attempted | <> | Attempts to handover to remote BSS. | interbsc_ho_out:completed | <> | Handover to remote BSS completed. | interbsc_ho_out:stopped | <> | Connection ended during HO. diff --git a/doc/manuals/chapters/handover.adoc b/doc/manuals/chapters/handover.adoc index bb99751..d9805f7 100644 --- a/doc/manuals/chapters/handover.adoc +++ b/doc/manuals/chapters/handover.adoc @@ -61,7 +61,7 @@ The BSC is the point of decision whether to do handover or not. This can be a hugely complex combination of heuristics, knowledge of cell load and codec -capabilites. The most important indicator for handover though is: does an MS +capabilities. The most important indicator for handover though is: does an MS report a neighbor with a better signal than the current cell? See <>. diff --git a/doc/manuals/chapters/osmux_bsc.adoc b/doc/manuals/chapters/osmux_bsc.adoc index c9f387b..0a11d17 100644 --- a/doc/manuals/chapters/osmux_bsc.adoc +++ b/doc/manuals/chapters/osmux_bsc.adoc @@ -33,7 +33,7 @@ up. If _BSSMAP Assign Request_ from MSC contains _Osmux CID_ IE, {program-name} will instruct its MGW to set up an Osmux connection on the CN-side of the MGCP endpoint, and will provide the MSC with its _recvCID_ - through the extension IE _Osmux CID_ appened to the _BSSMAP Assign Complete_ + through the extension IE _Osmux CID_ appended to the _BSSMAP Assign Complete_ message. On the other hand, if _BSSMAP Assign Request_ doesn't contain an _Osmux CID_ IE, {program-name} will instruct its MGW to set up a regular RTP connection on the CN-side of the MGCP endpoint. diff --git a/doc/manuals/message-sequences/mo_call-abis_a.msc b/doc/manuals/message-sequences/mo_call-abis_a.msc index 4597ab1..ba7f0aa 100644 --- a/doc/manuals/message-sequences/mo_call-abis_a.msc +++ b/doc/manuals/message-sequences/mo_call-abis_a.msc @@ -107,7 +107,7 @@ ...; bsc <- m_sc [label="SCCP DT1 (BSSMAP CLEAR CMD)"]; bsc -> bsc [label="GSCON_EV_A_CLEAR_CMD", textcolor="red", linecolor="red"]; - --- [label="BSC must release terrestrial resoures before reporting CLEAR COMPLETE"]; + --- [label="BSC must release terrestrial resources before reporting CLEAR COMPLETE"]; mgw <- bsc [label="MGCP DLCX rtpbridge/2 at mgw", textcolor="blue", linecolor="blue"]; mgw box mgw [label="Release MSC-facing local RTP port (3000)", textcolor="blue", linecolor="blue"]; mgw -> bsc [label="MGCP DLCX rtpbridge/2 at mgw OK", textcolor="blue", linecolor="blue"]; diff --git a/doc/manuals/mgw/classic-bsc.msc b/doc/manuals/mgw/classic-bsc.msc index 56d2889..97b6513 100644 --- a/doc/manuals/mgw/classic-bsc.msc +++ b/doc/manuals/mgw/classic-bsc.msc @@ -1,5 +1,5 @@ # MO Call on a classic E1 Abis BTS with classic E1 A BSC -# not actually supported by OsmoBSC (nor planned), for refrence only +# not actually supported by OsmoBSC (nor planned), for reference only msc { hscale=2; ms [label="MS"], bts [label="E1 BTS"], bsc[label="OsmoBSC"], trau[label="TRAU"], m_sc[label="MSC"]; diff --git a/doc/manuals/osmux-reference.adoc b/doc/manuals/osmux-reference.adoc index 929f442..e28347a 100644 --- a/doc/manuals/osmux-reference.adoc +++ b/doc/manuals/osmux-reference.adoc @@ -5,7 +5,7 @@ In case of satellite based GSM systems, the transmission cost on the back-haul is relatively expensive. The billing for such SAT uplink is usually done in a -pay-per-byte basis. Thus, reducing the amount of bytes transfered would +pay-per-byte basis. Thus, reducing the amount of bytes transferred would significantly reduce the cost of such uplinks. In such environment, even seemingly small protocol optimizations, eg. message batching and trunking, can result in significant cost reduction. @@ -93,7 +93,7 @@ why: * TCP is a streaming protocol aimed at maximizing the throughput of a stream - withing the constraints of the underlying transport layer. This feature is + within the constraints of the underlying transport layer. This feature is not really required for the low-bandwidth and low-pps GSM signalling. Moreover, TCP is stream oriented and does not conserve message boundaries. As such, the IPA header has to serve as a boundary between messages in the @@ -114,7 +114,7 @@ LAPD has a very small header (3-5 octets) compared to TCPs 20 bytes. Even if LAPD is put inside UDP, the combination of 11 to 13 octets still saves a -noticable number of bytes per packet. Moreover, LAPD has been modified for less +noticeable number of bytes per packet. Moreover, LAPD has been modified for less reliable interfaces such as the GSM Um interface (LAPDm), as well as for the use in satellite systems (LAPsat in ETSI GMR). @@ -136,7 +136,7 @@ * FT == 2: Dummy * FT == 3: Reserved for Fture Use -There can be any number of OSmux messages batched up in one underlaying packet. +There can be any number of OSmux messages batched up in one underlying packet. In this case, the multiple OSmux messages are simply concatenated, i.e. the OSmux header control octet directly follows the last octet of the payload of the previous OSmux message. @@ -224,7 +224,7 @@ clock) as specified in AMR-RTP. AMR Codec Mode Request (AMR-FT): 4 bits:: -This is a mapping from te AMR FT field (Frame type index) in RFC3267 Section +This is a mapping from the AMR FT field (Frame type index) in RFC3267 Section 4.3.2. The length of each codec frame needs to be determined from this field. It is thus guaranteed that all frames for a specific stream in an OSmux batch are of the same AMR type. @@ -356,7 +356,7 @@ === Batching -Following chart shows how batching with a factor of 3 works. To easilly +Following chart shows how batching with a factor of 3 works. To easily illustrate batching, only uplink and one concurrent call is considered. It can be seen how 3 RTP packets from MSa arrive to the BSC from the BTS. The @@ -559,7 +559,7 @@ A batching factor of 8 provides very little improvement with regards to batching 4 messages. Still, we risk to degrade user experience. Thus, we consider a -batching factor of 3 and 4 is adecuate. +batching factor of 3 and 4 is adequate. == Other proposed follow-up works diff --git a/doc/manuals/vty/bsc_vty_reference.xml b/doc/manuals/vty/bsc_vty_reference.xml index 178e5b5..8401043 100644 --- a/doc/manuals/vty/bsc_vty_reference.xml +++ b/doc/manuals/vty/bsc_vty_reference.xml @@ -1336,7 +1336,7 @@ - + diff --git a/doc/manuals/vty/libbsc_vty_additions.xml b/doc/manuals/vty/libbsc_vty_additions.xml index dbf4080..8696252 100644 --- a/doc/manuals/vty/libbsc_vty_additions.xml +++ b/doc/manuals/vty/libbsc_vty_additions.xml @@ -118,7 +118,7 @@ The periodic location updating interval determines how often the MS will periodically perform a LOCATION UPDATE procedure, - despite not having actuall changed location. The value is + despite not having actually changed location. The value is specified in minutes. diff --git a/include/mISDNif.h b/include/mISDNif.h index 8e065d2..c8588cd 100644 --- a/include/mISDNif.h +++ b/include/mISDNif.h @@ -46,7 +46,7 @@ #define MISDN_RELEASE 20 /* primitives for information exchange - * generell format + * general format * <16 bit 0 > * <8 bit command> * BIT 8 = 1 LAYER private @@ -65,7 +65,7 @@ #define MISDN_CMDMASK 0xff00 #define MISDN_LAYERMASK 0x00ff -/* generell commands */ +/* general commands */ #define OPEN_CHANNEL 0x0100 #define CLOSE_CHANNEL 0x0200 #define CONTROL_CHANNEL 0x0300 @@ -110,7 +110,7 @@ #define DL_UNITDATA_IND 0x3108 #define DL_INFORMATION_IND 0x0008 -/* intern layer 2 managment */ +/* intern layer 2 management */ #define MDL_ASSIGN_REQ 0x1804 #define MDL_ASSIGN_IND 0x1904 #define MDL_REMOVE_REQ 0x1A04 diff --git a/include/osmocom/bsc/a_reset.h b/include/osmocom/bsc/a_reset.h index a09972e..46a392f 100644 --- a/include/osmocom/bsc/a_reset.h +++ b/include/osmocom/bsc/a_reset.h @@ -25,7 +25,7 @@ /* Create and start state machine which handles the reset/reset-ack procedure */ void a_reset_alloc(struct bsc_msc_data *msc, const char *name, void *cb); -/* Confirm that we sucessfully received a reset acknowlege message */ +/* Confirm that we successfully received a reset acknowledge message */ void a_reset_ack_confirm(struct bsc_msc_data *msc); /* Report a failed connection */ diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h index 4ccfd14..f7db779 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -60,7 +60,7 @@ /* Siemens vendor-specific RSL extensions */ int rsl_siemens_mrpci(struct gsm_lchan *lchan, struct rsl_mrpci *mrpci); -/* ip.access specfic RSL extensions */ +/* ip.access specific RSL extensions */ struct msgb *rsl_make_ipacc_mdcx(const struct gsm_lchan *lchan, uint32_t dest_ip, uint16_t dest_port); int rsl_tx_ipacc_crcx(const struct gsm_lchan *lchan); int rsl_tx_ipacc_mdcx(const struct gsm_lchan *lchan); diff --git a/include/osmocom/bsc/acc_ramp.h b/include/osmocom/bsc/acc_ramp.h index efb12b0..31fc74f 100644 --- a/include/osmocom/bsc/acc_ramp.h +++ b/include/osmocom/bsc/acc_ramp.h @@ -71,7 +71,7 @@ /*! * Ramping step interval in seconds. * This value depends on the current BTS channel load average, unless - * it has been overriden by VTY configuration. + * it has been overridden by VTY configuration. */ unsigned int step_interval_sec; bool step_interval_is_fixed; diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 23aacd6..fe626b1 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -273,7 +273,7 @@ /* for advanced ping/pong */ int send_ping; - /* SCCP connection realted */ + /* SCCP connection related */ struct bsc_msc_data *msc; /* Sigtran connection ID */ @@ -1010,7 +1010,7 @@ /* Geographical location of the BTS */ struct llist_head loc_list; - /* number of ths BTS in network */ + /* number of this BTS in network */ uint8_t nr; /* human readable name / description */ char *description; @@ -1084,7 +1084,7 @@ * receival of empty SI disabling unsupported SI. see OS#3707. */ bool si_unused_send_empty; - /* ip.accesss Unit ID's have Site/BTS/TRX layout */ + /* ip.access Unit ID's have Site/BTS/TRX layout */ union { struct { uint16_t site_id; @@ -1251,7 +1251,7 @@ struct llist_head local_neighbors; /* BTS-specific overrides for timer values from struct gsm_network. */ - uint8_t T3122; /* ASSIGMENT REJECT wait indication */ + uint8_t T3122; /* ASSIGNMENT REJECT wait indication */ bool T3113_dynamic; /* Calculate T3113 timeout dynamically based on BTS channel config and load */ /* Periodic channel load measurements are used to maintain T3122. */ @@ -1411,7 +1411,7 @@ [BTS_CTR_CODEC_V1_HR] = {"codec:hr", "Count the usage of HR codec by channel mode requested."}, [BTS_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a subscriber."}, - [BTS_CTR_PAGING_ALREADY] = {"paging:already", "Paging attempts ignored as subsciber was already being paged."}, + [BTS_CTR_PAGING_ALREADY] = {"paging:already", "Paging attempts ignored as subscriber was already being paged."}, [BTS_CTR_PAGING_RESPONDED] = {"paging:responded", "Paging attempts with successful paging response."}, [BTS_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113."}, [BTS_CTR_CHAN_ACT_TOTAL] = {"chan_act:total", "Total number of Channel Activations."}, @@ -1476,7 +1476,7 @@ [BSC_CTR_ASSIGNMENT_NO_CHANNEL] = {"assignment:no_channel", "Failure to allocate lchan for Assignment."}, [BSC_CTR_ASSIGNMENT_TIMEOUT] = {"assignment:timeout", "Assignment timed out."}, [BSC_CTR_ASSIGNMENT_FAILED] = {"assignment:failed", "Received Assignment Failure message."}, - [BSC_CTR_ASSIGNMENT_ERROR] = {"assignment:error", "Assigment failed for other reason."}, + [BSC_CTR_ASSIGNMENT_ERROR] = {"assignment:error", "Assignment failed for other reason."}, [BSC_CTR_HANDOVER_ATTEMPTED] = {"handover:attempted", "Intra-BSC handover attempts."}, [BSC_CTR_HANDOVER_COMPLETED] = {"handover:completed", "Intra-BSC handover completed."}, @@ -1484,7 +1484,7 @@ [BSC_CTR_HANDOVER_NO_CHANNEL] = {"handover:no_channel", "Failure to allocate lchan for HO."}, [BSC_CTR_HANDOVER_TIMEOUT] = {"handover:timeout", "Handover timed out."}, [BSC_CTR_HANDOVER_FAILED] = {"handover:failed", "Received Handover Fail messages."}, - [BSC_CTR_HANDOVER_ERROR] = {"handover:error", "Re-assigment failed for other reason."}, + [BSC_CTR_HANDOVER_ERROR] = {"handover:error", "Re-assignment failed for other reason."}, [BSC_CTR_INTER_BSC_HO_OUT_ATTEMPTED] = {"interbsc_ho_out:attempted", "Attempts to handover to remote BSS."}, @@ -1630,7 +1630,7 @@ extern void *tall_bsc_ctx; -/* this actaully refers to the IPA transport, not the BTS model */ +/* this actually refers to the IPA transport, not the BTS model */ static inline int is_ipaccess_bts(struct gsm_bts *bts) { switch (bts->type) { diff --git a/include/osmocom/bsc/meas_feed.h b/include/osmocom/bsc/meas_feed.h index 1849a89..353278e 100644 --- a/include/osmocom/bsc/meas_feed.h +++ b/include/osmocom/bsc/meas_feed.h @@ -20,7 +20,7 @@ uint8_t lchan_type; /* The physical channel type, enum gsm_phys_chan_config */ uint8_t pchan_type; - /* number of ths BTS in network */ + /* number of this BTS in network */ uint8_t bts_nr; /* number of this TRX in the BTS */ uint8_t trx_nr; diff --git a/include/osmocom/bsc/osmo_bsc_reset.h b/include/osmocom/bsc/osmo_bsc_reset.h index 578f763..fb66df0 100644 --- a/include/osmocom/bsc/osmo_bsc_reset.h +++ b/include/osmocom/bsc/osmo_bsc_reset.h @@ -21,7 +21,7 @@ /* Create and start state machine which handles the reset/reset-ack procedure */ void start_reset_fsm(struct bsc_msc_data *msc); -/* Confirm that we sucessfully received a reset acknowlege message */ +/* Confirm that we successfully received a reset acknowledge message */ void reset_ack_confirm(struct bsc_msc_data *msc); /* Report a failed connection */ diff --git a/include/osmocom/bsc/osmo_bsc_sigtran.h b/include/osmocom/bsc/osmo_bsc_sigtran.h index b934d51..dc86fad 100644 --- a/include/osmocom/bsc/osmo_bsc_sigtran.h +++ b/include/osmocom/bsc/osmo_bsc_sigtran.h @@ -33,7 +33,7 @@ /* Send data to MSC */ int osmo_bsc_sigtran_send(struct gsm_subscriber_connection *conn, struct msgb *msg); -/* Initalize osmo sigtran backhaul */ +/* Initialize osmo sigtran backhaul */ int osmo_bsc_sigtran_init(struct llist_head *mscs); /* Close all open sigtran connections and channels */ diff --git a/include/osmocom/bsc/penalty_timers.h b/include/osmocom/bsc/penalty_timers.h index 3aae8a0..f5d1778 100644 --- a/include/osmocom/bsc/penalty_timers.h +++ b/include/osmocom/bsc/penalty_timers.h @@ -10,7 +10,7 @@ * returns an empty struct penalty_timers. */ struct penalty_timers *penalty_timers_init(void *ctx); -/* Add a penalty timer for an arbitary object. +/* Add a penalty timer for an arbitrary object. * Note: the ownership of for_object remains with the caller; it is handled as a mere void* value, so * invalid pointers can be handled without problems, while common sense dictates that invalidated * pointers (freed objects) should probably be removed from this list. More importantly, the pointer must diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index 54e4efd..f873809 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -192,7 +192,7 @@ static int ipacc_msg_ack(uint8_t mt, struct gsm_bts_trx *trx) { if (sw_load_state == 1) { - fprintf(stderr, "The new software is activaed.\n"); + fprintf(stderr, "The new software is activated.\n"); check_restart_or_exit(trx); } else if (oml_state == 1) { fprintf(stderr, "Set the NV Attributes.\n"); @@ -238,7 +238,7 @@ /* Create whitelist from results */ physconf_len = build_physconf(physconf_buf, &trx->ipaccess.rxlev_stat); - /* Start next test abbout BCCH channel usage */ + /* Start next test about BCCH channel usage */ ipac_nwl_test_start(trx, NM_IPACC_TESTNO_BCCH_CHAN_USAGE, physconf_buf, physconf_len); break; diff --git a/src/ipaccess/ipaccess-proxy.c b/src/ipaccess/ipaccess-proxy.c index 26c5bcd..a4ee10e 100644 --- a/src/ipaccess/ipaccess-proxy.c +++ b/src/ipaccess/ipaccess-proxy.c @@ -581,7 +581,7 @@ msgb_put(msg, ret); - /* then read te length as specified in header */ + /* then read the length as specified in header */ msg->l2h = msg->data + sizeof(*hh); len = ntohs(hh->len); ret = recv(bfd->fd, msg->l2h, len, 0); diff --git a/src/osmo-bsc/a_reset.c b/src/osmo-bsc/a_reset.c index b75272f..9e046be 100644 --- a/src/osmo-bsc/a_reset.c +++ b/src/osmo-bsc/a_reset.c @@ -163,11 +163,11 @@ OSMO_ASSERT(reset_fsm); msc->a.reset_fsm = reset_fsm; - /* Immediatelly (1ms) kick off reset sending mechanism */ + /* Immediately (1ms) kick off reset sending mechanism */ osmo_fsm_inst_state_chg_ms(reset_fsm, ST_DISC, 1, RESET_RESEND_TIMER_NO); } -/* Confirm that we sucessfully received a reset acknowlege message */ +/* Confirm that we successfully received a reset acknowledge message */ void a_reset_ack_confirm(struct bsc_msc_data *msc) { if (!msc) diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 48e9183..523cc38 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -2105,7 +2105,7 @@ { struct abis_om_hdr *oh; - DEBUGP(DNM, "PEFORM TEST %s\n", abis_nm_test_name(test_nr)); + DEBUGP(DNM, "PERFORM TEST %s\n", abis_nm_test_name(test_nr)); if (!msg) msg = nm_msgb_alloc(); @@ -2851,7 +2851,7 @@ LOG_TRX(trx, DRSL, LOGL_NOTICE, "RSL connection request timed out\n"); - /* Fake an RSL CONECT NACK message from the BTS. */ + /* Fake an RSL CONNECT NACK message from the BTS. */ signal.trx = trx; signal.msg_type = NM_MT_IPACC_RSL_CONNECT_NACK; osmo_signal_dispatch(SS_NM, S_NM_IPACC_NACK, &signal); diff --git a/src/osmo-bsc/abis_nm_vty.c b/src/osmo-bsc/abis_nm_vty.c index 3019eb8..b1c6d56 100644 --- a/src/osmo-bsc/abis_nm_vty.c +++ b/src/osmo-bsc/abis_nm_vty.c @@ -1,4 +1,4 @@ -/* VTY interface for A-bis OML (Netowrk Management) */ +/* VTY interface for A-bis OML (Network Management) */ /* (C) 2009-2018 by Harald Welte * diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c index fda273d..e6b06c3 100644 --- a/src/osmo-bsc/abis_om2000.c +++ b/src/osmo-bsc/abis_om2000.c @@ -1578,7 +1578,7 @@ abis_om2k_tx_op_info(omfp->trx->bts, &omfp->mo->addr, 1); return; case OM2K_MO_CLS_DP: - /* Transition directoy to WAIT_ENABLE_ACCEPT */ + /* Transition directory to WAIT_ENABLE_ACCEPT */ osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_ENABLE_ACCEPT, OM2K_TIMEOUT, 0); abis_om2k_tx_enable_req(omfp->trx->bts, &omfp->mo->addr); diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index d4917f2..8df0e81 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1391,7 +1391,7 @@ /* check availability / allocate channel * * - First try to allocate SDCCH. - * - If SDCCH is not available, try a TCH/H (less bandwith). + * - If SDCCH is not available, try a TCH/H (less bandwidth). * - If there is still no channel available, try a TCH/F. * */ @@ -1438,7 +1438,7 @@ uint8_t buf[GSM_MACBLOCK_LEN]; struct gsm48_imm_ass *ia = (struct gsm48_imm_ass *) buf; - /* create IMMEDIATE ASSIGN 04.08 messge */ + /* create IMMEDIATE ASSIGN 04.08 message */ memset(ia, 0, sizeof(*ia)); /* we set ia->l2_plen once we know the length of the MA below */ ia->proto_discr = GSM48_PDISC_RR; diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index aefa4af..16e04cd 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -434,7 +434,7 @@ conn->assignment.req = *req; req = &conn->assignment.req; - /* Check if we need a voice stream. If yes, set the approriate struct + /* Check if we need a voice stream. If yes, set the appropriate struct * members in conn */ if (check_requires_voice_stream(conn) < 0) return; diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 60f035d..a96adb3 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -543,7 +543,7 @@ const struct mgcp_conn_peer *prev_crcx_info = osmo_mgcpc_ep_ci_get_rtp_info(ci); if (!conn->user_plane.mgw_endpoint) { - LOGPFSML(conn->fi, LOGL_ERROR, "Internal error: conn has a CI but no endoint\n"); + LOGPFSML(conn->fi, LOGL_ERROR, "Internal error: conn has a CI but no endpoint\n"); return false; } diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 0fbff86..1195d65 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -2013,7 +2013,7 @@ bts = bsc_bts_alloc_register(gsmnet, GSM_BTS_TYPE_UNKNOWN, HARDCODED_BSIC); /* - * Initalize bts->acc_ramp here. Else we could segfault while + * Initialize bts->acc_ramp here. Else we could segfault while * processing a configuration file with ACC ramping settings. */ acc_ramp_init(&bts->acc_ramp, bts); @@ -3816,7 +3816,7 @@ } } -/* Give the current amr configuration a final consistency chack by feeding the +/* Give the current amr configuration a final consistency check by feeding the * the configuration into the gsm48 multirate IE generator function */ static int check_amr_config(struct vty *vty) { @@ -4610,7 +4610,7 @@ "BTS related commands\n" BTS_NR_STR "SMS Cell Broadcast\n" "Normal (one-shot) SMSCB Message; sent once over Abis+Um\n" - "Schedule (one-shot) SMSCB Messag; sent once over Abis+Um\n" + "Schedule (one-shot) SMSCB Message; sent once over Abis+Um\n" "Default (repeating) SMSCB Message; sent once over Abis, unlimited ovrer Um\n" "Last Valid Block\n" "Hex Encoded SMSCB message (up to 88 octets)\n") diff --git a/src/osmo-bsc/bts_siemens_bs11.c b/src/osmo-bsc/bts_siemens_bs11.c index b1688f3..d0fe38b 100644 --- a/src/osmo-bsc/bts_siemens_bs11.c +++ b/src/osmo-bsc/bts_siemens_bs11.c @@ -330,7 +330,7 @@ /* Object Class: Transceiver BTS relat. Number: 0 - Tranceiver number: 0 + Transceiver number: 0 Instance 3: FF SET TRX ATTRIBUTES aRFCNList (HEX): 0001 diff --git a/src/osmo-bsc/codec_pref.c b/src/osmo-bsc/codec_pref.c index b27defc..be442b5 100644 --- a/src/osmo-bsc/codec_pref.c +++ b/src/osmo-bsc/codec_pref.c @@ -189,7 +189,7 @@ bool rate_match = false; /* Check if the BTS provides a physical channel that matches the - * bandwith of the desired codec. */ + * bandwidth of the desired codec. */ rc = full_rate_from_perm_spch(&full_rate, perm_spch); if (rc < 0) return false; @@ -286,13 +286,13 @@ * However, only AoIP based networks will include a speech codec list * into the ASSIGNMENT COMMAND. For non AoIP based networks, no speech * codec (sc_match) will be available, so we will fully rely on the - * local configuration for thoses cases. */ + * local configuration for those cases. */ if (sc_match) ch_mode_rate->s15_s0 = sc_match->cfg & amr_s15_s0_supported; else ch_mode_rate->s15_s0 = amr_s15_s0_supported; - /* Prefer "Config-NB-Code = 1" (S1) over all other AMR rates setttings. + /* Prefer "Config-NB-Code = 1" (S1) over all other AMR rates settings. * When S1 is set, the active set will automatically include 12.2k, 7.4k, * 5.9k, 4.75k, in case of HR 12,2k is left out. */ if (ch_mode_rate->s15_s0 & GSM0808_SC_CFG_AMR_4_75_5_90_7_40_12_20) { diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c index 1fbbb57..586eeab 100644 --- a/src/osmo-bsc/gsm_04_08_rr.c +++ b/src/osmo-bsc/gsm_04_08_rr.c @@ -405,12 +405,12 @@ for (i = 0; i < num_modes; i++) { if (i > 0 && modes[i - 1].mode > modes[i].mode) { LOGP(DRR, LOGL_ERROR, - "BUG: Multirate codec with inconsistant config (mode order).\n"); + "BUG: Multirate codec with inconsistent config (mode order).\n"); return -EINVAL; } if (i > 0 && modes[i - 1].mode == modes[i].mode) { LOGP(DRR, LOGL_ERROR, - "BUG: Multirate codec with inconsistant config (duplicate modes).\n"); + "BUG: Multirate codec with inconsistent config (duplicate modes).\n"); return -EINVAL; } } @@ -460,7 +460,7 @@ } if (!mode_valid) { LOGP(DRR, LOGL_ERROR, - "BUG: Multirate codec with inconsistant config (no mode defined).\n"); + "BUG: Multirate codec with inconsistent config (no mode defined).\n"); return -EINVAL; } } diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index e7fe065..1c2c4d8 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -838,7 +838,7 @@ bts->chan_load_avg = 0; /* timer overrides */ - bts->T3122 = 0; /* not overriden by default */ + bts->T3122 = 0; /* not overridden by default */ bts->T3113_dynamic = true; /* dynamic by default */ bts->dtxu = GSM48_DTX_SHALL_NOT_BE_USED; diff --git a/src/osmo-bsc/handover_decision.c b/src/osmo-bsc/handover_decision.c index 0bfbce2..5338400 100644 --- a/src/osmo-bsc/handover_decision.c +++ b/src/osmo-bsc/handover_decision.c @@ -180,7 +180,7 @@ if (nmp->arfcn == 0) continue; - /* caculate average rxlev for this cell over the window */ + /* calculate average rxlev for this cell over the window */ avg = neigh_meas_avg(nmp, ho_get_hodec1_rxlev_neigh_avg_win(bts->ho)); /* check if hysteresis is fulfilled */ diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c index 0e24c0d..ab507e8 100644 --- a/src/osmo-bsc/handover_decision_2.c +++ b/src/osmo-bsc/handover_decision_2.c @@ -982,7 +982,7 @@ OSMO_ASSERT(candidates); - /* caculate average rxlev for this cell over the window */ + /* calculate average rxlev for this cell over the window */ av_rxlev = get_meas_rep_avg(lchan, ho_get_hodec2_full_tdma(bts->ho) ? MEAS_REP_DL_RXLEV_FULL : MEAS_REP_DL_RXLEV_SUB, @@ -990,7 +990,7 @@ if (_av_rxlev) *_av_rxlev = av_rxlev; - /* in case there is no measurment report (yet) */ + /* in case there is no measurement report (yet) */ if (av_rxlev < 0) { LOGPHOLCHAN(lchan, LOGL_DEBUG, "Not collecting candidates, not enough measurements" " (got %d, want %u)\n", @@ -1023,7 +1023,7 @@ * Do not perform this process, if handover and assignment are disabled for * the current cell. * Do not perform handover, if the minimum acceptable RX level - * is not reched for this cell. + * is not reached for this cell. * * If one or more 'better cells' are available, check the current and neighbor * cell measurements in descending order of their RX levels (down-link): @@ -1263,7 +1263,7 @@ return; } - /* get average levels. if not enought measurements yet, value is < 0 */ + /* get average levels. if not enough measurements yet, value is < 0 */ av_rxlev = get_meas_rep_avg(lchan, ho_get_hodec2_full_tdma(bts->ho) ? MEAS_REP_DL_RXLEV_FULL : MEAS_REP_DL_RXLEV_SUB, @@ -1366,7 +1366,7 @@ * Do not perform this process, if handover and assignment are disabled for * the current cell. * Do not perform handover, if the minimum acceptable RX level - * is not reched for this cell. + * is not reached for this cell. * Only check candidates that will solve/reduce congestion. * * If a cell is congested, all slots are checked for all their RX levels diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c index d159347..e36aaae 100644 --- a/src/osmo-bsc/handover_fsm.c +++ b/src/osmo-bsc/handover_fsm.c @@ -848,7 +848,7 @@ if (result == HO_RESULT_OK) conn->ho.created_ci_for_msc = NULL; - /* If the performed handover was an INTRA BSC HANDOVER, inform the MSC that a handover has happend */ + /* If the performed handover was an INTRA BSC HANDOVER, inform the MSC that a handover has happened */ if (result == HO_RESULT_OK && ((ho->scope & HO_INTRA_CELL) || (ho->scope & HO_INTRA_BSC))) send_handover_performed(conn); diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index a5efa3d..da09aec 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -446,7 +446,7 @@ /* At this point, we are taking over an old lchan's MGW endpoint (if any). */ if (!lchan->mgw_endpoint_ci_bts && old_lchan) { - /* The old lchan shall forget the enpoint now. We might put it back upon ROLLBACK */ + /* The old lchan shall forget the endpoint now. We might put it back upon ROLLBACK */ lchan->mgw_endpoint_ci_bts = old_lchan->mgw_endpoint_ci_bts; old_lchan->mgw_endpoint_ci_bts = NULL; } diff --git a/src/osmo-bsc/neighbor_ident_vty.c b/src/osmo-bsc/neighbor_ident_vty.c index f158e7f..54d6944 100644 --- a/src/osmo-bsc/neighbor_ident_vty.c +++ b/src/osmo-bsc/neighbor_ident_vty.c @@ -425,7 +425,7 @@ bts->nr, neigh_bts->nr, VTY_NEWLINE); removed += rc; } else { - vty_out(vty, "%% Error while removing local neigbor bts %u to bts %u, aborted%s", + vty_out(vty, "%% Error while removing local neighbor bts %u to bts %u, aborted%s", bts->nr, neigh_bts->nr, VTY_NEWLINE); return CMD_WARNING; } diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index dcd06f3..74faae1 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -641,13 +641,13 @@ return 0; } -/* Select a prefered and an alternative codec rate depending on the available +/* Select a preferred and an alternative codec rate depending on the available * capabilities. This decision does not include the actual channel load yet, - * this is also the reason why the result is a prefered and an alternate + * this is also the reason why the result is a preferred and an alternate * setting. The final decision is made in assignment_fsm.c when the actual * lchan is requested. The preferred lchan will be requested first. If we * find an alternate setting here, this one will be tried secondly if our - * primary coice fails. */ + * primary choice fails. */ static int select_codecs(struct assignment_request *req, struct gsm0808_channel_type *ct, struct gsm_subscriber_connection *conn) { diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c index f0c62a1..4ab0441 100644 --- a/src/osmo-bsc/osmo_bsc_lcls.c +++ b/src/osmo-bsc/osmo_bsc_lcls.c @@ -743,7 +743,7 @@ struct gsm_subscriber_connection *conn = fi->priv; if (conn->lcls.other) { - /* inform the "other" side that we're dead, so it can disabe LS and send NOTIFY */ + /* inform the "other" side that we're dead, so it can disable LS and send NOTIFY */ if (conn->lcls.other->fi) osmo_fsm_inst_dispatch(conn->lcls.other->lcls.fi, LCLS_EV_OTHER_DEAD, conn); conn->lcls.other = NULL; diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 41e810b..0fe35b3 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -844,7 +844,7 @@ logging_vty_add_deprecated_subsys(tall_bsc_ctx, "cc"); logging_vty_add_deprecated_subsys(tall_bsc_ctx, "mgcp"); - /* Initalize SS7 */ + /* Initialize SS7 */ osmo_ss7_init(); osmo_ss7_vty_init_asp(tall_bsc_ctx); osmo_sccp_vty_init(); diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index 543e6de..50b03ce 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -475,7 +475,7 @@ static int asp_rx_unknown(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg); -/* Initalize osmo sigtran backhaul */ +/* Initialize osmo sigtran backhaul */ int osmo_bsc_sigtran_init(struct llist_head *mscs) { bool free_attempt_used = false; @@ -567,7 +567,7 @@ /* If we have detected that the SS7 configuration of the MSC we have just initialized * was incomplete or completely missing, we can not tolerate another incomplete - * configuration. The reson for this is that we do only specify exactly one default + * configuration. The reason for this is that we do only specify exactly one default * pointcode pair. We also specify localhost as default IP-Address. If we have wanted * to support multiple MSCs with automatic configuration we would be forced to invent * a complex ruleset how to allocate the pointcodes and respective IP-Addresses. diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index ca52ee7..d32cded 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -306,7 +306,7 @@ /* TODO: take into account load of paging group for req->bsub */ /* MFRMS defines repeat interval of paging messages for MSs that belong - * to same paging group accross multiple 51 frame multiframes. + * to same paging group across multiple 51 frame multiframes. * MAXTRANS defines maximum number of RACH retransmissions. */ to_us = GSM51_MFRAME_DURATION_us * (bts->si_common.chan_desc.bs_pa_mfrms + 2) * diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 4425117..b041402 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -282,7 +282,7 @@ return pcu_sock_send(bts, msg); } -/* we need to decode the raw RR paging messsage (see PCU code +/* we need to decode the raw RR paging message (see PCU code * Encoding::write_paging_request) and extract the mobile identity * (P-TMSI) from it */ static int pcu_rx_rr_paging(struct gsm_bts *bts, uint8_t paging_group, @@ -607,7 +607,7 @@ return rc; } -/* accept connection comming from PCU */ +/* accept connection coming from PCU */ static int pcu_sock_accept(struct osmo_fd *bfd, unsigned int flags) { struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 4709f7f..6e58419 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -248,7 +248,7 @@ return r; } -/* Scrambling Code as defined in 3GPP TS 25.213 is 9 bit long so number below is unreacheable upper bound */ +/* Scrambling Code as defined in 3GPP TS 25.213 is 9 bit long so number below is unreachable upper bound */ #define SC_BOUND 600 /* Find position for a given UARFCN (take SC into consideration if it's available) in a sorted list @@ -518,7 +518,7 @@ for (i = 0; i < bv->data_len*8; i++) { /* in case of SI2 or SI5 allow all neighbours in same band - * in case of SI*bis, allow neighbours in same band ouside pgsm + * in case of SI*bis, allow neighbours in same band outside pgsm * in case of SI*ter, allow neighbours in different bands */ if (!bitvec_get_bit_pos(bv, i)) diff --git a/tests/codec_pref/codec_pref_test.c b/tests/codec_pref/codec_pref_test.c index ce82f3d..8bc31cd 100644 --- a/tests/codec_pref/codec_pref_test.c +++ b/tests/codec_pref/codec_pref_test.c @@ -325,7 +325,7 @@ cfg->m10_2 = 0; cfg->m12_2 = 0; - /* Initalize TRX with a TCH/F and a TCH/H channel */ + /* Initialize TRX with a TCH/F and a TCH/H channel */ memset(&trx, 0, sizeof(trx)); INIT_LLIST_HEAD(&bts->trx_list); llist_add(&trx.list, &bts->trx_list); diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index bedf6f9..0d98717 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -696,7 +696,7 @@ "Hysteresis\n\n" "If neighbor cell is better, handover is only performed if the\n" - "ammount of improvement is greater or equal hyteresis\n", + "amount of improvement is greater or equal hyteresis\n", "create-bts", "2", "create-ms", "0", "TCH/F", "AMR", @@ -817,7 +817,7 @@ "reports are received, before RXQUAL is checked.\n", /* (See also test 28, which tests for RXQUAL triggering HO to congested cell.) */ /* TODO: bad RXQUAL may want to prefer assignment within the same cell to avoid interference. - * See Performence Enhancements in a Frequency Hopping GSM Network (Nielsen Wigard 2002), Chapter + * See Performance Enhancements in a Frequency Hopping GSM Network (Nielsen Wigard 2002), Chapter * 2.1.1, "Interference" in the list of triggers on p.157. */ "create-bts", "2", @@ -1142,7 +1142,7 @@ "2", "No (or not enough) measurements for handover\n\n" "Do not solve congestion in cell, because there is no measurement.\n" - "As soon as enough measurments available (1 in our case), perform\n" + "As soon as enough measurements available (1 in our case), perform\n" "handover. Afterwards the old cell becomes congested and the new\n" "cell is not. Do not perform handover until new measurements are\n" "received.\n", -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c Gerrit-Change-Number: 16066 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 10:30:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 10:30:31 +0000 Subject: Change in ...osmo-python-tests[master]: osmo_interact_vty.py: fix py3 encoding bug In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/python/osmo-python-tests/+/15917 ) Change subject: osmo_interact_vty.py: fix py3 encoding bug ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/python/osmo-python-tests/+/15917 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Change-Id: I1b4a629f12863c498a8681b555f57b4e255cebfb Gerrit-Change-Number: 15917 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 10:30:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 10:30:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 10:30:32 +0000 Subject: Change in ...osmo-python-tests[master]: osmo_interact_vty.py: fix py3 encoding bug In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/python/osmo-python-tests/+/15917 ) Change subject: osmo_interact_vty.py: fix py3 encoding bug ...................................................................... osmo_interact_vty.py: fix py3 encoding bug That code in common.py is hit when invoking via osmo_interact_vty.py. It has a unicode string already, its attempt to decode hits a python exception (no 'decode' method). Must be a long standing bug that no-one saw because we're only ever using the osmo_verify_transcript_vty.py variant. Change-Id: I1b4a629f12863c498a8681b555f57b4e255cebfb --- M osmopy/osmo_interact/common.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/osmopy/osmo_interact/common.py b/osmopy/osmo_interact/common.py index 39163a2..cc7e190 100644 --- a/osmopy/osmo_interact/common.py +++ b/osmopy/osmo_interact/common.py @@ -429,7 +429,7 @@ for f_path in (cmd_files or []): with open(f_path, 'r') as f: - interact.feed_commands(output, f.read().decode('utf-8').splitlines()) + interact.feed_commands(output, f.read().splitlines()) if not (cmd_str or cmd_files): while True: -- To view, visit https://gerrit.osmocom.org/c/python/osmo-python-tests/+/15917 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Change-Id: I1b4a629f12863c498a8681b555f57b4e255cebfb Gerrit-Change-Number: 15917 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 10:31:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 10:31:24 +0000 Subject: Change in osmo-mgw[master]: fix use-after-free: require new fsm deferred dealloc, check for term In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/15839 ) Change subject: fix use-after-free: require new fsm deferred dealloc, check for term ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 Gerrit-Change-Number: 15839 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 10:31:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 10:31:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 10:31:39 +0000 Subject: Change in osmo-bsc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15841 ) Change subject: fsm: use deferred deallocation ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib7fce7b7d54dfb87af97544796680919e5929a50 Gerrit-Change-Number: 15841 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 10:31:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 10:33:12 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 10:33:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: fix Iu mo call In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 ) Change subject: msc: fix Iu mo call ...................................................................... Patch Set 2: see my earlier review comment regarding criticality. I cannot see any related change in v2. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec Gerrit-Change-Number: 15939 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 10:33:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 10:34:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 10:34:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: fix Iu mo call In-Reply-To: References: Message-ID: laforge has uploaded a new patch set (#3) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 ) Change subject: msc: fix Iu mo call ...................................................................... msc: fix Iu mo call Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec --- M library/ranap/RANAP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn 2 files changed, 48 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/39/15939/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec Gerrit-Change-Number: 15939 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 12:17:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 12:17:27 +0000 Subject: Change in osmo-mgw[master]: fix use-after-free: require new fsm deferred dealloc, check for term In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/15839 ) Change subject: fix use-after-free: require new fsm deferred dealloc, check for term ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 Gerrit-Change-Number: 15839 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 12:17:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 12:17:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 12:17:59 +0000 Subject: Change in osmo-bsc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15841 ) Change subject: fsm: use deferred deallocation ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib7fce7b7d54dfb87af97544796680919e5929a50 Gerrit-Change-Number: 15841 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 12:17:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 12:21:54 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 12:21:54 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: fix Iu mo call In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 ) Change subject: msc: fix Iu mo call ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec Gerrit-Change-Number: 15939 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 12:21:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 14:22:53 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 14 Nov 2019 14:22:53 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: general handling of NOPE / IDLE indications In-Reply-To: References: Message-ID: dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15989 ) Change subject: osmo-bts-trx: general handling of NOPE / IDLE indications ...................................................................... Patch Set 1: Verified+1 Code-Review+1 I have verified this, when I understand the patch correctly this should not change much, it just prepares for the usage of handlers in case a NOPE indication is received for a specific channel. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Gerrit-Change-Number: 15989 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 14:22:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 14:41:00 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 14 Nov 2019 14:41:00 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: avoid division by zero when calculating BER References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16067 ) Change subject: scheduler_trx.c: avoid division by zero when calculating BER ...................................................................... scheduler_trx.c: avoid division by zero when calculating BER There is theoretical risk that when calculating the BER that a division by zero occurrs. Lets add a check to avoid n_errors / n_bits_total when n_bits_total is zero. Related: CID#205696 Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/67/16067/1 diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 9945b2c..0f1b233 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -1149,6 +1149,7 @@ struct gsm_lchan *lchan = get_lchan_by_chan_nr(l1t->trx, trx_chan_desc[chan].chan_nr | bi->tn); unsigned int fn_begin; + float ber; /* handle rach, if handover rach detection is turned on */ if (chan_state->ho_rach_detect == 1) @@ -1212,10 +1213,12 @@ (((bi->fn + 26 - 7) % 26) >> 2) & 1, chan_state->codec, chan_state->codecs, &chan_state->ul_ft, &chan_state->ul_cmr, &n_errors, &n_bits_total); + if (n_bits_total == 0) + ber = 1; + else + ber = (float)n_errors / (float)n_bits_total; if (rc) - trx_loop_amr_input(l1t, - trx_chan_desc[chan].chan_nr | bi->tn, chan_state, - (float)n_errors/(float)n_bits_total); + trx_loop_amr_input(l1t, trx_chan_desc[chan].chan_nr | bi->tn, chan_state, ber); amr = 2; /* we store tch_data + 2 header bytes */ /* only good speech frames get rtp header */ if (rc != GSM_MACBLOCK_LEN && rc >= 4) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Gerrit-Change-Number: 16067 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:50:06 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 16:50:06 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: avoid division by zero when calculating BER In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16067 ) Change subject: scheduler_trx.c: avoid division by zero when calculating BER ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16067/1/src/osmo-bts-trx/scheduler_trx.c File src/osmo-bts-trx/scheduler_trx.c: https://gerrit.osmocom.org/c/osmo-bts/+/16067/1/src/osmo-bts-trx/scheduler_trx.c at 1217 PS1, Line 1217: ber = 1; If no bits were receivied, is that a expected scenario? or means nothing was received? In that case I'd expect perhaps a ber of 0? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Gerrit-Change-Number: 16067 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 16:50:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:51:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 16:51:55 +0000 Subject: Change in osmo-bts[master]: Change gsm_bts_trx field to bool and rename it In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/16059 to look at the new patch set (#2). Change subject: Change gsm_bts_trx field to bool and rename it ...................................................................... Change gsm_bts_trx field to bool and rename it Thies field is used to store and retrieve whether MS power needs to be calculated and updated by osmo-bts software or autonomously by lower layers. Previous name was not clear and may have been understood as indicating whether MS Power Control loop is done or not in general, and the responsible for that is located under lchan's ms_power_ctrl.fixed. Related: OS#1851 Change-Id: Ic690ab69866a7377f1597e24aa7b0214831c1cbe --- M include/osmo-bts/bts.h M include/osmo-bts/gsm_data_shared.h M src/common/bts.c M src/common/vty.c M tests/power/power_test.c 5 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/59/16059/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic690ab69866a7377f1597e24aa7b0214831c1cbe Gerrit-Change-Number: 16059 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:51:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 16:51:55 +0000 Subject: Change in osmo-bts[master]: Move and rename gsm_lchan.ms_power field In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/16062 to look at the new patch set (#2). Change subject: Move and rename gsm_lchan.ms_power field ...................................................................... Move and rename gsm_lchan.ms_power field Make it clear that it contains the maximum MS power level (TS 05.05) and not the one to be used. The one aimed at is in ms_power_ctrl.current. Since it's used in related code, move it inside the ms_power_ctrl struct too. Related: OS#1851 Change-Id: Ib264ec7dac87355cef6415461ed74bd8e9c8ca52 --- M include/osmo-bts/gsm_data_shared.h M src/common/power_control.c M src/common/rsl.c M src/common/vty.c M src/osmo-bts-trx/loops.c M src/osmo-bts-virtual/l1_if.c 6 files changed, 20 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/62/16062/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16062 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib264ec7dac87355cef6415461ed74bd8e9c8ca52 Gerrit-Change-Number: 16062 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:51:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 16:51:59 +0000 Subject: Change in osmo-bts[master]: cosmetic: Fix trailing whitespace References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16068 ) Change subject: cosmetic: Fix trailing whitespace ...................................................................... cosmetic: Fix trailing whitespace Change-Id: I7b9a091226e3c7dd60b3921ab0d53688f42d1a4d --- M src/common/gsm_data_shared.c M src/osmo-bts-litecell15/main.c M src/osmo-bts-oc2g/main.c 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/68/16068/1 diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c index f0f5ae2..80acabc 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -694,7 +694,7 @@ *rc = -EINVAL; if (cbits == 0x01) { - lch_idx = 0; /* TCH/F */ + lch_idx = 0; /* TCH/F */ if (ts->pchan != GSM_PCHAN_TCH_F && ts->pchan != GSM_PCHAN_PDCH && ts->pchan != GSM_PCHAN_TCH_F_PDCH && diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c index c47d76d..b0d725b 100644 --- a/src/osmo-bts-litecell15/main.c +++ b/src/osmo-bts-litecell15/main.c @@ -2,7 +2,7 @@ /* Copyright (C) 2015 by Yves Godin * Copyright (C) 2016 by Harald Welte - * + * * Based on sysmoBTS: * (C) 2011-2013 by Harald Welte * diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c index abecba1..cbf5c42 100644 --- a/src/osmo-bts-oc2g/main.c +++ b/src/osmo-bts-oc2g/main.c @@ -2,7 +2,7 @@ /* Copyright (C) 2015 by Yves Godin * Copyright (C) 2016 by Harald Welte - * + * * Based on sysmoBTS: * (C) 2011-2013 by Harald Welte * -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16068 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7b9a091226e3c7dd60b3921ab0d53688f42d1a4d Gerrit-Change-Number: 16068 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:51:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 16:51:59 +0000 Subject: Change in osmo-bts[master]: bts-trx: loops.c: Avoid always clamping MS power to MS power class 1 References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16069 ) Change subject: bts-trx: loops.c: Avoid always clamping MS power to MS power class 1 ...................................................................... bts-trx: loops.c: Avoid always clamping MS power to MS power class 1 The affirmation written there is not true, since actually it depends on the band. For instance, for DCS1800 the maximum MS power is provided by class 3. Let ms_pwr_ctl_lvl() take care of campling instead. Change-Id: I744e7c315b818a1e7d3dd2579cd483c693d89b73 --- M src/osmo-bts-trx/loops.c 1 file changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/69/16069/1 diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index 4b723a0..1f54fee 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -49,7 +49,7 @@ struct gsm_bts_trx *trx = lchan->ts->trx; enum gsm_band band = trx->bts->band; int8_t new_power; /* TS 05.05 power level */ - int8_t new_dbm, current_dbm, bsc_max_dbm, pwclass_max_dbm; + int8_t new_dbm, current_dbm, bsc_max_dbm; /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */ if (diff < 2 && diff > -2) @@ -89,15 +89,6 @@ if (new_dbm > bsc_max_dbm) new_dbm = bsc_max_dbm; - /* Make sure in no case the dBm value is higher than the one of ms - power class 1 (the one with more output power) for the given band. - Ideally we should catch the MS specific power class and apply it - here, but for now let's assume the BSC sent us one taking the power - class into account. */ - pwclass_max_dbm = (int)ms_class_gmsk_dbm(band, 1); - if (pwclass_max_dbm >= 0 && new_dbm > pwclass_max_dbm) - new_dbm = pwclass_max_dbm; - new_power = ms_pwr_ctl_lvl(band, new_dbm); if (new_power < 0) { LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I744e7c315b818a1e7d3dd2579cd483c693d89b73 Gerrit-Change-Number: 16069 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:51:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 16:51:59 +0000 Subject: Change in osmo-bts[master]: Apply latests improvements from loops.c to power_control.c References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16070 ) Change subject: Apply latests improvements from loops.c to power_control.c ...................................................................... Apply latests improvements from loops.c to power_control.c Change-Id: I579967cc8bb69dc76a315c6c9d3a351f5961d92f --- M src/common/power_control.c M tests/power/power_test.c 2 files changed, 73 insertions(+), 43 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/16070/1 diff --git a/src/common/power_control.c b/src/common/power_control.c index 38a7fb7..106e2a8 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -30,67 +31,87 @@ #include #include -/* - * Check if manual power control is needed - * Check if fixed power was selected - * Check if the MS is already using our level if not - * the value is bogus.. - * TODO: Add a timeout.. e.g. if the ms is not capable of reaching - * the value we have set. - */ + /*! compute the new MS POWER LEVEL communicated to the MS and store it in lchan. + * \param lchan logical channel for which to compute (and in which to store) new power value. + * \param[in] ms_power MS Power Level received from Uplink L1 SACCH Header in SACCH block. + * \param[in] rxLevel Signal level of the received SACCH block, in dBm. + */ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan, const uint8_t ms_power, const int rxLevel) { - int rx; - int cur_dBm, new_dBm, new_pwr; - struct gsm_bts *bts = lchan->ts->trx->bts; - const enum gsm_band band = bts->band; + int diff; + struct gsm_bts_trx *trx = lchan->ts->trx; + struct gsm_bts *bts = trx->bts; + enum gsm_band band = bts->band; + int8_t new_power; /* TS 05.05 power level */ + int8_t new_dbm, current_dbm, bsc_max_dbm; if (!trx_ms_pwr_ctrl_is_osmo(lchan->ts->trx)) return 0; if (lchan->ms_power_ctrl.fixed) return 0; - /* The phone hasn't reached the power level yet */ + /* The phone hasn't reached the power level yet. + TODO: store .last and check if MS is trying to move towards current. */ if (lchan->ms_power_ctrl.current != ms_power) return 0; - /* What is the difference between what we want and received? */ - rx = bts->ul_power_target - rxLevel; + /* How many dBs measured power should be increased (+) or decreased (-) + to reach expected power. */ + diff = bts->ul_power_target - rxLevel; - cur_dBm = ms_pwr_dbm(band, ms_power); - new_dBm = cur_dBm + rx; + /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */ + if (diff < 2 && diff > -2) + return 0; - /* Clamp negative values and do it depending on the band */ - if (new_dBm < 0) - new_dBm = 0; - - switch (band) { - case GSM_BAND_1800: - /* If MS_TX_PWR_MAX_CCH is set the values 29, - * 30, 31 are not used. Avoid specifying a dBm - * that would lead to these power levels. The - * phone might not be able to reach them. */ - if (new_dBm > 30) - new_dBm = 30; - break; - default: - break; + current_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.current); + if (current_dbm < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", + lchan->ms_power_ctrl.current, gsm_band_name(band)); + return 0; + } + bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.max); + if (bsc_max_dbm < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", + lchan->ms_power_ctrl.max, gsm_band_name(band)); + return 0; } - new_pwr = ms_pwr_ctl_lvl(band, new_dBm); + new_dbm = current_dbm + diff; - /* Don't ask for smaller ms power level than the one set - * by BSC upon RSL CHAN ACT - */ - if (new_pwr < lchan->ms_power_ctrl.max) - new_pwr = lchan->ms_power_ctrl.max; + /* Make sure new_dbm is never negative. ms_pwr_ctl_lvl() can later on + cope with any unsigned dbm value, regardless of band minimal value. */ + if (new_dbm < 0) + new_dbm = 0; - if (lchan->ms_power_ctrl.current != new_pwr) { - lchan->ms_power_ctrl.current = new_pwr; - bts_model_adjst_ms_pwr(lchan); - return 1; + /* Don't ask for smaller ms power level than the one set by BSC upon RSL CHAN ACT */ + if (new_dbm > bsc_max_dbm) + new_dbm = bsc_max_dbm; + + new_power = ms_pwr_ctl_lvl(band, new_dbm); + if (new_power < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to retrieve power level for %" PRId8 " dBm on band %d\n", + new_dbm, band); + return 0; } - return 0; + if (lchan->ms_power_ctrl.current == new_power) { + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d (%d dBm)\n", + new_power, ms_pwr_dbm(band, new_power)); + return 0; + } + + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS new_power from control level %d (%d dBm) to %d (%d dBm)\n", + (diff > 0) ? "Raising" : "Lowering", + lchan->ms_power_ctrl.current, ms_pwr_dbm(band, lchan->ms_power_ctrl.current), + new_power, ms_pwr_dbm(band, new_power)); + + /* store the resulting new MS power level in the lchan */ + lchan->ms_power_ctrl.current = new_power; + bts_model_adjst_ms_pwr(lchan); + + return 1; } diff --git a/tests/power/power_test.c b/tests/power/power_test.c index dbae8fa..30fbb64 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -17,7 +17,11 @@ * along with this program. If not, see . */ +#include +#include + #include +#include #include #include @@ -80,6 +84,11 @@ { printf("Testing power loop...\n"); + tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); + msgb_talloc_ctx_init(tall_bts_ctx, 0); + + osmo_init_logging2(tall_bts_ctx, &bts_log_info); + test_power_loop(); printf("Power loop test OK\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I579967cc8bb69dc76a315c6c9d3a351f5961d92f Gerrit-Change-Number: 16070 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:51:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 16:51:59 +0000 Subject: Change in osmo-bts[master]: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16071 ) Change subject: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP ...................................................................... Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP It indicates whether BTS model supports managing an MS Power Control Loop over HW/DSP instead of using the software based osmocom algorithm present in osmo-bts. osmo-bts-trx own loop implementation is considered to be a "DSP/HW" one since it acts on lower layers and interferes with osmocom algorithm since it controls the same end variable "lchan->ms_power_ctrl.current", this way we make sure both aren't enabled at the same time. Old behavior in kept: if common upper-layer algo is not enabled explicitly in VTY (ms-power-control osmo) and bts-trx specific lower layer algo is neither enabled (osmotrx ms-power-loop ), then no power control is done at all. Related: OS#1851 Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5 --- M include/osmo-bts/gsm_data_shared.h M src/common/bts.c M src/common/gsm_data_shared.c M src/common/vty.c M src/osmo-bts-litecell15/main.c M src/osmo-bts-oc2g/main.c M src/osmo-bts-sysmo/main.c M src/osmo-bts-trx/loops.c M src/osmo-bts-trx/main.c 9 files changed, 23 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/71/16071/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 8a52fe9..41998ad 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -478,6 +478,7 @@ BTS_FEAT_SPEECH_F_AMR, BTS_FEAT_SPEECH_H_AMR, BTS_FEAT_ETWS_PN, + BTS_FEAT_MS_PWR_CTRL_DSP, _NUM_BTS_FEAT }; diff --git a/src/common/bts.c b/src/common/bts.c index 3809eb3..da41176 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -256,6 +256,10 @@ tpp->ramp.step_size_mdB = to_mdB(2); tpp->ramp.step_interval_sec = 1; + /* IF BTS model doesn't DSP/HW support MS Power Control Loop, enable osmo algo by default: */ + if (!gsm_bts_has_feature(trx->bts, BTS_FEAT_MS_PWR_CTRL_DSP)) + trx->ms_pwr_ctl_soft = true; + rc = bts_model_trx_init(trx); if (rc < 0) { llist_del(&trx->list); diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c index 80acabc..b31d458 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -108,6 +108,7 @@ { BTS_FEAT_SPEECH_F_AMR, "Fullrate speech AMR" }, { BTS_FEAT_SPEECH_H_AMR, "Halfrate speech AMR" }, { BTS_FEAT_ETWS_PN, "ETWS Primary Notification on PCH" }, + { BTS_FEAT_MS_PWR_CTRL_DSP, "DSP/HW based MS Power Control Loop" }, { 0, NULL } }; diff --git a/src/common/vty.c b/src/common/vty.c index 514d120..2558ba8 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -789,8 +789,14 @@ "Handled by DSP\n" "Handled by OsmoBTS\n") { struct gsm_bts_trx *trx = vty->index; + bool soft = !strcmp(argv[0], "osmo"); - trx->ms_pwr_ctl_soft = !strcmp(argv[0], "osmo"); + if (!soft && !gsm_bts_has_feature(trx->bts, BTS_FEAT_MS_PWR_CTRL_DSP)) { + vty_out(vty, "This BTS model has no DSP/HW MS Power Control support%s", VTY_NEWLINE); + return CMD_WARNING; + } + + trx->ms_pwr_ctl_soft = soft; return CMD_SUCCESS; } diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c index b0d725b..6f3fc00 100644 --- a/src/osmo-bts-litecell15/main.c +++ b/src/osmo-bts-litecell15/main.c @@ -112,6 +112,7 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); + gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c index cbf5c42..f9bb0cb 100644 --- a/src/osmo-bts-oc2g/main.c +++ b/src/osmo-bts-oc2g/main.c @@ -120,6 +120,7 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); + gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index ad7118a..bb2c436 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -86,6 +86,7 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); + gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index 1f54fee..e73d842 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -237,8 +237,9 @@ .lchan[l1sap_chan2ss(chan_nr)]; struct phy_instance *pinst = trx_phy_instance(l1t->trx); - /* if MS power control loop is enabled, handle it */ - if (pinst->phy_link->u.osmotrx.trx_ms_power_loop) + /* if common upper layer MS power control loop is disabled + and lower layer MS power control loop is enabled, handle it */ + if (!l1t->trx->ms_pwr_ctl_soft && pinst->phy_link->u.osmotrx.trx_ms_power_loop) ms_power_val(lchan, chan_state, rssi); /* if TA loop is enabled, handle it */ @@ -257,7 +258,9 @@ if (lchan->ms_power_ctrl.fixed) return; - if (pinst->phy_link->u.osmotrx.trx_ms_power_loop) + /* if common upper layer MS power control loop is disabled + and lower layer MS power control loop is enabled, handle it */ + if (!l1t->trx->ms_pwr_ctl_soft && pinst->phy_link->u.osmotrx.trx_ms_power_loop) ms_power_clock(lchan, chan_state); /* count the number of SACCH clocks */ diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index cf40ea3..9a29b3b 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -116,6 +116,7 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); gsm_bts_set_feature(bts, BTS_FEAT_CBCH); + gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5 Gerrit-Change-Number: 16071 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:52:00 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 16:52:00 +0000 Subject: Change in osmo-bts[master]: bts-trx: Drop low layer MS Power Control Loop algo References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16072 ) Change subject: bts-trx: Drop low layer MS Power Control Loop algo ...................................................................... bts-trx: Drop low layer MS Power Control Loop algo Let's drop it instead of having code duplication from common code in a lower layer, and maintain only the one in l1sap for all BTS models. As a result, osmo-bts-trx loses feature BTS_FEAT_MS_PWR_CTRL_DSP and will only be able to use "ms-power-control osmo" in VTY, which will be enabled by default (meaning: change of behavior, now MS Power Control is enabled by default in osmo-bts-trx and can only by disabled by BSC). Old bts-trx specific VTY command "(no) osmotrx ms-power-loop" is marked as deprecated but still working for more usual case (1 TRX configured) to avoid breaking backward compatibility. TA low level loop is still kept in loops.c and will be moved to l1sap at some point too. Related: OS#1851 Change-Id: I0d8b0c981d9ead91d93999df6e45fb06e426aeb9 --- M include/osmo-bts/phy_link.h M include/osmo-bts/scheduler.h M src/osmo-bts-trx/loops.c M src/osmo-bts-trx/loops.h M src/osmo-bts-trx/main.c M src/osmo-bts-trx/scheduler_trx.c M src/osmo-bts-trx/trx_vty.c 7 files changed, 9 insertions(+), 214 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/72/16072/1 diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 316a1ba..b2e7c0e 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -45,8 +45,6 @@ uint16_t base_port_remote; struct osmo_fd trx_ofd_clk; bool trx_ta_loop; - bool trx_ms_power_loop; - int8_t trx_target_rssi; uint32_t clock_advance; uint32_t rts_advance; bool use_legacy_setbsic; diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h index 3100a1d..fed3f04 100644 --- a/include/osmo-bts/scheduler.h +++ b/include/osmo-bts/scheduler.h @@ -121,11 +121,6 @@ /* measurements */ struct { - uint8_t clock; /* cyclic clock counter */ - int8_t rssi[32]; /* last RSSI values */ - int rssi_count; /* received RSSI values */ - int rssi_valid_count; /* number of stored value */ - int rssi_got_burst; /* any burst received so far */ int32_t toa256_sum; /* sum of TOA values (1/256 symbol) */ int toa_num; /* number of TOA value */ } meas; diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index e73d842..70e3ffc 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -36,162 +36,12 @@ #include "loops.h" /* - * MS Power loop + * Timing Advance loop */ -/*! compute the new MS POWER LEVEL communicated to the MS and store it in lchan. - * \param lchan logical channel for which to compute (and in which to store) new power value. - * \param[in] diff input delta value (in dB). How many dBs measured power - * should be increased (+) or decreased (-) to reach expected power. - */ -static void ms_power_diff(struct gsm_lchan *lchan, int8_t diff) -{ - struct gsm_bts_trx *trx = lchan->ts->trx; - enum gsm_band band = trx->bts->band; - int8_t new_power; /* TS 05.05 power level */ - int8_t new_dbm, current_dbm, bsc_max_dbm; - - /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */ - if (diff < 2 && diff > -2) - return; - - current_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.current); - if (current_dbm < 0) { - LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, - "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", - lchan->ms_power_ctrl.current, gsm_band_name(band)); - return; - } - bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.max); - if (bsc_max_dbm < 0) { - LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, - "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", - lchan->ms_power_ctrl.max, gsm_band_name(band)); - return; - } - - /* don't ever change more than MS_{LOWER,RAISE}_MAX_DBM during one loop iteration, i.e. - * reduce the speed at which the MS transmit power can change */ - /* a higher value means a lower level (and vice versa) */ - if (diff > MS_RAISE_MAX_DB) - diff = MS_RAISE_MAX_DB; - else if (diff < -MS_LOWER_MAX_DB) - diff = -MS_LOWER_MAX_DB; - - new_dbm = current_dbm + diff; - - /* Make sure new_dbm is never negative. ms_pwr_ctl_lvl() can later on - cope with any unsigned dbm value, regardless of band minimal value. */ - if (new_dbm < 0) - new_dbm = 0; - - /* Don't ask for smaller ms power level than the one set by BSC upon RSL CHAN ACT */ - if (new_dbm > bsc_max_dbm) - new_dbm = bsc_max_dbm; - - new_power = ms_pwr_ctl_lvl(band, new_dbm); - if (new_power < 0) { - LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, - "Failed to retrieve power level for %" PRId8 " dBm on band %d\n", - new_dbm, band); - return; - } - - if (lchan->ms_power_ctrl.current == new_power) { - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d (%d dBm)\n", - new_power, ms_pwr_dbm(band, new_power)); - } else { - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS new_power from control level %d (%d dBm) to %d (%d dBm)\n", - (diff > 0) ? "Raising" : "Lowering", - lchan->ms_power_ctrl.current, ms_pwr_dbm(band, lchan->ms_power_ctrl.current), - new_power, ms_pwr_dbm(band, new_power)); - - /* store the resulting new MS power level in the lchan */ - lchan->ms_power_ctrl.current = new_power; - } -} - -/*! Input a new RSSI value into the MS power control loop for the given logical channel. - * \param lchan logical channel - * \param chan_state L1 channel state of the logical channel. - * \param rssi Received Signal Strength Indication (in dBm) */ -static void ms_power_val(struct gsm_lchan *lchan, struct l1sched_chan_state *chan_state, int8_t rssi) -{ - /* ignore inserted dummy frames, treat as lost frames */ - if (rssi < -127) - return; - - LOGPLCHAN(lchan, DLOOP, LOGL_DEBUG, "Got RSSI value of %d\n", rssi); - - chan_state->meas.rssi_count++; - - chan_state->meas.rssi_got_burst = 1; - - /* store and process RSSI */ - if (chan_state->meas.rssi_valid_count == ARRAY_SIZE(chan_state->meas.rssi)) - return; - chan_state->meas.rssi[chan_state->meas.rssi_valid_count++] = rssi; -} - -/*! Process a single clock tick of the MS power control loop. - * \param lchan Logical channel to which the clock tick applies */ -static void ms_power_clock(struct gsm_lchan *lchan, struct l1sched_chan_state *chan_state) -{ - struct gsm_bts_trx *trx = lchan->ts->trx; - struct phy_instance *pinst = trx_phy_instance(trx); - int rssi; - int i; - - /* skip every second clock, to prevent oscillating due to roundtrip - * delay */ - if (!(chan_state->meas.clock & 1)) - return; - - LOGPLCHAN(lchan, DLOOP, LOGL_DEBUG, "Got SACCH master clock at RSSI count %d\n", - chan_state->meas.rssi_count); - - /* wait for initial burst */ - if (!chan_state->meas.rssi_got_burst) - return; - - /* if no burst was received from MS at clock */ - if (chan_state->meas.rssi_count == 0) { - LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, "LOST SACCH frame, so we raise MS power output\n"); - ms_power_diff(lchan, MS_RAISE_MAX_DB); - return; - } - - /* reset total counter */ - chan_state->meas.rssi_count = 0; - - /* check the minimum level received after MS acknowledged the ordered - * power level */ - if (chan_state->meas.rssi_valid_count == 0) - return; - for (rssi = 999, i = 0; i < chan_state->meas.rssi_valid_count; i++) { - if (rssi > chan_state->meas.rssi[i]) - rssi = chan_state->meas.rssi[i]; - } - - /* reset valid counter */ - chan_state->meas.rssi_valid_count = 0; - - /* change RSSI */ - LOGPLCHAN(lchan, DLOOP, LOGL_DEBUG, "Lowest RSSI: %d Target RSSI: %d Current " - "MS power: %d (%d dBm)\n", rssi, - pinst->phy_link->u.osmotrx.trx_target_rssi, lchan->ms_power_ctrl.current, - ms_pwr_dbm(trx->bts->band, lchan->ms_power_ctrl.current)); - ms_power_diff(lchan, pinst->phy_link->u.osmotrx.trx_target_rssi - rssi); -} - - /* 90% of one bit duration in 1/256 symbols: 256*0.9 */ #define TOA256_9OPERCENT 230 -/* - * Timing Advance loop - */ - void ta_val(struct gsm_lchan *lchan, struct l1sched_chan_state *chan_state, int16_t toa256) { /* check if the current L1 header acks to the current ordered TA */ @@ -231,42 +81,17 @@ * \param[in] rssi Receive Signal Strength Indication * \param[in] toa256 Time of Arrival in 1/256 symbol periods */ void trx_loop_sacch_input(struct l1sched_trx *l1t, uint8_t chan_nr, - struct l1sched_chan_state *chan_state, int8_t rssi, int16_t toa256) + struct l1sched_chan_state *chan_state, int16_t toa256) { struct gsm_lchan *lchan = &l1t->trx->ts[L1SAP_CHAN2TS(chan_nr)] .lchan[l1sap_chan2ss(chan_nr)]; struct phy_instance *pinst = trx_phy_instance(l1t->trx); - /* if common upper layer MS power control loop is disabled - and lower layer MS power control loop is enabled, handle it */ - if (!l1t->trx->ms_pwr_ctl_soft && pinst->phy_link->u.osmotrx.trx_ms_power_loop) - ms_power_val(lchan, chan_state, rssi); - /* if TA loop is enabled, handle it */ if (pinst->phy_link->u.osmotrx.trx_ta_loop) ta_val(lchan, chan_state, toa256); } -/*! Called once every downlink SACCH block needs to be sent. */ -void trx_loop_sacch_clock(struct l1sched_trx *l1t, uint8_t chan_nr, - struct l1sched_chan_state *chan_state) -{ - struct gsm_lchan *lchan = &l1t->trx->ts[L1SAP_CHAN2TS(chan_nr)] - .lchan[l1sap_chan2ss(chan_nr)]; - struct phy_instance *pinst = trx_phy_instance(l1t->trx); - - if (lchan->ms_power_ctrl.fixed) - return; - - /* if common upper layer MS power control loop is disabled - and lower layer MS power control loop is enabled, handle it */ - if (!l1t->trx->ms_pwr_ctl_soft && pinst->phy_link->u.osmotrx.trx_ms_power_loop) - ms_power_clock(lchan, chan_state); - - /* count the number of SACCH clocks */ - chan_state->meas.clock++; -} - void trx_loop_amr_input(struct l1sched_trx *l1t, uint8_t chan_nr, struct l1sched_chan_state *chan_state, float ber) { diff --git a/src/osmo-bts-trx/loops.h b/src/osmo-bts-trx/loops.h index 7869903..1630acc 100644 --- a/src/osmo-bts-trx/loops.h +++ b/src/osmo-bts-trx/loops.h @@ -7,19 +7,12 @@ * calibration of loops */ -/* how much power levels do we raise/lower as maximum (1 level = 2 dB) */ -#define MS_RAISE_MAX_DB 4 -#define MS_LOWER_MAX_DB 8 - /* * loops api */ void trx_loop_sacch_input(struct l1sched_trx *l1t, uint8_t chan_nr, - struct l1sched_chan_state *chan_state, int8_t rssi, int16_t toa); - -void trx_loop_sacch_clock(struct l1sched_trx *l1t, uint8_t chan_nr, - struct l1sched_chan_state *chan_state); + struct l1sched_chan_state *chan_state, int16_t toa); void trx_loop_amr_input(struct l1sched_trx *l1t, uint8_t chan_nr, struct l1sched_chan_state *chan_state, float ber); diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index 9a29b3b..00280ce 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -116,7 +116,6 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); gsm_bts_set_feature(bts, BTS_FEAT_CBCH); - gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); @@ -137,8 +136,6 @@ plink->u.osmotrx.clock_advance = 20; plink->u.osmotrx.rts_advance = 5; plink->u.osmotrx.trx_ta_loop = true; - plink->u.osmotrx.trx_ms_power_loop = false; - plink->u.osmotrx.trx_target_rssi = -10; /* attempt use newest TRXD version by default: */ plink->u.osmotrx.trxd_hdr_ver_max = TRX_DATA_FORMAT_VER; } diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 9945b2c..d39776b 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -148,8 +148,6 @@ { struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct gsm_bts_trx_ts *ts = &l1t->trx->ts[tn]; - uint8_t link_id = trx_chan_desc[chan].link_id; - uint8_t chan_nr = trx_chan_desc[chan].chan_nr | tn; struct msgb *msg = NULL; /* make GCC happy */ ubit_t *burst, **bursts_p = &l1ts->chan_state[chan].dl_bursts; static ubit_t bits[GSM_BURST_LEN]; @@ -161,10 +159,6 @@ goto send_burst; } - /* send clock information to loops process */ - if (L1SAP_IS_LINK_SACCH(link_id)) - trx_loop_sacch_clock(l1t, chan_nr, &l1ts->chan_state[chan]); - /* get mac block from queue */ msg = _sched_dequeue_prim(l1t, tn, fn, chan); if (msg) @@ -959,7 +953,7 @@ /* send burst information to loops process */ if (L1SAP_IS_LINK_SACCH(trx_chan_desc[chan].link_id)) { trx_loop_sacch_input(l1t, trx_chan_desc[chan].chan_nr | bi->tn, - chan_state, bi->rssi, bi->toa256); + chan_state, bi->toa256); } /* wait until complete set of bursts */ diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c index 86f5712..5c5e477 100644 --- a/src/osmo-bts-trx/trx_vty.c +++ b/src/osmo-bts-trx/trx_vty.c @@ -160,26 +160,23 @@ return CMD_SUCCESS; } -DEFUN(cfg_phy_ms_power_loop, cfg_phy_ms_power_loop_cmd, +DEFUN_DEPRECATED(cfg_phy_ms_power_loop, cfg_phy_ms_power_loop_cmd, "osmotrx ms-power-loop <-127-127>", OSMOTRX_STR "Enable MS power control loop\nTarget RSSI value (transceiver specific, " "should be 6dB or more above noise floor)\n") { - struct phy_link *plink = vty->index; + vty_out (vty, "'osmotrx ms-power-loop' is deprecated, use 'uplink-power-target' instead%s", VTY_NEWLINE); - plink->u.osmotrx.trx_target_rssi = atoi(argv[0]); - plink->u.osmotrx.trx_ms_power_loop = true; + vty_bts->ul_power_target = atoi(argv[0]); return CMD_SUCCESS; } -DEFUN(cfg_phy_no_ms_power_loop, cfg_phy_no_ms_power_loop_cmd, +DEFUN_DEPRECATED(cfg_phy_no_ms_power_loop, cfg_phy_no_ms_power_loop_cmd, "no osmotrx ms-power-loop", NO_STR OSMOTRX_STR "Disable MS power control loop\n") { - struct phy_link *plink = vty->index; - - plink->u.osmotrx.trx_ms_power_loop = false; + vty_out (vty, "'no osmotrx ms-power-loop' is deprecated, use of BTS control loop is managed by BSC%s", VTY_NEWLINE); return CMD_SUCCESS; } @@ -525,10 +522,6 @@ vty_out(vty, " osmotrx ip remote %s%s", plink->u.osmotrx.remote_ip, VTY_NEWLINE); - if (plink->u.osmotrx.trx_ms_power_loop) - vty_out(vty, " osmotrx ms-power-loop %d%s", plink->u.osmotrx.trx_target_rssi, VTY_NEWLINE); - else - vty_out(vty, " no osmotrx ms-power-loop%s", VTY_NEWLINE); vty_out(vty, " %sosmotrx timing-advance-loop%s", (plink->u.osmotrx.trx_ta_loop) ? "" : "no ", VTY_NEWLINE); if (plink->u.osmotrx.base_port_local) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0d8b0c981d9ead91d93999df6e45fb06e426aeb9 Gerrit-Change-Number: 16072 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:52:00 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 16:52:00 +0000 Subject: Change in osmo-bts[master]: power_control.c: Log rx current and target signal levels References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16073 ) Change subject: power_control.c: Log rx current and target signal levels ...................................................................... power_control.c: Log rx current and target signal levels Change-Id: I31ce7930a1daa20a2ff81f31a37df94298c877d6 --- M src/common/power_control.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/16073/1 diff --git a/src/common/power_control.c b/src/common/power_control.c index 106e2a8..adba4c6 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -99,15 +99,15 @@ } if (lchan->ms_power_ctrl.current == new_power) { - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d (%d dBm)\n", - new_power, ms_pwr_dbm(band, new_power)); + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d, %d dBm (rx-current %d dBm, rx-target %d dBm)\n", + new_power, ms_pwr_dbm(band, new_power), rxLevel, bts->ul_power_target); return 0; } - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS new_power from control level %d (%d dBm) to %d (%d dBm)\n", + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS new_power from control level %d (%d dBm) to %d, %d dBm (rx-current %d dBm, rx-target %d dBm)\n", (diff > 0) ? "Raising" : "Lowering", lchan->ms_power_ctrl.current, ms_pwr_dbm(band, lchan->ms_power_ctrl.current), - new_power, ms_pwr_dbm(band, new_power)); + new_power, ms_pwr_dbm(band, new_power), rxLevel, bts->ul_power_target); /* store the resulting new MS power level in the lchan */ lchan->ms_power_ctrl.current = new_power; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16073 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I31ce7930a1daa20a2ff81f31a37df94298c877d6 Gerrit-Change-Number: 16073 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:52:14 2019 From: gerrit-no-reply at lists.osmocom.org (roox) Date: Thu, 14 Nov 2019 16:52:14 +0000 Subject: Change in osmo-msc[master]: Fix some typos References: Message-ID: roox has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16074 ) Change subject: Fix some typos ...................................................................... Fix some typos Fix typos and common misspellings in code comments and log messages. Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad --- M doc/manuals/chapters/counters_generated.adoc M doc/manuals/chapters/running.adoc M doc/sequence_charts/msc_log_to_ladder.py M include/osmocom/msc/gsm_data.h M include/osmocom/msc/mncc.h M include/osmocom/msc/msc_roles.h M include/osmocom/msc/sgs_server.h M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_09_11.c M src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c M src/libmsc/msc_a.c M src/libmsc/msc_vty.c M src/libmsc/ran_msg_a.c M src/libmsc/ran_peer.c M src/libmsc/sgs_iface.c M src/libmsc/smpp_openbsc.c M src/libmsc/sms_queue.c M src/libvlr/vlr.c M src/libvlr/vlr_auth_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err 27 files changed, 51 insertions(+), 51 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/16074/1 diff --git a/doc/manuals/chapters/counters_generated.adoc b/doc/manuals/chapters/counters_generated.adoc index 1b40d8b..e2587e8 100644 --- a/doc/manuals/chapters/counters_generated.adoc +++ b/doc/manuals/chapters/counters_generated.adoc @@ -27,7 +27,7 @@ | sms:rp_err_other | <> | Other error of MS responses on a sms delive attempt. | sms:deliver_unknown_error | <> | Unknown error occurred during sms delivery. | call:mo_setup | <> | Received setup requests from a MS to init a MO call. -| call:mo_connect_ack | <> | Received a connect ack from MS of a MO call. Call is now succesful connected up. +| call:mo_connect_ack | <> | Received a connect ack from MS of a MO call. Call is now successful connected up. | call:mt_setup | <> | Sent setup requests to the MS (MT). | call:mt_connect | <> | Sent a connect to the MS (MT). | call:active | <> | Count total amount of calls that ever reached active state. diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index 9d56f1f..71f336b 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -44,7 +44,7 @@ Same as option -M (deprecated). *-C, --no-dbcounter*:: Deprecated. DB statistics and counter has been removed. - This option is only valid for compatiblity and does nothing. + This option is only valid for compatibility and does nothing. === Multiple instances diff --git a/doc/sequence_charts/msc_log_to_ladder.py b/doc/sequence_charts/msc_log_to_ladder.py index 1ceaeb6..30b6594 100755 --- a/doc/sequence_charts/msc_log_to_ladder.py +++ b/doc/sequence_charts/msc_log_to_ladder.py @@ -713,7 +713,7 @@ help='Pick output format: mscgen format or libosmocore/contrib/ladder_to_msc.py format') parser.add_argument('-m', '--mask-values', dest='mask_values', action='store_true', help='Do not output specific values like IP address, port, endpoint CI, instead just indicate that a value is' - ' present. This makes the output reproducable across various logs.') + ' present. This makes the output reproducible across various logs.') parser.add_argument('-s', '--start-with', dest='start_with_re', default=None, help='Skip until the first message with this label (regex), e.g. -s "CC SETUP"') diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 11b6e82..bcee213 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -83,7 +83,7 @@ [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms:deliver_unknown_error", "Unknown error occurred 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_MO_CONNECT_ACK] = {"call:mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now successful 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."}, diff --git a/include/osmocom/msc/mncc.h b/include/osmocom/msc/mncc.h index 28ee9b3..4414a8d 100644 --- a/include/osmocom/msc/mncc.h +++ b/include/osmocom/msc/mncc.h @@ -53,7 +53,7 @@ #define MNCC_SETUP_CNF 0x0104 #define MNCC_SETUP_COMPL_REQ 0x0105 #define MNCC_SETUP_COMPL_IND 0x0106 -/* MNCC_REJ_* is perfomed via MNCC_REL_* */ +/* MNCC_REJ_* is performed via MNCC_REL_* */ #define MNCC_CALL_CONF_IND 0x0107 #define MNCC_CALL_PROC_REQ 0x0108 #define MNCC_PROGRESS_REQ 0x0109 @@ -132,7 +132,7 @@ /* which fields are present */ uint32_t fields; - /* data derived informations (MNCC_F_ based) */ + /* data derived information (MNCC_F_ based) */ struct gsm_mncc_bearer_cap bearer_cap; struct gsm_mncc_number called; struct gsm_mncc_number calling; diff --git a/include/osmocom/msc/msc_roles.h b/include/osmocom/msc/msc_roles.h index b22bc7b..4957175 100644 --- a/include/osmocom/msc/msc_roles.h +++ b/include/osmocom/msc/msc_roles.h @@ -236,7 +236,7 @@ MSC_A_EV_FROM_T_SEND_END_SIGNAL_REQUEST, /* gsm_04_08.c has successfully received a valid Complete Layer 3 message, i.e. Location Updating, CM Service - * Request, Paging Reponse or IMSI Detach. */ + * Request, Paging Response or IMSI Detach. */ MSC_A_EV_COMPLETE_LAYER_3_OK, /* Received a Classmark Update -- during GERAN ciphering, msc_a may have to wait for Classmark information to diff --git a/include/osmocom/msc/sgs_server.h b/include/osmocom/msc/sgs_server.h index a89022d..400bd9e 100644 --- a/include/osmocom/msc/sgs_server.h +++ b/include/osmocom/msc/sgs_server.h @@ -44,7 +44,7 @@ char vlr_name[SGS_VLR_NAME_MAXLEN]; /* timers on VLR side */ unsigned int timer[_NUM_SGS_STATE_TIMERS]; - /* countrs on VLR side */ + /* counters on VLR side */ unsigned int counter[_NUM_SGS_STATE_COUNTERS]; } cfg; }; diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 52912eb..ee5a234 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -40,7 +40,7 @@ /* VLR subscriber authentication state */ enum vlr_subscr_auth_state { - /* subscriber needs to be autenticated */ + /* subscriber needs to be authenticated */ VLR_SUB_AS_NEEDS_AUTH, /* waiting for AuthInfo from HLR/AUC */ VLR_SUB_AS_NEEDS_AUTH_WAIT_AI, @@ -66,7 +66,7 @@ VLR_ULA_E_SEND_ID_NACK, /* Result of Send-ID from PVLR */ VLR_ULA_E_AUTH_RES, /* Result of auth procedure */ VLR_ULA_E_CIPH_RES, /* Result of Ciphering Mode Command */ - VLR_ULA_E_ID_IMSI, /* IMSI recieved from MS */ + VLR_ULA_E_ID_IMSI, /* IMSI received from MS */ VLR_ULA_E_ID_IMEI, /* IMEI received from MS */ VLR_ULA_E_ID_IMEISV, /* IMEISV received from MS */ VLR_ULA_E_HLR_IMEI_ACK, /* Check_IMEI_VLR result from HLR */ @@ -420,7 +420,7 @@ void vlr_subscr_enable_expire_lu(struct vlr_subscr *vsub); -/* Process Acccess Request FSM */ +/* Process Access Request FSM */ enum proc_arq_vlr_event { PR_ARQ_E_START, diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 0bdc4fb..750c766 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -341,7 +341,7 @@ } /* TODO: 10.5.1.6 MS Classmark for UMTS / Classmark 2 */ - /* TODO: 10.5.3.14 Aditional update parameters (CS fallback calls) */ + /* TODO: 10.5.3.14 Additional update parameters (CS fallback calls) */ /* TODO: 10.5.7.8 Device properties */ /* TODO: 10.5.1.15 MS network feature support */ @@ -676,7 +676,7 @@ /* * Handle CM Service Requests * a) Verify that the packet is long enough to contain the information - * we require otherwsie reject with INCORRECT_MESSAGE + * we require otherwise reject with INCORRECT_MESSAGE * b) Try to parse the TMSI. If we do not have one reject * c) Check that we know the subscriber with the TMSI otherwise reject * with a HLR cause diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 7e2d70b..4e604e5 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -280,7 +280,7 @@ mncc_set_cause(&rel, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_RESOURCE_UNAVAIL); gsm48_cc_tx_release(trans, &rel); } - /* Ressource unavailable */ + /* Resource unavailable */ if (trans->cc.mncc_initiated) mncc_release_ind(trans->net, trans, trans->callref, GSM48_CAUSE_LOC_PRN_S_LU, @@ -1922,7 +1922,7 @@ if (!trans) { LOG_TRANS(trans, LOGL_ERROR, "No memory for trans.\n"); vlr_subscr_put(vsub, __func__); - /* Ressource unavailable */ + /* Resource unavailable */ mncc_release_ind(net, NULL, data->callref, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_RESOURCE_UNAVAIL); diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c index 8a13cda..b696a67 100644 --- a/src/libmsc/gsm_09_11.c +++ b/src/libmsc/gsm_09_11.c @@ -265,7 +265,7 @@ if (trans->msc_a) { LOG_MSC_A_CAT(msc_a, DPAG, LOGL_ERROR, - "Handle paging error: transaction already associated with subsciber," + "Handle paging error: transaction already associated with subscriber," " apparently it was already handled. Skip.\n"); return; } diff --git a/src/libmsc/mncc_call.c b/src/libmsc/mncc_call.c index 34c7299..e5fc820 100644 --- a/src/libmsc/mncc_call.c +++ b/src/libmsc/mncc_call.c @@ -192,7 +192,7 @@ /* Disassociate the rtp_stream from this MNCC call instance, and clear the remote RTP IP:port info. * When the MNCC FSM ends for any reason, it will release the RTP stream (which usually triggers complete tear down of - * the call_leg and CC transaction). If the RTP stream should still remain in use, e.g. during Subseqent inter-MSC + * the call_leg and CC transaction). If the RTP stream should still remain in use, e.g. during Subsequent inter-MSC * Handover where this MNCC was a forwarding to a remote MSC that is no longer needed, this function must be called * before the MNCC FSM instance terminates. Call this *before* setting a new remote RTP address on the rtp_stream, since * this clears the rtp_stream->remote ip:port information. */ diff --git a/src/libmsc/mncc_sock.c b/src/libmsc/mncc_sock.c index 0a4e99b..670d692 100644 --- a/src/libmsc/mncc_sock.c +++ b/src/libmsc/mncc_sock.c @@ -82,7 +82,7 @@ /* re-enable the generation of ACCEPT for new connections */ state->listen_bfd.when |= BSC_FD_READ; - /* release all exisitng calls */ + /* release all existing calls */ gsm0408_clear_all_trans(state->net, TRANS_CC); /* flush the queue */ diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 3c316ea..0b07fbc 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -1323,7 +1323,7 @@ dst = &vsub->classmark; } - LOG_MSC_A(msc_a, LOGL_DEBUG, "A5 capabilities recived from Classmark Update: %s\n", + LOG_MSC_A(msc_a, LOGL_DEBUG, "A5 capabilities received from Classmark Update: %s\n", osmo_gsm48_classmark_a5_name(classmark)); osmo_gsm48_classmark_update(dst, classmark); @@ -1643,7 +1643,7 @@ MSC_EV_CALL_LEG_RTP_COMPLETE); OSMO_ASSERT(cl); - /* HACK: We put the connection in loopback mode at the beginnig to + /* HACK: We put the connection in loopback mode at the beginning to * trick the hNodeB into doing the IuUP negotiation with itself. * This is a hack we need because osmo-mgw does not support IuUP yet, see OS#2459. */ if (msc_a->c.ran->type == OSMO_RAT_UTRAN_IU) diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 51504ef..f833585 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -1929,7 +1929,7 @@ { if (vty->type != VTY_FILE) { vty_out(vty, "The IPA name cannot be changed at run-time; " - "It can only be set in the configuraton file.%s", VTY_NEWLINE); + "It can only be set in the configuration file.%s", VTY_NEWLINE); return CMD_WARNING; } diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 59789b0..cb228ef 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -514,7 +514,7 @@ int i; if (gsm0808_dec_encrypt_info(&encr_info, ie_encryption_information->val, ie_encryption_information->len) <= 0) { - LOG_RAN_A_DEC_MSG(LOGL_ERROR, "Failed to decode Encryption Informaiton IE\n"); + LOG_RAN_A_DEC_MSG(LOGL_ERROR, "Failed to decode Encryption Information IE\n"); return -EINVAL; } @@ -524,7 +524,7 @@ } if (encr_info.key_len > sizeof(geran_encr.key)) { - LOG_RAN_A_DEC_MSG(LOGL_ERROR, "Failed to decode Encryption Informaiton IE:" + LOG_RAN_A_DEC_MSG(LOGL_ERROR, "Failed to decode Encryption Information IE:" " encryption key is too long: %u\n", geran_encr.key_len); return -EINVAL; } diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index 77740a0..d3583a3 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -650,7 +650,7 @@ switch (page_where) { case CELL_IDENT_NO_CELL: - LOG_SCCP_RAN_CAT(sri, DPAG, LOGL_ERROR, "Asked to page on NO_CELL, wich doesn't make sense.\n"); + LOG_SCCP_RAN_CAT(sri, DPAG, LOGL_ERROR, "Asked to page on NO_CELL, witch doesn't make sense.\n"); return 0; case CELL_IDENT_UTRAN_PLMN_LAC_RNC: diff --git a/src/libmsc/sgs_iface.c b/src/libmsc/sgs_iface.c index 5ccded7..b4892d8 100644 --- a/src/libmsc/sgs_iface.c +++ b/src/libmsc/sgs_iface.c @@ -336,13 +336,13 @@ } /* Comfortable status message generator that also generates some basic - * context-dependent dependand log output */ + * context-dependent log output */ static int sgs_tx_status(struct sgs_connection *sgc, const char *imsi, enum sgsap_sgs_cause cause, struct msgb *msg, int sgsap_iei) { struct msgb *resp; - if (sgsap_iei < 0) { + ifaildf (sgsap_iei < 0) { LOGSGC_VSUB(sgc, subscr_info(imsi), LOGL_ERROR, "Rx %s failed with cause %s!\n", sgsap_msg_type_name(msg->data[0]), sgsap_sgs_cause_name(cause)); } else if (cause == SGSAP_SGS_CAUSE_MISSING_MAND_IE) { @@ -352,7 +352,7 @@ LOGSGC_VSUB(sgc, subscr_info(imsi), LOGL_ERROR, "Rx %s with invalid mandatory %s IEI!\n", sgsap_msg_type_name(msg->data[0]), sgsap_iei_name(sgsap_iei)); } else if (cause == SGSAP_SGS_CAUSE_COND_IE_ERROR) { - LOGSGC_VSUB(sgc, subscr_info(imsi), LOGL_ERROR, "Rx %s with errornous conditional %s IEI!\n", + LOGSGC_VSUB(sgc, subscr_info(imsi), LOGL_ERROR, "Rx %s with erroneous conditional %s IEI!\n", sgsap_msg_type_name(msg->data[0]), sgsap_iei_name(sgsap_iei)); } else { LOGSGC_VSUB(sgc, subscr_info(imsi), LOGL_ERROR, "Rx %s failed with cause %s at %s IEI!\n", @@ -860,7 +860,7 @@ vlr_subscr_put(vsub, __func__); /* If we do not find an existing connection and allocating a new one - * faild, give up and return status. */ + * failed, give up and return status. */ if (!msc_a) return sgs_tx_status(sgc, imsi, SGSAP_SGS_CAUSE_MSG_INCOMP_STATE, msg, 0); @@ -1278,7 +1278,7 @@ sgs_tx(mme->conn, msg_sgs); } -/*! initalize SGs new interface +/*! initialize SGs new interface * \param[in] ctx talloc context * \param[in] network associated gsm network * \returns returns allocated sgs_stae, NULL in case of error. */ diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c index e4c3891..98b3b53 100644 --- a/src/libmsc/smpp_openbsc.c +++ b/src/libmsc/smpp_openbsc.c @@ -319,7 +319,7 @@ llist_for_each_entry(esme, &smsc->esme_list, list) { /* we currently send an alert notification to each ESME that is - * connected, and do not require a (non-existant) delivery + * connected, and do not require a (non-existent) delivery * pending flag to be set before. */ if (!esme->bind_flags) { LOGP(DSMPP, LOGL_DEBUG, @@ -367,7 +367,7 @@ * to the ESME */ case S_SMS_UNKNOWN_ERROR: if (sms->smpp.transaction_mode) { - /* Send back the SUBMIT-SM response with apropriate error */ + /* Send back the SUBMIT-SM response with appropriate error */ LOGP(DLSMS, LOGL_INFO, "SMPP SUBMIT-SM: Error\n"); rc = smpp_tx_submit_r(sms->smpp.esme, sms->smpp.sequence_nr, diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c index d60cb4a..c00a8c6 100644 --- a/src/libmsc/sms_queue.c +++ b/src/libmsc/sms_queue.c @@ -1,4 +1,4 @@ -/* SMS queue to continously attempt to deliver SMS */ +/* SMS queue to continuously attempt to deliver SMS */ /* * (C) 2010 by Holger Hans Peter Freyther * All Rights Reserved diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index ca6f90d..0f9c991 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -360,7 +360,7 @@ } /* Find subscriber by IMSI, or create new subscriber if not found. - * \param[in] vlr VLR instace. + * \param[in] vlr VLR instance. * \param[in] imsi IMSI string. * \param[out] created if non-NULL, returns whether a new entry was created. */ struct vlr_subscr *_vlr_subscr_find_or_create_by_imsi(struct vlr_instance *vlr, @@ -390,7 +390,7 @@ } /* Find subscriber by TMSI, or create new subscriber if not found. - * \param[in] vlr VLR instace. + * \param[in] vlr VLR instance. * \param[in] tmsi TMSI. * \param[out] created if non-NULL, returns whether a new entry was created. */ struct vlr_subscr *_vlr_subscr_find_or_create_by_tmsi(struct vlr_instance *vlr, @@ -730,7 +730,7 @@ if (key_seq >= ARRAY_SIZE(vsub->auth_tuples)) { LOGVSUBP(LOGL_NOTICE, vsub, - "Skipping auth tuple wih invalid cksn %zu\n", + "Skipping auth tuple with invalid cksn %zu\n", key_seq); continue; } diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c index 036c3d7..dcdf584 100644 --- a/src/libvlr/vlr_auth_fsm.c +++ b/src/libvlr/vlr_auth_fsm.c @@ -1,4 +1,4 @@ -/* Osmocom Visitor Location Register (VLR) Autentication FSM */ +/* Osmocom Visitor Location Register (VLR) Authentication FSM */ /* (C) 2016 by Harald Welte * diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 2db5711..e4d40f0 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -688,7 +688,7 @@ static bool lai_in_this_vlr(struct vlr_instance *vlr, const struct osmo_location_area_id *lai) { - /* TODO: VLR needs to keep a locally configued list of LAIs */ + /* TODO: VLR needs to keep a locally configured list of LAIs */ return true; } diff --git a/src/libvlr/vlr_sgs.c b/src/libvlr/vlr_sgs.c index 452de2c..269dda6 100644 --- a/src/libvlr/vlr_sgs.c +++ b/src/libvlr/vlr_sgs.c @@ -44,7 +44,7 @@ }; /* Reset all SGs-Associations back to zero. - * \param[in] vlr VLR instace. */ + * \param[in] vlr VLR instance. */ void vlr_sgs_reset(struct vlr_instance *vlr) { struct vlr_subscr *vsub; @@ -59,11 +59,11 @@ } /*! Perform an SGs location update. - * \param[in] vlr VLR instace. + * \param[in] vlr VLR instance. * \param[in] cfg SGs interface configuration parameters. - * \param[in] response_cb calback function that is called when LU is done. - * \param[in] paging_cb calback function that is called when LU needs to page. - * \param[in] mminfo_cb calback function that is called to provide MM info to the UE. + * \param[in] response_cb callback function that is called when LU is done. + * \param[in] paging_cb callback function that is called when LU needs to page. + * \param[in] mminfo_cb callback function that is called to provide MM info to the UE. * \param[in] mme_name fqdn of the requesting MME (mme-name). * \param[in] type location update type (normal or IMSI attach). * \param[in] imsi mobile identity (IMSI). @@ -299,7 +299,7 @@ { struct vlr_subscr *vsub = arg; - /* 3GPP TS 29.118 does not specify a specif action that has to happen + /* 3GPP TS 29.118 does not specify a specific action that has to happen * in case Ts5 times out. The timeout just indicates that the paging * failed. Other actions may check the status of Ts5 to see if a paging * is still ongoing or not. */ @@ -327,7 +327,7 @@ /* Note: 3GPP TS 29.118, chapter 4.2.2 mentions paging in the FSM * diagram, but paging never causes a state transition except when * an explicit failure is indicated (MME actively rejects paging). - * Apparantly it is also possible that an LU happens while the paging + * Apparently it is also possible that an LU happens while the paging * is still ongoing and Ts5 is running. (chapter 5.1.2.3). This means * that the paging procedure is intended to run in parallel to the * SGs FSM and given that the benaviour around Ts5 must be implemented diff --git a/src/libvlr/vlr_sgs_fsm.c b/src/libvlr/vlr_sgs_fsm.c index 49ad09a..a131b7e 100644 --- a/src/libvlr/vlr_sgs_fsm.c +++ b/src/libvlr/vlr_sgs_fsm.c @@ -54,7 +54,7 @@ struct vlr_subscr *vsub = fi->priv; osmo_fsm_inst_state_chg(fi, SGS_UE_ST_NULL, 0, 0); - /* Note: This is only relevent for cases where we are in the middle + /* Note: This is only relevant for cases where we are in the middle * of an TMSI reallocation procedure. Should a failure of some sort * put us to NULL state, we have to free the pending TMSI */ vsub->tmsi_new = GSM_RESERVED_TMSI; @@ -156,7 +156,7 @@ /* Check if we expect a TMSI REALLOCATION COMPLETE message from the MME * by checking the tmsi_new flag. If this flag is not GSM_RESERVED_TMSI * we know that we have a TMSI pending and need to wait for the MME - * to acknowlege first */ + * to acknowledge first */ if (vsub->tmsi_new != GSM_RESERVED_TMSI) { osmo_fsm_inst_state_chg(fi, SGS_UE_ST_ASSOCIATED, vsub->sgs.cfg.timer[SGS_STATE_TS6_2], SGS_STATE_TS6_2); @@ -355,7 +355,7 @@ .event_names = sgs_ue_fsm_event_names, }; -/*! Initalize/Register SGs FSM in osmo-fsm subsystem */ +/*! Initialize/Register SGs FSM in osmo-fsm subsystem */ void vlr_sgs_fsm_init(void) { if (osmo_fsm_find_by_name(sgs_ue_fsm.name) != &sgs_ue_fsm) diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c index 155afbe..9026241 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c @@ -1267,7 +1267,7 @@ } /* During CM Service Request or Paging Response we already have Classmark 2 that indicates A5/3 - * availablity. Here, in a hacky way remove the knowledge of Classmark 2 to tickle a code path where + * availability. Here, in a hacky way remove the knowledge of Classmark 2 to tickle a code path where * proc_arq_fsm needs a Classmark Update during Ciphering. Shouldn't happen in reality though. */ static void test_cm_service_needs_classmark_update() { diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index e3949e9..96a5303 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -2995,7 +2995,7 @@ lu_result_sent == 0 - BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3 DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: RAN decode: CLASSMARK_UPDATE -DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities recived from Classmark Update: no-cm1 no-cm2 no-cm3 +DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities received from Classmark Update: no-cm1 no-cm2 no-cm3 DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: Received Event MSC_A_EV_CLASSMARK_UPDATE DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: state_chg to MSC_A_ST_AUTH_CIPH DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN encode: CIPHER_MODE_COMMAND on GERAN-A @@ -3639,7 +3639,7 @@ lu_result_sent == 0 - BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3 DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: RAN decode: CLASSMARK_UPDATE -DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities recived from Classmark Update: no-cm1 no-cm2 no-cm3 +DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities received from Classmark Update: no-cm1 no-cm2 no-cm3 DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: Received Event MSC_A_EV_CLASSMARK_UPDATE DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: state_chg to MSC_A_ST_AUTH_CIPH DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN encode: CIPHER_MODE_COMMAND on GERAN-A @@ -3990,7 +3990,7 @@ DREF msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: - rx_from_ms: now used by 1 (paging-response) - BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3 DBSSAP msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: RAN decode: CLASSMARK_UPDATE -DBSSAP msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities recived from Classmark Update: no-cm1 no-cm2 no-cm3 +DBSSAP msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities received from Classmark Update: no-cm1 no-cm2 no-cm3 DMSC msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: Received Event MSC_A_EV_CLASSMARK_UPDATE DMSC msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: state_chg to MSC_A_ST_AUTH_CIPH DMSC msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_AUTH_CIPH}: RAN encode: CIPHER_MODE_COMMAND on GERAN-A -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad Gerrit-Change-Number: 16074 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 16:54:37 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 16:54:37 +0000 Subject: Change in osmo-msc[master]: Fix some typos In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16074 ) Change subject: Fix some typos ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/16074/1/src/libmsc/ran_peer.c File src/libmsc/ran_peer.c: https://gerrit.osmocom.org/c/osmo-msc/+/16074/1/src/libmsc/ran_peer.c at 653 PS1, Line 653: LOG_SCCP_RAN_CAT(sri, DPAG, LOGL_ERROR, "Asked to page on NO_CELL, witch doesn't make sense.\n"); which -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad Gerrit-Change-Number: 16074 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-CC: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 16:54:37 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 17:00:09 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 14 Nov 2019 17:00:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15969 ) Change subject: bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15969 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I62c468b27d05fbff4a98ea24981188689f5899d3 Gerrit-Change-Number: 15969 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 17:00:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 17:23:50 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 17:23:50 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: avoid division by zero when calculating BER In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16067 ) Change subject: scheduler_trx.c: avoid division by zero when calculating BER ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16067/1/src/osmo-bts-trx/scheduler_trx.c File src/osmo-bts-trx/scheduler_trx.c: https://gerrit.osmocom.org/c/osmo-bts/+/16067/1/src/osmo-bts-trx/scheduler_trx.c at 1217 PS1, Line 1217: ber = 1; > If no bits were receivied, is that a expected scenario? or means nothing was received? In that case [?] Hmm I see now that similar stuff is done in some other place: """ int l1if_process_meas_res(struct gsm_bts_trx *trx, uint8_t tn, uint32_t fn, uint8_t chan_nr, int n_errors, int n_bits_total, float rssi, int16_t toa256) { struct gsm_lchan *lchan = &trx->ts[tn].lchan[l1sap_chan2ss(chan_nr)]; struct osmo_phsap_prim l1sap; /* 100% BER is n_bits_total is 0 */ float ber = n_bits_total==0 ? 1.0 : (float)n_errors / (float)n_bits_total; """ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Gerrit-Change-Number: 16067 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 17:23:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 17:40:21 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 17:40:21 +0000 Subject: Change in docker-playground[master]: Drop default vty cmd 'ms-power-control dsp' References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/16075 ) Change subject: Drop default vty cmd 'ms-power-control dsp' ...................................................................... Drop default vty cmd 'ms-power-control dsp' That's the default value for all BTS, so no need to have it there. Furthermore, forthcoming osmo-bts patches will drop osmo-bts-trx support for DSP/HW based MS Power control, which means BTS will reject this setting. Let's drop it now and let osmo-bts binary to select the preferred one. Related: OS#1851 Change-Id: I0f69880a5028002a53736653735c11ae3cd53f07 --- M osmo-bts-latest/osmo-bts.cfg M osmo-bts-master/osmo-bts.cfg M ttcn3-bts-test/osmo-bts.cfg 3 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/75/16075/1 diff --git a/osmo-bts-latest/osmo-bts.cfg b/osmo-bts-latest/osmo-bts.cfg index 446a1b7..7ed1743 100644 --- a/osmo-bts-latest/osmo-bts.cfg +++ b/osmo-bts-latest/osmo-bts.cfg @@ -71,5 +71,4 @@ power-ramp max-initial 23000 mdBm power-ramp step-size 2000 mdB power-ramp step-interval 1 - ms-power-control dsp phy 0 instance 0 diff --git a/osmo-bts-master/osmo-bts.cfg b/osmo-bts-master/osmo-bts.cfg index 446a1b7..7ed1743 100644 --- a/osmo-bts-master/osmo-bts.cfg +++ b/osmo-bts-master/osmo-bts.cfg @@ -71,5 +71,4 @@ power-ramp max-initial 23000 mdBm power-ramp step-size 2000 mdB power-ramp step-interval 1 - ms-power-control dsp phy 0 instance 0 diff --git a/ttcn3-bts-test/osmo-bts.cfg b/ttcn3-bts-test/osmo-bts.cfg index b8ad8ee..1c97528 100644 --- a/ttcn3-bts-test/osmo-bts.cfg +++ b/ttcn3-bts-test/osmo-bts.cfg @@ -83,7 +83,6 @@ power-ramp max-initial 0 mdBm power-ramp step-size 2000 mdB power-ramp step-interval 1 - ms-power-control dsp phy 0 instance 0 ctrl bind 0.0.0.0 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16075 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0f69880a5028002a53736653735c11ae3cd53f07 Gerrit-Change-Number: 16075 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 18:03:03 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 18:03:03 +0000 Subject: Change in osmo-bts[master]: bts-trx: Drop low layer MS Power Control Loop algo In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16072 ) Change subject: bts-trx: Drop low layer MS Power Control Loop algo ...................................................................... Patch Set 1: Code-Review-1 Don't merge this one yet since power_ctrl.c current implementation still have some issues, so let's keep using bts-trx own one for now. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0d8b0c981d9ead91d93999df6e45fb06e426aeb9 Gerrit-Change-Number: 16072 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 14 Nov 2019 18:03:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 18:05:35 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 18:05:35 +0000 Subject: Change in osmo-bts[master]: Apply latests improvements from loops.c to power_control.c In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16070 ) Change subject: Apply latests improvements from loops.c to power_control.c ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16070/1/src/common/power_control.c File src/common/power_control.c: https://gerrit.osmocom.org/c/osmo-bts/+/16070/1/src/common/power_control.c at 56 PS1, Line 56: if (lchan->ms_power_ctrl.current != ms_power) This line, as the TODO indicates, its breaking ms power loop for phones not supporting al ms power levels. For instance, I announce MS Power level 31 at first, and I have a phone only supporting up to level 0 (the one immediatelly below in signal strength), so power loop never continues to reach an expected power level 15 (0dbm). However, In here I'm simply applying other fixes from loops.c, so it can be merged anyway and this issue will be fixed later. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I579967cc8bb69dc76a315c6c9d3a351f5961d92f Gerrit-Change-Number: 16070 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 18:05:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 18:36:14 2019 From: gerrit-no-reply at lists.osmocom.org (roox) Date: Thu, 14 Nov 2019 18:36:14 +0000 Subject: Change in osmo-msc[master]: Fix some typos In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/16074 to look at the new patch set (#2). Change subject: Fix some typos ...................................................................... Fix some typos Fix typos and common misspellings in code comments and log messages. Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad --- M doc/manuals/chapters/counters_generated.adoc M doc/manuals/chapters/running.adoc M doc/sequence_charts/msc_log_to_ladder.py M include/osmocom/msc/gsm_data.h M include/osmocom/msc/mncc.h M include/osmocom/msc/msc_roles.h M include/osmocom/msc/sgs_server.h M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_09_11.c M src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c M src/libmsc/msc_a.c M src/libmsc/msc_vty.c M src/libmsc/ran_msg_a.c M src/libmsc/ran_peer.c M src/libmsc/sgs_iface.c M src/libmsc/smpp_openbsc.c M src/libmsc/sms_queue.c M src/libvlr/vlr.c M src/libvlr/vlr_auth_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err 27 files changed, 51 insertions(+), 51 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/16074/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad Gerrit-Change-Number: 16074 Gerrit-PatchSet: 2 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 18:54:12 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Thu, 14 Nov 2019 18:54:12 +0000 Subject: Change in simtrace2[master]: initialize VCC, RST, and VCC with actual values References: Message-ID: tsaitgaist has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16076 ) Change subject: initialize VCC, RST, and VCC with actual values ...................................................................... initialize VCC, RST, and VCC with actual values previously the card RST, VCC, and CLK signal states have been initialized with default values corresponding to an inactive reader. this worked fine for actual inactive readers since the default values match and would be updated when the signal changes (edge detection). but if the reader is in another state, card activation detection could fail. this is fixed since the actual signal values are now used during initialisation. at the same time I changed the variable type from uint8_t to boolean since they have only two possible states, and understanding the actual state when coding is simpler (no need to check which integer corresponds to which state). this change has been successfully tested on the 2 slots of OWHW board. Change-Id: Ie9245d75d48ae93d16f97897d4fa5ad6cd402e73 --- M firmware/libcommon/include/card_emu.h M firmware/libcommon/source/card_emu.c M firmware/libcommon/source/mode_cardemu.c M firmware/test/card_emu_tests.c 4 files changed, 27 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/76/16076/1 diff --git a/firmware/libcommon/include/card_emu.h b/firmware/libcommon/include/card_emu.h index a3c1cf2..e545593 100644 --- a/firmware/libcommon/include/card_emu.h +++ b/firmware/libcommon/include/card_emu.h @@ -29,8 +29,18 @@ CARD_IO_CLK, }; -struct card_handle *card_emu_init(uint8_t slot_num, uint8_t tc_chan, uint8_t uart_chan, - uint8_t in_ep, uint8_t irq_ep); +/** initialise card slot + * @param[in] slot_num slot number (arbitrary number) + * @param[in] tc_chan timer counter channel (to measure the ETU) + * @param[in] uart_chan UART peripheral channel + * @param[in] in_ep USB IN end point number + * @param[in] irq_ep USB INTerrupt end point number + * @param[in] vcc_active initial VCC signal state (true = on) + * @param[in] in_reset initial RST signal state (true = reset asserted) + * @param[in] clocked initial CLK signat state (true = active) + * @return main card handle reference + */ +struct card_handle *card_emu_init(uint8_t slot_num, uint8_t tc_chan, uint8_t uart_chan, uint8_t in_ep, uint8_t irq_ep, bool vcc_active, bool in_reset, bool clocked); /* process a single byte received from the reader */ void card_emu_process_rx_byte(struct card_handle *ch, uint8_t byte); diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index b7d0e1f..087867f 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -182,9 +182,9 @@ enum iso7816_3_card_state state; /* signal levels */ - uint8_t vcc_active; /* 1 = on, 0 = off */ - uint8_t in_reset; /* 1 = RST low, 0 = RST high */ - uint8_t clocked; /* 1 = active, 0 = inactive */ + bool vcc_active; /*< if VCC is active (true = active/ON) */ + bool in_reset; /*< if card is in reset (true = RST low/asserted, false = RST high/ released) */ + bool clocked; /*< if clock is active ( true = active, false = inactive) */ /* timing parameters, from PTS */ uint8_t fi; @@ -1126,8 +1126,7 @@ static struct card_handle card_handles[NUM_SLOTS]; -struct card_handle *card_emu_init(uint8_t slot_num, uint8_t tc_chan, uint8_t uart_chan, - uint8_t in_ep, uint8_t irq_ep) +struct card_handle *card_emu_init(uint8_t slot_num, uint8_t tc_chan, uint8_t uart_chan, uint8_t in_ep, uint8_t irq_ep, bool vcc_active, bool in_reset, bool clocked) { struct card_handle *ch; @@ -1140,14 +1139,13 @@ INIT_LLIST_HEAD(&ch->uart_tx_queue); - /* initialize the card_handle with reasonable defaults */ ch->num = slot_num; ch->irq_ep = irq_ep; ch->in_ep = in_ep; ch->state = ISO_S_WAIT_POWER; - ch->vcc_active = 0; - ch->in_reset = 1; - ch->clocked = 0; + ch->vcc_active = vcc_active; + ch->in_reset = in_reset; + ch->clocked = clocked; ch->fi = 0; ch->di = 1; diff --git a/firmware/libcommon/source/mode_cardemu.c b/firmware/libcommon/source/mode_cardemu.c index 98818e1..2d1a687 100644 --- a/firmware/libcommon/source/mode_cardemu.c +++ b/firmware/libcommon/source/mode_cardemu.c @@ -44,7 +44,7 @@ static const Pin pin_usim1_vcc = PIN_USIM1_VCC; #ifdef CARDEMU_SECOND_UART -static const Pin pins_usim2[] = {PINS_USIM2}; +static const Pin pins_usim2[] = {PINS_USIM2}; static const Pin pin_usim2_rst = PIN_USIM2_nRST; static const Pin pin_usim2_vcc = PIN_USIM2_VCC; #endif @@ -357,14 +357,14 @@ static void usim1_rst_irqhandler(const Pin *pPin) { - int active = PIO_Get(&pin_usim1_rst) ? 0 : 1; + bool active = PIO_Get(&pin_usim1_rst) ? false : true; card_emu_io_statechg(cardem_inst[0].ch, CARD_IO_RST, active); } #ifndef DETECT_VCC_BY_ADC static void usim1_vcc_irqhandler(const Pin *pPin) { - int active = PIO_Get(&pin_usim1_vcc) ? 1 : 0; + bool active = PIO_Get(&pin_usim1_vcc) ? true : false; card_emu_io_statechg(cardem_inst[0].ch, CARD_IO_VCC, active); /* FIXME do this for real */ card_emu_io_statechg(cardem_inst[0].ch, CARD_IO_CLK, active); @@ -374,14 +374,14 @@ #ifdef CARDEMU_SECOND_UART static void usim2_rst_irqhandler(const Pin *pPin) { - int active = PIO_Get(&pin_usim2_rst) ? 0 : 1; + bool active = PIO_Get(&pin_usim2_rst) ? false : true; card_emu_io_statechg(cardem_inst[1].ch, CARD_IO_RST, active); } #ifndef DETECT_VCC_BY_ADC static void usim2_vcc_irqhandler(const Pin *pPin) { - int active = PIO_Get(&pin_usim2_vcc) ? 1 : 0; + bool active = PIO_Get(&pin_usim2_vcc) ? true : false; card_emu_io_statechg(cardem_inst[1].ch, CARD_IO_VCC, active); /* FIXME do this for real */ card_emu_io_statechg(cardem_inst[1].ch, CARD_IO_CLK, active); @@ -420,7 +420,7 @@ PIO_ConfigureIt(&pin_usim1_vcc, usim1_vcc_irqhandler); PIO_EnableIt(&pin_usim1_vcc); #endif /* DETECT_VCC_BY_ADC */ - cardem_inst[0].ch = card_emu_init(0, 2, 0, SIMTRACE_CARDEM_USB_EP_USIM1_DATAIN, SIMTRACE_CARDEM_USB_EP_USIM1_INT); + cardem_inst[0].ch = card_emu_init(0, 2, 0, SIMTRACE_CARDEM_USB_EP_USIM1_DATAIN, SIMTRACE_CARDEM_USB_EP_USIM1_INT, PIO_Get(&pin_usim1_vcc) ? true : false, PIO_Get(&pin_usim1_rst) ? false : true, PIO_Get(&pin_usim1_vcc) ? true : false); sim_switch_use_physical(0, 1); #ifdef CARDEMU_SECOND_UART @@ -435,10 +435,9 @@ PIO_ConfigureIt(&pin_usim2_vcc, usim2_vcc_irqhandler); PIO_EnableIt(&pin_usim2_vcc); #endif /* DETECT_VCC_BY_ADC */ - cardem_inst[1].ch = card_emu_init(1, 0, 1, SIMTRACE_CARDEM_USB_EP_USIM2_DATAIN, SIMTRACE_CARDEM_USB_EP_USIM2_INT); + cardem_inst[1].ch = card_emu_init(1, 0, 1, SIMTRACE_CARDEM_USB_EP_USIM2_DATAIN, SIMTRACE_CARDEM_USB_EP_USIM2_INT, PIO_Get(&pin_usim2_vcc) ? true : false, PIO_Get(&pin_usim2_rst) ? false : true, PIO_Get(&pin_usim2_vcc) ? true : false); sim_switch_use_physical(1, 1); #endif /* CARDEMU_SECOND_UART */ - } /* called if config is deactivated */ diff --git a/firmware/test/card_emu_tests.c b/firmware/test/card_emu_tests.c index 09b2e0d..fe1739b 100644 --- a/firmware/test/card_emu_tests.c +++ b/firmware/test/card_emu_tests.c @@ -397,7 +397,7 @@ struct card_handle *ch; unsigned int i; - ch = card_emu_init(0, 23, 42, PHONE_DATAIN, PHONE_INT); + ch = card_emu_init(0, 23, 42, PHONE_DATAIN, PHONE_INT, false, true, false); assert(ch); usb_buf_init(); -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16076 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie9245d75d48ae93d16f97897d4fa5ad6cd402e73 Gerrit-Change-Number: 16076 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 19:04:12 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 19:04:12 +0000 Subject: Change in osmo-bts[master]: power_control.c: Apply latests improvements from loops.c In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/16070 to look at the new patch set (#2). Change subject: power_control.c: Apply latests improvements from loops.c ...................................................................... power_control.c: Apply latests improvements from loops.c Several improvements have been made lately to MS Power Control loop from osmo-bts-trx in loops.c. Let's port these to the common algorithm. Related: OS#1851 Change-Id: I579967cc8bb69dc76a315c6c9d3a351f5961d92f --- M src/common/power_control.c M tests/power/power_test.c 2 files changed, 73 insertions(+), 43 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/16070/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I579967cc8bb69dc76a315c6c9d3a351f5961d92f Gerrit-Change-Number: 16070 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 19:04:12 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 19:04:12 +0000 Subject: Change in osmo-bts[master]: power_control.c: Log rx current and target signal levels In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/16073 to look at the new patch set (#2). Change subject: power_control.c: Log rx current and target signal levels ...................................................................... power_control.c: Log rx current and target signal levels Change-Id: I31ce7930a1daa20a2ff81f31a37df94298c877d6 --- M src/common/power_control.c 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/16073/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16073 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I31ce7930a1daa20a2ff81f31a37df94298c877d6 Gerrit-Change-Number: 16073 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 19:04:15 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 19:04:15 +0000 Subject: Change in osmo-bts[master]: power_control.c: Fix ms pwr ctrl skipped if MS doesn't support announ... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16077 ) Change subject: power_control.c: Fix ms pwr ctrl skipped if MS doesn't support announced MS Power Level ...................................................................... power_control.c: Fix ms pwr ctrl skipped if MS doesn't support announced MS Power Level Related: OS#1851 Change-Id: I1a9c00fe4eb3fa1eaa7997a9ec20716ddfe180a7 --- M include/osmo-bts/gsm_data_shared.h M src/common/l1sap.c M src/common/power_control.c 3 files changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/77/16077/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 8a52fe9..bd10056 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -322,6 +322,7 @@ uint8_t current; uint8_t max; bool fixed; + int8_t last_received; /* last received MS Power in uplink L1 SACCH, -1 means not set */ } ms_power_ctrl; /* Power levels for BTS */ uint8_t bs_power; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 7bf0b09..4937d1e 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1647,6 +1647,7 @@ lchan->sacch_deact = 0; lchan->s = lchan->ts->trx->bts->radio_link_timeout; + lchan->ms_power_ctrl.last_received = -1; /* mark no ms power received yet */ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) diff --git a/src/common/power_control.c b/src/common/power_control.c index 574825e..129334e 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -53,8 +53,19 @@ /* The phone hasn't reached the power level yet. TODO: store .last and check if MS is trying to move towards current. */ - if (lchan->ms_power_ctrl.current != ms_power) - return 0; + if (lchan->ms_power_ctrl.current != ms_power) { + if (lchan->ms_power_ctrl.last_received == -1 || + lchan->ms_power_ctrl.last_received != ms_power) { + /* MS Power still changing, keep current power level */ + lchan->ms_power_ctrl.last_received = ms_power; + return 0; + } + /* else: we are stuck with some received MS Power level + different than the one we announce, probably because the MS + doesn't support that exact one so it picked the nearest one + */ + lchan->ms_power_ctrl.last_received = ms_power; + } /* How many dBs measured power should be increased (+) or decreased (-) to reach expected power. */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16077 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1a9c00fe4eb3fa1eaa7997a9ec20716ddfe180a7 Gerrit-Change-Number: 16077 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 19:13:37 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Thu, 14 Nov 2019 19:13:37 +0000 Subject: Change in simtrace2[master]: check RST/VCC/CLK line at every step of the activation References: Message-ID: tsaitgaist has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16078 ) Change subject: check RST/VCC/CLK line at every step of the activation ...................................................................... check RST/VCC/CLK line at every step of the activation ISO-7816 specifies a card activation sequence: VCC on, CLK active, then RST release. we now check for the end state at every state of the activation in case the reader does not strictly follows the sequence. change has been tested on OWHW slot 1. Change-Id: Ie55505ab3a70cbd64281af40af53d5e120313228 --- M firmware/libcommon/source/card_emu.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/78/16078/1 diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index 087867f..5298ffc 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -380,6 +380,13 @@ case ISO_S_WAIT_RST: /* disable Rx and Tx of UART */ card_emu_uart_enable(ch->uart_chan, 0); + /* check end activation state (only necessary if the reader to not respect the activation sequence) */ + if (ch->vcc_active && ch->clocked && !ch->in_reset) { + /* enable the TC/ETU counter once reset has been released */ + tc_etu_enable(ch->tc_chan); + /* prepare to send the ATR */ + card_set_state(ch, ISO_S_WAIT_ATR); + } break; case ISO_S_WAIT_ATR: /* Reset to initial Fi / Di ratio */ -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie55505ab3a70cbd64281af40af53d5e120313228 Gerrit-Change-Number: 16078 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:06:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:06:22 +0000 Subject: Change in libosmo-abis[master]: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/15996 ) Change subject: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/15996 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id6c8f27d7ae948b50e9cf5a38f039d782ff78e1d Gerrit-Change-Number: 15996 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 22:06:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:06:23 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:06:23 +0000 Subject: Change in libosmo-abis[master]: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/15996 ) Change subject: dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u ...................................................................... dahdi: Use ioctl(DAHDI_SPECIFY) instead of legacy /dev/dahdi/%u It appears that opening "/dev/dahdi/channel" and using ioctl(DAHDI_SPECIFY) is possible at least since dahdi 2.4 (from 2010), and opening "/dev/dahdi/%u" has been deprecated ever since. One advantage of the new interface is that you can use channel numbers larger than 250, which is quite easily possible if you have more than eight E1 lines on a system. It also makes libosmo-abis work on systems where there are no udev rules for creating the legacy device nodes. Change-Id: Id6c8f27d7ae948b50e9cf5a38f039d782ff78e1d --- M src/input/dahdi.c 1 file changed, 35 insertions(+), 26 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/input/dahdi.c b/src/input/dahdi.c index 47276a7..6594eea 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -1,6 +1,6 @@ /* OpenBSC Abis input driver for DAHDI */ -/* (C) 2008-2011 by Harald Welte +/* (C) 2008-2019 by Harald Welte * (C) 2009 by Holger Hans Peter Freyther * (C) 2010 by Digium and Matthew Fredrickson * @@ -603,6 +603,33 @@ return 0; } +static int dahdi_open_slot(int dahdi_chan_nr) +{ + int rc, fd; +#ifndef DAHDI_SPECIFY + char openstr[128]; + snprintf(openstr, sizeof(openstr), "/dev/dahdi/%d", dev_nr); +#else + const char *openstr = "/dev/dahdi/channel"; +#endif + rc = open(openstr, O_RDWR | O_NONBLOCK); + if (rc < 0) { + LOGP(DLINP, LOGL_ERROR, "DAHDI: could not open %s %s\n", openstr, strerror(errno)); + return -EIO; + } + fd = rc; +#ifdef DAHDI_SPECIFY + rc = ioctl(fd, DAHDI_SPECIFY, &dahdi_chan_nr); + if (rc < 0) { + close(fd); + LOGP(DLINP, LOGL_ERROR, "DAHDI: could not DAHDI_SPECIFY %d: %s\n", + dahdi_chan_nr, strerror(errno)); + return -EIO; + } +#endif + return fd; +} + static int dahdi_e1_setup(struct e1inp_line *line) { struct span_cfg *scfg; @@ -623,7 +650,6 @@ /* TS0 is CRC4, don't need any fd for it */ for (ts = 1; ts <= scfg->chan_num; ts++) { unsigned int idx = ts-1; - char openstr[128]; struct e1inp_ts *e1i_ts = &line->ts[idx]; struct osmo_fd *bfd = &e1i_ts->driver.dahdi.fd; int dev_nr; @@ -640,7 +666,6 @@ bfd->data = line; bfd->priv_nr = ts; bfd->cb = dahdi_fd_cb; - snprintf(openstr, sizeof(openstr), "/dev/dahdi/%d", dev_nr); switch (e1i_ts->type) { case E1INP_TS_TYPE_NONE: @@ -657,13 +682,9 @@ break; case E1INP_TS_TYPE_SIGN: if (!bfd->fd) - bfd->fd = open(openstr, O_RDWR | O_NONBLOCK); - if (bfd->fd == -1) { - LOGP(DLINP, LOGL_ERROR, - "%s could not open %s %s\n", - __func__, openstr, strerror(errno)); + bfd->fd = dahdi_open_slot(dev_nr); + if (bfd->fd < 0) return -EIO; - } bfd->when = BSC_FD_READ | BSC_FD_EXCEPT; ret = dahdi_set_bufinfo(bfd->fd, 1); if (ret < 0) @@ -676,13 +697,9 @@ break; case E1INP_TS_TYPE_HDLC: if (!bfd->fd) - bfd->fd = open(openstr, O_RDWR | O_NONBLOCK); - if (bfd->fd == -1) { - LOGP(DLINP, LOGL_ERROR, - "%s could not open %s %s\n", - __func__, openstr, strerror(errno)); + bfd->fd = dahdi_open_slot(dev_nr); + if (bfd->fd < 0) return -EIO; - } bfd->when = BSC_FD_READ | BSC_FD_EXCEPT; ret = dahdi_set_bufinfo(bfd->fd, 1); if (ret < 0) @@ -696,13 +713,9 @@ e1i_ts->lapd = NULL; } if (!bfd->fd) - bfd->fd = open(openstr, O_RDWR | O_NONBLOCK); - if (bfd->fd == -1) { - LOGP(DLINP, LOGL_ERROR, - "%s could not open %s %s\n", - __func__, openstr, strerror(errno)); + bfd->fd = dahdi_open_slot(dev_nr); + if (bfd->fd < 0) return -EIO; - } ret = dahdi_set_bufinfo(bfd->fd, 0); if (ret < 0) return -EIO; @@ -713,12 +726,8 @@ break; } - if (bfd->fd < 0) { - LOGP(DLINP, LOGL_ERROR, - "%s could not open %s %s\n", - __func__, openstr, strerror(errno)); + if (bfd->fd < 0) return bfd->fd; - } ret = osmo_fd_register(bfd); if (ret < 0) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/15996 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id6c8f27d7ae948b50e9cf5a38f039d782ff78e1d Gerrit-Change-Number: 15996 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:14:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:14:25 +0000 Subject: Change in simtrace2[master]: initialize VCC, RST, and VCC with actual values In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16076 ) Change subject: initialize VCC, RST, and VCC with actual values ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16076 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie9245d75d48ae93d16f97897d4fa5ad6cd402e73 Gerrit-Change-Number: 16076 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 22:14:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:14:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:14:31 +0000 Subject: Change in simtrace2[master]: initialize VCC, RST, and VCC with actual values In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16076 ) Change subject: initialize VCC, RST, and VCC with actual values ...................................................................... initialize VCC, RST, and VCC with actual values previously the card RST, VCC, and CLK signal states have been initialized with default values corresponding to an inactive reader. this worked fine for actual inactive readers since the default values match and would be updated when the signal changes (edge detection). but if the reader is in another state, card activation detection could fail. this is fixed since the actual signal values are now used during initialisation. at the same time I changed the variable type from uint8_t to boolean since they have only two possible states, and understanding the actual state when coding is simpler (no need to check which integer corresponds to which state). this change has been successfully tested on the 2 slots of OWHW board. Change-Id: Ie9245d75d48ae93d16f97897d4fa5ad6cd402e73 --- M firmware/libcommon/include/card_emu.h M firmware/libcommon/source/card_emu.c M firmware/libcommon/source/mode_cardemu.c M firmware/test/card_emu_tests.c 4 files changed, 27 insertions(+), 20 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/firmware/libcommon/include/card_emu.h b/firmware/libcommon/include/card_emu.h index a3c1cf2..e545593 100644 --- a/firmware/libcommon/include/card_emu.h +++ b/firmware/libcommon/include/card_emu.h @@ -29,8 +29,18 @@ CARD_IO_CLK, }; -struct card_handle *card_emu_init(uint8_t slot_num, uint8_t tc_chan, uint8_t uart_chan, - uint8_t in_ep, uint8_t irq_ep); +/** initialise card slot + * @param[in] slot_num slot number (arbitrary number) + * @param[in] tc_chan timer counter channel (to measure the ETU) + * @param[in] uart_chan UART peripheral channel + * @param[in] in_ep USB IN end point number + * @param[in] irq_ep USB INTerrupt end point number + * @param[in] vcc_active initial VCC signal state (true = on) + * @param[in] in_reset initial RST signal state (true = reset asserted) + * @param[in] clocked initial CLK signat state (true = active) + * @return main card handle reference + */ +struct card_handle *card_emu_init(uint8_t slot_num, uint8_t tc_chan, uint8_t uart_chan, uint8_t in_ep, uint8_t irq_ep, bool vcc_active, bool in_reset, bool clocked); /* process a single byte received from the reader */ void card_emu_process_rx_byte(struct card_handle *ch, uint8_t byte); diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index b7d0e1f..087867f 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -182,9 +182,9 @@ enum iso7816_3_card_state state; /* signal levels */ - uint8_t vcc_active; /* 1 = on, 0 = off */ - uint8_t in_reset; /* 1 = RST low, 0 = RST high */ - uint8_t clocked; /* 1 = active, 0 = inactive */ + bool vcc_active; /*< if VCC is active (true = active/ON) */ + bool in_reset; /*< if card is in reset (true = RST low/asserted, false = RST high/ released) */ + bool clocked; /*< if clock is active ( true = active, false = inactive) */ /* timing parameters, from PTS */ uint8_t fi; @@ -1126,8 +1126,7 @@ static struct card_handle card_handles[NUM_SLOTS]; -struct card_handle *card_emu_init(uint8_t slot_num, uint8_t tc_chan, uint8_t uart_chan, - uint8_t in_ep, uint8_t irq_ep) +struct card_handle *card_emu_init(uint8_t slot_num, uint8_t tc_chan, uint8_t uart_chan, uint8_t in_ep, uint8_t irq_ep, bool vcc_active, bool in_reset, bool clocked) { struct card_handle *ch; @@ -1140,14 +1139,13 @@ INIT_LLIST_HEAD(&ch->uart_tx_queue); - /* initialize the card_handle with reasonable defaults */ ch->num = slot_num; ch->irq_ep = irq_ep; ch->in_ep = in_ep; ch->state = ISO_S_WAIT_POWER; - ch->vcc_active = 0; - ch->in_reset = 1; - ch->clocked = 0; + ch->vcc_active = vcc_active; + ch->in_reset = in_reset; + ch->clocked = clocked; ch->fi = 0; ch->di = 1; diff --git a/firmware/libcommon/source/mode_cardemu.c b/firmware/libcommon/source/mode_cardemu.c index 98818e1..2d1a687 100644 --- a/firmware/libcommon/source/mode_cardemu.c +++ b/firmware/libcommon/source/mode_cardemu.c @@ -44,7 +44,7 @@ static const Pin pin_usim1_vcc = PIN_USIM1_VCC; #ifdef CARDEMU_SECOND_UART -static const Pin pins_usim2[] = {PINS_USIM2}; +static const Pin pins_usim2[] = {PINS_USIM2}; static const Pin pin_usim2_rst = PIN_USIM2_nRST; static const Pin pin_usim2_vcc = PIN_USIM2_VCC; #endif @@ -357,14 +357,14 @@ static void usim1_rst_irqhandler(const Pin *pPin) { - int active = PIO_Get(&pin_usim1_rst) ? 0 : 1; + bool active = PIO_Get(&pin_usim1_rst) ? false : true; card_emu_io_statechg(cardem_inst[0].ch, CARD_IO_RST, active); } #ifndef DETECT_VCC_BY_ADC static void usim1_vcc_irqhandler(const Pin *pPin) { - int active = PIO_Get(&pin_usim1_vcc) ? 1 : 0; + bool active = PIO_Get(&pin_usim1_vcc) ? true : false; card_emu_io_statechg(cardem_inst[0].ch, CARD_IO_VCC, active); /* FIXME do this for real */ card_emu_io_statechg(cardem_inst[0].ch, CARD_IO_CLK, active); @@ -374,14 +374,14 @@ #ifdef CARDEMU_SECOND_UART static void usim2_rst_irqhandler(const Pin *pPin) { - int active = PIO_Get(&pin_usim2_rst) ? 0 : 1; + bool active = PIO_Get(&pin_usim2_rst) ? false : true; card_emu_io_statechg(cardem_inst[1].ch, CARD_IO_RST, active); } #ifndef DETECT_VCC_BY_ADC static void usim2_vcc_irqhandler(const Pin *pPin) { - int active = PIO_Get(&pin_usim2_vcc) ? 1 : 0; + bool active = PIO_Get(&pin_usim2_vcc) ? true : false; card_emu_io_statechg(cardem_inst[1].ch, CARD_IO_VCC, active); /* FIXME do this for real */ card_emu_io_statechg(cardem_inst[1].ch, CARD_IO_CLK, active); @@ -420,7 +420,7 @@ PIO_ConfigureIt(&pin_usim1_vcc, usim1_vcc_irqhandler); PIO_EnableIt(&pin_usim1_vcc); #endif /* DETECT_VCC_BY_ADC */ - cardem_inst[0].ch = card_emu_init(0, 2, 0, SIMTRACE_CARDEM_USB_EP_USIM1_DATAIN, SIMTRACE_CARDEM_USB_EP_USIM1_INT); + cardem_inst[0].ch = card_emu_init(0, 2, 0, SIMTRACE_CARDEM_USB_EP_USIM1_DATAIN, SIMTRACE_CARDEM_USB_EP_USIM1_INT, PIO_Get(&pin_usim1_vcc) ? true : false, PIO_Get(&pin_usim1_rst) ? false : true, PIO_Get(&pin_usim1_vcc) ? true : false); sim_switch_use_physical(0, 1); #ifdef CARDEMU_SECOND_UART @@ -435,10 +435,9 @@ PIO_ConfigureIt(&pin_usim2_vcc, usim2_vcc_irqhandler); PIO_EnableIt(&pin_usim2_vcc); #endif /* DETECT_VCC_BY_ADC */ - cardem_inst[1].ch = card_emu_init(1, 0, 1, SIMTRACE_CARDEM_USB_EP_USIM2_DATAIN, SIMTRACE_CARDEM_USB_EP_USIM2_INT); + cardem_inst[1].ch = card_emu_init(1, 0, 1, SIMTRACE_CARDEM_USB_EP_USIM2_DATAIN, SIMTRACE_CARDEM_USB_EP_USIM2_INT, PIO_Get(&pin_usim2_vcc) ? true : false, PIO_Get(&pin_usim2_rst) ? false : true, PIO_Get(&pin_usim2_vcc) ? true : false); sim_switch_use_physical(1, 1); #endif /* CARDEMU_SECOND_UART */ - } /* called if config is deactivated */ diff --git a/firmware/test/card_emu_tests.c b/firmware/test/card_emu_tests.c index 09b2e0d..fe1739b 100644 --- a/firmware/test/card_emu_tests.c +++ b/firmware/test/card_emu_tests.c @@ -397,7 +397,7 @@ struct card_handle *ch; unsigned int i; - ch = card_emu_init(0, 23, 42, PHONE_DATAIN, PHONE_INT); + ch = card_emu_init(0, 23, 42, PHONE_DATAIN, PHONE_INT, false, true, false); assert(ch); usb_buf_init(); -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16076 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie9245d75d48ae93d16f97897d4fa5ad6cd402e73 Gerrit-Change-Number: 16076 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:15:18 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:15:18 +0000 Subject: Change in simtrace2[master]: check RST/VCC/CLK line at every step of the activation In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16078 ) Change subject: check RST/VCC/CLK line at every step of the activation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie55505ab3a70cbd64281af40af53d5e120313228 Gerrit-Change-Number: 16078 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 22:15:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:15:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:15:19 +0000 Subject: Change in simtrace2[master]: check RST/VCC/CLK line at every step of the activation In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16078 ) Change subject: check RST/VCC/CLK line at every step of the activation ...................................................................... check RST/VCC/CLK line at every step of the activation ISO-7816 specifies a card activation sequence: VCC on, CLK active, then RST release. we now check for the end state at every state of the activation in case the reader does not strictly follows the sequence. change has been tested on OWHW slot 1. Change-Id: Ie55505ab3a70cbd64281af40af53d5e120313228 --- M firmware/libcommon/source/card_emu.c 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index 087867f..5298ffc 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -380,6 +380,13 @@ case ISO_S_WAIT_RST: /* disable Rx and Tx of UART */ card_emu_uart_enable(ch->uart_chan, 0); + /* check end activation state (only necessary if the reader to not respect the activation sequence) */ + if (ch->vcc_active && ch->clocked && !ch->in_reset) { + /* enable the TC/ETU counter once reset has been released */ + tc_etu_enable(ch->tc_chan); + /* prepare to send the ATR */ + card_set_state(ch, ISO_S_WAIT_ATR); + } break; case ISO_S_WAIT_ATR: /* Reset to initial Fi / Di ratio */ -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie55505ab3a70cbd64281af40af53d5e120313228 Gerrit-Change-Number: 16078 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:15:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:15:51 +0000 Subject: Change in docker-playground[master]: Drop default vty cmd 'ms-power-control dsp' In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16075 ) Change subject: Drop default vty cmd 'ms-power-control dsp' ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16075 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0f69880a5028002a53736653735c11ae3cd53f07 Gerrit-Change-Number: 16075 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 22:15:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:16:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:16:05 +0000 Subject: Change in osmo-bts[master]: cosmetic: Fix trailing whitespace In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16068 ) Change subject: cosmetic: Fix trailing whitespace ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16068 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7b9a091226e3c7dd60b3921ab0d53688f42d1a4d Gerrit-Change-Number: 16068 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 22:16:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:16:36 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:16:36 +0000 Subject: Change in osmo-bts[master]: Change gsm_bts_trx field to bool and rename it In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16059 ) Change subject: Change gsm_bts_trx field to bool and rename it ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic690ab69866a7377f1597e24aa7b0214831c1cbe Gerrit-Change-Number: 16059 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 22:16:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:16:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:16:51 +0000 Subject: Change in osmo-bts[master]: Change gsm_lchan field fixed to bool In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16060 ) Change subject: Change gsm_lchan field fixed to bool ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16060 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I715ef151b67a21e325c574585a257e71b4b0ce2a Gerrit-Change-Number: 16060 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 22:16:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:16:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:16:55 +0000 Subject: Change in osmo-bts[master]: cosmetic: Fix trailing whitespace In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16068 ) Change subject: cosmetic: Fix trailing whitespace ...................................................................... cosmetic: Fix trailing whitespace Change-Id: I7b9a091226e3c7dd60b3921ab0d53688f42d1a4d --- M src/common/gsm_data_shared.c M src/osmo-bts-litecell15/main.c M src/osmo-bts-oc2g/main.c 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c index f0f5ae2..80acabc 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -694,7 +694,7 @@ *rc = -EINVAL; if (cbits == 0x01) { - lch_idx = 0; /* TCH/F */ + lch_idx = 0; /* TCH/F */ if (ts->pchan != GSM_PCHAN_TCH_F && ts->pchan != GSM_PCHAN_PDCH && ts->pchan != GSM_PCHAN_TCH_F_PDCH && diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c index c47d76d..b0d725b 100644 --- a/src/osmo-bts-litecell15/main.c +++ b/src/osmo-bts-litecell15/main.c @@ -2,7 +2,7 @@ /* Copyright (C) 2015 by Yves Godin * Copyright (C) 2016 by Harald Welte - * + * * Based on sysmoBTS: * (C) 2011-2013 by Harald Welte * diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c index abecba1..cbf5c42 100644 --- a/src/osmo-bts-oc2g/main.c +++ b/src/osmo-bts-oc2g/main.c @@ -2,7 +2,7 @@ /* Copyright (C) 2015 by Yves Godin * Copyright (C) 2016 by Harald Welte - * + * * Based on sysmoBTS: * (C) 2011-2013 by Harald Welte * -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16068 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7b9a091226e3c7dd60b3921ab0d53688f42d1a4d Gerrit-Change-Number: 16068 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:16:57 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:16:57 +0000 Subject: Change in osmo-bts[master]: Change gsm_bts_trx field to bool and rename it In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16059 ) Change subject: Change gsm_bts_trx field to bool and rename it ...................................................................... Change gsm_bts_trx field to bool and rename it Thies field is used to store and retrieve whether MS power needs to be calculated and updated by osmo-bts software or autonomously by lower layers. Previous name was not clear and may have been understood as indicating whether MS Power Control loop is done or not in general, and the responsible for that is located under lchan's ms_power_ctrl.fixed. Related: OS#1851 Change-Id: Ic690ab69866a7377f1597e24aa7b0214831c1cbe --- M include/osmo-bts/bts.h M include/osmo-bts/gsm_data_shared.h M src/common/bts.c M src/common/vty.c M tests/power/power_test.c 5 files changed, 7 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index 5c719f9..63412f9 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -49,7 +49,7 @@ uint8_t num_agch(struct gsm_bts_trx *trx, const char * arg); void bts_update_status(enum bts_global_status which, int on); -int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx); +bool trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx); struct gsm_time *get_time(struct gsm_bts *bts); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 1445ed2..8678ea5 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -417,7 +417,7 @@ struct trx_power_params power_params; - int ms_power_control; + bool ms_pwr_ctl_soft; /* is power control loop done by osmocom software? */ struct { void *l1h; diff --git a/src/common/bts.c b/src/common/bts.c index 60e27cc..3809eb3 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -778,9 +778,9 @@ return sup > 0; } -int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx) +bool trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx) { - return trx->ms_power_control == 1; + return trx->ms_pwr_ctl_soft; } struct gsm_time *get_time(struct gsm_bts *bts) diff --git a/src/common/vty.c b/src/common/vty.c index e775d99..fd9be40 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -332,7 +332,7 @@ vty_out(vty, " power-ramp step-interval %d%s", tpp->ramp.step_interval_sec, VTY_NEWLINE); vty_out(vty, " ms-power-control %s%s", - trx->ms_power_control == 0 ? "dsp" : "osmo", + trx->ms_pwr_ctl_soft ? "osmo" : "dsp", VTY_NEWLINE); vty_out(vty, " phy %u instance %u%s", pinst->phy_link->num, pinst->num, VTY_NEWLINE); @@ -790,7 +790,7 @@ { struct gsm_bts_trx *trx = vty->index; - trx->ms_power_control = argv[0][0] == 'd' ? 0 : 1; + trx->ms_pwr_ctl_soft = !strcmp(argv[0], "osmo"); return CMD_SUCCESS; } diff --git a/tests/power/power_test.c b/tests/power/power_test.c index a46a430..8df6d69 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -48,7 +48,7 @@ ts.trx = &trx; trx.bts = &bts; bts.band = GSM_BAND_1800; - trx.ms_power_control = 1; + trx.ms_pwr_ctl_soft = true; bts.ul_power_target = -75; lchan->state = LCHAN_S_NONE; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic690ab69866a7377f1597e24aa7b0214831c1cbe Gerrit-Change-Number: 16059 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:16:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:16:58 +0000 Subject: Change in osmo-bts[master]: Change gsm_lchan field fixed to bool In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16060 ) Change subject: Change gsm_lchan field fixed to bool ...................................................................... Change gsm_lchan field fixed to bool Change-Id: I715ef151b67a21e325c574585a257e71b4b0ce2a --- M include/osmo-bts/gsm_data_shared.h M src/common/rsl.c M tests/power/power_test.c 3 files changed, 11 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 8678ea5..5061310 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -323,7 +323,7 @@ /* power handling */ struct { uint8_t current; - uint8_t fixed; + bool fixed; } ms_power_ctrl; struct msgb *pending_rel_ind_msg; diff --git a/src/common/rsl.c b/src/common/rsl.c index d8ce016..9a4afb3 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -999,7 +999,7 @@ * cleared, or we would enable encryption on PDCH with parameters remaining from the TCH. */ lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); lchan->ms_power_ctrl.current = lchan->ms_power; - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; lchan->rsl_cmode = 0; lchan->tch_mode = 0; memset(&lchan->encr, 0, sizeof(lchan->encr)); @@ -1104,7 +1104,7 @@ /* Initialize channel defaults */ lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); lchan->ms_power_ctrl.current = lchan->ms_power; - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); @@ -1156,7 +1156,7 @@ if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) { lchan->ms_power = *TLVP_VAL(&tp, RSL_IE_MS_POWER); lchan->ms_power_ctrl.current = lchan->ms_power; - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; } /* 9.3.24 Timing Advance */ if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1)) @@ -1165,12 +1165,12 @@ /* 9.3.32 BS Power Parameters */ /* 9.3.31 MS Power Parameters */ if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; else { /* Spec explicitly states BTS should only perform * autonomous MS power control loop in BTS if 'MS Power * Parameters' IE is present! */ - lchan->ms_power_ctrl.fixed = 1; + lchan->ms_power_ctrl.fixed = true; } /* 9.3.16 Physical Context */ @@ -1642,16 +1642,16 @@ /* 9.3.31 MS Power Parameters (O) */ if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM)) - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; else { /* Spec explicitly states BTS should only perform * autonomous MS power control loop in BTS if 'MS Power * Parameters' IE is present! */ - lchan->ms_power_ctrl.fixed = 1; + lchan->ms_power_ctrl.fixed = true; } /* Only set current to lchan->ms_power if actual value of current - in dBm > value in dBm from lchan->ms_power, or if fixed=1. */ + in dBm > value in dBm from lchan->ms_power, or if fixed. */ if (lchan->ms_power_ctrl.fixed) { lchan->ms_power_ctrl.current = lchan->ms_power; } else { diff --git a/tests/power/power_test.c b/tests/power/power_test.c index 8df6d69..dbae8fa 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -68,11 +68,11 @@ apply_power_test(lchan, -100, 1, 0); /* Fix it and jump down */ - lchan->ms_power_ctrl.fixed = 1; + lchan->ms_power_ctrl.fixed = true; apply_power_test(lchan, -60, 0, 0); /* And leave it again */ - lchan->ms_power_ctrl.fixed = 0; + lchan->ms_power_ctrl.fixed = false; apply_power_test(lchan, -40, 1, 15); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16060 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I715ef151b67a21e325c574585a257e71b4b0ce2a Gerrit-Change-Number: 16060 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:17:28 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:17:28 +0000 Subject: Change in osmo-bts[master]: rsl: Remove unneeded duplicate reset on some lchan fields In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16061 ) Change subject: rsl: Remove unneeded duplicate reset on some lchan fields ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia2a5da068d440232361d57bd5ac33eddebf05ebe Gerrit-Change-Number: 16061 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 22:17:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:18:20 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:18:20 +0000 Subject: Change in osmo-bts[master]: Move and rename gsm_lchan.ms_power field In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16062 ) Change subject: Move and rename gsm_lchan.ms_power field ...................................................................... Patch Set 2: Code-Review+1 max would have liked that :) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16062 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib264ec7dac87355cef6415461ed74bd8e9c8ca52 Gerrit-Change-Number: 16062 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 22:18:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:18:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:18:47 +0000 Subject: Change in osmo-bts[master]: bts-trx: loops.c: Avoid always clamping MS power to MS power class 1 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16069 ) Change subject: bts-trx: loops.c: Avoid always clamping MS power to MS power class 1 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I744e7c315b818a1e7d3dd2579cd483c693d89b73 Gerrit-Change-Number: 16069 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 Nov 2019 22:18:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:19:23 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 22:19:23 +0000 Subject: Change in docker-playground[master]: Drop default vty cmd 'ms-power-control dsp' In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16075 ) Change subject: Drop default vty cmd 'ms-power-control dsp' ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16075 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0f69880a5028002a53736653735c11ae3cd53f07 Gerrit-Change-Number: 16075 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 Nov 2019 22:19:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:19:26 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 14 Nov 2019 22:19:26 +0000 Subject: Change in docker-playground[master]: Drop default vty cmd 'ms-power-control dsp' In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16075 ) Change subject: Drop default vty cmd 'ms-power-control dsp' ...................................................................... Drop default vty cmd 'ms-power-control dsp' That's the default value for all BTS, so no need to have it there. Furthermore, forthcoming osmo-bts patches will drop osmo-bts-trx support for DSP/HW based MS Power control, which means BTS will reject this setting. Let's drop it now and let osmo-bts binary to select the preferred one. Related: OS#1851 Change-Id: I0f69880a5028002a53736653735c11ae3cd53f07 --- M osmo-bts-latest/osmo-bts.cfg M osmo-bts-master/osmo-bts.cfg M ttcn3-bts-test/osmo-bts.cfg 3 files changed, 0 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/osmo-bts-latest/osmo-bts.cfg b/osmo-bts-latest/osmo-bts.cfg index 446a1b7..7ed1743 100644 --- a/osmo-bts-latest/osmo-bts.cfg +++ b/osmo-bts-latest/osmo-bts.cfg @@ -71,5 +71,4 @@ power-ramp max-initial 23000 mdBm power-ramp step-size 2000 mdB power-ramp step-interval 1 - ms-power-control dsp phy 0 instance 0 diff --git a/osmo-bts-master/osmo-bts.cfg b/osmo-bts-master/osmo-bts.cfg index 446a1b7..7ed1743 100644 --- a/osmo-bts-master/osmo-bts.cfg +++ b/osmo-bts-master/osmo-bts.cfg @@ -71,5 +71,4 @@ power-ramp max-initial 23000 mdBm power-ramp step-size 2000 mdB power-ramp step-interval 1 - ms-power-control dsp phy 0 instance 0 diff --git a/ttcn3-bts-test/osmo-bts.cfg b/ttcn3-bts-test/osmo-bts.cfg index b8ad8ee..1c97528 100644 --- a/ttcn3-bts-test/osmo-bts.cfg +++ b/ttcn3-bts-test/osmo-bts.cfg @@ -83,7 +83,6 @@ power-ramp max-initial 0 mdBm power-ramp step-size 2000 mdB power-ramp step-interval 1 - ms-power-control dsp phy 0 instance 0 ctrl bind 0.0.0.0 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16075 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0f69880a5028002a53736653735c11ae3cd53f07 Gerrit-Change-Number: 16075 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 14 22:31:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 14 Nov 2019 22:31:41 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 ) Change subject: osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd ...................................................................... osmo_ss7_vty.c: implement 'active' filter for show_cs7_as_cmd Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c M src/osmo_ss7_vty.c M src/xua_as_fsm.c M src/xua_as_fsm.h M tests/vty/ss7_asp_test.vty 6 files changed, 20 insertions(+), 9 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index d0aa9a1..6778409 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -346,6 +346,7 @@ void osmo_ss7_as_destroy(struct osmo_ss7_as *as); bool osmo_ss7_as_has_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp); +bool osmo_ss7_as_active(const struct osmo_ss7_as *as); bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt); void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp); diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 0d49d1a..d74f8f9 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1068,6 +1068,16 @@ return false; } +/*! Determine if given AS is in the active state. + * \param[in] as Application Server. + * \returns true in case as is active; false otherwise. */ +bool osmo_ss7_as_active(const struct osmo_ss7_as *as) +{ + if (!as->fi) + return false; + return as->fi->state == XUA_AS_S_ACTIVE; +} + /*********************************************************************** * SS7 Application Server Process ***********************************************************************/ diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 1a246db..84f616a 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1096,7 +1096,8 @@ continue; if (filter && !strcmp(filter, "sua") && as->cfg.proto != OSMO_SS7_ASP_PROT_SUA) continue; - /* FIXME: active filter */ + if (filter && !strcmp(filter, "active") && !osmo_ss7_as_active(as)) + continue; vty_out(vty, "%-12s %-12s %-10u %-13s %4s %13s %3s %5s %4s %10s%s", as->cfg.name, osmo_fsm_inst_state_name(as->fi), as->cfg.routing_key.context, osmo_ss7_pointcode_print(as->inst, as->cfg.routing_key.pc), diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 394061b..602c433 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -147,13 +147,6 @@ #define MSEC_TO_S_US(x) (x/1000), ((x%1000)*10) -enum xua_as_state { - XUA_AS_S_DOWN, - XUA_AS_S_INACTIVE, - XUA_AS_S_ACTIVE, - XUA_AS_S_PENDING, -}; - static const struct value_string xua_as_event_names[] = { { XUA_ASPAS_ASP_INACTIVE_IND, "ASPAS-ASP_INACTIVE.ind" }, { XUA_ASPAS_ASP_DOWN_IND, "ASPAS-ASP_DOWN.ind" }, diff --git a/src/xua_as_fsm.h b/src/xua_as_fsm.h index 0128919..0e71350 100644 --- a/src/xua_as_fsm.h +++ b/src/xua_as_fsm.h @@ -2,6 +2,13 @@ struct osmo_ss7_as; +enum xua_as_state { + XUA_AS_S_DOWN, + XUA_AS_S_INACTIVE, + XUA_AS_S_ACTIVE, + XUA_AS_S_PENDING, +}; + enum xua_as_event { XUA_ASPAS_ASP_INACTIVE_IND, XUA_ASPAS_ASP_DOWN_IND, diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty index eeda4c8..a7fe492 100644 --- a/tests/vty/ss7_asp_test.vty +++ b/tests/vty/ss7_asp_test.vty @@ -280,7 +280,6 @@ Routing Routing Key Cic Cic Traffic AS Name State Context Dpc Si Opc Ssn Min Max Mode ------------ ------------ ---------- ------------- ---- ------------- --- ----- ----- ------- -my-ass AS_DOWN 0 0.0.0 override ss7_asp_vty_test(config-cs7-as)# do show cs7 instance 0 as sua Routing Routing Key Cic Cic Traffic -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I356d90642a500be6a70f60c8240ce1211fd0d934 Gerrit-Change-Number: 15995 Gerrit-PatchSet: 6 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 13:45:49 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 15 Nov 2019 13:45:49 +0000 Subject: Change in osmo-bts[master]: rsl: Remove unneeded duplicate reset on some lchan fields In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16061 ) Change subject: rsl: Remove unneeded duplicate reset on some lchan fields ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia2a5da068d440232361d57bd5ac33eddebf05ebe Gerrit-Change-Number: 16061 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 15 Nov 2019 13:45:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 13:50:03 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 15 Nov 2019 13:50:03 +0000 Subject: Change in osmo-bts[master]: Move and rename gsm_lchan.ms_power field In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16062 ) Change subject: Move and rename gsm_lchan.ms_power field ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16062 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib264ec7dac87355cef6415461ed74bd8e9c8ca52 Gerrit-Change-Number: 16062 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 15 Nov 2019 13:50:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 13:54:32 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 15 Nov 2019 13:54:32 +0000 Subject: Change in osmo-bts[master]: bts-trx: loops.c: Avoid always clamping MS power to MS power class 1 In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16069 ) Change subject: bts-trx: loops.c: Avoid always clamping MS power to MS power class 1 ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16069/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/16069/1//COMMIT_MSG at 11 PS1, Line 11: campling (clamping?) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I744e7c315b818a1e7d3dd2579cd483c693d89b73 Gerrit-Change-Number: 16069 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 15 Nov 2019 13:54:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 14:21:37 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 15 Nov 2019 14:21:37 +0000 Subject: Change in osmo-bts[master]: power_control.c: Apply latests improvements from loops.c In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16070 ) Change subject: power_control.c: Apply latests improvements from loops.c ...................................................................... Patch Set 2: Code-Review+1 LGTM. I've noticed that osmo-bts-trx also has code to not change more than MS_{LOWER,RAISE}_MAX_DBM at once. Why was that omitted from the port? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I579967cc8bb69dc76a315c6c9d3a351f5961d92f Gerrit-Change-Number: 16070 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 15 Nov 2019 14:21:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 14:48:47 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 14:48:47 +0000 Subject: Change in osmo-bts[master]: power_control.c: Apply latests improvements from loops.c In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16070 ) Change subject: power_control.c: Apply latests improvements from loops.c ...................................................................... Patch Set 2: > Patch Set 2: Code-Review+1 > > LGTM. > > I've noticed that osmo-bts-trx also has code to not change more than MS_{LOWER,RAISE}_MAX_DBM at once. Why was that omitted from the port? Because the algo works slightly different. The one from loops.c was not receiving the currently used MS Power Level announced during the block, probably because the algo works on bursts instead of the entire block, so the content of the block is not available because it works at a lower layer. On the other hand, since the power_control.c one works on blocks received from lower layer, then the MS Power control being used by the MS matching the rx signal strength is available, so the algo can use that to know if the MS already reached the last announced power level. So, instead of making sure it changes the power level at a rate acceptable for the MS, it simply changes to the calculated desired one and waits for the MS to reach the power level until applying corrections again based on received signal strength. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I579967cc8bb69dc76a315c6c9d3a351f5961d92f Gerrit-Change-Number: 16070 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 15 Nov 2019 14:48:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 14:49:50 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 14:49:50 +0000 Subject: Change in osmo-bts[master]: rsl: Remove unneeded duplicate reset on some lchan fields In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16061 ) Change subject: rsl: Remove unneeded duplicate reset on some lchan fields ...................................................................... rsl: Remove unneeded duplicate reset on some lchan fields Both ms_power and ms_power_ctrl are reset to 0 again further below. Change-Id: Ia2a5da068d440232361d57bd5ac33eddebf05ebe --- M src/common/rsl.c 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/src/common/rsl.c b/src/common/rsl.c index 9a4afb3..f88d2d7 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -997,9 +997,6 @@ { /* These values don't apply to PDCH, just clear them. Particularly the encryption must be * cleared, or we would enable encryption on PDCH with parameters remaining from the TCH. */ - lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); - lchan->ms_power_ctrl.current = lchan->ms_power; - lchan->ms_power_ctrl.fixed = false; lchan->rsl_cmode = 0; lchan->tch_mode = 0; memset(&lchan->encr, 0, sizeof(lchan->encr)); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16061 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia2a5da068d440232361d57bd5ac33eddebf05ebe Gerrit-Change-Number: 16061 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 14:49:51 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 14:49:51 +0000 Subject: Change in osmo-bts[master]: bts-trx: loops.c: Avoid always clamping MS power to MS power class 1 In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16069 ) Change subject: bts-trx: loops.c: Avoid always clamping MS power to MS power class 1 ...................................................................... bts-trx: loops.c: Avoid always clamping MS power to MS power class 1 The affirmation written there is not true, since actually it depends on the band. For instance, for DCS1800 the maximum MS power is provided by class 3. Let ms_pwr_ctl_lvl() take care of campling instead. Change-Id: I744e7c315b818a1e7d3dd2579cd483c693d89b73 --- M src/osmo-bts-trx/loops.c 1 file changed, 1 insertion(+), 10 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index 4b723a0..1f54fee 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -49,7 +49,7 @@ struct gsm_bts_trx *trx = lchan->ts->trx; enum gsm_band band = trx->bts->band; int8_t new_power; /* TS 05.05 power level */ - int8_t new_dbm, current_dbm, bsc_max_dbm, pwclass_max_dbm; + int8_t new_dbm, current_dbm, bsc_max_dbm; /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */ if (diff < 2 && diff > -2) @@ -89,15 +89,6 @@ if (new_dbm > bsc_max_dbm) new_dbm = bsc_max_dbm; - /* Make sure in no case the dBm value is higher than the one of ms - power class 1 (the one with more output power) for the given band. - Ideally we should catch the MS specific power class and apply it - here, but for now let's assume the BSC sent us one taking the power - class into account. */ - pwclass_max_dbm = (int)ms_class_gmsk_dbm(band, 1); - if (pwclass_max_dbm >= 0 && new_dbm > pwclass_max_dbm) - new_dbm = pwclass_max_dbm; - new_power = ms_pwr_ctl_lvl(band, new_dbm); if (new_power < 0) { LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I744e7c315b818a1e7d3dd2579cd483c693d89b73 Gerrit-Change-Number: 16069 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 14:49:51 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 14:49:51 +0000 Subject: Change in osmo-bts[master]: Move and rename gsm_lchan.ms_power field In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16062 ) Change subject: Move and rename gsm_lchan.ms_power field ...................................................................... Move and rename gsm_lchan.ms_power field Make it clear that it contains the maximum MS power level (TS 05.05) and not the one to be used. The one aimed at is in ms_power_ctrl.current. Since it's used in related code, move it inside the ms_power_ctrl struct too. Related: OS#1851 Change-Id: Ib264ec7dac87355cef6415461ed74bd8e9c8ca52 --- M include/osmo-bts/gsm_data_shared.h M src/common/power_control.c M src/common/rsl.c M src/common/vty.c M src/osmo-bts-trx/loops.c M src/osmo-bts-virtual/l1_if.c 6 files changed, 20 insertions(+), 21 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 5061310..8a52fe9 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -199,9 +199,6 @@ /* State */ enum gsm_lchan_state state; const char *broken_reason; - /* Power levels for MS and BTS */ - uint8_t bs_power; - uint8_t ms_power; /* Encryption information */ struct { uint8_t alg_id; @@ -323,8 +320,11 @@ /* power handling */ struct { uint8_t current; + uint8_t max; bool fixed; } ms_power_ctrl; + /* Power levels for BTS */ + uint8_t bs_power; struct msgb *pending_rel_ind_msg; diff --git a/src/common/power_control.c b/src/common/power_control.c index f467cd5..38a7fb7 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -83,8 +83,8 @@ /* Don't ask for smaller ms power level than the one set * by BSC upon RSL CHAN ACT */ - if (new_pwr < lchan->ms_power) - new_pwr = lchan->ms_power; + if (new_pwr < lchan->ms_power_ctrl.max) + new_pwr = lchan->ms_power_ctrl.max; if (lchan->ms_power_ctrl.current != new_pwr) { lchan->ms_power_ctrl.current = new_pwr; diff --git a/src/common/rsl.c b/src/common/rsl.c index f88d2d7..09a9217 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1002,7 +1002,6 @@ memset(&lchan->encr, 0, sizeof(lchan->encr)); memset(&lchan->ho, 0, sizeof(lchan->ho)); lchan->bs_power = 0; - lchan->ms_power = 0; memset(&lchan->ms_power_ctrl, 0, sizeof(lchan->ms_power_ctrl)); lchan->rqd_ta = 0; copy_sacch_si_to_lchan(lchan); @@ -1099,8 +1098,8 @@ gsm_lchans_name(lchan->state)); /* Initialize channel defaults */ - lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); - lchan->ms_power_ctrl.current = lchan->ms_power; + lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); + lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; lchan->ms_power_ctrl.fixed = false; rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg)); @@ -1151,8 +1150,8 @@ lchan->bs_power = *TLVP_VAL(&tp, RSL_IE_BS_POWER); /* 9.3.13 MS Power */ if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) { - lchan->ms_power = *TLVP_VAL(&tp, RSL_IE_MS_POWER); - lchan->ms_power_ctrl.current = lchan->ms_power; + lchan->ms_power_ctrl.max = *TLVP_VAL(&tp, RSL_IE_MS_POWER); + lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; lchan->ms_power_ctrl.fixed = false; } /* 9.3.24 Timing Advance */ @@ -1633,7 +1632,7 @@ return rsl_tx_error_report(msg->trx, RSL_ERR_MAND_IE_ERROR, &dch->chan_nr, NULL, msg); pwr = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; - lchan->ms_power = pwr; + lchan->ms_power_ctrl.max = pwr; LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Rx MS POWER CONTROL %" PRIu8 "\n", pwr); @@ -1647,20 +1646,20 @@ lchan->ms_power_ctrl.fixed = true; } - /* Only set current to lchan->ms_power if actual value of current - in dBm > value in dBm from lchan->ms_power, or if fixed. */ + /* Only set current to max if actual value of current + in dBm > value in dBm from max, or if fixed. */ if (lchan->ms_power_ctrl.fixed) { - lchan->ms_power_ctrl.current = lchan->ms_power; + lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; } else { - max_pwr = ms_pwr_dbm(bts->band, lchan->ms_power); + max_pwr = ms_pwr_dbm(bts->band, lchan->ms_power_ctrl.max); curr_pwr = ms_pwr_dbm(bts->band, lchan->ms_power_ctrl.current); if (max_pwr < 0 || curr_pwr < 0) { LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "Unable to calculate power levels to dBm: %" PRIu8 " -> %d, %" PRIu8 " -> %d\n", - lchan->ms_power, max_pwr, + lchan->ms_power_ctrl.max, max_pwr, lchan->ms_power_ctrl.current, curr_pwr); } else if (curr_pwr > max_pwr) { - lchan->ms_power_ctrl.current = lchan->ms_power; + lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; } } diff --git a/src/common/vty.c b/src/common/vty.c index fd9be40..514d120 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -1173,7 +1173,7 @@ vty_out(vty, " BS Power: %d dBm, MS Power: %u dBm%s", lchan->ts->trx->nominal_power - lchan->ts->trx->max_power_red - lchan->bs_power*2, - ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power), + ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power_ctrl.max), VTY_NEWLINE); vty_out(vty, " Channel Mode / Codec: %s%s", get_value_string(gsm48_cmode_names, lchan->tch_mode), diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index b2b163a..4b723a0 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -62,11 +62,11 @@ lchan->ms_power_ctrl.current, gsm_band_name(band)); return; } - bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power); + bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.max); if (bsc_max_dbm < 0) { LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", - lchan->ms_power, gsm_band_name(band)); + lchan->ms_power_ctrl.max, gsm_band_name(band)); return; } diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c index 58f4781..ab2cb76 100644 --- a/src/osmo-bts-virtual/l1_if.c +++ b/src/osmo-bts-virtual/l1_if.c @@ -320,7 +320,7 @@ DEBUGPFN(DMEAS, fn, "RX L1 frame %s chan_nr=0x%02x MS pwr=%ddBm rssi=%.1f dBFS " "ber=%.2f%% (%d/%d bits) L1_ta=%d rqd_ta=%d toa=%.2f\n", - gsm_lchan_name(lchan), chan_nr, ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power), + gsm_lchan_name(lchan), chan_nr, ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power_ctrl.max), rssi, ber*100, n_errors, n_bits_total, lchan->meas.l1_info[1], lchan->rqd_ta, toa); l1if_fill_meas_res(&l1sap, chan_nr, lchan->rqd_ta + toa, ber, rssi, fn); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16062 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib264ec7dac87355cef6415461ed74bd8e9c8ca52 Gerrit-Change-Number: 16062 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 15:37:25 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 15:37:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Update README.md of several TTCN3 test suites References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079 ) Change subject: Update README.md of several TTCN3 test suites ...................................................................... Update README.md of several TTCN3 test suites Some stuff was wrong and some was missing after new features being implemented in tests over time. Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0 --- A bsc-nat/README.md M bsc/README.md M bts/README.md M ggsn_tests/README.md M mgw/README.md M msc/README.md A pcu/README.md M sgsn/README.md M sip/README.md A stp/README.md 10 files changed, 111 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/79/16079/1 diff --git a/bsc-nat/README.md b/bsc-nat/README.md new file mode 100644 index 0000000..63f497b --- /dev/null +++ b/bsc-nat/README.md @@ -0,0 +1,28 @@ +# BSCNAT_Tests.ttcn + +* external interfaces + * BSSAP/SCCP/IPA (SCCPLite) (emulates BSC-side and MSC-side) + * MGCP/UDP (emulates MSC-side MSC+MGW) + * MGCP/IPA (emulates BSC-side BSC+MGW) + * RTP (emulates BSC-side MGW and MSC-side MGW) + * Osmux (emulates BSC-side MGW) + * VTY + * CTRL + +{% dot bscnat_tests.svg +digraph G { + rankdir=LR; + BSCNAT [label="IUT\nosmo-bsc_nat",shape="box"]; + ATS [label="ATS\nBSC_Tests.ttcn"]; + + ATS -> BSCNAT [label="SCCPLite BSC-side"]; + BSCNAT -> ATS [label="SCCPLite MSC-side"]; + BSCNAT -> ATS [label="MGCP/UDP MSC-side", dir="both"]; + BSCNAT -> ATS [label="MGCP/IPA BSC-side"]; + ATS -> BSCNAT [label="CTRL"]; + ATS -> BSCNAT [label="VTY"]; + ATS -> BSCNAT [label="RTP BSC-side", dir="both"]; + ATS -> BSCNAT [label="RTP MSC-side", dir="both"]; + ATS -> BSCNAT [label="Osmux BSC-side", dir="both"]; +} +%} diff --git a/bsc/README.md b/bsc/README.md index 6efaa7f..5fecf14 100644 --- a/bsc/README.md +++ b/bsc/README.md @@ -2,11 +2,16 @@ * external interfaces * A-bis side: RSL (emulates BTS-side client) - * A-side: BSSAP/SCCP/M3UA (emulates MSC-side) + * A-side (emulates MSC-side) + * BSSAP/SCCP/M3UA (AoIP) + * BSSAP/SCCP/IPA (SCCPLite) * MGW side: MGCP (emulates MGW side) + * VTY + * CTRL {% dot bsc_tests.svg digraph G { + graph [label="AoIP", labelloc=t, fontsize=30]; rankdir=LR; { rank=same; BTS; STP; }; BSC [label="IUT\nosmo-bsc",shape="box"]; @@ -21,3 +26,19 @@ BSC -> STP [label="A BSSAP\nSCCP/M3UA"]; } %} + +{% dot bsc_tests_sccplite.svg +digraph G { + graph [label="SCCPLite", labelloc=t, fontsize=30]; + rankdir=LR; + BSC [label="IUT\nosmo-bsc",shape="box"]; + ATS [label="ATS\nBSC_Tests.ttcn"]; + BTS [label="osmo-bts-omldummy\nOML only"]; + + BTS -> BSC [label="A-bis OML"]; + ATS -> BSC [label="A-bis RSL"]; + ATS -> BSC [label="CTRL"]; + ATS -> BSC [label="VTY"]; + ATS -> BSC [label="A BSSAP\nSCCP/IPA"]; +} +%} diff --git a/bts/README.md b/bts/README.md index 058e1d2..a8dfe81 100644 --- a/bts/README.md +++ b/bts/README.md @@ -4,6 +4,8 @@ * A-bis side: RSL (emulates BSC-side server) * Um side: L1CTL to control MS * PCU side: pcu_socket + * VTY + * CTRL {% dot bts_tests.svg digraph G { diff --git a/ggsn_tests/README.md b/ggsn_tests/README.md index 288018f..71468d5 100644 --- a/ggsn_tests/README.md +++ b/ggsn_tests/README.md @@ -3,6 +3,7 @@ * external interfaces * Gp: GTP (emulates SGSN) * Gi: IP (emulates Internet) + * VTY {% dot ggsn_tests.svg digraph G { diff --git a/mgw/README.md b/mgw/README.md index 8f08262..86f0eee 100644 --- a/mgw/README.md +++ b/mgw/README.md @@ -1,8 +1,10 @@ -== MGW_Test.ttcn +# MGW_Test.ttcn * external interfaces * MGCP (emulates call agent) * RTP (stream source/sink) + * Osmux (stream source/sink) + * VTY {% dot mgw_tests.svg digraph G { @@ -10,8 +12,9 @@ MGW [label="IUT\nosmo-mgw",shape="box"]; ATS [label="ATS\nMGCP_Test.ttcn"]; - ATS -> MGW [label="RTP"]; + ATS -> MGW [label="RTP", dir="both"]; + ATS -> MGW [label="Osmux", dir="both"]; ATS -> MGW [label="MGCP"]; - MGW -> ATS [label="RTP"]; + ATS -> MGW [label="VTY"]; } %} diff --git a/msc/README.md b/msc/README.md index 6be15ce..59ae168 100644 --- a/msc/README.md +++ b/msc/README.md @@ -1,24 +1,30 @@ - # MSC_Tests.ttcn * external interfaces * A: BSSAP/SCCP/M3UA (emulates BSC-side) + * IuCS: RANAP/SCCP/M3UA (emulates HNBGW-side) * MNCC: MNCC/unix-domain (emulates ext. MNCC side) * MGW: MGCP (emulates MGW side) - * GSUP (impllements HLR side) + * GSUP (emulates HLR side) + * VTY + * CTRL {% dot msc_tests.svg digraph G { rankdir=LR; MSC [label="IUT\nosmo-msc",shape="box"]; ATS [label="ATS\nMSC_Tests.ttcn"]; + STP [label="STP\nosmo-stp"]; ATS -> MSC [label="MNCC"]; ATS -> MSC [label="SMPP",style="dashed"]; ATS -> MSC [label="CTRL"]; ATS -> MSC [label="VTY"]; MSC -> ATS [label="GSUP"]; + MSC -> ATS [label="MGCP"]; ATS -> STP [label="A BSSAP\nSCCP/M3UA"]; MSC -> STP [label="A BSSAP\nSCCP/M3UA"]; + ATS -> STP [label="IuCS RANAP\nSCCP/M3UA"]; + MSC -> STP [label="IuCS RANAP\nSCCP/M3UA"]; } %} diff --git a/pcu/README.md b/pcu/README.md new file mode 100644 index 0000000..a2e439a --- /dev/null +++ b/pcu/README.md @@ -0,0 +1,18 @@ +# PCU_Tests.ttcn + +* external interfaces + * Gb (emulates SGSN side NS/BSSGP) + * unix pcu socket (emulates BTS) + * VTY + +{% dot msc_tests.svg +digraph G { + rankdir=LR; + PCU [label="IUT\nosmo-pcu",shape="box"]; + ATS [label="ATS\nPCU_Tests.ttcn"]; + + PCU -> ATS [label="Gb"]; + PCU -> ATS [label="pcu_sock"]; + ATS -> PCU [label="VTY"]; +} +%} diff --git a/sgsn/README.md b/sgsn/README.md index 4ed7ea4..c6ee447 100644 --- a/sgsn/README.md +++ b/sgsn/README.md @@ -2,17 +2,23 @@ * external interfaces * Gb (emulates PCU side NS/BSSGP + MS) + * Iu (emulates HNBGW side IuPS) + * Gp: GTP (emulates GGSN) * GSUP (emulates HLR) * VTY {% dot sgsn_tests.svg digraph G { rankdir=LR; - SGSN [label="SGSN\nosmo-sgsn",shape="box"]; + SGSN [label="IUT\nosmo-sgsn",shape="box"]; ATS [label="ATS\nSGSN_Tests.ttcn"]; + STP [label="STP\nosmo-stp"]; ATS -> SGSN [label="Gb"]; SGSN-> ATS [label="Gp (GTP)"]; + SGSN -> STP [label="Iu (IuPS)"]; + ATS -> STP [label="Iu (IuPS)"]; + SGSN -> ATS [label="GSUP"]; ATS -> SGSN [label="VTY"]; } %} diff --git a/sip/README.md b/sip/README.md index ac880dd..c377fcd 100644 --- a/sip/README.md +++ b/sip/README.md @@ -8,7 +8,7 @@ {% dot sip_tests.svg digraph G { rankdir=LR; - SIP [label="SIP\nosmo-sip-connector",shape="box"]; + SIP [label="IUT\nosmo-sip-connector",shape="box"]; ATS [label="ATS\nSIP_Tests.ttcn"]; ATS -> SIP [label="MNCC"]; diff --git a/stp/README.md b/stp/README.md new file mode 100644 index 0000000..20a42b5 --- /dev/null +++ b/stp/README.md @@ -0,0 +1,18 @@ +# STP_Tests.ttcn + +* external interfaces + * M3UA/SCTP (can emulate both client and server side) + * IPA (can emulate both client and server side) + * VTY + +{% dot sip_tests.svg +digraph G { + rankdir=LR; + STP [label="IUT\nosmo-stp",shape="box"]; + ATS [label="ATS\nSTP_Tests.ttcn"]; + + ATS -> STP [label="M3UA", dir="both"]; + ATS -> STP [label="IPA", dir="both"]; + ATS -> STP [label="VTY"]; +} +%} -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0 Gerrit-Change-Number: 16079 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 17:11:16 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 15 Nov 2019 17:11:16 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Update README.md of several TTCN3 test suites In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079 ) Change subject: Update README.md of several TTCN3 test suites ...................................................................... Patch Set 1: Code-Review+1 (3 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079/1/bsc/README.md File bsc/README.md: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079/1/bsc/README.md at 4 PS1, Line 4: A-bis side: RSL Makes sense to mention that OML is handled by osmo-bts-omldummy. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079/1/bts/README.md File bts/README.md: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079/1/bts/README.md at 19 PS1, Line 19: bursts Hah! I remember this mistake from OsmoDevCon 2018 ;) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079/1/msc/README.md File msc/README.md: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079/1/msc/README.md at 3 PS1, Line 3: external interfaces How about SMPP? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0 Gerrit-Change-Number: 16079 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 15 Nov 2019 17:11:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 17:33:25 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 17:33:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Update README.md of several TTCN3 test suites In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079 to look at the new patch set (#2). Change subject: Update README.md of several TTCN3 test suites ...................................................................... Update README.md of several TTCN3 test suites Some stuff was wrong and some was missing after new features being implemented in tests over time. Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0 --- A bsc-nat/README.md M bsc/README.md M bts/README.md M ggsn_tests/README.md M mgw/README.md M msc/README.md A pcu/README.md M sgsn/README.md M sip/README.md A stp/README.md 10 files changed, 114 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/79/16079/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0 Gerrit-Change-Number: 16079 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 17:44:04 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 15 Nov 2019 17:44:04 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Update README.md of several TTCN3 test suites In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079 ) Change subject: Update README.md of several TTCN3 test suites ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0 Gerrit-Change-Number: 16079 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 15 Nov 2019 17:44:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 17:55:06 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 15 Nov 2019 17:55:06 +0000 Subject: Change in osmo-bts[master]: power_control.c: Log rx current and target signal levels In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16073 ) Change subject: power_control.c: Log rx current and target signal levels ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16073 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I31ce7930a1daa20a2ff81f31a37df94298c877d6 Gerrit-Change-Number: 16073 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 15 Nov 2019 17:55:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:05:06 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 15 Nov 2019 18:05:06 +0000 Subject: Change in osmo-bts[master]: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16071 ) Change subject: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16071/2/src/osmo-bts-trx/main.c File src/osmo-bts-trx/main.c: https://gerrit.osmocom.org/c/osmo-bts/+/16071/2/src/osmo-bts-trx/main.c at 119 PS2, Line 119: BTS_FEAT_MS_PWR_CTRL_DSP I am pretty sure this feature is not applicable to osmo-bts-trx. OsmoTRX has nothing to do with MS Power / Timing Advance control. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5 Gerrit-Change-Number: 16071 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 15 Nov 2019 18:05:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:10:57 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 18:10:57 +0000 Subject: Change in osmo-bts[master]: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16071 ) Change subject: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16071/2/src/osmo-bts-trx/main.c File src/osmo-bts-trx/main.c: https://gerrit.osmocom.org/c/osmo-bts/+/16071/2/src/osmo-bts-trx/main.c at 119 PS2, Line 119: BTS_FEAT_MS_PWR_CTRL_DSP > I am pretty sure this feature is not applicable to osmo-bts-trx. [?] Please read the commit description. It doesn't necessarily need to mean anything with regards to osmo-trx. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5 Gerrit-Change-Number: 16071 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 15 Nov 2019 18:10:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:11:04 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 15 Nov 2019 18:11:04 +0000 Subject: Change in osmo-mgw[master]: fix use-after-free: require new fsm deferred dealloc, check for term In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/15839 ) Change subject: fix use-after-free: require new fsm deferred dealloc, check for term ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/osmo-mgw/+/15839/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-mgw/+/15839/3//COMMIT_MSG at 7 PS3, Line 7: fix use-after-free As far as I can see, in the current code you're still using generic deallocation and osmo_select_main(). Am I missing something? -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 Gerrit-Change-Number: 15839 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 15 Nov 2019 18:11:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:11:39 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 15 Nov 2019 18:11:39 +0000 Subject: Change in osmo-bsc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15841 ) Change subject: fsm: use deferred deallocation ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib7fce7b7d54dfb87af97544796680919e5929a50 Gerrit-Change-Number: 15841 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 15 Nov 2019 18:11:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:13:06 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 15 Nov 2019 18:13:06 +0000 Subject: Change in osmo-mgw[master]: fix use-after-free: require new fsm deferred dealloc, check for term In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/15839 ) Change subject: fix use-after-free: require new fsm deferred dealloc, check for term ...................................................................... Patch Set 3: Code-Review+1 Ah, I see now. The users of this FSM need to use deferred deallocation, not OsmoMGW itself. Nevermind. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 Gerrit-Change-Number: 15839 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 15 Nov 2019 18:13:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:15:01 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 15 Nov 2019 18:15:01 +0000 Subject: Change in osmo-sgsn[master]: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 ) Change subject: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-sgsn/+/16015/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-sgsn/+/16015/1//COMMIT_MSG at 20 PS1, Line 20: MS/PCU answers immediatelly with a RA Update instead with a new RA : ID. So this is absolutely legal, and that's why we should not assert(), right? -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6 Gerrit-Change-Number: 16015 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: keith Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 15 Nov 2019 18:15:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:17:44 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 15 Nov 2019 18:17:44 +0000 Subject: Change in osmo-bts[master]: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16071 ) Change subject: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP ...................................................................... Patch Set 2: Code-Review+1 Got it now :) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5 Gerrit-Change-Number: 16071 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 15 Nov 2019 18:17:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:21:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 18:21:27 +0000 Subject: Change in osmo-sgsn[master]: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 ) Change subject: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-sgsn/+/16015/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-sgsn/+/16015/1//COMMIT_MSG at 20 PS1, Line 20: MS/PCU answers immediatelly with a RA Update instead with a new RA : ID. > So this is absolutely legal, and that's why we should not assert(), right? Yes, I initially added an assert() while trying to debug the bug report since I was unable to find clear crash paths and I was suspecting this one could be, but I needed to be able to have a clear scenario (because in the bug report the crash happened afterwards in time due to memory corruption). Now thanks to osmo-gsm-tester I was able to find the scenario and reproduce it, and in that case we simply need to make sure the llme is nulled so it's not used later after being freed. -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6 Gerrit-Change-Number: 16015 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: keith Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 15 Nov 2019 18:21:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:36:50 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 15 Nov 2019 18:36:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15969 ) Change subject: bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15969 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I62c468b27d05fbff4a98ea24981188689f5899d3 Gerrit-Change-Number: 15969 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 15 Nov 2019 18:36:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:46:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 18:46:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15969 ) Change subject: bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level ...................................................................... bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level Related: OS#4244 Change-Id: I62c468b27d05fbff4a98ea24981188689f5899d3 --- M bts/BTS_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: fixeria: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 25721e3..87c9131 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -2160,7 +2160,7 @@ /* update power param to enable power loop as per spec the supplied ms power IE should set the max allowed power...*/ - RSL.send(ts_RSL_MS_PWR_CTRL_with_pp(g_chan_nr, pwr_var)); + RSL.send(ts_RSL_MS_PWR_CTRL_with_pp(g_chan_nr, pwr_target_val)); /* wait, then check that our power level was increased */ timer T1 := 10.0; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15969 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I62c468b27d05fbff4a98ea24981188689f5899d3 Gerrit-Change-Number: 15969 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:49:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 18:49:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Update README.md of several TTCN3 test suites In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079 ) Change subject: Update README.md of several TTCN3 test suites ...................................................................... Update README.md of several TTCN3 test suites Some stuff was wrong and some was missing after new features being implemented in tests over time. Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0 --- A bsc-nat/README.md M bsc/README.md M bts/README.md M ggsn_tests/README.md M mgw/README.md M msc/README.md A pcu/README.md M sgsn/README.md M sip/README.md A stp/README.md 10 files changed, 114 insertions(+), 10 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc-nat/README.md b/bsc-nat/README.md new file mode 100644 index 0000000..63f497b --- /dev/null +++ b/bsc-nat/README.md @@ -0,0 +1,28 @@ +# BSCNAT_Tests.ttcn + +* external interfaces + * BSSAP/SCCP/IPA (SCCPLite) (emulates BSC-side and MSC-side) + * MGCP/UDP (emulates MSC-side MSC+MGW) + * MGCP/IPA (emulates BSC-side BSC+MGW) + * RTP (emulates BSC-side MGW and MSC-side MGW) + * Osmux (emulates BSC-side MGW) + * VTY + * CTRL + +{% dot bscnat_tests.svg +digraph G { + rankdir=LR; + BSCNAT [label="IUT\nosmo-bsc_nat",shape="box"]; + ATS [label="ATS\nBSC_Tests.ttcn"]; + + ATS -> BSCNAT [label="SCCPLite BSC-side"]; + BSCNAT -> ATS [label="SCCPLite MSC-side"]; + BSCNAT -> ATS [label="MGCP/UDP MSC-side", dir="both"]; + BSCNAT -> ATS [label="MGCP/IPA BSC-side"]; + ATS -> BSCNAT [label="CTRL"]; + ATS -> BSCNAT [label="VTY"]; + ATS -> BSCNAT [label="RTP BSC-side", dir="both"]; + ATS -> BSCNAT [label="RTP MSC-side", dir="both"]; + ATS -> BSCNAT [label="Osmux BSC-side", dir="both"]; +} +%} diff --git a/bsc/README.md b/bsc/README.md index 6efaa7f..015687c 100644 --- a/bsc/README.md +++ b/bsc/README.md @@ -1,12 +1,17 @@ # BSC_Tests.ttcn * external interfaces - * A-bis side: RSL (emulates BTS-side client) - * A-side: BSSAP/SCCP/M3UA (emulates MSC-side) + * A-bis side: RSL (emulates BTS-side client) (OML handled by osmo-bts-omldummy) + * A-side (emulates MSC-side) + * BSSAP/SCCP/M3UA (AoIP) + * BSSAP/SCCP/IPA (SCCPLite) * MGW side: MGCP (emulates MGW side) + * VTY + * CTRL {% dot bsc_tests.svg digraph G { + graph [label="AoIP", labelloc=t, fontsize=30]; rankdir=LR; { rank=same; BTS; STP; }; BSC [label="IUT\nosmo-bsc",shape="box"]; @@ -21,3 +26,19 @@ BSC -> STP [label="A BSSAP\nSCCP/M3UA"]; } %} + +{% dot bsc_tests_sccplite.svg +digraph G { + graph [label="SCCPLite", labelloc=t, fontsize=30]; + rankdir=LR; + BSC [label="IUT\nosmo-bsc",shape="box"]; + ATS [label="ATS\nBSC_Tests.ttcn"]; + BTS [label="osmo-bts-omldummy\nOML only"]; + + BTS -> BSC [label="A-bis OML"]; + ATS -> BSC [label="A-bis RSL"]; + ATS -> BSC [label="CTRL"]; + ATS -> BSC [label="VTY"]; + ATS -> BSC [label="A BSSAP\nSCCP/IPA"]; +} +%} diff --git a/bts/README.md b/bts/README.md index 058e1d2..d7d6bdc 100644 --- a/bts/README.md +++ b/bts/README.md @@ -4,6 +4,8 @@ * A-bis side: RSL (emulates BSC-side server) * Um side: L1CTL to control MS * PCU side: pcu_socket + * VTY + * CTRL {% dot bts_tests.svg digraph G { @@ -14,7 +16,7 @@ BSC [label="osmo-bsc\nOML only"]; BTS -> fake_trx [label="bursts"]; fake_trx -> trxcon [label="bursts"]; - trxcon -> ATS [label="bursts"]; + trxcon -> ATS [label="GSM MAC blocks"]; BTS -> BSC [label="A-bis OML"]; BTS -> ATS [label="A-bis RSL"]; diff --git a/ggsn_tests/README.md b/ggsn_tests/README.md index 288018f..71468d5 100644 --- a/ggsn_tests/README.md +++ b/ggsn_tests/README.md @@ -3,6 +3,7 @@ * external interfaces * Gp: GTP (emulates SGSN) * Gi: IP (emulates Internet) + * VTY {% dot ggsn_tests.svg digraph G { diff --git a/mgw/README.md b/mgw/README.md index 8f08262..86f0eee 100644 --- a/mgw/README.md +++ b/mgw/README.md @@ -1,8 +1,10 @@ -== MGW_Test.ttcn +# MGW_Test.ttcn * external interfaces * MGCP (emulates call agent) * RTP (stream source/sink) + * Osmux (stream source/sink) + * VTY {% dot mgw_tests.svg digraph G { @@ -10,8 +12,9 @@ MGW [label="IUT\nosmo-mgw",shape="box"]; ATS [label="ATS\nMGCP_Test.ttcn"]; - ATS -> MGW [label="RTP"]; + ATS -> MGW [label="RTP", dir="both"]; + ATS -> MGW [label="Osmux", dir="both"]; ATS -> MGW [label="MGCP"]; - MGW -> ATS [label="RTP"]; + ATS -> MGW [label="VTY"]; } %} diff --git a/msc/README.md b/msc/README.md index 6be15ce..d79303b 100644 --- a/msc/README.md +++ b/msc/README.md @@ -1,24 +1,31 @@ - # MSC_Tests.ttcn * external interfaces * A: BSSAP/SCCP/M3UA (emulates BSC-side) + * IuCS: RANAP/SCCP/M3UA (emulates HNBGW-side) * MNCC: MNCC/unix-domain (emulates ext. MNCC side) * MGW: MGCP (emulates MGW side) - * GSUP (impllements HLR side) + * GSUP (emulates HLR side) + * SMPP (emulates ESME side) + * VTY + * CTRL {% dot msc_tests.svg digraph G { rankdir=LR; MSC [label="IUT\nosmo-msc",shape="box"]; ATS [label="ATS\nMSC_Tests.ttcn"]; + STP [label="STP\nosmo-stp"]; ATS -> MSC [label="MNCC"]; ATS -> MSC [label="SMPP",style="dashed"]; ATS -> MSC [label="CTRL"]; ATS -> MSC [label="VTY"]; MSC -> ATS [label="GSUP"]; + MSC -> ATS [label="MGCP"]; ATS -> STP [label="A BSSAP\nSCCP/M3UA"]; MSC -> STP [label="A BSSAP\nSCCP/M3UA"]; + ATS -> STP [label="IuCS RANAP\nSCCP/M3UA"]; + MSC -> STP [label="IuCS RANAP\nSCCP/M3UA"]; } %} diff --git a/pcu/README.md b/pcu/README.md new file mode 100644 index 0000000..a2e439a --- /dev/null +++ b/pcu/README.md @@ -0,0 +1,18 @@ +# PCU_Tests.ttcn + +* external interfaces + * Gb (emulates SGSN side NS/BSSGP) + * unix pcu socket (emulates BTS) + * VTY + +{% dot msc_tests.svg +digraph G { + rankdir=LR; + PCU [label="IUT\nosmo-pcu",shape="box"]; + ATS [label="ATS\nPCU_Tests.ttcn"]; + + PCU -> ATS [label="Gb"]; + PCU -> ATS [label="pcu_sock"]; + ATS -> PCU [label="VTY"]; +} +%} diff --git a/sgsn/README.md b/sgsn/README.md index 4ed7ea4..c6ee447 100644 --- a/sgsn/README.md +++ b/sgsn/README.md @@ -2,17 +2,23 @@ * external interfaces * Gb (emulates PCU side NS/BSSGP + MS) + * Iu (emulates HNBGW side IuPS) + * Gp: GTP (emulates GGSN) * GSUP (emulates HLR) * VTY {% dot sgsn_tests.svg digraph G { rankdir=LR; - SGSN [label="SGSN\nosmo-sgsn",shape="box"]; + SGSN [label="IUT\nosmo-sgsn",shape="box"]; ATS [label="ATS\nSGSN_Tests.ttcn"]; + STP [label="STP\nosmo-stp"]; ATS -> SGSN [label="Gb"]; SGSN-> ATS [label="Gp (GTP)"]; + SGSN -> STP [label="Iu (IuPS)"]; + ATS -> STP [label="Iu (IuPS)"]; + SGSN -> ATS [label="GSUP"]; ATS -> SGSN [label="VTY"]; } %} diff --git a/sip/README.md b/sip/README.md index ac880dd..c377fcd 100644 --- a/sip/README.md +++ b/sip/README.md @@ -8,7 +8,7 @@ {% dot sip_tests.svg digraph G { rankdir=LR; - SIP [label="SIP\nosmo-sip-connector",shape="box"]; + SIP [label="IUT\nosmo-sip-connector",shape="box"]; ATS [label="ATS\nSIP_Tests.ttcn"]; ATS -> SIP [label="MNCC"]; diff --git a/stp/README.md b/stp/README.md new file mode 100644 index 0000000..20a42b5 --- /dev/null +++ b/stp/README.md @@ -0,0 +1,18 @@ +# STP_Tests.ttcn + +* external interfaces + * M3UA/SCTP (can emulate both client and server side) + * IPA (can emulate both client and server side) + * VTY + +{% dot sip_tests.svg +digraph G { + rankdir=LR; + STP [label="IUT\nosmo-stp",shape="box"]; + ATS [label="ATS\nSTP_Tests.ttcn"]; + + ATS -> STP [label="M3UA", dir="both"]; + ATS -> STP [label="IPA", dir="both"]; + ATS -> STP [label="VTY"]; +} +%} -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16079 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0 Gerrit-Change-Number: 16079 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 15 18:49:38 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 15 Nov 2019 18:49:38 +0000 Subject: Change in osmo-bts[master]: bts-trx: Drop low layer MS Power Control Loop algo In-Reply-To: References: Message-ID: pespin has removed a vote from this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16072 ) Change subject: bts-trx: Drop low layer MS Power Control Loop algo ...................................................................... Removed Code-Review-1 by pespin -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0d8b0c981d9ead91d93999df6e45fb06e426aeb9 Gerrit-Change-Number: 16072 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: deleteVote -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 09:10:09 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 09:10:09 +0000 Subject: Change in osmo-sgsn[master]: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 ) Change subject: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6 Gerrit-Change-Number: 16015 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: keith Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Nov 2019 09:10:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 09:11:17 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 09:11:17 +0000 Subject: Change in osmo-bts[master]: bts-trx: Drop low layer MS Power Control Loop algo In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16072 ) Change subject: bts-trx: Drop low layer MS Power Control Loop algo ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0d8b0c981d9ead91d93999df6e45fb06e426aeb9 Gerrit-Change-Number: 16072 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Nov 2019 09:11:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 09:57:44 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sat, 16 Nov 2019 09:57:44 +0000 Subject: Change in osmo-sgsn[master]: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 ) Change subject: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach ...................................................................... Patch Set 1: Code-Review+2 +1+1=+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6 Gerrit-Change-Number: 16015 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: keith Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 16 Nov 2019 09:57:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 09:57:49 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sat, 16 Nov 2019 09:57:49 +0000 Subject: Change in osmo-sgsn[master]: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 ) Change subject: gmm: Fix assertion hit during RA UPD REQ before completting gmm attach ...................................................................... gmm: Fix assertion hit during RA UPD REQ before completting gmm attach Output: 20191107021548500 DMM <0002> gprs_gb.c:40 MM_STATE_Gb(2596296189)[0x6120000084a0]{Idle}: Received Event E_MM_PDU_RECEPTION 20191107021548500 DMM <0002> gprs_gmm.c:1531 MM(/d4b6d7af) -> GMM RA UPDATE REQUEST type="RA updating" 20191107021548501 DMM <0002> gprs_gmm.c:1615 MM(/d4b6d7af) The MM context cannot be used, RA: 901-70-2758-208 Assert failed mmctx->gb.llme == NULL gprs_gmm.c:1620 Scenario reproducing the crash can be triggered with TTCN3 SGSN_Tests.TC_attach_req_id_req_ra_update. Basically, SGSN first receives an ATTACH REQ with a given RA ID, then SGSN switches to state CommonProcedureInitiated and sends GMM ID REQ, and MS/PCU answers immediatelly with a RA Update instead with a new RA ID. Related: OS#3957, OS#4245 Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6 --- M src/sgsn/gprs_gmm.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index b6b1685..17daa7d 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1615,9 +1615,9 @@ osmo_rai_name(&mmctx->ra)); /* mmctx is set to NULL and gprs_llgmm_unassign(llme) will be called below, let's make sure we don't keep dangling llme - pointers in mmctx (OS#3957). */ + pointers in mmctx (OS#3957, OS#4245). */ if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) - OSMO_ASSERT(mmctx->gb.llme == NULL); + mmctx->gb.llme = NULL; mmctx = NULL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I64fa5cf1b427d3abb99e553e584897261a827ce6 Gerrit-Change-Number: 16015 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: keith Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 13:32:19 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 13:32:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add tests for GSUP proxy routing In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 ) Change subject: hlr: add tests for GSUP proxy routing ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021/1/hlr/HLR_Tests.ttcn File hlr/HLR_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021/1/hlr/HLR_Tests.ttcn at 433 PS1, Line 433: GSUP.send(valueof(ts_GSUP_UL_REQ(imsi, source_name := source_name))); > Don't mix position and keyword arguments. Why not? IMSI is a mandatory argument, the second one is optional. I don't see any problems here. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021/1/hlr/HLR_Tests.ttcn at 572 PS1, Line 572: tr_GSUP_PROC_SS_RES How about this branch? I see that it's commented out, but maybe some day we will find a way to use 'decmatch'. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa Gerrit-Change-Number: 16021 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 16 Nov 2019 13:32:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sat Nov 16 14:25:04 2019 From: admin at opensuse.org (OBS Notification) Date: Sat, 16 Nov 2019 14:25:04 +0000 Subject: Build failure of network:osmocom:latest/osmo-gsm-manuals in Debian_10/armv7l In-Reply-To: References: Message-ID: <5dd006d16b83b_30592ad84be765f052479c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/osmo-gsm-manuals/Debian_10/armv7l Package network:osmocom:latest/osmo-gsm-manuals failed to build in Debian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest osmo-gsm-manuals Last lines of build log: [ 552s] asciidoc: include: /usr/src/packages/BUILD/common/chapters/osmux/mo_call_osmux_sccplite_nat.msc [ 552s] asciidoc: osmux.adoc: line 138: reading: /usr/src/packages/BUILD/common/chapters/osmux/mo_call_osmux_sccplite_nat.msc [ 552s] asciidoc: osmux.adoc: line 137: evaluating: {counter2:target-number} [ 552s] asciidoc: osmux.adoc: line 137: evaluating: {set2:target:test-usermanual__54.png} [ 552s] asciidoc: mo_call_osmux_sccplite_nat.msc: line 77: filtering: "/usr/bin/python2" "./build/filter-wrapper.py" mscgen -o "/usr/src/packages/BUILD/tests/test-usermanual__54.png" -Tpng - [ 552s] asciidoc: include: /usr/src/packages/BUILD/common/chapters/osmux/mgcp_extension_osmux.adoc [ 552s] asciidoc: osmux.adoc: line 141: reading: /usr/src/packages/BUILD/common/chapters/osmux/mgcp_extension_osmux.adoc [ 552s] asciidoc: include: /usr/src/packages/BUILD/common/chapters/bibliography.adoc [ 552s] asciidoc: test-usermanual.adoc: line 32: reading: /usr/src/packages/BUILD/common/chapters/bibliography.adoc [ 552s] [ 552s] make[3]: *** [../build/Makefile.asciidoc.inc:69: test-usermanual.pdf] Error 1 [ 552s] make[3]: Leaving directory '/usr/src/packages/BUILD/tests' [ 552s] make[2]: *** [Makefile:438: all-recursive] Error 1 [ 552s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 552s] make[1]: *** [Makefile:362: all] Error 2 [ 552s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 552s] dh_auto_build: make -j1 returned exit code 2 [ 552s] make: *** [debian/rules:5: binary] Error 2 [ 552s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 552s] [ 552s] obs-arm-5 failed "build osmo-gsm-manuals-dev_0.2.0.dsc" at Sat Nov 16 14:24:47 UTC 2019. [ 552s] [ 552s] ### VM INTERACTION START ### [ 556s] [ 518.437882] sysrq: SysRq : Power Off [ 556s] [ 518.443847] reboot: Power down [ 556s] ### VM INTERACTION END ### [ 556s] [ 556s] obs-arm-5 failed "build osmo-gsm-manuals-dev_0.2.0.dsc" at Sat Nov 16 14:24:51 UTC 2019. [ 556s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sat Nov 16 19:01:30 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 19:01:30 +0000 Subject: Change in osmo-bts[master]: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16080 ) Change subject: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields ...................................................................... pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields Since there can be multiple PDCH channels configured on different timeslots, different TRXes, and BTSes, the PTCCH/U handling code in OsmoPCU needs to know the exact origin of a given RACH.ind. Otherwise, it is not known which subscriber originated a given PTCCH/U indication, and hence it is impossible to send PTCCH/D Timing Advance notification properly. Fortunately, we can extend the RACH.ind message without even bumping the protocol version, because every single PDU has a fixed size defined by the largest message - INFO.ind. In case if the actual message payload is smaller, the rest is filled with a constant padding byte (0x00). Older versions of OsmoPCU will consider the new fields as padding, while the messages from older OsmoBTS versions will always have both fields set to 0x00. Since C0/TS0 cannot be configured to PDCH, this can be easily detected on the other end. Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6 Related: OS#4102, OS#1545 --- M include/osmo-bts/pcu_if.h M include/osmo-bts/pcuif_proto.h M src/common/l1sap.c M src/common/pcu_sock.c 4 files changed, 15 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/80/16080/1 diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h index f34e0cd..1475a94 100644 --- a/include/osmo-bts/pcu_if.h +++ b/include/osmo-bts/pcu_if.h @@ -11,8 +11,9 @@ int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len, int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual); -int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, - uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi); +int pcu_tx_rach_ind(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, + int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit, + enum ph_burst_type burst_type, uint8_t sapi); int pcu_tx_time_ind(uint32_t fn); int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed); int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len); diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index 2d24c43..e977914 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -108,6 +108,8 @@ uint16_t arfcn; uint8_t is_11bit; uint8_t burst_type; + uint8_t trx_nr; + uint8_t ts_nr; } __attribute__ ((packed)); struct gsm_pcu_if_info_trx { diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 7bf0b09..e640ce9 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1403,7 +1403,8 @@ rach_ind->acc_delay_256bits); /* QTA: Timing Advance in units of 1/4 of a symbol */ - pcu_tx_rach_ind(trx->bts, rach_ind->acc_delay_256bits >> 6, + pcu_tx_rach_ind(trx->bts->nr, trx->nr, rach_ind->chan_nr & 0x07, + rach_ind->acc_delay_256bits >> 6, rach_ind->ra, rach_ind->fn, rach_ind->is_11bit, rach_ind->burst_type, PCU_IF_SAPI_PTCCH); return 0; @@ -1466,7 +1467,8 @@ rach_ind->acc_delay, rach_ind->ra); /* QTA: Timing Advance in units of 1/4 of a symbol */ - pcu_tx_rach_ind(bts, rach_ind->acc_delay_256bits >> 6, + pcu_tx_rach_ind(bts->nr, trx->nr, rach_ind->chan_nr & 0x07, + rach_ind->acc_delay_256bits >> 6, rach_ind->ra, rach_ind->fn, rach_ind->is_11bit, rach_ind->burst_type, PCU_IF_SAPI_RACH); return 0; diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 9fc1d4d..579f8cc 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -379,8 +379,9 @@ return pcu_sock_send(&bts_gsmnet, msg); } -int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, - uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi) +int pcu_tx_rach_ind(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, + int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit, + enum ph_burst_type burst_type, uint8_t sapi) { struct msgb *msg; struct gsm_pcu_if *pcu_prim; @@ -389,7 +390,7 @@ LOGP(DPCU, LOGL_INFO, "Sending RACH indication: qta=%d, ra=%d, " "fn=%d\n", qta, ra, fn); - msg = pcu_msgb_alloc(PCU_IF_MSG_RACH_IND, bts->nr); + msg = pcu_msgb_alloc(PCU_IF_MSG_RACH_IND, bts_nr); if (!msg) return -ENOMEM; pcu_prim = (struct gsm_pcu_if *) msg->data; @@ -401,6 +402,8 @@ rach_ind->fn = fn; rach_ind->is_11bit = is_11bit; rach_ind->burst_type = burst_type; + rach_ind->trx_nr = trx_nr; + rach_ind->ts_nr = ts_nr; return pcu_sock_send(&bts_gsmnet, msg); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6 Gerrit-Change-Number: 16080 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 19:25:10 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 19:25:10 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 ) Change subject: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields ...................................................................... library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields Since there can be multiple PDCH channels configured on different timeslots, different TRXes, and BTSes, the PTCCH/U handling code in OsmoPCU needs to know the exact origin of a given RACH.ind. Otherwise, it is not known which subscriber originated a given PTCCH/U indication, and hence it is impossible to send PTCCH/D Timing Advance notification properly. Fortunately, we can extend the RACH.ind message without even bumping the protocol version, because every single PDU has a fixed size defined by the largest message - INFO.ind. In case if the actual message payload is smaller, the rest is filled with a constant padding byte (0x00). Older versions of OsmoPCU will consider the new fields as padding, while the messages from older OsmoBTS versions will always have both fields set to 0x00. Since C0/TS0 cannot be configured to PDCH, this can be easily detected on the other end. Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1 Related: OS#4102, OS#1545 --- M bts/BTS_Tests.ttcn M library/PCUIF_Types.ttcn M pcu/PCU_Tests_RAW.ttcn 3 files changed, 22 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/81/16081/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 87c9131..779f7c3 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -4170,8 +4170,8 @@ chan_nr := ts_RslChanNr_PDCH(7), link_id := ts_RslLinkID_OSMO_PTCCH(0)); - /* TODO: check time-slot and TRX number as soon as we extend the PCU interface */ - pcu_rach_ind := tr_PCUIF_RACH_IND(ra := ra, fn := fn, sapi := PCU_IF_SAPI_PTCCH); + pcu_rach_ind := tr_PCUIF_RACH_IND(bts_nr := 0, trx_nr := 0, ts_nr := 7, + ra := ra, fn := fn, sapi := PCU_IF_SAPI_PTCCH); /* Expect a RACH.ind on the PCU interface (timeout is one multi-frame) */ T.start(52.0 * 4.615 / 1000.0); @@ -4333,7 +4333,7 @@ timer T := 2.0; T.start; alt { - [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RACH_IND(0, oct2int(ra), 0, ?, fn))) { + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RACH_IND(0, 0, 0, oct2int(ra), 0, ?, fn))) { T.stop; } [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RACH_IND)) { @@ -4382,7 +4382,7 @@ /* Compose the expected message */ pcu_rach_ind := tr_PCUIF_RACH_IND( - bts_nr := 0, + bts_nr := 0, trx_nr := 0, ts_nr := 0, ra := bit2int(ra11), is_11bit := 1, burst_type := pcu_bt, diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index ae0762a..8ce41c4 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -130,7 +130,9 @@ uint32_t fn, uint16_t arfcn, uint8_t is_11bit, - PCUIF_BurstType burst_type + PCUIF_BurstType burst_type, + uint8_t trx_nr, + uint8_t ts_nr } with { variant "" }; type record PCUIF_InfoTrx { @@ -565,6 +567,8 @@ } template (value) PCUIF_Message ts_PCUIF_RACH_IND(template (value) uint8_t bts_nr, + template (value) uint8_t trx_nr, + template (value) uint8_t ts_nr, template (value) uint16_t ra, template (value) uint8_t is_11bit, template (value) PCUIF_BurstType burst_type, @@ -584,11 +588,15 @@ fn := fn, arfcn := arfcn, is_11bit := is_11bit, - burst_type := burst_type + burst_type := burst_type, + trx_nr := trx_nr, + ts_nr := ts_nr } } } template PCUIF_Message tr_PCUIF_RACH_IND(template uint8_t bts_nr := ?, + template uint8_t trx_nr := ?, + template uint8_t ts_nr := ?, template uint16_t ra := ?, template uint8_t is_11bit := ?, template PCUIF_BurstType burst_type := ?, @@ -605,7 +613,9 @@ fn := fn, arfcn := ?, is_11bit := is_11bit, - burst_type := burst_type + burst_type := burst_type, + trx_nr := trx_nr, + ts_nr := ts_nr } } } diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 6a5f5d0..9d0882f 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -515,7 +515,7 @@ /* Send RACH.ind */ log("Sending RACH.ind on fn=", fn, " with RA=", ra, ", TA=", ta); - BTS.send(ts_PCUIF_RACH_IND(bts_nr := bts_nr, + BTS.send(ts_PCUIF_RACH_IND(bts_nr := bts_nr, trx_nr := 0, ts_nr := 0, ra := ra, is_11bit := is_11bit, burst_type := burst_type, fn := fn, arfcn := 871, @@ -524,7 +524,7 @@ /* Expect Immediate (TBF) Assignment on TS0/AGCH */ T.start(2.0); alt { - [] BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := bts_nr, trx_nr := ?, ts_nr := 0, + [] BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := bts_nr, trx_nr := 0, ts_nr := 0, sapi := PCU_IF_SAPI_AGCH, data := ?)) -> value pcu_msg { rr_imm_ass := dec_GsmRrMessage(pcu_msg.u.data_req.data); @@ -778,7 +778,7 @@ 0, 0, 0, 0 }; -private altstep as_ta_ptcch(uint8_t bts_nr := 0, /* TODO: TRX / TS number */ +private altstep as_ta_ptcch(uint8_t bts_nr := 0, uint8_t trx_nr := 0, uint8_t ts_nr := 7, in PTCCH_TAI_ToA_MAP toa_map := ptcch_toa_map_def) runs on RAW_PCU_Test_CT { var RAW_PCU_Event event; @@ -794,7 +794,7 @@ ", fn=", event.data.tdma_fn, ", ToA=", toa_map[ss], " (QTA)"); /* TODO: do we care about RA and burst format? */ - BTS.send(ts_PCUIF_RACH_IND(bts_nr := bts_nr, + BTS.send(ts_PCUIF_RACH_IND(bts_nr, trx_nr, ts_nr, ra := oct2int('3A'O), is_11bit := 0, burst_type := BURST_TYPE_0, @@ -821,7 +821,7 @@ alt { /* Keep sending of Access Bursts during two multi-frames (period of PTCCH/D) * with increasing ToA (Timing of Arrival) values: 0, 7, 14, 28, 35... */ - [] as_ta_ptcch(bts_nr := 0, toa_map := ptcch_toa_map); + [] as_ta_ptcch(bts_nr := 0, trx_nr := 0, ts_nr := 7, toa_map := ptcch_toa_map); /* In the end of 2nd multi-frame we should receive a PTCCH/D block */ [] BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 7, sapi := PCU_IF_SAPI_PTCCH)) -> value pcu_msg { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1 Gerrit-Change-Number: 16081 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 19:37:06 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 19:37:06 +0000 Subject: Change in osmo-pcu[master]: PTCCH: implement basic message codec and API References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16082 ) Change subject: PTCCH: implement basic message codec and API ...................................................................... PTCCH: implement basic message codec and API Change-Id: Id79e95aafdde4a71977c64385fce48b729a51ca9 Related: OS#1545 --- M src/bts.cpp M src/pdch.cpp M src/pdch.h 3 files changed, 54 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/82/16082/1 diff --git a/src/bts.cpp b/src/bts.cpp index a9ff553..24666af 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -252,6 +252,7 @@ for (size_t ts_no = 0; ts_no < ARRAY_SIZE(trx->pdch); ++ts_no) { struct gprs_rlcmac_pdch *pdch = &trx->pdch[ts_no]; + pdch->init_ptcch_msg(); pdch->ts_no = ts_no; pdch->trx = trx; } diff --git a/src/pdch.cpp b/src/pdch.cpp index e4b25e1..beb2c13 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -48,6 +48,7 @@ } #include +#include #include extern void *tall_pcu_ctx; @@ -961,3 +962,37 @@ { return trx->bts->bts_data(); } + +/* PTCCH (Packet Timing Advance Control Channel) */ +void gprs_rlcmac_pdch::init_ptcch_msg(void) +{ + memset(ptcch_msg, PTCCH_TAI_FREE, PTCCH_TAI_NUM); + memset(ptcch_msg + PTCCH_TAI_NUM, PTCCH_PADDING, 7); +} + +uint8_t gprs_rlcmac_pdch::reserve_tai(uint8_t ta) +{ + uint8_t tai; + + for (tai = 0; tai < PTCCH_TAI_NUM; tai++) { + if (ptcch_msg[tai] == PTCCH_TAI_FREE) { + ptcch_msg[tai] = ta; + return tai; + } + } + + /* Special case: no free TAI available */ + return PTCCH_TAI_FREE; +} + +void gprs_rlcmac_pdch::release_tai(uint8_t tai) +{ + OSMO_ASSERT(tai < PTCCH_TAI_NUM); + ptcch_msg[tai] = PTCCH_TAI_FREE; +} + +void gprs_rlcmac_pdch::update_ta(uint8_t tai, uint8_t ta) +{ + OSMO_ASSERT(tai < PTCCH_TAI_NUM); + ptcch_msg[tai] = ta; +} diff --git a/src/pdch.h b/src/pdch.h index 3015023..d55f58e 100644 --- a/src/pdch.h +++ b/src/pdch.h @@ -35,6 +35,11 @@ #include +/* PTCCH (Packet Timing Advance Control Channel) */ +#define PTCCH_TAI_FREE 0x7f /*!< Special value for unused TA Indexes */ +#define PTCCH_TAI_NUM 16 /*!< Number of PTCCH/U slots and thus TA Indexes */ +#define PTCCH_PADDING 0x2b /*!< PTCCH/D messages need to be padded to 23 octets */ + /* * PDCH instance */ @@ -88,6 +93,19 @@ struct llist_head paging_list; /* list of paging messages */ uint32_t last_rts_fn; /* store last frame number of RTS */ + /* PTCCH (Packet Timing Advance Control Channel) */ + uint8_t ptcch_msg[GSM_MACBLOCK_LEN]; /* 'ready to use' PTCCH/D message */ +#ifdef __cplusplus + /* Initialize the PTCCH/D message */ + void init_ptcch_msg(void); + /* Obtain an unused TA Index for a TBF */ + uint8_t reserve_tai(uint8_t ta); + /* Mark a given TA Index as free, so it can be used again */ + void release_tai(uint8_t tai); + /* Update the actual Timing Advance value for a given TA Index */ + void update_ta(uint8_t tai, uint8_t ta); +#endif + /* back pointers */ struct gprs_rlcmac_trx *trx; uint8_t ts_no; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id79e95aafdde4a71977c64385fce48b729a51ca9 Gerrit-Change-Number: 16082 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 19:37:07 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 19:37:07 +0000 Subject: Change in osmo-pcu[master]: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16083 ) Change subject: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH ...................................................................... PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH Change-Id: Ib204acce1a7e33f6651b9da2a7b4a9b9ae461093 Related: OS#1545 --- M src/osmo-bts-litecell15/lc15_l1_if.c M src/osmo-bts-oc2g/oc2g_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.c M src/pcu_l1_if.cpp M src/pcu_l1_if.h 5 files changed, 44 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/83/16083/1 diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index 1df7941..670263f 100644 --- a/src/osmo-bts-litecell15/lc15_l1_if.c +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -161,8 +161,11 @@ case GsmL1_Sapi_Pacch: rc = pcu_rx_rts_req_pdtch(fl1h->trx_no, rts_ind->u8Tn, rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; case GsmL1_Sapi_Ptcch: - // FIXME + rc = pcu_rx_rts_req_ptcch(fl1h->trx_no, rts_ind->u8Tn, + rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; default: break; } diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c index f9768ae..a02e962 100644 --- a/src/osmo-bts-oc2g/oc2g_l1_if.c +++ b/src/osmo-bts-oc2g/oc2g_l1_if.c @@ -162,8 +162,11 @@ case GsmL1_Sapi_Pacch: rc = pcu_rx_rts_req_pdtch(fl1h->trx_no, rts_ind->u8Tn, rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; case GsmL1_Sapi_Ptcch: - // FIXME + rc = pcu_rx_rts_req_ptcch(fl1h->trx_no, rts_ind->u8Tn, + rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; default: break; } diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index 5d127dd..9b310cc 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -144,8 +144,11 @@ case GsmL1_Sapi_Pacch: rc = pcu_rx_rts_req_pdtch(fl1h->trx_no, rts_ind->u8Tn, rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; case GsmL1_Sapi_Ptcch: - // FIXME + rc = pcu_rx_rts_req_ptcch(fl1h->trx_no, rts_ind->u8Tn, + rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; default: break; } diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 883cb22..b8aa401 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -185,24 +185,21 @@ msgb_free(msg); } -void pcu_l1if_tx_ptcch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn, - uint32_t fn, uint8_t block_nr) +void pcu_l1if_tx_ptcch(uint8_t trx, uint8_t ts, uint16_t arfcn, + uint32_t fn, uint8_t block_nr, + uint8_t *data, size_t data_len) { struct gprs_rlcmac_bts *bts = bts_main_data(); if (bts->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_PTCCH)) - gsmtap_send(bts->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PTCCH, 0, fn, 0, 0, msg->data, msg->len); + gsmtap_send(bts->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PTCCH, 0, fn, 0, 0, data, data_len); #ifdef ENABLE_DIRECT_PHY if (bts->trx[trx].fl1h) { - l1if_pdch_req(bts->trx[trx].fl1h, ts, 1, fn, arfcn, block_nr, - msg->data, msg->len); - msgb_free(msg); + l1if_pdch_req(bts->trx[trx].fl1h, ts, 1, fn, arfcn, block_nr, data, msg_len); return; } #endif - pcu_tx_data_req(trx, ts, PCU_IF_SAPI_PTCCH, arfcn, fn, block_nr, - msg->data, msg->len); - msgb_free(msg); + pcu_tx_data_req(trx, ts, PCU_IF_SAPI_PTCCH, arfcn, fn, block_nr, data, data_len); } void pcu_l1if_tx_agch(bitvec * block, int plen) @@ -361,6 +358,25 @@ return gprs_rlcmac_rcv_rts_block(bts_main_data(), trx, ts, fn, block_nr); } +extern "C" int pcu_rx_rts_req_ptcch(uint8_t trx, uint8_t ts, + uint32_t fn, uint8_t block_nr) +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + struct gprs_rlcmac_pdch *pdch; + + /* Prevent buffer overflow */ + if (trx >= ARRAY_SIZE(bts->trx) || ts >= 8) + return -EINVAL; + + /* Make sure PDCH time-slot is enabled */ + pdch = &bts->trx[trx].pdch[ts]; + if (!pdch->m_is_enabled) + return -EAGAIN; + + pcu_l1if_tx_ptcch(trx, ts, bts->trx[trx].arfcn, fn, block_nr, + pdch->ptcch_msg, GSM_MACBLOCK_LEN); + return 0; +} static int pcu_rx_rts_req(struct gsm_pcu_if_rts_req *rts_req) { @@ -377,13 +393,8 @@ rts_req->fn, rts_req->block_nr); break; case PCU_IF_SAPI_PTCCH: - /* FIXME */ - { - struct msgb *msg = msgb_alloc(GSM_MACBLOCK_LEN, "l1_prim"); - memset(msgb_put(msg, GSM_MACBLOCK_LEN), 0x2b, GSM_MACBLOCK_LEN); - pcu_l1if_tx_ptcch(msg, rts_req->trx_nr, rts_req->ts_nr, - rts_req->arfcn, rts_req->fn, rts_req->block_nr); - } + pcu_rx_rts_req_ptcch(rts_req->trx_nr, rts_req->ts_nr, + rts_req->fn, rts_req->block_nr); break; default: LOGP(DL1IF, LOGL_ERROR, "Received PCU RTS request with " diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index cb2a6df..888ad28 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -154,8 +154,9 @@ #ifdef __cplusplus void pcu_l1if_tx_pdtch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn, uint32_t fn, uint8_t block_nr); -void pcu_l1if_tx_ptcch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn, - uint32_t fn, uint8_t block_nr); +void pcu_l1if_tx_ptcch(uint8_t trx, uint8_t ts, uint16_t arfcn, + uint32_t fn, uint8_t block_nr, + uint8_t *data, size_t data_len); void pcu_l1if_tx_agch(bitvec * block, int len); void pcu_l1if_tx_pch(bitvec * block, int plen, const char *imsi); @@ -174,6 +175,8 @@ #endif int pcu_rx_rts_req_pdtch(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr); +int pcu_rx_rts_req_ptcch(uint8_t trx, uint8_t ts, + uint32_t fn, uint8_t block_nr); int pcu_rx_data_ind_pdtch(uint8_t trx, uint8_t ts, uint8_t *data, uint8_t len, uint32_t fn, struct pcu_l1_meas *meas); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ib204acce1a7e33f6651b9da2a7b4a9b9ae461093 Gerrit-Change-Number: 16083 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 19:37:07 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 19:37:07 +0000 Subject: Change in osmo-pcu[master]: pcuif_proto.h: extend RACH.ind with TRX / TS numbers References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16084 ) Change subject: pcuif_proto.h: extend RACH.ind with TRX / TS numbers ...................................................................... pcuif_proto.h: extend RACH.ind with TRX / TS numbers Since there can be multiple PDCH channels configured on different timeslots, different TRXes, and BTSes, the PTCCH/U handling code in OsmoPCU needs to know the exact origin of a given RACH.ind. Otherwise, it is not known which subscriber originated a given PTCCH/U indication, and hence it is impossible to send PTCCH/D Timing Advance notification properly. Fortunately, we can extend the RACH.ind message without even bumping the protocol version, because every single PDU has a fixed size defined by the largest message - INFO.ind. In case if the actual message payload is smaller, the rest is filled with a constant padding byte (0x00). Older versions of OsmoPCU will consider the new fields as padding, while the messages from older OsmoBTS versions will always have both fields set to 0x00. Since C0/TS0 cannot be configured to PDCH, this can be easily detected on the other end. Change-Id: If209001885ffb14b64a8e808df3700d85a4b2ef9 Related: OS#1545 --- M include/osmocom/pcu/pcuif_proto.h 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/84/16084/1 diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h index fd989a5..e88607e 100644 --- a/include/osmocom/pcu/pcuif_proto.h +++ b/include/osmocom/pcu/pcuif_proto.h @@ -108,6 +108,8 @@ uint16_t arfcn; uint8_t is_11bit; uint8_t burst_type; + uint8_t trx_nr; + uint8_t ts_nr; } __attribute__ ((packed)); struct gsm_pcu_if_info_trx { -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If209001885ffb14b64a8e808df3700d85a4b2ef9 Gerrit-Change-Number: 16084 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 19:37:07 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 19:37:07 +0000 Subject: Change in osmo-pcu[master]: PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCH References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16085 ) Change subject: PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCH ...................................................................... PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCH Change-Id: I482d60a46b9d253dfe0b16140eac9fea6420b30c Related: OS#1545 --- M src/bts.cpp M src/bts.h M src/osmo-bts-litecell15/lc15_l1_if.c M src/osmo-bts-oc2g/oc2g_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.c M src/pcu_l1_if.cpp 6 files changed, 113 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/85/16085/1 diff --git a/src/bts.cpp b/src/bts.cpp index 24666af..cf26e77 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -842,6 +842,53 @@ return rc; } +/* PTCCH/U sub-slot / frame-number mapping (see 3GPP TS 45.002, table 6) */ +static uint32_t ptcch_slot_map[PTCCH_TAI_NUM] = { + 12, 38, 64, 90, + 116, 142, 168, 194, + 220, 246, 272, 298, + 324, 350, 376, 402, +}; + +int BTS::rcv_ptcch_rach(uint8_t trx_nr, uint8_t ts_nr, uint32_t fn, int16_t qta) +{ + struct gprs_rlcmac_bts *bts = bts_data(); + struct gprs_rlcmac_pdch *pdch; + uint32_t fn416 = fn % 416; + uint8_t ss; + + /* Prevent buffer overflow */ + if (trx_nr >= ARRAY_SIZE(bts->trx) || ts_nr >= 8) { + LOGP(DRLCMAC, LOGL_ERROR, "Malformed RACH.ind message " + "(TRX=%u TS=%u FN=%u)\n", trx_nr, ts_nr, fn); + return -EINVAL; + } + + /* Make sure PDCH time-slot is enabled */ + pdch = &bts->trx[trx_nr].pdch[ts_nr]; + if (!pdch->m_is_enabled) { + LOGP(DRLCMAC, LOGL_NOTICE, "Rx PTCCH RACH.ind for inactive PDCH " + "(TRX=%u TS=%u FN=%u)\n", trx_nr, ts_nr, fn); + return -EAGAIN; + } + + /* Convert TDMA frame-number to PTCCH/U sub-slot number */ + for (ss = 0; ss < PTCCH_TAI_NUM; ss++) + if (ptcch_slot_map[ss] == fn416) + break; + if (ss == PTCCH_TAI_NUM) { + LOGP(DRLCMAC, LOGL_ERROR, "Failed to map PTCCH/U sub-slot for fn=%u\n", fn); + return -ENODEV; + } + + /* Apply a new Timing Advance value */ + LOGP(DRLCMAC, LOGL_INFO, "Continuous Timing Advance update " + "for TAI %u, new TA is %u\n", ss, qta2ta(qta)); + pdch->update_ta(ss, qta2ta(qta)); + + return 0; +} + void BTS::snd_dl_ass(gprs_rlcmac_tbf *tbf, bool poll, const char *imsi) { int plen; diff --git a/src/bts.h b/src/bts.h index c2cc316..54a29cb 100644 --- a/src/bts.h +++ b/src/bts.h @@ -301,6 +301,7 @@ uint32_t rfn_to_fn(int32_t rfn); int rcv_rach(uint16_t ra, uint32_t Fn, int16_t qta, bool is_11bit, enum ph_burst_type burst_type); + int rcv_ptcch_rach(uint8_t trx_nr, uint8_t ts_nr, uint32_t fn, int16_t qta); void snd_dl_ass(gprs_rlcmac_tbf *tbf, bool poll, const char *imsi); diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index 670263f..307bc7b 100644 --- a/src/osmo-bts-litecell15/lc15_l1_if.c +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -223,10 +223,6 @@ data_ind->u32Fn, &meas); break; - case GsmL1_Sapi_Ptcch: - // FIXME - rc = -1; - break; default: LOGP(DL1IF, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI %s\n", get_value_string(lc15bts_l1sapi_names, data_ind->sapi)); @@ -251,8 +247,26 @@ return 0; 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), true); + + switch (ra_ind->sapi) { +#if 0 + case GsmL1_Sapi_Ptcch: + /* FIXME: we need a pure C function for that */ + BTS::main_bts()->rcv_ptcch_rach( + fl1h->trx_no, ra_ind->u8Tn, ra_ind->u32Fn, + ra_ind->measParam.i16BurstTiming); + break; +#endif + case GsmL1_Sapi_Pdtch: + bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, + qta2ta(ra_ind->measParam.i16BurstTiming), true); + break; + + default: + LOGP(DL1IF, LOGL_NOTICE, "Rx PH-RA.ind for unknown L1 SAPI %s\n", + get_value_string(femtobts_l1sapi_names, ra_ind->sapi)); + return -ENOTSUP; + } return 0; } diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c index a02e962..90c1ec4 100644 --- a/src/osmo-bts-oc2g/oc2g_l1_if.c +++ b/src/osmo-bts-oc2g/oc2g_l1_if.c @@ -229,9 +229,6 @@ data_ind->u32Fn, &meas); break; - case GsmL1_Sapi_Ptcch: - // FIXME - break; default: LOGP(DL1IF, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI %s\n", get_value_string(oc2gbts_l1sapi_names, data_ind->sapi)); @@ -243,15 +240,32 @@ #define MIN_QUAL_RACH 5.0f -static int handle_ph_ra_ind(struct oc2gl1_hdl *fl1h, GsmL1_PhRaInd_t *ra_ind) +static int handle_ph_ra_ind(struct oc3gl1_hdl *fl1h, GsmL1_PhRaInd_t *ra_ind) { if (ra_ind->measParam.fLinkQuality < MIN_QUAL_RACH) return 0; LOGP(DL1IF, LOGL_DEBUG, "PH-RA-IND L1 qta=%d\n", ra_ind->measParam.i16BurstTiming); - bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, - qta2ta(ra_ind->measParam.i16BurstTiming), true); + switch (ra_ind->sapi) { +#if 0 + case GsmL1_Sapi_Ptcch: + /* FIXME: we need a pure C function for that */ + BTS::main_bts()->rcv_ptcch_rach( + fl1h->trx_no, ra_ind->u8Tn, ra_ind->u32Fn, + ra_ind->measParam.i16BurstTiming); + break; +#endif + case GsmL1_Sapi_Pdtch: + bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, + qta2ta(ra_ind->measParam.i16BurstTiming), true); + break; + + default: + LOGP(DL1IF, LOGL_NOTICE, "Rx PH-RA.ind for unknown L1 SAPI %s\n", + get_value_string(femtobts_l1sapi_names, ra_ind->sapi)); + return -ENOTSUP; + } return 0; } diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index 9b310cc..3ac5f69 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -208,10 +208,6 @@ data_ind->u32Fn, &meas); break; - case GsmL1_Sapi_Ptcch: - // FIXME - rc = -1; - break; default: LOGP(DL1IF, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI %s\n", get_value_string(femtobts_l1sapi_names, data_ind->sapi)); @@ -240,8 +236,26 @@ return 0; 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), true); + + switch (ra_ind->sapi) { +#if 0 + case GsmL1_Sapi_Ptcch: + /* FIXME: we need a pure C function for that */ + BTS::main_bts()->rcv_ptcch_rach( + fl1h->trx_no, ra_ind->u8Tn, ra_ind->u32Fn, + ra_ind->measParam.i16BurstTiming); + break; +#endif + case GsmL1_Sapi_Pdtch: + bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, + qta2ta(ra_ind->measParam.i16BurstTiming), true); + break; + + default: + LOGP(DL1IF, LOGL_NOTICE, "Rx PH-RA.ind for unknown L1 SAPI %s\n", + get_value_string(femtobts_l1sapi_names, ra_ind->sapi)); + return -ENOTSUP; + } return 0; } diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index b8aa401..017c3b0 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -421,6 +421,11 @@ rach_ind->qta, rach_ind->is_11bit, (ph_burst_type)rach_ind->burst_type); break; + case PCU_IF_SAPI_PTCCH: + rc = BTS::main_bts()->rcv_ptcch_rach( + rach_ind->trx_nr, rach_ind->ts_nr, + rach_ind->fn, rach_ind->qta); + break; default: LOGP(DL1IF, LOGL_ERROR, "Received PCU rach request with " "unsupported sapi %d\n", rach_ind->sapi); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I482d60a46b9d253dfe0b16140eac9fea6420b30c Gerrit-Change-Number: 16085 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 19:41:51 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 19:41:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 to look at the new patch set (#2). Change subject: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields ...................................................................... library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields Since there can be multiple PDCH channels configured on different timeslots, different TRXes, and BTSes, the PTCCH/U handling code in OsmoPCU needs to know the exact origin of a given RACH.ind. Otherwise, it is not known which subscriber originated a given PTCCH/U indication, and hence it is impossible to send PTCCH/D Timing Advance notification properly. Fortunately, we can extend the RACH.ind message without even bumping the protocol version, because every single PDU has a fixed size defined by the largest message - INFO.ind. In case if the actual message payload is smaller, the rest is filled with a constant padding byte (0x00). Older versions of OsmoPCU will consider the new fields as padding, while the messages from older OsmoBTS versions will always have both fields set to 0x00. Since C0/TS0 cannot be configured to PDCH, this can be easily detected on the other end. Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1 Related: OS#4102, OS#1545 --- M bts/BTS_Tests.ttcn M library/PCUIF_Types.ttcn M pcu/PCU_Tests_RAW.ttcn M pcu/PCU_Tests_RAW_SNS.ttcn 4 files changed, 24 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/81/16081/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1 Gerrit-Change-Number: 16081 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 16 19:58:45 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 16 Nov 2019 19:58:45 +0000 Subject: Change in osmo-pcu[master]: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/16083 to look at the new patch set (#2). Change subject: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH ...................................................................... PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH Change-Id: Ib204acce1a7e33f6651b9da2a7b4a9b9ae461093 Related: OS#1545 --- M src/osmo-bts-litecell15/lc15_l1_if.c M src/osmo-bts-oc2g/oc2g_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.c M src/pcu_l1_if.cpp M src/pcu_l1_if.h 5 files changed, 44 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/83/16083/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ib204acce1a7e33f6651b9da2a7b4a9b9ae461093 Gerrit-Change-Number: 16083 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 10:47:05 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 17 Nov 2019 10:47:05 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit: fix: do not use 'is' / 'is not' with string and numerica... References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16086 ) Change subject: trx_toolkit: fix: do not use 'is' / 'is not' with string and numerical literals ...................................................................... trx_toolkit: fix: do not use 'is' / 'is not' with string and numerical literals Since version 3.8, Python warnins us that using the "is" and "is not" operators with string and numerical literals is a bad idea. Let's avoid this and use the classical '==' and '!=' operators instead. Change-Id: Iaed86d630ac1e0b9b4f72bbf3c788e325783456d Bug description: https://bugs.python.org/issue34850 --- M src/target/trx_toolkit/fake_trx.py M src/target/trx_toolkit/trx_sniff.py 2 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/86/16086/1 diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py index 8beee6e..f226f03 100755 --- a/src/target/trx_toolkit/fake_trx.py +++ b/src/target/trx_toolkit/fake_trx.py @@ -4,7 +4,7 @@ # TRX Toolkit # Virtual Um-interface (fake transceiver) # -# (C) 2017-2018 by Vadim Yanitskiy +# (C) 2017-2019 by Vadim Yanitskiy # # All Rights Reserved # @@ -22,7 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -APP_CR_HOLDERS = [("2017-2018", "Vadim Yanitskiy ")] +APP_CR_HOLDERS = [("2017-2019", "Vadim Yanitskiy ")] import logging as log import signal @@ -131,7 +131,7 @@ @property def toa256(self): # Check if randomization is required - if self.toa256_rand_threshold is 0: + if self.toa256_rand_threshold == 0: return self.toa256_base # Generate a random ToA value in required range @@ -142,7 +142,7 @@ @property def rssi(self): # Check if randomization is required - if self.rssi_rand_threshold is 0: + if self.rssi_rand_threshold == 0: return self.rssi_base # Generate a random RSSI value in required range @@ -153,7 +153,7 @@ @property def ci(self): # Check if randomization is required - if self.ci_rand_threshold is 0: + if self.ci_rand_threshold == 0: return self.ci_base # Generate a random C/I value in required range @@ -165,7 +165,7 @@ # Returns: True - drop, False - keep def sim_burst_drop(self, msg): # Check if dropping is required - if self.burst_drop_amount is 0: + if self.burst_drop_amount == 0: return False if msg.fn % self.burst_drop_period == 0: @@ -212,7 +212,7 @@ self._handle_data_msg_v1(src_msg, msg) # Apply optional Timing Advance - if src_trx.ta is not 0: + if src_trx.ta != 0: msg.toa256 -= src_trx.ta * 256 # Path loss simulation @@ -384,7 +384,7 @@ def append_child_trx(self, remote_addr, base_port, child_idx, name = None): # Index 0 corresponds to the first transceiver - if child_idx is 0: + if child_idx == 0: self.append_trx(remote_addr, base_port, name) return diff --git a/src/target/trx_toolkit/trx_sniff.py b/src/target/trx_toolkit/trx_sniff.py index 7e5c2bd..6671c35 100755 --- a/src/target/trx_toolkit/trx_sniff.py +++ b/src/target/trx_toolkit/trx_sniff.py @@ -112,7 +112,7 @@ msg.validate() except ValueError as e: desc = msg.desc_hdr() - if desc is "": + if desc == "": desc = "parsing error" log.warning("Ignoring an incorrect message (%s): %s" % (desc, e)) self.cnt_burst_dropped_num += 1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iaed86d630ac1e0b9b4f72bbf3c788e325783456d Gerrit-Change-Number: 16086 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 10:47:06 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 17 Nov 2019 10:47:06 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_rr.c: fix NULL-pointer dereference in gsm48_rr_check_mode() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16087 ) Change subject: mobile/gsm48_rr.c: fix NULL-pointer dereference in gsm48_rr_check_mode() ...................................................................... mobile/gsm48_rr.c: fix NULL-pointer dereference in gsm48_rr_check_mode() In some cases (e.g. at start up) ms->rrlayer may not be initialized. Let's access ms->settings directly since we already have a pointer to struct osmocom_ms. Change-Id: Ia9720132fcda960dcecefab9ae48398946503dc4 --- M src/host/layer23/src/mobile/gsm48_rr.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/87/16087/1 diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index 254183e..b3da258 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -319,7 +319,7 @@ int gsm48_rr_alter_delay(struct osmocom_ms *ms) { struct gsm48_rrlayer *rr = &ms->rrlayer; - struct gsm_settings *set = &rr->ms->settings; + struct gsm_settings *set = &ms->settings; if (rr->state != GSM48_RR_ST_DEDICATED) return -EINVAL; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia9720132fcda960dcecefab9ae48398946503dc4 Gerrit-Change-Number: 16087 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 12:11:57 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 17 Nov 2019 12:11:57 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_mm.h: mark some structures as 'packed' References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16088 ) Change subject: mobile/gsm48_mm.h: mark some structures as 'packed' ...................................................................... mobile/gsm48_mm.h: mark some structures as 'packed' In several code paths we put / push structures from 'gsm48_mm.h' into the message buffers, so then they're unpacked by the message receivers. The AddressSanitizer complains about unaligned pointer access and potentially unexpected behaviour. Let's fix this by explicitly marking those structures as 'packed'. Change-Id: I6af7475c609b3293af708540d569fe1616fab43f --- M src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/88/16088/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h index 93e7c4c..09d18ed 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h @@ -61,7 +61,7 @@ uint8_t sapi; /* sapi */ uint8_t emergency; /* emergency type of call */ uint8_t cause; /* cause used for release */ -}; +} __attribute__((packed)); /* GSM 6.1.2 */ #define GSM48_MMR_REG_REQ 0x01 @@ -74,7 +74,7 @@ int msg_type; uint8_t cause; -}; +} __attribute__((packed)); /* GSM 04.07 9.2.1 */ #define GSM48_MMXX_ST_IDLE 0 @@ -140,7 +140,7 @@ uint32_t msg_type; uint8_t sres[4]; -}; +} __attribute__((packed)); /* GSM 04.08 MM timers */ #define GSM_T3210_MS 20, 0 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I6af7475c609b3293af708540d569fe1616fab43f Gerrit-Change-Number: 16088 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 12:11:58 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 17 Nov 2019 12:11:58 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_mm.h: use fixed-size integer types in packed structures References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16089 ) Change subject: mobile/gsm48_mm.h: use fixed-size integer types in packed structures ...................................................................... mobile/gsm48_mm.h: use fixed-size integer types in packed structures Change-Id: I54ed93c03ebe776bdc7eb761a8194da3ab0b67fb --- M src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/89/16089/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h index 09d18ed..bf3aa25 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h @@ -55,7 +55,7 @@ /* MMxx-SAP header */ struct gsm48_mmxx_hdr { - int msg_type; /* MMxx_* primitive */ + uint16_t msg_type; /* MMxx_* primitive */ uint32_t ref; /* reference to transaction */ uint32_t transaction_id; /* transaction identifier */ uint8_t sapi; /* sapi */ @@ -71,8 +71,7 @@ /* MMR-SAP header */ struct gsm48_mmr { - int msg_type; - + uint8_t msg_type; uint8_t cause; } __attribute__((packed)); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I54ed93c03ebe776bdc7eb761a8194da3ab0b67fb Gerrit-Change-Number: 16089 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 17 Nov 2019 15:37:50 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16090 ) Change subject: trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation ...................................................................... trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation The burst transformation in BurstForwarder.forward_msg() used to be done only once, so then the resulting message was distributed over the list of connected (and active) transceivers. This approach limits the path loss simulation capabilities, because a reference to the same message is passed to FakeTRX.send_data_msg(). If one transceiver changes (or removes) the burst bits, the other transceivers would not receive the original message. Let's do the transformation individually for each transceiver, so the original message will always remain unchanged. Change-Id: Ia016a3a9bb6e9f17182a7168aa5a501ae9b9978b --- M src/target/trx_toolkit/burst_fwd.py M src/target/trx_toolkit/fake_trx.py 2 files changed, 5 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/90/16090/1 diff --git a/src/target/trx_toolkit/burst_fwd.py b/src/target/trx_toolkit/burst_fwd.py index b418aef..fd6013b 100644 --- a/src/target/trx_toolkit/burst_fwd.py +++ b/src/target/trx_toolkit/burst_fwd.py @@ -65,12 +65,6 @@ self.trx_list.remove(trx) def forward_msg(self, src_trx, rx_msg): - # Transform from L12TRX to TRX2L1 - tx_msg = rx_msg.gen_trx2l1() - if tx_msg is None: - log.error("Forwarding failed, could not transform " - "message (%s) => dropping..." % rx_msg.desc_hdr()) - # Iterate over all known transceivers for trx in self.trx_list: if trx == src_trx: @@ -81,7 +75,9 @@ continue if trx.rx_freq != src_trx.tx_freq: continue - if tx_msg.tn not in trx.ts_list: + if rx_msg.tn not in trx.ts_list: continue - trx.send_data_msg(src_trx, rx_msg, tx_msg) + # Transform from L12TRX to TRX2L1 and forward + tx_msg = rx_msg.gen_trx2l1(ver = trx.data_if._hdr_ver) + trx.handle_data_msg(src_trx, rx_msg, tx_msg) diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py index 8beee6e..5153722 100755 --- a/src/target/trx_toolkit/fake_trx.py +++ b/src/target/trx_toolkit/fake_trx.py @@ -199,10 +199,7 @@ # Takes (partially initialized) TRX2L1 message, # simulates RF path parameters (such as RSSI), # and sends towards the L1 - def send_data_msg(self, src_trx, src_msg, msg): - # Override header version - msg.ver = self.data_if._hdr_ver - + def handle_data_msg(self, src_trx, src_msg, msg): # Complete message header msg.toa256 = self.toa256 msg.rssi = self.rssi -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia016a3a9bb6e9f17182a7168aa5a501ae9b9978b Gerrit-Change-Number: 16090 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 17 Nov 2019 15:37:50 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/data_msg.py: fix: NOPE.ind also contains C/I filed References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16091 ) Change subject: trx_toolkit/data_msg.py: fix: NOPE.ind also contains C/I filed ...................................................................... trx_toolkit/data_msg.py: fix: NOPE.ind also contains C/I filed Change-Id: I281fb7387a83fec7e097ebf8650c95713d3f70e9 --- M src/target/trx_toolkit/data_msg.py 1 file changed, 6 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/91/16091/1 diff --git a/src/target/trx_toolkit/data_msg.py b/src/target/trx_toolkit/data_msg.py index ec59b85..c96dddb 100644 --- a/src/target/trx_toolkit/data_msg.py +++ b/src/target/trx_toolkit/data_msg.py @@ -630,7 +630,8 @@ if self.toa256 < self.TOA256_MIN or self.toa256 > self.TOA256_MAX: raise ValueError("ToA256 %d is out of range" % self.toa256) - if self.ver >= 0x01: + # Version specific parameters (omited for NOPE.ind) + if self.ver >= 0x01 and not self.nope_ind: if type(self.mod_type) is not Modulation: raise ValueError("Unknown Rx modulation type") @@ -650,6 +651,8 @@ if self.tsc not in self.TSC_RANGE: raise ValueError("TSC %d is out of range" % self.tsc) + # Version specific parameters (also present in NOPE.ind) + if self.ver >= 0x01: if self.ci is None: raise ValueError("C/I is not set") @@ -779,10 +782,7 @@ buf.append(mts) # C/I: Carrier-to-Interference ratio (in centiBels) - if not self.nope_ind: - buf += struct.pack(">h", self.ci) - else: - buf += bytearray(2) + buf += struct.pack(">h", self.ci) return buf @@ -799,10 +799,7 @@ self.parse_mts(hdr[8]) # C/I: Carrier-to-Interference ratio (in centiBels) - if not self.nope_ind: - self.ci = struct.unpack(">h", hdr[9:11])[0] - else: - self.ci = None + self.ci = struct.unpack(">h", hdr[9:11])[0] # Generates message specific burst def gen_burst(self): -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I281fb7387a83fec7e097ebf8650c95713d3f70e9 Gerrit-Change-Number: 16091 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 15:37:51 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 17 Nov 2019 15:37:51 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16092 ) Change subject: trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation ...................................................................... trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation Since TRXD header version 1, we should send NOPE indications to the L1 side in absence of TRX2L1 bursts, and IDLE indications during IDLE TDMA frames (basically noise measurements). This change is the first step towards the goal: if a given burst is to be dropped due to the path loss simulation (see FAKE_DROP), mark the carrier TRX2L1 message as NOPE.ind and send anyway. Change-Id: Iabd0af665e3108d23a908638f943a5b689986e2c Related: OS#3428, OS#2975 --- M src/target/trx_toolkit/fake_trx.py 1 file changed, 27 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/92/16092/1 diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py index 5153722..50111bf 100755 --- a/src/target/trx_toolkit/fake_trx.py +++ b/src/target/trx_toolkit/fake_trx.py @@ -4,7 +4,7 @@ # TRX Toolkit # Virtual Um-interface (fake transceiver) # -# (C) 2017-2018 by Vadim Yanitskiy +# (C) 2017-2019 by Vadim Yanitskiy # # All Rights Reserved # @@ -22,7 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -APP_CR_HOLDERS = [("2017-2018", "Vadim Yanitskiy ")] +APP_CR_HOLDERS = [("2017-2019", "Vadim Yanitskiy ")] import logging as log import signal @@ -110,6 +110,11 @@ RSSI_BASE_DEFAULT = -60 CI_BASE_DEFAULT = 90 + # Default values for NOPE / IDLE indications + TOA256_NOISE_DEFAULT = 0 + RSSI_NOISE_DEFAULT = -110 + CI_NOISE_DEFAULT = -30 + def __init__(self, *trx_args, **trx_kwargs): Transceiver.__init__(self, *trx_args, **trx_kwargs) @@ -177,9 +182,6 @@ return False def _handle_data_msg_v1(self, src_msg, msg): - # TODO: NOPE indications are not (yet) supported - msg.nope_ind = False - # C/I (Carrier-to-Interference ratio) msg.ci = self.ci @@ -200,6 +202,26 @@ # simulates RF path parameters (such as RSSI), # and sends towards the L1 def handle_data_msg(self, src_trx, src_msg, msg): + # Path loss simulation + msg.nope_ind = self.sim_burst_drop(msg) + if msg.nope_ind: + # Before TRXDv1, we simply drop the message + if msg.ver < 0x01: + del msg + return + + # Since TRXDv1, we should send a NOPE.ind + del msg.burst # burst bits are omited + msg.burst = None + + # TODO: shoud we make these values configurable? + msg.toa256 = self.TOA256_NOISE_DEFAULT + msg.rssi = self.RSSI_NOISE_DEFAULT + msg.ci = self.CI_NOISE_DEFAULT + + self.data_if.send_msg(msg) + return + # Complete message header msg.toa256 = self.toa256 msg.rssi = self.rssi @@ -212,10 +234,6 @@ if src_trx.ta is not 0: msg.toa256 -= src_trx.ta * 256 - # Path loss simulation - if self.sim_burst_drop(msg): - return - # TODO: make legacy mode configurable (via argv?) self.data_if.send_msg(msg, legacy = True) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iabd0af665e3108d23a908638f943a5b689986e2c Gerrit-Change-Number: 16092 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sun Nov 17 18:24:25 2019 From: admin at opensuse.org (OBS Notification) Date: Sun, 17 Nov 2019 18:24:25 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5dd190648a424_30592ad84be765f06705ac@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Raspbian_10/armv7l Package network:osmocom:nightly/limesuite failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 384s] /usr/bin/ld: libLimeSuite.so.19.04.0: undefined reference to `__atomic_load_8' [ 384s] /usr/bin/ld: libLimeSuite.so.19.04.0: undefined reference to `__atomic_store_8' [ 384s] collect2: error: ld returned 1 exit status [ 384s] make[3]: *** [src/CMakeFiles/boardEmulator.dir/build.make:89: src/boardEmulator] Error 1 [ 384s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 384s] make[2]: *** [CMakeFiles/Makefile2:216: src/CMakeFiles/boardEmulator.dir/all] Error 2 [ 389s] [ 43%] Linking CXX static library liboglGraph.a [ 389s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src/oglGraph && /usr/bin/cmake -P CMakeFiles/oglGraph.dir/cmake_clean_target.cmake [ 389s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src/oglGraph && /usr/bin/cmake -E cmake_link_script CMakeFiles/oglGraph.dir/link.txt --verbose=1 [ 389s] /usr/bin/ar qc liboglGraph.a CMakeFiles/oglGraph.dir/dlgMarkers.cpp.o CMakeFiles/oglGraph.dir/GLFont.cpp.o CMakeFiles/oglGraph.dir/OpenGLGraph.cpp.o CMakeFiles/oglGraph.dir/glew/glew.c.o [ 389s] /usr/bin/ranlib liboglGraph.a [ 389s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 389s] [ 43%] Built target oglGraph [ 389s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 389s] make[1]: *** [Makefile:133: all] Error 2 [ 389s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 389s] dh_auto_build: cd obj-arm-linux-gnueabihf && make -j4 returned exit code 2 [ 389s] make: *** [debian/rules:28: binary] Error 2 [ 389s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 389s] [ 389s] armbuild21 failed "build limesuite_19.04.0-1.dsc" at Sun Nov 17 18:24:16 UTC 2019. [ 389s] [ 389s] ### VM INTERACTION START ### [ 392s] [ 367.619377] sysrq: SysRq : Power Off [ 392s] [ 367.681603] reboot: Power down [ 393s] ### VM INTERACTION END ### [ 393s] [ 393s] armbuild21 failed "build limesuite_19.04.0-1.dsc" at Sun Nov 17 18:24:20 UTC 2019. [ 393s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sun Nov 17 21:55:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 17 Nov 2019 21:55:11 +0000 Subject: Change in osmo-pcu[master]: PTCCH: implement basic message codec and API In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16082 ) Change subject: PTCCH: implement basic message codec and API ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id79e95aafdde4a71977c64385fce48b729a51ca9 Gerrit-Change-Number: 16082 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 17 Nov 2019 21:55:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 21:55:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 17 Nov 2019 21:55:40 +0000 Subject: Change in osmo-pcu[master]: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16083 ) Change subject: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ib204acce1a7e33f6651b9da2a7b4a9b9ae461093 Gerrit-Change-Number: 16083 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 17 Nov 2019 21:55:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 22:52:20 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 22:52:20 +0000 Subject: Change in osmo-bts[master]: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16080 ) Change subject: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6 Gerrit-Change-Number: 16080 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 22:52:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:04:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:04:53 +0000 Subject: Change in osmo-pcu[master]: PTCCH: implement basic message codec and API In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16082 ) Change subject: PTCCH: implement basic message codec and API ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/c/osmo-pcu/+/16082/1/src/pdch.h File src/pdch.h: https://gerrit.osmocom.org/c/osmo-pcu/+/16082/1/src/pdch.h at 98 PS1, Line 98: #ifdef __cplusplus Move this block upwards to be inside the other cplusplus block. https://gerrit.osmocom.org/c/osmo-pcu/+/16082/1/src/pdch.cpp File src/pdch.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/16082/1/src/pdch.cpp at 970 PS1, Line 970: memset(ptcch_msg + PTCCH_TAI_NUM, PTCCH_PADDING, 7); what is this 7? -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id79e95aafdde4a71977c64385fce48b729a51ca9 Gerrit-Change-Number: 16082 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:04:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:08:56 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:08:56 +0000 Subject: Change in osmo-pcu[master]: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16083 ) Change subject: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ib204acce1a7e33f6651b9da2a7b4a9b9ae461093 Gerrit-Change-Number: 16083 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:08:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:09:49 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:09:49 +0000 Subject: Change in osmo-pcu[master]: pcuif_proto.h: extend RACH.ind with TRX / TS numbers In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16084 ) Change subject: pcuif_proto.h: extend RACH.ind with TRX / TS numbers ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If209001885ffb14b64a8e808df3700d85a4b2ef9 Gerrit-Change-Number: 16084 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:09:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:14:56 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:14:56 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 ) Change subject: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1 Gerrit-Change-Number: 16081 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:14:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:16:01 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:16:01 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit: fix: do not use 'is' / 'is not' with string and numerica... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16086 ) Change subject: trx_toolkit: fix: do not use 'is' / 'is not' with string and numerical literals ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iaed86d630ac1e0b9b4f72bbf3c788e325783456d Gerrit-Change-Number: 16086 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:16:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:19:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:19:09 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_rr.c: fix NULL-pointer dereference in gsm48_rr_check_mode() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16087 ) Change subject: mobile/gsm48_rr.c: fix NULL-pointer dereference in gsm48_rr_check_mode() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia9720132fcda960dcecefab9ae48398946503dc4 Gerrit-Change-Number: 16087 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:19:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:19:40 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:19:40 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_mm.h: mark some structures as 'packed' In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16088 ) Change subject: mobile/gsm48_mm.h: mark some structures as 'packed' ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I6af7475c609b3293af708540d569fe1616fab43f Gerrit-Change-Number: 16088 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:19:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:20:31 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:20:31 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_mm.h: use fixed-size integer types in packed structures In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16089 ) Change subject: mobile/gsm48_mm.h: use fixed-size integer types in packed structures ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I54ed93c03ebe776bdc7eb761a8194da3ab0b67fb Gerrit-Change-Number: 16089 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:20:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:23:26 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:23:26 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16090 ) Change subject: trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia016a3a9bb6e9f17182a7168aa5a501ae9b9978b Gerrit-Change-Number: 16090 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:23:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:27:18 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:27:18 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/data_msg.py: fix: NOPE.ind also contains C/I filed In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16091 ) Change subject: trx_toolkit/data_msg.py: fix: NOPE.ind also contains C/I filed ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I281fb7387a83fec7e097ebf8650c95713d3f70e9 Gerrit-Change-Number: 16091 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:27:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 17 23:31:29 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 17 Nov 2019 23:31:29 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16092 ) Change subject: trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iabd0af665e3108d23a908638f943a5b689986e2c Gerrit-Change-Number: 16092 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 17 Nov 2019 23:31:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 03:13:51 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 18 Nov 2019 03:13:51 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit: fix: do not use 'is' / 'is not' with string and numerica... In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16086 ) Change subject: trx_toolkit: fix: do not use 'is' / 'is not' with string and numerical literals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iaed86d630ac1e0b9b4f72bbf3c788e325783456d Gerrit-Change-Number: 16086 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 18 Nov 2019 03:13:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 03:14:05 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 18 Nov 2019 03:14:05 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit: fix: do not use 'is' / 'is not' with string and numerica... In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16086 ) Change subject: trx_toolkit: fix: do not use 'is' / 'is not' with string and numerical literals ...................................................................... trx_toolkit: fix: do not use 'is' / 'is not' with string and numerical literals Since version 3.8, Python warnins us that using the "is" and "is not" operators with string and numerical literals is a bad idea. Let's avoid this and use the classical '==' and '!=' operators instead. Change-Id: Iaed86d630ac1e0b9b4f72bbf3c788e325783456d Bug description: https://bugs.python.org/issue34850 --- M src/target/trx_toolkit/fake_trx.py M src/target/trx_toolkit/trx_sniff.py 2 files changed, 9 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py index 8beee6e..f226f03 100755 --- a/src/target/trx_toolkit/fake_trx.py +++ b/src/target/trx_toolkit/fake_trx.py @@ -4,7 +4,7 @@ # TRX Toolkit # Virtual Um-interface (fake transceiver) # -# (C) 2017-2018 by Vadim Yanitskiy +# (C) 2017-2019 by Vadim Yanitskiy # # All Rights Reserved # @@ -22,7 +22,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -APP_CR_HOLDERS = [("2017-2018", "Vadim Yanitskiy ")] +APP_CR_HOLDERS = [("2017-2019", "Vadim Yanitskiy ")] import logging as log import signal @@ -131,7 +131,7 @@ @property def toa256(self): # Check if randomization is required - if self.toa256_rand_threshold is 0: + if self.toa256_rand_threshold == 0: return self.toa256_base # Generate a random ToA value in required range @@ -142,7 +142,7 @@ @property def rssi(self): # Check if randomization is required - if self.rssi_rand_threshold is 0: + if self.rssi_rand_threshold == 0: return self.rssi_base # Generate a random RSSI value in required range @@ -153,7 +153,7 @@ @property def ci(self): # Check if randomization is required - if self.ci_rand_threshold is 0: + if self.ci_rand_threshold == 0: return self.ci_base # Generate a random C/I value in required range @@ -165,7 +165,7 @@ # Returns: True - drop, False - keep def sim_burst_drop(self, msg): # Check if dropping is required - if self.burst_drop_amount is 0: + if self.burst_drop_amount == 0: return False if msg.fn % self.burst_drop_period == 0: @@ -212,7 +212,7 @@ self._handle_data_msg_v1(src_msg, msg) # Apply optional Timing Advance - if src_trx.ta is not 0: + if src_trx.ta != 0: msg.toa256 -= src_trx.ta * 256 # Path loss simulation @@ -384,7 +384,7 @@ def append_child_trx(self, remote_addr, base_port, child_idx, name = None): # Index 0 corresponds to the first transceiver - if child_idx is 0: + if child_idx == 0: self.append_trx(remote_addr, base_port, name) return diff --git a/src/target/trx_toolkit/trx_sniff.py b/src/target/trx_toolkit/trx_sniff.py index 7e5c2bd..6671c35 100755 --- a/src/target/trx_toolkit/trx_sniff.py +++ b/src/target/trx_toolkit/trx_sniff.py @@ -112,7 +112,7 @@ msg.validate() except ValueError as e: desc = msg.desc_hdr() - if desc is "": + if desc == "": desc = "parsing error" log.warning("Ignoring an incorrect message (%s): %s" % (desc, e)) self.cnt_burst_dropped_num += 1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iaed86d630ac1e0b9b4f72bbf3c788e325783456d Gerrit-Change-Number: 16086 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 03:14:05 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 18 Nov 2019 03:14:05 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_rr.c: fix NULL-pointer dereference in gsm48_rr_check_mode() In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16087 ) Change subject: mobile/gsm48_rr.c: fix NULL-pointer dereference in gsm48_rr_check_mode() ...................................................................... mobile/gsm48_rr.c: fix NULL-pointer dereference in gsm48_rr_check_mode() In some cases (e.g. at start up) ms->rrlayer may not be initialized. Let's access ms->settings directly since we already have a pointer to struct osmocom_ms. Change-Id: Ia9720132fcda960dcecefab9ae48398946503dc4 --- M src/host/layer23/src/mobile/gsm48_rr.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index 254183e..b3da258 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -319,7 +319,7 @@ int gsm48_rr_alter_delay(struct osmocom_ms *ms) { struct gsm48_rrlayer *rr = &ms->rrlayer; - struct gsm_settings *set = &rr->ms->settings; + struct gsm_settings *set = &ms->settings; if (rr->state != GSM48_RR_ST_DEDICATED) return -EINVAL; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia9720132fcda960dcecefab9ae48398946503dc4 Gerrit-Change-Number: 16087 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 03:14:05 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 18 Nov 2019 03:14:05 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_mm.h: mark some structures as 'packed' In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16088 ) Change subject: mobile/gsm48_mm.h: mark some structures as 'packed' ...................................................................... mobile/gsm48_mm.h: mark some structures as 'packed' In several code paths we put / push structures from 'gsm48_mm.h' into the message buffers, so then they're unpacked by the message receivers. The AddressSanitizer complains about unaligned pointer access and potentially unexpected behaviour. Let's fix this by explicitly marking those structures as 'packed'. Change-Id: I6af7475c609b3293af708540d569fe1616fab43f --- M src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h index 93e7c4c..09d18ed 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h @@ -61,7 +61,7 @@ uint8_t sapi; /* sapi */ uint8_t emergency; /* emergency type of call */ uint8_t cause; /* cause used for release */ -}; +} __attribute__((packed)); /* GSM 6.1.2 */ #define GSM48_MMR_REG_REQ 0x01 @@ -74,7 +74,7 @@ int msg_type; uint8_t cause; -}; +} __attribute__((packed)); /* GSM 04.07 9.2.1 */ #define GSM48_MMXX_ST_IDLE 0 @@ -140,7 +140,7 @@ uint32_t msg_type; uint8_t sres[4]; -}; +} __attribute__((packed)); /* GSM 04.08 MM timers */ #define GSM_T3210_MS 20, 0 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I6af7475c609b3293af708540d569fe1616fab43f Gerrit-Change-Number: 16088 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 08:19:02 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 18 Nov 2019 08:19:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010 ) Change subject: PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5d503d5a9c46cb9de84fbabd2d591afbe4216fdb Gerrit-Change-Number: 16010 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 18 Nov 2019 08:19:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 08:32:24 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 18 Nov 2019 08:32:24 +0000 Subject: Change in osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010 ) Change subject: PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf ...................................................................... PCU_Tests_RAW.ttcn: fix the expectations of TC_cs_lqual_ul_tbf As it turned out, OsmoPCU is not supposed to change the Coding Scheme immediately when the recent link quality value leaves the current window. Instead, in order to avoid rapid changes of the Coding Scheme, it also takes the previous value into account. Thus the current Coding Scheme is only changed if both current and old values fit into a new window. This change makes the test case pass. Change-Id: I5d503d5a9c46cb9de84fbabd2d591afbe4216fdb --- M pcu/PCU_Tests_RAW.ttcn 1 file changed, 20 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index af1ef99..6a5f5d0 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -912,8 +912,11 @@ tai6_ta := ?)); } -/* Default link quality adaptation (Coding Scheme) ranges: -/* CS1: ... 6 dB, CS2: 5 .. 8 dB, CS3: 7 .. 13 db, CS4: 12 ... dB */ +/* Default link quality adaptation (Coding Scheme) ranges (inclusive). + * OsmoPCU (VTY): cs link-quality-ranges cs1 6 cs2 5 8 cs3 7 13 cs4 12 + * + * NOTE: the ranges are intentionally overlapping because OsmoPCU + * does not change CS/MCS on the range borders (5-6, 7-8, 12-13). */ private template integer CS1_lqual_dB_range := (-infinity .. 6); private template integer CS2_lqual_dB_range := (5 .. 8); private template integer CS3_lqual_dB_range := (7 .. 13); @@ -952,14 +955,22 @@ /* HACK: patch missing TLLI; otherwise OsmoPCU rejects DATA.req */ ul_data.data.tlli := '00000001'O; - /* 16 UL blocks (0 .. 32 dB, step = 2 dB) */ + /* The actual / old link quality values. We need to keep track of the old + * (basically previous) link quality value, because OsmoPCU actually + * changes the coding scheme if not only the actual, but also the old + * value leaves the current link quality range (window). */ + var integer lqual := 0; + var integer lqual_old; + + /* 16 UL blocks (0 .. 15 dB, step = 1 dB) */ for (var integer i := 0; i < 16; i := i + 1) { /* Prepare a new UL block (CV, random payload) */ ul_data.data.mac_hdr.countdown := (15 - i); ul_data.data.blocks := { valueof(t_RLCMAC_LLCBLOCK(f_rnd_octstring(10))) }; - /* Link quality in dB and our CS1-4 expectations */ - var integer lqual := i * 2; + /* Update the old / actual link quality */ + lqual_old := lqual; + lqual := i; /* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */ log("Sending DATA.ind with link quality (dB): ", lqual); @@ -971,9 +982,11 @@ log("Rx Packet Uplink ACK / NACK with Channel Coding Command: ", dl_block.ctrl.payload.u.ul_ack_nack.gprs.ch_coding_cmd); - /* Match the received Channel Coding Command */ + /* Match the received Channel Coding Command. Since we are increasing + * the link quality value on each iteration and not decreasing, there + * is no need to check the both old and current link quality values. */ var template ChCodingCommand ch_coding; - select (lqual) { + select (lqual_old) { case (CS1_lqual_dB_range) { ch_coding := CH_CODING_CS1; } case (CS2_lqual_dB_range) { ch_coding := CH_CODING_CS2; } case (CS3_lqual_dB_range) { ch_coding := CH_CODING_CS3; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5d503d5a9c46cb9de84fbabd2d591afbe4216fdb Gerrit-Change-Number: 16010 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 12:34:18 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 18 Nov 2019 12:34:18 +0000 Subject: Change in osmo-pcu[master]: PTCCH: implement basic message codec and API In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16082 ) Change subject: PTCCH: implement basic message codec and API ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/c/osmo-pcu/+/16082/1/src/pdch.h File src/pdch.h: https://gerrit.osmocom.org/c/osmo-pcu/+/16082/1/src/pdch.h at 98 PS1, Line 98: #ifdef __cplusplus > Move this block upwards to be inside the other cplusplus block. I would want to keep this as a separate block with PTCCH specific API. https://gerrit.osmocom.org/c/osmo-pcu/+/16082/1/src/pdch.cpp File src/pdch.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/16082/1/src/pdch.cpp at 970 PS1, Line 970: memset(ptcch_msg + PTCCH_TAI_NUM, PTCCH_PADDING, 7); > what is this 7? It's padding length. Could be: * sizeof(ptcch_msg) - PTCCH_TAI_NUM; * GSM_MACBLOCK_LEN - PTCCH_TAI_NUM; * another #define PTCCH_PAD_LEN. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id79e95aafdde4a71977c64385fce48b729a51ca9 Gerrit-Change-Number: 16082 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 18 Nov 2019 12:34:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 12:51:44 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 18 Nov 2019 12:51:44 +0000 Subject: Change in osmo-msc[master]: a_iface_bssap: add context information to log output In-Reply-To: References: Message-ID: dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/13319 ) Change subject: a_iface_bssap: add context information to log output ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/13319 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I704954edc8677688fc7cccd2b23d2aff958ebf32 Gerrit-Change-Number: 13319 Gerrit-PatchSet: 5 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: dexter Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 14:35:16 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 18 Nov 2019 14:35:16 +0000 Subject: Change in osmo-bsc[master]: abis_nm.c: fix error message in verify_chan_comb() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16093 ) Change subject: abis_nm.c: fix error message in verify_chan_comb() ...................................................................... abis_nm.c: fix error message in verify_chan_comb() Change-Id: Ic72753d821c3ab72cda79be71aed1704beefe983 --- M src/osmo-bsc/abis_nm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/93/16093/1 diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 523cc38..572d762 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -1797,7 +1797,7 @@ /* not allowed for TS0 of BCCH-TRX */ if (ts->trx == ts->trx->bts->c0 && ts->nr == 0) { - *reason = "SDCCH/8 must be on TS0."; + *reason = "SDCCH/8 must not be on C0/TS0."; return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic72753d821c3ab72cda79be71aed1704beefe983 Gerrit-Change-Number: 16093 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 14:35:16 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 18 Nov 2019 14:35:16 +0000 Subject: Change in osmo-bsc[master]: abis_nm.c: replace magic numbers with NM_CHANC_* constants References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16094 ) Change subject: abis_nm.c: replace magic numbers with NM_CHANC_* constants ...................................................................... abis_nm.c: replace magic numbers with NM_CHANC_* constants Change-Id: I60b20d617bd8710a95977e41ae32a431af4402a9 --- M src/osmo-bsc/abis_nm.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/94/16094/1 diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 572d762..ca0df68 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -1804,8 +1804,8 @@ /* not on the same TRX that has a BCCH+SDCCH4 * combination */ if (ts->trx != ts->trx->bts->c0 && - (ts->trx->ts[0].nm_chan_comb == 5 || - ts->trx->ts[0].nm_chan_comb == 8)) { + (ts->trx->ts[0].nm_chan_comb == NM_CHANC_BCCHComb || + ts->trx->ts[0].nm_chan_comb == NM_CHANC_SDCCH_CBCH)) { *reason = "SDCCH/8 and BCCH must be on the same TRX."; return -EINVAL; } @@ -1829,7 +1829,7 @@ return -EINVAL; } break; - case 8: /* this is not like 08.58, but in fact + case NM_CHANC_SDCCH_CBCH: /* this is not like 08.58, but in fact * FCCH+SCH+BCCH+CCCH+SDCCH/4+SACCH/C4+CBCH */ /* FIXME: only one CBCH allowed per cell */ break; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I60b20d617bd8710a95977e41ae32a431af4402a9 Gerrit-Change-Number: 16094 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 15:38:46 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 18 Nov 2019 15:38:46 +0000 Subject: Change in osmo-bsc[master]: abis_nm.c: fix error message in verify_chan_comb() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16093 ) Change subject: abis_nm.c: fix error message in verify_chan_comb() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic72753d821c3ab72cda79be71aed1704beefe983 Gerrit-Change-Number: 16093 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 18 Nov 2019 15:38:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 15:39:14 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 18 Nov 2019 15:39:14 +0000 Subject: Change in osmo-bsc[master]: abis_nm.c: replace magic numbers with NM_CHANC_* constants In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16094 ) Change subject: abis_nm.c: replace magic numbers with NM_CHANC_* constants ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I60b20d617bd8710a95977e41ae32a431af4402a9 Gerrit-Change-Number: 16094 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 18 Nov 2019 15:39:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:01:07 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 18 Nov 2019 18:01:07 +0000 Subject: Change in docker-playground[master]: Update osmo-*/Dockerfile to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16063 ) Change subject: Update osmo-*/Dockerfile to log stdout+stderr of process to log file ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16063 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I9493ff73ef27c7c6d32b00cf827704b3f9cbf86a Gerrit-Change-Number: 16063 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 18 Nov 2019 18:01:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:01:16 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 18 Nov 2019 18:01:16 +0000 Subject: Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16064 ) Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 Gerrit-Change-Number: 16064 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 18 Nov 2019 18:01:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:11:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 18 Nov 2019 18:11:30 +0000 Subject: Change in osmo-bts[master]: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16080 ) Change subject: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields ...................................................................... Patch Set 1: don't we need to increment the PCUIF VERSION in order to introduce this change? OR, to be forward/backward capable, have size checks on the other side? Oh no, since we just add new fields, old osmo-pcu will simply ignore those fields. But new osmo-pcu versoins that make use of the field MUST then check for the length? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6 Gerrit-Change-Number: 16080 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 18 Nov 2019 18:11:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:12:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 18 Nov 2019 18:12:21 +0000 Subject: Change in osmo-bts[master]: power_control.c: Apply latests improvements from loops.c In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16070 ) Change subject: power_control.c: Apply latests improvements from loops.c ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I579967cc8bb69dc76a315c6c9d3a351f5961d92f Gerrit-Change-Number: 16070 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 18 Nov 2019 18:12:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:12:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 18 Nov 2019 18:12:37 +0000 Subject: Change in osmo-bts[master]: power_control.c: Log rx current and target signal levels In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16073 ) Change subject: power_control.c: Log rx current and target signal levels ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16073 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I31ce7930a1daa20a2ff81f31a37df94298c877d6 Gerrit-Change-Number: 16073 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 18 Nov 2019 18:12:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:13:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 18 Nov 2019 18:13:05 +0000 Subject: Change in osmo-bts[master]: power_control.c: Fix ms pwr ctrl skipped if MS doesn't support announ... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16077 ) Change subject: power_control.c: Fix ms pwr ctrl skipped if MS doesn't support announced MS Power Level ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16077 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1a9c00fe4eb3fa1eaa7997a9ec20716ddfe180a7 Gerrit-Change-Number: 16077 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 18 Nov 2019 18:13:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:17:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 18 Nov 2019 18:17:48 +0000 Subject: Change in osmo-bts[master]: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16071 ) Change subject: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5 Gerrit-Change-Number: 16071 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 18 Nov 2019 18:17:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:29:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 18 Nov 2019 18:29:30 +0000 Subject: Change in osmo-bts[master]: power_control.c: Apply latests improvements from loops.c In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16070 ) Change subject: power_control.c: Apply latests improvements from loops.c ...................................................................... power_control.c: Apply latests improvements from loops.c Several improvements have been made lately to MS Power Control loop from osmo-bts-trx in loops.c. Let's port these to the common algorithm. Related: OS#1851 Change-Id: I579967cc8bb69dc76a315c6c9d3a351f5961d92f --- M src/common/power_control.c M tests/power/power_test.c 2 files changed, 73 insertions(+), 43 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/power_control.c b/src/common/power_control.c index 38a7fb7..106e2a8 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -30,67 +31,87 @@ #include #include -/* - * Check if manual power control is needed - * Check if fixed power was selected - * Check if the MS is already using our level if not - * the value is bogus.. - * TODO: Add a timeout.. e.g. if the ms is not capable of reaching - * the value we have set. - */ + /*! compute the new MS POWER LEVEL communicated to the MS and store it in lchan. + * \param lchan logical channel for which to compute (and in which to store) new power value. + * \param[in] ms_power MS Power Level received from Uplink L1 SACCH Header in SACCH block. + * \param[in] rxLevel Signal level of the received SACCH block, in dBm. + */ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan, const uint8_t ms_power, const int rxLevel) { - int rx; - int cur_dBm, new_dBm, new_pwr; - struct gsm_bts *bts = lchan->ts->trx->bts; - const enum gsm_band band = bts->band; + int diff; + struct gsm_bts_trx *trx = lchan->ts->trx; + struct gsm_bts *bts = trx->bts; + enum gsm_band band = bts->band; + int8_t new_power; /* TS 05.05 power level */ + int8_t new_dbm, current_dbm, bsc_max_dbm; if (!trx_ms_pwr_ctrl_is_osmo(lchan->ts->trx)) return 0; if (lchan->ms_power_ctrl.fixed) return 0; - /* The phone hasn't reached the power level yet */ + /* The phone hasn't reached the power level yet. + TODO: store .last and check if MS is trying to move towards current. */ if (lchan->ms_power_ctrl.current != ms_power) return 0; - /* What is the difference between what we want and received? */ - rx = bts->ul_power_target - rxLevel; + /* How many dBs measured power should be increased (+) or decreased (-) + to reach expected power. */ + diff = bts->ul_power_target - rxLevel; - cur_dBm = ms_pwr_dbm(band, ms_power); - new_dBm = cur_dBm + rx; + /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */ + if (diff < 2 && diff > -2) + return 0; - /* Clamp negative values and do it depending on the band */ - if (new_dBm < 0) - new_dBm = 0; - - switch (band) { - case GSM_BAND_1800: - /* If MS_TX_PWR_MAX_CCH is set the values 29, - * 30, 31 are not used. Avoid specifying a dBm - * that would lead to these power levels. The - * phone might not be able to reach them. */ - if (new_dBm > 30) - new_dBm = 30; - break; - default: - break; + current_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.current); + if (current_dbm < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", + lchan->ms_power_ctrl.current, gsm_band_name(band)); + return 0; + } + bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.max); + if (bsc_max_dbm < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", + lchan->ms_power_ctrl.max, gsm_band_name(band)); + return 0; } - new_pwr = ms_pwr_ctl_lvl(band, new_dBm); + new_dbm = current_dbm + diff; - /* Don't ask for smaller ms power level than the one set - * by BSC upon RSL CHAN ACT - */ - if (new_pwr < lchan->ms_power_ctrl.max) - new_pwr = lchan->ms_power_ctrl.max; + /* Make sure new_dbm is never negative. ms_pwr_ctl_lvl() can later on + cope with any unsigned dbm value, regardless of band minimal value. */ + if (new_dbm < 0) + new_dbm = 0; - if (lchan->ms_power_ctrl.current != new_pwr) { - lchan->ms_power_ctrl.current = new_pwr; - bts_model_adjst_ms_pwr(lchan); - return 1; + /* Don't ask for smaller ms power level than the one set by BSC upon RSL CHAN ACT */ + if (new_dbm > bsc_max_dbm) + new_dbm = bsc_max_dbm; + + new_power = ms_pwr_ctl_lvl(band, new_dbm); + if (new_power < 0) { + LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, + "Failed to retrieve power level for %" PRId8 " dBm on band %d\n", + new_dbm, band); + return 0; } - return 0; + if (lchan->ms_power_ctrl.current == new_power) { + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d (%d dBm)\n", + new_power, ms_pwr_dbm(band, new_power)); + return 0; + } + + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS new_power from control level %d (%d dBm) to %d (%d dBm)\n", + (diff > 0) ? "Raising" : "Lowering", + lchan->ms_power_ctrl.current, ms_pwr_dbm(band, lchan->ms_power_ctrl.current), + new_power, ms_pwr_dbm(band, new_power)); + + /* store the resulting new MS power level in the lchan */ + lchan->ms_power_ctrl.current = new_power; + bts_model_adjst_ms_pwr(lchan); + + return 1; } diff --git a/tests/power/power_test.c b/tests/power/power_test.c index dbae8fa..30fbb64 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -17,7 +17,11 @@ * along with this program. If not, see . */ +#include +#include + #include +#include #include #include @@ -80,6 +84,11 @@ { printf("Testing power loop...\n"); + tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); + msgb_talloc_ctx_init(tall_bts_ctx, 0); + + osmo_init_logging2(tall_bts_ctx, &bts_log_info); + test_power_loop(); printf("Power loop test OK\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I579967cc8bb69dc76a315c6c9d3a351f5961d92f Gerrit-Change-Number: 16070 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:29:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 18 Nov 2019 18:29:31 +0000 Subject: Change in osmo-bts[master]: power_control.c: Log rx current and target signal levels In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16073 ) Change subject: power_control.c: Log rx current and target signal levels ...................................................................... power_control.c: Log rx current and target signal levels Change-Id: I31ce7930a1daa20a2ff81f31a37df94298c877d6 --- M src/common/power_control.c 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/common/power_control.c b/src/common/power_control.c index 106e2a8..574825e 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -99,15 +99,17 @@ } if (lchan->ms_power_ctrl.current == new_power) { - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d (%d dBm)\n", - new_power, ms_pwr_dbm(band, new_power)); + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d, %d dBm " + "(rx-ms-pwr-lvl %" PRIu8 ", rx-current %d dBm, rx-target %d dBm)\n", + new_power, ms_pwr_dbm(band, new_power), ms_power, rxLevel, bts->ul_power_target); return 0; } - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS new_power from control level %d (%d dBm) to %d (%d dBm)\n", + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS new_power from control level %d (%d dBm) to %d, %d dBm " + "(rx-ms-pwr-lvl %" PRIu8 ", rx-current %d dBm, rx-target %d dBm)\n", (diff > 0) ? "Raising" : "Lowering", lchan->ms_power_ctrl.current, ms_pwr_dbm(band, lchan->ms_power_ctrl.current), - new_power, ms_pwr_dbm(band, new_power)); + new_power, ms_pwr_dbm(band, new_power), ms_power, rxLevel, bts->ul_power_target); /* store the resulting new MS power level in the lchan */ lchan->ms_power_ctrl.current = new_power; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16073 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I31ce7930a1daa20a2ff81f31a37df94298c877d6 Gerrit-Change-Number: 16073 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:29:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 18 Nov 2019 18:29:31 +0000 Subject: Change in osmo-bts[master]: power_control.c: Fix ms pwr ctrl skipped if MS doesn't support announ... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16077 ) Change subject: power_control.c: Fix ms pwr ctrl skipped if MS doesn't support announced MS Power Level ...................................................................... power_control.c: Fix ms pwr ctrl skipped if MS doesn't support announced MS Power Level Related: OS#1851 Change-Id: I1a9c00fe4eb3fa1eaa7997a9ec20716ddfe180a7 --- M include/osmo-bts/gsm_data_shared.h M src/common/l1sap.c M src/common/power_control.c 3 files changed, 15 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 8a52fe9..bd10056 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -322,6 +322,7 @@ uint8_t current; uint8_t max; bool fixed; + int8_t last_received; /* last received MS Power in uplink L1 SACCH, -1 means not set */ } ms_power_ctrl; /* Power levels for BTS */ uint8_t bs_power; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 7bf0b09..4937d1e 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1647,6 +1647,7 @@ lchan->sacch_deact = 0; lchan->s = lchan->ts->trx->bts->radio_link_timeout; + lchan->ms_power_ctrl.last_received = -1; /* mark no ms power received yet */ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) diff --git a/src/common/power_control.c b/src/common/power_control.c index 574825e..129334e 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -53,8 +53,19 @@ /* The phone hasn't reached the power level yet. TODO: store .last and check if MS is trying to move towards current. */ - if (lchan->ms_power_ctrl.current != ms_power) - return 0; + if (lchan->ms_power_ctrl.current != ms_power) { + if (lchan->ms_power_ctrl.last_received == -1 || + lchan->ms_power_ctrl.last_received != ms_power) { + /* MS Power still changing, keep current power level */ + lchan->ms_power_ctrl.last_received = ms_power; + return 0; + } + /* else: we are stuck with some received MS Power level + different than the one we announce, probably because the MS + doesn't support that exact one so it picked the nearest one + */ + lchan->ms_power_ctrl.last_received = ms_power; + } /* How many dBs measured power should be increased (+) or decreased (-) to reach expected power. */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16077 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1a9c00fe4eb3fa1eaa7997a9ec20716ddfe180a7 Gerrit-Change-Number: 16077 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 18:29:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 18 Nov 2019 18:29:32 +0000 Subject: Change in osmo-bts[master]: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16071 ) Change subject: Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP ...................................................................... Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP It indicates whether BTS model supports managing an MS Power Control Loop over HW/DSP instead of using the software based osmocom algorithm present in osmo-bts. osmo-bts-trx own loop implementation is considered to be a "DSP/HW" one since it acts on lower layers and interferes with osmocom algorithm since it controls the same end variable "lchan->ms_power_ctrl.current", this way we make sure both aren't enabled at the same time. Old behavior in kept: if common upper-layer algo is not enabled explicitly in VTY (ms-power-control osmo) and bts-trx specific lower layer algo is neither enabled (osmotrx ms-power-loop ), then no power control is done at all. Related: OS#1851 Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5 --- M include/osmo-bts/gsm_data_shared.h M src/common/bts.c M src/common/gsm_data_shared.c M src/common/vty.c M src/osmo-bts-litecell15/main.c M src/osmo-bts-oc2g/main.c M src/osmo-bts-sysmo/main.c M src/osmo-bts-trx/loops.c M src/osmo-bts-trx/main.c 9 files changed, 23 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index bd10056..c19bb21 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -479,6 +479,7 @@ BTS_FEAT_SPEECH_F_AMR, BTS_FEAT_SPEECH_H_AMR, BTS_FEAT_ETWS_PN, + BTS_FEAT_MS_PWR_CTRL_DSP, _NUM_BTS_FEAT }; diff --git a/src/common/bts.c b/src/common/bts.c index 3809eb3..da41176 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -256,6 +256,10 @@ tpp->ramp.step_size_mdB = to_mdB(2); tpp->ramp.step_interval_sec = 1; + /* IF BTS model doesn't DSP/HW support MS Power Control Loop, enable osmo algo by default: */ + if (!gsm_bts_has_feature(trx->bts, BTS_FEAT_MS_PWR_CTRL_DSP)) + trx->ms_pwr_ctl_soft = true; + rc = bts_model_trx_init(trx); if (rc < 0) { llist_del(&trx->list); diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c index 80acabc..b31d458 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -108,6 +108,7 @@ { BTS_FEAT_SPEECH_F_AMR, "Fullrate speech AMR" }, { BTS_FEAT_SPEECH_H_AMR, "Halfrate speech AMR" }, { BTS_FEAT_ETWS_PN, "ETWS Primary Notification on PCH" }, + { BTS_FEAT_MS_PWR_CTRL_DSP, "DSP/HW based MS Power Control Loop" }, { 0, NULL } }; diff --git a/src/common/vty.c b/src/common/vty.c index 514d120..2558ba8 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -789,8 +789,14 @@ "Handled by DSP\n" "Handled by OsmoBTS\n") { struct gsm_bts_trx *trx = vty->index; + bool soft = !strcmp(argv[0], "osmo"); - trx->ms_pwr_ctl_soft = !strcmp(argv[0], "osmo"); + if (!soft && !gsm_bts_has_feature(trx->bts, BTS_FEAT_MS_PWR_CTRL_DSP)) { + vty_out(vty, "This BTS model has no DSP/HW MS Power Control support%s", VTY_NEWLINE); + return CMD_WARNING; + } + + trx->ms_pwr_ctl_soft = soft; return CMD_SUCCESS; } diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c index b0d725b..6f3fc00 100644 --- a/src/osmo-bts-litecell15/main.c +++ b/src/osmo-bts-litecell15/main.c @@ -112,6 +112,7 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); + gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c index cbf5c42..f9bb0cb 100644 --- a/src/osmo-bts-oc2g/main.c +++ b/src/osmo-bts-oc2g/main.c @@ -120,6 +120,7 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); + gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index ad7118a..bb2c436 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -86,6 +86,7 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_EFR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); + gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index 1f54fee..e73d842 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -237,8 +237,9 @@ .lchan[l1sap_chan2ss(chan_nr)]; struct phy_instance *pinst = trx_phy_instance(l1t->trx); - /* if MS power control loop is enabled, handle it */ - if (pinst->phy_link->u.osmotrx.trx_ms_power_loop) + /* if common upper layer MS power control loop is disabled + and lower layer MS power control loop is enabled, handle it */ + if (!l1t->trx->ms_pwr_ctl_soft && pinst->phy_link->u.osmotrx.trx_ms_power_loop) ms_power_val(lchan, chan_state, rssi); /* if TA loop is enabled, handle it */ @@ -257,7 +258,9 @@ if (lchan->ms_power_ctrl.fixed) return; - if (pinst->phy_link->u.osmotrx.trx_ms_power_loop) + /* if common upper layer MS power control loop is disabled + and lower layer MS power control loop is enabled, handle it */ + if (!l1t->trx->ms_pwr_ctl_soft && pinst->phy_link->u.osmotrx.trx_ms_power_loop) ms_power_clock(lchan, chan_state); /* count the number of SACCH clocks */ diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index cf40ea3..9a29b3b 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -116,6 +116,7 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); gsm_bts_set_feature(bts, BTS_FEAT_CBCH); + gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5 Gerrit-Change-Number: 16071 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 19:12:36 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 18 Nov 2019 19:12:36 +0000 Subject: Change in osmo-bts[master]: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16080 ) Change subject: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields ...................................................................... Patch Set 1: > don't we need to increment the PCUIF VERSION in order to introduce this change? > OR, to be forward/backward capable, have size checks on the other side? Fortunately no. Please see last two paragraphs of the commit message. This change basically makes use of padding bytes, since sizeof(RACH.ind) < sizeof(INFO.ind), so we're not breaking anything. Unfortunately, we cannot do the same trick with INFO.ind, because it is the largest message, and hence defines PDU length for all other messages (because we use a 'union'). -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6 Gerrit-Change-Number: 16080 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 18 Nov 2019 19:12:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 20:45:38 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 18 Nov 2019 20:45:38 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 ) Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update ...................................................................... Patch Set 2: Code-Review+1 (3 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016/2/sgsn/SGSN_Tests.ttcn File sgsn/SGSN_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016/2/sgsn/SGSN_Tests.ttcn at 2819 PS2, Line 2819: TODO: make sure old_ra != new_ra Just one more line: while (old_ra == new_ra) { new_ra := f_random_RAI(); }. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016/2/sgsn/SGSN_Tests.ttcn at 2825 PS2, Line 2825: '010'B Do we really care what kind of identity is requested? Can we just use template '?' here? https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016/2/sgsn/SGSN_Tests.ttcn at 2829 PS2, Line 2829: '0a'O Do we have an enumerated type for cause values? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 Gerrit-Change-Number: 16016 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 18 Nov 2019 20:45:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 21:36:08 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Mon, 18 Nov 2019 21:36:08 +0000 Subject: Change in simtrace2[master]: add serial and version info in USB description References: Message-ID: tsaitgaist has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16095 ) Change subject: add serial and version info in USB description ...................................................................... add serial and version info in USB description as for the main application firmware, the DFU bootloader firmware now also has the unique chip ID as iSerial in the USB description, and an additional empty USB configuration indicates the firmware version (e.g. DFU bootloader version). these are only visible when the device is in DFU mode. Change-Id: I11a2cd8079fda374d816da180f39f1c33d10af60 --- M firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h M firmware/atmel_softpack_libraries/usb/device/dfu/dfu_desc.c M firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c 3 files changed, 141 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/95/16095/1 diff --git a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h index 2a44602..7354696 100644 --- a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h +++ b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h @@ -101,7 +101,7 @@ extern struct dfudata _g_dfu; extern struct dfudata *g_dfu; -void set_usb_serial_str(const uint8_t *serial_usbstr); +void set_usb_serial_str(void); void DFURT_SwitchToDFU(void); diff --git a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_desc.c b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_desc.c index 75fded1..ebbe070 100644 --- a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_desc.c +++ b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_desc.c @@ -13,14 +13,87 @@ #include #include +#include "usb_strings_generated.h" + enum { STR_MANUF = 1, STR_PROD, STR_CONFIG, _STR_FIRST_ALT, + // serial string STR_SERIAL = (_STR_FIRST_ALT+BOARD_DFU_NUM_IF), + // version string (on additional interface) + VERSION_CONF_STR, + VERSION_STR, + // count + STRING_DESC_CNT, }; +/* USB string for the serial (using 128-bit device ID) */ +static unsigned char usb_string_serial[] = { + USBStringDescriptor_LENGTH(32), + USBGenericDescriptor_STRING, + USBStringDescriptor_UNICODE('0'), + USBStringDescriptor_UNICODE('0'), + USBStringDescriptor_UNICODE('1'), + USBStringDescriptor_UNICODE('1'), + USBStringDescriptor_UNICODE('2'), + USBStringDescriptor_UNICODE('2'), + USBStringDescriptor_UNICODE('3'), + USBStringDescriptor_UNICODE('3'), + USBStringDescriptor_UNICODE('4'), + USBStringDescriptor_UNICODE('4'), + USBStringDescriptor_UNICODE('5'), + USBStringDescriptor_UNICODE('5'), + USBStringDescriptor_UNICODE('6'), + USBStringDescriptor_UNICODE('6'), + USBStringDescriptor_UNICODE('7'), + USBStringDescriptor_UNICODE('7'), + USBStringDescriptor_UNICODE('8'), + USBStringDescriptor_UNICODE('8'), + USBStringDescriptor_UNICODE('9'), + USBStringDescriptor_UNICODE('9'), + USBStringDescriptor_UNICODE('a'), + USBStringDescriptor_UNICODE('a'), + USBStringDescriptor_UNICODE('b'), + USBStringDescriptor_UNICODE('b'), + USBStringDescriptor_UNICODE('c'), + USBStringDescriptor_UNICODE('c'), + USBStringDescriptor_UNICODE('d'), + USBStringDescriptor_UNICODE('d'), + USBStringDescriptor_UNICODE('e'), + USBStringDescriptor_UNICODE('e'), + USBStringDescriptor_UNICODE('f'), + USBStringDescriptor_UNICODE('f'), +}; + +/* USB string for the version */ +static const unsigned char usb_string_version_conf[] = { + USBStringDescriptor_LENGTH(16), + USBGenericDescriptor_STRING, + USBStringDescriptor_UNICODE('f'), + USBStringDescriptor_UNICODE('i'), + USBStringDescriptor_UNICODE('r'), + USBStringDescriptor_UNICODE('m'), + USBStringDescriptor_UNICODE('w'), + USBStringDescriptor_UNICODE('a'), + USBStringDescriptor_UNICODE('r'), + USBStringDescriptor_UNICODE('e'), + USBStringDescriptor_UNICODE(' '), + USBStringDescriptor_UNICODE('v'), + USBStringDescriptor_UNICODE('e'), + USBStringDescriptor_UNICODE('r'), + USBStringDescriptor_UNICODE('s'), + USBStringDescriptor_UNICODE('i'), + USBStringDescriptor_UNICODE('o'), + USBStringDescriptor_UNICODE('n'), +}; + +static const char git_version[] = GIT_VERSION; +static unsigned char usb_string_version[2 + ARRAY_SIZE(git_version) * 2 - 2]; +/** array of static (from usb_strings) and runtime (serial, version) USB strings */ +static const unsigned char *usb_strings_extended[STRING_DESC_CNT]; + static const USBDeviceDescriptor fsDevice = { .bLength = sizeof(USBDeviceDescriptor), .bDescriptorType = USBGenericDescriptor_DEVICE, @@ -34,12 +107,8 @@ .bcdDevice = BOARD_USB_RELEASE, .iManufacturer = STR_MANUF, .iProduct = STR_PROD, -#ifdef BOARD_USB_SERIAL .iSerialNumber = STR_SERIAL, -#else - .iSerialNumber = 0, -#endif - .bNumConfigurations = 1, + .bNumConfigurations = 2, // DFU + version configurations }; /* Alternate Interface Descriptor, we use one per partition/memory type */ @@ -85,17 +154,74 @@ .func_dfu = DFU_FUNC_DESC }; -#include "usb_strings_generated.h" - -#if 0 -void set_usb_serial_str(const uint8_t *serial_usbstr) +void set_usb_serial_str(void) { - usb_strings[STR_SERIAL] = serial_usbstr; + unsigned int i; + + // put device ID into USB serial number description + unsigned int device_id[4]; + EEFC_ReadUniqueID(device_id); + char device_id_string[32 + 1]; + snprintf(device_id_string, ARRAY_SIZE(device_id_string), "%08x%08x%08x%08x", + device_id[0], device_id[1], device_id[2], device_id[3]); + for (i = 0; i < ARRAY_SIZE(device_id_string) - 1; i++) { + usb_string_serial[2 + 2 * i] = device_id_string[i]; + } + + // put version into USB string + usb_string_version[0] = USBStringDescriptor_LENGTH(ARRAY_SIZE(git_version) - 1); + usb_string_version[1] = USBGenericDescriptor_STRING; + for (i = 0; i < ARRAY_SIZE(git_version) - 1; i++) { + usb_string_version[2 + i * 2 + 0] = git_version[i]; + usb_string_version[2 + i * 2 + 1] = 0; + } + + // fill extended USB strings + for (i = 0; i < ARRAY_SIZE(usb_strings) && i < ARRAY_SIZE(usb_strings_extended); i++) { + usb_strings_extended[i] = usb_strings[i]; + } + usb_strings_extended[STR_SERIAL] = usb_string_serial; + usb_strings_extended[VERSION_CONF_STR] = usb_string_version_conf; + usb_strings_extended[VERSION_STR] = usb_string_version; } -#endif + +/* USB descriptor just to show the version */ +typedef struct _SIMTraceDriverConfigurationDescriptorVersion { + /** Standard configuration descriptor. */ + USBConfigurationDescriptor configuration; + USBInterfaceDescriptor version; +} __attribute__ ((packed)) SIMTraceDriverConfigurationDescriptorVersion; + +static const SIMTraceDriverConfigurationDescriptorVersion + configurationDescriptorVersion = { + /* Standard configuration descriptor for the interface descriptor*/ + .configuration = { + .bLength = sizeof(USBConfigurationDescriptor), + .bDescriptorType = USBGenericDescriptor_CONFIGURATION, + .wTotalLength = sizeof(SIMTraceDriverConfigurationDescriptorVersion), + .bNumInterfaces = 1, + .bConfigurationValue = 2, + .iConfiguration = VERSION_CONF_STR, + .bmAttributes = USBD_BMATTRIBUTES, + .bMaxPower = USBConfigurationDescriptor_POWER(100), + }, + /* Interface standard descriptor just holding the version information */ + .version = { + .bLength = sizeof(USBInterfaceDescriptor), + .bDescriptorType = USBGenericDescriptor_INTERFACE, + .bInterfaceNumber = 0, + .bAlternateSetting = 0, + .bNumEndpoints = 0, + .bInterfaceClass = USB_CLASS_PROPRIETARY, + .bInterfaceSubClass = 0xff, + .bInterfaceProtocol = 0, + .iInterface = VERSION_STR, + }, +}; static const USBConfigurationDescriptor *conf_desc_arr[] = { &dfu_cfg_descriptor.ucfg, + &configurationDescriptorVersion.configuration, }; const USBDDriverDescriptors dfu_descriptors = { @@ -108,6 +234,6 @@ .pHsConfiguration = NULL, .pHsQualifier = NULL, .pHsOtherSpeed = NULL, - .pStrings = usb_strings, - .numStrings = ARRAY_SIZE(usb_strings), + .pStrings = usb_strings_extended, + .numStrings = ARRAY_SIZE(usb_strings_extended), }; diff --git a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c index 6230d6c..3ffd9b3 100644 --- a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c +++ b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c @@ -447,6 +447,7 @@ /* We already start in DFU idle mode */ g_dfu->state = DFU_STATE_dfuIDLE; + set_usb_serial_str(); USBDDriver_Initialize(&usbdDriver, pDescriptors, if_altsettings); USBD_Init(); USBD_Connect(); -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16095 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I11a2cd8079fda374d816da180f39f1c33d10af60 Gerrit-Change-Number: 16095 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 21:36:08 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Mon, 18 Nov 2019 21:36:08 +0000 Subject: Change in simtrace2[master]: add DFU enter override capability References: Message-ID: tsaitgaist has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16096 ) Change subject: add DFU enter override capability ...................................................................... add DFU enter override capability in case flashing the main application firmware using DFU failed, the main application might be broken and not allow to switch again to DFU mode to re-flash it correctly. the other board have a way to force entering (e.g. staying in) the bootloader using an external signal (e.g. a switch on the SIMtrace board). the OWHW DFU firmware did not have this functionality implemented. the design (e.g. schematic) already has the SIMTRACE_BOOTLOADER signal (on PA31) for this purpose. now the DFU bootloader will start the DFU mode when the SIMTRACE_BOOTLOADER is high. this change has been tested on OWHWv2. Change-Id: Iefff51a811ad0f3bf3a46b8e256b905d11344bea --- M firmware/libboard/owhw/include/board.h M firmware/libboard/owhw/source/owhw.c 2 files changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/96/16096/1 diff --git a/firmware/libboard/owhw/include/board.h b/firmware/libboard/owhw/include/board.h index 44472d0..f929771 100644 --- a/firmware/libboard/owhw/include/board.h +++ b/firmware/libboard/owhw/include/board.h @@ -46,6 +46,9 @@ /** index for green LED in LEDs pin definition array */ #define LED_NUM_GREEN 1 +/* pin connected to the SIMTRACE_BOOTLOADER signal. set high to force DFU bootloader start */ +#define PIN_BOOTLOADER {PIO_PA31, PIOA, ID_PIOA, PIO_INPUT, PIO_DEFAULT} + /* USIM 2 interface (USART) */ #define PIN_USIM2_CLK {PIO_PA2, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT} #define PIN_USIM2_IO {PIO_PA6, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT} diff --git a/firmware/libboard/owhw/source/owhw.c b/firmware/libboard/owhw/source/owhw.c index 3bf51ec..516d592 100644 --- a/firmware/libboard/owhw/source/owhw.c +++ b/firmware/libboard/owhw/source/owhw.c @@ -1,7 +1,7 @@ /* Card simulator specific functions * * (C) 2015-2017 by Harald Welte - * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * (C) 2018-2019, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -65,3 +65,16 @@ { PIO_Configure(pins_cardsim, ARRAY_SIZE(pins_cardsim)); } + +int board_override_enter_dfu(void) +{ + const Pin bl_pin = PIN_BOOTLOADER; + + PIO_Configure(&bl_pin, 1); + + if (PIO_Get(&bl_pin) == 0) { // signal low + return 0; // do not override enter DFU + } else { + return 1; // override enter DFU + } +} -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Iefff51a811ad0f3bf3a46b8e256b905d11344bea Gerrit-Change-Number: 16096 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 18 21:36:08 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Mon, 18 Nov 2019 21:36:08 +0000 Subject: Change in simtrace2[master]: free USB buffer when allocation failed References: Message-ID: tsaitgaist has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16097 ) Change subject: free USB buffer when allocation failed ...................................................................... free USB buffer when allocation failed when the reader sends APDU headers (e.g. after multiple reset), messages are queued for USB transmission. but if no host software is connected to SIMtrace in card emulation mode, the USB message queue is not emptied, leading to the memory getting full and preventing allocation for newer messages (e.g. more recent APDU). in this case the oldest queued message is now dropped to free some memory. Change-Id: Ie9ebdd2ff966f67c9afd1ed760f106558f0091ad --- M firmware/libcommon/source/card_emu.c 1 file changed, 27 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/97/16097/1 diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index 5298ffc..497b963 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -254,12 +254,35 @@ /* Allocate USB buffer and push + initialize simtrace_msg_hdr */ struct msgb *usb_buf_alloc_st(uint8_t ep, uint8_t msg_class, uint8_t msg_type) { - struct msgb *msg; + struct msgb *msg = NULL; struct simtrace_msg_hdr *sh; - msg = usb_buf_alloc(ep); - if (!msg) - return NULL; + while (!msg) { + msg = usb_buf_alloc(ep); // try to allocate some memory + if (!msg) { // allocation failed, we might be out of memory + struct llist_head *queue = usb_get_queue(ep); + if (!queue) { + TRACE_ERROR("ep %u: %s queue does not exist\n\r", + ep, __func__); + return NULL; + } + if (llist_empty(queue)) { + TRACE_ERROR("ep %u: %s EOMEM (queue already empty)\n\r", + ep, __func__); + return NULL; + } + msg = msgb_dequeue(queue); + if (!msg) { + TRACE_ERROR("ep %u: %s no msg in non-empty queue\n\r", + ep, __func__); + return NULL; + } + usb_buf_free(msg); + msg = NULL; + TRACE_DEBUG("ep %u: %s queue msg dropped\n\r", + ep, __func__); + } + } msg->l1h = msgb_put(msg, sizeof(*sh)); sh = (struct simtrace_msg_hdr *) msg->l1h; -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie9ebdd2ff966f67c9afd1ed760f106558f0091ad Gerrit-Change-Number: 16097 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:14:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:14:51 +0000 Subject: Change in libosmo-sccp[master]: Don't forget to store the sctp-role during writing config file References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16098 ) Change subject: Don't forget to store the sctp-role during writing config file ...................................................................... Don't forget to store the sctp-role during writing config file Related to Change-Id I7452a862d45da35dcd58654ca17222eb52d26f1f Related: OS#2005 Change-Id: I14835a7cf137e9d1fe9757a4ec57358dc578446e --- M src/osmo_ss7_vty.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/98/16098/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 84f616a..0a3cea4 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -753,6 +753,8 @@ vty_out(vty, " role %s%s", get_value_string(osmo_ss7_asp_role_names, asp->cfg.role), VTY_NEWLINE); } + if (!asp->cfg.is_server) + vty_out(vty, " sctp-role client%s", VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I14835a7cf137e9d1fe9757a4ec57358dc578446e Gerrit-Change-Number: 16098 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:28:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:28:33 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7: Add osmo_ss7_asp_find() References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16099 ) Change subject: osmo_ss7: Add osmo_ss7_asp_find() ...................................................................... osmo_ss7: Add osmo_ss7_asp_find() This is like osmo_ss7_asp_find_and_create(), i.e. it's doing a full match for an ASP within the specified SS7 instance, of the specified port numbers. It just doesn't create it if it is missing. Change-Id: I1ed3cf2b69ee622d6f9d8b50487f392fe913ae90 Related: OS#4271 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c 2 files changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/99/16099/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 6778409..de9494b 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -436,6 +436,10 @@ *osmo_ss7_asp_find_by_proto(struct osmo_ss7_as *as, enum osmo_ss7_asp_protocol proto); struct osmo_ss7_asp * +osmo_ss7_asp_find(struct osmo_ss7_instance *inst, const char *name, + uint16_t remote_port, uint16_t local_port, + enum osmo_ss7_asp_protocol proto); +struct osmo_ss7_asp * osmo_ss7_asp_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto); diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index d74f8f9..a07fbed 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1226,6 +1226,24 @@ } struct osmo_ss7_asp * +osmo_ss7_asp_find(struct osmo_ss7_instance *inst, const char *name, + uint16_t remote_port, uint16_t local_port, + enum osmo_ss7_asp_protocol proto) +{ + struct osmo_ss7_asp *asp; + + OSMO_ASSERT(ss7_initialized); + asp = osmo_ss7_asp_find_by_name(inst, name); + if (!asp) + return NULL; + + if ((asp->cfg.remote.port != remote_port || asp->cfg.local.port != local_port || asp->cfg.proto != proto)) + return NULL; + + return asp; +} + +struct osmo_ss7_asp * osmo_ss7_asp_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I1ed3cf2b69ee622d6f9d8b50487f392fe913ae90 Gerrit-Change-Number: 16099 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:28:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:28:33 +0000 Subject: Change in libosmo-sccp[master]: asp: Don't override ASP and SCTP role when re-entering asp node References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16100 ) Change subject: asp: Don't override ASP and SCTP role when re-entering asp node ...................................................................... asp: Don't override ASP and SCTP role when re-entering asp node The code to set the default role (SG) and default SCTP role (server) must only be executed when the ASP node is first created. Subsequent times entering the pre-existing ASP node should not overwrite those role settings [or any other configuration for that matter] Change-Id: I068996a5e0d870043b652fb69a3c300adc6fda7c Closes: OS#4271 --- M src/osmo_ss7_vty.c 1 file changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/00/16100/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 0a3cea4..08d8c43 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -574,13 +574,16 @@ return CMD_WARNING; } - asp = osmo_ss7_asp_find_or_create(inst, name, remote_port, local_port, protocol); + asp = osmo_ss7_asp_find(inst, name, remote_port, local_port, protocol); if (!asp) { - vty_out(vty, "cannot create ASP '%s'%s", name, VTY_NEWLINE); - return CMD_WARNING; + asp = osmo_ss7_asp_find_or_create(inst, name, remote_port, local_port, protocol); + if (!asp) { + vty_out(vty, "cannot create ASP '%s'%s", name, VTY_NEWLINE); + return CMD_WARNING; + } + asp->cfg.is_server = true; + asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; } - asp->cfg.is_server = true; - asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; vty->node = L_CS7_ASP_NODE; vty->index = asp; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I068996a5e0d870043b652fb69a3c300adc6fda7c Gerrit-Change-Number: 16100 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:33:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:33:01 +0000 Subject: Change in libosmo-sccp[master]: fix generating asp-role that can be parsed when re-opening config file References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16101 ) Change subject: fix generating asp-role that can be parsed when re-opening config file ...................................................................... fix generating asp-role that can be parsed when re-opening config file The ASP role must be saved in lowercas as the parser during config file reading only understands it in lowercase. Change-Id: I38b8e4d73121f8bf001037fdd2dd164113544d94 Closes: OS#4270 --- M src/osmo_ss7_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/01/16101/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 08d8c43..ebae5a5 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -753,7 +753,7 @@ if (asp->cfg.qos_class) vty_out(vty, " qos-class %u%s", asp->cfg.qos_class, VTY_NEWLINE); if (asp->cfg.role_set_by_vty) { - vty_out(vty, " role %s%s", get_value_string(osmo_ss7_asp_role_names, asp->cfg.role), + vty_out(vty, " role %s%s", osmo_str_tolower(get_value_string(osmo_ss7_asp_role_names, asp->cfg.role)), VTY_NEWLINE); } if (!asp->cfg.is_server) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I38b8e4d73121f8bf001037fdd2dd164113544d94 Gerrit-Change-Number: 16101 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:36:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:36:32 +0000 Subject: Change in libosmo-sccp[master]: Don't forget to store the sctp-role during writing config file In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16098 ) Change subject: Don't forget to store the sctp-role during writing config file ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I14835a7cf137e9d1fe9757a4ec57358dc578446e Gerrit-Change-Number: 16098 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 19 Nov 2019 00:36:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:36:38 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:36:38 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7: Add osmo_ss7_asp_find() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16099 ) Change subject: osmo_ss7: Add osmo_ss7_asp_find() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I1ed3cf2b69ee622d6f9d8b50487f392fe913ae90 Gerrit-Change-Number: 16099 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 19 Nov 2019 00:36:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:37:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:37:03 +0000 Subject: Change in libosmo-sccp[master]: asp: Don't override ASP and SCTP role when re-entering asp node In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16100 ) Change subject: asp: Don't override ASP and SCTP role when re-entering asp node ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I068996a5e0d870043b652fb69a3c300adc6fda7c Gerrit-Change-Number: 16100 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 19 Nov 2019 00:37:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:37:12 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:37:12 +0000 Subject: Change in libosmo-sccp[master]: fix generating asp-role that can be parsed when re-opening config file In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16101 ) Change subject: fix generating asp-role that can be parsed when re-opening config file ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I38b8e4d73121f8bf001037fdd2dd164113544d94 Gerrit-Change-Number: 16101 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 19 Nov 2019 00:37:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:37:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:37:13 +0000 Subject: Change in libosmo-sccp[master]: Don't forget to store the sctp-role during writing config file In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16098 ) Change subject: Don't forget to store the sctp-role during writing config file ...................................................................... Don't forget to store the sctp-role during writing config file Related to Change-Id I7452a862d45da35dcd58654ca17222eb52d26f1f Related: OS#2005 Change-Id: I14835a7cf137e9d1fe9757a4ec57358dc578446e --- M src/osmo_ss7_vty.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 84f616a..0a3cea4 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -753,6 +753,8 @@ vty_out(vty, " role %s%s", get_value_string(osmo_ss7_asp_role_names, asp->cfg.role), VTY_NEWLINE); } + if (!asp->cfg.is_server) + vty_out(vty, " sctp-role client%s", VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I14835a7cf137e9d1fe9757a4ec57358dc578446e Gerrit-Change-Number: 16098 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:37:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:37:14 +0000 Subject: Change in libosmo-sccp[master]: osmo_ss7: Add osmo_ss7_asp_find() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16099 ) Change subject: osmo_ss7: Add osmo_ss7_asp_find() ...................................................................... osmo_ss7: Add osmo_ss7_asp_find() This is like osmo_ss7_asp_find_and_create(), i.e. it's doing a full match for an ASP within the specified SS7 instance, of the specified port numbers. It just doesn't create it if it is missing. Change-Id: I1ed3cf2b69ee622d6f9d8b50487f392fe913ae90 Related: OS#4271 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c 2 files changed, 22 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 6778409..de9494b 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -436,6 +436,10 @@ *osmo_ss7_asp_find_by_proto(struct osmo_ss7_as *as, enum osmo_ss7_asp_protocol proto); struct osmo_ss7_asp * +osmo_ss7_asp_find(struct osmo_ss7_instance *inst, const char *name, + uint16_t remote_port, uint16_t local_port, + enum osmo_ss7_asp_protocol proto); +struct osmo_ss7_asp * osmo_ss7_asp_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto); diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index d74f8f9..a07fbed 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1226,6 +1226,24 @@ } struct osmo_ss7_asp * +osmo_ss7_asp_find(struct osmo_ss7_instance *inst, const char *name, + uint16_t remote_port, uint16_t local_port, + enum osmo_ss7_asp_protocol proto) +{ + struct osmo_ss7_asp *asp; + + OSMO_ASSERT(ss7_initialized); + asp = osmo_ss7_asp_find_by_name(inst, name); + if (!asp) + return NULL; + + if ((asp->cfg.remote.port != remote_port || asp->cfg.local.port != local_port || asp->cfg.proto != proto)) + return NULL; + + return asp; +} + +struct osmo_ss7_asp * osmo_ss7_asp_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I1ed3cf2b69ee622d6f9d8b50487f392fe913ae90 Gerrit-Change-Number: 16099 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:37:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:37:14 +0000 Subject: Change in libosmo-sccp[master]: asp: Don't override ASP and SCTP role when re-entering asp node In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16100 ) Change subject: asp: Don't override ASP and SCTP role when re-entering asp node ...................................................................... asp: Don't override ASP and SCTP role when re-entering asp node The code to set the default role (SG) and default SCTP role (server) must only be executed when the ASP node is first created. Subsequent times entering the pre-existing ASP node should not overwrite those role settings [or any other configuration for that matter] Change-Id: I068996a5e0d870043b652fb69a3c300adc6fda7c Closes: OS#4271 --- M src/osmo_ss7_vty.c 1 file changed, 8 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 0a3cea4..08d8c43 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -574,13 +574,16 @@ return CMD_WARNING; } - asp = osmo_ss7_asp_find_or_create(inst, name, remote_port, local_port, protocol); + asp = osmo_ss7_asp_find(inst, name, remote_port, local_port, protocol); if (!asp) { - vty_out(vty, "cannot create ASP '%s'%s", name, VTY_NEWLINE); - return CMD_WARNING; + asp = osmo_ss7_asp_find_or_create(inst, name, remote_port, local_port, protocol); + if (!asp) { + vty_out(vty, "cannot create ASP '%s'%s", name, VTY_NEWLINE); + return CMD_WARNING; + } + asp->cfg.is_server = true; + asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; } - asp->cfg.is_server = true; - asp->cfg.role = OSMO_SS7_ASP_ROLE_SG; vty->node = L_CS7_ASP_NODE; vty->index = asp; -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I068996a5e0d870043b652fb69a3c300adc6fda7c Gerrit-Change-Number: 16100 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:37:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:37:14 +0000 Subject: Change in libosmo-sccp[master]: fix generating asp-role that can be parsed when re-opening config file In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16101 ) Change subject: fix generating asp-role that can be parsed when re-opening config file ...................................................................... fix generating asp-role that can be parsed when re-opening config file The ASP role must be saved in lowercas as the parser during config file reading only understands it in lowercase. Change-Id: I38b8e4d73121f8bf001037fdd2dd164113544d94 Closes: OS#4270 --- M src/osmo_ss7_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 08d8c43..ebae5a5 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -753,7 +753,7 @@ if (asp->cfg.qos_class) vty_out(vty, " qos-class %u%s", asp->cfg.qos_class, VTY_NEWLINE); if (asp->cfg.role_set_by_vty) { - vty_out(vty, " role %s%s", get_value_string(osmo_ss7_asp_role_names, asp->cfg.role), + vty_out(vty, " role %s%s", osmo_str_tolower(get_value_string(osmo_ss7_asp_role_names, asp->cfg.role)), VTY_NEWLINE); } if (!asp->cfg.is_server) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I38b8e4d73121f8bf001037fdd2dd164113544d94 Gerrit-Change-Number: 16101 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:51:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:51:19 +0000 Subject: Change in osmo-bsc[master]: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15926 ) Change subject: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15926 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6bff440b7797e710bca5af94fae546e5d55e6972 Gerrit-Change-Number: 15926 Gerrit-PatchSet: 6 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 00:51:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:51:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:51:48 +0000 Subject: Change in osmo-bsc[master]: cosmetic: bs11_config: clean trailing whitespace In-Reply-To: References: Message-ID: laforge has uploaded a new patch set (#2) to the change originally created by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16053 ) Change subject: cosmetic: bs11_config: clean trailing whitespace ...................................................................... cosmetic: bs11_config: clean trailing whitespace Change-Id: I55f478c753c38baa576abc6ba53c4f6c9cbe61c0 --- M src/utils/bs11_config.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/53/16053/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I55f478c753c38baa576abc6ba53c4f6c9cbe61c0 Gerrit-Change-Number: 16053 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:51:54 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:51:54 +0000 Subject: Change in osmo-bsc[master]: cosmetic: bs11_config: clean trailing whitespace In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16053 ) Change subject: cosmetic: bs11_config: clean trailing whitespace ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I55f478c753c38baa576abc6ba53c4f6c9cbe61c0 Gerrit-Change-Number: 16053 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 19 Nov 2019 00:51:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:52:18 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:52:18 +0000 Subject: Change in osmo-bsc[master]: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15926 ) Change subject: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class ...................................................................... bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class Related: OS#4244 Change-Id: I6bff440b7797e710bca5af94fae546e5d55e6972 --- M include/osmocom/bsc/abis_rsl.h M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/gsm_08_08.c M src/osmo-bsc/gsm_data.c M src/osmo-bsc/lchan_fsm.c 6 files changed, 133 insertions(+), 14 deletions(-) Approvals: laforge: 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 f7db779..b43e3ae 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -85,7 +85,7 @@ const uint8_t *data, int len); int rsl_chan_bs_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int db); -int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int dbm); +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan); /* SMSCB functionality */ int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number, diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index fe626b1..040e36d 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -309,6 +309,9 @@ /* pointer to "other" connection, if Call Leg Relocation was successful */ struct gsm_subscriber_connection *other; } lcls; + + /* MS Power Class, TS 05.05 sec 4.1.1 "Mobile station". 0 means unset. */ + uint8_t ms_power_class:3; }; @@ -1374,6 +1377,9 @@ return conn->lchan->ts->trx->bts; } +void conn_update_ms_power_class(struct gsm_subscriber_connection *conn, uint8_t power_class); +void lchan_update_ms_power_ctrl_level(struct gsm_lchan *lchan, int ms_power_dbm); + enum { BTS_CTR_CHREQ_TOTAL, BTS_CTR_CHREQ_NO_CHANNEL, diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 8df0e81..80f54b3 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -293,26 +293,16 @@ return abis_rsl_sendmsg(msg); } -int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int dbm) +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { struct gsm_bts_trx *trx = lchan->ts->trx; struct gsm_bts *bts = trx->bts; struct abis_rsl_dchan_hdr *dh; struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); - int ctl_lvl; - - ctl_lvl = ms_pwr_ctl_lvl(bts->band, dbm); - if (ctl_lvl < 0) - return ctl_lvl; msg = rsl_msgb_alloc(); - lchan->ms_power = ctl_lvl; - - if (fpc) - lchan->ms_power |= 0x20; - dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); init_dchan_hdr(dh, RSL_MT_MS_POWER_CONTROL); dh->chan_nr = chan_nr; diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c index ad67c3f..3efc665 100644 --- a/src/osmo-bsc/gsm_08_08.c +++ b/src/osmo-bsc/gsm_08_08.c @@ -395,12 +395,16 @@ return 0; } +/* TS 04.08 sec 9.2.15 "Location updating request" */ static void handle_lu_request(struct gsm_subscriber_connection *conn, struct msgb *msg) { struct gsm48_hdr *gh; struct gsm48_loc_upd_req *lu; struct gsm48_loc_area_id lai; + int8_t rc8; + struct gsm_bts *bts = conn_get_bts(conn); + if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*lu)) { LOGP(DMSC, LOGL_ERROR, "LU too small to look at: %u\n", msgb_l3len(msg)); @@ -416,6 +420,47 @@ LOGP(DMSC, LOGL_DEBUG, "Marking con for welcome USSD.\n"); conn->new_subscriber = 1; } + + rc8 = osmo_gsm48_rfpowercap2powerclass(bts->band, lu->classmark1.pwr_lev); + if (rc8 < 0) { + LOGP(DMSC, LOGL_NOTICE, + "Unable to decode RF power capability %x from classmark1 during LU.\n", + lu->classmark1.pwr_lev); + rc8 = 0; + } + conn_update_ms_power_class(conn, rc8); +} + + +/* TS 04.08 sec 9.2.15 "Location updating request" */ +static void handle_cm_serv_req(struct gsm_subscriber_connection *conn, + struct msgb *msg) +{ + struct gsm48_hdr *gh; + struct gsm48_service_request *serv_req; + struct gsm48_classmark2* cm2; + int8_t rc8; + struct gsm_bts *bts = conn_get_bts(conn); + + if (msgb_l3len(msg) < sizeof(*gh) + sizeof(*serv_req)) { + LOGP(DMSC, LOGL_ERROR, "CM Serv Req too small to look at: %u\n", msgb_l3len(msg)); + return; + } + + gh = msgb_l3(msg); + serv_req = (struct gsm48_service_request *) gh->data; + + cm2 = (struct gsm48_classmark2*)(((uint8_t*)&serv_req->classmark)+1); + /* FIXME: one classmark2 is available in libosmocore: + cm2 = &serv_req->classmark2; */ + rc8 = osmo_gsm48_rfpowercap2powerclass(bts->band, cm2->pwr_lev); + if (rc8 < 0) { + LOGP(DMSC, LOGL_NOTICE, + "Unable to decode RF power capability %x from classmark2 during CM Service Req.\n", + cm2->pwr_lev); + rc8 = 0; + } + conn_update_ms_power_class(conn, rc8); } int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg) @@ -427,6 +472,8 @@ if (pdisc == GSM48_PDISC_MM) { if (mtype == GSM48_MT_MM_LOC_UPD_REQUEST) handle_lu_request(conn, msg); + else if(mtype == GSM48_MT_MM_CM_SERV_REQ) + handle_cm_serv_req(conn, msg); } else if (pdisc == GSM48_PDISC_RR) { if (mtype == GSM48_MT_RR_PAG_RESP) handle_page_resp(conn, msg); @@ -677,8 +724,20 @@ const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len) { + struct gsm48_classmark2 *cm2_parsed = (struct gsm48_classmark2 *)cm2; + int8_t rc8; int rc; struct msgb *resp; + struct gsm_bts *bts = conn_get_bts(conn); + + rc8 = osmo_gsm48_rfpowercap2powerclass(bts->band, cm2_parsed->pwr_lev); + if (rc8 < 0) { + LOGP(DMSC, LOGL_NOTICE, + "Unable to decode RF power capability %x from classmark1 during CM Update.\n", + cm2_parsed->pwr_lev); + rc8 = 0; + } + conn_update_ms_power_class(conn, rc8); if (!msc_connected(conn)) return; diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 1c2c4d8..2a77837 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -1685,6 +1686,67 @@ return true; } +void conn_update_ms_power_class(struct gsm_subscriber_connection *conn, uint8_t power_class) +{ + struct gsm_bts *bts = conn_get_bts(conn); + LOGP(DRLL, LOGL_DEBUG, "MS Power class update: %" PRIu8 " -> %" PRIu8 "\n", + conn->ms_power_class, power_class); + + conn->ms_power_class = power_class; + + /* If there's an associated lchan, attempt to update its max power to be + on track with band maximum values */ + if (conn->lchan) + lchan_update_ms_power_ctrl_level(conn->lchan, bts->ms_max_power); +} + +void lchan_update_ms_power_ctrl_level(struct gsm_lchan *lchan, int ms_power_dbm) +{ + struct gsm_bts *bts = lchan->ts->trx->bts; + struct gsm_subscriber_connection *conn = lchan->conn; + int max_pwr_dbm_pwclass, new_pwr; + + LOG_LCHAN(lchan, LOGL_DEBUG, + "MS Power level update requested: %d dBm\n", ms_power_dbm); + + if (!conn) + goto ms_power_default; + + if (conn->ms_power_class == 0) + goto ms_power_default; + + if ((max_pwr_dbm_pwclass = (int)ms_class_gmsk_dbm(bts->band, conn->ms_power_class)) < 0) { + LOG_LCHAN(lchan, LOGL_INFO, + "Failed getting max ms power for power class %" PRIu8 + " on band %s, providing default max ms power\n", + conn->ms_power_class, gsm_band_name(bts->band)); + goto ms_power_default; + } + + /* Current configured max pwr is above maximum one allowed on + current band + ms power class, so use that one. */ + if (ms_power_dbm > max_pwr_dbm_pwclass) + ms_power_dbm = max_pwr_dbm_pwclass; + +ms_power_default: + if ((new_pwr = ms_pwr_ctl_lvl(bts->band, ms_power_dbm)) < 0) { + LOG_LCHAN(lchan, LOGL_INFO, + "Failed getting max ms power level %d on band %s," + " providing default max ms power\n", + ms_power_dbm, gsm_band_name(bts->band)); + return; + } + + LOG_LCHAN(lchan, LOGL_DEBUG, + "MS Power level update (power class %" PRIu8 "): %" PRIu8 " -> %d\n", + conn ? conn->ms_power_class : 0, lchan->ms_power, new_pwr); + + lchan->ms_power = new_pwr; + /* FIXME: if chan is active and lchan->ms_power != new_pwr, consider + sending an MS Power Control message (RSL) towards BTS to announce the + new max ms power lvl, see rsl_chan_ms_power_ctrl() */ +} + const struct value_string lchan_activate_mode_names[] = { OSMO_VALUE_STRING(FOR_NONE), OSMO_VALUE_STRING(FOR_MS_CHANNEL_REQUEST), diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index f2fef99..9ca73df 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -511,6 +511,7 @@ struct osmo_mgcpc_ep_ci *use_mgwep_ci; struct gsm_lchan *old_lchan = lchan->activate.info.re_use_mgw_endpoint_from_lchan; struct lchan_activate_info *info = &lchan->activate.info; + int ms_power_dbm; if (lchan->release.requested) { lchan_fail("Release requested while activating"); @@ -522,11 +523,12 @@ /* If there is a previous lchan, and the new lchan is on the same cell as previous one, * take over power and TA values. Otherwise, use max power and zero TA. */ if (old_lchan && old_lchan->ts->trx->bts == bts) { - lchan->ms_power = old_lchan->ms_power; + ms_power_dbm = ms_pwr_dbm(bts->band, old_lchan->ms_power); + lchan_update_ms_power_ctrl_level(lchan, ms_power_dbm >= 0 ? ms_power_dbm : bts->ms_max_power); lchan->bs_power = old_lchan->bs_power; lchan->rqd_ta = old_lchan->rqd_ta; } else { - lchan->ms_power = ms_pwr_ctl_lvl(bts->band, bts->ms_max_power); + lchan_update_ms_power_ctrl_level(lchan, bts->ms_max_power); /* Upon last entering the UNUSED state, from lchan_reset(): * - bs_power is still zero, 0dB reduction, output power = Pn. * - TA is still zero, to be determined by RACH. */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15926 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6bff440b7797e710bca5af94fae546e5d55e6972 Gerrit-Change-Number: 15926 Gerrit-PatchSet: 7 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:52:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:52:19 +0000 Subject: Change in osmo-bsc[master]: cosmetic: bs11_config: clean trailing whitespace In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16053 ) Change subject: cosmetic: bs11_config: clean trailing whitespace ...................................................................... cosmetic: bs11_config: clean trailing whitespace Change-Id: I55f478c753c38baa576abc6ba53c4f6c9cbe61c0 --- M src/utils/bs11_config.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c index 7fac3e3..39acb7f 100644 --- a/src/utils/bs11_config.c +++ b/src/utils/bs11_config.c @@ -103,7 +103,7 @@ abis_nm_bs11_conn_oml_tei(bts, 0, 1, 0xff, TEI_OML); abis_nm_bs11_set_trx_power(bts->c0, BS11_TRX_POWER_GSM_30mW); - + sleep(1); abis_nm_bs11_set_trx1_pw(bts, trx1_password); @@ -136,7 +136,7 @@ abis_nm_bs11_create_object(bts, BS11_OBJ_PA, 1, sizeof(obj_pa0_attr), obj_pa0_attr); abis_nm_bs11_set_trx_power(trx, BS11_TRX_POWER_GSM_30mW); - + return 0; } @@ -201,7 +201,7 @@ break; case NM_MT_ACTIVATE_SW_ACK: bs11cfg_state = STATE_NONE; - + break; case NM_MT_LOAD_SEG_ACK: percent = abis_nm_software_load_status(g_bts); @@ -281,7 +281,7 @@ static const char *trx_power_name(uint8_t pwr) { switch (pwr) { - case BS11_TRX_POWER_GSM_2W: + case BS11_TRX_POWER_GSM_2W: return "2W (GSM)"; case BS11_TRX_POWER_GSM_250mW: return "250mW (GSM)"; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I55f478c753c38baa576abc6ba53c4f6c9cbe61c0 Gerrit-Change-Number: 16053 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:53:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:53:49 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15961 ) Change subject: add osmo_sockaddr_str_cmp() ...................................................................... Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 00:53:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:55:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:55:52 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 00:55:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:57:28 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:57:28 +0000 Subject: Change in libosmocore[master]: fix osmo_quote_str_c() to alloc sufficient size In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16029 ) Change subject: fix osmo_quote_str_c() to alloc sufficient size ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I04d97e8eec93ffb74006503c356a68cceaf429ac Gerrit-Change-Number: 16029 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: osmith Gerrit-Comment-Date: Tue, 19 Nov 2019 00:57:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:58:09 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:58:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add sdp to MNCC In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032 ) Change subject: msc: add sdp to MNCC ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic9568c8927507e161aadfad1a4d20aa896d8ae30 Gerrit-Change-Number: 16032 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 00:58:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:59:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:59:00 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 ) Change subject: msc: overhaul voice call testing ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 00:59:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 00:59:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 00:59:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: fix Iu mo call In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 ) Change subject: msc: fix Iu mo call ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec Gerrit-Change-Number: 15939 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 00:59:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 01:00:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 01:00:14 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: avoid division by zero when calculating BER In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16067 ) Change subject: scheduler_trx.c: avoid division by zero when calculating BER ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Gerrit-Change-Number: 16067 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 01:00:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 01:01:43 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 01:01:43 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: general handling of NOPE / IDLE indications In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15989 ) Change subject: osmo-bts-trx: general handling of NOPE / IDLE indications ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Gerrit-Change-Number: 15989 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 01:01:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 01:01:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 01:01:45 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx: general handling of NOPE / IDLE indications In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15989 ) Change subject: osmo-bts-trx: general handling of NOPE / IDLE indications ...................................................................... osmo-bts-trx: general handling of NOPE / IDLE indications Each logical channel can now optionally have an additional handler, that will be called when a NOPE / IDLE indication is received from the transceiver. The aim of that handler is to keep the logical channel state updated in case if one or more Uplink bursts are lost. Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Related: OS#3428 --- M include/osmo-bts/scheduler_backend.h M src/common/scheduler.c M src/osmo-bts-trx/trx_if.c 3 files changed, 20 insertions(+), 8 deletions(-) Approvals: laforge: Looks good to me, approved dexter: Looks good to me, but someone else must approve; Verified Jenkins Builder: Verified diff --git a/include/osmo-bts/scheduler_backend.h b/include/osmo-bts/scheduler_backend.h index d713900..51c957c 100644 --- a/include/osmo-bts/scheduler_backend.h +++ b/include/osmo-bts/scheduler_backend.h @@ -31,6 +31,8 @@ trx_sched_dl_func *dl_fn; /*! \brief function to call when burst received from PHY */ trx_sched_ul_func *ul_fn; + /*! \brief function to call when NOPE.ind received from PHY */ + trx_sched_ul_func *nope_fn; /*! \brief channel flags, see TRX_CHAN_FLAG_* */ uint8_t flags; }; diff --git a/src/common/scheduler.c b/src/common/scheduler.c index 3adfc49..fe93c32 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -1349,6 +1349,13 @@ l1cs = &l1ts->chan_state[chan]; func = trx_chan_desc[chan].ul_fn; + /* TODO: handle noise measurements */ + if (chan == TRXC_IDLE && bi->flags & TRX_BI_F_NOPE_IND) { + LOGL1S(DL1P, LOGL_DEBUG, l1t, bi->tn, chan, bi->fn, + "Rx noise measurement (%d)\n", bi->rssi); + return -ENOTSUP; + } + /* check if channel is active */ if (!TRX_CHAN_IS_ACTIVE(l1cs, chan)) return -EINVAL; @@ -1364,6 +1371,14 @@ l1cs->last_tdma_fn = bi->fn; l1cs->proc_tdma_fs++; + /* handle NOPE indications (if the handler is present) */ + if (bi->flags & TRX_BI_F_NOPE_IND) { + func = trx_chan_desc[chan].nope_fn; + if (!func) + return 0; + return func(l1t, chan, bid, bi); + } + /* decrypt */ if (bi->burst_len && l1cs->ul_encr_algo) { ubit_t ks[114]; diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 920f441..dbf7805 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -1018,14 +1018,8 @@ if (hdr_len < 0) return hdr_len; - /* TODO: we can use NOPE indications to get noise levels on IDLE - * TDMA frames, and properly drive scheduler if nothing has been - * detected on non-IDLE channels. */ - if (bi.flags & TRX_BI_F_NOPE_IND) { - LOGPPHI(l1h->phy_inst, DTRX, LOGL_DEBUG, - "IDLE / NOPE indications are not (yet) supported\n"); - return -ENOTSUP; - } + if (bi.flags & TRX_BI_F_NOPE_IND) + goto skip_burst; /* We're done with the header now */ buf_len -= hdr_len; @@ -1047,6 +1041,7 @@ if (rc < 0) return rc; +skip_burst: /* Print header & burst info */ LOGPPHI(l1h->phy_inst, DTRX, LOGL_DEBUG, "Rx %s (hdr_ver=%u): %s\n", (bi.flags & TRX_BI_F_NOPE_IND) ? "NOPE.ind" : "UL burst", -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Gerrit-Change-Number: 15989 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 01:04:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 01:04:39 +0000 Subject: Change in osmo-msc[master]: Fix some typos In-Reply-To: References: Message-ID: laforge has uploaded a new patch set (#3) to the change originally created by roox. ( https://gerrit.osmocom.org/c/osmo-msc/+/16074 ) Change subject: Fix some typos ...................................................................... Fix some typos Fix typos and common misspellings in code comments and log messages. Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad --- M doc/manuals/chapters/counters_generated.adoc M doc/manuals/chapters/running.adoc M doc/sequence_charts/msc_log_to_ladder.py M include/osmocom/msc/gsm_data.h M include/osmocom/msc/mncc.h M include/osmocom/msc/msc_roles.h M include/osmocom/msc/sgs_server.h M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_09_11.c M src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c M src/libmsc/msc_a.c M src/libmsc/msc_vty.c M src/libmsc/ran_msg_a.c M src/libmsc/ran_peer.c M src/libmsc/sgs_iface.c M src/libmsc/smpp_openbsc.c M src/libmsc/sms_queue.c M src/libvlr/vlr.c M src/libvlr/vlr_auth_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err 27 files changed, 50 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/74/16074/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad Gerrit-Change-Number: 16074 Gerrit-PatchSet: 3 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 06:20:42 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 19 Nov 2019 06:20:42 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: avoid division by zero when calculating BER In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16067 ) Change subject: scheduler_trx.c: avoid division by zero when calculating BER ...................................................................... Patch Set 1: Code-Review-1 (1 comment) The fix is incomplete. https://gerrit.osmocom.org/c/osmo-bts/+/16067/1/src/osmo-bts-trx/scheduler_trx.c File src/osmo-bts-trx/scheduler_trx.c: https://gerrit.osmocom.org/c/osmo-bts/+/16067/1/src/osmo-bts-trx/scheduler_trx.c at 1221 PS1, Line 1221: trx_loop_amr_input As far as I can see, this function is also used in rx_tchh_fn(), so that invocation needs to be fixed too. Let's move the above checks to trx_loop_amr_input(), and simply pass both n_errors and n_bits_total. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Gerrit-Change-Number: 16067 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 06:20:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 06:38:00 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 19 Nov 2019 06:38:00 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16102 ) Change subject: osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind ...................................................................... osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind A NOPE.ind indicates absence of an Uplink burst, thus it does not carry a burst. Let's init the burst length to avoid uninitialized memory access in the scheduler code. Change-Id: I77f686bf7df385215892e71733a28ff0d90d7222 Fixes: CID#205857 --- 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/02/16102/1 diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index dbf7805..0ad3a7a 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -1018,8 +1018,10 @@ if (hdr_len < 0) return hdr_len; - if (bi.flags & TRX_BI_F_NOPE_IND) + if (bi.flags & TRX_BI_F_NOPE_IND) { + bi->burst_len = 0; goto skip_burst; + } /* We're done with the header now */ buf_len -= hdr_len; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16102 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I77f686bf7df385215892e71733a28ff0d90d7222 Gerrit-Change-Number: 16102 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 06:38:01 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 19 Nov 2019 06:38:01 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: also print both RSSI and ToA256 for NOPE.ind References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16103 ) Change subject: osmo-bts-trx/trx_if.c: also print both RSSI and ToA256 for NOPE.ind ...................................................................... osmo-bts-trx/trx_if.c: also print both RSSI and ToA256 for NOPE.ind Change-Id: I36586ac33757705df16e14cfdd92becb96c8cf70 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/03/16103/1 diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 0ad3a7a..b26dafb 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -835,13 +835,13 @@ /* Common TDMA parameters */ OSMO_STRBUF_PRINTF(sb, "tn=%u fn=%u", bi->tn, bi->fn); + /* RSSI and ToA256 */ + OSMO_STRBUF_PRINTF(sb, " rssi=%d toa256=%d", bi->rssi, bi->toa256); + /* Nothing else to print for NOPE.ind */ if (bi->flags & TRX_BI_F_NOPE_IND) return buf; - /* RSSI and ToA256 */ - OSMO_STRBUF_PRINTF(sb, " rssi=%d toa256=%d", bi->rssi, bi->toa256); - /* Modulation and TSC set */ if (bi->flags & TRX_BI_F_MOD_TYPE) OSMO_STRBUF_PRINTF(sb, " mod=%s", mod_names[bi->bt]); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16103 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I36586ac33757705df16e14cfdd92becb96c8cf70 Gerrit-Change-Number: 16103 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 07:14:21 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 19 Nov 2019 07:14:21 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/16102 to look at the new patch set (#2). Change subject: osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind ...................................................................... osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind A NOPE.ind indicates absence of an Uplink burst, thus it does not carry a burst. Let's init the burst length to avoid uninitialized memory access in the scheduler code. Change-Id: I77f686bf7df385215892e71733a28ff0d90d7222 Fixes: CID#205857 --- 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/02/16102/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16102 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I77f686bf7df385215892e71733a28ff0d90d7222 Gerrit-Change-Number: 16102 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 07:52:39 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 19 Nov 2019 07:52:39 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I filed References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16104 ) Change subject: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I filed ...................................................................... osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I filed Change-Id: I201b72d2a6f5307ede252d5d707f1ebadafe6a4b --- M src/osmo-bts-trx/trx_if.c 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/04/16104/1 diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 38ec8eb..099c330 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -728,7 +728,7 @@ /* IDLE / NOPE frame indication */ if (buf[0] & (1 << 7)) { bi->flags |= TRX_BI_F_NOPE_IND; - return TRX_UL_V1HDR_LEN; + goto skip_mts; } /* Modulation info and TSC set */ @@ -751,6 +751,7 @@ bi->tsc = buf[0] & 0b111; bi->flags |= TRX_BI_F_TS_INFO; +skip_mts: /* C/I: Carrier-to-Interference ratio (in centiBels) */ bi->ci_cb = (int16_t) osmo_load16be(buf + 1); bi->flags |= TRX_BI_F_CI_CB; @@ -838,6 +839,10 @@ /* RSSI and ToA256 */ OSMO_STRBUF_PRINTF(sb, " rssi=%d toa256=%d", bi->rssi, bi->toa256); + /* C/I: Carrier-to-Interference ratio (in centiBels) */ + if (bi->flags & TRX_BI_F_CI_CB) + OSMO_STRBUF_PRINTF(sb, " C/I=%d cB", bi->ci_cb); + /* Nothing else to print for NOPE.ind */ if (bi->flags & TRX_BI_F_NOPE_IND) return buf; @@ -850,10 +855,6 @@ if (bi->flags & TRX_BI_F_TS_INFO) OSMO_STRBUF_PRINTF(sb, " set=%u tsc=%u", bi->tsc_set, bi->tsc); - /* C/I: Carrier-to-Interference ratio (in centiBels) */ - if (bi->flags & TRX_BI_F_CI_CB) - OSMO_STRBUF_PRINTF(sb, " C/I=%d cB", bi->ci_cb); - /* Burst length */ OSMO_STRBUF_PRINTF(sb, " burst_len=%zu", bi->burst_len); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I201b72d2a6f5307ede252d5d707f1ebadafe6a4b Gerrit-Change-Number: 16104 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 08:06:23 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 19 Nov 2019 08:06:23 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: avoid division by zero when calculating BER In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#2) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/osmo-bts/+/16067 ) Change subject: scheduler_trx.c: avoid division by zero when calculating BER ...................................................................... scheduler_trx.c: avoid division by zero when calculating BER There is theoretical risk that when calculating the BER that a division by zero occurrs. Lets add a check to avoid n_errors / n_bits_total when n_bits_total is zero. Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Fixes: CID#205696 --- M src/osmo-bts-trx/loops.c M src/osmo-bts-trx/loops.h M src/osmo-bts-trx/scheduler_trx.c 3 files changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/67/16067/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Gerrit-Change-Number: 16067 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 10:57:13 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 19 Nov 2019 10:57:13 +0000 Subject: Change in osmo-msc[master]: Fix some typos In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16074 ) Change subject: Fix some typos ...................................................................... Patch Set 3: Code-Review+1 (3 comments) https://gerrit.osmocom.org/c/osmo-msc/+/16074/3/doc/manuals/chapters/counters_generated.adoc File doc/manuals/chapters/counters_generated.adoc: https://gerrit.osmocom.org/c/osmo-msc/+/16074/3/doc/manuals/chapters/counters_generated.adoc at 30 PS3, Line 30: successful I may be wrong, but 'successfully' seems more suitable here. https://gerrit.osmocom.org/c/osmo-msc/+/16074/3/include/osmocom/msc/gsm_data.h File include/osmocom/msc/gsm_data.h: https://gerrit.osmocom.org/c/osmo-msc/+/16074/3/include/osmocom/msc/gsm_data.h at 86 PS3, Line 86: successful same here https://gerrit.osmocom.org/c/osmo-msc/+/16074/3/src/libmsc/sgs_iface.c File src/libmsc/sgs_iface.c: https://gerrit.osmocom.org/c/osmo-msc/+/16074/3/src/libmsc/sgs_iface.c at 1281 PS3, Line 1281: SGs new vice versa: [a] new SGs interface -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad Gerrit-Change-Number: 16074 Gerrit-PatchSet: 3 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 10:57:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 11:25:09 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 19 Nov 2019 11:25:09 +0000 Subject: Change in docker-playground[master]: Update osmo-*/Dockerfile to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16063 ) Change subject: Update osmo-*/Dockerfile to log stdout+stderr of process to log file ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16063 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I9493ff73ef27c7c6d32b00cf827704b3f9cbf86a Gerrit-Change-Number: 16063 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 11:25:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 11:44:23 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 19 Nov 2019 11:44:23 +0000 Subject: Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16064 ) Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file ...................................................................... Patch Set 1: Code-Review-1 (4 comments) https://gerrit.osmocom.org/c/docker-playground/+/16064/1/ttcn3-bsc-test/jenkins-sccplite.sh File ttcn3-bsc-test/jenkins-sccplite.sh: https://gerrit.osmocom.org/c/docker-playground/+/16064/1/ttcn3-bsc-test/jenkins-sccplite.sh at 36 PS1, Line 36: 2 Should be 12 instead of 2 https://gerrit.osmocom.org/c/docker-playground/+/16064/1/ttcn3-bsc-test/jenkins.sh File ttcn3-bsc-test/jenkins.sh: https://gerrit.osmocom.org/c/docker-playground/+/16064/1/ttcn3-bsc-test/jenkins.sh at 44 PS1, Line 44: /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-omldummy 172.18.2.20 $((i + 1234)) 1 >>/data/osmo-bts-omldummy-${i}.log 2>&1" If osmo-bts-omldummy is not able to parse the config, it will print a short error and then respawn.sh will restart it right away, infinitely. This probably causes slaves to run out of disk space fast. Maybe add a commit, that limits the restart times in these respawn.sh scripts to a sane number(100 or 1000?), and displays the count? https://gerrit.osmocom.org/c/docker-playground/+/16064/1/ttcn3-remsim-test/jenkins.sh File ttcn3-remsim-test/jenkins.sh: https://gerrit.osmocom.org/c/docker-playground/+/16064/1/ttcn3-remsim-test/jenkins.sh at 17 PS1, Line 17: client server https://gerrit.osmocom.org/c/docker-playground/+/16064/1/ttcn3-sip-test/jenkins.sh File ttcn3-sip-test/jenkins.sh: https://gerrit.osmocom.org/c/docker-playground/+/16064/1/ttcn3-sip-test/jenkins.sh at 30 PS1, Line 30: osmo-sip-connector this line must be deleted -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 Gerrit-Change-Number: 16064 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 11:44:23 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 11:59:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 19 Nov 2019 11:59:18 +0000 Subject: Change in osmo-bts[master]: osmo-bts-virtual.cfg: ms-power-control dsp -> osmo References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16105 ) Change subject: osmo-bts-virtual.cfg: ms-power-control dsp -> osmo ...................................................................... osmo-bts-virtual.cfg: ms-power-control dsp -> osmo Fix error while starting osmo-bts-virtual with the example config: "This BTS model has no DSP/HW MS Power Control support" Fixes: c693067b7e99a643da673cb3e2a36162cbd0f59c ("Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP") Change-Id: I4f9a06e85d58294719a24197eb1c42a69fbd03d6 --- M doc/examples/virtual/osmo-bts-virtual.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/16105/1 diff --git a/doc/examples/virtual/osmo-bts-virtual.cfg b/doc/examples/virtual/osmo-bts-virtual.cfg index dbdc22f..79a7b04 100644 --- a/doc/examples/virtual/osmo-bts-virtual.cfg +++ b/doc/examples/virtual/osmo-bts-virtual.cfg @@ -57,5 +57,5 @@ power-ramp max-initial 23000 mdBm power-ramp step-size 2000 mdB power-ramp step-interval 1 - ms-power-control dsp + ms-power-control osmo phy 0 instance 0 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4f9a06e85d58294719a24197eb1c42a69fbd03d6 Gerrit-Change-Number: 16105 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 12:01:03 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 19 Nov 2019 12:01:03 +0000 Subject: Change in osmo-bts[master]: osmo-bts-virtual.cfg: ms-power-control dsp -> osmo In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16105 ) Change subject: osmo-bts-virtual.cfg: ms-power-control dsp -> osmo ...................................................................... Patch Set 1: Osmocom-Debian-install-nightly job is currently failing because of this: https://jenkins.osmocom.org/jenkins/job/Osmocom-Debian-install-nightly/438/consoleFull -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4f9a06e85d58294719a24197eb1c42a69fbd03d6 Gerrit-Change-Number: 16105 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 19 Nov 2019 12:01:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 12:06:22 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 19 Nov 2019 12:06:22 +0000 Subject: Change in osmo-bts[master]: osmo-bts-virtual.cfg: ms-power-control dsp -> osmo In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16105 ) Change subject: osmo-bts-virtual.cfg: ms-power-control dsp -> osmo ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4f9a06e85d58294719a24197eb1c42a69fbd03d6 Gerrit-Change-Number: 16105 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 19 Nov 2019 12:06:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:26:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:26:39 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16102 ) Change subject: osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16102 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I77f686bf7df385215892e71733a28ff0d90d7222 Gerrit-Change-Number: 16102 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 19 Nov 2019 18:26:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:26:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:26:58 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: also print both RSSI and ToA256 for NOPE.ind In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16103 ) Change subject: osmo-bts-trx/trx_if.c: also print both RSSI and ToA256 for NOPE.ind ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16103 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I36586ac33757705df16e14cfdd92becb96c8cf70 Gerrit-Change-Number: 16103 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 19 Nov 2019 18:26:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:27:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:27:24 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I filed In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16104 ) Change subject: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I filed ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I201b72d2a6f5307ede252d5d707f1ebadafe6a4b Gerrit-Change-Number: 16104 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 19 Nov 2019 18:27:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:27:43 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:27:43 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16102 ) Change subject: osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind ...................................................................... osmo-bts-trx/trx_if.c: fix: always initialize bi->burst_len for NOPE.ind A NOPE.ind indicates absence of an Uplink burst, thus it does not carry a burst. Let's init the burst length to avoid uninitialized memory access in the scheduler code. Change-Id: I77f686bf7df385215892e71733a28ff0d90d7222 Fixes: CID#205857 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index dbf7805..5854c06 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -1018,8 +1018,10 @@ if (hdr_len < 0) return hdr_len; - if (bi.flags & TRX_BI_F_NOPE_IND) + if (bi.flags & TRX_BI_F_NOPE_IND) { + bi.burst_len = 0; goto skip_burst; + } /* We're done with the header now */ buf_len -= hdr_len; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16102 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I77f686bf7df385215892e71733a28ff0d90d7222 Gerrit-Change-Number: 16102 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:27:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:27:44 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: also print both RSSI and ToA256 for NOPE.ind In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16103 ) Change subject: osmo-bts-trx/trx_if.c: also print both RSSI and ToA256 for NOPE.ind ...................................................................... osmo-bts-trx/trx_if.c: also print both RSSI and ToA256 for NOPE.ind Change-Id: I36586ac33757705df16e14cfdd92becb96c8cf70 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 5854c06..38ec8eb 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -835,13 +835,13 @@ /* Common TDMA parameters */ OSMO_STRBUF_PRINTF(sb, "tn=%u fn=%u", bi->tn, bi->fn); + /* RSSI and ToA256 */ + OSMO_STRBUF_PRINTF(sb, " rssi=%d toa256=%d", bi->rssi, bi->toa256); + /* Nothing else to print for NOPE.ind */ if (bi->flags & TRX_BI_F_NOPE_IND) return buf; - /* RSSI and ToA256 */ - OSMO_STRBUF_PRINTF(sb, " rssi=%d toa256=%d", bi->rssi, bi->toa256); - /* Modulation and TSC set */ if (bi->flags & TRX_BI_F_MOD_TYPE) OSMO_STRBUF_PRINTF(sb, " mod=%s", mod_names[bi->bt]); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16103 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I36586ac33757705df16e14cfdd92becb96c8cf70 Gerrit-Change-Number: 16103 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:28:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:28:29 +0000 Subject: Change in osmo-bts[master]: osmo-bts-virtual.cfg: ms-power-control dsp -> osmo In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16105 ) Change subject: osmo-bts-virtual.cfg: ms-power-control dsp -> osmo ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4f9a06e85d58294719a24197eb1c42a69fbd03d6 Gerrit-Change-Number: 16105 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 18:28:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:28:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:28:32 +0000 Subject: Change in osmo-bts[master]: osmo-bts-virtual.cfg: ms-power-control dsp -> osmo In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16105 ) Change subject: osmo-bts-virtual.cfg: ms-power-control dsp -> osmo ...................................................................... osmo-bts-virtual.cfg: ms-power-control dsp -> osmo Fix error while starting osmo-bts-virtual with the example config: "This BTS model has no DSP/HW MS Power Control support" Fixes: c693067b7e99a643da673cb3e2a36162cbd0f59c ("Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSP") Change-Id: I4f9a06e85d58294719a24197eb1c42a69fbd03d6 --- M doc/examples/virtual/osmo-bts-virtual.cfg 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/examples/virtual/osmo-bts-virtual.cfg b/doc/examples/virtual/osmo-bts-virtual.cfg index dbdc22f..79a7b04 100644 --- a/doc/examples/virtual/osmo-bts-virtual.cfg +++ b/doc/examples/virtual/osmo-bts-virtual.cfg @@ -57,5 +57,5 @@ power-ramp max-initial 23000 mdBm power-ramp step-size 2000 mdB power-ramp step-interval 1 - ms-power-control dsp + ms-power-control osmo phy 0 instance 0 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4f9a06e85d58294719a24197eb1c42a69fbd03d6 Gerrit-Change-Number: 16105 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:29:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:29:00 +0000 Subject: Change in docker-playground[master]: Update osmo-*/Dockerfile to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16063 ) Change subject: Update osmo-*/Dockerfile to log stdout+stderr of process to log file ...................................................................... Update osmo-*/Dockerfile to log stdout+stderr of process to log file This way we get VTY parsing failures as well as backtraces upon process crash. Related: OS#4212 Change-Id: I9493ff73ef27c7c6d32b00cf827704b3f9cbf86a --- M osmo-bsc-latest/Dockerfile M osmo-bsc-master/Dockerfile M osmo-bts-latest/Dockerfile M osmo-bts-master/Dockerfile M osmo-ggsn-latest/Dockerfile M osmo-ggsn-latest/osmo-ggsn.cfg M osmo-ggsn-master/Dockerfile M osmo-ggsn-master/osmo-ggsn.cfg M osmo-hlr-latest/Dockerfile M osmo-hlr-master/Dockerfile M osmo-hnbgw-latest/Dockerfile M osmo-hnbgw-master/Dockerfile M osmo-mgw-latest/Dockerfile M osmo-mgw-latest/osmo-mgw.cfg M osmo-mgw-master/Dockerfile M osmo-msc-latest/Dockerfile M osmo-msc-master/Dockerfile M osmo-nitb-latest/Dockerfile M osmo-nitb-master/Dockerfile M osmo-remsim-latest/Dockerfile M osmo-remsim-master/Dockerfile M osmo-sgsn-latest/Dockerfile M osmo-sgsn-master/Dockerfile M osmo-sip-latest/Dockerfile M osmo-sip-master/Dockerfile M osmo-stp-latest/Dockerfile M osmo-stp-latest/osmo-stp.cfg M osmo-stp-master/Dockerfile M osmo-stp-master/osmo-stp.cfg 29 files changed, 34 insertions(+), 133 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved pespin: Verified diff --git a/osmo-bsc-latest/Dockerfile b/osmo-bsc-latest/Dockerfile index 1682dea..5206a08 100644 --- a/osmo-bsc-latest/Dockerfile +++ b/osmo-bsc-latest/Dockerfile @@ -29,6 +29,6 @@ COPY osmo-bsc.cfg /data/osmo-bsc.cfg WORKDIR /data -CMD ["/usr/bin/osmo-bsc", "-c", "/data/osmo-bsc.cfg"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-bsc -c /data/osmo-bsc.cfg >/data/osmo-bsc.log 2>&1"] EXPOSE 3003 3002 4242 diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index 3c3f90a..75afbb7 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -44,6 +44,6 @@ COPY osmo-bsc.cfg /data/osmo-bsc.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-bsc"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-bsc -c /data/osmo-bsc.cfg >/data/osmo-bsc.log 2>&1"] #EXPOSE diff --git a/osmo-bts-latest/Dockerfile b/osmo-bts-latest/Dockerfile index 05dcb24..05c27fd 100644 --- a/osmo-bts-latest/Dockerfile +++ b/osmo-bts-latest/Dockerfile @@ -33,6 +33,6 @@ WORKDIR /data # send GSMTAP data to .230 which is the ttcn3-sysinfo test -CMD ["/usr/bin/osmo-bts-virtual", "-i", "172.18.0.230"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-bts-virtual -c /data/osmo-bts.cfg -i 172.18.0.230 >>/data/osmo-bts-virtual.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index a7f1145..b73f2ac 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -46,6 +46,6 @@ WORKDIR /data # send GSMTAP data to .230 which is the ttcn3-sysinfo test -CMD ["/usr/local/bin/osmo-bts-virtual", "-i", "172.18.0.230"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-bts-virtual -c /data/osmo-bts.cfg -i 172.18.0.230 >>/data/osmo-bts-virtual.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-ggsn-latest/Dockerfile b/osmo-ggsn-latest/Dockerfile index c1ff3dc..5259d51 100644 --- a/osmo-ggsn-latest/Dockerfile +++ b/osmo-ggsn-latest/Dockerfile @@ -27,6 +27,6 @@ COPY osmo-ggsn.cfg /data/osmo-ggsn.cfg WORKDIR /data -CMD ["/usr/bin/osmo-ggsn"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-ggsn -c /data/osmo-ggsn.cfg >/data/osmo-ggsn.log 2>&1"] EXPOSE 3386/udp 2123/udp 2152/udp 4257/tcp 4260/tcp diff --git a/osmo-ggsn-latest/osmo-ggsn.cfg b/osmo-ggsn-latest/osmo-ggsn.cfg index 5337ac8..59a1c9c 100644 --- a/osmo-ggsn-latest/osmo-ggsn.cfg +++ b/osmo-ggsn-latest/osmo-ggsn.cfg @@ -2,38 +2,11 @@ ! OpenGGSN (0.94.1-adac) configuration saved from vty !! ! -log file /data/openggsn.log - logging filter all 1 - logging color 0 - logging print category 1 - logging timestamp 1 - logging level ip info - logging level tun info - logging level ggsn info - logging level sgsn notice - logging level icmp6 debug - 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 log stderr logging filter all 1 logging color 1 - logging print category 0 - logging timestamp 0 + logging print category 1 + logging timestamp 1 logging level ip info logging level tun info logging level ggsn info diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index f27bef9..3802670 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -38,6 +38,6 @@ COPY osmo-ggsn.cfg /data/osmo-ggsn.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-ggsn"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-ggsn -c /data/osmo-ggsn.cfg >/data/osmo-ggsn.log 2>&1"] EXPOSE 3386/udp 2123/udp 2152/udp 4257/tcp 4260/tcp diff --git a/osmo-ggsn-master/osmo-ggsn.cfg b/osmo-ggsn-master/osmo-ggsn.cfg index 5337ac8..59a1c9c 100644 --- a/osmo-ggsn-master/osmo-ggsn.cfg +++ b/osmo-ggsn-master/osmo-ggsn.cfg @@ -2,38 +2,11 @@ ! OpenGGSN (0.94.1-adac) configuration saved from vty !! ! -log file /data/openggsn.log - logging filter all 1 - logging color 0 - logging print category 1 - logging timestamp 1 - logging level ip info - logging level tun info - logging level ggsn info - logging level sgsn notice - logging level icmp6 debug - 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 log stderr logging filter all 1 logging color 1 - logging print category 0 - logging timestamp 0 + logging print category 1 + logging timestamp 1 logging level ip info logging level tun info logging level ggsn info diff --git a/osmo-hlr-latest/Dockerfile b/osmo-hlr-latest/Dockerfile index b54eef4..f00c2d9 100644 --- a/osmo-hlr-latest/Dockerfile +++ b/osmo-hlr-latest/Dockerfile @@ -28,6 +28,6 @@ COPY osmo-hlr.cfg /data/osmo-hlr.cfg WORKDIR /data -CMD ["/usr/bin/osmo-hlr"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-hlr -c /data/osmo-hlr.cfg >/data/osmo-hlr.log 2>&1"] EXPOSE 4222 4258 4259 diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index e9f9398..6a09b0d 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -42,6 +42,6 @@ COPY osmo-hlr.cfg /data/osmo-hlr.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-hlr"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-hlr -c /data/osmo-hlr.cfg >/data/osmo-hlr.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-hnbgw-latest/Dockerfile b/osmo-hnbgw-latest/Dockerfile index 4456c8e..161480b 100644 --- a/osmo-hnbgw-latest/Dockerfile +++ b/osmo-hnbgw-latest/Dockerfile @@ -27,4 +27,4 @@ COPY osmo-hnbgw.cfg /data/osmo-hnbgw.cfg WORKDIR /data -CMD ["/usr/bin/osmo-hnbgw", "-c", "/data/osmo-hnbgw.cfg"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-hnbgw -c /data/osmo-hnbgw.cfg >/data/osmo-hnbgw.log 2>&1"] diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index af5bc91..951b95b 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -43,4 +43,4 @@ COPY osmo-hnbgw.cfg /data/osmo-hnbgw.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-hnbgw", "-c", "/data/osmo-hnbgw.cfg"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-hnbgw -c /data/osmo-hnbgw.cfg >/data/osmo-hnbgw.log 2>&1"] diff --git a/osmo-mgw-latest/Dockerfile b/osmo-mgw-latest/Dockerfile index e0afb1c..9a403f8 100644 --- a/osmo-mgw-latest/Dockerfile +++ b/osmo-mgw-latest/Dockerfile @@ -28,4 +28,4 @@ COPY osmo-mgw.cfg /data/osmo-mgw.cfg WORKDIR /data -CMD ["/usr/bin/osmo-mgw"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-mgw -c /data/osmo-mgw.cfg >/data/osmo-mgw.log 2>&1"] diff --git a/osmo-mgw-latest/osmo-mgw.cfg b/osmo-mgw-latest/osmo-mgw.cfg index 44653e3..23d5603 100644 --- a/osmo-mgw-latest/osmo-mgw.cfg +++ b/osmo-mgw-latest/osmo-mgw.cfg @@ -6,7 +6,7 @@ logging filter all 1 logging color 1 logging print category 1 - logging timestamp 0 + logging timestamp 1 logging level all everything logging level rtp notice logging level lglobal notice diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index 3df37c1..f898c7e 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -43,4 +43,4 @@ COPY osmo-mgw.cfg /data/osmo-mgw.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-mgw"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-mgw -c /data/osmo-mgw.cfg >/data/osmo-mgw.log 2>&1"] diff --git a/osmo-msc-latest/Dockerfile b/osmo-msc-latest/Dockerfile index 928c93a..5780f71 100644 --- a/osmo-msc-latest/Dockerfile +++ b/osmo-msc-latest/Dockerfile @@ -29,6 +29,6 @@ COPY osmo-msc.cfg /data/osmo-msc.cfg WORKDIR /data -CMD ["/usr/bin/osmo-msc"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-msc -c /data/osmo-msc.cfg >/data/osmo-msc.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index 21c7eda..55e5d6e 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -49,6 +49,6 @@ COPY osmo-msc.cfg /data/osmo-msc.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-msc"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-msc -c /data/osmo-msc.cfg >/data/osmo-msc.log 2>&1"] -#EXPOSE +#EXPOSE diff --git a/osmo-nitb-latest/Dockerfile b/osmo-nitb-latest/Dockerfile index 48cdf70..9e7ebdf 100644 --- a/osmo-nitb-latest/Dockerfile +++ b/osmo-nitb-latest/Dockerfile @@ -31,6 +31,6 @@ COPY bscs.config /data/bscs.config WORKDIR /data -CMD ["/usr/bin/osmo-nitb"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-nitb -c /data/osmo-nitb.cfg >/data/osmo-nitb.log 2>&1"] EXPOSE 3002/tcp 3003/tcp 4242/tcp 2775/tcp 4249/tcp diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index 3e20ec8..0dad7fa 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -46,6 +46,6 @@ COPY bscs.config /data/bscs.config WORKDIR /data -CMD ["/usr/local/bin/osmo-nitb"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-nitb -c /data/osmo-nitb.cfg >/data/osmo-nitb.log 2>&1"] EXPOSE 3002/tcp 3003/tcp 4242/tcp 2775/tcp 4249/tcp diff --git a/osmo-remsim-latest/Dockerfile b/osmo-remsim-latest/Dockerfile index a39aadb..45c5601 100644 --- a/osmo-remsim-latest/Dockerfile +++ b/osmo-remsim-latest/Dockerfile @@ -33,6 +33,6 @@ #COPY osmo-bts.cfg /data/osmo-bts.cfg WORKDIR /data -CMD ["/usr/bin/osmo-resmim-server"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-resmim-server >/data/osmo-resmim-server.log 2>&1"] #EXPOSE diff --git a/osmo-remsim-master/Dockerfile b/osmo-remsim-master/Dockerfile index acc7078..18df831 100644 --- a/osmo-remsim-master/Dockerfile +++ b/osmo-remsim-master/Dockerfile @@ -48,6 +48,6 @@ #COPY osmo-bts.cfg /data/osmo-bts.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-resmim-server"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-resmim-server >/data/osmo-resmim-server.log 2>&1"] #EXPOSE diff --git a/osmo-sgsn-latest/Dockerfile b/osmo-sgsn-latest/Dockerfile index 87dbca2..6d89927 100644 --- a/osmo-sgsn-latest/Dockerfile +++ b/osmo-sgsn-latest/Dockerfile @@ -27,6 +27,6 @@ COPY osmo-sgsn.cfg /data/osmo-sgsn.cfg WORKDIR /data -CMD ["/usr/bin/osmo-sgsn"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-sgsn -c /data/osmo-sgsn.cfg >/data/osmo-sgsn.log 2>&1"] EXPOSE 23000/udp 4245/tcp 4249/tcp diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index 9f31788..10fc92e 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -48,6 +48,6 @@ COPY osmo-sgsn.cfg /data/osmo-sgsn.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-sgsn"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-sgsn -c /data/osmo-sgsn.cfg >/data/osmo-sgsn.log 2>&1"] EXPOSE 23000/udp 4245/tcp 4249/tcp diff --git a/osmo-sip-latest/Dockerfile b/osmo-sip-latest/Dockerfile index a468c9f..24dfefa 100644 --- a/osmo-sip-latest/Dockerfile +++ b/osmo-sip-latest/Dockerfile @@ -27,6 +27,6 @@ COPY osmo-sip-connector.cfg /data/osmo-sip-connector.cfg WORKDIR /data -CMD ["/usr/bin/osmo-sip-connector"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-sip-connector -c /data/osmo-sip-connector.cfg >/data/osmo-sip-connector.log 2>&1"] #EXPOSE diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index 4a9d49b..2407984 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -48,6 +48,6 @@ COPY osmo-sip-connector.cfg /data/osmo-sip-connector.cfg WORKDIR /data -CMD ["/usr/local/bin/osmo-sip-connector"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-sip-connector -c /data/osmo-sip-connector.cfg >/data/osmo-sip-connector.log 2>&1"] #EXPOSE diff --git a/osmo-stp-latest/Dockerfile b/osmo-stp-latest/Dockerfile index 053e2ab..72872a1 100644 --- a/osmo-stp-latest/Dockerfile +++ b/osmo-stp-latest/Dockerfile @@ -26,6 +26,6 @@ VOLUME /data COPY osmo-stp.cfg /data/ -CMD ["/usr/bin/osmo-stp", "-c", "/data/osmo-stp.cfg"] +CMD ["/bin/sh", "-c", "/usr/bin/osmo-stp -c /data/osmo-stp.cfg >/data/osmo-stp.log 2>&1"] EXPOSE 2905 14001 4239 diff --git a/osmo-stp-latest/osmo-stp.cfg b/osmo-stp-latest/osmo-stp.cfg index ada8378..e06a9e0 100644 --- a/osmo-stp-latest/osmo-stp.cfg +++ b/osmo-stp-latest/osmo-stp.cfg @@ -2,32 +2,9 @@ ! osmo-stp (0.0.6.3.179-b248) configuration saved from vty !! ! -log stderr logging filter all 1 logging color 1 logging print category 1 - logging timestamp 0 - logging level all everything - logging level lglobal notice - logging level llapd notice - logging level linp debug - logging level lmux notice - logging level lmi notice - logging level lmib notice - logging level lsms notice - logging level lctrl notice - logging level lgtp notice - logging level lstats notice - logging level lgsup notice - logging level loap notice - logging level lss7 debug - logging level lsccp debug - logging level lsua debug - logging level lm3ua debug -log file /data/osmo-stp.log - logging filter all 1 - logging color 0 - logging print category 1 logging timestamp 1 logging level all everything logging level lglobal notice diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index fa49085..622d0b9 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -38,6 +38,6 @@ COPY osmo-stp.cfg /data/ -CMD ["/usr/local/bin/osmo-stp", "-c", "/data/osmo-stp.cfg"] +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-stp -c /data/osmo-stp.cfg >/data/osmo-stp.log 2>&1"] EXPOSE 2905 14001 4239 diff --git a/osmo-stp-master/osmo-stp.cfg b/osmo-stp-master/osmo-stp.cfg index ada8378..1ab53ed 100644 --- a/osmo-stp-master/osmo-stp.cfg +++ b/osmo-stp-master/osmo-stp.cfg @@ -6,28 +6,6 @@ logging filter all 1 logging color 1 logging print category 1 - logging timestamp 0 - logging level all everything - logging level lglobal notice - logging level llapd notice - logging level linp debug - logging level lmux notice - logging level lmi notice - logging level lmib notice - logging level lsms notice - logging level lctrl notice - logging level lgtp notice - logging level lstats notice - logging level lgsup notice - logging level loap notice - logging level lss7 debug - logging level lsccp debug - logging level lsua debug - logging level lm3ua debug -log file /data/osmo-stp.log - logging filter all 1 - logging color 0 - logging print category 1 logging timestamp 1 logging level all everything logging level lglobal notice -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16063 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I9493ff73ef27c7c6d32b00cf827704b3f9cbf86a Gerrit-Change-Number: 16063 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:32:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:32:07 +0000 Subject: Change in simtrace2[master]: add serial and version info in USB description In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16095 ) Change subject: add serial and version info in USB description ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16095 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I11a2cd8079fda374d816da180f39f1c33d10af60 Gerrit-Change-Number: 16095 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 19 Nov 2019 18:32:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:32:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:32:49 +0000 Subject: Change in simtrace2[master]: add DFU enter override capability In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16096 ) Change subject: add DFU enter override capability ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Iefff51a811ad0f3bf3a46b8e256b905d11344bea Gerrit-Change-Number: 16096 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 19 Nov 2019 18:32:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:33:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:33:58 +0000 Subject: Change in simtrace2[master]: add serial and version info in USB description In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16095 ) Change subject: add serial and version info in USB description ...................................................................... add serial and version info in USB description as for the main application firmware, the DFU bootloader firmware now also has the unique chip ID as iSerial in the USB description, and an additional empty USB configuration indicates the firmware version (e.g. DFU bootloader version). these are only visible when the device is in DFU mode. Change-Id: I11a2cd8079fda374d816da180f39f1c33d10af60 --- M firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h M firmware/atmel_softpack_libraries/usb/device/dfu/dfu_desc.c M firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c 3 files changed, 141 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h index 2a44602..7354696 100644 --- a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h +++ b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu.h @@ -101,7 +101,7 @@ extern struct dfudata _g_dfu; extern struct dfudata *g_dfu; -void set_usb_serial_str(const uint8_t *serial_usbstr); +void set_usb_serial_str(void); void DFURT_SwitchToDFU(void); diff --git a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_desc.c b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_desc.c index 75fded1..ebbe070 100644 --- a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_desc.c +++ b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_desc.c @@ -13,14 +13,87 @@ #include #include +#include "usb_strings_generated.h" + enum { STR_MANUF = 1, STR_PROD, STR_CONFIG, _STR_FIRST_ALT, + // serial string STR_SERIAL = (_STR_FIRST_ALT+BOARD_DFU_NUM_IF), + // version string (on additional interface) + VERSION_CONF_STR, + VERSION_STR, + // count + STRING_DESC_CNT, }; +/* USB string for the serial (using 128-bit device ID) */ +static unsigned char usb_string_serial[] = { + USBStringDescriptor_LENGTH(32), + USBGenericDescriptor_STRING, + USBStringDescriptor_UNICODE('0'), + USBStringDescriptor_UNICODE('0'), + USBStringDescriptor_UNICODE('1'), + USBStringDescriptor_UNICODE('1'), + USBStringDescriptor_UNICODE('2'), + USBStringDescriptor_UNICODE('2'), + USBStringDescriptor_UNICODE('3'), + USBStringDescriptor_UNICODE('3'), + USBStringDescriptor_UNICODE('4'), + USBStringDescriptor_UNICODE('4'), + USBStringDescriptor_UNICODE('5'), + USBStringDescriptor_UNICODE('5'), + USBStringDescriptor_UNICODE('6'), + USBStringDescriptor_UNICODE('6'), + USBStringDescriptor_UNICODE('7'), + USBStringDescriptor_UNICODE('7'), + USBStringDescriptor_UNICODE('8'), + USBStringDescriptor_UNICODE('8'), + USBStringDescriptor_UNICODE('9'), + USBStringDescriptor_UNICODE('9'), + USBStringDescriptor_UNICODE('a'), + USBStringDescriptor_UNICODE('a'), + USBStringDescriptor_UNICODE('b'), + USBStringDescriptor_UNICODE('b'), + USBStringDescriptor_UNICODE('c'), + USBStringDescriptor_UNICODE('c'), + USBStringDescriptor_UNICODE('d'), + USBStringDescriptor_UNICODE('d'), + USBStringDescriptor_UNICODE('e'), + USBStringDescriptor_UNICODE('e'), + USBStringDescriptor_UNICODE('f'), + USBStringDescriptor_UNICODE('f'), +}; + +/* USB string for the version */ +static const unsigned char usb_string_version_conf[] = { + USBStringDescriptor_LENGTH(16), + USBGenericDescriptor_STRING, + USBStringDescriptor_UNICODE('f'), + USBStringDescriptor_UNICODE('i'), + USBStringDescriptor_UNICODE('r'), + USBStringDescriptor_UNICODE('m'), + USBStringDescriptor_UNICODE('w'), + USBStringDescriptor_UNICODE('a'), + USBStringDescriptor_UNICODE('r'), + USBStringDescriptor_UNICODE('e'), + USBStringDescriptor_UNICODE(' '), + USBStringDescriptor_UNICODE('v'), + USBStringDescriptor_UNICODE('e'), + USBStringDescriptor_UNICODE('r'), + USBStringDescriptor_UNICODE('s'), + USBStringDescriptor_UNICODE('i'), + USBStringDescriptor_UNICODE('o'), + USBStringDescriptor_UNICODE('n'), +}; + +static const char git_version[] = GIT_VERSION; +static unsigned char usb_string_version[2 + ARRAY_SIZE(git_version) * 2 - 2]; +/** array of static (from usb_strings) and runtime (serial, version) USB strings */ +static const unsigned char *usb_strings_extended[STRING_DESC_CNT]; + static const USBDeviceDescriptor fsDevice = { .bLength = sizeof(USBDeviceDescriptor), .bDescriptorType = USBGenericDescriptor_DEVICE, @@ -34,12 +107,8 @@ .bcdDevice = BOARD_USB_RELEASE, .iManufacturer = STR_MANUF, .iProduct = STR_PROD, -#ifdef BOARD_USB_SERIAL .iSerialNumber = STR_SERIAL, -#else - .iSerialNumber = 0, -#endif - .bNumConfigurations = 1, + .bNumConfigurations = 2, // DFU + version configurations }; /* Alternate Interface Descriptor, we use one per partition/memory type */ @@ -85,17 +154,74 @@ .func_dfu = DFU_FUNC_DESC }; -#include "usb_strings_generated.h" - -#if 0 -void set_usb_serial_str(const uint8_t *serial_usbstr) +void set_usb_serial_str(void) { - usb_strings[STR_SERIAL] = serial_usbstr; + unsigned int i; + + // put device ID into USB serial number description + unsigned int device_id[4]; + EEFC_ReadUniqueID(device_id); + char device_id_string[32 + 1]; + snprintf(device_id_string, ARRAY_SIZE(device_id_string), "%08x%08x%08x%08x", + device_id[0], device_id[1], device_id[2], device_id[3]); + for (i = 0; i < ARRAY_SIZE(device_id_string) - 1; i++) { + usb_string_serial[2 + 2 * i] = device_id_string[i]; + } + + // put version into USB string + usb_string_version[0] = USBStringDescriptor_LENGTH(ARRAY_SIZE(git_version) - 1); + usb_string_version[1] = USBGenericDescriptor_STRING; + for (i = 0; i < ARRAY_SIZE(git_version) - 1; i++) { + usb_string_version[2 + i * 2 + 0] = git_version[i]; + usb_string_version[2 + i * 2 + 1] = 0; + } + + // fill extended USB strings + for (i = 0; i < ARRAY_SIZE(usb_strings) && i < ARRAY_SIZE(usb_strings_extended); i++) { + usb_strings_extended[i] = usb_strings[i]; + } + usb_strings_extended[STR_SERIAL] = usb_string_serial; + usb_strings_extended[VERSION_CONF_STR] = usb_string_version_conf; + usb_strings_extended[VERSION_STR] = usb_string_version; } -#endif + +/* USB descriptor just to show the version */ +typedef struct _SIMTraceDriverConfigurationDescriptorVersion { + /** Standard configuration descriptor. */ + USBConfigurationDescriptor configuration; + USBInterfaceDescriptor version; +} __attribute__ ((packed)) SIMTraceDriverConfigurationDescriptorVersion; + +static const SIMTraceDriverConfigurationDescriptorVersion + configurationDescriptorVersion = { + /* Standard configuration descriptor for the interface descriptor*/ + .configuration = { + .bLength = sizeof(USBConfigurationDescriptor), + .bDescriptorType = USBGenericDescriptor_CONFIGURATION, + .wTotalLength = sizeof(SIMTraceDriverConfigurationDescriptorVersion), + .bNumInterfaces = 1, + .bConfigurationValue = 2, + .iConfiguration = VERSION_CONF_STR, + .bmAttributes = USBD_BMATTRIBUTES, + .bMaxPower = USBConfigurationDescriptor_POWER(100), + }, + /* Interface standard descriptor just holding the version information */ + .version = { + .bLength = sizeof(USBInterfaceDescriptor), + .bDescriptorType = USBGenericDescriptor_INTERFACE, + .bInterfaceNumber = 0, + .bAlternateSetting = 0, + .bNumEndpoints = 0, + .bInterfaceClass = USB_CLASS_PROPRIETARY, + .bInterfaceSubClass = 0xff, + .bInterfaceProtocol = 0, + .iInterface = VERSION_STR, + }, +}; static const USBConfigurationDescriptor *conf_desc_arr[] = { &dfu_cfg_descriptor.ucfg, + &configurationDescriptorVersion.configuration, }; const USBDDriverDescriptors dfu_descriptors = { @@ -108,6 +234,6 @@ .pHsConfiguration = NULL, .pHsQualifier = NULL, .pHsOtherSpeed = NULL, - .pStrings = usb_strings, - .numStrings = ARRAY_SIZE(usb_strings), + .pStrings = usb_strings_extended, + .numStrings = ARRAY_SIZE(usb_strings_extended), }; diff --git a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c index 6230d6c..3ffd9b3 100644 --- a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c +++ b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c @@ -447,6 +447,7 @@ /* We already start in DFU idle mode */ g_dfu->state = DFU_STATE_dfuIDLE; + set_usb_serial_str(); USBDDriver_Initialize(&usbdDriver, pDescriptors, if_altsettings); USBD_Init(); USBD_Connect(); -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16095 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I11a2cd8079fda374d816da180f39f1c33d10af60 Gerrit-Change-Number: 16095 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:33:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:33:58 +0000 Subject: Change in simtrace2[master]: add DFU enter override capability In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16096 ) Change subject: add DFU enter override capability ...................................................................... add DFU enter override capability in case flashing the main application firmware using DFU failed, the main application might be broken and not allow to switch again to DFU mode to re-flash it correctly. the other board have a way to force entering (e.g. staying in) the bootloader using an external signal (e.g. a switch on the SIMtrace board). the OWHW DFU firmware did not have this functionality implemented. the design (e.g. schematic) already has the SIMTRACE_BOOTLOADER signal (on PA31) for this purpose. now the DFU bootloader will start the DFU mode when the SIMTRACE_BOOTLOADER is high. this change has been tested on OWHWv2. Change-Id: Iefff51a811ad0f3bf3a46b8e256b905d11344bea --- M firmware/libboard/owhw/include/board.h M firmware/libboard/owhw/source/owhw.c 2 files changed, 17 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/firmware/libboard/owhw/include/board.h b/firmware/libboard/owhw/include/board.h index 44472d0..f929771 100644 --- a/firmware/libboard/owhw/include/board.h +++ b/firmware/libboard/owhw/include/board.h @@ -46,6 +46,9 @@ /** index for green LED in LEDs pin definition array */ #define LED_NUM_GREEN 1 +/* pin connected to the SIMTRACE_BOOTLOADER signal. set high to force DFU bootloader start */ +#define PIN_BOOTLOADER {PIO_PA31, PIOA, ID_PIOA, PIO_INPUT, PIO_DEFAULT} + /* USIM 2 interface (USART) */ #define PIN_USIM2_CLK {PIO_PA2, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT} #define PIN_USIM2_IO {PIO_PA6, PIOA, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT} diff --git a/firmware/libboard/owhw/source/owhw.c b/firmware/libboard/owhw/source/owhw.c index 3bf51ec..516d592 100644 --- a/firmware/libboard/owhw/source/owhw.c +++ b/firmware/libboard/owhw/source/owhw.c @@ -1,7 +1,7 @@ /* Card simulator specific functions * * (C) 2015-2017 by Harald Welte - * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * (C) 2018-2019, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -65,3 +65,16 @@ { PIO_Configure(pins_cardsim, ARRAY_SIZE(pins_cardsim)); } + +int board_override_enter_dfu(void) +{ + const Pin bl_pin = PIN_BOOTLOADER; + + PIO_Configure(&bl_pin, 1); + + if (PIO_Get(&bl_pin) == 0) { // signal low + return 0; // do not override enter DFU + } else { + return 1; // override enter DFU + } +} -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Iefff51a811ad0f3bf3a46b8e256b905d11344bea Gerrit-Change-Number: 16096 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:35:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:35:02 +0000 Subject: Change in osmo-bsc[master]: abis_nm.c: fix error message in verify_chan_comb() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16093 ) Change subject: abis_nm.c: fix error message in verify_chan_comb() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic72753d821c3ab72cda79be71aed1704beefe983 Gerrit-Change-Number: 16093 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 18:35:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:35:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:35:16 +0000 Subject: Change in osmo-bsc[master]: abis_nm.c: replace magic numbers with NM_CHANC_* constants In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16094 ) Change subject: abis_nm.c: replace magic numbers with NM_CHANC_* constants ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I60b20d617bd8710a95977e41ae32a431af4402a9 Gerrit-Change-Number: 16094 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 19 Nov 2019 18:35:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:35:20 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:35:20 +0000 Subject: Change in osmo-bsc[master]: abis_nm.c: fix error message in verify_chan_comb() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16093 ) Change subject: abis_nm.c: fix error message in verify_chan_comb() ...................................................................... abis_nm.c: fix error message in verify_chan_comb() Change-Id: Ic72753d821c3ab72cda79be71aed1704beefe983 --- M src/osmo-bsc/abis_nm.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 523cc38..572d762 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -1797,7 +1797,7 @@ /* not allowed for TS0 of BCCH-TRX */ if (ts->trx == ts->trx->bts->c0 && ts->nr == 0) { - *reason = "SDCCH/8 must be on TS0."; + *reason = "SDCCH/8 must not be on C0/TS0."; return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic72753d821c3ab72cda79be71aed1704beefe983 Gerrit-Change-Number: 16093 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 19 18:35:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 19 Nov 2019 18:35:21 +0000 Subject: Change in osmo-bsc[master]: abis_nm.c: replace magic numbers with NM_CHANC_* constants In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16094 ) Change subject: abis_nm.c: replace magic numbers with NM_CHANC_* constants ...................................................................... abis_nm.c: replace magic numbers with NM_CHANC_* constants Change-Id: I60b20d617bd8710a95977e41ae32a431af4402a9 --- M src/osmo-bsc/abis_nm.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 572d762..ca0df68 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -1804,8 +1804,8 @@ /* not on the same TRX that has a BCCH+SDCCH4 * combination */ if (ts->trx != ts->trx->bts->c0 && - (ts->trx->ts[0].nm_chan_comb == 5 || - ts->trx->ts[0].nm_chan_comb == 8)) { + (ts->trx->ts[0].nm_chan_comb == NM_CHANC_BCCHComb || + ts->trx->ts[0].nm_chan_comb == NM_CHANC_SDCCH_CBCH)) { *reason = "SDCCH/8 and BCCH must be on the same TRX."; return -EINVAL; } @@ -1829,7 +1829,7 @@ return -EINVAL; } break; - case 8: /* this is not like 08.58, but in fact + case NM_CHANC_SDCCH_CBCH: /* this is not like 08.58, but in fact * FCCH+SCH+BCCH+CCCH+SDCCH/4+SACCH/C4+CBCH */ /* FIXME: only one CBCH allowed per cell */ break; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I60b20d617bd8710a95977e41ae32a431af4402a9 Gerrit-Change-Number: 16094 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 04:41:02 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 20 Nov 2019 04:41:02 +0000 Subject: Change in libosmo-netif[master]: osmux_test: don't use color logging References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/16106 ) Change subject: osmux_test: don't use color logging ...................................................................... osmux_test: don't use color logging Change-Id: I7b0c8d311123f4fa0aeedf3938c8628a4442daf7 --- M tests/osmo-pcap-test/osmux_test.c M tests/osmux/osmux_test.c M tests/osmux/osmux_test.ok 3 files changed, 216 insertions(+), 214 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/06/16106/1 diff --git a/tests/osmo-pcap-test/osmux_test.c b/tests/osmo-pcap-test/osmux_test.c index 9163753..e6bbeb1 100644 --- a/tests/osmo-pcap-test/osmux_test.c +++ b/tests/osmo-pcap-test/osmux_test.c @@ -177,6 +177,7 @@ tall_test = talloc_named_const(NULL, 1, "osmux_pcap_test"); osmo_init_logging(&osmux_log_info); log_set_log_level(osmo_stderr_target, LOGL_DEBUG); + log_set_use_color(osmo_stderr_target, 0); osmo_pcap_init(); diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c index b6a43fe..f0edeab 100644 --- a/tests/osmux/osmux_test.c +++ b/tests/osmux/osmux_test.c @@ -296,6 +296,7 @@ log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE); log_set_print_category(osmo_stderr_target, 1); log_set_print_category_hex(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); osmux_xfrm_output_init2(&h_output, 0x7000000, 98); osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL); diff --git a/tests/osmux/osmux_test.ok b/tests/osmux/osmux_test.ok index b5618a3..bd1b066 100644 --- a/tests/osmux/osmux_test.ok +++ b/tests/osmux/osmux_test.ok @@ -1,10 +1,10 @@ -DLMUX initialized osmux input converter -sys={23.444242}, mono={0.020000}: clock_override_add +DLMUX initialized osmux input converter +sys={23.444242}, mono={0.020000}: clock_override_add sys={23.464242}, mono={0.040000}: clock_override_add sys={23.484242}, mono={0.060000}: clock_override_add sys={23.504242}, mono={0.080000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.504242}, mono={0.080000}: OSMUX message (len=256): OSMUX seq=000 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=001 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=002 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=003 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={23.504242}, mono={0.080000}: OSMUX message (len=256): OSMUX seq=000 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=001 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=002 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=003 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.504242}, mono={0.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=1 ext=0 csrc_count=0 sequence=9158 timestamp=1681692777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.524242}, mono={0.100000}: clock_override_add sys={23.524242}, mono={0.100000}: OSMUX message (len=106): OSMUX seq=004 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=005 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=006 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=007 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -15,8 +15,8 @@ sys={23.604242}, mono={0.180000}: clock_override_add sys={23.624242}, mono={0.200000}: clock_override_add sys={23.644242}, mono={0.220000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.644242}, mono={0.220000}: OSMUX message (len=256): OSMUX seq=012 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=013 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=014 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=015 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={23.644242}, mono={0.220000}: OSMUX message (len=256): OSMUX seq=012 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=013 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=014 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=015 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.664242}, mono={0.240000}: clock_override_add sys={23.664242}, mono={0.240000}: OSMUX message (len=106): OSMUX seq=016 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=017 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=018 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=019 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.684242}, mono={0.260000}: clock_override_add @@ -26,8 +26,8 @@ sys={23.744242}, mono={0.320000}: clock_override_add sys={23.764242}, mono={0.340000}: clock_override_add sys={23.784242}, mono={0.360000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.784242}, mono={0.360000}: OSMUX message (len=256): OSMUX seq=024 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=025 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=026 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=027 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={23.784242}, mono={0.360000}: OSMUX message (len=256): OSMUX seq=024 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=025 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=026 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=027 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.804242}, mono={0.380000}: clock_override_add sys={23.804242}, mono={0.380000}: OSMUX message (len=106): OSMUX seq=028 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=029 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=030 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=031 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.824242}, mono={0.400000}: clock_override_add @@ -37,8 +37,8 @@ sys={23.884242}, mono={0.460000}: clock_override_add sys={23.904242}, mono={0.480000}: clock_override_add sys={23.924242}, mono={0.500000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.924242}, mono={0.500000}: OSMUX message (len=256): OSMUX seq=036 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=037 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=038 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=039 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={23.924242}, mono={0.500000}: OSMUX message (len=256): OSMUX seq=036 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=037 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=038 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=039 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.944242}, mono={0.520000}: clock_override_add sys={23.944242}, mono={0.520000}: OSMUX message (len=106): OSMUX seq=040 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=041 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=042 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=043 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.964242}, mono={0.540000}: clock_override_add @@ -48,8 +48,8 @@ sys={24.024242}, mono={0.600000}: clock_override_add sys={24.044242}, mono={0.620000}: clock_override_add sys={24.064242}, mono={0.640000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.064242}, mono={0.640000}: OSMUX message (len=256): OSMUX seq=048 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=049 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=050 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=051 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={24.064242}, mono={0.640000}: OSMUX message (len=256): OSMUX seq=048 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=049 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=050 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=051 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.084242}, mono={0.660000}: clock_override_add sys={24.084242}, mono={0.660000}: OSMUX message (len=106): OSMUX seq=052 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=053 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=054 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=055 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.104242}, mono={0.680000}: clock_override_add @@ -59,8 +59,8 @@ sys={24.164242}, mono={0.740000}: clock_override_add sys={24.184242}, mono={0.760000}: clock_override_add sys={24.204242}, mono={0.780000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.204242}, mono={0.780000}: OSMUX message (len=256): OSMUX seq=060 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=061 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=062 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=063 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={24.204242}, mono={0.780000}: OSMUX message (len=256): OSMUX seq=060 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=061 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=062 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=063 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.224242}, mono={0.800000}: clock_override_add sys={24.224242}, mono={0.800000}: OSMUX message (len=106): OSMUX seq=064 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=065 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=066 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=067 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.244242}, mono={0.820000}: clock_override_add @@ -70,8 +70,8 @@ sys={24.304242}, mono={0.880000}: clock_override_add sys={24.324242}, mono={0.900000}: clock_override_add sys={24.344242}, mono={0.920000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.344242}, mono={0.920000}: OSMUX message (len=256): OSMUX seq=072 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=073 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=074 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=075 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={24.344242}, mono={0.920000}: OSMUX message (len=256): OSMUX seq=072 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=073 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=074 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=075 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.364242}, mono={0.940000}: clock_override_add sys={24.364242}, mono={0.940000}: OSMUX message (len=106): OSMUX seq=076 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=077 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=078 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=079 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.384242}, mono={0.960000}: clock_override_add @@ -81,8 +81,8 @@ sys={24.444242}, mono={1.020000}: clock_override_add sys={24.464242}, mono={1.040000}: clock_override_add sys={24.484242}, mono={1.060000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.484242}, mono={1.060000}: OSMUX message (len=256): OSMUX seq=084 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=085 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=086 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=087 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={24.484242}, mono={1.060000}: OSMUX message (len=256): OSMUX seq=084 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=085 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=086 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=087 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.504242}, mono={1.080000}: clock_override_add sys={24.504242}, mono={1.080000}: OSMUX message (len=106): OSMUX seq=088 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=089 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=090 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=091 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.524242}, mono={1.100000}: clock_override_add @@ -92,8 +92,8 @@ sys={24.584242}, mono={1.160000}: clock_override_add sys={24.604242}, mono={1.180000}: clock_override_add sys={24.624242}, mono={1.200000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.624242}, mono={1.200000}: OSMUX message (len=256): OSMUX seq=096 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=097 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=098 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=099 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={24.624242}, mono={1.200000}: OSMUX message (len=256): OSMUX seq=096 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=097 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=098 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=099 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.644242}, mono={1.220000}: clock_override_add sys={24.644242}, mono={1.220000}: OSMUX message (len=106): OSMUX seq=100 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=101 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=102 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=103 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.664242}, mono={1.240000}: clock_override_add @@ -358,14 +358,14 @@ sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9411 timestamp=1681733257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9412 timestamp=1681733417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9413 timestamp=1681733577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX initialized osmux input converter -sys={26.704242}, mono={3.280000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16396 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX initialized osmux input converter +sys={26.704242}, mono={3.280000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16396 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16397 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16398 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.704242}, mono={3.280000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16399 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.704242}, mono={3.280000}: OSMUX message (len=242): OSMUX seq=000 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=001 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.704242}, mono={3.280000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16399 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.704242}, mono={3.280000}: OSMUX message (len=242): OSMUX seq=000 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=001 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=1 ext=0 csrc_count=0 sequence=9414 timestamp=1681733737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9415 timestamp=1681733897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9416 timestamp=1681734057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -376,10 +376,10 @@ sys={26.744242}, mono={3.320000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16400 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.744242}, mono={3.320000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16401 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.744242}, mono={3.320000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16402 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.744242}, mono={3.320000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16403 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.744242}, mono={3.320000}: OSMUX message (len=242): OSMUX seq=002 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=003 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.744242}, mono={3.320000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16403 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.744242}, mono={3.320000}: OSMUX message (len=242): OSMUX seq=002 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=003 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.744242}, mono={3.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9419 timestamp=1681734537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.744242}, mono={3.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9420 timestamp=1681734697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.744242}, mono={3.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9421 timestamp=1681734857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -391,10 +391,10 @@ sys={26.784242}, mono={3.360000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16404 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.784242}, mono={3.360000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16405 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.784242}, mono={3.360000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16406 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.784242}, mono={3.360000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16407 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.784242}, mono={3.360000}: OSMUX message (len=242): OSMUX seq=004 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=005 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.784242}, mono={3.360000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16407 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.784242}, mono={3.360000}: OSMUX message (len=242): OSMUX seq=004 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=005 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.784242}, mono={3.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9425 timestamp=1681735497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.784242}, mono={3.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9426 timestamp=1681735657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.784242}, mono={3.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9427 timestamp=1681735817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -406,10 +406,10 @@ sys={26.824242}, mono={3.400000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16408 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.824242}, mono={3.400000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16409 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.824242}, mono={3.400000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16410 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.824242}, mono={3.400000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16411 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.824242}, mono={3.400000}: OSMUX message (len=242): OSMUX seq=006 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=007 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.824242}, mono={3.400000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16411 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.824242}, mono={3.400000}: OSMUX message (len=242): OSMUX seq=006 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=007 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.824242}, mono={3.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9431 timestamp=1681736457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.824242}, mono={3.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9432 timestamp=1681736617 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.824242}, mono={3.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9433 timestamp=1681736777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -421,10 +421,10 @@ sys={26.864242}, mono={3.440000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16412 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.864242}, mono={3.440000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16413 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.864242}, mono={3.440000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16414 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.864242}, mono={3.440000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16415 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.864242}, mono={3.440000}: OSMUX message (len=242): OSMUX seq=008 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=009 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.864242}, mono={3.440000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16415 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.864242}, mono={3.440000}: OSMUX message (len=242): OSMUX seq=008 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=009 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.864242}, mono={3.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9437 timestamp=1681737417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.864242}, mono={3.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9438 timestamp=1681737577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.864242}, mono={3.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9439 timestamp=1681737737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -436,10 +436,10 @@ sys={26.904242}, mono={3.480000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16416 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.904242}, mono={3.480000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16417 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.904242}, mono={3.480000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16418 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.904242}, mono={3.480000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16419 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.904242}, mono={3.480000}: OSMUX message (len=242): OSMUX seq=010 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=011 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.904242}, mono={3.480000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16419 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.904242}, mono={3.480000}: OSMUX message (len=242): OSMUX seq=010 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=011 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.904242}, mono={3.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9443 timestamp=1681738377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.904242}, mono={3.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9444 timestamp=1681738537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.904242}, mono={3.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9445 timestamp=1681738697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -451,10 +451,10 @@ sys={26.944242}, mono={3.520000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16420 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.944242}, mono={3.520000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16421 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.944242}, mono={3.520000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16422 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.944242}, mono={3.520000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16423 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.944242}, mono={3.520000}: OSMUX message (len=242): OSMUX seq=012 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=013 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.944242}, mono={3.520000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16423 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.944242}, mono={3.520000}: OSMUX message (len=242): OSMUX seq=012 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=013 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.944242}, mono={3.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9449 timestamp=1681739337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.944242}, mono={3.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9450 timestamp=1681739497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.944242}, mono={3.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9451 timestamp=1681739657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -466,10 +466,10 @@ sys={26.984242}, mono={3.560000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16424 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.984242}, mono={3.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16425 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.984242}, mono={3.560000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16426 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.984242}, mono={3.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16427 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.984242}, mono={3.560000}: OSMUX message (len=242): OSMUX seq=014 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=015 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.984242}, mono={3.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16427 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.984242}, mono={3.560000}: OSMUX message (len=242): OSMUX seq=014 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=015 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.984242}, mono={3.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9455 timestamp=1681740297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.984242}, mono={3.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9456 timestamp=1681740457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.984242}, mono={3.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9457 timestamp=1681740617 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -481,10 +481,10 @@ sys={27.024242}, mono={3.600000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16428 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.024242}, mono={3.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16429 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.024242}, mono={3.600000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16430 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.024242}, mono={3.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16431 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.024242}, mono={3.600000}: OSMUX message (len=242): OSMUX seq=016 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=017 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.024242}, mono={3.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16431 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.024242}, mono={3.600000}: OSMUX message (len=242): OSMUX seq=016 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=017 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.024242}, mono={3.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9461 timestamp=1681741257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.024242}, mono={3.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9462 timestamp=1681741417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.024242}, mono={3.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9463 timestamp=1681741577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -496,10 +496,10 @@ sys={27.064242}, mono={3.640000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16432 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.064242}, mono={3.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16433 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.064242}, mono={3.640000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16434 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.064242}, mono={3.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16435 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.064242}, mono={3.640000}: OSMUX message (len=242): OSMUX seq=018 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=019 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.064242}, mono={3.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16435 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.064242}, mono={3.640000}: OSMUX message (len=242): OSMUX seq=018 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=019 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.064242}, mono={3.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9467 timestamp=1681742217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.064242}, mono={3.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9468 timestamp=1681742377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.064242}, mono={3.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9469 timestamp=1681742537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -511,10 +511,10 @@ sys={27.104242}, mono={3.680000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16436 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.104242}, mono={3.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16437 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.104242}, mono={3.680000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16438 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.104242}, mono={3.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16439 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.104242}, mono={3.680000}: OSMUX message (len=242): OSMUX seq=020 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=021 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.104242}, mono={3.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16439 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.104242}, mono={3.680000}: OSMUX message (len=242): OSMUX seq=020 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=021 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.104242}, mono={3.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9473 timestamp=1681743177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.104242}, mono={3.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9474 timestamp=1681743337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.104242}, mono={3.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9475 timestamp=1681743497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -526,10 +526,10 @@ sys={27.144242}, mono={3.720000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16440 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.144242}, mono={3.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16441 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.144242}, mono={3.720000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16442 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.144242}, mono={3.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16443 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.144242}, mono={3.720000}: OSMUX message (len=242): OSMUX seq=022 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=023 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.144242}, mono={3.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16443 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.144242}, mono={3.720000}: OSMUX message (len=242): OSMUX seq=022 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=023 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.144242}, mono={3.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9479 timestamp=1681744137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.144242}, mono={3.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9480 timestamp=1681744297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.144242}, mono={3.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9481 timestamp=1681744457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -541,10 +541,10 @@ sys={27.184242}, mono={3.760000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16444 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.184242}, mono={3.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16445 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.184242}, mono={3.760000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16446 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.184242}, mono={3.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16447 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.184242}, mono={3.760000}: OSMUX message (len=242): OSMUX seq=024 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=025 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.184242}, mono={3.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16447 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.184242}, mono={3.760000}: OSMUX message (len=242): OSMUX seq=024 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=025 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.184242}, mono={3.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9485 timestamp=1681745097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.184242}, mono={3.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9486 timestamp=1681745257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.184242}, mono={3.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9487 timestamp=1681745417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -556,10 +556,10 @@ sys={27.224242}, mono={3.800000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16448 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.224242}, mono={3.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16449 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.224242}, mono={3.800000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16450 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.224242}, mono={3.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16451 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.224242}, mono={3.800000}: OSMUX message (len=242): OSMUX seq=026 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=027 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.224242}, mono={3.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16451 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.224242}, mono={3.800000}: OSMUX message (len=242): OSMUX seq=026 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=027 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.224242}, mono={3.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9491 timestamp=1681746057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.224242}, mono={3.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9492 timestamp=1681746217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.224242}, mono={3.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9493 timestamp=1681746377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -571,10 +571,10 @@ sys={27.264242}, mono={3.840000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16452 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.264242}, mono={3.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16453 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.264242}, mono={3.840000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16454 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.264242}, mono={3.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16455 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.264242}, mono={3.840000}: OSMUX message (len=242): OSMUX seq=028 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=029 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.264242}, mono={3.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16455 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.264242}, mono={3.840000}: OSMUX message (len=242): OSMUX seq=028 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=029 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.264242}, mono={3.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9497 timestamp=1681747017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.264242}, mono={3.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9498 timestamp=1681747177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.264242}, mono={3.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9499 timestamp=1681747337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -586,10 +586,10 @@ sys={27.304242}, mono={3.880000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16456 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.304242}, mono={3.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16457 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.304242}, mono={3.880000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16458 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.304242}, mono={3.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16459 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.304242}, mono={3.880000}: OSMUX message (len=242): OSMUX seq=030 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=031 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.304242}, mono={3.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16459 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.304242}, mono={3.880000}: OSMUX message (len=242): OSMUX seq=030 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=031 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.304242}, mono={3.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9503 timestamp=1681747977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.304242}, mono={3.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9504 timestamp=1681748137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.304242}, mono={3.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9505 timestamp=1681748297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -601,10 +601,10 @@ sys={27.344242}, mono={3.920000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16460 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.344242}, mono={3.920000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16461 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.344242}, mono={3.920000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16462 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.344242}, mono={3.920000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16463 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.344242}, mono={3.920000}: OSMUX message (len=98): OSMUX seq=032 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=033 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.344242}, mono={3.920000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16463 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.344242}, mono={3.920000}: OSMUX message (len=98): OSMUX seq=032 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=033 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.344242}, mono={3.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9509 timestamp=1681748937 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.344242}, mono={3.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=1 ext=0 csrc_count=0 sequence=9510 timestamp=1681749097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.344242}, mono={3.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9511 timestamp=1681749257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -616,10 +616,10 @@ sys={27.384242}, mono={3.960000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16464 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.384242}, mono={3.960000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16465 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.384242}, mono={3.960000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16466 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.384242}, mono={3.960000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16467 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.384242}, mono={3.960000}: OSMUX message (len=98): OSMUX seq=034 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=035 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.384242}, mono={3.960000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16467 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.384242}, mono={3.960000}: OSMUX message (len=98): OSMUX seq=034 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=035 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.384242}, mono={3.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9515 timestamp=1681749897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.384242}, mono={3.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9516 timestamp=1681750057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.384242}, mono={3.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9517 timestamp=1681750217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -631,10 +631,10 @@ sys={27.424242}, mono={4.000000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16468 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.424242}, mono={4.000000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16469 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.424242}, mono={4.000000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16470 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.424242}, mono={4.000000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16471 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.424242}, mono={4.000000}: OSMUX message (len=98): OSMUX seq=036 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=037 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.424242}, mono={4.000000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16471 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.424242}, mono={4.000000}: OSMUX message (len=98): OSMUX seq=036 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=037 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.424242}, mono={4.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9521 timestamp=1681750857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.424242}, mono={4.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9522 timestamp=1681751017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.424242}, mono={4.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9523 timestamp=1681751177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -646,10 +646,10 @@ sys={27.464242}, mono={4.040000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16472 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.464242}, mono={4.040000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16473 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.464242}, mono={4.040000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16474 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.464242}, mono={4.040000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16475 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.464242}, mono={4.040000}: OSMUX message (len=98): OSMUX seq=038 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=039 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.464242}, mono={4.040000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16475 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.464242}, mono={4.040000}: OSMUX message (len=98): OSMUX seq=038 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=039 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.464242}, mono={4.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9527 timestamp=1681751817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.464242}, mono={4.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9528 timestamp=1681751977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.464242}, mono={4.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9529 timestamp=1681752137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -661,10 +661,10 @@ sys={27.504242}, mono={4.080000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16476 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.504242}, mono={4.080000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16477 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.504242}, mono={4.080000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16478 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.504242}, mono={4.080000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16479 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.504242}, mono={4.080000}: OSMUX message (len=98): OSMUX seq=040 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=041 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.504242}, mono={4.080000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16479 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.504242}, mono={4.080000}: OSMUX message (len=98): OSMUX seq=040 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=041 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.504242}, mono={4.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9533 timestamp=1681752777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.504242}, mono={4.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9534 timestamp=1681752937 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.504242}, mono={4.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9535 timestamp=1681753097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -676,10 +676,10 @@ sys={27.544242}, mono={4.120000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16480 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.544242}, mono={4.120000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16481 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.544242}, mono={4.120000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16482 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.544242}, mono={4.120000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16483 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.544242}, mono={4.120000}: OSMUX message (len=98): OSMUX seq=042 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=043 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.544242}, mono={4.120000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16483 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.544242}, mono={4.120000}: OSMUX message (len=98): OSMUX seq=042 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=043 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.544242}, mono={4.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9539 timestamp=1681753737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.544242}, mono={4.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9540 timestamp=1681753897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.544242}, mono={4.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9541 timestamp=1681754057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -691,10 +691,10 @@ sys={27.584242}, mono={4.160000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16484 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.584242}, mono={4.160000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16485 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.584242}, mono={4.160000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16486 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.584242}, mono={4.160000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16487 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.584242}, mono={4.160000}: OSMUX message (len=98): OSMUX seq=044 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=045 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.584242}, mono={4.160000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16487 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.584242}, mono={4.160000}: OSMUX message (len=98): OSMUX seq=044 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=045 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.584242}, mono={4.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9545 timestamp=1681754697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.584242}, mono={4.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9546 timestamp=1681754857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.584242}, mono={4.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9547 timestamp=1681755017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -706,10 +706,10 @@ sys={27.624242}, mono={4.200000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16488 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.624242}, mono={4.200000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16489 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.624242}, mono={4.200000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16490 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.624242}, mono={4.200000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16491 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.624242}, mono={4.200000}: OSMUX message (len=98): OSMUX seq=046 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=047 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.624242}, mono={4.200000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16491 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.624242}, mono={4.200000}: OSMUX message (len=98): OSMUX seq=046 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=047 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.624242}, mono={4.200000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9551 timestamp=1681755657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.624242}, mono={4.200000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9552 timestamp=1681755817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.624242}, mono={4.200000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9553 timestamp=1681755977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -721,10 +721,10 @@ sys={27.664242}, mono={4.240000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16492 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.664242}, mono={4.240000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16493 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.664242}, mono={4.240000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16494 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.664242}, mono={4.240000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16495 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.664242}, mono={4.240000}: OSMUX message (len=98): OSMUX seq=048 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=049 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.664242}, mono={4.240000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16495 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.664242}, mono={4.240000}: OSMUX message (len=98): OSMUX seq=048 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=049 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.664242}, mono={4.240000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9557 timestamp=1681756617 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.664242}, mono={4.240000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9558 timestamp=1681756777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.664242}, mono={4.240000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9559 timestamp=1681756937 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -736,10 +736,10 @@ sys={27.704242}, mono={4.280000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16496 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.704242}, mono={4.280000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16497 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.704242}, mono={4.280000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16498 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.704242}, mono={4.280000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16499 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.704242}, mono={4.280000}: OSMUX message (len=98): OSMUX seq=050 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=051 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.704242}, mono={4.280000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16499 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.704242}, mono={4.280000}: OSMUX message (len=98): OSMUX seq=050 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=051 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.704242}, mono={4.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9563 timestamp=1681757577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.704242}, mono={4.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9564 timestamp=1681757737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.704242}, mono={4.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9565 timestamp=1681757897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -751,10 +751,10 @@ sys={27.744242}, mono={4.320000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16500 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.744242}, mono={4.320000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16501 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.744242}, mono={4.320000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16502 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.744242}, mono={4.320000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16503 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.744242}, mono={4.320000}: OSMUX message (len=98): OSMUX seq=052 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=053 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.744242}, mono={4.320000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16503 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.744242}, mono={4.320000}: OSMUX message (len=98): OSMUX seq=052 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=053 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.744242}, mono={4.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9569 timestamp=1681758537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.744242}, mono={4.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9570 timestamp=1681758697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.744242}, mono={4.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9571 timestamp=1681758857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -766,10 +766,10 @@ sys={27.784242}, mono={4.360000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16504 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.784242}, mono={4.360000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16505 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.784242}, mono={4.360000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16506 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.784242}, mono={4.360000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16507 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.784242}, mono={4.360000}: OSMUX message (len=98): OSMUX seq=054 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=055 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.784242}, mono={4.360000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16507 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.784242}, mono={4.360000}: OSMUX message (len=98): OSMUX seq=054 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=055 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.784242}, mono={4.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9575 timestamp=1681759497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.784242}, mono={4.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9576 timestamp=1681759657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.784242}, mono={4.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9577 timestamp=1681759817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -781,10 +781,10 @@ sys={27.824242}, mono={4.400000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16508 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.824242}, mono={4.400000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16509 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.824242}, mono={4.400000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16510 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.824242}, mono={4.400000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16511 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.824242}, mono={4.400000}: OSMUX message (len=98): OSMUX seq=056 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=057 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.824242}, mono={4.400000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16511 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.824242}, mono={4.400000}: OSMUX message (len=98): OSMUX seq=056 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=057 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.824242}, mono={4.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9581 timestamp=1681760457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.824242}, mono={4.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9582 timestamp=1681760617 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.824242}, mono={4.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9583 timestamp=1681760777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -796,10 +796,10 @@ sys={27.864242}, mono={4.440000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16512 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.864242}, mono={4.440000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16513 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.864242}, mono={4.440000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16514 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.864242}, mono={4.440000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16515 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.864242}, mono={4.440000}: OSMUX message (len=98): OSMUX seq=058 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=059 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.864242}, mono={4.440000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16515 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.864242}, mono={4.440000}: OSMUX message (len=98): OSMUX seq=058 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=059 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.864242}, mono={4.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9587 timestamp=1681761417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.864242}, mono={4.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9588 timestamp=1681761577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.864242}, mono={4.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9589 timestamp=1681761737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -811,10 +811,10 @@ sys={27.904242}, mono={4.480000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16516 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.904242}, mono={4.480000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16517 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.904242}, mono={4.480000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16518 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.904242}, mono={4.480000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16519 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.904242}, mono={4.480000}: OSMUX message (len=98): OSMUX seq=060 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=061 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.904242}, mono={4.480000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16519 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.904242}, mono={4.480000}: OSMUX message (len=98): OSMUX seq=060 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=061 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.904242}, mono={4.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9593 timestamp=1681762377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.904242}, mono={4.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9594 timestamp=1681762537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.904242}, mono={4.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9595 timestamp=1681762697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -826,10 +826,10 @@ sys={27.944242}, mono={4.520000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16520 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.944242}, mono={4.520000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16521 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.944242}, mono={4.520000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16522 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.944242}, mono={4.520000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16523 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.944242}, mono={4.520000}: OSMUX message (len=98): OSMUX seq=062 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=063 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.944242}, mono={4.520000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16523 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.944242}, mono={4.520000}: OSMUX message (len=98): OSMUX seq=062 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=063 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.944242}, mono={4.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9599 timestamp=1681763337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.944242}, mono={4.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9600 timestamp=1681763497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.944242}, mono={4.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9601 timestamp=1681763657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -841,10 +841,10 @@ sys={27.984242}, mono={4.560000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16524 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.984242}, mono={4.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16525 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.984242}, mono={4.560000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16526 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.984242}, mono={4.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16527 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.984242}, mono={4.560000}: OSMUX message (len=98): OSMUX seq=064 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=065 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.984242}, mono={4.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16527 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.984242}, mono={4.560000}: OSMUX message (len=98): OSMUX seq=064 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=065 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.984242}, mono={4.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9605 timestamp=1681764297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.984242}, mono={4.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=1 ext=0 csrc_count=0 sequence=9606 timestamp=1681764457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.984242}, mono={4.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9607 timestamp=1681764617 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -856,10 +856,10 @@ sys={28.024242}, mono={4.600000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16528 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.024242}, mono={4.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16529 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.024242}, mono={4.600000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16530 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.024242}, mono={4.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16531 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.024242}, mono={4.600000}: OSMUX message (len=98): OSMUX seq=066 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=067 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.024242}, mono={4.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16531 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.024242}, mono={4.600000}: OSMUX message (len=98): OSMUX seq=066 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=067 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.024242}, mono={4.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9611 timestamp=1681765257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.024242}, mono={4.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9612 timestamp=1681765417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.024242}, mono={4.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9613 timestamp=1681765577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -871,10 +871,10 @@ sys={28.064242}, mono={4.640000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16532 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.064242}, mono={4.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16533 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.064242}, mono={4.640000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16534 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.064242}, mono={4.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16535 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.064242}, mono={4.640000}: OSMUX message (len=98): OSMUX seq=068 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=069 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.064242}, mono={4.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16535 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.064242}, mono={4.640000}: OSMUX message (len=98): OSMUX seq=068 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=069 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.064242}, mono={4.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9617 timestamp=1681766217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.064242}, mono={4.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9618 timestamp=1681766377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.064242}, mono={4.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9619 timestamp=1681766537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -886,10 +886,10 @@ sys={28.104242}, mono={4.680000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16536 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.104242}, mono={4.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16537 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.104242}, mono={4.680000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16538 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.104242}, mono={4.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16539 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.104242}, mono={4.680000}: OSMUX message (len=98): OSMUX seq=070 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=071 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.104242}, mono={4.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16539 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.104242}, mono={4.680000}: OSMUX message (len=98): OSMUX seq=070 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=071 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.104242}, mono={4.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9623 timestamp=1681767177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.104242}, mono={4.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9624 timestamp=1681767337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.104242}, mono={4.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9625 timestamp=1681767497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -901,10 +901,10 @@ sys={28.144242}, mono={4.720000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16540 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.144242}, mono={4.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16541 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.144242}, mono={4.720000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16542 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.144242}, mono={4.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16543 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.144242}, mono={4.720000}: OSMUX message (len=98): OSMUX seq=072 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=073 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.144242}, mono={4.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16543 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.144242}, mono={4.720000}: OSMUX message (len=98): OSMUX seq=072 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=073 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.144242}, mono={4.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9629 timestamp=1681768137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.144242}, mono={4.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9630 timestamp=1681768297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.144242}, mono={4.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9631 timestamp=1681768457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -916,10 +916,10 @@ sys={28.184242}, mono={4.760000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16544 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.184242}, mono={4.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16545 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.184242}, mono={4.760000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16546 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.184242}, mono={4.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16547 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.184242}, mono={4.760000}: OSMUX message (len=98): OSMUX seq=074 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=075 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.184242}, mono={4.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16547 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.184242}, mono={4.760000}: OSMUX message (len=98): OSMUX seq=074 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=075 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.184242}, mono={4.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9635 timestamp=1681769097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.184242}, mono={4.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9636 timestamp=1681769257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.184242}, mono={4.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9637 timestamp=1681769417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -931,10 +931,10 @@ sys={28.224242}, mono={4.800000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16548 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.224242}, mono={4.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16549 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.224242}, mono={4.800000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16550 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.224242}, mono={4.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16551 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.224242}, mono={4.800000}: OSMUX message (len=98): OSMUX seq=076 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=077 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.224242}, mono={4.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16551 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.224242}, mono={4.800000}: OSMUX message (len=98): OSMUX seq=076 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=077 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.224242}, mono={4.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9641 timestamp=1681770057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.224242}, mono={4.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9642 timestamp=1681770217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.224242}, mono={4.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9643 timestamp=1681770377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -946,10 +946,10 @@ sys={28.264242}, mono={4.840000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16552 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.264242}, mono={4.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16553 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.264242}, mono={4.840000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16554 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.264242}, mono={4.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16555 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.264242}, mono={4.840000}: OSMUX message (len=98): OSMUX seq=078 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=079 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.264242}, mono={4.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16555 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.264242}, mono={4.840000}: OSMUX message (len=98): OSMUX seq=078 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=079 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.264242}, mono={4.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9647 timestamp=1681771017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.264242}, mono={4.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9648 timestamp=1681771177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.264242}, mono={4.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9649 timestamp=1681771337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -961,10 +961,10 @@ sys={28.304242}, mono={4.880000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16556 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.304242}, mono={4.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16557 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.304242}, mono={4.880000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16558 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.304242}, mono={4.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16559 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.304242}, mono={4.880000}: OSMUX message (len=98): OSMUX seq=080 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=081 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.304242}, mono={4.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16559 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.304242}, mono={4.880000}: OSMUX message (len=98): OSMUX seq=080 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=081 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.304242}, mono={4.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9653 timestamp=1681771977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.304242}, mono={4.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9654 timestamp=1681772137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.304242}, mono={4.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9655 timestamp=1681772297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -976,10 +976,10 @@ sys={28.344242}, mono={4.920000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16560 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.344242}, mono={4.920000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16561 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.344242}, mono={4.920000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16562 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.344242}, mono={4.920000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16563 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.344242}, mono={4.920000}: OSMUX message (len=98): OSMUX seq=082 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=083 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.344242}, mono={4.920000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16563 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.344242}, mono={4.920000}: OSMUX message (len=98): OSMUX seq=082 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=083 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.344242}, mono={4.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9659 timestamp=1681772937 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.344242}, mono={4.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9660 timestamp=1681773097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.344242}, mono={4.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9661 timestamp=1681773257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -991,10 +991,10 @@ sys={28.384242}, mono={4.960000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16564 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.384242}, mono={4.960000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16565 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.384242}, mono={4.960000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16566 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.384242}, mono={4.960000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16567 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.384242}, mono={4.960000}: OSMUX message (len=98): OSMUX seq=084 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=085 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.384242}, mono={4.960000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16567 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.384242}, mono={4.960000}: OSMUX message (len=98): OSMUX seq=084 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=085 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.384242}, mono={4.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9665 timestamp=1681773897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.384242}, mono={4.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9666 timestamp=1681774057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.384242}, mono={4.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9667 timestamp=1681774217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -1006,10 +1006,10 @@ sys={28.424242}, mono={5.000000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16568 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.424242}, mono={5.000000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16569 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.424242}, mono={5.000000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16570 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.424242}, mono={5.000000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16571 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.424242}, mono={5.000000}: OSMUX message (len=98): OSMUX seq=086 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=087 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.424242}, mono={5.000000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16571 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.424242}, mono={5.000000}: OSMUX message (len=98): OSMUX seq=086 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=087 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.424242}, mono={5.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9671 timestamp=1681774857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.424242}, mono={5.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9672 timestamp=1681775017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.424242}, mono={5.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9673 timestamp=1681775177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -1021,10 +1021,10 @@ sys={28.464242}, mono={5.040000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16572 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.464242}, mono={5.040000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16573 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.464242}, mono={5.040000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16574 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.464242}, mono={5.040000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16575 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.464242}, mono={5.040000}: OSMUX message (len=98): OSMUX seq=088 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=089 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.464242}, mono={5.040000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16575 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.464242}, mono={5.040000}: OSMUX message (len=98): OSMUX seq=088 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=089 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.464242}, mono={5.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9677 timestamp=1681775817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.464242}, mono={5.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9678 timestamp=1681775977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.464242}, mono={5.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9679 timestamp=1681776137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -1036,10 +1036,10 @@ sys={28.504242}, mono={5.080000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16576 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.504242}, mono={5.080000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16577 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.504242}, mono={5.080000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16578 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.504242}, mono={5.080000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16579 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.504242}, mono={5.080000}: OSMUX message (len=98): OSMUX seq=090 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=091 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.504242}, mono={5.080000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16579 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.504242}, mono={5.080000}: OSMUX message (len=98): OSMUX seq=090 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=091 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.504242}, mono={5.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9683 timestamp=1681776777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.504242}, mono={5.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9684 timestamp=1681776937 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.504242}, mono={5.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9685 timestamp=1681777097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -1051,10 +1051,10 @@ sys={28.544242}, mono={5.120000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16580 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.544242}, mono={5.120000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16581 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.544242}, mono={5.120000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16582 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.544242}, mono={5.120000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16583 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.544242}, mono={5.120000}: OSMUX message (len=98): OSMUX seq=092 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=093 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.544242}, mono={5.120000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16583 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.544242}, mono={5.120000}: OSMUX message (len=98): OSMUX seq=092 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=093 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.544242}, mono={5.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9689 timestamp=1681777737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.544242}, mono={5.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9690 timestamp=1681777897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.544242}, mono={5.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9691 timestamp=1681778057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -1066,10 +1066,10 @@ sys={28.584242}, mono={5.160000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16584 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.584242}, mono={5.160000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16585 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.584242}, mono={5.160000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16586 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.584242}, mono={5.160000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16587 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.584242}, mono={5.160000}: OSMUX message (len=98): OSMUX seq=094 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=095 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.584242}, mono={5.160000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16587 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.584242}, mono={5.160000}: OSMUX message (len=98): OSMUX seq=094 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=095 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.584242}, mono={5.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9695 timestamp=1681778697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.584242}, mono={5.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9696 timestamp=1681778857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.584242}, mono={5.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9697 timestamp=1681779017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/16106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I7b0c8d311123f4fa0aeedf3938c8628a4442daf7 Gerrit-Change-Number: 16106 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 08:43:12 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 08:43:12 +0000 Subject: Change in libosmo-netif[master]: osmux_test: don't use color logging In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/16106 ) Change subject: osmux_test: don't use color logging ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/16106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I7b0c8d311123f4fa0aeedf3938c8628a4442daf7 Gerrit-Change-Number: 16106 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 20 Nov 2019 08:43:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 13:30:19 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 13:30:19 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: avoid division by zero when calculating BER In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16067 ) Change subject: scheduler_trx.c: avoid division by zero when calculating BER ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Gerrit-Change-Number: 16067 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 13:30:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 13:31:19 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 13:31:19 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I filed In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16104 ) Change subject: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I filed ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16104/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/16104/1//COMMIT_MSG at 7 PS1, Line 7: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I filed field -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I201b72d2a6f5307ede252d5d707f1ebadafe6a4b Gerrit-Change-Number: 16104 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 13:31:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 13:33:15 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 13:33:15 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I field In-Reply-To: References: Message-ID: Hello pespin, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/16104 to look at the new patch set (#2). Change subject: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I field ...................................................................... osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I field Change-Id: I201b72d2a6f5307ede252d5d707f1ebadafe6a4b --- M src/osmo-bts-trx/trx_if.c 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/04/16104/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I201b72d2a6f5307ede252d5d707f1ebadafe6a4b Gerrit-Change-Number: 16104 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 13:34:34 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 13:34:34 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: avoid division by zero when calculating BER In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16067 ) Change subject: scheduler_trx.c: avoid division by zero when calculating BER ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Gerrit-Change-Number: 16067 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 13:34:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 13:35:02 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 13:35:02 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: avoid division by zero when calculating BER In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16067 ) Change subject: scheduler_trx.c: avoid division by zero when calculating BER ...................................................................... scheduler_trx.c: avoid division by zero when calculating BER There is theoretical risk that when calculating the BER that a division by zero occurrs. Lets add a check to avoid n_errors / n_bits_total when n_bits_total is zero. Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Fixes: CID#205696 --- M src/osmo-bts-trx/loops.c M src/osmo-bts-trx/loops.h M src/osmo-bts-trx/scheduler_trx.c 3 files changed, 13 insertions(+), 4 deletions(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index e73d842..47e9cf3 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -268,11 +268,19 @@ } void trx_loop_amr_input(struct l1sched_trx *l1t, uint8_t chan_nr, - struct l1sched_chan_state *chan_state, float ber) + struct l1sched_chan_state *chan_state, + int n_errors, int n_bits_total) { struct gsm_bts_trx *trx = l1t->trx; struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)] .lchan[l1sap_chan2ss(chan_nr)]; + float ber; + + /* calculate BER (Bit Error Ratio) */ + if (n_bits_total == 0) + ber = 1.0; /* 100% BER */ + else + ber = (float) n_errors / (float) n_bits_total; /* check if loop is enabled */ if (!chan_state->amr_loop) diff --git a/src/osmo-bts-trx/loops.h b/src/osmo-bts-trx/loops.h index 7869903..978cb7e 100644 --- a/src/osmo-bts-trx/loops.h +++ b/src/osmo-bts-trx/loops.h @@ -22,7 +22,8 @@ struct l1sched_chan_state *chan_state); void trx_loop_amr_input(struct l1sched_trx *l1t, uint8_t chan_nr, - struct l1sched_chan_state *chan_state, float ber); + struct l1sched_chan_state *chan_state, + int n_errors, int n_bits_total); void trx_loop_amr_set(struct l1sched_chan_state *chan_state, int loop); diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 9945b2c..b54c35b 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -1215,7 +1215,7 @@ if (rc) trx_loop_amr_input(l1t, trx_chan_desc[chan].chan_nr | bi->tn, chan_state, - (float)n_errors/(float)n_bits_total); + n_errors, n_bits_total); amr = 2; /* we store tch_data + 2 header bytes */ /* only good speech frames get rtp header */ if (rc != GSM_MACBLOCK_LEN && rc >= 4) { @@ -1427,7 +1427,7 @@ if (rc) trx_loop_amr_input(l1t, trx_chan_desc[chan].chan_nr | bi->tn, chan_state, - (float)n_errors/(float)n_bits_total); + n_errors, n_bits_total); amr = 2; /* we store tch_data + 2 two */ /* only good speech frames get rtp header */ if (rc != GSM_MACBLOCK_LEN && rc >= 4) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1c0731b9a60be4b8c0c84b85b4403168120ceacd Gerrit-Change-Number: 16067 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 13:36:45 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 13:36:45 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I field In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16104 ) Change subject: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I field ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I201b72d2a6f5307ede252d5d707f1ebadafe6a4b Gerrit-Change-Number: 16104 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 13:36:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 13:43:37 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 13:43:37 +0000 Subject: Change in osmo-bts[master]: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I field In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16104 ) Change subject: osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I field ...................................................................... osmo-bts-trx/trx_if.c: fix: NOPE.ind also contains C/I field Change-Id: I201b72d2a6f5307ede252d5d707f1ebadafe6a4b --- M src/osmo-bts-trx/trx_if.c 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: pespin: 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 38ec8eb..099c330 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -728,7 +728,7 @@ /* IDLE / NOPE frame indication */ if (buf[0] & (1 << 7)) { bi->flags |= TRX_BI_F_NOPE_IND; - return TRX_UL_V1HDR_LEN; + goto skip_mts; } /* Modulation info and TSC set */ @@ -751,6 +751,7 @@ bi->tsc = buf[0] & 0b111; bi->flags |= TRX_BI_F_TS_INFO; +skip_mts: /* C/I: Carrier-to-Interference ratio (in centiBels) */ bi->ci_cb = (int16_t) osmo_load16be(buf + 1); bi->flags |= TRX_BI_F_CI_CB; @@ -838,6 +839,10 @@ /* RSSI and ToA256 */ OSMO_STRBUF_PRINTF(sb, " rssi=%d toa256=%d", bi->rssi, bi->toa256); + /* C/I: Carrier-to-Interference ratio (in centiBels) */ + if (bi->flags & TRX_BI_F_CI_CB) + OSMO_STRBUF_PRINTF(sb, " C/I=%d cB", bi->ci_cb); + /* Nothing else to print for NOPE.ind */ if (bi->flags & TRX_BI_F_NOPE_IND) return buf; @@ -850,10 +855,6 @@ if (bi->flags & TRX_BI_F_TS_INFO) OSMO_STRBUF_PRINTF(sb, " set=%u tsc=%u", bi->tsc_set, bi->tsc); - /* C/I: Carrier-to-Interference ratio (in centiBels) */ - if (bi->flags & TRX_BI_F_CI_CB) - OSMO_STRBUF_PRINTF(sb, " C/I=%d cB", bi->ci_cb); - /* Burst length */ OSMO_STRBUF_PRINTF(sb, " burst_len=%zu", bi->burst_len); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I201b72d2a6f5307ede252d5d707f1ebadafe6a4b Gerrit-Change-Number: 16104 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 14:09:07 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 14:09:07 +0000 Subject: Change in osmo-bsc[master]: bsc: Send MS Power Control msg upon max MS power change In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16054 ) Change subject: bsc: Send MS Power Control msg upon max MS power change ...................................................................... Patch Set 2: Code-Review+1 (2 comments) https://gerrit.osmocom.org/c/osmo-bsc/+/16054/2/src/osmo-bsc/abis_rsl.c File src/osmo-bsc/abis_rsl.c: https://gerrit.osmocom.org/c/osmo-bsc/+/16054/2/src/osmo-bsc/abis_rsl.c at 305 PS2, Line 305: PRIu8 Cosmetic: let's make it a bit cleaner: "... (ms_power=%u)". https://gerrit.osmocom.org/c/osmo-bsc/+/16054/2/src/osmo-bsc/gsm_data.c File src/osmo-bsc/gsm_data.c: https://gerrit.osmocom.org/c/osmo-bsc/+/16054/2/src/osmo-bsc/gsm_data.c at 1754 PS2, Line 1754: rsl_chan_ms_power_ctrl(lchan); Can we just combine this line with the 'if' statement above, so you would not need that bool? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 Gerrit-Change-Number: 16054 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 14:09:07 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 14:33:49 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 14:33:49 +0000 Subject: Change in osmo-bsc[master]: bsc: Send MS Power Control msg upon max MS power change In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16054 ) Change subject: bsc: Send MS Power Control msg upon max MS power change ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-bsc/+/16054/2/src/osmo-bsc/gsm_data.c File src/osmo-bsc/gsm_data.c: https://gerrit.osmocom.org/c/osmo-bsc/+/16054/2/src/osmo-bsc/gsm_data.c at 1754 PS2, Line 1754: rsl_chan_ms_power_ctrl(lchan); > Can we just combine this line with the 'if' statement above, so you would not need that bool? No because that function uses lchan->ms_power, so it must be set to the new value beforehand. And if I moved that into the first if condition then I'd still to set it outside it, so I think it's clearer only setting it in one place and using this bool value here. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 Gerrit-Change-Number: 16054 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 14:33:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 14:35:13 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 14:35:13 +0000 Subject: Change in osmo-bsc[master]: bsc: Send MS Power Control msg upon max MS power change In-Reply-To: References: Message-ID: Hello fixeria, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/16054 to look at the new patch set (#3). Change subject: bsc: Send MS Power Control msg upon max MS power change ...................................................................... bsc: Send MS Power Control msg upon max MS power change Lots of times, the MS power class is unknown until after the first channel has been activated, at which point the MS power class is received in messages such as LU update or CM Service Requet. Since the MS Power level is sent upon CHAN ACT, the only way to communicate the change of maximum MS Power (based on MS power class) after CHAN ACT is to send a MS Power Control msg. Let's do that. Related: OS#4244 Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 --- M src/ipaccess/ipaccess-config.c M src/ipaccess/ipaccess-proxy.c M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/gsm_data.c M src/utils/bs11_config.c M src/utils/meas_json.c M tests/abis/abis_test.c M tests/bsc/bsc_test.c M tests/gsm0408/gsm0408_test.c M tests/nanobts_omlattr/nanobts_omlattr_test.c 10 files changed, 33 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/54/16054/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 Gerrit-Change-Number: 16054 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 14:44:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 20 Nov 2019 14:44:47 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit: fix: do not use 'is' / 'is not' with string and numerica... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16086 ) Change subject: trx_toolkit: fix: do not use 'is' / 'is not' with string and numerical literals ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iaed86d630ac1e0b9b4f72bbf3c788e325783456d Gerrit-Change-Number: 16086 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 14:44:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 14:45:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 20 Nov 2019 14:45:22 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_mm.h: use fixed-size integer types in packed structures In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16089 ) Change subject: mobile/gsm48_mm.h: use fixed-size integer types in packed structures ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I54ed93c03ebe776bdc7eb761a8194da3ab0b67fb Gerrit-Change-Number: 16089 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 14:45:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 14:45:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 20 Nov 2019 14:45:24 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm48_mm.h: use fixed-size integer types in packed structures In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16089 ) Change subject: mobile/gsm48_mm.h: use fixed-size integer types in packed structures ...................................................................... mobile/gsm48_mm.h: use fixed-size integer types in packed structures Change-Id: I54ed93c03ebe776bdc7eb761a8194da3ab0b67fb --- M src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h index 09d18ed..bf3aa25 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h +++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h @@ -55,7 +55,7 @@ /* MMxx-SAP header */ struct gsm48_mmxx_hdr { - int msg_type; /* MMxx_* primitive */ + uint16_t msg_type; /* MMxx_* primitive */ uint32_t ref; /* reference to transaction */ uint32_t transaction_id; /* transaction identifier */ uint8_t sapi; /* sapi */ @@ -71,8 +71,7 @@ /* MMR-SAP header */ struct gsm48_mmr { - int msg_type; - + uint8_t msg_type; uint8_t cause; } __attribute__((packed)); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I54ed93c03ebe776bdc7eb761a8194da3ab0b67fb Gerrit-Change-Number: 16089 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 14:49:48 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 14:49:48 +0000 Subject: Change in osmo-bsc[master]: bsc: Send MS Power Control msg upon max MS power change In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16054 ) Change subject: bsc: Send MS Power Control msg upon max MS power change ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 Gerrit-Change-Number: 16054 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 14:49:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 14:57:21 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 14:57:21 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update In-Reply-To: References: Message-ID: Hello lynxis lazus, fixeria, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 to look at the new patch set (#3). Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update ...................................................................... sgsn: Introduce test TC_attach_req_id_req_ra_update The scenario in this test triggers a crash in osmo-sgsn fixed by osmo-sgsn.git I64fa5cf1b427d3abb99e553e584897261a827ce6. With that osmo-sgsn patch applied, the process doesn't crash anymore but the test still fails due to an XID message being sent with a new yet-not-seen-by-ttcn3 TLLI and as a result TTCN3 BSSGP_Emulation fails: BSSGP_Emulation.ttcn:390 setverdict(fail): none -> fail reason: "Couldn't find Component for TLLI 'FE791757'O", new component reason: "Couldn't find Component for TLLI 'FE791757'O" Other than that, the test runs fine. It still needs to be clarified whether the new TLLI sent by osmo-sgsn is expected and test needs to be fixed, or whether it's an sgsn bug. Related: OS#3957, OS#4245 Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 --- M sgsn/SGSN_Tests.ttcn M sgsn/expected-results.xml 2 files changed, 41 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/16016/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 Gerrit-Change-Number: 16016 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 14:58:15 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 14:58:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 ) Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update ...................................................................... Patch Set 3: as a self reminder, I still need to check how to make the infra happy at the end regarding the new TLLI not registered. Any advise there is welcome. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 Gerrit-Change-Number: 16016 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 14:58:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 15:05:27 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 20 Nov 2019 15:05:27 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16090 ) Change subject: trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia016a3a9bb6e9f17182a7168aa5a501ae9b9978b Gerrit-Change-Number: 16090 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 15:05:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 15:05:36 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 20 Nov 2019 15:05:36 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/data_msg.py: fix: NOPE.ind also contains C/I filed In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16091 ) Change subject: trx_toolkit/data_msg.py: fix: NOPE.ind also contains C/I filed ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I281fb7387a83fec7e097ebf8650c95713d3f70e9 Gerrit-Change-Number: 16091 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 15:05:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 15:05:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 20 Nov 2019 15:05:56 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16092 ) Change subject: trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iabd0af665e3108d23a908638f943a5b689986e2c Gerrit-Change-Number: 16092 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 15:05:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 15:05:57 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 20 Nov 2019 15:05:57 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16090 ) Change subject: trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation ...................................................................... trx_toolkit/fake_trx.py: refactor L12TRX -> TRX2L1 burst transformation The burst transformation in BurstForwarder.forward_msg() used to be done only once, so then the resulting message was distributed over the list of connected (and active) transceivers. This approach limits the path loss simulation capabilities, because a reference to the same message is passed to FakeTRX.send_data_msg(). If one transceiver changes (or removes) the burst bits, the other transceivers would not receive the original message. Let's do the transformation individually for each transceiver, so the original message will always remain unchanged. Change-Id: Ia016a3a9bb6e9f17182a7168aa5a501ae9b9978b --- M src/target/trx_toolkit/burst_fwd.py M src/target/trx_toolkit/fake_trx.py 2 files changed, 5 insertions(+), 12 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/target/trx_toolkit/burst_fwd.py b/src/target/trx_toolkit/burst_fwd.py index b418aef..fd6013b 100644 --- a/src/target/trx_toolkit/burst_fwd.py +++ b/src/target/trx_toolkit/burst_fwd.py @@ -65,12 +65,6 @@ self.trx_list.remove(trx) def forward_msg(self, src_trx, rx_msg): - # Transform from L12TRX to TRX2L1 - tx_msg = rx_msg.gen_trx2l1() - if tx_msg is None: - log.error("Forwarding failed, could not transform " - "message (%s) => dropping..." % rx_msg.desc_hdr()) - # Iterate over all known transceivers for trx in self.trx_list: if trx == src_trx: @@ -81,7 +75,9 @@ continue if trx.rx_freq != src_trx.tx_freq: continue - if tx_msg.tn not in trx.ts_list: + if rx_msg.tn not in trx.ts_list: continue - trx.send_data_msg(src_trx, rx_msg, tx_msg) + # Transform from L12TRX to TRX2L1 and forward + tx_msg = rx_msg.gen_trx2l1(ver = trx.data_if._hdr_ver) + trx.handle_data_msg(src_trx, rx_msg, tx_msg) diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py index f226f03..f0dc5a5 100755 --- a/src/target/trx_toolkit/fake_trx.py +++ b/src/target/trx_toolkit/fake_trx.py @@ -199,10 +199,7 @@ # Takes (partially initialized) TRX2L1 message, # simulates RF path parameters (such as RSSI), # and sends towards the L1 - def send_data_msg(self, src_trx, src_msg, msg): - # Override header version - msg.ver = self.data_if._hdr_ver - + def handle_data_msg(self, src_trx, src_msg, msg): # Complete message header msg.toa256 = self.toa256 msg.rssi = self.rssi -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia016a3a9bb6e9f17182a7168aa5a501ae9b9978b Gerrit-Change-Number: 16090 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 15:05:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 20 Nov 2019 15:05:58 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/data_msg.py: fix: NOPE.ind also contains C/I filed In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16091 ) Change subject: trx_toolkit/data_msg.py: fix: NOPE.ind also contains C/I filed ...................................................................... trx_toolkit/data_msg.py: fix: NOPE.ind also contains C/I filed Change-Id: I281fb7387a83fec7e097ebf8650c95713d3f70e9 --- M src/target/trx_toolkit/data_msg.py 1 file changed, 6 insertions(+), 9 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/target/trx_toolkit/data_msg.py b/src/target/trx_toolkit/data_msg.py index ec59b85..c96dddb 100644 --- a/src/target/trx_toolkit/data_msg.py +++ b/src/target/trx_toolkit/data_msg.py @@ -630,7 +630,8 @@ if self.toa256 < self.TOA256_MIN or self.toa256 > self.TOA256_MAX: raise ValueError("ToA256 %d is out of range" % self.toa256) - if self.ver >= 0x01: + # Version specific parameters (omited for NOPE.ind) + if self.ver >= 0x01 and not self.nope_ind: if type(self.mod_type) is not Modulation: raise ValueError("Unknown Rx modulation type") @@ -650,6 +651,8 @@ if self.tsc not in self.TSC_RANGE: raise ValueError("TSC %d is out of range" % self.tsc) + # Version specific parameters (also present in NOPE.ind) + if self.ver >= 0x01: if self.ci is None: raise ValueError("C/I is not set") @@ -779,10 +782,7 @@ buf.append(mts) # C/I: Carrier-to-Interference ratio (in centiBels) - if not self.nope_ind: - buf += struct.pack(">h", self.ci) - else: - buf += bytearray(2) + buf += struct.pack(">h", self.ci) return buf @@ -799,10 +799,7 @@ self.parse_mts(hdr[8]) # C/I: Carrier-to-Interference ratio (in centiBels) - if not self.nope_ind: - self.ci = struct.unpack(">h", hdr[9:11])[0] - else: - self.ci = None + self.ci = struct.unpack(">h", hdr[9:11])[0] # Generates message specific burst def gen_burst(self): -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I281fb7387a83fec7e097ebf8650c95713d3f70e9 Gerrit-Change-Number: 16091 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 15:05:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 20 Nov 2019 15:05:58 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16092 ) Change subject: trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation ...................................................................... trx_toolkit/fake_trx.py: send NOPE.ind in case of path loss simulation Since TRXD header version 1, we should send NOPE indications to the L1 side in absence of TRX2L1 bursts, and IDLE indications during IDLE TDMA frames (basically noise measurements). This change is the first step towards the goal: if a given burst is to be dropped due to the path loss simulation (see FAKE_DROP), mark the carrier TRX2L1 message as NOPE.ind and send anyway. Change-Id: Iabd0af665e3108d23a908638f943a5b689986e2c Related: OS#3428, OS#2975 --- M src/target/trx_toolkit/fake_trx.py 1 file changed, 25 insertions(+), 7 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/target/trx_toolkit/fake_trx.py b/src/target/trx_toolkit/fake_trx.py index f0dc5a5..f14d143 100755 --- a/src/target/trx_toolkit/fake_trx.py +++ b/src/target/trx_toolkit/fake_trx.py @@ -110,6 +110,11 @@ RSSI_BASE_DEFAULT = -60 CI_BASE_DEFAULT = 90 + # Default values for NOPE / IDLE indications + TOA256_NOISE_DEFAULT = 0 + RSSI_NOISE_DEFAULT = -110 + CI_NOISE_DEFAULT = -30 + def __init__(self, *trx_args, **trx_kwargs): Transceiver.__init__(self, *trx_args, **trx_kwargs) @@ -177,9 +182,6 @@ return False def _handle_data_msg_v1(self, src_msg, msg): - # TODO: NOPE indications are not (yet) supported - msg.nope_ind = False - # C/I (Carrier-to-Interference ratio) msg.ci = self.ci @@ -200,6 +202,26 @@ # simulates RF path parameters (such as RSSI), # and sends towards the L1 def handle_data_msg(self, src_trx, src_msg, msg): + # Path loss simulation + msg.nope_ind = self.sim_burst_drop(msg) + if msg.nope_ind: + # Before TRXDv1, we simply drop the message + if msg.ver < 0x01: + del msg + return + + # Since TRXDv1, we should send a NOPE.ind + del msg.burst # burst bits are omited + msg.burst = None + + # TODO: shoud we make these values configurable? + msg.toa256 = self.TOA256_NOISE_DEFAULT + msg.rssi = self.RSSI_NOISE_DEFAULT + msg.ci = self.CI_NOISE_DEFAULT + + self.data_if.send_msg(msg) + return + # Complete message header msg.toa256 = self.toa256 msg.rssi = self.rssi @@ -212,10 +234,6 @@ if src_trx.ta != 0: msg.toa256 -= src_trx.ta * 256 - # Path loss simulation - if self.sim_burst_drop(msg): - return - # TODO: make legacy mode configurable (via argv?) self.data_if.send_msg(msg, legacy = True) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iabd0af665e3108d23a908638f943a5b689986e2c Gerrit-Change-Number: 16092 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 15:23:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 15:23:52 +0000 Subject: Change in libosmo-sccp[master]: xua: Implement traffic mode broadcast References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16117 ) Change subject: xua: Implement traffic mode broadcast ...................................................................... xua: Implement traffic mode broadcast Change-Id: I4358965f0ff0aa05c5082a2745159da766e9a4e7 --- M src/xua_as_fsm.c 1 file changed, 21 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/17/16117/1 diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 602c433..731504b 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -108,6 +108,26 @@ return asp; } +int xua_as_transmit_msg_broadcast(struct osmo_ss7_as *as, struct msgb *msg) +{ + struct osmo_ss7_asp *asp; + unsigned int i; + struct msgb *msg_cpy; + bool sent = false; + + for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + asp = as->cfg.asps[i]; + if (!asp || !osmo_ss7_asp_active(asp)) + continue; + msg_cpy = msgb_copy(msg, "xua_bcast_cpy"); + if (osmo_ss7_asp_send(asp, msg_cpy) == 0) + sent = true; + } + + msgb_free(msg); + return sent ? 0 : -1; +} + /* actually transmit a message through this AS */ int xua_as_transmit_msg(struct osmo_ss7_as *as, struct msgb *msg) { @@ -122,9 +142,7 @@ asp = xua_as_select_asp_roundrobin(as); break; case OSMO_SS7_AS_TMOD_BCAST: - LOGPFSM(as->fi, "Traffic mode broadcast not implemented, dropping message\n"); - msgb_free(msg); - return -1; + return xua_as_transmit_msg_broadcast(as, msg); case _NUM_OSMO_SS7_ASP_TMOD: OSMO_ASSERT(false); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16117 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4358965f0ff0aa05c5082a2745159da766e9a4e7 Gerrit-Change-Number: 16117 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 16:17:50 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 16:17:50 +0000 Subject: Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: Hello laforge, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/docker-playground/+/16064 to look at the new patch set (#2). Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file ...................................................................... Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file This way we get VTY parsing failures as well as backtraces upon process crash. Related: OS#4212 Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 --- M ttcn3-bsc-test/jenkins-sccplite.sh M ttcn3-bsc-test/jenkins.sh M ttcn3-bsc-test/osmo-bsc.cfg M ttcn3-bsc-test/osmo-stp.cfg M ttcn3-bsc-test/sccplite/osmo-bsc.cfg M ttcn3-bscnat-test/jenkins.sh M ttcn3-bscnat-test/osmo-bsc-nat.cfg M ttcn3-bts-test/jenkins.sh M ttcn3-bts-test/oml/osmo-bts.cfg M ttcn3-bts-test/osmo-bsc.cfg M ttcn3-bts-test/osmo-bts.cfg M ttcn3-bts-test/virtphy/osmo-bts.cfg M ttcn3-ggsn-test/osmo-ggsn.cfg M ttcn3-hlr-test/jenkins.sh M ttcn3-hlr-test/osmo-hlr.cfg M ttcn3-mgw-test/osmo-mgw.cfg M ttcn3-msc-test/jenkins.sh M ttcn3-msc-test/osmo-msc.cfg M ttcn3-msc-test/osmo-stp.cfg M ttcn3-pcu-test/jenkins-sns.sh M ttcn3-pcu-test/jenkins.sh M ttcn3-pcu-test/osmo-pcu.cfg M ttcn3-pcu-test/sns/osmo-pcu.cfg M ttcn3-remsim-test/jenkins.sh M ttcn3-sgsn-test/jenkins.sh M ttcn3-sgsn-test/osmo-sgsn.cfg M ttcn3-sgsn-test/osmo-stp.cfg M ttcn3-sip-test/jenkins.sh M ttcn3-sip-test/osmo-sip-connector.cfg M ttcn3-stp-test/osmo-stp.cfg 30 files changed, 50 insertions(+), 139 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/64/16064/2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 Gerrit-Change-Number: 16064 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 16:17:51 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 16:17:51 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... respawn.sh: Add logging and limit loop iterations Since we'll now log the script and its children output to a file, let's make sure the loop doesn't run countless times upon failing child process, producing lots of potential undesired output. For instance, if osmo-bts fails to read vty config and exits immediately. Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 --- M osmo-bts-latest/respawn.sh M osmo-bts-master/respawn.sh M osmo-pcu-latest/respawn.sh M osmo-pcu-master/respawn.sh 4 files changed, 28 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/37/16137/1 diff --git a/osmo-bts-latest/respawn.sh b/osmo-bts-latest/respawn.sh index ae5cf60..2413916 100755 --- a/osmo-bts-latest/respawn.sh +++ b/osmo-bts-latest/respawn.sh @@ -2,8 +2,14 @@ trap "kill 0" EXIT -while [ -e /etc/passwd ]; do +i=0 +max_i=500 +while [ $i -lt $max_i ]; do + echo "$i: starting: $*" $* & LAST_PID=$! wait $LAST_PID + echo "$i: stopped pid $LAST_PID with status $?" + i=$(expr $i + 1) done +echo "exiting after $max_i runs" diff --git a/osmo-bts-master/respawn.sh b/osmo-bts-master/respawn.sh index ae5cf60..2413916 100755 --- a/osmo-bts-master/respawn.sh +++ b/osmo-bts-master/respawn.sh @@ -2,8 +2,14 @@ trap "kill 0" EXIT -while [ -e /etc/passwd ]; do +i=0 +max_i=500 +while [ $i -lt $max_i ]; do + echo "$i: starting: $*" $* & LAST_PID=$! wait $LAST_PID + echo "$i: stopped pid $LAST_PID with status $?" + i=$(expr $i + 1) done +echo "exiting after $max_i runs" diff --git a/osmo-pcu-latest/respawn.sh b/osmo-pcu-latest/respawn.sh index ae5cf60..2413916 100755 --- a/osmo-pcu-latest/respawn.sh +++ b/osmo-pcu-latest/respawn.sh @@ -2,8 +2,14 @@ trap "kill 0" EXIT -while [ -e /etc/passwd ]; do +i=0 +max_i=500 +while [ $i -lt $max_i ]; do + echo "$i: starting: $*" $* & LAST_PID=$! wait $LAST_PID + echo "$i: stopped pid $LAST_PID with status $?" + i=$(expr $i + 1) done +echo "exiting after $max_i runs" diff --git a/osmo-pcu-master/respawn.sh b/osmo-pcu-master/respawn.sh index ae5cf60..2413916 100755 --- a/osmo-pcu-master/respawn.sh +++ b/osmo-pcu-master/respawn.sh @@ -2,8 +2,14 @@ trap "kill 0" EXIT -while [ -e /etc/passwd ]; do +i=0 +max_i=500 +while [ $i -lt $max_i ]; do + echo "$i: starting: $*" $* & LAST_PID=$! wait $LAST_PID + echo "$i: stopped pid $LAST_PID with status $?" + i=$(expr $i + 1) done +echo "exiting after $max_i runs" -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 16:23:50 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 16:23:50 +0000 Subject: Change in osmo-bsc[master]: bsc: Send MS Power Control msg upon max MS power change In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16054 ) Change subject: bsc: Send MS Power Control msg upon max MS power change ...................................................................... Patch Set 3: Code-Review+2 Reapplying old +1 since I only did a small cosmetic change requested by fixeria. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 Gerrit-Change-Number: 16054 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 16:23:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 16:23:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 16:23:53 +0000 Subject: Change in osmo-bsc[master]: bsc: Send MS Power Control msg upon max MS power change In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16054 ) Change subject: bsc: Send MS Power Control msg upon max MS power change ...................................................................... bsc: Send MS Power Control msg upon max MS power change Lots of times, the MS power class is unknown until after the first channel has been activated, at which point the MS power class is received in messages such as LU update or CM Service Requet. Since the MS Power level is sent upon CHAN ACT, the only way to communicate the change of maximum MS Power (based on MS power class) after CHAN ACT is to send a MS Power Control msg. Let's do that. Related: OS#4244 Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 --- M src/ipaccess/ipaccess-config.c M src/ipaccess/ipaccess-proxy.c M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/gsm_data.c M src/utils/bs11_config.c M src/utils/meas_json.c M tests/abis/abis_test.c M tests/bsc/bsc_test.c M tests/gsm0408/gsm0408_test.c M tests/nanobts_omlattr/nanobts_omlattr_test.c 10 files changed, 33 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c index f873809..306cc87 100644 --- a/src/ipaccess/ipaccess-config.c +++ b/src/ipaccess/ipaccess-config.c @@ -1141,3 +1141,9 @@ { return 0; } + +/* Stub */ +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) +{ + return 0; +} diff --git a/src/ipaccess/ipaccess-proxy.c b/src/ipaccess/ipaccess-proxy.c index a4ee10e..3d5f301 100644 --- a/src/ipaccess/ipaccess-proxy.c +++ b/src/ipaccess/ipaccess-proxy.c @@ -1248,3 +1248,9 @@ osmo_select_main(0); } } + +/* Stub */ +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) +{ + return 0; +} diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 80f54b3..a5e5f51 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -301,6 +302,9 @@ struct msgb *msg; uint8_t chan_nr = gsm_lchan2chan_nr(lchan); + LOG_LCHAN(lchan, LOGL_DEBUG, "Tx MS POWER CONTROL (ms_power_lvl=%" PRIu8 ")\n", + lchan->ms_power); + msg = rsl_msgb_alloc(); dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 2a77837..90172dd 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -39,6 +39,7 @@ #include #include +#include #include #include #include @@ -1705,6 +1706,7 @@ struct gsm_bts *bts = lchan->ts->trx->bts; struct gsm_subscriber_connection *conn = lchan->conn; int max_pwr_dbm_pwclass, new_pwr; + bool send_pwr_ctrl_msg = false; LOG_LCHAN(lchan, LOGL_DEBUG, "MS Power level update requested: %d dBm\n", ms_power_dbm); @@ -1741,10 +1743,15 @@ "MS Power level update (power class %" PRIu8 "): %" PRIu8 " -> %d\n", conn ? conn->ms_power_class : 0, lchan->ms_power, new_pwr); + /* If chan was already activated and max ms_power changes (due to power + classmark received), send an MS Power Control message */ + if (lchan->activate.activ_ack && new_pwr != lchan->ms_power) + send_pwr_ctrl_msg = true; + lchan->ms_power = new_pwr; - /* FIXME: if chan is active and lchan->ms_power != new_pwr, consider - sending an MS Power Control message (RSL) towards BTS to announce the - new max ms power lvl, see rsl_chan_ms_power_ctrl() */ + + if (send_pwr_ctrl_msg) + rsl_chan_ms_power_ctrl(lchan); } const struct value_string lchan_activate_mode_names[] = { diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c index 39acb7f..2a2340c 100644 --- a/src/utils/bs11_config.c +++ b/src/utils/bs11_config.c @@ -983,3 +983,4 @@ void ts_fsm_alloc(struct gsm_bts_trx_ts *ts) {} int abis_rsl_rcvmsg(struct msgb *msg) { return 0; } +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } diff --git a/src/utils/meas_json.c b/src/utils/meas_json.c index 365b450..a3526de 100644 --- a/src/utils/meas_json.c +++ b/src/utils/meas_json.c @@ -190,3 +190,4 @@ void ts_fsm_alloc(struct gsm_bts_trx_ts *ts) {} int abis_rsl_rcvmsg(struct msgb *msg) { return 0; } +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c index 5102aea..43934f3 100644 --- a/tests/abis/abis_test.c +++ b/tests/abis/abis_test.c @@ -189,3 +189,4 @@ bool on_gsm_ts_init(struct gsm_bts_trx_ts *ts) { return true; } void ts_fsm_alloc(struct gsm_bts_trx_ts *ts) {} +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c index 103e0bb..86b7282 100644 --- a/tests/bsc/bsc_test.c +++ b/tests/bsc/bsc_test.c @@ -252,3 +252,4 @@ void lchan_activate(struct gsm_lchan *lchan, void *info) {} bool neighbor_ident_bts_entry_exists(uint8_t from_bts) { return false; } const char *handover_status(struct gsm_subscriber_connection *conn) { return "x"; } +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index a30aaf8..f850274 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -996,3 +996,5 @@ int rsl_data_request(struct msgb *msg, uint8_t link_id) { return 0; } int rsl_encryption_cmd(struct msgb *msg) { return 0; } + +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c b/tests/nanobts_omlattr/nanobts_omlattr_test.c index 65eb055..a3ba8e0 100644 --- a/tests/nanobts_omlattr/nanobts_omlattr_test.c +++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c @@ -318,3 +318,4 @@ { return true; } void ts_fsm_alloc(struct gsm_bts_trx_ts *ts) {} +int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan) { return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135 Gerrit-Change-Number: 16054 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 16:27:29 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 16:27:29 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 16:27:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 16:27:33 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 16:27:33 +0000 Subject: Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16064 ) Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 Gerrit-Change-Number: 16064 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 16:27:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 16:30:34 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 16:30:34 +0000 Subject: Change in libosmocore[master]: logging/vty: do not print deprecated logging commands to stdin References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16138 ) Change subject: logging/vty: do not print deprecated logging commands to stdin ...................................................................... logging/vty: do not print deprecated logging commands to stdin Yes, we don't really need to poison stdout, as some osmo-* binaries (like osmo-gapk) may want to use it for non-logging purposes. This printf() call looks like a debugging leftover. Change-Id: Ida35865b1c0bb3d3567918f8e89c6551c6b34103 --- M src/vty/logging_vty.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/16138/1 diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 88ee330..9615943 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -1007,7 +1007,6 @@ OSMO_ASSERT(cmd); cmd->string = talloc_asprintf(cmd, "logging level %s (debug|info|notice|error|fatal)", name); - printf("%s\n", cmd->string); cmd->func = log_deprecated_func; cmd->doc = LEVEL_STR "Deprecated Category\n"; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida35865b1c0bb3d3567918f8e89c6551c6b34103 Gerrit-Change-Number: 16138 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 16:31:52 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 16:31:52 +0000 Subject: Change in libosmocore[master]: logging/vty: do not print deprecated logging commands to stdin In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16138 ) Change subject: logging/vty: do not print deprecated logging commands to stdin ...................................................................... Patch Set 1: So that why we always see some meaningless lines when starting OsmoBSC... -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida35865b1c0bb3d3567918f8e89c6551c6b34103 Gerrit-Change-Number: 16138 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Wed, 20 Nov 2019 16:31:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 16:49:57 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 16:49:57 +0000 Subject: Change in libosmocore[master]: logging/vty: do not print deprecated logging commands to stdin In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16138 ) Change subject: logging/vty: do not print deprecated logging commands to stdin ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida35865b1c0bb3d3567918f8e89c6551c6b34103 Gerrit-Change-Number: 16138 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 16:49:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 16:55:19 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 16:55:19 +0000 Subject: Change in libosmocore[master]: logging/vty: do not print deprecated logging commands to stdout In-Reply-To: References: Message-ID: Hello pespin, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16138 to look at the new patch set (#2). Change subject: logging/vty: do not print deprecated logging commands to stdout ...................................................................... logging/vty: do not print deprecated logging commands to stdout Yes, we don't really need to poison stdout, as some osmo-* binaries (like osmo-gapk) may want to use it for non-logging purposes. This printf() call looks like a debugging leftover. Change-Id: Ida35865b1c0bb3d3567918f8e89c6551c6b34103 --- M src/vty/logging_vty.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/16138/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida35865b1c0bb3d3567918f8e89c6551c6b34103 Gerrit-Change-Number: 16138 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 17:03:30 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 17:03:30 +0000 Subject: Change in libosmocore[master]: logging/vty: do not print deprecated logging commands to stdout In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16138 ) Change subject: logging/vty: do not print deprecated logging commands to stdout ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida35865b1c0bb3d3567918f8e89c6551c6b34103 Gerrit-Change-Number: 16138 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 17:03:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 17:23:59 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 17:23:59 +0000 Subject: Change in libosmocore[master]: logging/vty: use LOG_LEVEL_ARGS in logging_vty_add_deprecated_subsys() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16139 ) Change subject: logging/vty: use LOG_LEVEL_ARGS in logging_vty_add_deprecated_subsys() ...................................................................... logging/vty: use LOG_LEVEL_ARGS in logging_vty_add_deprecated_subsys() Change-Id: I862c3cce0147ee8cf4013501132584ea09c58b53 --- M src/vty/logging_vty.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/16139/1 diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 9615943..b4c3776 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -1005,8 +1005,7 @@ { struct cmd_element *cmd = talloc_zero(ctx, struct cmd_element); OSMO_ASSERT(cmd); - cmd->string = talloc_asprintf(cmd, "logging level %s (debug|info|notice|error|fatal)", - name); + cmd->string = talloc_asprintf(cmd, "logging level %s " LOG_LEVEL_ARGS, name); cmd->func = log_deprecated_func; cmd->doc = LEVEL_STR "Deprecated Category\n"; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I862c3cce0147ee8cf4013501132584ea09c58b53 Gerrit-Change-Number: 16139 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 17:23:59 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 17:23:59 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: actually ignore deprecated commands, do not abort References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16140 ) Change subject: logging/vty: fix: actually ignore deprecated commands, do not abort ...................................................................... logging/vty: fix: actually ignore deprecated commands, do not abort We shall not prevent programs from starting if their configuration files contain deprecated commands. Just print a warning and return CMD_SUCCESS instead of CMD_WARNING. Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a Fixes: Ic9c1b566ec4a459f03e6319cf369691903cf9d00 --- M src/vty/logging_vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/16140/1 diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index b4c3776..07bc26b 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -998,7 +998,7 @@ static int log_deprecated_func(struct cmd_element *cmd, struct vty *vty, int argc, const char *argv[]) { vty_out(vty, "%% Ignoring deprecated '%s'%s", cmd->string, VTY_NEWLINE); - return CMD_WARNING; + return CMD_SUCCESS; /* Otherwise a program would terminate immediately */ } void logging_vty_add_deprecated_subsys(void *ctx, const char *name) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a Gerrit-Change-Number: 16140 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 17:31:46 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 17:31:46 +0000 Subject: Change in libosmocore[master]: logging/vty: use LOG_LEVEL_ARGS in logging_vty_add_deprecated_subsys() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16139 ) Change subject: logging/vty: use LOG_LEVEL_ARGS in logging_vty_add_deprecated_subsys() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I862c3cce0147ee8cf4013501132584ea09c58b53 Gerrit-Change-Number: 16139 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 17:31:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 17:32:38 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 17:32:38 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: actually ignore deprecated commands, do not abort In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16140 ) Change subject: logging/vty: fix: actually ignore deprecated commands, do not abort ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a Gerrit-Change-Number: 16140 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 17:32:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 17:44:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 17:44:52 +0000 Subject: Change in osmo-bts[master]: power_control.c: Don't use announced MS Power level as input for loop... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16141 ) Change subject: power_control.c: Don't use announced MS Power level as input for loop calculations ...................................................................... power_control.c: Don't use announced MS Power level as input for loop calculations Use instead the received MS Power currently in use by the MS matching the measured signal. This way there's no need to wait for the MS to reach the announced MS power level or add checks in case the MS doesn't support that specific power level. Furthermore, more fine grained announced power level value can be obtained faster due to more input iterations not being dropped while waiting. osmo-bts-trx specific algo was not following this approach and using announced MS power instead because it's wowrking at a lower level and henche was not using the transmitted MS Power level value by the MS as input for the calculation. Related: OS#1851 Change-Id: I4494dc27a295a3dca1d3331d4ff712d486643e13 --- M include/osmo-bts/gsm_data_shared.h M src/common/l1sap.c M src/common/power_control.c 3 files changed, 4 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/41/16141/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index c19bb21..41998ad 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -322,7 +322,6 @@ uint8_t current; uint8_t max; bool fixed; - int8_t last_received; /* last received MS Power in uplink L1 SACCH, -1 means not set */ } ms_power_ctrl; /* Power levels for BTS */ uint8_t bs_power; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 4937d1e..7bf0b09 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1647,7 +1647,6 @@ lchan->sacch_deact = 0; lchan->s = lchan->ts->trx->bts->radio_link_timeout; - lchan->ms_power_ctrl.last_received = -1; /* mark no ms power received yet */ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) diff --git a/src/common/power_control.c b/src/common/power_control.c index 129334e..a437677 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -51,22 +51,6 @@ if (lchan->ms_power_ctrl.fixed) return 0; - /* The phone hasn't reached the power level yet. - TODO: store .last and check if MS is trying to move towards current. */ - if (lchan->ms_power_ctrl.current != ms_power) { - if (lchan->ms_power_ctrl.last_received == -1 || - lchan->ms_power_ctrl.last_received != ms_power) { - /* MS Power still changing, keep current power level */ - lchan->ms_power_ctrl.last_received = ms_power; - return 0; - } - /* else: we are stuck with some received MS Power level - different than the one we announce, probably because the MS - doesn't support that exact one so it picked the nearest one - */ - lchan->ms_power_ctrl.last_received = ms_power; - } - /* How many dBs measured power should be increased (+) or decreased (-) to reach expected power. */ diff = bts->ul_power_target - rxLevel; @@ -75,11 +59,11 @@ if (diff < 2 && diff > -2) return 0; - current_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.current); + current_dbm = ms_pwr_dbm(band, ms_power); if (current_dbm < 0) { LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", - lchan->ms_power_ctrl.current, gsm_band_name(band)); + ms_power, gsm_band_name(band)); return 0; } bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.max); @@ -110,13 +94,13 @@ } if (lchan->ms_power_ctrl.current == new_power) { - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d, %d dBm " + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS power at control level %d, %d dBm " "(rx-ms-pwr-lvl %" PRIu8 ", rx-current %d dBm, rx-target %d dBm)\n", new_power, ms_pwr_dbm(band, new_power), ms_power, rxLevel, bts->ul_power_target); return 0; } - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS new_power from control level %d (%d dBm) to %d, %d dBm " + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS power from control level %d (%d dBm) to %d, %d dBm " "(rx-ms-pwr-lvl %" PRIu8 ", rx-current %d dBm, rx-target %d dBm)\n", (diff > 0) ? "Raising" : "Lowering", lchan->ms_power_ctrl.current, ms_pwr_dbm(band, lchan->ms_power_ctrl.current), -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4494dc27a295a3dca1d3331d4ff712d486643e13 Gerrit-Change-Number: 16141 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 18:41:40 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 18:41:40 +0000 Subject: Change in osmo-bts[master]: power_control.c: Don't use announced MS Power level as input for loop... In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/16141 to look at the new patch set (#2). Change subject: power_control.c: Don't use announced MS Power level as input for loop calculations ...................................................................... power_control.c: Don't use announced MS Power level as input for loop calculations Use instead the received MS Power currently in use by the MS matching the measured signal. This way there's no need to wait for the MS to reach the announced MS power level or add checks in case the MS doesn't support that specific power level. Furthermore, more fine grained announced power level value can be obtained faster due to more input iterations not being dropped while waiting. osmo-bts-trx specific algo was not following this approach and using announced MS power instead because it's wowrking at a lower level and henche was not using the transmitted MS Power level value by the MS as input for the calculation. The "if (diff < 2 && diff > -2))" condition is dropped since equal signal strength may still result in a different MS power level announced (the one currently used by the MS during tx of last SACCH block). Related: OS#1851 Change-Id: I4494dc27a295a3dca1d3331d4ff712d486643e13 --- M include/osmo-bts/gsm_data_shared.h M src/common/l1sap.c M src/common/power_control.c 3 files changed, 4 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/41/16141/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4494dc27a295a3dca1d3331d4ff712d486643e13 Gerrit-Change-Number: 16141 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 19:25:39 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 19:25:39 +0000 Subject: Change in osmo-bts[master]: power_control.c: Limit speed of announced MS Power Level value changes References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16142 ) Change subject: power_control.c: Limit speed of announced MS Power Level value changes ...................................................................... power_control.c: Limit speed of announced MS Power Level value changes It's not a good idea to request big changes in MS Power based on sporadic bad signal received, let's instead change announced MS power levels more smoothly to avoid possible big signal strength fluctations, similar to what is already done in osmo-bts-trx specific loop (loops.c). Related: OS#1851 Change-Id: Iecc4ec7e21471ec853ad2d5659af4052aba5444c --- M src/common/power_control.c M tests/power/power_test.c 2 files changed, 20 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/42/16142/1 diff --git a/src/common/power_control.c b/src/common/power_control.c index d08ed5e..d2a6c1d 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -30,6 +30,11 @@ #include #include #include +#include + +/* how many dB do we raise/lower as maximum (1 ms power level = 2 dB) */ +#define MS_RAISE_MAX_DB 4 +#define MS_LOWER_MAX_DB 8 /*! compute the new MS POWER LEVEL communicated to the MS and store it in lchan. * \param lchan logical channel for which to compute (and in which to store) new power value. @@ -51,10 +56,6 @@ if (lchan->ms_power_ctrl.fixed) return 0; - /* How many dBs measured power should be increased (+) or decreased (-) - to reach expected power. */ - diff = bts->ul_power_target - rxLevel; - current_dbm = ms_pwr_dbm(band, ms_power); if (current_dbm < 0) { LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, @@ -70,6 +71,18 @@ return 0; } + /* How many dBs measured power should be increased (+) or decreased (-) + to reach expected power. */ + diff = bts->ul_power_target - rxLevel; + + /* don't ever change more than MS_{LOWER,RAISE}_MAX_DBM during one loop + iteration, i.e. reduce the speed at which the MS transmit power can + change. A higher value means a lower level (and vice versa) */ + if (diff > MS_RAISE_MAX_DB) + diff = MS_RAISE_MAX_DB; + else if (diff < -MS_LOWER_MAX_DB) + diff = -MS_LOWER_MAX_DB; + new_dbm = current_dbm + diff; /* Make sure new_dbm is never negative. ms_pwr_ctl_lvl() can later on diff --git a/tests/power/power_test.c b/tests/power/power_test.c index 30fbb64..0e08f0b 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -64,8 +64,10 @@ /* * Now 15 dB too little and we should power it up. Could be a - * power level of 7 or 8 for 15 dBm + * power level of 7 or 8 for 15 dBm. However, since we limit peace at + * which we change values, expect several steps of MS_RAISE_MAX_DB/2 levels: */ + apply_power_test(lchan, -90, 1, 11); apply_power_test(lchan, -90, 1, 7); /* It should be clamped to level 0 and 30 dBm */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iecc4ec7e21471ec853ad2d5659af4052aba5444c Gerrit-Change-Number: 16142 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 19:27:13 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 19:27:13 +0000 Subject: Change in osmo-bts[master]: power_control.c: Limit speed of announced MS Power Level value changes In-Reply-To: References: Message-ID: pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-bts/+/16142 ) Change subject: power_control.c: Limit speed of announced MS Power Level value changes ...................................................................... power_control.c: Limit speed of announced MS Power Level value changes It's not a good idea to request big changes in MS Power based on sporadic bad signal received, let's instead change announced MS power levels more smoothly to avoid possible big signal strength fluctations, similar to what is already done in osmo-bts-trx specific loop (loops.c). Related: OS#1851 Change-Id: Iecc4ec7e21471ec853ad2d5659af4052aba5444c --- M src/common/power_control.c M tests/power/power_test.c M tests/power/power_test.ok 3 files changed, 82 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/42/16142/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iecc4ec7e21471ec853ad2d5659af4052aba5444c Gerrit-Change-Number: 16142 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 19:30:24 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 19:30:24 +0000 Subject: Change in libosmocore[master]: logging/vty: fix vty_read_file(): do not write warnings to stdin References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16143 ) Change subject: logging/vty: fix vty_read_file(): do not write warnings to stdin ...................................................................... logging/vty: fix vty_read_file(): do not write warnings to stdin Setting vty->fd to 0 is a bad idea, which may cause the process to write() warnings to its own _stdin_ (yes, it's possible). For example, when a configuration file contains deprecated logging commands. Let's use stderr by default. Change-Id: Icdeaea67a06da3a2f07b252e455629559ecc1829 --- M src/vty/vty.c M tests/testsuite.at 2 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/43/16143/1 diff --git a/src/vty/vty.c b/src/vty/vty.c index babe0ef..3357d5a 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -1468,11 +1468,15 @@ struct vty *vty; vty = vty_new(); - vty->fd = 0; vty->type = VTY_FILE; vty->node = CONFIG_NODE; vty->priv = priv; + /* By default, write to stderr. Otherwise, during parsing of the logging + * configuration, all invocations to vty_out() would make the process + * write() to its own stdin (fd=0)! */ + vty->fd = fileno(stderr); + ret = config_from_file(vty, confp); if (ret != CMD_SUCCESS) { diff --git a/tests/testsuite.at b/tests/testsuite.at index 5865140..c231b96 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -199,10 +199,7 @@ AT_KEYWORDS([vty]) cat $abs_srcdir/vty/vty_test.ok > expout cp $abs_srcdir/vty/*.cfg . -# FIXME: calling vty_out() during initialization of the VTY interface would cause -# the process write to its own *stdin*! This breaks the output of 'make check'. -# Let's work this around untill the bug in libosmovty is fixed. -AT_CHECK([$abs_top_builddir/tests/vty/vty_test 0>/dev/null], [0], [expout], [ignore]) +AT_CHECK([$abs_top_builddir/tests/vty/vty_test], [0], [expout], [ignore]) AT_CLEANUP AT_SETUP([gprs-bssgp]) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icdeaea67a06da3a2f07b252e455629559ecc1829 Gerrit-Change-Number: 16143 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 19:30:53 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 20 Nov 2019 19:30:53 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: actually ignore deprecated logging commands In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16140 ) Change subject: logging/vty: fix: actually ignore deprecated logging commands ...................................................................... Patch Set 2: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a Gerrit-Change-Number: 16140 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 19:30:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 19:35:38 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 19:35:38 +0000 Subject: Change in libosmocore[master]: logging/vty: fix vty_read_file(): do not write warnings to stdin In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16143 ) Change subject: logging/vty: fix vty_read_file(): do not write warnings to stdin ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16143/1/src/vty/vty.c File src/vty/vty.c: https://gerrit.osmocom.org/c/libosmocore/+/16143/1/src/vty/vty.c at 1470 PS1, Line 1470: vty = vty_new(); Sounds like vty_new() should be setting ->fd to -1. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icdeaea67a06da3a2f07b252e455629559ecc1829 Gerrit-Change-Number: 16143 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Wed, 20 Nov 2019 19:35:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 20 19:36:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 20 Nov 2019 19:36:59 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: actually ignore deprecated logging commands In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16140 ) Change subject: logging/vty: fix: actually ignore deprecated logging commands ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a Gerrit-Change-Number: 16140 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 20 Nov 2019 19:36:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Wed Nov 20 22:24:01 2019 From: admin at opensuse.org (OBS Notification) Date: Wed, 20 Nov 2019 22:24:01 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5dd5bd0dab782_296d2ad6b051a5fc184355@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Raspbian_10/armv7l Package network:osmocom:nightly/limesuite failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 980s] [ 81%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o [ 980s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -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 -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/LTEpackets -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/src/HPM7 -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -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 -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlLimeSDR.cpp [ 982s] [ 82%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o [ 983s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -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 -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/LTEpackets -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/src/HPM7 -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -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 -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlGPIO.cpp [ 996s] [ 83%] Linking CXX executable ../bin/LimeSuiteGUI [ 996s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/LimeSuiteGUI.dir/link.txt --verbose=1 [ 997s] /usr/bin/c++ -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 -O3 -DNDEBUG -Wl,-z,relro -rdynamic CMakeFiles/LimeSuiteGUI.dir/ADF4002/ADF4002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlXBUF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCalibrations_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTRF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCDS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLimeLightPAD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIST_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewIRAM.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_gui_utilities.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlSX_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgVCOfrequencies.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLDO_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlAFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlGains_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/CoefficientFileParser.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_mainPanel.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/pnlBoardControls.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewSFR.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCLKGEN_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlMCU_BD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIAS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgGFIR_Coefficients.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlR3.cpp.o CMakeFiles/LimeSuiteGUI.dir/LMS_Programing/LMS_Programing_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgConnectionSettings.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlMiniLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/SPI_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgFullMessageLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgDeviceInfo.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/utilities_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteAppFrame.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/lms7002m_novena_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/RFSpark/RFSpark_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/Si5351C/Si5351C_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp.cpp.o CMakeFiles/LimeSuiteGUI.dir/FPGAcontrols_wxgui/FPGAcontrols_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/HPM7/HPM7_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/dlgAbout.cpp.o CMakeFiles/LimeSuiteGUI.dir/numericSlider/numericSlider.cpp.o CMakeFiles/LimeSuiteGUI.dir/myriad7/myriad7_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_frFFTviewer.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteEvents/lms7suiteEvents.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlQSpark.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnluLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlUltimateEVB.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBuffers.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlCoreSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeNetMicro.cpp.o CMakeFiles/LimeSuiteGUI.dir/__/external/kissFFT/kiss_fft.c.o CMakeFiles/LimeSuiteGUI.dir/windowFunction.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -o ../bin/LimeSuiteGUI -Wl,-rpath,/usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src: libLimeSuite.so.19.04.0 oglGraph/liboglGraph.a -L/usr/lib/arm-linux-gnueabihf -pthread -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 -lusb-1.0 -lGL -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 [ 1005s] /usr/bin/ld: libLimeSuite.so.19.04.0: undefined reference to `__atomic_store_8' [ 1005s] /usr/bin/ld: libLimeSuite.so.19.04.0: undefined reference to `__atomic_load_8' [ 1005s] collect2: error: ld returned 1 exit status [ 1005s] make[3]: *** [src/CMakeFiles/LimeSuiteGUI.dir/build.make:975: bin/LimeSuiteGUI] Error 1 [ 1005s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 1005s] make[2]: *** [CMakeFiles/Makefile2:142: src/CMakeFiles/LimeSuiteGUI.dir/all] Error 2 [ 1005s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 1005s] make[1]: *** [Makefile:133: all] Error 2 [ 1005s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 1005s] dh_auto_build: cd obj-arm-linux-gnueabihf && make -j2 returned exit code 2 [ 1005s] make: *** [debian/rules:28: binary] Error 2 [ 1005s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 1005s] [ 1005s] armbuild01 failed "build limesuite_19.04.0-1.dsc" at Wed Nov 20 22:23:47 UTC 2019. [ 1005s] [ 1005s] ### VM INTERACTION START ### [ 1008s] [ 964.454776] sysrq: SysRq : Power Off [ 1008s] [ 964.467351] reboot: Power down [ 1009s] ### VM INTERACTION END ### [ 1009s] [ 1009s] armbuild01 failed "build limesuite_19.04.0-1.dsc" at Wed Nov 20 22:23:51 UTC 2019. [ 1009s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Thu Nov 21 04:06:53 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 04:06:53 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: actually ignore deprecated logging commands In-Reply-To: References: Message-ID: Hello pespin, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16140 to look at the new patch set (#3). Change subject: logging/vty: fix: actually ignore deprecated logging commands ...................................................................... logging/vty: fix: actually ignore deprecated logging commands We shall not prevent programs from starting if their configuration files contain deprecated 'logging level ...' commands. Just print a warning and return CMD_SUCCESS instead of CMD_WARNING. While writing a unit test, another funny bug has been uncovered. Parsing of a deprecated command indeed triggers a deprecation warning, originated from libosmovty's log_deprecated_func(). This function simply calls vty_out(), but... Since the invocation of the vty_out() happens _before_ the VTY is initialized, the process is actually writing that warning to its own stdin! Most likely, because we use talloc_zero() to allocate a new instance of struct 'vty'. As a side effect, the evil warning magically appears in the output of 'make check', breaking the test statistics. Let's work around this bug for now by redirecting stdin to /dev/null. Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a Fixes: Ic9c1b566ec4a459f03e6319cf369691903cf9d00 --- M src/vty/logging_vty.c M tests/Makefile.am M tests/testsuite.at A tests/vty/ok_deprecated_logging.cfg M tests/vty/vty_test.c M tests/vty/vty_test.ok 6 files changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/16140/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a Gerrit-Change-Number: 16140 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:21:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:21:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 ) Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update ...................................................................... Patch Set 3: > Patch Set 3: > > as a self reminder, I still need to check how to make the infra happy at the end regarding the new TLLI not registered. Any advise there is welcome. You would have to register that new e pe cited tlli with tyhre bssgp emulation. Its either a foreign tlli based on gthre old one, or igts derived from the ptmsi. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 Gerrit-Change-Number: 16016 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 06:21:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:24:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:24:21 +0000 Subject: Change in libosmocore[master]: logging/vty: fix vty_read_file(): do not write warnings to stdin In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16143 ) Change subject: logging/vty: fix vty_read_file(): do not write warnings to stdin ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icdeaea67a06da3a2f07b252e455629559ecc1829 Gerrit-Change-Number: 16143 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 06:24:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:24:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:24:59 +0000 Subject: Change in libosmocore[master]: logging/vty: do not print deprecated logging commands to stdout In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16138 ) Change subject: logging/vty: do not print deprecated logging commands to stdout ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida35865b1c0bb3d3567918f8e89c6551c6b34103 Gerrit-Change-Number: 16138 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 06:24:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:25:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:25:17 +0000 Subject: Change in libosmocore[master]: logging/vty: use LOG_LEVEL_ARGS in logging_vty_add_deprecated_subsys() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16139 ) Change subject: logging/vty: use LOG_LEVEL_ARGS in logging_vty_add_deprecated_subsys() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I862c3cce0147ee8cf4013501132584ea09c58b53 Gerrit-Change-Number: 16139 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 06:25:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:26:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:26:29 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: actually ignore deprecated logging commands In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16140 ) Change subject: logging/vty: fix: actually ignore deprecated logging commands ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a Gerrit-Change-Number: 16140 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 06:26:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:26:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:26:41 +0000 Subject: Change in libosmocore[master]: logging/vty: do not print deprecated logging commands to stdout In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16138 ) Change subject: logging/vty: do not print deprecated logging commands to stdout ...................................................................... logging/vty: do not print deprecated logging commands to stdout Yes, we don't really need to poison stdout, as some osmo-* binaries (like osmo-gapk) may want to use it for non-logging purposes. This printf() call looks like a debugging leftover. Change-Id: Ida35865b1c0bb3d3567918f8e89c6551c6b34103 --- M src/vty/logging_vty.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 88ee330..9615943 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -1007,7 +1007,6 @@ OSMO_ASSERT(cmd); cmd->string = talloc_asprintf(cmd, "logging level %s (debug|info|notice|error|fatal)", name); - printf("%s\n", cmd->string); cmd->func = log_deprecated_func; cmd->doc = LEVEL_STR "Deprecated Category\n"; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida35865b1c0bb3d3567918f8e89c6551c6b34103 Gerrit-Change-Number: 16138 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:26:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:26:42 +0000 Subject: Change in libosmocore[master]: logging/vty: use LOG_LEVEL_ARGS in logging_vty_add_deprecated_subsys() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16139 ) Change subject: logging/vty: use LOG_LEVEL_ARGS in logging_vty_add_deprecated_subsys() ...................................................................... logging/vty: use LOG_LEVEL_ARGS in logging_vty_add_deprecated_subsys() Change-Id: I862c3cce0147ee8cf4013501132584ea09c58b53 --- M src/vty/logging_vty.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 9615943..b4c3776 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -1005,8 +1005,7 @@ { struct cmd_element *cmd = talloc_zero(ctx, struct cmd_element); OSMO_ASSERT(cmd); - cmd->string = talloc_asprintf(cmd, "logging level %s (debug|info|notice|error|fatal)", - name); + cmd->string = talloc_asprintf(cmd, "logging level %s " LOG_LEVEL_ARGS, name); cmd->func = log_deprecated_func; cmd->doc = LEVEL_STR "Deprecated Category\n"; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I862c3cce0147ee8cf4013501132584ea09c58b53 Gerrit-Change-Number: 16139 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:26:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:26:42 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: actually ignore deprecated logging commands In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16140 ) Change subject: logging/vty: fix: actually ignore deprecated logging commands ...................................................................... logging/vty: fix: actually ignore deprecated logging commands We shall not prevent programs from starting if their configuration files contain deprecated 'logging level ...' commands. Just print a warning and return CMD_SUCCESS instead of CMD_WARNING. While writing a unit test, another funny bug has been uncovered. Parsing of a deprecated command indeed triggers a deprecation warning, originated from libosmovty's log_deprecated_func(). This function simply calls vty_out(), but... Since the invocation of the vty_out() happens _before_ the VTY is initialized, the process is actually writing that warning to its own stdin! Most likely, because we use talloc_zero() to allocate a new instance of struct 'vty'. As a side effect, the evil warning magically appears in the output of 'make check', breaking the test statistics. Let's work around this bug for now by redirecting stdin to /dev/null. Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a Fixes: Ic9c1b566ec4a459f03e6319cf369691903cf9d00 --- M src/vty/logging_vty.c M tests/Makefile.am M tests/testsuite.at A tests/vty/ok_deprecated_logging.cfg M tests/vty/vty_test.c M tests/vty/vty_test.ok 6 files changed, 15 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index b4c3776..6d908d9 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -998,7 +998,7 @@ static int log_deprecated_func(struct cmd_element *cmd, struct vty *vty, int argc, const char *argv[]) { vty_out(vty, "%% Ignoring deprecated '%s'%s", cmd->string, VTY_NEWLINE); - return CMD_WARNING; + return CMD_SUCCESS; /* Otherwise the process would terminate */ } void logging_vty_add_deprecated_subsys(void *ctx, const char *name) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7624996..e8e4dee 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -306,6 +306,7 @@ vty/ok_more_spaces.cfg \ vty/ok_tabs_and_spaces.cfg \ vty/ok_tabs.cfg \ + vty/ok_deprecated_logging.cfg \ comp128/comp128_test.ok bits/bitfield_test.ok \ utils/utils_test.ok utils/utils_test.err stats/stats_test.ok \ bitvec/bitvec_test.ok msgb/msgb_test.ok bits/bitcomp_test.ok \ diff --git a/tests/testsuite.at b/tests/testsuite.at index c231b96..5865140 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -199,7 +199,10 @@ AT_KEYWORDS([vty]) cat $abs_srcdir/vty/vty_test.ok > expout cp $abs_srcdir/vty/*.cfg . -AT_CHECK([$abs_top_builddir/tests/vty/vty_test], [0], [expout], [ignore]) +# FIXME: calling vty_out() during initialization of the VTY interface would cause +# the process write to its own *stdin*! This breaks the output of 'make check'. +# Let's work this around untill the bug in libosmovty is fixed. +AT_CHECK([$abs_top_builddir/tests/vty/vty_test 0>/dev/null], [0], [expout], [ignore]) AT_CLEANUP AT_SETUP([gprs-bssgp]) diff --git a/tests/vty/ok_deprecated_logging.cfg b/tests/vty/ok_deprecated_logging.cfg new file mode 100644 index 0000000..2699719 --- /dev/null +++ b/tests/vty/ok_deprecated_logging.cfg @@ -0,0 +1,3 @@ +log stderr + logging filter all 1 + logging level depr debug diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c index 0d68a6c..1139638 100644 --- a/tests/vty/vty_test.c +++ b/tests/vty/vty_test.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -442,6 +443,8 @@ install_element(CONFIG_NODE, &cfg_ret_warning_cmd); install_element(CONFIG_NODE, &cfg_ret_success_cmd); + logging_vty_add_deprecated_subsys(tall_log_ctx, "depr"); + install_element(CONFIG_NODE, &cfg_level1_cmd); install_node(&level1_node, NULL); install_element(LEVEL1_NODE, &cfg_level1_child_cmd); @@ -544,6 +547,7 @@ test_exit_by_indent("ok_indented_root.cfg", 0); test_exit_by_indent("ok_empty_parent.cfg", 0); test_exit_by_indent("fail_cmd_ret_warning.cfg", -EINVAL); + test_exit_by_indent("ok_deprecated_logging.cfg", 0); test_is_cmd_ambiguous(); diff --git a/tests/vty/vty_test.ok b/tests/vty/vty_test.ok index 0b5ac9c..d2c9611 100644 --- a/tests/vty/vty_test.ok +++ b/tests/vty/vty_test.ok @@ -290,6 +290,8 @@ Called: 'return-success' Called: 'return-warning' got rc=-22 +reading file ok_deprecated_logging.cfg, expecting rc=0 +got rc=0 Going to test is_cmd_ambiguous() Going to execute 'ambiguous_nr' Called: 'ambiguous_nr [<0-23>]' (argc=0) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia934581410cd41594791d4e14ee74c16abe1009a Gerrit-Change-Number: 16140 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:26:43 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:26:43 +0000 Subject: Change in libosmocore[master]: logging/vty: fix vty_read_file(): do not write warnings to stdin In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16143 ) Change subject: logging/vty: fix vty_read_file(): do not write warnings to stdin ...................................................................... logging/vty: fix vty_read_file(): do not write warnings to stdin Setting vty->fd to 0 is a bad idea, which may cause the process to write() warnings to its own _stdin_ (yes, it's possible). For example, when a configuration file contains deprecated logging commands. Let's use stderr by default. Change-Id: Icdeaea67a06da3a2f07b252e455629559ecc1829 --- M src/vty/vty.c M tests/testsuite.at 2 files changed, 6 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/vty/vty.c b/src/vty/vty.c index babe0ef..3357d5a 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -1468,11 +1468,15 @@ struct vty *vty; vty = vty_new(); - vty->fd = 0; vty->type = VTY_FILE; vty->node = CONFIG_NODE; vty->priv = priv; + /* By default, write to stderr. Otherwise, during parsing of the logging + * configuration, all invocations to vty_out() would make the process + * write() to its own stdin (fd=0)! */ + vty->fd = fileno(stderr); + ret = config_from_file(vty, confp); if (ret != CMD_SUCCESS) { diff --git a/tests/testsuite.at b/tests/testsuite.at index 5865140..c231b96 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -199,10 +199,7 @@ AT_KEYWORDS([vty]) cat $abs_srcdir/vty/vty_test.ok > expout cp $abs_srcdir/vty/*.cfg . -# FIXME: calling vty_out() during initialization of the VTY interface would cause -# the process write to its own *stdin*! This breaks the output of 'make check'. -# Let's work this around untill the bug in libosmovty is fixed. -AT_CHECK([$abs_top_builddir/tests/vty/vty_test 0>/dev/null], [0], [expout], [ignore]) +AT_CHECK([$abs_top_builddir/tests/vty/vty_test], [0], [expout], [ignore]) AT_CLEANUP AT_SETUP([gprs-bssgp]) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icdeaea67a06da3a2f07b252e455629559ecc1829 Gerrit-Change-Number: 16143 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:28:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:28:13 +0000 Subject: Change in libosmo-sccp[master]: xua: Implement traffic mode broadcast In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16117 ) Change subject: xua: Implement traffic mode broadcast ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16117 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4358965f0ff0aa05c5082a2745159da766e9a4e7 Gerrit-Change-Number: 16117 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 06:28:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:28:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:28:17 +0000 Subject: Change in libosmo-sccp[master]: xua: Implement traffic mode broadcast In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16117 ) Change subject: xua: Implement traffic mode broadcast ...................................................................... xua: Implement traffic mode broadcast Change-Id: I4358965f0ff0aa05c5082a2745159da766e9a4e7 --- M src/xua_as_fsm.c 1 file changed, 21 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c index 602c433..731504b 100644 --- a/src/xua_as_fsm.c +++ b/src/xua_as_fsm.c @@ -108,6 +108,26 @@ return asp; } +int xua_as_transmit_msg_broadcast(struct osmo_ss7_as *as, struct msgb *msg) +{ + struct osmo_ss7_asp *asp; + unsigned int i; + struct msgb *msg_cpy; + bool sent = false; + + for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + asp = as->cfg.asps[i]; + if (!asp || !osmo_ss7_asp_active(asp)) + continue; + msg_cpy = msgb_copy(msg, "xua_bcast_cpy"); + if (osmo_ss7_asp_send(asp, msg_cpy) == 0) + sent = true; + } + + msgb_free(msg); + return sent ? 0 : -1; +} + /* actually transmit a message through this AS */ int xua_as_transmit_msg(struct osmo_ss7_as *as, struct msgb *msg) { @@ -122,9 +142,7 @@ asp = xua_as_select_asp_roundrobin(as); break; case OSMO_SS7_AS_TMOD_BCAST: - LOGPFSM(as->fi, "Traffic mode broadcast not implemented, dropping message\n"); - msgb_free(msg); - return -1; + return xua_as_transmit_msg_broadcast(as, msg); case _NUM_OSMO_SS7_ASP_TMOD: OSMO_ASSERT(false); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16117 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4358965f0ff0aa05c5082a2745159da766e9a4e7 Gerrit-Change-Number: 16117 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:31:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:31:02 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... Patch Set 1: Can we not abort loop iteration if the exit code is non-zero? -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 06:31:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:32:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:32:55 +0000 Subject: Change in osmo-bts[master]: power_control.c: Don't use announced MS Power level as input for loop... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16141 ) Change subject: power_control.c: Don't use announced MS Power level as input for loop calculations ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4494dc27a295a3dca1d3331d4ff712d486643e13 Gerrit-Change-Number: 16141 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 06:32:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:34:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:34:08 +0000 Subject: Change in osmo-bts[master]: power_control.c: Limit speed of announced MS Power Level value changes In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16142 ) Change subject: power_control.c: Limit speed of announced MS Power Level value changes ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iecc4ec7e21471ec853ad2d5659af4052aba5444c Gerrit-Change-Number: 16142 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 06:34:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 06:37:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 06:37:16 +0000 Subject: Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16064 ) Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 Gerrit-Change-Number: 16064 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 06:37:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 07:17:44 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 07:17:44 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... Patch Set 1: > Patch Set 1: > > Can we not abort loop iteration if the exit code is non-zero? Please note that osmo-bts-trx currently returns exit code 42, even when it's terminated properly (what also confuses systemd). I am already working on it... -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 07:17:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 07:19:50 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 07:19:50 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... Patch Set 1: Can we have only a single instance of respawn.sh? I don't like code duplication... -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 07:19:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 07:23:02 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 07:23:02 +0000 Subject: Change in osmo-bts[master]: power_control.c: Don't use announced MS Power level as input for loop... In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16141 ) Change subject: power_control.c: Don't use announced MS Power level as input for loop calculations ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4494dc27a295a3dca1d3331d4ff712d486643e13 Gerrit-Change-Number: 16141 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 07:23:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 08:22:12 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 08:22:12 +0000 Subject: Change in osmo-bts[master]: power_control.c: Limit speed of announced MS Power Level value changes In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16142 ) Change subject: power_control.c: Limit speed of announced MS Power Level value changes ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iecc4ec7e21471ec853ad2d5659af4052aba5444c Gerrit-Change-Number: 16142 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 08:22:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 09:25:12 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 09:25:12 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: do not close stderr in vty_close() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16144 ) Change subject: logging/vty: fix: do not close stderr in vty_close() ...................................................................... logging/vty: fix: do not close stderr in vty_close() Since Icdeaea67a06da3a2f07b252e455629559ecc1829, we use stderr for printing warnings while parsing the VTY configuration files. Make sure we do not close() stderr. Otherwise stderr logging gets broken. Change-Id: I6ecc85555d102f5911d50ed5ac54933c766fa84d Fixes: Icdeaea67a06da3a2f07b252e455629559ecc1829 --- M src/vty/vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/16144/1 diff --git a/src/vty/vty.c b/src/vty/vty.c index 3357d5a..cd252ad 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -231,7 +231,7 @@ vector_unset(vtyvec, vty->fd); /* Close socket. */ - if (vty->fd > 0) { + if (vty->fd > 0 && vty->fd != fileno(stderr)) { close(vty->fd); vty->fd = -1; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6ecc85555d102f5911d50ed5ac54933c766fa84d Gerrit-Change-Number: 16144 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 10:13:07 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 21 Nov 2019 10:13:07 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: do not close stderr in vty_close() In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16144 ) Change subject: logging/vty: fix: do not close stderr in vty_close() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6ecc85555d102f5911d50ed5ac54933c766fa84d Gerrit-Change-Number: 16144 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 21 Nov 2019 10:13:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 10:13:59 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 10:13:59 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: do not close stderr in vty_close() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16144 ) Change subject: logging/vty: fix: do not close stderr in vty_close() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6ecc85555d102f5911d50ed5ac54933c766fa84d Gerrit-Change-Number: 16144 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 21 Nov 2019 10:13:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 10:14:04 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 10:14:04 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: do not close stderr in vty_close() In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16144 ) Change subject: logging/vty: fix: do not close stderr in vty_close() ...................................................................... logging/vty: fix: do not close stderr in vty_close() Since Icdeaea67a06da3a2f07b252e455629559ecc1829, we use stderr for printing warnings while parsing the VTY configuration files. Make sure we do not close() stderr. Otherwise stderr logging gets broken. Change-Id: I6ecc85555d102f5911d50ed5ac54933c766fa84d Fixes: Icdeaea67a06da3a2f07b252e455629559ecc1829 --- M src/vty/vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/vty/vty.c b/src/vty/vty.c index 3357d5a..cd252ad 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -231,7 +231,7 @@ vector_unset(vtyvec, vty->fd); /* Close socket. */ - if (vty->fd > 0) { + if (vty->fd > 0 && vty->fd != fileno(stderr)) { close(vty->fd); vty->fd = -1; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6ecc85555d102f5911d50ed5ac54933c766fa84d Gerrit-Change-Number: 16144 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 10:18:54 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 21 Nov 2019 10:18:54 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 ) Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 Gerrit-Change-Number: 16016 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 10:18:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 10:29:50 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 21 Nov 2019 10:29:50 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: do not close stderr in vty_close() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16144 ) Change subject: logging/vty: fix: do not close stderr in vty_close() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6ecc85555d102f5911d50ed5ac54933c766fa84d Gerrit-Change-Number: 16144 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 21 Nov 2019 10:29:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 10:37:22 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 21 Nov 2019 10:37:22 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... Patch Set 1: Code-Review-1 (1 comment) -1 because of "$@" > Patch Set 1: > > Can we have only a single instance of respawn.sh? I don't like code duplication... This would be nice, and also with Release.key, which is currently copied over and over. The problem is, that docker won't follow symlinks while building images from the Dockerfile (https://github.com/moby/moby/issues/1676#issuecomment-23878459). But we could modify the commonly used Makefile to copy the files from a subdir in docker-playground.git, together with commonly used files, into a temporary directory before starting the build. (Obviously that would go into a separate patch.) https://gerrit.osmocom.org/c/docker-playground/+/16137/1/osmo-bts-latest/respawn.sh File osmo-bts-latest/respawn.sh: https://gerrit.osmocom.org/c/docker-playground/+/16137/1/osmo-bts-latest/respawn.sh at 9 PS1, Line 9: $* This should be "$@" (with the quotation marks). Otherwise, arguments are not passed correctly. For example: $ echo "hello" > "/tmp/test file" $ ./respawn.sh cat "/tmp/test file" 0: starting: cat /tmp/test file cat: /tmp/test: No such file or directory cat: file: No such file or directory Related: https://unix.stackexchange.com/a/41595 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 10:37:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 10:39:09 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 21 Nov 2019 10:39:09 +0000 Subject: Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16064 ) Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 Gerrit-Change-Number: 16064 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 10:39:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 10:44:08 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 10:44:08 +0000 Subject: Change in osmo-bts[master]: logging: remame category DSUM to DBTS, update description References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16145 ) Change subject: logging: remame category DSUM to DBTS, update description ...................................................................... logging: remame category DSUM to DBTS, update description It is still unclear to me what is the meaning of logging category 'SUM' (summary?). It was introduced back in 2011 without a proper description or any documentation. Nowdays most osmo-* projects tend to have a special logging category dedicated for application specific needs (e.g. DMSC, DBSC). Let's also introduce a similar one for OsmoBTS - DBTS. In order to keep backwards compatibility with older configuration files, let's use logging_vty_add_deprecated_subsys(). Change-Id: Ia9db783bc92b23ba87b4fdf1e4ed07d59ea6bbce Depends-On: Ia934581410cd41594791d4e14ee74c16abe1009a --- M doc/manuals/vty/bts_vty_reference.xml M include/osmo-bts/logging.h M src/common/bts.c M src/common/logging.c M src/common/vty.c M src/osmo-bts-virtual/main.c 6 files changed, 19 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/16145/1 diff --git a/doc/manuals/vty/bts_vty_reference.xml b/doc/manuals/vty/bts_vty_reference.xml index d5621c8..ca5b45e 100644 --- a/doc/manuals/vty/bts_vty_reference.xml +++ b/doc/manuals/vty/bts_vty_reference.xml @@ -254,7 +254,7 @@ - + @@ -273,7 +273,7 @@ - + @@ -665,7 +665,7 @@ - + @@ -1199,7 +1199,7 @@ - + diff --git a/include/osmo-bts/logging.h b/include/osmo-bts/logging.h index 852c383..e2d6e30 100644 --- a/include/osmo-bts/logging.h +++ b/include/osmo-bts/logging.h @@ -20,7 +20,7 @@ DLOOP, DABIS, DRTP, - DSUM, + DBTS, }; extern const struct log_info bts_log_info; diff --git a/src/common/bts.c b/src/common/bts.c index da41176..8d966c9 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -306,7 +306,7 @@ { int i, j; - LOGP(DSUM, LOGL_INFO, "Main link established, sending Status'.\n"); + LOGP(DBTS, LOGL_INFO, "Main link established, sending Status'.\n"); /* BTS and SITE MGR are EANBLED, BTS is DEPENDENCY */ oml_tx_state_changed(&bts->site_mgr.mo); @@ -342,7 +342,7 @@ uint8_t radio_state = link ? NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED; int rc; - LOGP(DSUM, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n", + LOGP(DBTS, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n", trx->nr, link ? "up" : "down"); oml_mo_state_chg(&trx->mo, radio_state, NM_AVSTATE_OK); @@ -366,7 +366,7 @@ { int tn; - LOGP(DSUM, LOGL_INFO, "TRX(%d): Setting available = %d\n", + LOGP(DBTS, LOGL_INFO, "TRX(%d): Setting available = %d\n", trx->nr, avail); if (avail) { int op_state = trx->rsl_link ? NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED; @@ -632,7 +632,7 @@ struct gsm48_imm_ass_rej *imm_ass_cmd = msgb_l3(msg); if (bts->agch_queue.length > hard_limit) { - LOGP(DSUM, LOGL_ERROR, + LOGP(DBTS, LOGL_ERROR, "AGCH: too many messages in queue, " "refusing message type %s, length = %d/%d\n", gsm48_rr_msg_name(((struct gsm48_imm_ass *)msgb_l3(msg))->msg_type), diff --git a/src/common/logging.c b/src/common/logging.c index 8340736..e5d26b2 100644 --- a/src/common/logging.c +++ b/src/common/logging.c @@ -136,9 +136,9 @@ .enabled = 1, .loglevel = LOGL_DEBUG, }, #endif - [DSUM] = { - .name = "DSUM", - .description = "DSUM", + [DBTS] = { + .name = "DBTS", + .description = "Base Transceiver Station", .loglevel = LOGL_NOTICE, .enabled = 1, }, diff --git a/src/common/vty.c b/src/common/vty.c index 2558ba8..b81827d 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -1741,5 +1741,8 @@ install_node(&phy_inst_node, config_write_dummy); + /* Ensure backwards compatibility with older config files */ + logging_vty_add_deprecated_subsys(bts, "sum"); + return 0; } diff --git a/src/osmo-bts-virtual/main.c b/src/osmo-bts-virtual/main.c index c329f3a..4dd944a 100644 --- a/src/osmo-bts-virtual/main.c +++ b/src/osmo-bts-virtual/main.c @@ -82,7 +82,7 @@ void bts_model_print_help() { - LOGP(DSUM, LOGL_NOTICE, "Unimplemented %s\n", __func__); + LOGP(DBTS, LOGL_NOTICE, "Unimplemented %s\n", __func__); } int bts_model_handle_options(int argc, char **argv) @@ -127,18 +127,18 @@ void bts_model_phy_instance_set_defaults(struct phy_instance *pinst) { - LOGP(DSUM, LOGL_NOTICE, "Unimplemented %s\n", __func__); + LOGP(DBTS, LOGL_NOTICE, "Unimplemented %s\n", __func__); } int bts_model_ts_disconnect(struct gsm_bts_trx_ts *ts) { - LOGP(DSUM, LOGL_NOTICE, "Unimplemented %s\n", __func__); + LOGP(DBTS, LOGL_NOTICE, "Unimplemented %s\n", __func__); return -ENOTSUP; } void bts_model_ts_connect(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config as_pchan) { - LOGP(DSUM, LOGL_NOTICE, "Unimplemented %s\n", __func__); + LOGP(DBTS, LOGL_NOTICE, "Unimplemented %s\n", __func__); } int main(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia9db783bc92b23ba87b4fdf1e4ed07d59ea6bbce Gerrit-Change-Number: 16145 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 10:44:09 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 10:44:09 +0000 Subject: Change in osmo-bts[master]: logging: use generic DBTS category where applicable References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16146 ) Change subject: logging: use generic DBTS category where applicable ...................................................................... logging: use generic DBTS category where applicable Change-Id: I15023436e81d5bdb51930912b221a23c69437847 --- M src/common/bts.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/16146/1 diff --git a/src/common/bts.c b/src/common/bts.c index 8d966c9..7103e2d 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -283,12 +283,12 @@ struct gsm_bts_trx *trx; if (osmo_timer_pending(&shutdown_timer)) { - LOGP(DOML, LOGL_NOTICE, + LOGP(DBTS, LOGL_NOTICE, "BTS is already being shutdown.\n"); return; } - LOGP(DOML, LOGL_NOTICE, "Shutting down BTS %u, Reason %s\n", + LOGP(DBTS, LOGL_NOTICE, "Shutting down BTS %u, Reason %s\n", bts->nr, reason); llist_for_each_entry_reverse(trx, &bts->trx_list, list) { @@ -495,7 +495,7 @@ si3->control_channel_desc.ccch_conf); if (bts->agch_queue.max_length != old_max_length) - LOGP(DRSL, LOGL_INFO, "Updated AGCH max queue length to %d\n", + LOGP(DBTS, LOGL_INFO, "Updated AGCH max queue length to %d\n", bts->agch_queue.max_length); } @@ -837,7 +837,7 @@ break; default: - LOGP(DRSL, LOGL_ERROR, "BTS %u: unhandled pchan %s when checking mode %s\n", + LOGP(DBTS, LOGL_ERROR, "BTS %u: unhandled pchan %s when checking mode %s\n", bts->nr, gsm_pchan_name(pchan), gsm48_chan_mode_name(cm)); return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I15023436e81d5bdb51930912b221a23c69437847 Gerrit-Change-Number: 16146 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:32:28 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 11:32:28 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: do not close stderr in vty_close() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16144 ) Change subject: logging/vty: fix: do not close stderr in vty_close() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16144/1/src/vty/vty.c File src/vty/vty.c: https://gerrit.osmocom.org/c/libosmocore/+/16144/1/src/vty/vty.c at 234 PS1, Line 234: if (vty->fd > 0 && vty->fd != fileno(stderr)) { what about simply checking "vty->fd > 2" ? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6ecc85555d102f5911d50ed5ac54933c766fa84d Gerrit-Change-Number: 16144 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 11:32:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:35:45 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 11:35:45 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... Patch Set 1: I am really happy about your proposals but please realize they are orthogonal to the changes in this commit, and they can be done later, specially taking into account next commit is modifying quite a lot of files and providing new interesting features like getting backtraces ;) -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 11:35:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:38:06 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 11:38:06 +0000 Subject: Change in osmo-bts[master]: logging: remame category DSUM to DBTS, update description In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16145 ) Change subject: logging: remame category DSUM to DBTS, update description ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia9db783bc92b23ba87b4fdf1e4ed07d59ea6bbce Gerrit-Change-Number: 16145 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 21 Nov 2019 11:38:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:38:35 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 11:38:35 +0000 Subject: Change in osmo-bts[master]: logging: use generic DBTS category where applicable In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16146 ) Change subject: logging: use generic DBTS category where applicable ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I15023436e81d5bdb51930912b221a23c69437847 Gerrit-Change-Number: 16146 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 11:38:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:40:48 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 11:40:48 +0000 Subject: Change in osmo-bts[master]: power_control.c: Don't use announced MS Power level as input for loop... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16141 ) Change subject: power_control.c: Don't use announced MS Power level as input for loop calculations ...................................................................... Patch Set 2: Code-Review+2 +1+1=+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4494dc27a295a3dca1d3331d4ff712d486643e13 Gerrit-Change-Number: 16141 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 11:40:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:40:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 11:40:55 +0000 Subject: Change in osmo-bts[master]: power_control.c: Limit speed of announced MS Power Level value changes In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16142 ) Change subject: power_control.c: Limit speed of announced MS Power Level value changes ...................................................................... Patch Set 2: +1+1=+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iecc4ec7e21471ec853ad2d5659af4052aba5444c Gerrit-Change-Number: 16142 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 11:40:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:40:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 11:40:59 +0000 Subject: Change in osmo-bts[master]: power_control.c: Limit speed of announced MS Power Level value changes In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16142 ) Change subject: power_control.c: Limit speed of announced MS Power Level value changes ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iecc4ec7e21471ec853ad2d5659af4052aba5444c Gerrit-Change-Number: 16142 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 11:40:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:41:25 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 11:41:25 +0000 Subject: Change in osmo-bts[master]: power_control.c: Don't use announced MS Power level as input for loop... In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16141 ) Change subject: power_control.c: Don't use announced MS Power level as input for loop calculations ...................................................................... power_control.c: Don't use announced MS Power level as input for loop calculations Use instead the received MS Power currently in use by the MS matching the measured signal. This way there's no need to wait for the MS to reach the announced MS power level or add checks in case the MS doesn't support that specific power level. Furthermore, more fine grained announced power level value can be obtained faster due to more input iterations not being dropped while waiting. osmo-bts-trx specific algo was not following this approach and using announced MS power instead because it's wowrking at a lower level and henche was not using the transmitted MS Power level value by the MS as input for the calculation. The "if (diff < 2 && diff > -2))" condition is dropped since equal signal strength may still result in a different MS power level announced (the one currently used by the MS during tx of last SACCH block). Related: OS#1851 Change-Id: I4494dc27a295a3dca1d3331d4ff712d486643e13 --- M include/osmo-bts/gsm_data_shared.h M src/common/l1sap.c M src/common/power_control.c 3 files changed, 4 insertions(+), 26 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index c19bb21..41998ad 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -322,7 +322,6 @@ uint8_t current; uint8_t max; bool fixed; - int8_t last_received; /* last received MS Power in uplink L1 SACCH, -1 means not set */ } ms_power_ctrl; /* Power levels for BTS */ uint8_t bs_power; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 4937d1e..7bf0b09 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1647,7 +1647,6 @@ lchan->sacch_deact = 0; lchan->s = lchan->ts->trx->bts->radio_link_timeout; - lchan->ms_power_ctrl.last_received = -1; /* mark no ms power received yet */ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) diff --git a/src/common/power_control.c b/src/common/power_control.c index 129334e..d08ed5e 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -51,35 +51,15 @@ if (lchan->ms_power_ctrl.fixed) return 0; - /* The phone hasn't reached the power level yet. - TODO: store .last and check if MS is trying to move towards current. */ - if (lchan->ms_power_ctrl.current != ms_power) { - if (lchan->ms_power_ctrl.last_received == -1 || - lchan->ms_power_ctrl.last_received != ms_power) { - /* MS Power still changing, keep current power level */ - lchan->ms_power_ctrl.last_received = ms_power; - return 0; - } - /* else: we are stuck with some received MS Power level - different than the one we announce, probably because the MS - doesn't support that exact one so it picked the nearest one - */ - lchan->ms_power_ctrl.last_received = ms_power; - } - /* How many dBs measured power should be increased (+) or decreased (-) to reach expected power. */ diff = bts->ul_power_target - rxLevel; - /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */ - if (diff < 2 && diff > -2) - return 0; - - current_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.current); + current_dbm = ms_pwr_dbm(band, ms_power); if (current_dbm < 0) { LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", - lchan->ms_power_ctrl.current, gsm_band_name(band)); + ms_power, gsm_band_name(band)); return 0; } bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.max); @@ -110,13 +90,13 @@ } if (lchan->ms_power_ctrl.current == new_power) { - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d, %d dBm " + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS power at control level %d, %d dBm " "(rx-ms-pwr-lvl %" PRIu8 ", rx-current %d dBm, rx-target %d dBm)\n", new_power, ms_pwr_dbm(band, new_power), ms_power, rxLevel, bts->ul_power_target); return 0; } - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS new_power from control level %d (%d dBm) to %d, %d dBm " + LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS power from control level %d (%d dBm) to %d, %d dBm " "(rx-ms-pwr-lvl %" PRIu8 ", rx-current %d dBm, rx-target %d dBm)\n", (diff > 0) ? "Raising" : "Lowering", lchan->ms_power_ctrl.current, ms_pwr_dbm(band, lchan->ms_power_ctrl.current), -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4494dc27a295a3dca1d3331d4ff712d486643e13 Gerrit-Change-Number: 16141 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:41:25 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 11:41:25 +0000 Subject: Change in osmo-bts[master]: power_control.c: Limit speed of announced MS Power Level value changes In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16142 ) Change subject: power_control.c: Limit speed of announced MS Power Level value changes ...................................................................... power_control.c: Limit speed of announced MS Power Level value changes It's not a good idea to request big changes in MS Power based on sporadic bad signal received, let's instead change announced MS power levels more smoothly to avoid possible big signal strength fluctations, similar to what is already done in osmo-bts-trx specific loop (loops.c). Related: OS#1851 Change-Id: Iecc4ec7e21471ec853ad2d5659af4052aba5444c --- M src/common/power_control.c M tests/power/power_test.c M tests/power/power_test.ok 3 files changed, 82 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/common/power_control.c b/src/common/power_control.c index d08ed5e..d2a6c1d 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -30,6 +30,11 @@ #include #include #include +#include + +/* how many dB do we raise/lower as maximum (1 ms power level = 2 dB) */ +#define MS_RAISE_MAX_DB 4 +#define MS_LOWER_MAX_DB 8 /*! compute the new MS POWER LEVEL communicated to the MS and store it in lchan. * \param lchan logical channel for which to compute (and in which to store) new power value. @@ -51,10 +56,6 @@ if (lchan->ms_power_ctrl.fixed) return 0; - /* How many dBs measured power should be increased (+) or decreased (-) - to reach expected power. */ - diff = bts->ul_power_target - rxLevel; - current_dbm = ms_pwr_dbm(band, ms_power); if (current_dbm < 0) { LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, @@ -70,6 +71,18 @@ return 0; } + /* How many dBs measured power should be increased (+) or decreased (-) + to reach expected power. */ + diff = bts->ul_power_target - rxLevel; + + /* don't ever change more than MS_{LOWER,RAISE}_MAX_DBM during one loop + iteration, i.e. reduce the speed at which the MS transmit power can + change. A higher value means a lower level (and vice versa) */ + if (diff > MS_RAISE_MAX_DB) + diff = MS_RAISE_MAX_DB; + else if (diff < -MS_LOWER_MAX_DB) + diff = -MS_LOWER_MAX_DB; + new_dbm = current_dbm + diff; /* Make sure new_dbm is never negative. ms_pwr_ctl_lvl() can later on diff --git a/tests/power/power_test.c b/tests/power/power_test.c index 30fbb64..9b1a762 100644 --- a/tests/power/power_test.c +++ b/tests/power/power_test.c @@ -58,22 +58,64 @@ lchan->state = LCHAN_S_NONE; lchan->ms_power_ctrl.current = ms_pwr_ctl_lvl(GSM_BAND_1800, 0); OSMO_ASSERT(lchan->ms_power_ctrl.current == 15); + lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(GSM_BAND_1800, 26); + OSMO_ASSERT(lchan->ms_power_ctrl.max == 2); /* Simply clamping */ apply_power_test(lchan, -60, 0, 15); /* * Now 15 dB too little and we should power it up. Could be a - * power level of 7 or 8 for 15 dBm + * power level of 7 or 8 for 15 dBm. However, since we limit peace at + * which we change values, expect several steps of MS_RAISE_MAX_DB/2 levels: */ + apply_power_test(lchan, -90, 1, 13); + apply_power_test(lchan, -90, 1, 11); + apply_power_test(lchan, -90, 1, 9); apply_power_test(lchan, -90, 1, 7); + apply_power_test(lchan, -90, 1, 5); - /* It should be clamped to level 0 and 30 dBm */ - apply_power_test(lchan, -100, 1, 0); + /* Check good RSSI value keeps it at same power level: */ + apply_power_test(lchan, bts.ul_power_target, 0, 5); + + apply_power_test(lchan, -90, 1, 3); + apply_power_test(lchan, -90, 1, 2); /* .max is pwr lvl 2 */ + apply_power_test(lchan, -90, 0, 2); /* .max is pwr lvl 2 */ + + lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(GSM_BAND_1800, 30); + OSMO_ASSERT(lchan->ms_power_ctrl.max == 0); + apply_power_test(lchan, -90, 1, 0); /* .max is pwr lvl 0 */ + apply_power_test(lchan, -90, 0, 0); /* .max is pwr lvl 0 */ + + lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(GSM_BAND_1800, 36); + OSMO_ASSERT(lchan->ms_power_ctrl.max == 29); + apply_power_test(lchan, -90, 1, 30); + apply_power_test(lchan, -90, 1, 29); + apply_power_test(lchan, -90, 0, 29); + + /* Check good RSSI value keeps it at same power level: */ + apply_power_test(lchan, bts.ul_power_target, 0, 29); + + /* Now go down, steps are double size in this direction: */ + apply_power_test(lchan, -45, 1, 1); + apply_power_test(lchan, -45, 1, 5); + apply_power_test(lchan, -45, 1, 9); + + /* Go down only one level down and up: */ + apply_power_test(lchan, bts.ul_power_target + 2, 1, 10); + apply_power_test(lchan, bts.ul_power_target - 2, 1, 9); + + /* Check if BSC requesting a low max power is applied after loop calculation: */ + lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(GSM_BAND_1800, 2); + OSMO_ASSERT(lchan->ms_power_ctrl.max == 14); + apply_power_test(lchan, bts.ul_power_target + 2, 1, 14); + /* Set back a more normal max: */ + lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(GSM_BAND_1800, 30); + OSMO_ASSERT(lchan->ms_power_ctrl.max == 0); /* Fix it and jump down */ lchan->ms_power_ctrl.fixed = true; - apply_power_test(lchan, -60, 0, 0); + apply_power_test(lchan, -60, 0, 14); /* And leave it again */ lchan->ms_power_ctrl.fixed = false; diff --git a/tests/power/power_test.ok b/tests/power/power_test.ok index cf0a38b..335a3d3 100644 --- a/tests/power/power_test.ok +++ b/tests/power/power_test.ok @@ -1,7 +1,26 @@ Testing power loop... power control [0]: MS current power 15 +power control [1]: MS current power 13 +power control [1]: MS current power 11 +power control [1]: MS current power 9 power control [1]: MS current power 7 +power control [1]: MS current power 5 +power control [0]: MS current power 5 +power control [1]: MS current power 3 +power control [1]: MS current power 2 +power control [0]: MS current power 2 power control [1]: MS current power 0 power control [0]: MS current power 0 +power control [1]: MS current power 30 +power control [1]: MS current power 29 +power control [0]: MS current power 29 +power control [0]: MS current power 29 +power control [1]: MS current power 1 +power control [1]: MS current power 5 +power control [1]: MS current power 9 +power control [1]: MS current power 10 +power control [1]: MS current power 9 +power control [1]: MS current power 14 +power control [0]: MS current power 14 power control [1]: MS current power 15 Power loop test OK -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iecc4ec7e21471ec853ad2d5659af4052aba5444c Gerrit-Change-Number: 16142 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:49:47 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 11:49:47 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: do not close stderr in vty_close() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16144 ) Change subject: logging/vty: fix: do not close stderr in vty_close() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16144/1/src/vty/vty.c File src/vty/vty.c: https://gerrit.osmocom.org/c/libosmocore/+/16144/1/src/vty/vty.c at 234 PS1, Line 234: if (vty->fd > 0 && vty->fd != fileno(stderr)) { > what about simply checking "vty->fd > 2" ? I was thinking about this. Is it guaranteed that stdout is fd=1 and stderr is fd=2 on all platforms? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6ecc85555d102f5911d50ed5ac54933c766fa84d Gerrit-Change-Number: 16144 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 11:49:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 11:51:26 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 11:51:26 +0000 Subject: Change in libosmocore[master]: logging/vty: fix: do not close stderr in vty_close() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16144 ) Change subject: logging/vty: fix: do not close stderr in vty_close() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16144/1/src/vty/vty.c File src/vty/vty.c: https://gerrit.osmocom.org/c/libosmocore/+/16144/1/src/vty/vty.c at 234 PS1, Line 234: if (vty->fd > 0 && vty->fd != fileno(stderr)) { > I was thinking about this. [?] I'd expect it to be the case for POSIX systems. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6ecc85555d102f5911d50ed5ac54933c766fa84d Gerrit-Change-Number: 16144 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 11:51:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 12:58:11 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 21 Nov 2019 12:58:11 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... Patch Set 1: > Patch Set 1: > > I am really happy about your proposals but please realize they are orthogonal to the changes in this commit, and they can be done later, specially taking into account next commit is modifying quite a lot of files and providing new interesting features like getting backtraces ;) Sure, I didn't mean to suggest that you implement this now. Just writing down how it could be solved in theory, in case somebody wants to take a shot at it at some point. The $* -> "$@" thing should be fixed though in my opinion, otherwise it may lead to confusing behavior in the future. -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 12:58:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 13:01:22 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 13:01:22 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... Patch Set 1: > > Sure, I didn't mean to suggest that you implement this now. Just writing down how it could be solved in theory, in case somebody wants to take a shot at it at some point. > > The $* -> "$@" thing should be fixed though in my opinion, otherwise it may lead to confusing behavior in the future. I agree it should be fixed, but I'm not touching that line nor doing related changes in this commit, so it can go in a later commit. -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 13:01:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 13:07:33 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 13:07:33 +0000 Subject: Change in osmo-sgsn[master]: Improve logging in gprs_llc.c code References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 ) Change subject: Improve logging in gprs_llc.c code ...................................................................... Improve logging in gprs_llc.c code Change-Id: Id89cc6760179fb9b1709a30b5d1af41d466b280b --- M include/osmocom/sgsn/gprs_sgsn.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_llc.c 3 files changed, 21 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/47/16147/1 diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h index 0a52a7d..0886ce7 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/gprs_sgsn.h @@ -257,15 +257,15 @@ LOGP(DMM, level, "UE(%p){NOTSUPPORTED} " fmt, ue, ## args) #endif -#define LOGGBP(llme, level, fmt, args...) \ - LOGP(DMM, level, "LLME(%08x/%08x){%s} " fmt, (llme)->old_tlli, \ +#define LOGGBP(llme, category, level, fmt, args...) \ + LOGP(category, level, "LLME(%08x/%08x){%s} " fmt, (llme)->old_tlli, \ (llme)->tlli, get_value_string_or_null(gprs_llc_llme_state_names, (llme)->state), ## args); #define LOGGBIUP(llme, msg, level, fmt, args...) \ do { \ struct ranap_ue_conn_ctx * _ue; \ if (llme) { \ - LOGGBP(llme, level, fmt, ## args); \ + LOGGBP(llme, DMM, level, fmt, ## args); \ } else if ((msg) && (_ue = MSG_IU_UE_CTX(msg))) { \ LOGIUP(_ue, level, fmt, ## args); \ } else { OSMO_ASSERT(0); } \ diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 17daa7d..7a09760 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1625,7 +1625,7 @@ if (llme) { /* send a XID reset to re-set all LLC sequence numbers * in the MS */ - LOGGBP(llme, LOGL_NOTICE, "LLC XID RESET\n"); + LOGGBP(llme, DMM, LOGL_NOTICE, "LLC XID RESET\n"); gprs_llgmm_reset(llme); } /* The MS has to perform GPRS attach */ @@ -1905,7 +1905,7 @@ if (llme && !mmctx && gh->msg_type != GSM48_MT_GMM_ATTACH_REQ && gh->msg_type != GSM48_MT_GMM_RA_UPD_REQ) { - LOGGBP(llme, LOGL_NOTICE, "Cannot handle GMM for unknown MM CTX\n"); + LOGGBP(llme, DMM, LOGL_NOTICE, "Cannot handle GMM for unknown MM CTX\n"); /* 4.7.10 */ if (gh->msg_type == GSM48_MT_GMM_STATUS) { /* TLLI unassignment */ diff --git a/src/sgsn/gprs_llc.c b/src/sgsn/gprs_llc.c index 2a27da8..74789b0 100644 --- a/src/sgsn/gprs_llc.c +++ b/src/sgsn/gprs_llc.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -528,7 +529,7 @@ struct gprs_llc_llme *llme; /* FIXME: don't use the TLLI but the 0xFFFF unassigned? */ llme = llme_alloc(tlli); - LOGP(DLLC, LOGL_NOTICE, "LLC RX: unknown TLLI 0x%08x, " + LOGGBP(llme, DLLC, LOGL_NOTICE, "LLC RX: unknown TLLI 0x%08x, " "creating LLME on the fly\n", tlli); lle = &llme->lle[sapi]; return lle; @@ -1048,6 +1049,9 @@ { unsigned int i; + LOGGBP(llme, DLLC, LOGL_NOTICE, "LLGM Assign pre (%08x => %08x)\n", + old_tlli, new_tlli); + if (old_tlli == TLLI_UNASSIGNED && new_tlli != TLLI_UNASSIGNED) { /* TLLI Assignment 8.3.1 */ /* New TLLI shall be assigned and used when (re)transmitting LLC frames */ @@ -1091,6 +1095,9 @@ } else return -EINVAL; + LOGGBP(llme, DLLC, LOGL_NOTICE, "LLGM Assign post (%08x => %08x)\n", + old_tlli, new_tlli); + return 0; } @@ -1109,11 +1116,13 @@ int xid_bytes_len, rc; uint8_t *xid; - LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); + LOGGBP(llme, DLLC, LOGL_NOTICE, "LLGM Reset\n"); 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)); + LOGGBP(llme, DLLC, LOGL_ERROR, + "osmo_get_rand_id() failed for LLC XID reset: %s\n", + strerror(-rc)); return rc; } @@ -1144,11 +1153,13 @@ int xid_bytes_len, rc; uint8_t *xid; - LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); + LOGGBP(llme, DLLC, LOGL_NOTICE, "LLGM Reset (SAPI=%" PRIu8 ")\n", sapi); 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)); + LOGGBP(llme, DLLC, LOGL_ERROR, + "osmo_get_rand_id() failed for LLC XID reset: %s\n", + strerror(-rc)); return rc; } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Id89cc6760179fb9b1709a30b5d1af41d466b280b Gerrit-Change-Number: 16147 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 13:15:34 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 13:15:34 +0000 Subject: Change in osmo-sgsn[master]: Improve logging in gprs_llc.c code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 to look at the new patch set (#2). Change subject: Improve logging in gprs_llc.c code ...................................................................... Improve logging in gprs_llc.c code Change-Id: Id89cc6760179fb9b1709a30b5d1af41d466b280b --- M include/osmocom/sgsn/gprs_sgsn.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_llc.c 3 files changed, 26 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/47/16147/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Id89cc6760179fb9b1709a30b5d1af41d466b280b Gerrit-Change-Number: 16147 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 14:21:36 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 14:21:36 +0000 Subject: Change in osmo-sgsn[master]: Improve logging in gprs_llc.c code In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 ) Change subject: Improve logging in gprs_llc.c code ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Id89cc6760179fb9b1709a30b5d1af41d466b280b Gerrit-Change-Number: 16147 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Thu, 21 Nov 2019 14:21:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 14:28:57 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 21 Nov 2019 14:28:57 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... Patch Set 1: Code-Review+1 > Patch Set 1: > > > > > Sure, I didn't mean to suggest that you implement this now. Just writing down how it could be solved in theory, in case somebody wants to take a shot at it at some point. > > > > The $* -> "$@" thing should be fixed though in my opinion, otherwise it may lead to confusing behavior in the future. > > I agree it should be fixed, but I'm not touching that line nor doing related changes in this commit, so it can go in a later commit. My bad, I didn't realize that this line was in the previous version already. -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 14:28:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 14:56:05 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 14:56:05 +0000 Subject: Change in libosmocore[master]: libosmovty: properly initialize vty->fd in vty_new() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16148 ) Change subject: libosmovty: properly initialize vty->fd in vty_new() ...................................................................... libosmovty: properly initialize vty->fd in vty_new() Since we're using talloc_zero(), vty->fd is initialized with 0, which corresponds to stdin. Let's set an invalid value to prevent potential bugs like the one fixed by the recent change [1]. [1] Icdeaea67a06da3a2f07b252e455629559ecc1829 Change-Id: Iec15649781317a23e13d2c2840a8f672050f76c1 --- M src/vty/vty.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/48/16148/1 diff --git a/src/vty/vty.c b/src/vty/vty.c index cd252ad..8cc2a3a 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -128,6 +128,7 @@ goto out_obuf; new->max = VTY_BUFSIZ; + new->fd = -1; return new; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16148 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec15649781317a23e13d2c2840a8f672050f76c1 Gerrit-Change-Number: 16148 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 14:56:06 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 14:56:06 +0000 Subject: Change in libosmocore[master]: libosmovty: simplify condition checking vty->fd in vty_close() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16149 ) Change subject: libosmovty: simplify condition checking vty->fd in vty_close() ...................................................................... libosmovty: simplify condition checking vty->fd in vty_close() On POSIX systems, standard I/O streams - stdin, stdout, and stderr, always have default file descriptors 0, 1, and 2 respectively. Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 --- M src/vty/vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/16149/1 diff --git a/src/vty/vty.c b/src/vty/vty.c index 8cc2a3a..ebdf9fc 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -231,8 +231,8 @@ /* Unset vector. */ vector_unset(vtyvec, vty->fd); - /* Close socket. */ - if (vty->fd > 0 && vty->fd != fileno(stderr)) { + /* Close socket (ignore standard I/O streams). */ + if (vty->fd > 2) { close(vty->fd); vty->fd = -1; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 Gerrit-Change-Number: 16149 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 15:15:57 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 15:15:57 +0000 Subject: Change in osmo-sgsn[master]: gprs_llc.c: Use enum instead of hardcoded value References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16150 ) Change subject: gprs_llc.c: Use enum instead of hardcoded value ...................................................................... gprs_llc.c: Use enum instead of hardcoded value Change-Id: I89815f44f615a188f46a13f3785b3f7484f73bb3 --- M src/sgsn/gprs_llc.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/50/16150/1 diff --git a/src/sgsn/gprs_llc.c b/src/sgsn/gprs_llc.c index 244d22c..ed5d55e 100644 --- a/src/sgsn/gprs_llc.c +++ b/src/sgsn/gprs_llc.c @@ -1115,7 +1115,7 @@ int gprs_llgmm_reset(struct gprs_llc_llme *llme) { struct msgb *msg = msgb_alloc_headroom(4096, 1024, "LLC_XID"); - struct gprs_llc_lle *lle = &llme->lle[1]; + struct gprs_llc_lle *lle = &llme->lle[GPRS_SAPI_GMM]; uint8_t xid_bytes[1024]; int xid_bytes_len, rc; uint8_t *xid; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16150 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I89815f44f615a188f46a13f3785b3f7484f73bb3 Gerrit-Change-Number: 16150 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 15:33:46 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 15:33:46 +0000 Subject: Change in libosmocore[master]: libosmovty: properly initialize vty->fd in vty_new() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16148 ) Change subject: libosmovty: properly initialize vty->fd in vty_new() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16148 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec15649781317a23e13d2c2840a8f672050f76c1 Gerrit-Change-Number: 16148 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 15:33:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 15:34:15 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 15:34:15 +0000 Subject: Change in libosmocore[master]: libosmovty: simplify condition checking vty->fd in vty_close() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16149 ) Change subject: libosmovty: simplify condition checking vty->fd in vty_close() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 Gerrit-Change-Number: 16149 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 15:34:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 15:39:30 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 15:39:30 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm.c: Send XID reset with received TLLI References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16151 ) Change subject: gprs_gmm.c: Send XID reset with received TLLI ...................................................................... gprs_gmm.c: Send XID reset with received TLLI Otherwise lower layers will end up using a TLLI from PTMSI which was not yet announced to the MS if it is still not in GMM attached state, as showcased by SGSN_Tests.TC_attach_req_id_req_ra_update. Related: OS#3957, OS#4245 Change-Id: Ide51726abb82f5784eca4ab8d62b2ad8512be843 --- M src/sgsn/gprs_gmm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/51/16151/1 diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 7a09760..f62d0d1 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1626,7 +1626,7 @@ /* send a XID reset to re-set all LLC sequence numbers * in the MS */ LOGGBP(llme, DMM, LOGL_NOTICE, "LLC XID RESET\n"); - gprs_llgmm_reset(llme); + gprs_llgmm_reset_oldmsg(msg, GPRS_SAPI_GMM, llme); } /* The MS has to perform GPRS attach */ /* Device is still IMSI attached for CS but initiate GPRS ATTACH, -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ide51726abb82f5784eca4ab8d62b2ad8512be843 Gerrit-Change-Number: 16151 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 15:43:22 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 15:43:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 ) Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update ...................................................................... Patch Set 3: > Patch Set 3: > > > Patch Set 3: > > > > as a self reminder, I still need to check how to make the infra happy at the end regarding the new TLLI not registered. Any advise there is welcome. > > You would have to register that new e pe cited tlli with tyhre bssgp emulation. Its either a foreign tlli based on gthre old one, or igts derived from the ptmsi. It's indeed the one derived by the ptmsi, the problem is that in that scenario the ptmsi is never sent to the MS so it's impossible to register it. That's because during attach request, the imsi is received and llme layer is updated with the ptmsi info and tlli is updated, but GMM layers keeps using the initial one until attach accept is sent with the ptmsi used. In this case, the XID Reset message was using the newly allocated TLLI (despite the GMM reject message sent immediately afterwards still uses the initial TLLI). I changed it to use the initial TLLI used by both sides in here: https://gerrit.osmocom.org/c/osmo-sgsn/+/16151 gprs_gmm.c: Send XID reset with received TLLI After that patch is applied in osmo-sgsn, then test passes fine because the TLLI sent during XID reset is not different than the one in use by upper layers. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 Gerrit-Change-Number: 16016 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 21 Nov 2019 15:43:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 15:57:44 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 15:57:44 +0000 Subject: Change in osmo-sgsn[master]: gprs_llc.c: Use enum instead of hardcoded value In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16150 ) Change subject: gprs_llc.c: Use enum instead of hardcoded value ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16150 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I89815f44f615a188f46a13f3785b3f7484f73bb3 Gerrit-Change-Number: 16150 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Thu, 21 Nov 2019 15:57:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 16:04:29 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 16:04:29 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm.c: Send XID reset with received TLLI In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16151 ) Change subject: gprs_gmm.c: Send XID reset with received TLLI ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ide51726abb82f5784eca4ab8d62b2ad8512be843 Gerrit-Change-Number: 16151 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Thu, 21 Nov 2019 16:04:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 16:43:01 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 16:43:01 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 ) Change subject: Fix python-nwdiag dependency on new debian distros ...................................................................... Fix python-nwdiag dependency on new debian distros Ass seen by https://packages.debian.org, python-nwdiag is only available in buster and older stables, while python3-nwdiag is available in both old and new releases as well as testing and unstable. Related: OS#4246 Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 --- M INSTALL.txt M debian/control 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/52/16152/1 diff --git a/INSTALL.txt b/INSTALL.txt index 3166bfa..3f4ef9f 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -10,7 +10,7 @@ mscgen \ graphviz \ python-pychart \ - python-nwdiag + python3-nwdiag (Note that asciidoc-dblatex is required from debian 9 on and did not exist before.) diff --git a/debian/control b/debian/control index 0f89d0a..afd09a3 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ libxml2-utils, mscgen, python, - python-nwdiag, + python3-nwdiag, python-pychart, xsltproc Standards-Version: 3.9.8 @@ -32,7 +32,7 @@ libxml2-utils, mscgen, python, - python-nwdiag, + python3-nwdiag, python-pychart, xsltproc Description: Osmocom manuals shared code -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Gerrit-Change-Number: 16152 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 17:27:21 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 21 Nov 2019 17:27:21 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16153 ) Change subject: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board ...................................................................... ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef --- M ansible/host_vars/osmo-gsm-tester-prod.yml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/53/16153/1 diff --git a/ansible/host_vars/osmo-gsm-tester-prod.yml b/ansible/host_vars/osmo-gsm-tester-prod.yml index 92d8169..a2a5a36 100644 --- a/ansible/host_vars/osmo-gsm-tester-prod.yml +++ b/ansible/host_vars/osmo-gsm-tester-prod.yml @@ -6,6 +6,8 @@ ip: 10.42.42.121 - mac: 00:02:95:00:7c:07 ip: 10.42.42.122 + - mac: b8:27:eb:71:3a:36 + ip: 10.42.42.123 # how many modems are connected via a quadmodem? gsm_modems: 8 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef Gerrit-Change-Number: 16153 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 18:56:35 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 21 Nov 2019 18:56:35 +0000 Subject: Change in gapk[master]: procqueue/ecu: use generic ECU abstraction API References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/gapk/+/16154 ) Change subject: procqueue/ecu: use generic ECU abstraction API ...................................................................... procqueue/ecu: use generic ECU abstraction API Change-Id: I434a5973add38f92fc2ebe7f16125cfcb8ff9e23 --- M include/osmocom/gapk/codecs.h M src/Makefile.am M src/codec_fr.c D src/ecu_fr.c M src/pq_ecu.c 5 files changed, 80 insertions(+), 105 deletions(-) git pull ssh://gerrit.osmocom.org:29418/gapk refs/changes/54/16154/1 diff --git a/include/osmocom/gapk/codecs.h b/include/osmocom/gapk/codecs.h index 33f6593..253fb14 100644 --- a/include/osmocom/gapk/codecs.h +++ b/include/osmocom/gapk/codecs.h @@ -73,9 +73,6 @@ /* Encoding / decoding function pointers */ osmo_gapk_codec_conv_cb_t codec_encode; osmo_gapk_codec_conv_cb_t codec_decode; - - /* ECU (Error Concealment Unit) function */ - osmo_gapk_codec_conv_cb_t ecu_proc; }; const struct osmo_gapk_codec_desc * diff --git a/src/Makefile.am b/src/Makefile.am index 8fdeff7..94d9356 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -46,11 +46,6 @@ pq_ecu.c \ $(NULL) -# ECU (Error Concealment Unit) implementation -libosmogapk_la_SOURCES += \ - ecu_fr.c \ - $(NULL) - # Formats implementation libosmogapk_la_SOURCES += \ formats.c \ diff --git a/src/codec_fr.c b/src/codec_fr.c index 75efeb7..f2ca6e6 100644 --- a/src/codec_fr.c +++ b/src/codec_fr.c @@ -83,9 +83,6 @@ #endif /* HAVE_LIBGSM */ -/* Forward declaration of ECU (Error Concealment Unit) function */ -int ecu_proc_fr(void *state, uint8_t *out, const uint8_t *in, unsigned int in_len); - const struct osmo_gapk_codec_desc codec_fr_desc = { .type = CODEC_FR, .name = "fr", @@ -99,5 +96,4 @@ .codec_encode = codec_fr_encode, .codec_decode = codec_fr_decode, #endif - .ecu_proc = ecu_proc_fr, }; diff --git a/src/ecu_fr.c b/src/ecu_fr.c deleted file mode 100644 index db55fec..0000000 --- a/src/ecu_fr.c +++ /dev/null @@ -1,78 +0,0 @@ -/* ECU (Error Concealment Unit) for FR */ - -/* - * This file is part of GAPK (GSM Audio Pocket Knife). - * - * (C) 2018 by Vadim Yanitskiy - * - * All Rights Reserved - * - * GAPK is free software: you can 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. - * - * GAPK 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 GAPK. If not, see . - */ - -#include -#include -#include -#include - -#include -#include - -int -ecu_proc_fr(void *_state, uint8_t *out, const uint8_t *in, unsigned int in_len) -{ - struct osmo_ecu_fr_state *state = (struct osmo_ecu_fr_state *) _state; - bool backup = false; - bool bfi = true; - int i, rc; - - assert(in_len == FR_CANON_LEN); - - /* Check if a frame is BFI */ - for (i = 1; i < in_len; i++) { - if (in[i] != 0x00) { - bfi = false; - break; - } - } - - /* We have got a good frame, nothing to do */ - if (!bfi) { - osmo_ecu_fr_reset(state, (uint8_t *) in); - memcpy(out, in, in_len); - return in_len; - } - - /* Check if ECU state contains a backup frame */ - for (i = 0; i < in_len; i++) { - if (state->frame_backup[i] != 0x00) { - backup = true; - break; - } - } - - /* There is no back-up frame */ - if (!backup) { - /* Copy BFI 'as-is' */ - memcpy(out, in, in_len); - return in_len; - } - - /* Attempt to perform error concealment */ - rc = osmo_ecu_fr_conceal(state, out); - if (rc) - return rc; - - return in_len; -} diff --git a/src/pq_ecu.c b/src/pq_ecu.c index fad853c..a9972b1 100644 --- a/src/pq_ecu.c +++ b/src/pq_ecu.c @@ -3,7 +3,7 @@ /* * This file is part of GAPK (GSM Audio Pocket Knife). * - * (C) 2018 by Vadim Yanitskiy + * (C) 2018-2019 by Vadim Yanitskiy * * All Rights Reserved * @@ -22,20 +22,69 @@ */ #include +#include #include #include +#include +#include + #include #include #include #include -#include +/* Empty buffer for quick memcmp() based BFI detection */ +static const uint8_t zero_buf[40] = { 0x00 }; + +static int +pq_cb_ecu_proc(void *state, uint8_t *out, const uint8_t *in, unsigned int in_len) +{ + struct osmo_ecu_state *ecu_state = state; + int bfi, rc; + + /* Check if the input frame is BFI */ + switch (ecu_state->codec) { + case OSMO_ECU_CODEC_HR: + bfi = !memcmp(zero_buf, in + 1, GSM_HR_BYTES); + break; + case OSMO_ECU_CODEC_FR: + bfi = !memcmp(zero_buf, in + 1, GSM_FR_BYTES - 1); + break; + case OSMO_ECU_CODEC_EFR: + bfi = !memcmp(zero_buf, in + 1, GSM_EFR_BYTES - 1); + break; + /* TODO: implement BFI detection (in[0] == AMR_NO_DATA?) */ + case OSMO_ECU_CODEC_AMR: + default: + LOGPGAPK(LOGL_FATAL, "Unknown ECU codec\n"); + OSMO_ASSERT(0); + } + + rc = osmo_ecu_frame_in(state, bfi, in, in_len); + if (rc) { + LOGPGAPK(LOGL_ERROR, "osmo_ecu_frame_in() failed: rc=%d\n", rc); + return -EIO; + } + + if (bfi) { + rc = osmo_ecu_frame_out(state, out); + if (rc >= 0) + return rc; + LOGPGAPK(LOGL_NOTICE, "osmo_ecu_frame_out() failed: rc=%d\n", rc); + /* Forward BFI 'as-is' */ + } + + /* Forward frame 'as-is' */ + memcpy(out, in, in_len); + return in_len; +} static void -clean_up(void *state) +pq_cb_ecu_exit(void *state) { - talloc_free(state); + struct osmo_ecu_state *ecu_state = state; + osmo_ecu_destroy(ecu_state); } /*! Add a ECU block to the processing queue @@ -47,23 +96,37 @@ const struct osmo_gapk_codec_desc *codec) { const struct osmo_gapk_format_desc *fmt; + struct osmo_ecu_state *ecu_state; struct osmo_gapk_pq_item *item; + /* Allocate the ECU state */ + switch (codec->type) { + case CODEC_HR: + ecu_state = osmo_ecu_init(pq, OSMO_ECU_CODEC_HR); + break; + case CODEC_FR: + ecu_state = osmo_ecu_init(pq, OSMO_ECU_CODEC_FR); + break; + case CODEC_EFR: + ecu_state = osmo_ecu_init(pq, OSMO_ECU_CODEC_EFR); + break; + /* FIXME: we need to know how to detect AMR BFI */ + case CODEC_AMR: + default: + ecu_state = NULL; + break; + } + /* Make sure that a codec has corresponding ECU implementation */ - if (codec->ecu_proc == NULL) { + if (ecu_state == NULL) { LOGPGAPK(LOGL_ERROR, "Codec '%s' has no ECU implementation\n", codec->name); return -ENOTSUP; } /* Allocate a new item to the processing queue */ item = osmo_gapk_pq_add_item(pq); - if (!item) - return -ENOMEM; - - /* Allocate the ECU state */ - item->state = talloc_zero(item, struct osmo_ecu_fr_state); - if (!item->state) { - talloc_free(item); + if (!item) { + osmo_ecu_destroy(ecu_state); return -ENOMEM; } @@ -72,9 +135,11 @@ item->len_in = fmt->frame_len; item->len_out = fmt->frame_len; - item->proc = codec->ecu_proc; - item->exit = &clean_up; - item->wait = NULL; + talloc_steal(item, ecu_state); + item->state = ecu_state; + + item->proc = &pq_cb_ecu_proc; + item->exit = &pq_cb_ecu_exit; /* Meta information */ item->type = OSMO_GAPK_ITEM_TYPE_PROC; -- To view, visit https://gerrit.osmocom.org/c/gapk/+/16154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Change-Id: I434a5973add38f92fc2ebe7f16125cfcb8ff9e23 Gerrit-Change-Number: 16154 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:15:18 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:15:18 +0000 Subject: Change in libosmo-netif[master]: osmux_test: don't use color logging In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/16106 ) Change subject: osmux_test: don't use color logging ...................................................................... osmux_test: don't use color logging Change-Id: I7b0c8d311123f4fa0aeedf3938c8628a4442daf7 --- M tests/osmo-pcap-test/osmux_test.c M tests/osmux/osmux_test.c M tests/osmux/osmux_test.ok 3 files changed, 216 insertions(+), 214 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/tests/osmo-pcap-test/osmux_test.c b/tests/osmo-pcap-test/osmux_test.c index 9163753..e6bbeb1 100644 --- a/tests/osmo-pcap-test/osmux_test.c +++ b/tests/osmo-pcap-test/osmux_test.c @@ -177,6 +177,7 @@ tall_test = talloc_named_const(NULL, 1, "osmux_pcap_test"); osmo_init_logging(&osmux_log_info); log_set_log_level(osmo_stderr_target, LOGL_DEBUG); + log_set_use_color(osmo_stderr_target, 0); osmo_pcap_init(); diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c index b6a43fe..f0edeab 100644 --- a/tests/osmux/osmux_test.c +++ b/tests/osmux/osmux_test.c @@ -296,6 +296,7 @@ log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE); log_set_print_category(osmo_stderr_target, 1); log_set_print_category_hex(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); osmux_xfrm_output_init2(&h_output, 0x7000000, 98); osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL); diff --git a/tests/osmux/osmux_test.ok b/tests/osmux/osmux_test.ok index b5618a3..bd1b066 100644 --- a/tests/osmux/osmux_test.ok +++ b/tests/osmux/osmux_test.ok @@ -1,10 +1,10 @@ -DLMUX initialized osmux input converter -sys={23.444242}, mono={0.020000}: clock_override_add +DLMUX initialized osmux input converter +sys={23.444242}, mono={0.020000}: clock_override_add sys={23.464242}, mono={0.040000}: clock_override_add sys={23.484242}, mono={0.060000}: clock_override_add sys={23.504242}, mono={0.080000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.504242}, mono={0.080000}: OSMUX message (len=256): OSMUX seq=000 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=001 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=002 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=003 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={23.504242}, mono={0.080000}: OSMUX message (len=256): OSMUX seq=000 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=001 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=002 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=003 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.504242}, mono={0.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=1 ext=0 csrc_count=0 sequence=9158 timestamp=1681692777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.524242}, mono={0.100000}: clock_override_add sys={23.524242}, mono={0.100000}: OSMUX message (len=106): OSMUX seq=004 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=005 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=006 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=007 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -15,8 +15,8 @@ sys={23.604242}, mono={0.180000}: clock_override_add sys={23.624242}, mono={0.200000}: clock_override_add sys={23.644242}, mono={0.220000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.644242}, mono={0.220000}: OSMUX message (len=256): OSMUX seq=012 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=013 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=014 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=015 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={23.644242}, mono={0.220000}: OSMUX message (len=256): OSMUX seq=012 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=013 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=014 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=015 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.664242}, mono={0.240000}: clock_override_add sys={23.664242}, mono={0.240000}: OSMUX message (len=106): OSMUX seq=016 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=017 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=018 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=019 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.684242}, mono={0.260000}: clock_override_add @@ -26,8 +26,8 @@ sys={23.744242}, mono={0.320000}: clock_override_add sys={23.764242}, mono={0.340000}: clock_override_add sys={23.784242}, mono={0.360000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.784242}, mono={0.360000}: OSMUX message (len=256): OSMUX seq=024 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=025 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=026 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=027 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={23.784242}, mono={0.360000}: OSMUX message (len=256): OSMUX seq=024 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=025 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=026 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=027 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.804242}, mono={0.380000}: clock_override_add sys={23.804242}, mono={0.380000}: OSMUX message (len=106): OSMUX seq=028 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=029 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=030 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=031 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.824242}, mono={0.400000}: clock_override_add @@ -37,8 +37,8 @@ sys={23.884242}, mono={0.460000}: clock_override_add sys={23.904242}, mono={0.480000}: clock_override_add sys={23.924242}, mono={0.500000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.924242}, mono={0.500000}: OSMUX message (len=256): OSMUX seq=036 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=037 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=038 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=039 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={23.924242}, mono={0.500000}: OSMUX message (len=256): OSMUX seq=036 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=037 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=038 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=039 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.944242}, mono={0.520000}: clock_override_add sys={23.944242}, mono={0.520000}: OSMUX message (len=106): OSMUX seq=040 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=041 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=042 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=043 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={23.964242}, mono={0.540000}: clock_override_add @@ -48,8 +48,8 @@ sys={24.024242}, mono={0.600000}: clock_override_add sys={24.044242}, mono={0.620000}: clock_override_add sys={24.064242}, mono={0.640000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.064242}, mono={0.640000}: OSMUX message (len=256): OSMUX seq=048 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=049 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=050 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=051 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={24.064242}, mono={0.640000}: OSMUX message (len=256): OSMUX seq=048 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=049 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=050 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=051 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.084242}, mono={0.660000}: clock_override_add sys={24.084242}, mono={0.660000}: OSMUX message (len=106): OSMUX seq=052 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=053 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=054 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=055 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.104242}, mono={0.680000}: clock_override_add @@ -59,8 +59,8 @@ sys={24.164242}, mono={0.740000}: clock_override_add sys={24.184242}, mono={0.760000}: clock_override_add sys={24.204242}, mono={0.780000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.204242}, mono={0.780000}: OSMUX message (len=256): OSMUX seq=060 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=061 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=062 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=063 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={24.204242}, mono={0.780000}: OSMUX message (len=256): OSMUX seq=060 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=061 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=062 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=063 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.224242}, mono={0.800000}: clock_override_add sys={24.224242}, mono={0.800000}: OSMUX message (len=106): OSMUX seq=064 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=065 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=066 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=067 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.244242}, mono={0.820000}: clock_override_add @@ -70,8 +70,8 @@ sys={24.304242}, mono={0.880000}: clock_override_add sys={24.324242}, mono={0.900000}: clock_override_add sys={24.344242}, mono={0.920000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.344242}, mono={0.920000}: OSMUX message (len=256): OSMUX seq=072 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=073 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=074 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=075 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={24.344242}, mono={0.920000}: OSMUX message (len=256): OSMUX seq=072 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=073 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=074 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=075 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.364242}, mono={0.940000}: clock_override_add sys={24.364242}, mono={0.940000}: OSMUX message (len=106): OSMUX seq=076 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=077 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=078 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=079 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.384242}, mono={0.960000}: clock_override_add @@ -81,8 +81,8 @@ sys={24.444242}, mono={1.020000}: clock_override_add sys={24.464242}, mono={1.040000}: clock_override_add sys={24.484242}, mono={1.060000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.484242}, mono={1.060000}: OSMUX message (len=256): OSMUX seq=084 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=085 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=086 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=087 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={24.484242}, mono={1.060000}: OSMUX message (len=256): OSMUX seq=084 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=085 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=086 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=087 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.504242}, mono={1.080000}: clock_override_add sys={24.504242}, mono={1.080000}: OSMUX message (len=106): OSMUX seq=088 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=089 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=090 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=091 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.524242}, mono={1.100000}: clock_override_add @@ -92,8 +92,8 @@ sys={24.584242}, mono={1.160000}: clock_override_add sys={24.604242}, mono={1.180000}: clock_override_add sys={24.624242}, mono={1.200000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.624242}, mono={1.200000}: OSMUX message (len=256): OSMUX seq=096 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=097 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=098 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=099 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX Batch is full for RTP sssrc=1644169479 +sys={24.624242}, mono={1.200000}: OSMUX message (len=256): OSMUX seq=096 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=097 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=098 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=099 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.644242}, mono={1.220000}: clock_override_add sys={24.644242}, mono={1.220000}: OSMUX message (len=106): OSMUX seq=100 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=101 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=102 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=103 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={24.664242}, mono={1.240000}: clock_override_add @@ -358,14 +358,14 @@ sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9411 timestamp=1681733257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9412 timestamp=1681733417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9413 timestamp=1681733577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX initialized osmux input converter -sys={26.704242}, mono={3.280000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16396 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX initialized osmux input converter +sys={26.704242}, mono={3.280000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16396 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16397 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16398 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.704242}, mono={3.280000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16399 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.704242}, mono={3.280000}: OSMUX message (len=242): OSMUX seq=000 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=001 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.704242}, mono={3.280000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16399 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.704242}, mono={3.280000}: OSMUX message (len=242): OSMUX seq=000 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=001 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=1 ext=0 csrc_count=0 sequence=9414 timestamp=1681733737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9415 timestamp=1681733897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9416 timestamp=1681734057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -376,10 +376,10 @@ sys={26.744242}, mono={3.320000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16400 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.744242}, mono={3.320000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16401 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.744242}, mono={3.320000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16402 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.744242}, mono={3.320000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16403 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.744242}, mono={3.320000}: OSMUX message (len=242): OSMUX seq=002 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=003 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.744242}, mono={3.320000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16403 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.744242}, mono={3.320000}: OSMUX message (len=242): OSMUX seq=002 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=003 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.744242}, mono={3.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9419 timestamp=1681734537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.744242}, mono={3.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9420 timestamp=1681734697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.744242}, mono={3.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9421 timestamp=1681734857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -391,10 +391,10 @@ sys={26.784242}, mono={3.360000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16404 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.784242}, mono={3.360000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16405 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.784242}, mono={3.360000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16406 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.784242}, mono={3.360000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16407 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.784242}, mono={3.360000}: OSMUX message (len=242): OSMUX seq=004 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=005 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.784242}, mono={3.360000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16407 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.784242}, mono={3.360000}: OSMUX message (len=242): OSMUX seq=004 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=005 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.784242}, mono={3.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9425 timestamp=1681735497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.784242}, mono={3.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9426 timestamp=1681735657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.784242}, mono={3.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9427 timestamp=1681735817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -406,10 +406,10 @@ sys={26.824242}, mono={3.400000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16408 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.824242}, mono={3.400000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16409 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.824242}, mono={3.400000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16410 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.824242}, mono={3.400000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16411 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.824242}, mono={3.400000}: OSMUX message (len=242): OSMUX seq=006 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=007 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.824242}, mono={3.400000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16411 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.824242}, mono={3.400000}: OSMUX message (len=242): OSMUX seq=006 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=007 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.824242}, mono={3.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9431 timestamp=1681736457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.824242}, mono={3.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9432 timestamp=1681736617 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.824242}, mono={3.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9433 timestamp=1681736777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -421,10 +421,10 @@ sys={26.864242}, mono={3.440000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16412 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.864242}, mono={3.440000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16413 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.864242}, mono={3.440000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16414 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.864242}, mono={3.440000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16415 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.864242}, mono={3.440000}: OSMUX message (len=242): OSMUX seq=008 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=009 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.864242}, mono={3.440000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16415 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.864242}, mono={3.440000}: OSMUX message (len=242): OSMUX seq=008 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=009 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.864242}, mono={3.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9437 timestamp=1681737417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.864242}, mono={3.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9438 timestamp=1681737577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.864242}, mono={3.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9439 timestamp=1681737737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -436,10 +436,10 @@ sys={26.904242}, mono={3.480000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16416 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.904242}, mono={3.480000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16417 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.904242}, mono={3.480000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16418 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.904242}, mono={3.480000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16419 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.904242}, mono={3.480000}: OSMUX message (len=242): OSMUX seq=010 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=011 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.904242}, mono={3.480000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16419 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.904242}, mono={3.480000}: OSMUX message (len=242): OSMUX seq=010 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=011 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.904242}, mono={3.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9443 timestamp=1681738377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.904242}, mono={3.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9444 timestamp=1681738537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.904242}, mono={3.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9445 timestamp=1681738697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -451,10 +451,10 @@ sys={26.944242}, mono={3.520000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16420 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.944242}, mono={3.520000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16421 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.944242}, mono={3.520000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16422 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.944242}, mono={3.520000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16423 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.944242}, mono={3.520000}: OSMUX message (len=242): OSMUX seq=012 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=013 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.944242}, mono={3.520000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16423 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.944242}, mono={3.520000}: OSMUX message (len=242): OSMUX seq=012 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=013 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.944242}, mono={3.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9449 timestamp=1681739337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.944242}, mono={3.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9450 timestamp=1681739497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.944242}, mono={3.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9451 timestamp=1681739657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -466,10 +466,10 @@ sys={26.984242}, mono={3.560000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16424 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.984242}, mono={3.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16425 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.984242}, mono={3.560000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16426 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.984242}, mono={3.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16427 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={26.984242}, mono={3.560000}: OSMUX message (len=242): OSMUX seq=014 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=015 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={26.984242}, mono={3.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16427 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={26.984242}, mono={3.560000}: OSMUX message (len=242): OSMUX seq=014 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=015 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={26.984242}, mono={3.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9455 timestamp=1681740297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.984242}, mono={3.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9456 timestamp=1681740457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={26.984242}, mono={3.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9457 timestamp=1681740617 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -481,10 +481,10 @@ sys={27.024242}, mono={3.600000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16428 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.024242}, mono={3.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16429 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.024242}, mono={3.600000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16430 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.024242}, mono={3.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16431 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.024242}, mono={3.600000}: OSMUX message (len=242): OSMUX seq=016 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=017 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.024242}, mono={3.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16431 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.024242}, mono={3.600000}: OSMUX message (len=242): OSMUX seq=016 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=017 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.024242}, mono={3.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9461 timestamp=1681741257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.024242}, mono={3.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9462 timestamp=1681741417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.024242}, mono={3.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9463 timestamp=1681741577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -496,10 +496,10 @@ sys={27.064242}, mono={3.640000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16432 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.064242}, mono={3.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16433 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.064242}, mono={3.640000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16434 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.064242}, mono={3.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16435 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.064242}, mono={3.640000}: OSMUX message (len=242): OSMUX seq=018 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=019 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.064242}, mono={3.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16435 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.064242}, mono={3.640000}: OSMUX message (len=242): OSMUX seq=018 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=019 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.064242}, mono={3.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9467 timestamp=1681742217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.064242}, mono={3.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9468 timestamp=1681742377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.064242}, mono={3.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9469 timestamp=1681742537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -511,10 +511,10 @@ sys={27.104242}, mono={3.680000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16436 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.104242}, mono={3.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16437 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.104242}, mono={3.680000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16438 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.104242}, mono={3.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16439 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.104242}, mono={3.680000}: OSMUX message (len=242): OSMUX seq=020 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=021 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.104242}, mono={3.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16439 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.104242}, mono={3.680000}: OSMUX message (len=242): OSMUX seq=020 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=021 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.104242}, mono={3.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9473 timestamp=1681743177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.104242}, mono={3.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9474 timestamp=1681743337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.104242}, mono={3.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9475 timestamp=1681743497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -526,10 +526,10 @@ sys={27.144242}, mono={3.720000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16440 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.144242}, mono={3.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16441 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.144242}, mono={3.720000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16442 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.144242}, mono={3.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16443 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.144242}, mono={3.720000}: OSMUX message (len=242): OSMUX seq=022 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=023 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.144242}, mono={3.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16443 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.144242}, mono={3.720000}: OSMUX message (len=242): OSMUX seq=022 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=023 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.144242}, mono={3.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9479 timestamp=1681744137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.144242}, mono={3.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9480 timestamp=1681744297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.144242}, mono={3.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9481 timestamp=1681744457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -541,10 +541,10 @@ sys={27.184242}, mono={3.760000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16444 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.184242}, mono={3.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16445 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.184242}, mono={3.760000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16446 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.184242}, mono={3.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16447 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.184242}, mono={3.760000}: OSMUX message (len=242): OSMUX seq=024 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=025 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.184242}, mono={3.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16447 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.184242}, mono={3.760000}: OSMUX message (len=242): OSMUX seq=024 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=025 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.184242}, mono={3.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9485 timestamp=1681745097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.184242}, mono={3.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9486 timestamp=1681745257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.184242}, mono={3.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9487 timestamp=1681745417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -556,10 +556,10 @@ sys={27.224242}, mono={3.800000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16448 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.224242}, mono={3.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16449 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.224242}, mono={3.800000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16450 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.224242}, mono={3.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16451 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.224242}, mono={3.800000}: OSMUX message (len=242): OSMUX seq=026 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=027 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.224242}, mono={3.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16451 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.224242}, mono={3.800000}: OSMUX message (len=242): OSMUX seq=026 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=027 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.224242}, mono={3.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9491 timestamp=1681746057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.224242}, mono={3.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9492 timestamp=1681746217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.224242}, mono={3.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9493 timestamp=1681746377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -571,10 +571,10 @@ sys={27.264242}, mono={3.840000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16452 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.264242}, mono={3.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16453 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.264242}, mono={3.840000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16454 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.264242}, mono={3.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16455 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.264242}, mono={3.840000}: OSMUX message (len=242): OSMUX seq=028 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=029 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.264242}, mono={3.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16455 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.264242}, mono={3.840000}: OSMUX message (len=242): OSMUX seq=028 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=029 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.264242}, mono={3.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9497 timestamp=1681747017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.264242}, mono={3.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9498 timestamp=1681747177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.264242}, mono={3.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9499 timestamp=1681747337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -586,10 +586,10 @@ sys={27.304242}, mono={3.880000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16456 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.304242}, mono={3.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16457 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.304242}, mono={3.880000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16458 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.304242}, mono={3.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16459 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.304242}, mono={3.880000}: OSMUX message (len=242): OSMUX seq=030 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=031 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 +DLMUX adding cloned RTP +sys={27.304242}, mono={3.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16459 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.304242}, mono={3.880000}: OSMUX message (len=242): OSMUX seq=030 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=031 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=000 ccid=002 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00, OSMUX seq=000 ccid=003 ft=2 ctr=3 amr_f=0 amr_q=0 amr_ft=03 amr_cmr=00 sys={27.304242}, mono={3.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9503 timestamp=1681747977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.304242}, mono={3.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9504 timestamp=1681748137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.304242}, mono={3.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9505 timestamp=1681748297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -601,10 +601,10 @@ sys={27.344242}, mono={3.920000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16460 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.344242}, mono={3.920000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16461 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.344242}, mono={3.920000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16462 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.344242}, mono={3.920000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16463 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.344242}, mono={3.920000}: OSMUX message (len=98): OSMUX seq=032 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=033 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.344242}, mono={3.920000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16463 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.344242}, mono={3.920000}: OSMUX message (len=98): OSMUX seq=032 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=033 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.344242}, mono={3.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9509 timestamp=1681748937 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.344242}, mono={3.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=1 ext=0 csrc_count=0 sequence=9510 timestamp=1681749097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.344242}, mono={3.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9511 timestamp=1681749257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -616,10 +616,10 @@ sys={27.384242}, mono={3.960000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16464 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.384242}, mono={3.960000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16465 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.384242}, mono={3.960000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16466 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.384242}, mono={3.960000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16467 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.384242}, mono={3.960000}: OSMUX message (len=98): OSMUX seq=034 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=035 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.384242}, mono={3.960000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16467 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.384242}, mono={3.960000}: OSMUX message (len=98): OSMUX seq=034 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=035 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.384242}, mono={3.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9515 timestamp=1681749897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.384242}, mono={3.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9516 timestamp=1681750057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.384242}, mono={3.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9517 timestamp=1681750217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -631,10 +631,10 @@ sys={27.424242}, mono={4.000000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16468 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.424242}, mono={4.000000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16469 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.424242}, mono={4.000000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16470 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.424242}, mono={4.000000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16471 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.424242}, mono={4.000000}: OSMUX message (len=98): OSMUX seq=036 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=037 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.424242}, mono={4.000000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16471 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.424242}, mono={4.000000}: OSMUX message (len=98): OSMUX seq=036 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=037 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.424242}, mono={4.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9521 timestamp=1681750857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.424242}, mono={4.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9522 timestamp=1681751017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.424242}, mono={4.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9523 timestamp=1681751177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -646,10 +646,10 @@ sys={27.464242}, mono={4.040000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16472 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.464242}, mono={4.040000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16473 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.464242}, mono={4.040000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16474 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.464242}, mono={4.040000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16475 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.464242}, mono={4.040000}: OSMUX message (len=98): OSMUX seq=038 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=039 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.464242}, mono={4.040000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16475 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.464242}, mono={4.040000}: OSMUX message (len=98): OSMUX seq=038 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=039 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.464242}, mono={4.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9527 timestamp=1681751817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.464242}, mono={4.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9528 timestamp=1681751977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.464242}, mono={4.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9529 timestamp=1681752137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -661,10 +661,10 @@ sys={27.504242}, mono={4.080000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16476 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.504242}, mono={4.080000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16477 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.504242}, mono={4.080000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16478 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.504242}, mono={4.080000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16479 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.504242}, mono={4.080000}: OSMUX message (len=98): OSMUX seq=040 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=041 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.504242}, mono={4.080000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16479 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.504242}, mono={4.080000}: OSMUX message (len=98): OSMUX seq=040 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=041 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.504242}, mono={4.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9533 timestamp=1681752777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.504242}, mono={4.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9534 timestamp=1681752937 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.504242}, mono={4.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9535 timestamp=1681753097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -676,10 +676,10 @@ sys={27.544242}, mono={4.120000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16480 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.544242}, mono={4.120000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16481 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.544242}, mono={4.120000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16482 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.544242}, mono={4.120000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16483 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.544242}, mono={4.120000}: OSMUX message (len=98): OSMUX seq=042 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=043 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.544242}, mono={4.120000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16483 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.544242}, mono={4.120000}: OSMUX message (len=98): OSMUX seq=042 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=043 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.544242}, mono={4.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9539 timestamp=1681753737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.544242}, mono={4.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9540 timestamp=1681753897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.544242}, mono={4.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9541 timestamp=1681754057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -691,10 +691,10 @@ sys={27.584242}, mono={4.160000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16484 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.584242}, mono={4.160000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16485 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.584242}, mono={4.160000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16486 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.584242}, mono={4.160000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16487 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.584242}, mono={4.160000}: OSMUX message (len=98): OSMUX seq=044 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=045 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.584242}, mono={4.160000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16487 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.584242}, mono={4.160000}: OSMUX message (len=98): OSMUX seq=044 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=045 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.584242}, mono={4.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9545 timestamp=1681754697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.584242}, mono={4.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9546 timestamp=1681754857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.584242}, mono={4.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9547 timestamp=1681755017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -706,10 +706,10 @@ sys={27.624242}, mono={4.200000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16488 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.624242}, mono={4.200000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16489 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.624242}, mono={4.200000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16490 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.624242}, mono={4.200000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16491 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.624242}, mono={4.200000}: OSMUX message (len=98): OSMUX seq=046 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=047 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.624242}, mono={4.200000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16491 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.624242}, mono={4.200000}: OSMUX message (len=98): OSMUX seq=046 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=047 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.624242}, mono={4.200000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9551 timestamp=1681755657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.624242}, mono={4.200000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9552 timestamp=1681755817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.624242}, mono={4.200000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9553 timestamp=1681755977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -721,10 +721,10 @@ sys={27.664242}, mono={4.240000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16492 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.664242}, mono={4.240000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16493 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.664242}, mono={4.240000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16494 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.664242}, mono={4.240000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16495 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.664242}, mono={4.240000}: OSMUX message (len=98): OSMUX seq=048 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=049 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.664242}, mono={4.240000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16495 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.664242}, mono={4.240000}: OSMUX message (len=98): OSMUX seq=048 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=049 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.664242}, mono={4.240000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9557 timestamp=1681756617 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.664242}, mono={4.240000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9558 timestamp=1681756777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.664242}, mono={4.240000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9559 timestamp=1681756937 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -736,10 +736,10 @@ sys={27.704242}, mono={4.280000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16496 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.704242}, mono={4.280000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16497 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.704242}, mono={4.280000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16498 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.704242}, mono={4.280000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16499 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.704242}, mono={4.280000}: OSMUX message (len=98): OSMUX seq=050 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=051 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.704242}, mono={4.280000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16499 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.704242}, mono={4.280000}: OSMUX message (len=98): OSMUX seq=050 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=051 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.704242}, mono={4.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9563 timestamp=1681757577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.704242}, mono={4.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9564 timestamp=1681757737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.704242}, mono={4.280000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9565 timestamp=1681757897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -751,10 +751,10 @@ sys={27.744242}, mono={4.320000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16500 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.744242}, mono={4.320000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16501 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.744242}, mono={4.320000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16502 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.744242}, mono={4.320000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16503 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.744242}, mono={4.320000}: OSMUX message (len=98): OSMUX seq=052 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=053 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.744242}, mono={4.320000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16503 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.744242}, mono={4.320000}: OSMUX message (len=98): OSMUX seq=052 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=053 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.744242}, mono={4.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9569 timestamp=1681758537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.744242}, mono={4.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9570 timestamp=1681758697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.744242}, mono={4.320000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9571 timestamp=1681758857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -766,10 +766,10 @@ sys={27.784242}, mono={4.360000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16504 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.784242}, mono={4.360000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16505 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.784242}, mono={4.360000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16506 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.784242}, mono={4.360000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16507 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.784242}, mono={4.360000}: OSMUX message (len=98): OSMUX seq=054 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=055 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.784242}, mono={4.360000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16507 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.784242}, mono={4.360000}: OSMUX message (len=98): OSMUX seq=054 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=055 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.784242}, mono={4.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9575 timestamp=1681759497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.784242}, mono={4.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9576 timestamp=1681759657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.784242}, mono={4.360000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9577 timestamp=1681759817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -781,10 +781,10 @@ sys={27.824242}, mono={4.400000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16508 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.824242}, mono={4.400000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16509 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.824242}, mono={4.400000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16510 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.824242}, mono={4.400000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16511 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.824242}, mono={4.400000}: OSMUX message (len=98): OSMUX seq=056 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=057 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.824242}, mono={4.400000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16511 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.824242}, mono={4.400000}: OSMUX message (len=98): OSMUX seq=056 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=057 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.824242}, mono={4.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9581 timestamp=1681760457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.824242}, mono={4.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9582 timestamp=1681760617 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.824242}, mono={4.400000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9583 timestamp=1681760777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -796,10 +796,10 @@ sys={27.864242}, mono={4.440000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16512 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.864242}, mono={4.440000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16513 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.864242}, mono={4.440000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16514 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.864242}, mono={4.440000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16515 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.864242}, mono={4.440000}: OSMUX message (len=98): OSMUX seq=058 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=059 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.864242}, mono={4.440000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16515 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.864242}, mono={4.440000}: OSMUX message (len=98): OSMUX seq=058 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=059 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.864242}, mono={4.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9587 timestamp=1681761417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.864242}, mono={4.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9588 timestamp=1681761577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.864242}, mono={4.440000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9589 timestamp=1681761737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -811,10 +811,10 @@ sys={27.904242}, mono={4.480000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16516 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.904242}, mono={4.480000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16517 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.904242}, mono={4.480000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16518 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.904242}, mono={4.480000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16519 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.904242}, mono={4.480000}: OSMUX message (len=98): OSMUX seq=060 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=061 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.904242}, mono={4.480000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16519 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.904242}, mono={4.480000}: OSMUX message (len=98): OSMUX seq=060 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=061 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.904242}, mono={4.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9593 timestamp=1681762377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.904242}, mono={4.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9594 timestamp=1681762537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.904242}, mono={4.480000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9595 timestamp=1681762697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -826,10 +826,10 @@ sys={27.944242}, mono={4.520000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16520 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.944242}, mono={4.520000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16521 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.944242}, mono={4.520000}: adding to ccid=3 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16522 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.944242}, mono={4.520000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16523 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.944242}, mono={4.520000}: OSMUX message (len=98): OSMUX seq=062 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=063 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.944242}, mono={4.520000}: adding to ccid=2 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16523 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.944242}, mono={4.520000}: OSMUX message (len=98): OSMUX seq=062 ccid=002 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=063 ccid=003 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.944242}, mono={4.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9599 timestamp=1681763337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.944242}, mono={4.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9600 timestamp=1681763497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.944242}, mono={4.520000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9601 timestamp=1681763657 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -841,10 +841,10 @@ sys={27.984242}, mono={4.560000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16524 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.984242}, mono={4.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=1 ext=0 csrc_count=0 sequence=16525 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.984242}, mono={4.560000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16526 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.984242}, mono={4.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16527 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={27.984242}, mono={4.560000}: OSMUX message (len=98): OSMUX seq=064 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=065 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.984242}, mono={4.560000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16527 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={27.984242}, mono={4.560000}: OSMUX message (len=98): OSMUX seq=064 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=065 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.984242}, mono={4.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9605 timestamp=1681764297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.984242}, mono={4.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=1 ext=0 csrc_count=0 sequence=9606 timestamp=1681764457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={27.984242}, mono={4.560000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9607 timestamp=1681764617 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -856,10 +856,10 @@ sys={28.024242}, mono={4.600000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16528 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.024242}, mono={4.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16529 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.024242}, mono={4.600000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16530 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.024242}, mono={4.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16531 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.024242}, mono={4.600000}: OSMUX message (len=98): OSMUX seq=066 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=067 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.024242}, mono={4.600000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16531 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.024242}, mono={4.600000}: OSMUX message (len=98): OSMUX seq=066 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=067 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.024242}, mono={4.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9611 timestamp=1681765257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.024242}, mono={4.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9612 timestamp=1681765417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.024242}, mono={4.600000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9613 timestamp=1681765577 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -871,10 +871,10 @@ sys={28.064242}, mono={4.640000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16532 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.064242}, mono={4.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16533 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.064242}, mono={4.640000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16534 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.064242}, mono={4.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16535 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.064242}, mono={4.640000}: OSMUX message (len=98): OSMUX seq=068 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=069 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.064242}, mono={4.640000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16535 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.064242}, mono={4.640000}: OSMUX message (len=98): OSMUX seq=068 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=069 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.064242}, mono={4.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9617 timestamp=1681766217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.064242}, mono={4.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9618 timestamp=1681766377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.064242}, mono={4.640000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9619 timestamp=1681766537 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -886,10 +886,10 @@ sys={28.104242}, mono={4.680000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16536 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.104242}, mono={4.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16537 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.104242}, mono={4.680000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16538 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.104242}, mono={4.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16539 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.104242}, mono={4.680000}: OSMUX message (len=98): OSMUX seq=070 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=071 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.104242}, mono={4.680000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16539 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.104242}, mono={4.680000}: OSMUX message (len=98): OSMUX seq=070 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=071 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.104242}, mono={4.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9623 timestamp=1681767177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.104242}, mono={4.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9624 timestamp=1681767337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.104242}, mono={4.680000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9625 timestamp=1681767497 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -901,10 +901,10 @@ sys={28.144242}, mono={4.720000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16540 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.144242}, mono={4.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16541 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.144242}, mono={4.720000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16542 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.144242}, mono={4.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16543 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.144242}, mono={4.720000}: OSMUX message (len=98): OSMUX seq=072 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=073 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.144242}, mono={4.720000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16543 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.144242}, mono={4.720000}: OSMUX message (len=98): OSMUX seq=072 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=073 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.144242}, mono={4.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9629 timestamp=1681768137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.144242}, mono={4.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9630 timestamp=1681768297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.144242}, mono={4.720000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9631 timestamp=1681768457 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -916,10 +916,10 @@ sys={28.184242}, mono={4.760000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16544 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.184242}, mono={4.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16545 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.184242}, mono={4.760000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16546 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.184242}, mono={4.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16547 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.184242}, mono={4.760000}: OSMUX message (len=98): OSMUX seq=074 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=075 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.184242}, mono={4.760000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16547 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.184242}, mono={4.760000}: OSMUX message (len=98): OSMUX seq=074 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=075 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.184242}, mono={4.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9635 timestamp=1681769097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.184242}, mono={4.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9636 timestamp=1681769257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.184242}, mono={4.760000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9637 timestamp=1681769417 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -931,10 +931,10 @@ sys={28.224242}, mono={4.800000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16548 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.224242}, mono={4.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16549 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.224242}, mono={4.800000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16550 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.224242}, mono={4.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16551 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.224242}, mono={4.800000}: OSMUX message (len=98): OSMUX seq=076 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=077 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.224242}, mono={4.800000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16551 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.224242}, mono={4.800000}: OSMUX message (len=98): OSMUX seq=076 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=077 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.224242}, mono={4.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9641 timestamp=1681770057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.224242}, mono={4.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9642 timestamp=1681770217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.224242}, mono={4.800000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9643 timestamp=1681770377 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -946,10 +946,10 @@ sys={28.264242}, mono={4.840000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16552 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.264242}, mono={4.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16553 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.264242}, mono={4.840000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16554 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.264242}, mono={4.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16555 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.264242}, mono={4.840000}: OSMUX message (len=98): OSMUX seq=078 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=079 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.264242}, mono={4.840000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16555 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.264242}, mono={4.840000}: OSMUX message (len=98): OSMUX seq=078 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=079 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.264242}, mono={4.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9647 timestamp=1681771017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.264242}, mono={4.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9648 timestamp=1681771177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.264242}, mono={4.840000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9649 timestamp=1681771337 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -961,10 +961,10 @@ sys={28.304242}, mono={4.880000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16556 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.304242}, mono={4.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16557 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.304242}, mono={4.880000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16558 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.304242}, mono={4.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16559 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.304242}, mono={4.880000}: OSMUX message (len=98): OSMUX seq=080 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=081 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.304242}, mono={4.880000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16559 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.304242}, mono={4.880000}: OSMUX message (len=98): OSMUX seq=080 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=081 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.304242}, mono={4.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9653 timestamp=1681771977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.304242}, mono={4.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9654 timestamp=1681772137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.304242}, mono={4.880000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9655 timestamp=1681772297 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -976,10 +976,10 @@ sys={28.344242}, mono={4.920000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16560 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.344242}, mono={4.920000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16561 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.344242}, mono={4.920000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16562 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.344242}, mono={4.920000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16563 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.344242}, mono={4.920000}: OSMUX message (len=98): OSMUX seq=082 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=083 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.344242}, mono={4.920000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16563 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.344242}, mono={4.920000}: OSMUX message (len=98): OSMUX seq=082 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=083 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.344242}, mono={4.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9659 timestamp=1681772937 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.344242}, mono={4.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9660 timestamp=1681773097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.344242}, mono={4.920000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9661 timestamp=1681773257 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -991,10 +991,10 @@ sys={28.384242}, mono={4.960000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16564 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.384242}, mono={4.960000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16565 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.384242}, mono={4.960000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16566 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.384242}, mono={4.960000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16567 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.384242}, mono={4.960000}: OSMUX message (len=98): OSMUX seq=084 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=085 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.384242}, mono={4.960000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16567 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.384242}, mono={4.960000}: OSMUX message (len=98): OSMUX seq=084 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=085 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.384242}, mono={4.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9665 timestamp=1681773897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.384242}, mono={4.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9666 timestamp=1681774057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.384242}, mono={4.960000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9667 timestamp=1681774217 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -1006,10 +1006,10 @@ sys={28.424242}, mono={5.000000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16568 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.424242}, mono={5.000000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16569 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.424242}, mono={5.000000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16570 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.424242}, mono={5.000000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16571 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.424242}, mono={5.000000}: OSMUX message (len=98): OSMUX seq=086 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=087 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.424242}, mono={5.000000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16571 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.424242}, mono={5.000000}: OSMUX message (len=98): OSMUX seq=086 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=087 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.424242}, mono={5.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9671 timestamp=1681774857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.424242}, mono={5.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9672 timestamp=1681775017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.424242}, mono={5.000000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9673 timestamp=1681775177 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -1021,10 +1021,10 @@ sys={28.464242}, mono={5.040000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16572 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.464242}, mono={5.040000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16573 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.464242}, mono={5.040000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16574 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.464242}, mono={5.040000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16575 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.464242}, mono={5.040000}: OSMUX message (len=98): OSMUX seq=088 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=089 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.464242}, mono={5.040000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16575 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.464242}, mono={5.040000}: OSMUX message (len=98): OSMUX seq=088 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=089 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.464242}, mono={5.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9677 timestamp=1681775817 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.464242}, mono={5.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9678 timestamp=1681775977 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.464242}, mono={5.040000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9679 timestamp=1681776137 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -1036,10 +1036,10 @@ sys={28.504242}, mono={5.080000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16576 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.504242}, mono={5.080000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16577 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.504242}, mono={5.080000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16578 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.504242}, mono={5.080000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16579 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.504242}, mono={5.080000}: OSMUX message (len=98): OSMUX seq=090 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=091 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.504242}, mono={5.080000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16579 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.504242}, mono={5.080000}: OSMUX message (len=98): OSMUX seq=090 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=091 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.504242}, mono={5.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9683 timestamp=1681776777 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.504242}, mono={5.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9684 timestamp=1681776937 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.504242}, mono={5.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9685 timestamp=1681777097 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -1051,10 +1051,10 @@ sys={28.544242}, mono={5.120000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16580 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.544242}, mono={5.120000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16581 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.544242}, mono={5.120000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16582 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.544242}, mono={5.120000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16583 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.544242}, mono={5.120000}: OSMUX message (len=98): OSMUX seq=092 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=093 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.544242}, mono={5.120000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16583 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.544242}, mono={5.120000}: OSMUX message (len=98): OSMUX seq=092 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=093 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.544242}, mono={5.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9689 timestamp=1681777737 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.544242}, mono={5.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9690 timestamp=1681777897 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.544242}, mono={5.120000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9691 timestamp=1681778057 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] @@ -1066,10 +1066,10 @@ sys={28.584242}, mono={5.160000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16584 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.584242}, mono={5.160000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16585 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.584242}, mono={5.160000}: adding to ccid=1 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16586 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.584242}, mono={5.160000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16587 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -DLMUX adding cloned RTP -sys={28.584242}, mono={5.160000}: OSMUX message (len=98): OSMUX seq=094 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=095 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.584242}, mono={5.160000}: adding to ccid=0 RTP ver=2 ssrc=118030434 type=98 marker=0 ext=0 csrc_count=0 sequence=16587 timestamp=108399 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] +DLMUX adding cloned RTP +sys={28.584242}, mono={5.160000}: OSMUX message (len=98): OSMUX seq=094 ccid=000 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ], OSMUX seq=095 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 [ ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.584242}, mono={5.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9695 timestamp=1681778697 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.584242}, mono={5.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9696 timestamp=1681778857 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] sys={28.584242}, mono={5.160000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=0 ext=0 csrc_count=0 sequence=9697 timestamp=1681779017 [20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/16106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I7b0c8d311123f4fa0aeedf3938c8628a4442daf7 Gerrit-Change-Number: 16106 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:18:02 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:18:02 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() In-Reply-To: References: Message-ID: Hello laforge, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15961 to look at the new patch set (#7). Change subject: add osmo_sockaddr_str_cmp() ...................................................................... add osmo_sockaddr_str_cmp() Currently planned user: for Distributed GSM in osmo-hlr: setting per-MSC service addresses in VTY: replace/remove existing entries. osmo_sockaddr_str_cmp() is useful to catch identical resulting IP addresses, regardless of differing strings (e.g. '0::' and '::' are equal but differ in strings). Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 --- M include/osmocom/core/sockaddr_str.h M include/osmocom/core/utils.h M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 5 files changed, 678 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/15961/7 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:18:02 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:18:02 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: Hello laforge, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/15957 to look at the new patch set (#8). Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... utils.h: add OSMO_NAME_C_IMPL() macro Provide a common implementation for foo_name_c() functions that base on foo_name_buf() functions. char *foo_name_c(void *ctx, example_t arg) { OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg) } Rationale: the most efficient way of composing strings that have optional parts or require loops for composition is by writing to a ready char[], and this in turn is easiest done by using OSMO_STRBUF_* API. Using such a basic name string implementation which typically returns a length, I often want a more convenient version that returns a char*, which can just be inlined in a "%s" string format -- crucially: skipping string composition when inlined in a LOGP(). This common implementation allows saving code dup, only the function signature is needed. Why not include the function signature in the macro? The two sets of varargs (1: signature args, 2: function call args) are hard to do. Also, having an explicit signature is good for readability and code grepping / ctags. Upcoming uses: in libosmocore in the mslookup (D-GSM) implementation (osmo_mslookup_result_name_c()), and in osmo_msc's codec negotiation implementation (sdp_audio_codecs_name_c(), sdp_msg_name_c(), ...). I54b6c0810f181259da307078977d9ef3d90458c9 (libosmocore) If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 (osmo-msc) Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 --- M include/osmocom/core/utils.h M tests/utils/utils_test.c M tests/utils/utils_test.ok 3 files changed, 154 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/15957/8 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:18:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:18:04 +0000 Subject: Change in libosmocore[master]: utils.c: fix various inaccurate API doc about return values References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16155 ) Change subject: utils.c: fix various inaccurate API doc about return values ...................................................................... utils.c: fix various inaccurate API doc about return values Change-Id: I9ee6416decd23f8d5d634197620a63ae408cead3 --- M src/utils.c 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/55/16155/1 diff --git a/src/utils.c b/src/utils.c index ea1de0f..6fc2ee6 100644 --- a/src/utils.c +++ b/src/utils.c @@ -280,7 +280,7 @@ * \param[out] buf_len size of buf in bytes * \param[in] bits A sequence of unpacked bits * \param[in] len Length of bits - * \returns string representation in static buffer. + * \return The output buffer (buf). */ char *osmo_ubit_dump_buf(char *buf, size_t buf_len, const uint8_t *bits, unsigned int len) { @@ -672,7 +672,7 @@ * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). - * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + * \return The output buffer (buf). */ char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) { @@ -763,7 +763,7 @@ * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length. - * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + * \return The output buffer (buf). */ char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) { @@ -808,7 +808,6 @@ } /*! Like osmo_quote_str_buf() but returns the result in a dynamically-allocated buffer. - * The static buffer is shared with get_value_string() and osmo_escape_str(). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length. * \returns dynamically-allocated buffer containing a quoted and escaped representation. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9ee6416decd23f8d5d634197620a63ae408cead3 Gerrit-Change-Number: 16155 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:18:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:18:04 +0000 Subject: Change in libosmocore[master]: logging.h: define ansi color constants References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16156 ) Change subject: logging.h: define ansi color constants ...................................................................... logging.h: define ansi color constants It's hard to figure out what color logging categories have with those ANSI color code strings. Instead, define these OSMO_LOGCOLOR_* constants. Naming: commonly, the logging.h header has the "LOG" prefix in the name, but it seems saner to include the OSMO_ prefix: it seems too likely that some libosmocore user somewhere already has defined "LOGCOLOR_RED" somewhere. Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a --- M include/osmocom/core/logging.h 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/16156/1 diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index 139d291..0846c1b 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -127,6 +127,24 @@ #define DLRSPRO -19 /*!< Osmocom Remote SIM Protocol */ #define OSMO_NUM_DLIB 19 /*!< Number of logging sub-systems in libraries */ +/* Colors that can be used in log_info_cat.color */ +#define OSMO_LOGCOLOR_NORMAL NULL +#define OSMO_LOGCOLOR_RED "\033[1;31m" +#define OSMO_LOGCOLOR_GREEN "\033[1;32m" +#define OSMO_LOGCOLOR_YELLOW "\033[1;33m" +#define OSMO_LOGCOLOR_BLUE "\033[1;34m" +#define OSMO_LOGCOLOR_PURPLE "\033[1;35m" +#define OSMO_LOGCOLOR_CYAN "\033[1;36m" +#define OSMO_LOGCOLOR_DARKRED "\033[31m" +#define OSMO_LOGCOLOR_DARKGREEN "\033[32m" +#define OSMO_LOGCOLOR_DARKYELLOW "\033[33m" +#define OSMO_LOGCOLOR_DARKBLUE "\033[34m" +#define OSMO_LOGCOLOR_DARKPURPLE "\033[35m" +#define OSMO_LOGCOLOR_DARKCYAN "\033[36m" +#define OSMO_LOGCOLOR_DARKGREY "\033[1;30m" +#define OSMO_LOGCOLOR_GREY "\033[37m" +#define OSMO_LOGCOLOR_BRIGHTWHITE "\033[1;37m" + /*! Configuration of single log category / sub-system */ struct log_category { uint8_t loglevel; /*!< configured log-level */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a Gerrit-Change-Number: 16156 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:18:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:18:04 +0000 Subject: Change in libosmocore[master]: fix DLSMS logging category color: '[1:38m' isn't actually defined References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16157 ) Change subject: fix DLSMS logging category color: '[1:38m' isn't actually defined ...................................................................... fix DLSMS logging category color: '[1:38m' isn't actually defined Instead it apparently renders as bright white, so just use that constant instead. Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2 --- M src/logging.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/16157/1 diff --git a/src/logging.c b/src/logging.c index b030f8a..1254869 100644 --- a/src/logging.c +++ b/src/logging.c @@ -163,7 +163,7 @@ .name = "DLSMS", .description = "Layer3 Short Message Service (SMS)", .enabled = 1, .loglevel = LOGL_NOTICE, - .color = "\033[1;38m", + .color = OSMO_LOGCOLOR_BRIGHTWHITE, }, [INT2IDX(DLCTRL)] = { .name = "DLCTRL", -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2 Gerrit-Change-Number: 16157 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:18:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:18:05 +0000 Subject: Change in libosmocore[master]: cosmetic: logging.h: fix comment s/levels/subsystems References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16158 ) Change subject: cosmetic: logging.h: fix comment s/levels/subsystems ...................................................................... cosmetic: logging.h: fix comment s/levels/subsystems Change-Id: I242a4a44649bc4dac055985ba8fd63b2f784ee6d --- M include/osmocom/core/logging.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/58/16158/1 diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index 0846c1b..aab4c56 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -105,7 +105,7 @@ #define LOGL_ERROR 7 /*!< error condition, requires user action */ #define LOGL_FATAL 8 /*!< fatal, program aborted */ -/* logging levels defined by the library itself */ +/* logging subsystems defined by the library itself */ #define DLGLOBAL -1 /*!< global logging */ #define DLLAPD -2 /*!< LAPD implementation */ #define DLINP -3 /*!< (A-bis) Input sub-system */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I242a4a44649bc4dac055985ba8fd63b2f784ee6d Gerrit-Change-Number: 16158 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:18:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:18:05 +0000 Subject: Change in libosmocore[master]: fix osmo_escape_str_c() and osmo_quote_str_c() References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16159 ) Change subject: fix osmo_escape_str_c() and osmo_quote_str_c() ...................................................................... fix osmo_escape_str_c() and osmo_quote_str_c() The osmo_escape_str_c() and osmo_quote_str_c() functions return truncated results when characters need escaping. For example: osmo_quote_str_c(NULL, "foo"); --> "foo" osmo_quote_str_c(NULL, "foo\n"); --> "foo\n osmo_quote_str_c(NULL, "foo\tbar\t\n"); --> "foo\tbar\t Implement these _c variants using OSMO_NAME_C_IMPL() to always allocate sufficient memory. However, current osmo_escape_str_buf2() and osmo_quote_str_buf2() fail to return the required buffer size (even though that information is readily avaiable), so these don't qualify for accurate use of OSMO_NAME_C_IMPL(). Hence, move the implementations of osmo_escape_str and osmo_quote_str to an internal static function that returns the characters needed, so that all dynamically allocating implementations can return un-truncated results. Of course, external callers would also benefit from escape/quote API that accurately returns the amount of characters needed, but I am not changing public API in this patch, on purpose, ... yet. Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8 --- M src/utils.c 1 file changed, 49 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/16159/1 diff --git a/src/utils.c b/src/utils.c index 6fc2ee6..904f6e4 100644 --- a/src/utils.c +++ b/src/utils.c @@ -668,13 +668,15 @@ } /*! Return the string with all non-printable characters escaped. + * This internal function is the implementation for all osmo_escape_str* and osmo_quote_str* API versions. + * It provides a return value of characters-needed, to allow producing un-truncated strings in all cases. * \param[out] buf string buffer to write escaped characters to. * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). - * \return The output buffer (buf). + * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). */ -char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) +static size_t _osmo_escape_str_buf(char *buf, size_t bufsize, const char *str, int in_len) { struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; int in_pos = 0; @@ -729,6 +731,19 @@ } done: + return sb.chars_needed; +} + +/*! Return the string with all non-printable characters escaped. + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \return The output buffer (buf). + */ +char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) +{ + _osmo_escape_str_buf(buf, bufsize, str, in_len); return buf; } @@ -750,10 +765,31 @@ */ char *osmo_escape_str_c(const void *ctx, const char *str, int in_len) { - char *buf = talloc_size(ctx, in_len+1); - if (!buf) - return NULL; - return osmo_escape_str_buf2(buf, in_len+1, str, in_len); + /* The string will be at least as long as in_len, but some characters might need escaping. + * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_escape_str_buf, str, in_len); +} + +/*! Return a quoted and escaped representation of the string. + * This internal function is the implementation for all osmo_quote_str* API versions. + * It provides a return value of characters-needed, to allow producing un-truncated strings in all cases. + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + */ +static size_t _osmo_quote_str_buf(char *buf, size_t bufsize, const char *str, int in_len) +{ + struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; + if (!str) + OSMO_STRBUF_PRINTF(sb, "NULL"); + else { + OSMO_STRBUF_PRINTF(sb, "\""); + OSMO_STRBUF_APPEND(sb, _osmo_escape_str_buf, str, in_len); + OSMO_STRBUF_PRINTF(sb, "\""); + } + return sb.chars_needed; } /*! Like osmo_escape_str_buf2(), but returns double-quotes around a string, or "NULL" for a NULL string. @@ -767,14 +803,7 @@ */ char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) { - struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; - if (!str) - OSMO_STRBUF_PRINTF(sb, "NULL"); - else { - OSMO_STRBUF_PRINTF(sb, "\""); - OSMO_STRBUF_APPEND_NOLEN(sb, osmo_escape_str_buf2, str, in_len); - OSMO_STRBUF_PRINTF(sb, "\""); - } + _osmo_quote_str_buf(buf, bufsize, str, in_len); return buf; } @@ -792,7 +821,7 @@ return "NULL"; if (!buf || !bufsize) return "(error)"; - osmo_quote_str_buf2(buf, bufsize, str, in_len); + _osmo_quote_str_buf(buf, bufsize, str, in_len); return buf; } @@ -804,7 +833,8 @@ */ const char *osmo_quote_str(const char *str, int in_len) { - return osmo_quote_str_buf(str, in_len, namebuf, sizeof(namebuf)); + _osmo_quote_str_buf(namebuf, sizeof(namebuf), str, in_len); + return namebuf; } /*! Like osmo_quote_str_buf() but returns the result in a dynamically-allocated buffer. @@ -814,21 +844,9 @@ */ char *osmo_quote_str_c(const void *ctx, const char *str, int in_len) { - size_t len = in_len == -1 ? strlen(str) : in_len; - char *buf; - - /* account for two quote characters + terminating NUL */ - len += 3; - - /* some minimum length for things like "NULL" or "(error)" */ - if (len < 32) - len = 32; - - buf = talloc_size(ctx, len); - if (!buf) - return NULL; - - return osmo_quote_str_buf2(buf, len, str, in_len); + /* The string will be at least as long as in_len, but some characters might need escaping. + * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_quote_str_buf, str, in_len); } /*! perform an integer square root operation on unsigned 32bit integer. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8 Gerrit-Change-Number: 16159 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:18:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:18:05 +0000 Subject: Change in libosmocore[master]: add osmo_escape_c_str and osmo_quote_c_str References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16160 ) Change subject: add osmo_escape_c_str and osmo_quote_c_str ...................................................................... add osmo_escape_c_str and osmo_quote_c_str Provide string escaping that - returns the required buffer size, so it can be used with OSMO_STRBUF_APPEND(). - uses C compatible string constant escaping sequences. This is intended as a replacement for all previous osmo_escape_str* and osmo_quote_str* API. It pains me that I didn't get them right the first nor the second time: - The buffer functions do not return the chars needed, which is required for allocating sufficient memory in the *_c versions of the functions. - Because of that, these functions are accurately usable for OSMO_STRBUF_APPEND(), producing truncated strings, for example when dumping a GSUP message. - They do not use the C equivalent string constant escaping: for some reason I thought "\15" would be valid, but it should be "\x0f". If I could, I would completely drop those mislead implementations ... but backwards compat prohibits that. A previous patch already provided internal static functions that accurately return the required buffer size. Enhance these to also support C compatible string escaping, and use them as implementation of the new functions: osmo_escape_cstr_buf() osmo_escape_cstr_c() osmo_quote_cstr_buf() osmo_quote_cstr_c() In the tests for these, also test C string equivalence. Naming: from API versions, it would be kind of logical to call them osmo_escape_str_buf3() and osmo_escape_str_c2(). Since these anyway return a different escaping, it makes sense to me to have distinct names instead. Quasi missing are variants of the non-C-compatible weird legacy escaping that return the required buffer size, but I refrain from adding those, because we have enough API cruft as it is. Just always use these new cstr variants. Change-Id: I3dfb892036e01000033dd8e7e4a6a0c32a3caa9b --- M include/osmocom/core/utils.h M src/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 4 files changed, 301 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/16160/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 86d45bc..4e7037a 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -147,6 +147,11 @@ bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars); void osmo_identifier_sanitize_buf(char *str, const char *sep_chars, char replace_with); +size_t osmo_escape_cstr_buf(char *buf, size_t bufsize, const char *str, int in_len); +char *osmo_escape_cstr_c(void *ctx, const char *str, int in_len); +size_t osmo_quote_cstr_buf(char *buf, size_t bufsize, const char *str, int in_len); +char *osmo_quote_cstr_c(void *ctx, const char *str, int in_len); + const char *osmo_escape_str(const char *str, int len); char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len); const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t bufsize); diff --git a/src/utils.c b/src/utils.c index 904f6e4..8dfa7ec 100644 --- a/src/utils.c +++ b/src/utils.c @@ -669,14 +669,18 @@ /*! Return the string with all non-printable characters escaped. * This internal function is the implementation for all osmo_escape_str* and osmo_quote_str* API versions. - * It provides a return value of characters-needed, to allow producing un-truncated strings in all cases. + * It provides both the legacy (non C compatible) escaping, as well as C compatible string constant syntax, + * and it provides a return value of characters-needed, to allow producing un-truncated strings in all cases. * \param[out] buf string buffer to write escaped characters to. * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \param[in] legacy_format If false, return C compatible string constants ("\x0f"), if true the legacy + * escaping format ("\15"). The legacy format also escapes as "\a\b\f\v", while + * the non-legacy format also escapes those as "\xNN" sequences. * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). */ -static size_t _osmo_escape_str_buf(char *buf, size_t bufsize, const char *str, int in_len) +static size_t _osmo_escape_str_buf(char *buf, size_t bufsize, const char *str, int in_len, bool legacy_format) { struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; int in_pos = 0; @@ -715,19 +719,28 @@ BACKSLASH_CASE('\r', 'r'); BACKSLASH_CASE('\t', 't'); BACKSLASH_CASE('\0', '0'); - BACKSLASH_CASE('\a', 'a'); - BACKSLASH_CASE('\b', 'b'); - BACKSLASH_CASE('\v', 'v'); - BACKSLASH_CASE('\f', 'f'); BACKSLASH_CASE('\\', '\\'); BACKSLASH_CASE('"', '"'); -#undef BACKSLASH_CASE default: - OSMO_STRBUF_PRINTF(sb, "\\%u", (unsigned char)str[in_pos]); + if (legacy_format) { + switch (str[next_unprintable]) { + BACKSLASH_CASE('\a', 'a'); + BACKSLASH_CASE('\b', 'b'); + BACKSLASH_CASE('\v', 'v'); + BACKSLASH_CASE('\f', 'f'); + default: + OSMO_STRBUF_PRINTF(sb, "\\%u", (unsigned char)str[in_pos]); + break; + } + break; + } + + OSMO_STRBUF_PRINTF(sb, "\\x%02x", (unsigned char)str[in_pos]); break; } in_pos ++; +#undef BACKSLASH_CASE } done: @@ -743,7 +756,7 @@ */ char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) { - _osmo_escape_str_buf(buf, bufsize, str, in_len); + _osmo_escape_str_buf(buf, bufsize, str, in_len, true); return buf; } @@ -767,26 +780,30 @@ { /* The string will be at least as long as in_len, but some characters might need escaping. * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ - OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_escape_str_buf, str, in_len); + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_escape_str_buf, str, in_len, true); } /*! Return a quoted and escaped representation of the string. * This internal function is the implementation for all osmo_quote_str* API versions. - * It provides a return value of characters-needed, to allow producing un-truncated strings in all cases. + * It provides both the legacy (non C compatible) escaping, as well as C compatible string constant syntax, + * and it provides a return value of characters-needed, to allow producing un-truncated strings in all cases. * \param[out] buf string buffer to write escaped characters to. * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \param[in] legacy_format If false, return C compatible string constants ("\x0f"), if true the legacy + * escaping format ("\15"). The legacy format also escapes as "\a\b\f\v", while + * the non-legacy format also escapes those as "\xNN" sequences. * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). */ -static size_t _osmo_quote_str_buf(char *buf, size_t bufsize, const char *str, int in_len) +static size_t _osmo_quote_str_buf(char *buf, size_t bufsize, const char *str, int in_len, bool legacy_format) { struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; if (!str) OSMO_STRBUF_PRINTF(sb, "NULL"); else { OSMO_STRBUF_PRINTF(sb, "\""); - OSMO_STRBUF_APPEND(sb, _osmo_escape_str_buf, str, in_len); + OSMO_STRBUF_APPEND(sb, _osmo_escape_str_buf, str, in_len, legacy_format); OSMO_STRBUF_PRINTF(sb, "\""); } return sb.chars_needed; @@ -803,7 +820,7 @@ */ char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) { - _osmo_quote_str_buf(buf, bufsize, str, in_len); + _osmo_quote_str_buf(buf, bufsize, str, in_len, true); return buf; } @@ -821,7 +838,7 @@ return "NULL"; if (!buf || !bufsize) return "(error)"; - _osmo_quote_str_buf(buf, bufsize, str, in_len); + _osmo_quote_str_buf(buf, bufsize, str, in_len, true); return buf; } @@ -833,7 +850,7 @@ */ const char *osmo_quote_str(const char *str, int in_len) { - _osmo_quote_str_buf(namebuf, sizeof(namebuf), str, in_len); + _osmo_quote_str_buf(namebuf, sizeof(namebuf), str, in_len, true); return namebuf; } @@ -846,7 +863,65 @@ { /* The string will be at least as long as in_len, but some characters might need escaping. * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ - OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_quote_str_buf, str, in_len); + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_quote_str_buf, str, in_len, true); +} + +/*! Return the string with all non-printable characters escaped. + * In contrast to osmo_escape_str_buf2(), this returns the needed buffer size suitable for OSMO_STRBUF_APPEND(), and + * this escapes characters in a way compatible with C string constant syntax. + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + */ +size_t osmo_escape_cstr_buf(char *buf, size_t bufsize, const char *str, int in_len) +{ + return _osmo_escape_str_buf(buf, bufsize, str, in_len, false); +} + +/*! Return the string with all non-printable characters escaped, in dynamically-allocated buffer. + * In contrast to osmo_escape_str_c(), this escapes characters in a way compatible with C string constant syntax, and + * allocates sufficient memory in all cases. + * \param[in] str A string that may contain any characters. + * \param[in] len Pass -1 to print until nul char, or >= 0 to force a length. + * \returns dynamically-allocated buffer, containing an escaped representation. + */ +char *osmo_escape_cstr_c(void *ctx, const char *str, int in_len) +{ + /* The string will be at least as long as in_len, but some characters might need escaping. + * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_escape_str_buf, str, in_len, false); +} + +/*! Like osmo_escape_str_buf2(), but returns double-quotes around a string, or "NULL" for a NULL string. + * This allows passing any char* value and get its C representation as string. + * The function signature is suitable for OSMO_STRBUF_APPEND_NOLEN(). + * In contrast to osmo_escape_str_buf2(), this returns the needed buffer size suitable for OSMO_STRBUF_APPEND(), and + * this escapes characters in a way compatible with C string constant syntax. + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length. + * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + */ +size_t osmo_quote_cstr_buf(char *buf, size_t bufsize, const char *str, int in_len) +{ + return _osmo_quote_str_buf(buf, bufsize, str, in_len, false); +} + +/*! Return the string quoted and with all non-printable characters escaped, in dynamically-allocated buffer. + * In contrast to osmo_quote_str_c(), this escapes characters in a way compatible with C string constant syntax, and + * allocates sufficient memory in all cases. + * \param[in] str A string that may contain any characters. + * \param[in] len Pass -1 to print until nul char, or >= 0 to force a length. + * \returns dynamically-allocated buffer, containing a quoted and escaped representation. + */ +char *osmo_quote_cstr_c(void *ctx, const char *str, int in_len) +{ + /* The string will be at least as long as in_len plus two quotes, but some characters might need escaping. + * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_quote_str_buf, str, in_len, false); } /*! perform an integer square root operation on unsigned 32bit integer. diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index 55c9e7f..3c6d17b 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -531,7 +531,7 @@ const char *printable = "printable"; const char *res; - printf("\nTesting string escaping\n"); + printf("\nTesting string escaping: osmo_escape_str()\n"); printf("- all chars from 0 to 255 in batches of 16:\n"); in_buf[16] = '\0'; for (j = 0; j < 16; j++) { @@ -571,7 +571,7 @@ const char *printable = "printable"; const char *res; - printf("\nTesting string quoting\n"); + printf("\nTesting string quoting: osmo_quote_str()\n"); printf("- all chars from 0 to 255 in batches of 16:\n"); in_buf[16] = '\0'; for (j = 0; j < 16; j++) { @@ -616,6 +616,132 @@ printf("'%s'\n", osmo_quote_str_buf(NULL, -1, out_buf, 10)); } +static void str_escape3_test(void) +{ + int i; + int j; + uint8_t in_buf[32]; + char out_buf[11]; + const char *printable = "printable"; + const char *res; + void *ctx = talloc_named_const(NULL, 0, __func__); + + printf("\nTesting string escaping: osmo_escape_cstr_buf()\n"); + printf("- all chars from 0 to 255 in batches of 16:\n"); + in_buf[16] = '\0'; + for (j = 0; j < 16; j++) { + for (i = 0; i < 16; i++) + in_buf[i] = (j << 4) | i; + printf("\"%s\"\n", osmo_escape_cstr_c(ctx, (const char*)in_buf, 16)); + } + + printf("- nul terminated:\n"); + printf("\"%s\"\n", osmo_escape_cstr_c(ctx, "termi\nated", -1)); + + printf("- passthru:\n"); + res = osmo_escape_cstr_c(ctx, printable, -1); + if (strcmp(res, printable)) + printf("NOT passed through! \"%s\"\n", res); + else + printf("passed through unchanged \"%s\"\n", res); + + printf("- zero length:\n"); + printf("\"%s\"\n", osmo_escape_cstr_c(ctx, "omitted", 0)); + + printf("- truncation when too long:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[0] = '\a'; + in_buf[7] = 'E'; + memset(out_buf, 0x7f, sizeof(out_buf)); + osmo_escape_cstr_buf(out_buf, 10, (const char *)in_buf, sizeof(in_buf)); + printf("\"%s\"\n", out_buf); + OSMO_ASSERT(out_buf[10] == 0x7f); + + printf("- Test escaping an escaped string:\n"); + res = "\x02\x03\n"; + for (i = 0; i <= 3; i++) { + res = osmo_escape_cstr_c(ctx, res, -1); + printf("%d: '%s'\n", i, res); + } + + talloc_free(ctx); +} + +static void str_quote3_test(void) +{ + int i; + int j; + uint8_t in_buf[32]; + char out_buf[11]; + const char *printable = "printable"; + const char *res; + void *ctx = talloc_named_const(NULL, 0, __func__); + + printf("\nTesting string quoting: osmo_quote_cstr_buf()\n"); + printf("- all chars from 0 to 255 in batches of 16:\n"); + in_buf[16] = '\0'; + for (j = 0; j < 16; j++) { + for (i = 0; i < 16; i++) + in_buf[i] = (j << 4) | i; + printf("%s\n", osmo_quote_cstr_c(ctx, (const char*)in_buf, 16)); + } + + printf("- nul terminated:\n"); + printf("'%s'\n", osmo_quote_cstr_c(ctx, "termi\nated", -1)); + + printf("- never passthru:\n"); + res = osmo_quote_cstr_c(ctx, printable, -1); + if (strcmp(res, printable)) + printf("NOT passed through. '%s'\n", res); + else + printf("passed through unchanged '%s'\n", res); + + printf("- zero length:\n"); + printf("'%s'\n", osmo_quote_cstr_c(ctx, "omitted", 0)); + + printf("- truncation when too long:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[0] = '\a'; + in_buf[6] = 'E'; + memset(out_buf, 0x7f, sizeof(out_buf)); + osmo_quote_cstr_buf(out_buf, 10, (const char *)in_buf, sizeof(in_buf)); + printf("'%s'\n", out_buf); + OSMO_ASSERT(out_buf[10] == 0x7f); + + printf("- always truncation, even when no escaping needed:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[7] = 'E'; /* dst has 10, less 1 quote and nul, leaves 8, i.e. in[7] is last */ + in_buf[20] = '\0'; + memset(out_buf, 0x7f, sizeof(out_buf)); + osmo_quote_cstr_buf(out_buf, 10, (const char *)in_buf, -1); + printf("'%s'\n", out_buf); + OSMO_ASSERT(out_buf[0] == '"'); + OSMO_ASSERT(out_buf[10] == 0x7f); + + printf("- try to feed too little buf for quoting:\n"); + osmo_quote_cstr_buf(out_buf, 2, "", -1); + printf("'%s'\n", out_buf); + + printf("- Test quoting a quoted+escaped string:\n"); + res = "\x02\x03\n"; + for (i = 0; i <= 3; i++) { + res = osmo_quote_cstr_c(ctx, res, -1); + printf("%d: %s\n", i, res); + } + + printf("- Test C-string equivalence:\n"); +#define TEST_STR "\0\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" +#define EMPTY_STR "" + printf("strcmp(OSMO_STRINGIFY_VAL(TEST_STR), osmo_quote_cstr_c(ctx, TEST_STR, 256)) == %d\n", + strcmp(OSMO_STRINGIFY_VAL(TEST_STR), osmo_quote_cstr_c(ctx, TEST_STR, 256))); + printf("strcmp(OSMO_STRINGIFY_VAL(EMPTY_STR), osmo_quote_cstr_c(ctx, EMPTY_STR, -1)) == %d\n", + strcmp(OSMO_STRINGIFY_VAL(EMPTY_STR), osmo_quote_cstr_c(ctx, EMPTY_STR, -1))); + printf("strcmp(\"NULL\", osmo_quote_cstr_c(ctx, NULL, -1)) == %d\n", + strcmp("NULL", osmo_quote_cstr_c(ctx, NULL, -1))); + + talloc_free(ctx); +} + static void isqrt_test(void) { int i; @@ -1152,6 +1278,8 @@ bcd2str_test(); str_escape_test(); str_quote_test(); + str_escape3_test(); + str_quote3_test(); isqrt_test(); osmo_sockaddr_to_str_and_uint_test(); osmo_str_tolowupper_test(); diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index b603647..10436ce 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -206,7 +206,7 @@ bcd2str(NULL, ...) -> -12 bcd2str(dst, 0, ...) -> -12 -Testing string escaping +Testing string escaping: osmo_escape_str() - all chars from 0 to 255 in batches of 16: "\0\1\2\3\4\5\6\a\b\t\n\v\f\r\14\15" "\16\17\18\19\20\21\22\23\24\25\26\27\28\29\30\31" @@ -233,7 +233,7 @@ - truncation when too long: "\axxxxxxE" -Testing string quoting +Testing string quoting: osmo_quote_str() - all chars from 0 to 255 in batches of 16: '"\0\1\2\3\4\5\6\a\b\t\n\v\f\r\14\15"' '"\16\17\18\19\20\21\22\23\24\25\26\27\28\29\30\31"' @@ -266,6 +266,78 @@ - NULL string becomes a "NULL" literal: 'NULL' +Testing string escaping: osmo_escape_cstr_buf() +- all chars from 0 to 255 in batches of 16: +"\0\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f" +"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" +" !\"#$%&'()*+,-./" +"0123456789:;<=>?" +"@ABCDEFGHIJKLMNO" +"PQRSTUVWXYZ[\\]^_" +"`abcdefghijklmno" +"pqrstuvwxyz{|}~\x7f" +"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" +"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" +"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf" +"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" +"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" +"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" +"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef" +"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" +- nul terminated: +"termi\nated" +- passthru: +passed through unchanged "printable" +- zero length: +"" +- truncation when too long: +"\x07xxxxx" +- Test escaping an escaped string: +0: '\x02\x03\n' +1: '\\x02\\x03\\n' +2: '\\\\x02\\\\x03\\\\n' +3: '\\\\\\\\x02\\\\\\\\x03\\\\\\\\n' + +Testing string quoting: osmo_quote_cstr_buf() +- all chars from 0 to 255 in batches of 16: +"\0\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f" +"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" +" !\"#$%&'()*+,-./" +"0123456789:;<=>?" +"@ABCDEFGHIJKLMNO" +"PQRSTUVWXYZ[\\]^_" +"`abcdefghijklmno" +"pqrstuvwxyz{|}~\x7f" +"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" +"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" +"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf" +"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" +"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" +"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" +"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef" +"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" +- nul terminated: +'"termi\nated"' +- never passthru: +NOT passed through. '"printable"' +- zero length: +'""' +- truncation when too long: +'"\x07xxxx' +- always truncation, even when no escaping needed: +'"xxxxxxxE' +- try to feed too little buf for quoting: +'"' +- Test quoting a quoted+escaped string: +0: "\x02\x03\n" +1: "\"\\x02\\x03\\n\"" +2: "\"\\\"\\\\x02\\\\x03\\\\n\\\"\"" +3: "\"\\\"\\\\\\\"\\\\\\\\x02\\\\\\\\x03\\\\\\\\n\\\\\\\"\\\"\"" +- Test C-string equivalence: +strcmp(OSMO_STRINGIFY_VAL(TEST_STR), osmo_quote_cstr_c(ctx, TEST_STR, 256)) == 0 +strcmp(OSMO_STRINGIFY_VAL(EMPTY_STR), osmo_quote_cstr_c(ctx, EMPTY_STR, -1)) == 0 +strcmp("NULL", osmo_quote_cstr_c(ctx, NULL, -1)) == 0 + Testing integer square-root osmo_sockaddr_to_str_and_uint_test -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3dfb892036e01000033dd8e7e4a6a0c32a3caa9b Gerrit-Change-Number: 16160 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:18:06 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:18:06 +0000 Subject: Change in libosmocore[master]: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16161 ) Change subject: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR ...................................................................... GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR GSUP routing was introduced when adding the E interface. Hence that was the first realm where routing errors could occur. I did notice back then that this message type was special: it does not convey a response to a particular message kind -- it does not make sense, for example, to return an Updating Location Error cause, and do that for all conceivable message types. Instead, this tells the sender that a deeper error exists, i.e. that the desired peer is completely gone and unreachable. I did not foresee though that for D-GSM, there would also be arbitrary GSUP proxy routing, and that this error is not limited to E interface semantics. >From today's point of view, adding the "_E_" in the name was a mistake. Remove that "_E_" to yield OSMO_GSUP_MSGT_ROUTING_ERROR (with unchanged message type discriminator), but provide a #define linking the old name OSMO_GSUP_MSGT_E_ROUTING_ERROR to the new one. The only visible change should be that osmo_gsup_message_type_names[] now returns the new name without "_E_". I am not aware of any regression test fallout from that. Change-Id: Ic8e8bd11522d6c51ac7aaf946516cbce26bc6e1e --- M include/osmocom/gsm/gsup.h M src/gsm/gsup.c 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/16161/1 diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index 49ddb74..c883dfb 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -196,9 +196,11 @@ OSMO_GSUP_MSGT_E_CLOSE = 0b01000111, OSMO_GSUP_MSGT_E_ABORT = 0b01001011, - OSMO_GSUP_MSGT_E_ROUTING_ERROR = 0b01001110, + OSMO_GSUP_MSGT_ROUTING_ERROR = 0b01001110, }; +#define OSMO_GSUP_MSGT_E_ROUTING_ERROR OSMO_GSUP_MSGT_ROUTING_ERROR + #define OSMO_GSUP_IS_MSGT_REQUEST(msgt) (((msgt) & 0b00000011) == 0b00) #define OSMO_GSUP_IS_MSGT_ERROR(msgt) (((msgt) & 0b00000011) == 0b01) #define OSMO_GSUP_TO_MSGT_ERROR(msgt) (((msgt) & 0b11111100) | 0b01) diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c index 2f9d85d..ad7a2a4 100644 --- a/src/gsm/gsup.c +++ b/src/gsm/gsup.c @@ -101,7 +101,7 @@ OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_CLOSE), OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_ABORT), - OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_ROUTING_ERROR), + OSMO_VALUE_STRING(OSMO_GSUP_MSGT_ROUTING_ERROR), { 0, NULL } }; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic8e8bd11522d6c51ac7aaf946516cbce26bc6e1e Gerrit-Change-Number: 16161 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:20:19 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:20:19 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 8: Code-Review+2 re-applying previous +2, just a small simplification applied in the latest patch set -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 20:20:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:31:41 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:31:41 +0000 Subject: Change in libosmocore[master]: logging.h: define ansi color constants In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16156 to look at the new patch set (#2). Change subject: logging.h: define ansi color constants ...................................................................... logging.h: define ansi color constants It's hard to figure out what color logging categories have with those ANSI color code strings. Instead, define these OSMO_LOGCOLOR_* constants. Naming: commonly, the logging.h header has the "LOG" prefix in the name, but it seems saner to include the OSMO_ prefix: it seems too likely that some libosmocore user somewhere already has defined "LOGCOLOR_RED" somewhere. Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a --- M include/osmocom/core/logging.h M src/logging.c M tests/logging/logging_test.c M tests/loggingrb/loggingrb_test.c 4 files changed, 33 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/16156/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a Gerrit-Change-Number: 16156 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:31:42 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:31:42 +0000 Subject: Change in libosmocore[master]: vty: track parent nodes also for telnet sessions References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16162 ) Change subject: vty: track parent nodes also for telnet sessions ...................................................................... vty: track parent nodes also for telnet sessions Keep track of parent nodes and go back hierarchically, not only for .cfg file reading, but also for telnet VTY sessions. A long time ago cfg file parsing was made strictly hierarchical: node exits go back to parent nodes exactly as they were entered. However, live telnet VTY sessions still lacked this and depended on the go_parent_cb(). >From this commit on, implementing a go_parent_cb() is completely optional. The go_parent_cb() no longer has the task to determine the correct parent node, neither for cfg files (as already the case before this patch) nor for telnet VTY sessions (added by this patch). Instead, a go_parent_cb() implementation can merely take actions it requires on node exits, for example applying some config when leaving a specific node. The node value that is returned by the go_parent_cb() and the vty->node and vty->index values that might be set are completely ignored; instead the implicit parent node tracking determines the parent and node object. As a side effect, the is_config_node() callback is no longer needed, since the VTY now always implicitly knows when to exit back to the CONFIG_NODE. For example, osmo_ss7_is_config_node() could now be dropped, and the osmo_ss7_vty_go_parent() could be shortened by five switch cases, does no longer need to set vty->node nor vty->index and could thus be shortened to: int osmo_ss7_vty_go_parent(struct vty *vty) { struct osmo_ss7_asp *asp; struct osmo_xua_server *oxs; switch (vty->node) { case L_CS7_ASP_NODE: asp = vty->index; /* If no local addr was set */ if (!asp->cfg.local.host_cnt) { asp->cfg.local.host[0] = NULL; asp->cfg.local.host_cnt = 1; } osmo_ss7_asp_restart(asp); break; case L_CS7_XUA_NODE: oxs = vty->index; /* If no local addr was set, or erased after _create(): */ if (!oxs->cfg.local.host_cnt) osmo_ss7_xua_server_set_local_host(oxs, NULL); if (osmo_ss7_xua_server_bind(oxs) < 0) vty_out(vty, "%% Unable to bind xUA server to IP(s)%s", VTY_NEWLINE); break; } return 0; } Before parent tracking, every program was required to write a go_parent_cb() which has to return every node's parent node, basically a switch() statement that manually traces the way back out of child nodes. If the go_parent_cb() has errors, we may wildly jump around the node tree: a common error is to jump right out to the top config node with one exit, even though we were N levels deep. This kind of error has been eliminated for cfg files long ago, but still exists for telnet VTY sessions, which this patch fixes. This came up when I was adding multi-level config nodes to osmo-hlr to support Distributed GSM / remote MS lookup: the config file worked fine, while vty node tests failed to exit to the correct nodes. Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 --- M include/osmocom/vty/vty.h M src/vty/command.c M tests/vty/vty_test.c 3 files changed, 31 insertions(+), 48 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/16162/1 diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index 03a2924..9acaa7d 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -178,9 +178,14 @@ const char *copyright; /*! \ref talloc context */ void *tall_ctx; - /*! call-back for returning to parent n ode */ + /*! Call-back for taking actions upon exiting a node. + * The return value is ignored, and changes to vty->node and vty->index made in this callback are ignored. + * Implicit parent node tracking always sets the correct parent node and vty->index after this callback exits, + * so this callback can handle only those nodes that should take specific actions upon node exit, or can be left + * NULL entirely. */ int (*go_parent_cb)(struct vty *vty); - /*! call-back to determine if node is config node */ + /*! OBSOLETED: Implicit parent node tracking has replaced the use of this callback. This callback is no longer + * called, ever, and can be left NULL. */ int (*is_config_node)(struct vty *vty, int node); /*! Check if the config is consistent before write */ int (*config_is_consistent)(struct vty *vty); diff --git a/src/vty/command.c b/src/vty/command.c index 6a9d18a..daee5c5 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -200,18 +200,6 @@ return strcmp(a->cmd, b->cmd); } -static int is_config_child(struct vty *vty) -{ - if (vty->node <= CONFIG_NODE) - return 0; - else if (vty->node > CONFIG_NODE && vty->node < _LAST_OSMOVTY_NODE) - return 1; - else if (host.app_info->is_config_node) - return host.app_info->is_config_node(vty, vty->node); - else - return vty->node > CONFIG_NODE; -} - /*! Sort each node's command element according to command string. */ void sort_node(void) { @@ -2187,25 +2175,10 @@ vty_clear_parents(vty); break; - case CFG_LOG_NODE: - case VTY_NODE: - vty->node = CONFIG_NODE; - vty_clear_parents(vty); - break; - default: - if (host.app_info->go_parent_cb) { + if (host.app_info->go_parent_cb) host.app_info->go_parent_cb(vty); - vty_pop_parent(vty); - } - else if (is_config_child(vty)) { - vty->node = CONFIG_NODE; - vty_clear_parents(vty); - } - else { - vty->node = VIEW_NODE; - vty_clear_parents(vty); - } + vty_pop_parent(vty); break; } @@ -2365,9 +2338,30 @@ if (matched_element->daemon) rc = CMD_SUCCESS_DAEMON; - else /* Execute matched command. */ + else { + /* Execute matched command. */ + struct vty_parent_node this_node = { + .node = vty->node, + .priv = vty->priv, + .indent = vty->indent, + }; + struct vty_parent_node *parent = vty_parent(vty); rc = (*matched_element->func) (matched_element, vty, argc, argv); + /* If we have stepped down into a child node, push a parent frame. + * The causality is such: we don't expect every single node entry implementation to push + * a parent node entry onto vty->parent_nodes. Instead we expect vty_go_parent() to *pop* + * a parent node. Hence if the node changed without the parent node changing, we must + * have stepped into a child node. */ + if (vty->node != this_node.node && parent == vty_parent(vty) + && vty->node > CONFIG_NODE) { + /* Push the parent node. */ + parent = talloc_zero(vty, struct vty_parent_node); + *parent = this_node; + llist_add(&parent->entry, &vty->parent_nodes); + } + } + rc_free_deopt_ctx: /* Now after we called the command func, we can free temporary strings */ talloc_free(cmd_deopt_ctx); diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c index 1139638..9627b6d 100644 --- a/tests/vty/vty_test.c +++ b/tests/vty/vty_test.c @@ -482,27 +482,11 @@ destroy_test_vty(&test, vty); } -static int go_parent_cb(struct vty *vty) -{ - /* - * - For the interactive VTY tests above, it is expected to bounce back to - * the CONFIG_NODE. Hence do so in go_parent_cb(). - * - In the config file parsing tests, setting vty->node in go_parent_cb() has no - * effect, because we will subsequently pop a parent node from the parent stack - * and override to go to the node that was recorded as the actual parent. - */ - vty->node = CONFIG_NODE; - vty->index = NULL; - return 0; -} - int main(int argc, char **argv) { struct vty_app_info vty_info = { .name = "VtyTest", .version = 0, - .go_parent_cb = go_parent_cb, - .is_config_node = NULL, }; const struct log_info_cat default_categories[] = {}; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 Gerrit-Change-Number: 16162 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:31:42 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:31:42 +0000 Subject: Change in libosmocore[master]: fsm.h: add missing include of logging.h References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16163 ) Change subject: fsm.h: add missing include of logging.h ...................................................................... fsm.h: add missing include of logging.h Change-Id: I783bf0eb40b674fb6a77f7673563fdf156975f5a --- M include/osmocom/core/fsm.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/16163/1 diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index 269befa..7b262c7 100644 --- a/include/osmocom/core/fsm.h +++ b/include/osmocom/core/fsm.h @@ -10,6 +10,7 @@ #include #include #include +#include /*! \defgroup fsm Finite State Machine abstraction * @{ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16163 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I783bf0eb40b674fb6a77f7673563fdf156975f5a Gerrit-Change-Number: 16163 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:31:42 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:31:42 +0000 Subject: Change in libosmocore[master]: msgb_put: more elaborate logging of head/tailroom failure References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16164 ) Change subject: msgb_put: more elaborate logging of head/tailroom failure ...................................................................... msgb_put: more elaborate logging of head/tailroom failure Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726 --- M include/osmocom/core/msgb.h 1 file changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/64/16164/1 diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h index 1833a6c..cc76e3a 100644 --- a/include/osmocom/core/msgb.h +++ b/include/osmocom/core/msgb.h @@ -239,7 +239,11 @@ { unsigned char *tmp = msgb->tail; if (msgb_tailroom(msgb) < (int) len) - MSGB_ABORT(msgb, "Not enough tailroom msgb_put (%u < %u)\n", + MSGB_ABORT(msgb, "Not enough tailroom msgb_put" + " (allocated %u, head at %u, len %u, tailroom %u < want tailroom %u)\n", + msgb->data_len - sizeof(struct msgb), + msgb->head - msgb->_data, + msgb->len, msgb_tailroom(msgb), len); msgb->tail += len; msgb->len += len; @@ -335,8 +339,13 @@ static inline unsigned char *msgb_push(struct msgb *msgb, unsigned int len) { if (msgb_headroom(msgb) < (int) len) - MSGB_ABORT(msgb, "Not enough headroom msgb_push (%u < %u)\n", - msgb_headroom(msgb), len); + MSGB_ABORT(msgb, "Not enough headroom msgb_push" + " (allocated %u, head at %u < want headroom %u, len %u, tailroom %u)\n", + msgb->data_len - sizeof(struct msgb), + msgb->head - msgb->_data, + len, + msgb->len, + msgb_tailroom(msgb)); msgb->data -= len; msgb->len += len; return msgb->data; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16164 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726 Gerrit-Change-Number: 16164 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:31:42 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:31:42 +0000 Subject: Change in libosmocore[master]: utils_test: add osmo_print_n_test() References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16165 ) Change subject: utils_test: add osmo_print_n_test() ...................................................................... utils_test: add osmo_print_n_test() A couple of times recently I've needed to copy out a substring to a buffer with limited size. Use of strncpy() or osmo_strlcpy() are nontrivial here. I wanted to have a dedicated function. After I wrote that function with a test, I noticed that I had already implemented the same thing a while ago, as osmo_print_n() :P So here is just the test. Change-Id: Ia716abdc1f58af6065b84f4f567388a32a7b39fc --- M src/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 3 files changed, 82 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/65/16165/1 diff --git a/src/utils.c b/src/utils.c index 8dfa7ec..4e55a89 100644 --- a/src/utils.c +++ b/src/utils.c @@ -509,6 +509,8 @@ * Copy at most \a siz bytes from \a src to \a dst, ensuring that the result is * NUL terminated. The NUL character is included in \a siz, i.e. passing the * actual sizeof(*dst) is correct. + * + * Note, a similar function that also limits the input buffer size is osmo_print_n(). */ size_t osmo_strlcpy(char *dst, const char *src, size_t siz) { diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index 3c6d17b..458458e 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -1264,6 +1264,59 @@ talloc_free(ctx); } +static void osmo_print_n_test(void) +{ + struct token_test { + const char *src; + size_t token_len; + size_t buf_size; + const char *expect_token; + int expect_rc; + }; + struct token_test tests[] = { + { "foo=bar", 3, 100, "foo", 3 }, + { "foo", 10, 100, "foo", 3 }, + { "foo", 3, 100, "foo", 3 }, + { NULL, 10, 100, "", 0 }, + { "", 10, 100, "", 0 }, + { "foo=bar", 0, 100, "", 0 }, + + { "foo=bar", 3, 2, "f", 3 }, + { "foo", 10, 2, "f", 3 }, + { "foo", 3, 2, "f", 3 }, + { NULL, 10, 2, "", 0 }, + { "", 10, 2, "", 0 }, + { "foo=bar", 0, 2, "", 0 }, + + { "foo=bar", 3, 1, "", 3 }, + { "foo", 10, 1, "", 3 }, + { "foo", 3, 1, "", 3 }, + { NULL, 10, 1, "", 0 }, + { "", 10, 1, "", 0 }, + { "foo=bar", 0, 1, "", 0 }, + + { "foo=bar", 3, 0, "unchanged", 3 }, + { "foo", 10, 0, "unchanged", 3 }, + { "foo", 3, 0, "unchanged", 3 }, + { NULL, 10, 0, "unchanged", 0 }, + { "", 10, 0, "unchanged", 0 }, + { "foo=bar", 0, 0, "unchanged", 0 }, + }; + struct token_test *t; + printf("\n%s()\n", __func__); + for (t = tests; t - tests < ARRAY_SIZE(tests); t++) { + char buf[100] = "unchanged"; + int rc = osmo_print_n(buf, t->buf_size, t->src, t->token_len); + printf("%s token_len=%zu buf_size=%zu", osmo_quote_str(t->src, -1), t->token_len, t->buf_size); + printf(" -> token=%s rc=%d", osmo_quote_str(buf, -1), rc); + if (strcmp(buf, t->expect_token)) + printf(" ERROR: expected token %s", osmo_quote_str(t->expect_token, -1)); + if (rc != t->expect_rc) + printf(" ERROR: expected rc %d", t->expect_rc); + printf("\n"); + } +} + int main(int argc, char **argv) { static const struct log_info log_info = {}; @@ -1287,5 +1340,6 @@ strbuf_test_nolen(); startswith_test(); name_c_impl_test(); + osmo_print_n_test(); return 0; } diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index 10436ce..bd43365 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -449,3 +449,29 @@ OSMO_NAME_C_IMPL(10, NULL) -> NULL allocated 0 OSMO_NAME_C_IMPL(0, "ERROR") -> "ERROR" allocated 1 6 bytes, name 'foo_name_c_zero' OSMO_NAME_C_IMPL(0, NULL) -> NULL allocated 0 + +osmo_print_n_test() +"foo=bar" token_len=3 buf_size=100 -> token="foo" rc=3 +"foo" token_len=10 buf_size=100 -> token="foo" rc=3 +"foo" token_len=3 buf_size=100 -> token="foo" rc=3 +NULL token_len=10 buf_size=100 -> token="" rc=0 +"" token_len=10 buf_size=100 -> token="" rc=0 +"foo=bar" token_len=0 buf_size=100 -> token="" rc=0 +"foo=bar" token_len=3 buf_size=2 -> token="f" rc=3 +"foo" token_len=10 buf_size=2 -> token="f" rc=3 +"foo" token_len=3 buf_size=2 -> token="f" rc=3 +NULL token_len=10 buf_size=2 -> token="" rc=0 +"" token_len=10 buf_size=2 -> token="" rc=0 +"foo=bar" token_len=0 buf_size=2 -> token="" rc=0 +"foo=bar" token_len=3 buf_size=1 -> token="" rc=3 +"foo" token_len=10 buf_size=1 -> token="" rc=3 +"foo" token_len=3 buf_size=1 -> token="" rc=3 +NULL token_len=10 buf_size=1 -> token="" rc=0 +"" token_len=10 buf_size=1 -> token="" rc=0 +"foo=bar" token_len=0 buf_size=1 -> token="" rc=0 +"foo=bar" token_len=3 buf_size=0 -> token="unchanged" rc=3 +"foo" token_len=10 buf_size=0 -> token="unchanged" rc=3 +"foo" token_len=3 buf_size=0 -> token="unchanged" rc=3 +NULL token_len=10 buf_size=0 -> token="unchanged" rc=0 +"" token_len=10 buf_size=0 -> token="unchanged" rc=0 +"foo=bar" token_len=0 buf_size=0 -> token="unchanged" rc=0 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16165 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia716abdc1f58af6065b84f4f567388a32a7b39fc Gerrit-Change-Number: 16165 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:31:43 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:31:43 +0000 Subject: Change in libosmocore[master]: utils: add osmo_strnchr() References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16166 ) Change subject: utils: add osmo_strnchr() ...................................................................... utils: add osmo_strnchr() When finding a char in a string, I want to be able to limit the search area by size, not only by nul terminator. Change-Id: I48f8ace9f51f8a06796648883afcabe3b4e8b537 --- M include/osmocom/core/utils.h M src/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 4 files changed, 65 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/16166/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 4e7037a..01c4de6 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -139,6 +139,7 @@ uint8_t *osmo_encode_big_endian(uint64_t value, size_t data_len); size_t osmo_strlcpy(char *dst, const char *src, size_t siz); +const char *osmo_strnchr(const char *str, size_t str_size, char c); bool osmo_is_hexstr(const char *str, int min_digits, int max_digits, bool require_even); diff --git a/src/utils.c b/src/utils.c index 4e55a89..038288c 100644 --- a/src/utils.c +++ b/src/utils.c @@ -525,6 +525,28 @@ return ret; } +/*! Find first occurence of a char in a size limited string. + * Like strchr() but with a buffer size limit. + * \param[in] str String buffer to examine. + * \param[in] str_size sizeof(str). + * \param[in] c Character to look for. + * \return Pointer to the matched char, or NULL if not found. + */ +const char *osmo_strnchr(const char *str, size_t str_size, char c) +{ + const char *end = str + str_size; + const char *pos; + if (!str) + return NULL; + for (pos = str; pos < end; pos++) { + if (c == *pos) + return pos; + if (!*pos) + return NULL; + } + return NULL; +} + /*! Validate that a given string is a hex string within given size limits. * Note that each hex digit amounts to a nibble, so if checking for a hex * string to result in N bytes, pass amount of digits as 2*N. diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index 458458e..e87cb22 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -1317,6 +1317,39 @@ } } +static void osmo_strnchr_test(void) +{ + struct test { + const char *haystack; + size_t haystack_len; + const char *needle; + int expect_offset; + }; + struct test tests[] = { + { "foo=bar", 8, "=", 3 }, + { "foo=bar", 4, "=", 3 }, + { "foo=bar", 3, "=", -1 }, + { "foo=bar", 0, "=", -1 }, + { "foo\0=bar", 9, "=", -1 }, + { "foo\0=bar", 9, "\0", 3 }, + }; + struct test *t; + printf("\n%s()\n", __func__); + for (t = tests; t - tests < ARRAY_SIZE(tests); t++) { + const char *r = osmo_strnchr(t->haystack, t->haystack_len, t->needle[0]); + int offset = -1; + if (r) + offset = r - t->haystack; + printf("osmo_strnchr(%s, %zu, ", + osmo_quote_str(t->haystack, -1), t->haystack_len); + printf("'%s') -> %d", + osmo_escape_str(t->needle, 1), offset); + if (offset != t->expect_offset) + printf(" ERROR expected %d", t->expect_offset); + printf("\n"); + } +} + int main(int argc, char **argv) { static const struct log_info log_info = {}; @@ -1341,5 +1374,6 @@ startswith_test(); name_c_impl_test(); osmo_print_n_test(); + osmo_strnchr_test(); return 0; } diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index bd43365..baa708e 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -475,3 +475,11 @@ NULL token_len=10 buf_size=0 -> token="unchanged" rc=0 "" token_len=10 buf_size=0 -> token="unchanged" rc=0 "foo=bar" token_len=0 buf_size=0 -> token="unchanged" rc=0 + +osmo_strnchr_test() +osmo_strnchr("foo=bar", 8, '=') -> 3 +osmo_strnchr("foo=bar", 4, '=') -> 3 +osmo_strnchr("foo=bar", 3, '=') -> -1 +osmo_strnchr("foo=bar", 0, '=') -> -1 +osmo_strnchr("foo", 9, '=') -> -1 +osmo_strnchr("foo", 9, '\0') -> 3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16166 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I48f8ace9f51f8a06796648883afcabe3b4e8b537 Gerrit-Change-Number: 16166 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:45:36 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:45:36 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: fix 32bit addr mixup of host/network byte order ...................................................................... Patch Set 4: to make the important part less controversial, let me split this patch. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 20:45:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:46:55 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:46:55 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte... In-Reply-To: References: Message-ID: Hello pespin, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16030 to look at the new patch set (#5). Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order ...................................................................... osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order Of course both v4 and v6 addresses are kept in network byte order when represented in bytes, but when writing, I somehow must have assumed that inet_pton() returns host byte order. Fix that mixup in the API docs: osmo_sockaddr_str_from_32() and osmo_sockaddr_str_to_32() actually use network byte order. osmo_sockaddr_str_from_32n() and osmo_sockaddr_str_to_32n() actually use host byte order, though reflecting 'n' in their name. sockaddr_str_test: use hexdump instead of %x to show the osmo_sockaddr_str_to_32*() conversions so that the error becomes obvious. (Printing %x reverses the bytes again and made it look correct.) Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 --- M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 3 files changed, 58 insertions(+), 54 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/16030/5 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:46:56 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:46:56 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16167 ) Change subject: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() ...................................................................... osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() Follow up for patch I3cf150cc0cc06dd36039fbde091bc71b01697322 osmo_sockaddr_str_{from,to}_32n actually use host byte order. Deprecate these and introduce a more accurately named version ending in h. Change-Id: Ic7fc279bf3c741811cfc002538e28e8f8560e338 --- M TODO-RELEASE M include/osmocom/core/sockaddr_str.h M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 5 files changed, 60 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/16167/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 692bdc1..be858ae 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -11,3 +11,7 @@ core struct osmo_tdef fields min_val,max_val added, ABI break (arrays of structs used in programs) gsm API added osmo_gsm48_rfpowercap2powerclass() gb API added bssgp_bvc_ctx_free() +core osmo_sockaddr_str_from_32n(), + osmo_sockaddr_str_to_32n() Deprecate: named 'n' but use host byte order. +core osmo_sockaddr_str_from_32h(), + osmo_sockaddr_str_to_32h() New, use host byte order and are named appropriately. diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index d7a8cdf..e42216a 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -31,6 +31,7 @@ #include #include #include +#include struct in_addr; struct in6_addr; @@ -77,7 +78,7 @@ int osmo_sockaddr_str_from_in_addr(struct osmo_sockaddr_str *sockaddr_str, const struct in_addr *addr, uint16_t port); int osmo_sockaddr_str_from_in6_addr(struct osmo_sockaddr_str *sockaddr_str, const struct in6_addr *addr, uint16_t port); int osmo_sockaddr_str_from_32(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port); -int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port); +int osmo_sockaddr_str_from_32h(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port); int osmo_sockaddr_str_from_sockaddr_in(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_in *src); int osmo_sockaddr_str_from_sockaddr_in6(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_in6 *src); int osmo_sockaddr_str_from_sockaddr(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_storage *src); @@ -85,9 +86,14 @@ int osmo_sockaddr_str_to_in_addr(const struct osmo_sockaddr_str *sockaddr_str, struct in_addr *dst); int osmo_sockaddr_str_to_in6_addr(const struct osmo_sockaddr_str *sockaddr_str, struct in6_addr *dst); int osmo_sockaddr_str_to_32(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip); -int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip); +int osmo_sockaddr_str_to_32h(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip); int osmo_sockaddr_str_to_sockaddr_in(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_in *dst); int osmo_sockaddr_str_to_sockaddr_in6(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_in6 *dst); int osmo_sockaddr_str_to_sockaddr(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_storage *dst); +int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) + OSMO_DEPRECATED("osmo_sockaddr_str_from_32n() actually uses *host* byte order. Use osmo_sockaddr_str_from_32h() instead"); +int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) + OSMO_DEPRECATED("osmo_sockaddr_str_to_32n() actually uses *host* byte order. Use osmo_sockaddr_str_to_32h() instead"); + /*! @} */ diff --git a/src/sockaddr_str.c b/src/sockaddr_str.c index 304363d..c38a05c 100644 --- a/src/sockaddr_str.c +++ b/src/sockaddr_str.c @@ -277,13 +277,20 @@ * \param[in] port Port number. * \return 0 on success, negative on error. */ -int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) +int osmo_sockaddr_str_from_32h(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) { if (!sockaddr_str) return -ENOSPC; return osmo_sockaddr_str_from_32(sockaddr_str, osmo_ntohl(ip), port); } +/*! DEPRECATED: the name suggests a conversion from network byte order, but actually converts from host byte order. Use + * osmo_sockaddr_str_from_32 for network byte order and osmo_sockaddr_str_from_32h for host byte order. */ +int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) +{ + return osmo_sockaddr_str_from_32h(sockaddr_str, ip, port); +} + /*! Convert IPv4 address and port to osmo_sockaddr_str. * \param[out] sockaddr_str The instance to copy to. * \param[in] src IPv4 address and port data. @@ -403,7 +410,7 @@ * \param[out] dst IPv4 address data in 32bit host-byte-order format to write to. * \return 0 on success, negative on error (e.g. invalid IPv4 address string). */ -int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) +int osmo_sockaddr_str_to_32h(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) { int rc; uint32_t ip_h; @@ -418,6 +425,13 @@ return 0; } +/*! DEPRECATED: the name suggests a conversion to network byte order, but actually converts to host byte order. Use + * osmo_sockaddr_str_to_32() for network byte order and osmo_sockaddr_str_to_32h() for host byte order. */ +int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) +{ + return osmo_sockaddr_str_to_32h(sockaddr_str, ip); +} + /*! Convert osmo_sockaddr_str address string and port to IPv4 address and port data. * \param[in] sockaddr_str The instance to convert the IP and port of. * \param[out] dst IPv4 address and port data to write to. diff --git a/tests/sockaddr_str/sockaddr_str_test.c b/tests/sockaddr_str/sockaddr_str_test.c index 7e015ce..64a6104 100644 --- a/tests/sockaddr_str/sockaddr_str_test.c +++ b/tests/sockaddr_str/sockaddr_str_test.c @@ -165,14 +165,14 @@ { uint32_t a = 0; - rc = osmo_sockaddr_str_to_32n(x, &a); - printf(" osmo_sockaddr_str_to_32n() %s uint8_t[4]=[ %s]\n", rc_name(rc), + rc = osmo_sockaddr_str_to_32h(x, &a); + printf(" osmo_sockaddr_str_to_32h() %s uint8_t[4]=[ %s]\n", rc_name(rc), osmo_hexdump((void*)&a, sizeof(a))); if (rc == 0) { struct osmo_sockaddr_str back; - rc = osmo_sockaddr_str_from_32n(&back, a, x->port); - printf(" -> osmo_sockaddr_str_from_32n() %s ", rc_name(rc)); + rc = osmo_sockaddr_str_from_32h(&back, a, x->port); + printf(" -> osmo_sockaddr_str_from_32h() %s ", rc_name(rc)); dump_oip(&back); if (memcmp(x, &back, sizeof(back))) printf(" DIFFERS!\n"); diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index 33d9d7e..910e919 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -9,8 +9,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 01 02 03 04 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 04 03 02 01 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 04 03 02 01 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005010203040000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -28,8 +28,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 00 00 00 00 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 00 00 00 00 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -47,8 +47,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ ff ff ff ff ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ ff ff ff ff ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ ff ff ff ff ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=0200ffffffffffff0000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -64,7 +64,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000001000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -78,7 +78,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000001000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -93,7 +93,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00010002000300000000000000000004 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000001000200030000000000000000000400000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } @@ -110,7 +110,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000000000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } @@ -127,7 +127,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000001 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000000000000000000000000000000000000000000000100000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } @@ -144,7 +144,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=ffffffffffffffffffffffffffffffff -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a00ffff00000000ffffffffffffffffffffffffffffffff00000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -162,7 +162,7 @@ -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } DIFFERS! osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a00ffff00000000ffffffffffffffffffffffffffffffff00000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -180,7 +180,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000001000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -194,7 +194,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000001000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -208,7 +208,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -223,7 +223,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000005000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -238,7 +238,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -253,7 +253,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000005000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -267,7 +267,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -283,8 +283,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 01 02 03 04 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 04 03 02 01 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 04 03 02 01 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000000010203040000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -300,7 +300,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -317,7 +317,7 @@ -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } DIFFERS! osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000001000000000000000000000000000000010a09080700000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } @@ -337,8 +337,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 00 00 00 00 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 00 00 00 00 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -355,7 +355,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } @@ -373,7 +373,7 @@ -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } DIFFERS! osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16167 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic7fc279bf3c741811cfc002538e28e8f8560e338 Gerrit-Change-Number: 16167 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 20:48:49 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 20:48:49 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte... In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order ...................................................................... Patch Set 5: this patch only fixes the API doc now, so we should be able to agree on this part quickly. The more controversial bit is now in https://gerrit.osmocom.org/c/libosmocore/+/16167/1 (much later because I don't want to hold up other patches because of that one.) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 20:48:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 21:09:49 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 21:09:49 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 ) Change subject: msc: overhaul voice call testing ...................................................................... Patch Set 4: we still need a CR+1 from somewhere -- I can understand that it's hard to review this patch, so much going on here. I'm pretty sure that it's an improvement, even if I say so myself... -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 21:09:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 21:12:36 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 21:12:36 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15961 ) Change subject: add osmo_sockaddr_str_cmp() ...................................................................... Patch Set 7: Code-Review+2 re-apply earlier CR: there were 2 +1s, the new patch set just fixes a typo and does a simpler "return rc" as from review comments. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 21 Nov 2019 21:12:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 21 21:12:49 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 21 Nov 2019 21:12:49 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15961 ) Change subject: add osmo_sockaddr_str_cmp() ...................................................................... add osmo_sockaddr_str_cmp() Currently planned user: for Distributed GSM in osmo-hlr: setting per-MSC service addresses in VTY: replace/remove existing entries. osmo_sockaddr_str_cmp() is useful to catch identical resulting IP addresses, regardless of differing strings (e.g. '0::' and '::' are equal but differ in strings). Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 --- M include/osmocom/core/sockaddr_str.h M include/osmocom/core/utils.h M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 5 files changed, 678 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, approved diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index 6dd428c..d7a8cdf 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -70,6 +70,7 @@ bool osmo_sockaddr_str_is_set(const struct osmo_sockaddr_str *sockaddr_str); bool osmo_sockaddr_str_is_nonzero(const struct osmo_sockaddr_str *sockaddr_str); +int osmo_sockaddr_str_cmp(const struct osmo_sockaddr_str *a, const struct osmo_sockaddr_str *b); int osmo_sockaddr_str_from_str(struct osmo_sockaddr_str *sockaddr_str, const char *ip, uint16_t port); diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 601bb56..c4e6f5f 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -21,6 +21,8 @@ #define OSMO_MAX(a, b) ((a) >= (b) ? (a) : (b)) /*! Return the minimum of two specified values */ #define OSMO_MIN(a, b) ((a) >= (b) ? (b) : (a)) +/*! Return a typical cmp result for comparable entities a and b. */ +#define OSMO_CMP(a, b) ((a) < (b)? -1 : ((a) > (b)? 1 : 0)) /*! Stringify the name of a macro x, e.g. an FSM event name. * Note: if nested within another preprocessor macro, this will * stringify the value of x instead of its name. */ diff --git a/src/sockaddr_str.c b/src/sockaddr_str.c index f523050..5c548b4 100644 --- a/src/sockaddr_str.c +++ b/src/sockaddr_str.c @@ -95,6 +95,80 @@ } } +/*! Compare two osmo_sockaddr_str instances by string comparison. + * Compare by strcmp() for the address and compare port numbers, ignore the AF_INET/AF_INET6 value. + * \param[in] a left side of comparison. + * \param[in] b right side of comparison. + * \return -1 if a < b, 0 if a == b, 1 if a > b. + */ +static int osmo_sockaddr_str_cmp_by_string(const struct osmo_sockaddr_str *a, const struct osmo_sockaddr_str *b) +{ + int cmp; + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + cmp = strncmp(a->ip, b->ip, sizeof(a->ip)); + if (cmp) + return cmp; + return OSMO_CMP(a->port, b->port); +} + +/*! Compare two osmo_sockaddr_str instances by resulting IP address. + * Compare IP versions (AF_INET vs AF_INET6), compare resulting IP address bytes and compare port numbers. + * If the IP address strings cannot be parsed successfully / if the 'af' is neither AF_INET nor AF_INET6, fall back to + * pure string comparison of the ip address. + * \param[in] a left side of comparison. + * \param[in] b right side of comparison. + * \return -1 if a < b, 0 if a == b, 1 if a > b. + */ +int osmo_sockaddr_str_cmp(const struct osmo_sockaddr_str *a, const struct osmo_sockaddr_str *b) +{ + int cmp; + uint32_t ipv4_a, ipv4_b; + struct in6_addr ipv6_a = {}, ipv6_b = {}; + + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + cmp = OSMO_CMP(a->af, b->af); + if (cmp) + return cmp; + switch (a->af) { + case AF_INET: + if (osmo_sockaddr_str_to_32(a, &ipv4_a) + || osmo_sockaddr_str_to_32(b, &ipv4_b)) + goto fallback_to_strcmp; + cmp = OSMO_CMP(ipv4_a, ipv4_b); + break; + + case AF_INET6: + if (osmo_sockaddr_str_to_in6_addr(a, &ipv6_a) + || osmo_sockaddr_str_to_in6_addr(b, &ipv6_b)) + goto fallback_to_strcmp; + cmp = memcmp(&ipv6_a, &ipv6_b, sizeof(ipv6_a)); + break; + + default: + goto fallback_to_strcmp; + } + if (cmp) + return cmp; + + cmp = OSMO_CMP(a->port, b->port); + if (cmp) + return cmp; + return 0; + +fallback_to_strcmp: + return osmo_sockaddr_str_cmp_by_string(a, b); +} + /*! Distinguish between valid IPv4 and IPv6 strings. * This does not verify whether the string is a valid IP address; it assumes that the input is a valid IP address, and * on that premise returns whether it is an IPv4 or IPv6 string, by looking for '.' and ':' characters. It is safe to diff --git a/tests/sockaddr_str/sockaddr_str_test.c b/tests/sockaddr_str/sockaddr_str_test.c index bf7d738..7d8fe4f 100644 --- a/tests/sockaddr_str/sockaddr_str_test.c +++ b/tests/sockaddr_str/sockaddr_str_test.c @@ -55,6 +55,7 @@ { .af = AF_INET6, .ip = "::1:10.9.8.7", .port = 1 }, { .af = AF_INET, .ip = "0.0.0.0", .port = 5 }, { .af = AF_INET6, .ip = "::", .port = 5 }, + { .af = AF_INET6, .ip = "0::", .port = 5 }, }; const char *af_name(int af) @@ -236,9 +237,34 @@ } +static void test_osmo_sockaddr_str_cmp() +{ + int i; + printf("\n\n%s\n", __func__); + for (i = 0; i < ARRAY_SIZE(oip_data); i++) { + /* use a copy to not hit the pointer comparison in osmo_sockaddr_str_cmp(). */ + struct osmo_sockaddr_str _a = oip_data[i]; + struct osmo_sockaddr_str *a = &_a; + int j; + printf("[%2d]\n", i); + + for (j = 0; j < ARRAY_SIZE(oip_data); j++) { + struct osmo_sockaddr_str *b = &oip_data[j]; + int ip_rc = osmo_sockaddr_str_cmp(a, b); + printf(" osmo_sockaddr_str_cmp(): " OSMO_SOCKADDR_STR_FMT "%s %s " OSMO_SOCKADDR_STR_FMT "%s\n", + OSMO_SOCKADDR_STR_FMT_ARGS(a), + osmo_sockaddr_str_is_nonzero(a) ? "" : "(zero)", + ip_rc < 0? "<" : (ip_rc == 0 ? "==" : ">" ), + OSMO_SOCKADDR_STR_FMT_ARGS(b), + osmo_sockaddr_str_is_nonzero(b) ? "" : "(zero)"); + } + } +} + int main(int argc, char **argv) { sockaddr_str_test_conversions(); + test_osmo_sockaddr_str_cmp(); return 0; } diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index bc18225..31f630f 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -362,3 +362,578 @@ osmo_sockaddr_str_to_sockaddr() rc == 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } osmo_sockaddr_str_from_str() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + + +{ .af = AF_INET6, .ip = "0::", .port = 5 } + OSMO_SOCKADDR_STR_FMT: '[0::]:5' + osmo_sockaddr_str_is_set() = true + osmo_sockaddr_str_is_nonzero() = false + osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 + osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 + -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + DIFFERS! + osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 + osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 + -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + DIFFERS! + osmo_sockaddr_str_to_sockaddr() rc == 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + -> osmo_sockaddr_str_from_sockaddr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } + DIFFERS! + osmo_sockaddr_str_from_str() rc == 0 { .af = AF_INET6, .ip = "0::", .port = 5 } + + +test_osmo_sockaddr_str_cmp +[ 0] + osmo_sockaddr_str_cmp(): 1.2.3.4:5 == 1.2.3.4:5 + osmo_sockaddr_str_cmp(): 1.2.3.4:5 > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): 1.2.3.4:5 > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < not an ip address:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [::]:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [::1]:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 > :5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < []:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): 1.2.3.4:5 > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [::]:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5 < [0::]:5(zero) +[ 1] + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < 1.2.3.4:5 + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) == 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < not an ip address:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) > :5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < []:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:0(zero) < [0::]:5(zero) +[ 2] + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 == 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < not an ip address:1(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [::]:0(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [::1]:0(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 > :5(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < []:5(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [::]:5(zero) + osmo_sockaddr_str_cmp(): 255.255.255.255:65535 < [0::]:5(zero) +[ 3] + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < 1.2.3.4:5 + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) == 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < not an ip address:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) > :5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < []:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.256:1(zero) < [0::]:5(zero) +[ 4] + osmo_sockaddr_str_cmp(): not an ip address:1(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): not an ip address:1(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): not an ip address:1(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) == not an ip address:1(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) > :5(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < []:5(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): not an ip address:1(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): not an ip address:1(zero) < [0::]:5(zero) +[ 5] + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 == [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > [::]:0(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > [::1]:0(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > :5(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > []:5(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > [::]:5(zero) + osmo_sockaddr_str_cmp(): [1:2:3::4]:5 > [0::]:5(zero) +[ 6] + osmo_sockaddr_str_cmp(): [::]:0(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [::]:0(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [::]:0(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [::]:0(zero) == [::]:0(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [::]:0(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [::]:0(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) > [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) > :5(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) > []:5(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [::]:0(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): [::]:0(zero) < [0::]:5(zero) +[ 7] + osmo_sockaddr_str_cmp(): [::1]:0(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [::1]:0(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [::1]:0(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [::1]:0(zero) > [::]:0(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) == [::1]:0(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [::1]:0(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [::1]:0(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > :5(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > []:5(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [::1]:0(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > [::]:5(zero) + osmo_sockaddr_str_cmp(): [::1]:0(zero) > [0::]:5(zero) +[ 8] + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [::]:0(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [::1]:0(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 == [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 == [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > :5(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > []:5(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [::]:5(zero) + osmo_sockaddr_str_cmp(): [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 > [0::]:5(zero) +[ 9] + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [::]:0(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [::1]:0(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 == [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 == [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > :5(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > []:5(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [::]:5(zero) + osmo_sockaddr_str_cmp(): [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 > [0::]:5(zero) +[10] + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > [::]:0(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > [::1]:0(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) == [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > :5(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > []:5(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > [::]:5(zero) + osmo_sockaddr_str_cmp(): [::fffff]:1(zero) > [0::]:5(zero) +[11] + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > [::]:0(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > [::1]:0(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) == [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > :5(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > []:5(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > [::]:5(zero) + osmo_sockaddr_str_cmp(): [not an ip address]:1(zero) > [0::]:5(zero) +[12] + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) == [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > :5(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > []:5(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): [1.2.3.4]:5(zero) > [0::]:5(zero) +[13] + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < not an ip address:1(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) == 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) > :5(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < []:5(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): 1:2:3::4:5(zero) < [0::]:5(zero) +[14] + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < 1.2.3.4:5 + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < not an ip address:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) == 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < :5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < []:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:5(zero) < [0::]:5(zero) +[15] + osmo_sockaddr_str_cmp(): :5(zero) < 1.2.3.4:5 + osmo_sockaddr_str_cmp(): :5(zero) < 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): :5(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): :5(zero) < 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): :5(zero) < not an ip address:1(zero) + osmo_sockaddr_str_cmp(): :5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): :5(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): :5(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): :5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): :5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): :5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): :5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): :5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): :5(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): :5(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): :5(zero) == :5(zero) + osmo_sockaddr_str_cmp(): :5(zero) < []:5(zero) + osmo_sockaddr_str_cmp(): :5(zero) < 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): :5(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): :5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): :5(zero) < 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): :5(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): :5(zero) < [0::]:5(zero) +[16] + osmo_sockaddr_str_cmp(): []:5(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): []:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): []:5(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): []:5(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): []:5(zero) > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): []:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): []:5(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): []:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): []:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): []:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): []:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): []:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): []:5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): []:5(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): []:5(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): []:5(zero) > :5(zero) + osmo_sockaddr_str_cmp(): []:5(zero) == []:5(zero) + osmo_sockaddr_str_cmp(): []:5(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): []:5(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): []:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): []:5(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): []:5(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): []:5(zero) < [0::]:5(zero) +[17] + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < 1.2.3.4:5 + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < not an ip address:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) > :5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < []:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) == 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3.4:0(zero) < [0::]:5(zero) +[18] + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < not an ip address:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) > :5(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < []:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) == 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): 1.2.3:4:5:0(zero) < [0::]:5(zero) +[19] + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > [::]:0(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > [::1]:0(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > :5(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > []:5(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 == [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > [::]:5(zero) + osmo_sockaddr_str_cmp(): [::1:10.9.8.7]:1 > [0::]:5(zero) +[20] + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < 1.2.3.4:5 + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < not an ip address:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [::]:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) > :5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < []:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) == 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [::]:5(zero) + osmo_sockaddr_str_cmp(): 0.0.0.0:5(zero) < [0::]:5(zero) +[21] + osmo_sockaddr_str_cmp(): [::]:5(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [::]:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [::]:5(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [::]:5(zero) > [::]:0(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [::]:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [::]:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) > [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) > :5(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) > []:5(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [::]:5(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) == [::]:5(zero) + osmo_sockaddr_str_cmp(): [::]:5(zero) == [0::]:5(zero) +[22] + osmo_sockaddr_str_cmp(): [0::]:5(zero) > 1.2.3.4:5 + osmo_sockaddr_str_cmp(): [0::]:5(zero) > 0.0.0.0:0(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) > 255.255.255.255:65535 + osmo_sockaddr_str_cmp(): [0::]:5(zero) > 0.0.0.256:1(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) > not an ip address:1(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) < [1:2:3::4]:5 + osmo_sockaddr_str_cmp(): [0::]:5(zero) > [::]:0(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) < [::1]:0(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) < [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 + osmo_sockaddr_str_cmp(): [0::]:5(zero) < [FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF]:65535 + osmo_sockaddr_str_cmp(): [0::]:5(zero) < [::fffff]:1(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) < [not an ip address]:1(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) < [1.2.3.4]:5(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) > 1:2:3::4:5(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) > 1.2.3.4:5(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) > :5(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) > []:5(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) > 1.2.3.4:0(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) > 1.2.3:4:5:0(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) < [::1:10.9.8.7]:1 + osmo_sockaddr_str_cmp(): [0::]:5(zero) > 0.0.0.0:5(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) == [::]:5(zero) + osmo_sockaddr_str_cmp(): [0::]:5(zero) == [0::]:5(zero) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 07:54:31 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 22 Nov 2019 07:54:31 +0000 Subject: Change in libosmocore[master]: utils.c: fix various inaccurate API doc about return values In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16155 ) Change subject: utils.c: fix various inaccurate API doc about return values ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9ee6416decd23f8d5d634197620a63ae408cead3 Gerrit-Change-Number: 16155 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 22 Nov 2019 07:54:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 09:01:32 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 22 Nov 2019 09:01:32 +0000 Subject: Change in libosmocore[master]: logging.h: define ansi color constants In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16156 ) Change subject: logging.h: define ansi color constants ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16156/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/16156/2//COMMIT_MSG at 12 PS2, Line 12: the "LOG" prefix Do we really need to expose these color constants? If no, you can just put them into logging_internal.h, so there would be no need to use 'OSMO_' prefix. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a Gerrit-Change-Number: 16156 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 22 Nov 2019 09:01:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 09:03:32 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 22 Nov 2019 09:03:32 +0000 Subject: Change in libosmocore[master]: fix DLSMS logging category color: '[1:38m' isn't actually defined In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16157 ) Change subject: fix DLSMS logging category color: '[1:38m' isn't actually defined ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2 Gerrit-Change-Number: 16157 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 22 Nov 2019 09:03:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 09:03:54 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 22 Nov 2019 09:03:54 +0000 Subject: Change in libosmocore[master]: cosmetic: logging.h: fix comment s/levels/subsystems In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16158 ) Change subject: cosmetic: logging.h: fix comment s/levels/subsystems ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I242a4a44649bc4dac055985ba8fd63b2f784ee6d Gerrit-Change-Number: 16158 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 22 Nov 2019 09:03:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 09:20:27 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 22 Nov 2019 09:20:27 +0000 Subject: Change in libosmocore[master]: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16161 ) Change subject: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic8e8bd11522d6c51ac7aaf946516cbce26bc6e1e Gerrit-Change-Number: 16161 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 22 Nov 2019 09:20:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:19:13 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 10:19:13 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#2) to the change originally created by pespin. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 ) Change subject: Fix python-nwdiag dependency on new debian distros ...................................................................... Fix python-nwdiag dependency on new debian distros As seen by https://packages.debian.org, python-nwdiag is only available in buster and older stables, while python3-nwdiag is available in both old and new releases as well as testing and unstable. Related: OS#4246 Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 --- M INSTALL.txt M build/diag-filter.conf M check-depends.sh M debian/control 4 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/52/16152/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Gerrit-Change-Number: 16152 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:19:21 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 10:19:21 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 ) Change subject: Fix python-nwdiag dependency on new debian distros ...................................................................... Patch Set 1: Code-Review+1 Thanks for the patch! I've tried it on a debian 9 system locally, and found that the binaries of nwdiag and packetdiag have a different name in python3-nwdiag: they are called nwdiag3 and packetdiag3 now. So I took the liberty to update the patch, with this version it works on my machine. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Gerrit-Change-Number: 16152 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 22 Nov 2019 10:19:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:24:03 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 10:24:03 +0000 Subject: Change in osmo-ci[master]: docker: install python3-nwdiag References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16168 ) Change subject: docker: install python3-nwdiag ...................................................................... docker: install python3-nwdiag Related: OS#4246 Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2 --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/68/16168/1 diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 1ff2d0b..cec662e 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -6,6 +6,7 @@ ARG DEBIAN_VERSION # Install apt dependencies (keep in alphabetic order) +# python-nwdiag: can be removed once osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 is merged RUN \ dpkg --add-architecture i386 && \ DEBIAN_FRONTEND=noninteractive apt-get update && \ @@ -86,6 +87,7 @@ python3 \ python3-gi \ python3-mako \ + python3-nwdiag \ python3-pip \ python3-pyflakes \ python3-setuptools \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16168 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2 Gerrit-Change-Number: 16168 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:24:47 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 10:24:47 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by pespin. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 ) Change subject: Fix python-nwdiag dependency on new debian distros ...................................................................... Fix python-nwdiag dependency on new debian distros As seen by https://packages.debian.org, python-nwdiag is only available in buster and older stables, while python3-nwdiag is available in both old and new releases as well as testing and unstable. Related: OS#4246 Depends: osmo-ci I0ebee6ac11df779ab954bd6648a0bebefc3350a2 Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 --- M INSTALL.txt M build/diag-filter.conf M check-depends.sh M debian/control 4 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/52/16152/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Gerrit-Change-Number: 16152 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:25:20 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 10:25:20 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 ) Change subject: Fix python-nwdiag dependency on new debian distros ...................................................................... Patch Set 3: Depends on this patch: https://gerrit.osmocom.org/c/osmo-ci/+/16168 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Gerrit-Change-Number: 16152 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 22 Nov 2019 10:25:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:26:43 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 10:26:43 +0000 Subject: Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now) References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16169 ) Change subject: docker: remove python-nwdiag (using nwdiag3 now) ...................................................................... docker: remove python-nwdiag (using nwdiag3 now) Related: OS#4246 Depends: osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097 --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/69/16169/1 diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index cec662e..bc69985 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -6,7 +6,6 @@ ARG DEBIAN_VERSION # Install apt dependencies (keep in alphabetic order) -# python-nwdiag: can be removed once osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 is merged RUN \ dpkg --add-architecture i386 && \ DEBIAN_FRONTEND=noninteractive apt-get update && \ @@ -94,7 +93,6 @@ python3-usb \ python3-yaml \ python-minimal \ - python-nwdiag \ python-pip \ python-pychart \ python-setuptools \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16169 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097 Gerrit-Change-Number: 16169 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:27:13 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 10:27:13 +0000 Subject: Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now) In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16169 ) Change subject: docker: remove python-nwdiag (using nwdiag3 now) ...................................................................... Patch Set 1: Setting to WIP to prevent accidental merge before osmo-gsm-manuals commit is merged. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16169 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097 Gerrit-Change-Number: 16169 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 22 Nov 2019 10:27:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:40:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:40:37 +0000 Subject: Change in osmo-ci[master]: docker: install python3-nwdiag In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16168 ) Change subject: docker: install python3-nwdiag ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16168 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2 Gerrit-Change-Number: 16168 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 10:40:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:40:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:40:49 +0000 Subject: Change in osmo-ci[master]: docker: install python3-nwdiag In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16168 ) Change subject: docker: install python3-nwdiag ...................................................................... docker: install python3-nwdiag Related: OS#4246 Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2 --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 1ff2d0b..cec662e 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -6,6 +6,7 @@ ARG DEBIAN_VERSION # Install apt dependencies (keep in alphabetic order) +# python-nwdiag: can be removed once osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 is merged RUN \ dpkg --add-architecture i386 && \ DEBIAN_FRONTEND=noninteractive apt-get update && \ @@ -86,6 +87,7 @@ python3 \ python3-gi \ python3-mako \ + python3-nwdiag \ python3-pip \ python3-pyflakes \ python3-setuptools \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16168 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2 Gerrit-Change-Number: 16168 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:42:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:42:19 +0000 Subject: Change in libosmocore[master]: utils.c: fix various inaccurate API doc about return values In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16155 ) Change subject: utils.c: fix various inaccurate API doc about return values ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9ee6416decd23f8d5d634197620a63ae408cead3 Gerrit-Change-Number: 16155 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 10:42:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:42:20 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:42:20 +0000 Subject: Change in libosmocore[master]: utils.c: fix various inaccurate API doc about return values In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16155 ) Change subject: utils.c: fix various inaccurate API doc about return values ...................................................................... utils.c: fix various inaccurate API doc about return values Change-Id: I9ee6416decd23f8d5d634197620a63ae408cead3 --- M src/utils.c 1 file changed, 3 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/src/utils.c b/src/utils.c index ea1de0f..6fc2ee6 100644 --- a/src/utils.c +++ b/src/utils.c @@ -280,7 +280,7 @@ * \param[out] buf_len size of buf in bytes * \param[in] bits A sequence of unpacked bits * \param[in] len Length of bits - * \returns string representation in static buffer. + * \return The output buffer (buf). */ char *osmo_ubit_dump_buf(char *buf, size_t buf_len, const uint8_t *bits, unsigned int len) { @@ -672,7 +672,7 @@ * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). - * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + * \return The output buffer (buf). */ char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) { @@ -763,7 +763,7 @@ * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length. - * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + * \return The output buffer (buf). */ char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) { @@ -808,7 +808,6 @@ } /*! Like osmo_quote_str_buf() but returns the result in a dynamically-allocated buffer. - * The static buffer is shared with get_value_string() and osmo_escape_str(). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length. * \returns dynamically-allocated buffer containing a quoted and escaped representation. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9ee6416decd23f8d5d634197620a63ae408cead3 Gerrit-Change-Number: 16155 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:42:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:42:59 +0000 Subject: Change in libosmocore[master]: logging.h: define ansi color constants In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16156 ) Change subject: logging.h: define ansi color constants ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16156/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/16156/2//COMMIT_MSG at 12 PS2, Line 12: the "LOG" prefix > Do we really need to expose these color constants? If no, you can just put them into logging_interna [?] very good idea! -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a Gerrit-Change-Number: 16156 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 10:42:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:43:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:43:31 +0000 Subject: Change in libosmocore[master]: cosmetic: logging.h: fix comment s/levels/subsystems In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16158 ) Change subject: cosmetic: logging.h: fix comment s/levels/subsystems ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I242a4a44649bc4dac055985ba8fd63b2f784ee6d Gerrit-Change-Number: 16158 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 10:43:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:43:50 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:43:50 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 10:43:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:43:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:43:52 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte... In-Reply-To: References: Message-ID: laforge has removed a vote from this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order ...................................................................... Removed Code-Review+2 by laforge -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: deleteVote -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:43:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:43:55 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 10:43:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:44:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:44:11 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 10:44:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:44:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:44:30 +0000 Subject: Change in libosmocore[master]: fix osmo_escape_str_c() and osmo_quote_str_c() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16159 ) Change subject: fix osmo_escape_str_c() and osmo_quote_str_c() ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8 Gerrit-Change-Number: 16159 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 10:44:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:46:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:46:48 +0000 Subject: Change in libosmocore[master]: add osmo_escape_c_str and osmo_quote_c_str In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16160 ) Change subject: add osmo_escape_c_str and osmo_quote_c_str ...................................................................... Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16160/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/16160/3//COMMIT_MSG at 7 PS3, Line 7: _str and osmo_quote_c_str the actual functions don't have underscores between c and str, let's avoid that inconsistency. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3dfb892036e01000033dd8e7e4a6a0c32a3caa9b Gerrit-Change-Number: 16160 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 10:46:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 10:47:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 10:47:13 +0000 Subject: Change in libosmocore[master]: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16161 ) Change subject: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic8e8bd11522d6c51ac7aaf946516cbce26bc6e1e Gerrit-Change-Number: 16161 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 10:47:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 11:23:16 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 11:23:16 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 ) Change subject: Fix python-nwdiag dependency on new debian distros ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Gerrit-Change-Number: 16152 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 22 Nov 2019 11:23:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 11:58:56 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 11:58:56 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 ) Change subject: Fix python-nwdiag dependency on new debian distros ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Gerrit-Change-Number: 16152 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 11:58:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:05:15 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 12:05:15 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 ) Change subject: Fix python-nwdiag dependency on new debian distros ...................................................................... Fix python-nwdiag dependency on new debian distros As seen by https://packages.debian.org, python-nwdiag is only available in buster and older stables, while python3-nwdiag is available in both old and new releases as well as testing and unstable. Related: OS#4246 Depends: osmo-ci I0ebee6ac11df779ab954bd6648a0bebefc3350a2 Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 --- M INSTALL.txt M build/diag-filter.conf M check-depends.sh M debian/control 4 files changed, 6 insertions(+), 6 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/INSTALL.txt b/INSTALL.txt index 3166bfa..3f4ef9f 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -10,7 +10,7 @@ mscgen \ graphviz \ python-pychart \ - python-nwdiag + python3-nwdiag (Note that asciidoc-dblatex is required from debian 9 on and did not exist before.) diff --git a/build/diag-filter.conf b/build/diag-filter.conf index 4f6005e..0c30db7 100644 --- a/build/diag-filter.conf +++ b/build/diag-filter.conf @@ -49,7 +49,7 @@ [nwdiag-filter-style] -nwdiag-style=template="nwdiag-block",subs=(),posattrs=("style","target"),filter='nwdiag -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -T{format={basebackend-docbook!png}{basebackend-docbook?png}} - && echo " "' +nwdiag-style=template="nwdiag-block",subs=(),posattrs=("style","target"),filter='nwdiag3 -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -T{format={basebackend-docbook!png}{basebackend-docbook?png}} - && echo " "' [blockdef-listing] template::[nwdiag-filter-style] @@ -62,7 +62,7 @@ [packetdiag-filter-style] -packetdiag-style=template="packetdiag-block",subs=(),posattrs=("style","target"),filter='packetdiag -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -T{format={basebackend-docbook!png}{basebackend-docbook?png}} - && echo " "' +packetdiag-style=template="packetdiag-block",subs=(),posattrs=("style","target"),filter='packetdiag3 -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -T{format={basebackend-docbook!png}{basebackend-docbook?png}} - && echo " "' [blockdef-listing] template::[packetdiag-filter-style] diff --git a/check-depends.sh b/check-depends.sh index ec3f26f..d640abf 100755 --- a/check-depends.sh +++ b/check-depends.sh @@ -21,7 +21,7 @@ check_dep_bin a2x asciidoc check_dep_bin asciidoc asciidoc check_dep_bin dblatex dblatex -check_dep_bin packetdiag nwdiag +check_dep_bin packetdiag3 python3-nwdiag check_dep_bin dot graphviz check_dep_bin python2 python2 check_dep_python2_module pychart python2-pychart diff --git a/debian/control b/debian/control index 0f89d0a..afd09a3 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ libxml2-utils, mscgen, python, - python-nwdiag, + python3-nwdiag, python-pychart, xsltproc Standards-Version: 3.9.8 @@ -32,7 +32,7 @@ libxml2-utils, mscgen, python, - python-nwdiag, + python3-nwdiag, python-pychart, xsltproc Description: Osmocom manuals shared code -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Gerrit-Change-Number: 16152 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:05:36 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 12:05:36 +0000 Subject: Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now) In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16169 ) Change subject: docker: remove python-nwdiag (using nwdiag3 now) ...................................................................... Patch Set 1: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16169 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097 Gerrit-Change-Number: 16169 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 22 Nov 2019 12:05:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:32:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 12:32:03 +0000 Subject: Change in libosmocore[master]: vty: track parent nodes also for telnet sessions In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16162 ) Change subject: vty: track parent nodes also for telnet sessions ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 Gerrit-Change-Number: 16162 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 12:32:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:32:10 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 12:32:10 +0000 Subject: Change in libosmocore[master]: fsm.h: add missing include of logging.h In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16163 ) Change subject: fsm.h: add missing include of logging.h ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16163 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I783bf0eb40b674fb6a77f7673563fdf156975f5a Gerrit-Change-Number: 16163 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 12:32:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:32:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 12:32:25 +0000 Subject: Change in libosmocore[master]: msgb_put: more elaborate logging of head/tailroom failure In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16164 ) Change subject: msgb_put: more elaborate logging of head/tailroom failure ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16164 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726 Gerrit-Change-Number: 16164 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 12:32:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:32:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 12:32:55 +0000 Subject: Change in libosmocore[master]: utils_test: add osmo_print_n_test() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16165 ) Change subject: utils_test: add osmo_print_n_test() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16165 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia716abdc1f58af6065b84f4f567388a32a7b39fc Gerrit-Change-Number: 16165 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 12:32:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:33:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 12:33:17 +0000 Subject: Change in libosmocore[master]: utils: add osmo_strnchr() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16166 ) Change subject: utils: add osmo_strnchr() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16166 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I48f8ace9f51f8a06796648883afcabe3b4e8b537 Gerrit-Change-Number: 16166 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 12:33:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:33:38 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 12:33:38 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16167 ) Change subject: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16167 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic7fc279bf3c741811cfc002538e28e8f8560e338 Gerrit-Change-Number: 16167 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 12:33:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:33:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 12:33:58 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16153 ) Change subject: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef Gerrit-Change-Number: 16153 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 12:33:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:34:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 12:34:21 +0000 Subject: Change in osmo-remsim[master]: bankd_client_fsm: close IPA client connection before re-establishing it In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/15997 ) Change subject: bankd_client_fsm: close IPA client connection before re-establishing it ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/15997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: If87f4bbc133e4dc812fa96a75e8495bad65275aa Gerrit-Change-Number: 15997 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 12:34:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 12:34:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 12:34:22 +0000 Subject: Change in osmo-remsim[master]: bankd_client_fsm: close IPA client connection before re-establishing it In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/15997 ) Change subject: bankd_client_fsm: close IPA client connection before re-establishing it ...................................................................... bankd_client_fsm: close IPA client connection before re-establishing it ipa_client_conn_destroy() really only destroys the object, but not close the underlying file descriptor. This leads to old connections lingering around, which in turn (in case of the remsim client) will occupy banksim worker threads. Change-Id: If87f4bbc133e4dc812fa96a75e8495bad65275aa --- M src/bankd_client_fsm.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/bankd_client_fsm.c b/src/bankd_client_fsm.c index 8cc773a..cedb597 100644 --- a/src/bankd_client_fsm.c +++ b/src/bankd_client_fsm.c @@ -152,6 +152,7 @@ /* re-create bankd_conn */ if (bc->bankd_conn) { LOGPFSML(fi, LOGL_INFO, "Destroying existing connection to bankd\n"); + ipa_client_conn_close(bc->bankd_conn); ipa_client_conn_destroy(bc->bankd_conn); bc->bankd_conn = NULL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/15997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: If87f4bbc133e4dc812fa96a75e8495bad65275aa Gerrit-Change-Number: 15997 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 13:18:48 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 22 Nov 2019 13:18:48 +0000 Subject: Change in osmo-bts[master]: rsl: ensure measurement reports are sent References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16170 ) Change subject: rsl: ensure measurement reports are sent ...................................................................... rsl: ensure measurement reports are sent osmo-bts currently does not generate a measurement report in case the SACCH of the related traffic channel is lost. This is a problem because the moment when reception gets bad measurmenet reporting is crucial to carry out handover decisions effectively. The presence of a SACCH block controls the conclusion of the measurement interval and the sending of the RSL measurement report. The latter one not only requires a measurmenet indication, it also requires a fully intact SACCH block. Lets use the NOPE / IDLE indications from V1 of the TRXD protocol to ensure a SACCH block is always reported up to l1sap.c. In cases where the SACCH is bad, trigger the sending of the RSL measurement report manually without attaching the measurmenet data from the MS (which we do not have in this case) Related: OS#2975 Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2 --- M include/osmo-bts/rsl.h M src/common/l1sap.c M src/common/rsl.c M src/common/scheduler.c 4 files changed, 24 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/16170/1 diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h index 186018e..ff6c2a8 100644 --- a/include/osmo-bts/rsl.h +++ b/include/osmo-bts/rsl.h @@ -45,4 +45,6 @@ int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool overflow, uint8_t amount); +int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, const struct lapdm_entity *le); + #endif // _RSL_H */ diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 7bf0b09..47368b7 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1235,8 +1235,20 @@ /* bad frame */ if (len == 0) { - if (L1SAP_IS_LINK_SACCH(link_id)) + if (L1SAP_IS_LINK_SACCH(link_id)) { + + /* In case we loose a SACCH block on the traffic we + * must take care that the related measurement report + * is sent via RSL. This is a fallback method. The + * report will also lack the measurement report from + * the MS side. See also rsl.c:lapdm_rll_tx_cb() */ + if (lchan->type == GSM_LCHAN_TCH_F || lchan->type == GSM_LCHAN_TCH_H) { + le = &lchan->lapdm_ch.lapdm_acch; + rsl_tx_meas_res(lchan, NULL, 0, le); + } + radio_link_timeout(lchan, 1); + } return -EINVAL; } diff --git a/src/common/rsl.c b/src/common/rsl.c index 09a9217..61f3a38 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2837,8 +2837,8 @@ uint16_t toa256_std_dev; } __attribute__((packed)); -/* 8.4.8 MEASUREMENT RESult */ -static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, const struct lapdm_entity *le) +/* Compose and send 8.4.8 MEASUREMENT RESult via RSL */ +int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, const struct lapdm_entity *le) { struct msgb *msg; uint8_t meas_res[16]; @@ -2898,9 +2898,12 @@ msgb_tv_fixed_put(msg, RSL_IE_L1_INFO, 2, lchan->meas.l1_info); lchan->meas.flags &= ~LC_UL_M_F_L1_VALID; } - msgb_tl16v_put(msg, RSL_IE_L3_INFO, l3_len, l3); + + if (l3 && l3_len > 0) + msgb_tl16v_put(msg, RSL_IE_L3_INFO, l3_len, l3); if (ms_to_valid(lchan)) { - msgb_tv_put(msg, RSL_IE_MS_TIMING_OFFSET, ms_to2rsl(lchan, le)); + if (l3 && l3_len > 0) + msgb_tv_put(msg, RSL_IE_MS_TIMING_OFFSET, ms_to2rsl(lchan, le)); lchan->ms_t_offs = -1; lchan->p_offs = -1; } diff --git a/src/common/scheduler.c b/src/common/scheduler.c index fe93c32..1c2755e 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -191,6 +191,7 @@ .rts_fn = rts_tchf_fn, .dl_fn = tx_tchf_fn, .ul_fn = rx_tchf_fn, + .nope_fn = rx_tchf_fn, }, [TRXC_TCHH_0] = { .name = "TCH/H(0)", /* 3GPP TS 05.02, section 3.2 */ @@ -365,6 +366,7 @@ .rts_fn = rts_data_fn, .dl_fn = tx_data_fn, .ul_fn = rx_data_fn, + .nope_fn = rx_data_fn, }, [TRXC_SACCHTH_0] = { .name = "SACCH/TH(0)", /* 3GPP TS 05.02, section 3.3.4.1 */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2 Gerrit-Change-Number: 16170 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 13:39:42 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 13:39:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 ) Change subject: msc: overhaul voice call testing ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 13:39:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 13:41:32 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 13:41:32 +0000 Subject: Change in libosmocore[master]: fix DLSMS logging category color: '[1:38m' isn't actually defined In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16157 ) Change subject: fix DLSMS logging category color: '[1:38m' isn't actually defined ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2 Gerrit-Change-Number: 16157 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 13:41:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 13:50:37 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 13:50:37 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order ...................................................................... Patch Set 5: So if I understood correctly, we have users using a osmo_sockaddr_str_to_32n() (where n clearly states network-byte, as well as its documentation indicates) hoping it would convert it to host-byte simply because the implementation was wrong? That's a bug in the users then, I'm still not sure the best way to fix it is by doing this change this way. If you still want to go this way, at least mark that API deprecated since it's clearly a monster we want to get rid as soon as possible. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 13:50:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 13:55:36 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 13:55:36 +0000 Subject: Change in libosmocore[master]: fix osmo_escape_str_c() and osmo_quote_str_c() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16159 ) Change subject: fix osmo_escape_str_c() and osmo_quote_str_c() ...................................................................... Patch Set 3: Code-Review+1 Would be great if you could add some unit tests for the breaking scenarios. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8 Gerrit-Change-Number: 16159 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 13:55:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 13:56:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 13:56:53 +0000 Subject: Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now) In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16169 ) Change subject: docker: remove python-nwdiag (using nwdiag3 now) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16169 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097 Gerrit-Change-Number: 16169 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 13:56:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:00:15 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 14:00:15 +0000 Subject: Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now) In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16169 ) Change subject: docker: remove python-nwdiag (using nwdiag3 now) ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16169 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097 Gerrit-Change-Number: 16169 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 14:00:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:00:17 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 22 Nov 2019 14:00:17 +0000 Subject: Change in osmo-ci[master]: docker: remove python-nwdiag (using nwdiag3 now) In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16169 ) Change subject: docker: remove python-nwdiag (using nwdiag3 now) ...................................................................... docker: remove python-nwdiag (using nwdiag3 now) Related: OS#4246 Depends: osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097 --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, approved osmith: Verified diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index cec662e..bc69985 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -6,7 +6,6 @@ ARG DEBIAN_VERSION # Install apt dependencies (keep in alphabetic order) -# python-nwdiag: can be removed once osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 is merged RUN \ dpkg --add-architecture i386 && \ DEBIAN_FRONTEND=noninteractive apt-get update && \ @@ -94,7 +93,6 @@ python3-usb \ python3-yaml \ python-minimal \ - python-nwdiag \ python-pip \ python-pychart \ python-setuptools \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16169 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097 Gerrit-Change-Number: 16169 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:29:19 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 22 Nov 2019 14:29:19 +0000 Subject: Change in osmo-bts[master]: rsl: ensure measurement reports are sent In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16170 ) Change subject: rsl: ensure measurement reports are sent ...................................................................... Patch Set 1: Code-Review-1 (1 comment) Please fix at least 1). The approach described in 2) can be implemented later. https://gerrit.osmocom.org/c/osmo-bts/+/16170/1/src/common/scheduler.c File src/common/scheduler.c: https://gerrit.osmocom.org/c/osmo-bts/+/16170/1/src/common/scheduler.c at 194 PS1, Line 194: rx_tchf_fn How about TCH/H? Also, I don't think it's a good idea to use generic Uplink handlers directly: 1) NOPE.ind contains no burst (actually an uninitialized buffer), so that would result in accessing uninitialized memory (Coverity will be unhappy, ASAN too); 2) TCH coding involves much less redundancy than xCCH, so losing one burst would probably mean we've lost the whole frame (or even two, due to block-diagonal interleaving) - needs to be checked though. We should probably think about a wrapper function that would check the burst mask (i.e. how many bursts are lost), and either call the corresponding generic handler (e.g. rx_tchf_fn), or update the logical channel state and simply send BFI. This would allow do save some CPU power when we sure that Viterbi decoder would definitely fail. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2 Gerrit-Change-Number: 16170 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 22 Nov 2019 14:29:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:44:37 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 14:44:37 +0000 Subject: Change in libosmocore[master]: vty: track parent nodes also for telnet sessions In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16162 ) Change subject: vty: track parent nodes also for telnet sessions ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/c/libosmocore/+/16162/2/include/osmocom/vty/vty.h File include/osmocom/vty/vty.h: https://gerrit.osmocom.org/c/libosmocore/+/16162/2/include/osmocom/vty/vty.h at 189 PS2, Line 189: int (*is_config_node)(struct vty *vty, int node); worth checking if a field in a struct can be marked as deprecated. https://gerrit.osmocom.org/c/libosmocore/+/16162/2/src/vty/command.c File src/vty/command.c: https://gerrit.osmocom.org/c/libosmocore/+/16162/2/src/vty/command.c at 2361 PS2, Line 2361: llist_add(&parent->entry, &vty->parent_nodes); Don't you need to initialize ->entry beforehand? or having it set to 0 is fine? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 Gerrit-Change-Number: 16162 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 14:44:37 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:45:35 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 14:45:35 +0000 Subject: Change in libosmocore[master]: fsm.h: add missing include of logging.h In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16163 ) Change subject: fsm.h: add missing include of logging.h ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16163 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I783bf0eb40b674fb6a77f7673563fdf156975f5a Gerrit-Change-Number: 16163 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 14:45:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:47:08 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 14:47:08 +0000 Subject: Change in libosmocore[master]: msgb_put: more elaborate logging of head/tailroom failure In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16164 ) Change subject: msgb_put: more elaborate logging of head/tailroom failure ...................................................................... Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16164/2/include/osmocom/core/msgb.h File include/osmocom/core/msgb.h: https://gerrit.osmocom.org/c/libosmocore/+/16164/2/include/osmocom/core/msgb.h at 243 PS2, Line 243: " (allocated %u, head at %u, len %u, tailroom %u < want tailroom %u)\n", isn't msgb->head - msgb->_data a pointer? then use %p instead of %u. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16164 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726 Gerrit-Change-Number: 16164 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 14:47:08 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:50:12 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 14:50:12 +0000 Subject: Change in libosmocore[master]: msgb_put: more elaborate logging of head/tailroom failure In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16164 ) Change subject: msgb_put: more elaborate logging of head/tailroom failure ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16164/2/include/osmocom/core/msgb.h File include/osmocom/core/msgb.h: https://gerrit.osmocom.org/c/libosmocore/+/16164/2/include/osmocom/core/msgb.h at 243 PS2, Line 243: " (allocated %u, head at %u, len %u, tailroom %u < want tailroom %u)\n", > isn't msgb->head - msgb->_data a pointer? then use %p instead of %u. Ah it's fine, sorry. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16164 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726 Gerrit-Change-Number: 16164 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 14:50:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:54:14 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 14:54:14 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16167 ) Change subject: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() ...................................................................... Patch Set 1: Code-Review+1 I'd put this together with the previous commit adding the APIs, since deprecating that one is extremly tight to adding/changing related APIs. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16167 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic7fc279bf3c741811cfc002538e28e8f8560e338 Gerrit-Change-Number: 16167 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 14:54:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:54:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 14:54:55 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order ...................................................................... Patch Set 5: Code-Review+1 I see you deprecated it in a follow-up patch. I'd prefer them merged in here but fine. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 14:54:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:55:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 14:55:09 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16153 ) Change subject: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef Gerrit-Change-Number: 16153 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 14:55:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 14:55:13 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 14:55:13 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16153 ) Change subject: ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board ...................................................................... ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef --- M ansible/host_vars/osmo-gsm-tester-prod.yml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/host_vars/osmo-gsm-tester-prod.yml b/ansible/host_vars/osmo-gsm-tester-prod.yml index 92d8169..a2a5a36 100644 --- a/ansible/host_vars/osmo-gsm-tester-prod.yml +++ b/ansible/host_vars/osmo-gsm-tester-prod.yml @@ -6,6 +6,8 @@ ip: 10.42.42.121 - mac: 00:02:95:00:7c:07 ip: 10.42.42.122 + - mac: b8:27:eb:71:3a:36 + ip: 10.42.42.123 # how many modems are connected via a quadmodem? gsm_modems: 8 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef Gerrit-Change-Number: 16153 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 15:04:30 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 15:04:30 +0000 Subject: Change in osmo-bts[master]: rsl: ensure measurement reports are sent In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16170 ) Change subject: rsl: ensure measurement reports are sent ...................................................................... Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16170/1/src/common/l1sap.c File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/16170/1/src/common/l1sap.c at 1252 PS1, Line 1252: return -EINVAL; That means in this case lchan_ms_pwr_ctrl() is not called and the MS power loop is missing information. For instance it could mean the strength being used by the MS is not enough and precisely lchan_ms_pwr_ctrl() should be notified so that BTS can instruct the MS to increase the signal strength. If in this case we don't have block data (data[0]) then MS Power Level value is not available for lchan_ms_pwr_ctrl(). In that case I'd probably makes sense to pass a special value to it, for instance -1, so that it knows the value is not available. Internally it can then for instance use lchan->ms_power_ctrl.current as input for calculations, or simply raise the current MS Power level if rssi is detected to be bad. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2 Gerrit-Change-Number: 16170 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 15:04:30 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 15:07:09 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 22 Nov 2019 15:07:09 +0000 Subject: Change in libosmocore[master]: logging.h: define ansi color constants In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16156 ) Change subject: logging.h: define ansi color constants ...................................................................... Patch Set 2: On the other hand, we may want to use these constants from other osmo-* projects... -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a Gerrit-Change-Number: 16156 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 22 Nov 2019 15:07:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 15:30:15 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 15:30:15 +0000 Subject: Change in osmo-gsm-manuals[master]: trx_if.adoc: Fix typo and formatting of bullet list References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16171 ) Change subject: trx_if.adoc: Fix typo and formatting of bullet list ...................................................................... trx_if.adoc: Fix typo and formatting of bullet list Change-Id: I45c3ea655139d4777100af02d6b0d9cbf25b02e5 --- M common/chapters/trx_if.adoc 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/71/16171/1 diff --git a/common/chapters/trx_if.adoc b/common/chapters/trx_if.adoc index 6dd680b..d9f074a 100644 --- a/common/chapters/trx_if.adoc +++ b/common/chapters/trx_if.adoc @@ -11,6 +11,7 @@ Given a base port `B` (5700), and a set of channels `0..N`, the ports related to a channel `0 <= X <= N` are: + * The Master clock interface is located on port `P=B`. * The `TRXC` interface for channel `X` is located on port `P=B+2X+1` * The `TRXD` interface for channel `X` is located on port `P=B+2X+2`. @@ -152,11 +153,12 @@ code of the response message should indicate a preferred (basically, the latest) version. The format of this message is the following: ---- -CMD SETFORMAT +CMD SETFORMAT RSP SETFORMAT ---- where: + * `` is the requested version (suggested by the BTS), * `` is either the applied version if matches ``, or a preferred version if `` is not supported. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16171 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I45c3ea655139d4777100af02d6b0d9cbf25b02e5 Gerrit-Change-Number: 16171 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 15:54:08 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 22 Nov 2019 15:54:08 +0000 Subject: Change in osmo-gsm-manuals[master]: trx_if.adoc: Fix typo and formatting of bullet list In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16171 ) Change subject: trx_if.adoc: Fix typo and formatting of bullet list ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16171 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I45c3ea655139d4777100af02d6b0d9cbf25b02e5 Gerrit-Change-Number: 16171 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 22 Nov 2019 15:54:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 15:57:29 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 15:57:29 +0000 Subject: Change in osmo-gsm-manuals[master]: trx_if.adoc: Fix typo and formatting of bullet list In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16171 ) Change subject: trx_if.adoc: Fix typo and formatting of bullet list ...................................................................... trx_if.adoc: Fix typo and formatting of bullet list Change-Id: I45c3ea655139d4777100af02d6b0d9cbf25b02e5 --- M common/chapters/trx_if.adoc 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/common/chapters/trx_if.adoc b/common/chapters/trx_if.adoc index 6dd680b..d9f074a 100644 --- a/common/chapters/trx_if.adoc +++ b/common/chapters/trx_if.adoc @@ -11,6 +11,7 @@ Given a base port `B` (5700), and a set of channels `0..N`, the ports related to a channel `0 <= X <= N` are: + * The Master clock interface is located on port `P=B`. * The `TRXC` interface for channel `X` is located on port `P=B+2X+1` * The `TRXD` interface for channel `X` is located on port `P=B+2X+2`. @@ -152,11 +153,12 @@ code of the response message should indicate a preferred (basically, the latest) version. The format of this message is the following: ---- -CMD SETFORMAT +CMD SETFORMAT RSP SETFORMAT ---- where: + * `` is the requested version (suggested by the BTS), * `` is either the applied version if matches ``, or a preferred version if `` is not supported. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16171 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I45c3ea655139d4777100af02d6b0d9cbf25b02e5 Gerrit-Change-Number: 16171 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 16:01:58 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 16:01:58 +0000 Subject: Change in libosmo-sccp[master]: ss7: Set Traffic Mode and Route Ctx in ASPAC msg if set in VTY In-Reply-To: References: Message-ID: pespin has abandoned this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15817 ) Change subject: ss7: Set Traffic Mode and Route Ctx in ASPAC msg if set in VTY ...................................................................... Abandoned properly implemented and already merged in another patch. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15817 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Icce0e672f6180ebc92ca34f538d41161d02fecb9 Gerrit-Change-Number: 15817 Gerrit-PatchSet: 6 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 16:03:40 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 16:03:40 +0000 Subject: Change in osmo-bts[master]: Unify common and bts-trx power control loop VTY command In-Reply-To: References: Message-ID: pespin has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16058 ) Change subject: Unify common and bts-trx power control loop VTY command ...................................................................... Abandoned superseded by https://gerrit.osmocom.org/c/osmo-bts/+/16072 and previous commits. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I8fb310b2aee7780982bd9394bc5e758dfd66be25 Gerrit-Change-Number: 16058 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 17:38:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 17:38:06 +0000 Subject: Change in osmo-bts[master]: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16080 ) Change subject: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6 Gerrit-Change-Number: 16080 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 17:38:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 17:38:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 17:38:07 +0000 Subject: Change in osmo-bts[master]: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16080 ) Change subject: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields ...................................................................... pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields Since there can be multiple PDCH channels configured on different timeslots, different TRXes, and BTSes, the PTCCH/U handling code in OsmoPCU needs to know the exact origin of a given RACH.ind. Otherwise, it is not known which subscriber originated a given PTCCH/U indication, and hence it is impossible to send PTCCH/D Timing Advance notification properly. Fortunately, we can extend the RACH.ind message without even bumping the protocol version, because every single PDU has a fixed size defined by the largest message - INFO.ind. In case if the actual message payload is smaller, the rest is filled with a constant padding byte (0x00). Older versions of OsmoPCU will consider the new fields as padding, while the messages from older OsmoBTS versions will always have both fields set to 0x00. Since C0/TS0 cannot be configured to PDCH, this can be easily detected on the other end. Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6 Related: OS#4102, OS#1545 --- M include/osmo-bts/pcu_if.h M include/osmo-bts/pcuif_proto.h M src/common/l1sap.c M src/common/pcu_sock.c 4 files changed, 15 insertions(+), 7 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h index f34e0cd..1475a94 100644 --- a/include/osmo-bts/pcu_if.h +++ b/include/osmo-bts/pcu_if.h @@ -11,8 +11,9 @@ int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len, int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual); -int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, - uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi); +int pcu_tx_rach_ind(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, + int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit, + enum ph_burst_type burst_type, uint8_t sapi); int pcu_tx_time_ind(uint32_t fn); int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed); int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len); diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index 2d24c43..e977914 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -108,6 +108,8 @@ uint16_t arfcn; uint8_t is_11bit; uint8_t burst_type; + uint8_t trx_nr; + uint8_t ts_nr; } __attribute__ ((packed)); struct gsm_pcu_if_info_trx { diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 7bf0b09..e640ce9 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1403,7 +1403,8 @@ rach_ind->acc_delay_256bits); /* QTA: Timing Advance in units of 1/4 of a symbol */ - pcu_tx_rach_ind(trx->bts, rach_ind->acc_delay_256bits >> 6, + pcu_tx_rach_ind(trx->bts->nr, trx->nr, rach_ind->chan_nr & 0x07, + rach_ind->acc_delay_256bits >> 6, rach_ind->ra, rach_ind->fn, rach_ind->is_11bit, rach_ind->burst_type, PCU_IF_SAPI_PTCCH); return 0; @@ -1466,7 +1467,8 @@ rach_ind->acc_delay, rach_ind->ra); /* QTA: Timing Advance in units of 1/4 of a symbol */ - pcu_tx_rach_ind(bts, rach_ind->acc_delay_256bits >> 6, + pcu_tx_rach_ind(bts->nr, trx->nr, rach_ind->chan_nr & 0x07, + rach_ind->acc_delay_256bits >> 6, rach_ind->ra, rach_ind->fn, rach_ind->is_11bit, rach_ind->burst_type, PCU_IF_SAPI_RACH); return 0; diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 9fc1d4d..579f8cc 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -379,8 +379,9 @@ return pcu_sock_send(&bts_gsmnet, msg); } -int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, - uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi) +int pcu_tx_rach_ind(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, + int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit, + enum ph_burst_type burst_type, uint8_t sapi) { struct msgb *msg; struct gsm_pcu_if *pcu_prim; @@ -389,7 +390,7 @@ LOGP(DPCU, LOGL_INFO, "Sending RACH indication: qta=%d, ra=%d, " "fn=%d\n", qta, ra, fn); - msg = pcu_msgb_alloc(PCU_IF_MSG_RACH_IND, bts->nr); + msg = pcu_msgb_alloc(PCU_IF_MSG_RACH_IND, bts_nr); if (!msg) return -ENOMEM; pcu_prim = (struct gsm_pcu_if *) msg->data; @@ -401,6 +402,8 @@ rach_ind->fn = fn; rach_ind->is_11bit = is_11bit; rach_ind->burst_type = burst_type; + rach_ind->trx_nr = trx_nr; + rach_ind->ts_nr = ts_nr; return pcu_sock_send(&bts_gsmnet, msg); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6 Gerrit-Change-Number: 16080 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 17:39:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 17:39:39 +0000 Subject: Change in libosmocore[master]: libosmogsm: add support for XOR authentication In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/7310 ) Change subject: libosmogsm: add support for XOR authentication ...................................................................... Patch Set 5: Verified+1 Code-Review+2 > > [...] and the card is broken. > > Are you testing on sysmoUSIM-SJS1? no, a new product called sysmoTSIM-SJA1. And with an update to the card I just verified that this patch is correct. > Are you sure sysmoUSIM-SJS1 actually does > support XOR? no, it seems broken, unfortunately. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/7310 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1afaf0a9e2dce43aec87964bacefb21ed4d3d565 Gerrit-Change-Number: 7310 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Fri, 22 Nov 2019 17:39:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 17:39:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 17:39:42 +0000 Subject: Change in libosmocore[master]: libosmogsm: add support for XOR authentication In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/7310 ) Change subject: libosmogsm: add support for XOR authentication ...................................................................... libosmogsm: add support for XOR authentication Change-Id: I1afaf0a9e2dce43aec87964bacefb21ed4d3d565 Related: OS#2475 --- M src/gsm/Makefile.am A src/gsm/auth_xor.c 2 files changed, 188 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved; Verified Jenkins Builder: Verified diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 0aa0de3..f13ba9d 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -26,7 +26,7 @@ gprs_cipher_core.c gprs_rlc.c gsm0480.c abis_nm.c gsm0502.c \ gsm0411_utils.c gsm0411_smc.c gsm0411_smr.c gsm0414.c \ lapd_core.c lapdm.c kasumi.c gsm29205.c gsm_04_08_gprs.c \ - auth_core.c auth_comp128v1.c auth_comp128v23.c \ + auth_core.c auth_comp128v1.c auth_comp128v23.c auth_xor.c \ auth_milenage.c milenage/aes-encblock.c gea.c \ milenage/aes-internal.c milenage/aes-internal-enc.c \ milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \ diff --git a/src/gsm/auth_xor.c b/src/gsm/auth_xor.c new file mode 100644 index 0000000..36e006e --- /dev/null +++ b/src/gsm/auth_xor.c @@ -0,0 +1,187 @@ +/*! \file auth_xor.c + * GSM/GPRS/3G authentication core infrastructure */ +/* + * (C) 2018 by Harald Welte + * (C) 2017 by sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * Author: Daniel Willmann + * + * 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 + +/*! \addtogroup auth + * @{ + */ + +static void xor(uint8_t *out, const uint8_t *a, const uint8_t *b, size_t len) +{ + size_t i; + + for (i = 0; i < len; i++) + out[i] = a[i] ^ b[i]; +} + +/* 3GPP TS 34.108, section 8.1.2.1 */ +static int xor_gen_vec(struct osmo_auth_vector *vec, + struct osmo_sub_auth_data *aud, + const uint8_t *_rand) +{ + uint8_t xdout[16], cdout[8]; + uint8_t ak[6], xmac[8]; + int i; + + /* Step 1: xdout = (ki or k) ^ rand */ + if (aud->type == OSMO_AUTH_TYPE_GSM) + xor(xdout, aud->u.gsm.ki, _rand, sizeof(xdout)); + else if (aud->type == OSMO_AUTH_TYPE_UMTS) + xor(xdout, aud->u.umts.k, _rand, sizeof(xdout)); + else + return -ENOTSUP; + + /** + * Step 2: res = xdout + * + * Suggested length for res is 128 bits, i.e. 16 bytes, + * but also can be in range: 30 < n < 128 bits. + */ + memcpy(vec->res, xdout, sizeof(xdout)); + vec->res_len = sizeof(xdout); + + /* ck = xdout[1-15,0] */ + memcpy(vec->ck, xdout + 1, sizeof(xdout) - 1); + vec->ck[15] = xdout[0]; + + /* ik = xdout[2-15,0-1] */ + memcpy(vec->ik, xdout + 2, sizeof(xdout) - 2); + memcpy(vec->ik + sizeof(xdout) - 2, xdout, 2); + + /* ak = xdout[3-8] */ + memcpy(ak, xdout + 3, sizeof(ak)); + + /** + * 3GPP TS 33.102, clause 6.8.1.2, b + * sres = c2(res) = res[0-3] ^ res[4-7] ^ res[8-11] ^ res[12-15] + */ + for (i = 0; i < 4; i++) { + vec->sres[i] = vec->res[i] ^ vec->res[i + 4]; + vec->sres[i] ^= vec->res[i + 8] ^ vec->res[i + 12]; + } + + /** + * 3GPP TS 33.102, clause 6.8.1.2, c + * kc = c3(ck, ik) = ck[0-7] ^ ck[8-15] ^ ik[0-7] ^ ik[8-15] + * FIXME: do we really have CK/IK for GSM? + */ + osmo_auth_c3(vec->kc, vec->ck, vec->ik); + + /* The further part is UMTS specific */ + if (aud->type != OSMO_AUTH_TYPE_UMTS) { + vec->auth_types = OSMO_AUTH_TYPE_GSM; + return 0; + } + + /** + * Step 3: cdout = sqn[0-5] || amf[0-1] + * NOTE (for USIM): sqn[0-5] = autn[0-5] ^ ak[0-5] + */ + osmo_store64be_ext(aud->u.umts.sqn, cdout, 6); + memcpy(cdout + 6, aud->u.umts.amf, 2); + + /* Step 4: xmac = xdout[0-8] ^ cdout[0-8] */ + xor(xmac, xdout, cdout, sizeof(xmac)); + + /** + * Step 5: autn = sqn ^ ak || amf || mac + * NOTE: cdout still contains SQN from step 3 + */ + xor(vec->autn, cdout, ak, sizeof(ak)); + memcpy(vec->autn + 6, aud->u.umts.amf, 2); + memcpy(vec->autn + 8, xmac, sizeof(xmac)); + + vec->auth_types = OSMO_AUTH_TYPE_UMTS | OSMO_AUTH_TYPE_GSM; + + return 0; +} + +/* 3GPP TS 34.108, section 8.1.2.2 */ +static int xor_gen_vec_auts(struct osmo_auth_vector *vec, + struct osmo_sub_auth_data *aud, + const uint8_t *auts, + const uint8_t *rand_auts, + const uint8_t *_rand) +{ + uint8_t xdout[16], cdout[8]; + uint8_t ak[6], xmac[8]; + uint8_t sqnms[6]; + + /* Step 1: xdout = (ki or k) ^ rand */ + if (aud->type == OSMO_AUTH_TYPE_GSM) + xor(xdout, aud->u.gsm.ki, _rand, sizeof(xdout)); + else if (aud->type == OSMO_AUTH_TYPE_UMTS) + xor(xdout, aud->u.umts.k, _rand, sizeof(xdout)); + else + return -ENOTSUP; + + /* Step 2: ak = xdout[2-8] */ + memcpy(ak, xdout + 3, 6); + + /* sqnms = auts[0-5] ^ ak[0-5] */ + xor(sqnms, auts, ak, sizeof(ak)); + + /* cdout = sqnms || amf* (dummy) */ + memcpy(cdout, sqnms, 6); + memset(cdout + 6, 0x00, 2); + + /* xmac = xdout[0-7] ^ cdout[0-7] */ + xor(xmac, xdout, cdout, 8); + + /* Compare the last 64 bits of received AUTS with the locally-generated MAC-S */ + if (memcmp(auts + 6, xmac, 8)) + return -1; + + /* Update the "largest used SQN" from the USIM, + * milenage_gen_vec() will increment it. */ + aud->u.umts.sqn_ms = osmo_load64be_ext(sqnms, 6) >> 16; + aud->u.umts.sqn = aud->u.umts.sqn_ms; + + return xor_gen_vec(vec, aud, _rand); +} + +static struct osmo_auth_impl xor_alg = { + .algo = OSMO_AUTH_ALG_XOR, + .name = "XOR (libosmogsm built-in)", + .priority = 1000, + .gen_vec = &xor_gen_vec, + .gen_vec_auts = &xor_gen_vec_auts, +}; + +static __attribute__((constructor)) void on_dso_load_xor(void) +{ + osmo_auth_register(&xor_alg); +} + +/*! @} */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/7310 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1afaf0a9e2dce43aec87964bacefb21ed4d3d565 Gerrit-Change-Number: 7310 Gerrit-PatchSet: 6 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 17:51:41 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 22 Nov 2019 17:51:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 ) Change subject: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1 Gerrit-Change-Number: 16081 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 17:51:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 18:28:57 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 22 Nov 2019 18:28:57 +0000 Subject: Change in osmo-msc[master]: counters: clarify documentation for some MSC_CTR_SMS_* entries References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16172 ) Change subject: counters: clarify documentation for some MSC_CTR_SMS_* entries ...................................................................... counters: clarify documentation for some MSC_CTR_SMS_* entries Change-Id: I081cf962ce2658ceab02699f3cdee19658d00939 Related: OS#4273 --- M doc/manuals/chapters/counters_generated.adoc M include/osmocom/msc/gsm_data.h 2 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/72/16172/1 diff --git a/doc/manuals/chapters/counters_generated.adoc b/doc/manuals/chapters/counters_generated.adoc index 1b40d8b..4a92e79 100644 --- a/doc/manuals/chapters/counters_generated.adoc +++ b/doc/manuals/chapters/counters_generated.adoc @@ -23,9 +23,9 @@ | sms:submitted | <> | Received a RPDU from a MS (MO). | sms:no_receiver | <> | Counts SMS which couldn't routed because no receiver found. | sms:delivered | <> | Global SMS Deliver attempts. -| sms:rp_err_mem | <> | CAUSE_MT_MEM_EXCEEDED errors of MS responses on a sms deliver attempt. -| sms:rp_err_other | <> | Other error of MS responses on a sms delive attempt. -| sms:deliver_unknown_error | <> | Unknown error occurred during sms delivery. +| sms:rp_err_mem | <> | Failed MT SMS delivery attempts (no memory). +| sms:rp_err_other | <> | Failed MT SMS delivery attempts (other reason). +| sms:deliver_unknown_error | <> | Failed MO SMS delivery attempts. | call:mo_setup | <> | Received setup requests from a MS to init a MO call. | call:mo_connect_ack | <> | Received a connect ack from MS of a MO call. Call is now succesful connected up. | call:mt_setup | <> | Sent setup requests to the MS (MT). diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 11b6e82..0ff0d4e 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -78,9 +78,9 @@ [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 occurred during sms delivery."}, + [MSC_CTR_SMS_RP_ERR_MEM] = {"sms:rp_err_mem", "Failed MT SMS delivery attempts (no memory)."}, + [MSC_CTR_SMS_RP_ERR_OTHER] = {"sms:rp_err_other", "Failed MT SMS delivery attempts (other reason)."}, + [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms:deliver_unknown_error", "Failed MO SMS delivery attempts."}, /* 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."}, -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16172 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I081cf962ce2658ceab02699f3cdee19658d00939 Gerrit-Change-Number: 16172 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 18:52:56 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 18:52:56 +0000 Subject: Change in osmo-msc[master]: counters: clarify documentation for some MSC_CTR_SMS_* entries In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16172 ) Change subject: counters: clarify documentation for some MSC_CTR_SMS_* entries ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16172 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I081cf962ce2658ceab02699f3cdee19658d00939 Gerrit-Change-Number: 16172 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 18:52:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 21:09:46 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 21:09:46 +0000 Subject: Change in osmo-gsm-tester[master]: WIP References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16173 ) Change subject: WIP ...................................................................... WIP Change-Id: I15da34c9467e46ae92adbce5f671b344bea5ee5a --- M example/resources.conf.prod M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/process.py M src/osmo_gsm_tester/resource.py 4 files changed, 71 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/73/16173/1 diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 0bf9f45..826ed4f 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -62,6 +62,22 @@ trx_ip: 10.42.42.117 clock_reference: external dev_args: "LimeSDR-USB,serial=00090706024F0A22" + channels: + - rx_path: "LNAW" + +- label: LimeNET-Micro + type: osmo-bts-trx + ipa_unit_id: 15 + addr: 10.42.42.53 + band: GSM-1800 + ciphers: [a5_0, a5_1] + osmo_trx: + type: lms + launch_trx: true + remote_user: pi + trx_ip: 10.42.42.123 + clock_reference: external + dev_args: "LimeNET-Micro,serial=005839AF25B352" - label: sysmoCell 5000 type: osmo-bts-trx diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 554a236..0578259 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -295,35 +295,55 @@ os.chmod(wrapper_script, st.st_mode | stat.S_IEXEC) return wrapper_script + def inst_compatible_for_remote(self): + proc = process.run_remote_sync(self.run_dir, self.remote_user, self.listen_ip, 'uname-m', ('uname', '-m')) + if "x86_64" in (proc.get_stdout() or ''): + return True + return False + + def start_remotely(self, keepalive): + # Run remotely through ssh. We need to run osmo-trx under a wrapper + # script since osmo-trx ignores SIGHUP and will keep running after + # we close local ssh session. The wrapper script catches SIGHUP and + # sends SIGINT to it. + remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR) + remote_config_file = remote_run_dir.child(OsmoTrx.CONF_OSMO_TRX) + + have_inst = self.inst_compatible_for_remote() + if have_inst: + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx'))) + + # if self.inst is None, we still want to copy config file, create remote run dir, etc. + self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, remote_run_dir, self.remote_user, + self.listen_ip, self.binary_name(), self.config_file) + + wrapper_script = self.generate_wrapper_script() + remote_wrapper_script = remote_run_dir.child(OsmoTrx.WRAPPER_SCRIPT) + process.scp(self.run_dir, self.remote_user, self.listen_ip, 'scp-wrapper-to-remote', wrapper_script, remote_wrapper_script) + + if have_inst: + remote_lib = self.remote_inst.child('lib') + remote_binary = self.remote_inst.child('bin', self.binary_name()) + args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_wrapper_script, remote_binary, '-C', remote_config_file) + else: # Use whatever is available i nremote system PATH: + args = (remote_wrapper_script, self.binary_name(), '-C', remote_config_file) + + self.proc_trx = self.launch_process_remote(self.binary_name(), args, remote_cwd=remote_run_dir, keepalive=keepalive) + ############## # PUBLIC (test API included) ############## def start(self, keepalive=False): self.configure() + if self.remote_user: + self.start_remotely(keepalive) + return + # Run locally if ssh user is not set self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx'))) - if not self.remote_user: - # Run locally if ssh user is not set - lib = self.inst.child('lib') - self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } - self.proc_trx = self.launch_process_local(keepalive, self.binary_name(), - '-C', os.path.abspath(self.config_file)) - else: - # Run remotely through ssh. We need to run osmo-trx under a wrapper - # script since osmo-trx ignores SIGHUP and will keep running after - # we close local ssh session. The wrapper script catches SIGHUP and - # sends SIGINT to it. - wrapper_script = self.generate_wrapper_script() - remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR) - self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, remote_run_dir, self.remote_user, - self.listen_ip, self.binary_name(), self.config_file) - remote_wrapper_script = remote_run_dir.child(OsmoTrx.WRAPPER_SCRIPT) - remote_config_file = remote_run_dir.child(OsmoTrx.CONF_OSMO_TRX) - remote_lib = self.remote_inst.child('lib') - remote_binary = self.remote_inst.child('bin', self.binary_name()) - process.scp(self.run_dir, self.remote_user, self.listen_ip, 'scp-wrapper-to-remote', wrapper_script, remote_wrapper_script) - - args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_wrapper_script, remote_binary, '-C', remote_config_file) - self.proc_trx = self.launch_process_remote(self.binary_name(), args, remote_cwd=remote_run_dir, keepalive=keepalive) + lib = self.inst.child('lib') + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + self.proc_trx = self.launch_process_local(keepalive, self.binary_name(), + '-C', os.path.abspath(self.config_file)) def trx_ready(self): if not self.proc_trx or not self.proc_trx.is_running: @@ -344,7 +364,7 @@ def __init__(self, suite_run, conf): super().__init__(suite_run, conf) - self.conf['osmo_trx']['channels'][0]['rx_path'] = 'LNAW' + #self.conf['osmo_trx']['channels'][0]['rx_path'] = 'LNAW' def binary_name(self): return OsmoTrxLMS.BIN_TRX diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index b73673f..06da3bf 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -399,26 +399,33 @@ run_dir =run_dir.new_dir(name) proc = Process(name, run_dir, popen_args) proc.launch_sync() + return proc def run_local_netns_sync(run_dir, name, netns, popen_args): run_dir =run_dir.new_dir(name) proc = NetNSProcess(name, run_dir, netns, popen_args) proc.launch_sync() + return proc def run_remote_sync(run_dir, remote_user, remote_addr, name, popen_args, remote_cwd=None): run_dir = run_dir.new_dir(name) proc = RemoteProcess(name, run_dir, remote_user, remote_addr, remote_cwd, popen_args) proc.launch_sync() + return proc def scp(run_dir, remote_user, remote_addr, name, local_path, remote_path): run_local_sync(run_dir, name, ('scp', '-r', local_path, '%s@%s:%s' % (remote_user, remote_addr, remote_path))) +# If no inst binaries copying is required (eg. because binary+libs is already available in distro), inst can be None. def copy_inst_ssh(run_dir, inst, remote_dir, remote_user, remote_addr, remote_rundir_append, cfg_file_name): - remote_inst = Dir(remote_dir.child(os.path.basename(str(inst)))) remote_dir_str = str(remote_dir) run_remote_sync(run_dir, remote_user, remote_addr, 'rm-remote-dir', ('test', '!', '-d', remote_dir_str, '||', 'rm', '-rf', remote_dir_str)) run_remote_sync(run_dir, remote_user, remote_addr, 'mk-remote-dir', ('mkdir', '-p', remote_dir_str)) - scp(run_dir, remote_user, remote_addr, 'scp-inst-to-remote', str(inst), remote_dir_str) + if inst is not None: + remote_inst = Dir(remote_dir.child(os.path.basename(str(inst)))) + scp(run_dir, remote_user, remote_addr, 'scp-inst-to-remote', str(inst), remote_dir_str) + else: + remote_inst = None remote_run_dir = remote_dir.child(remote_rundir_append) run_remote_sync(run_dir, remote_user, remote_addr, 'mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 1b18076..992734d 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -76,6 +76,8 @@ 'bts[].osmo_trx.dev_args': schema.STR, 'bts[].osmo_trx.multi_arfcn': schema.BOOL_STR, 'bts[].osmo_trx.max_trxd_version': schema.UINT, + 'bts[].osmo_trx.channels[].rx_path': schema.STR, + 'bts[].osmo_trx.channels[].tx_path': schema.STR, 'arfcn[].arfcn': schema.INT, 'arfcn[].band': schema.BAND, 'modem[].type': schema.STR, -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I15da34c9467e46ae92adbce5f671b344bea5ee5a Gerrit-Change-Number: 16173 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 22:19:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 22:19:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: REMSIM_Tests: Fix REMSIM_Tests.cfg References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16174 ) Change subject: REMSIM_Tests: Fix REMSIM_Tests.cfg ...................................................................... REMSIM_Tests: Fix REMSIM_Tests.cfg Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17 --- M remsim/REMSIM_Tests.cfg 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/74/16174/1 diff --git a/remsim/REMSIM_Tests.cfg b/remsim/REMSIM_Tests.cfg index b2dd9b2..36b0952 100644 --- a/remsim/REMSIM_Tests.cfg +++ b/remsim/REMSIM_Tests.cfg @@ -4,7 +4,7 @@ # testsuite specific configuration, not expected to change "./REMSIM_Tests.default" -[CONTROL] +[EXECUTE] RemsimServer_Tests.control #RemsimBankd_Tests.control #RemsimClient_Tests.control -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17 Gerrit-Change-Number: 16174 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 22:19:20 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 22 Nov 2019 22:19:20 +0000 Subject: Change in osmo-ttcn3-hacks[master]: VPCD protocol support (for vsmartcard.git PCD/PICC code) References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 ) Change subject: VPCD protocol support (for vsmartcard.git PCD/PICC code) ...................................................................... VPCD protocol support (for vsmartcard.git PCD/PICC code) vsmartcard.git contains an implementation of a virtual card reader (vpcd) which registers with PC/SC (such as pcsc-lite). It simply binds to a TCP port and waits for a TCP client to connect to it, implementing APDU transfer over TCP. This code implements the related protocol as a TTCN-3 test port for Eclipse TITAN, which will enable us to implement a 'virtual smart card' in TTCN-3 tets cases, primarily for testing remsim-bankd at this point. Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb --- A library/VPCD_Adapter.ttcn A library/VPCD_CodecPort.ttcn A library/VPCD_CodecPort_CtrlFunct.ttcn A library/VPCD_CodecPort_CtrlFunctDef.cc A library/VPCD_Types.ttcn 5 files changed, 330 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/75/16175/1 diff --git a/library/VPCD_Adapter.ttcn b/library/VPCD_Adapter.ttcn new file mode 100644 index 0000000..289be06 --- /dev/null +++ b/library/VPCD_Adapter.ttcn @@ -0,0 +1,73 @@ +module VPCD_Adapter { + +/* VPCD Adapter layer, sitting on top of VPCD_CodecPort. + * test suites can 'inherit' in order to have a VPCD connection to the IUT which they're testing + * + * (C) 2018-2019 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + */ + +import from VPCD_Types all; +import from VPCD_CodecPort all; +import from VPCD_CodecPort_CtrlFunct all; +import from IPL4asp_Types all; +import from IPL4asp_PortType all; +import from Socket_API_Definitions all; + +modulepar { + integer mp_vpcd_port := 35963; + charstring mp_vpcd_host := "127.0.0.1"; +} + +type component VPCD_Adapter_CT { + port VPCD_CODEC_PT VPCD; + var integer g_vpcd_conn_id; +}; + + +private function f_set_tcp_segmentation() runs on VPCD_Adapter_CT { + /* Set function for dissecting the binary stream into packets */ + var f_IPL4_getMsgLen vl_f := refers(f_IPL4_fixedMsgLen); + /* Offset: 0, size of length: 2, delta: 0, multiplier: 1, big-endian: 0 */ + VPCD_CodecPort_CtrlFunct.f_IPL4_setGetMsgLen(VPCD, g_vpcd_conn_id, vl_f, {0, 2, 2, 1, 0}); +} + +function f_connect(charstring remote_host := mp_vpcd_host, integer remote_port := mp_vpcd_port) +runs on VPCD_Adapter_CT { + var IPL4asp_Types.Result res; + map(self:VPCD, system:VPCD); + res := VPCD_CodecPort_CtrlFunct.f_IPL4_connect(VPCD, remote_host, remote_port, "", 0, 0, + { tcp := {} }); + if (not ispresent(res.connId)) { + setverdict(fail, "Could not connect to VPCD at ", remote_host, ":", remote_port, + ", check your configuration"); + mtc.stop; + } + g_vpcd_conn_id := res.connId; + f_set_tcp_segmentation(); +} + +function f_bind(charstring local_host, IPL4asp_Types.PortNumber local_port) +runs on VPCD_Adapter_CT { + var IPL4asp_Types.Result res; + map(self:VPCD, system:VPCD); + res := VPCD_CodecPort_CtrlFunct.f_IPL4_listen(VPCD, local_host, local_port, { tcp:={} }); + g_vpcd_conn_id := res.connId; + f_set_tcp_segmentation(); +} + +function f_vpcd_send(template (value) VPCD_PDU pdu) runs on VPCD_Adapter_CT { + VPCD.send(ts_VPCD_Send(g_vpcd_conn_id, pdu)); +} + +function f_vpcd_exp(template VPCD_PDU exp) runs on VPCD_Adapter_CT return VPCD_PDU { + var VPCD_RecvFrom rf; + VPCD.receive(tr_VPCD_Recv(g_vpcd_conn_id, exp)) -> value rf; + return rf.msg; +} + + +} diff --git a/library/VPCD_CodecPort.ttcn b/library/VPCD_CodecPort.ttcn new file mode 100644 index 0000000..a9ae97f --- /dev/null +++ b/library/VPCD_CodecPort.ttcn @@ -0,0 +1,64 @@ +module VPCD_CodecPort { + +/* Simple VPCD Codec Port, translating between raw TCP octetstring payload + * towards the IPL4asp port provider, and VPCD primitives + * which carry the decoded VPCD data types as payload. + * + * (C) 2018 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + */ + + +import from IPL4asp_PortType all; +import from IPL4asp_Types all; +import from VPCD_Types all; + +type record VPCD_RecvFrom { + ConnectionId connId, + VPCD_PDU msg +} + +type record VPCD_Send { + ConnectionId connId, + VPCD_PDU msg +} + +template (value) VPCD_Send ts_VPCD_Send(ConnectionId conn_id, template (value) VPCD_PDU msg) := { + connId := conn_id, + msg := msg +} + +template VPCD_RecvFrom tr_VPCD_Recv(template ConnectionId conn_id, template VPCD_PDU msg) := { + connId := conn_id, + msg := msg +} + +private function IPL4_to_VPCD_RecvFrom(in ASP_Recv>From pin, out VPCD_RecvFrom pout) { + pout.connId := pin.connId; + pout.msg := dec_VPCD_PDU(pin.msg); +} with { extension "prototype(fast)" } + +private function VPCD_to_IPL4_Send(in VPCD_Send pin, out ASP_Send pout) { + pout.connId := pin.connId; + pout.proto := { tcp := {} }; + pout.msg := enc_VPCD_PDU(pin.msg); +} with { extension "prototype(fast)" } + +type port VPCD_CODEC_PT message { + out VPCD_Send; + in VPCD_RecvFrom, + ASP_ConnId_ReadyToRelease, + ASP_Event; +} with { extension "user IPL4asp_PT + out(VPCD_Send -> ASP_Send: function(VPCD_to_IPL4_Send)) + in(ASP_RecvFrom -> VPCD_RecvFrom: function(IPL4_to_VPCD_RecvFrom); + ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple; + ASP_Event -> ASP_Event: simple)" +} + + + +} diff --git a/library/VPCD_CodecPort_CtrlFunct.ttcn b/library/VPCD_CodecPort_CtrlFunct.ttcn new file mode 100644 index 0000000..62b79c5 --- /dev/null +++ b/library/VPCD_CodecPort_CtrlFunct.ttcn @@ -0,0 +1,52 @@ +module VPCD_CodecPort_CtrlFunct { + + import from VPCD_CodecPort all; + import from IPL4asp_Types all; + + external function f_IPL4_listen( + inout VPCD_CODEC_PT portRef, + in HostName locName, + in PortNumber locPort, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_connect( + inout VPCD_CODEC_PT portRef, + in HostName remName, + in PortNumber remPort, + in HostName locName, + in PortNumber locPort, + in ConnectionId connId, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_close( + inout VPCD_CODEC_PT portRef, + in ConnectionId id, + in ProtoTuple proto := { unspecified := {} } + ) return Result; + + external function f_IPL4_setUserData( + inout VPCD_CODEC_PT portRef, + in ConnectionId id, + in UserData userData + ) return Result; + + external function f_IPL4_getUserData( + inout VPCD_CODEC_PT portRef, + in ConnectionId id, + out UserData userData + ) return Result; + + external function f_IPL4_setGetMsgLen( + inout VPCD_CODEC_PT portRef, + in ConnectionId id, + inout f_IPL4_getMsgLen f, + in ro_integer msgLenArgs + ); + + +} + diff --git a/library/VPCD_CodecPort_CtrlFunctDef.cc b/library/VPCD_CodecPort_CtrlFunctDef.cc new file mode 100644 index 0000000..74c1176 --- /dev/null +++ b/library/VPCD_CodecPort_CtrlFunctDef.cc @@ -0,0 +1,66 @@ +#include "IPL4asp_PortType.hh" +#include "VPCD_CodecPort.hh" +#include "IPL4asp_PT.hh" + +namespace VPCD__CodecPort__CtrlFunct { + + IPL4asp__Types::Result f__IPL4__listen( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options); + } + + IPL4asp__Types::Result f__IPL4__connect( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::HostName& remName, + const IPL4asp__Types::PortNumber& remPort, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__connect(portRef, remName, remPort, + locName, locPort, connId, proto, options); + } + + IPL4asp__Types::Result f__IPL4__close( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto) + { + return f__IPL4__PROVIDER__close(portRef, connId, proto); + } + + IPL4asp__Types::Result f__IPL4__setUserData( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__setUserData(portRef, connId, userData); + } + + IPL4asp__Types::Result f__IPL4__getUserData( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__getUserData(portRef, connId, userData); + } + + void f__IPL4__setGetMsgLen( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + Socket__API__Definitions::f__getMsgLen& f, + const Socket__API__Definitions::ro__integer& msgLenArgs) + { + return f__IPL4__PROVIDER__setGetMsgLen(portRef, connId, f, msgLenArgs); + } + + +} + diff --git a/library/VPCD_Types.ttcn b/library/VPCD_Types.ttcn new file mode 100644 index 0000000..5caa0be --- /dev/null +++ b/library/VPCD_Types.ttcn @@ -0,0 +1,75 @@ +module VPCD_Types { + +/* VPCD/VPICC Types, implementing the protocol used by vpcd/vpicc of + * vsmartcard.git by Frank Morgner. + */ + +import from General_Types all; +import from Osmocom_Types all; + +type enumerated VPCD_CtrlCmd { + VPCD_CTRL_OFF (0), + VPCD_CTRL_ON (1), + VPCD_CTRL_RESET (2), + VPCD_CTRL_ATR (4) +} with { variant "FIELDLENGTH(8)" }; + +type union VPCD_MsgUnion { + VPCD_CtrlCmd ctrl, + octetstring data +}; + +type record VPCD_PDU { + uint16_t len, + VPCD_MsgUnion u +} with { + variant (len) "LENGTHTO(u)" + variant (u) "CROSSTAG( + ctrl, len = 1; + data, OTHERWISE)" +}; + + +template (value) VPCD_PDU ts_VPCD_CTRL(template (value) VPCD_CtrlCmd cmd) := { + len := 0, // overwritten + u := { + ctrl := cmd + } +} +template (value) VPCD_PDU ts_VPCD_CTRL_OFF := ts_VPCD_CTRL(VPCD_CTRL_OFF); +template (value) VPCD_PDU ts_VPCD_CTRL_ON := ts_VPCD_CTRL(VPCD_CTRL_ON); +template (value) VPCD_PDU ts_VPCD_CTRL_RESET := ts_VPCD_CTRL(VPCD_CTRL_RESET); +template (value) VPCD_PDU ts_VPCD_CTRL_ATR := ts_VPCD_CTRL(VPCD_CTRL_ATR); +template (value) VPCD_PDU ts_VPCD_DATA(template (value) octetstring data) := { + len := 0, //overwritten + u := { + data := data + } +} + +template (present) VPCD_PDU tr_VPCD_CTRL(template (present) VPCD_CtrlCmd cmd) := { + len := ?, + u := { + ctrl := cmd + } +} +template (present) VPCD_PDU tr_VPCD_CTRL_OFF := tr_VPCD_CTRL(VPCD_CTRL_OFF); +template (present) VPCD_PDU tr_VPCD_CTRL_ON := tr_VPCD_CTRL(VPCD_CTRL_ON); +template (present) VPCD_PDU tr_VPCD_CTRL_RESET := tr_VPCD_CTRL(VPCD_CTRL_RESET); +template (present) VPCD_PDU tr_VPCD_CTRL_ATR := tr_VPCD_CTRL(VPCD_CTRL_ATR); +template (present) VPCD_PDU tr_VPCD_DATA(template (present) octetstring data) := { + len := ?, + u := { + data := data + } +} + +external function enc_VPCD_PDU(in VPCD_PDU msg) return octetstring + with { extension "prototype(convert) encode(RAW)" }; + +external function dec_VPCD_PDU(in octetstring msg) return VPCD_PDU + with { extension "prototype(convert) decode(RAW)" }; + + + +} with { encode "RAW" }; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb Gerrit-Change-Number: 16175 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 22:50:49 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 22:50:49 +0000 Subject: Change in osmo-ttcn3-hacks[master]: REMSIM_Tests: Fix REMSIM_Tests.cfg In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16174 ) Change subject: REMSIM_Tests: Fix REMSIM_Tests.cfg ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17 Gerrit-Change-Number: 16174 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 22:50:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 22 22:55:19 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 22 Nov 2019 22:55:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: VPCD protocol support (for vsmartcard.git PCD/PICC code) In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 ) Change subject: VPCD protocol support (for vsmartcard.git PCD/PICC code) ...................................................................... Patch Set 1: Code-Review+1 (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunct.ttcn File library/VPCD_CodecPort_CtrlFunct.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunct.ttcn at 3 PS1, Line 3: import from VPCD_CodecPort all; Usually we put all these lines without indentation right? https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunctDef.cc File library/VPCD_CodecPort_CtrlFunctDef.cc: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunctDef.cc at 16 PS1, Line 16: whitespace, not sure if this is somehow autogenrated. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb Gerrit-Change-Number: 16175 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 22 Nov 2019 22:55:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:52:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:52:00 +0000 Subject: Change in osmo-msc[master]: counters: clarify documentation for some MSC_CTR_SMS_* entries In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16172 ) Change subject: counters: clarify documentation for some MSC_CTR_SMS_* entries ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16172 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I081cf962ce2658ceab02699f3cdee19658d00939 Gerrit-Change-Number: 16172 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 07:52:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:55:23 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:55:23 +0000 Subject: Change in osmo-gsm-manuals[master]: Fix python-nwdiag dependency on new debian distros In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 ) Change subject: Fix python-nwdiag dependency on new debian distros ...................................................................... Patch Set 3: It seems we have a variety of osmo-bts-master build failures that may be related to this: https://jenkins.osmocom.org/jenkins/view/All%20no%20Gerrit/job/master-osmo-bts/BTS_MODEL=sysmo,FIRMWARE_VERSION=femtobts_v2.7,WITH_MANUALS=1,a4=default,label=osmocom-master-debian9/2970/console -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 Gerrit-Change-Number: 16152 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 23 Nov 2019 07:55:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:57:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:57:14 +0000 Subject: Change in osmo-ttcn3-hacks[master]: VPCD protocol support (for vsmartcard.git PCD/PICC code) In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 ) Change subject: VPCD protocol support (for vsmartcard.git PCD/PICC code) ...................................................................... Patch Set 1: Code-Review+2 (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunct.ttcn File library/VPCD_CodecPort_CtrlFunct.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunct.ttcn at 3 PS1, Line 3: import from VPCD_CodecPort all; > Usually we put all these lines without indentation right? Yes, but this is a copy+paste from many other *_CodecPort_CtrlFunct which is originally generated from the IPL4 port of Titan. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunctDef.cc File library/VPCD_CodecPort_CtrlFunctDef.cc: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175/1/library/VPCD_CodecPort_CtrlFunctDef.cc at 16 PS1, Line 16: > whitespace, not sure if this is somehow autogenrated. yes, it is. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb Gerrit-Change-Number: 16175 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 07:57:14 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:57:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:57:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: REMSIM_Tests: Fix REMSIM_Tests.cfg In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16174 ) Change subject: REMSIM_Tests: Fix REMSIM_Tests.cfg ...................................................................... REMSIM_Tests: Fix REMSIM_Tests.cfg Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17 --- M remsim/REMSIM_Tests.cfg 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/remsim/REMSIM_Tests.cfg b/remsim/REMSIM_Tests.cfg index b2dd9b2..36b0952 100644 --- a/remsim/REMSIM_Tests.cfg +++ b/remsim/REMSIM_Tests.cfg @@ -4,7 +4,7 @@ # testsuite specific configuration, not expected to change "./REMSIM_Tests.default" -[CONTROL] +[EXECUTE] RemsimServer_Tests.control #RemsimBankd_Tests.control #RemsimClient_Tests.control -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia31c5e440fc8daec92a620c9aea7432b6cf7ea17 Gerrit-Change-Number: 16174 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:57:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:57:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: VPCD protocol support (for vsmartcard.git PCD/PICC code) In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 ) Change subject: VPCD protocol support (for vsmartcard.git PCD/PICC code) ...................................................................... VPCD protocol support (for vsmartcard.git PCD/PICC code) vsmartcard.git contains an implementation of a virtual card reader (vpcd) which registers with PC/SC (such as pcsc-lite). It simply binds to a TCP port and waits for a TCP client to connect to it, implementing APDU transfer over TCP. This code implements the related protocol as a TTCN-3 test port for Eclipse TITAN, which will enable us to implement a 'virtual smart card' in TTCN-3 tets cases, primarily for testing remsim-bankd at this point. Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb --- A library/VPCD_Adapter.ttcn A library/VPCD_CodecPort.ttcn A library/VPCD_CodecPort_CtrlFunct.ttcn A library/VPCD_CodecPort_CtrlFunctDef.cc A library/VPCD_Types.ttcn 5 files changed, 330 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/library/VPCD_Adapter.ttcn b/library/VPCD_Adapter.ttcn new file mode 100644 index 0000000..289be06 --- /dev/null +++ b/library/VPCD_Adapter.ttcn @@ -0,0 +1,73 @@ +module VPCD_Adapter { + +/* VPCD Adapter layer, sitting on top of VPCD_CodecPort. + * test suites can 'inherit' in order to have a VPCD connection to the IUT which they're testing + * + * (C) 2018-2019 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + */ + +import from VPCD_Types all; +import from VPCD_CodecPort all; +import from VPCD_CodecPort_CtrlFunct all; +import from IPL4asp_Types all; +import from IPL4asp_PortType all; +import from Socket_API_Definitions all; + +modulepar { + integer mp_vpcd_port := 35963; + charstring mp_vpcd_host := "127.0.0.1"; +} + +type component VPCD_Adapter_CT { + port VPCD_CODEC_PT VPCD; + var integer g_vpcd_conn_id; +}; + + +private function f_set_tcp_segmentation() runs on VPCD_Adapter_CT { + /* Set function for dissecting the binary stream into packets */ + var f_IPL4_getMsgLen vl_f := refers(f_IPL4_fixedMsgLen); + /* Offset: 0, size of length: 2, delta: 0, multiplier: 1, big-endian: 0 */ + VPCD_CodecPort_CtrlFunct.f_IPL4_setGetMsgLen(VPCD, g_vpcd_conn_id, vl_f, {0, 2, 2, 1, 0}); +} + +function f_connect(charstring remote_host := mp_vpcd_host, integer remote_port := mp_vpcd_port) +runs on VPCD_Adapter_CT { + var IPL4asp_Types.Result res; + map(self:VPCD, system:VPCD); + res := VPCD_CodecPort_CtrlFunct.f_IPL4_connect(VPCD, remote_host, remote_port, "", 0, 0, + { tcp := {} }); + if (not ispresent(res.connId)) { + setverdict(fail, "Could not connect to VPCD at ", remote_host, ":", remote_port, + ", check your configuration"); + mtc.stop; + } + g_vpcd_conn_id := res.connId; + f_set_tcp_segmentation(); +} + +function f_bind(charstring local_host, IPL4asp_Types.PortNumber local_port) +runs on VPCD_Adapter_CT { + var IPL4asp_Types.Result res; + map(self:VPCD, system:VPCD); + res := VPCD_CodecPort_CtrlFunct.f_IPL4_listen(VPCD, local_host, local_port, { tcp:={} }); + g_vpcd_conn_id := res.connId; + f_set_tcp_segmentation(); +} + +function f_vpcd_send(template (value) VPCD_PDU pdu) runs on VPCD_Adapter_CT { + VPCD.send(ts_VPCD_Send(g_vpcd_conn_id, pdu)); +} + +function f_vpcd_exp(template VPCD_PDU exp) runs on VPCD_Adapter_CT return VPCD_PDU { + var VPCD_RecvFrom rf; + VPCD.receive(tr_VPCD_Recv(g_vpcd_conn_id, exp)) -> value rf; + return rf.msg; +} + + +} diff --git a/library/VPCD_CodecPort.ttcn b/library/VPCD_CodecPort.ttcn new file mode 100644 index 0000000..a9ae97f --- /dev/null +++ b/library/VPCD_CodecPort.ttcn @@ -0,0 +1,64 @@ +module VPCD_CodecPort { + +/* Simple VPCD Codec Port, translating between raw TCP octetstring payload + * towards the IPL4asp port provider, and VPCD primitives + * which carry the decoded VPCD data types as payload. + * + * (C) 2018 by Harald Welte + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + */ + + +import from IPL4asp_PortType all; +import from IPL4asp_Types all; +import from VPCD_Types all; + +type record VPCD_RecvFrom { + ConnectionId connId, + VPCD_PDU msg +} + +type record VPCD_Send { + ConnectionId connId, + VPCD_PDU msg +} + +template (value) VPCD_Send ts_VPCD_Send(ConnectionId conn_id, template (value) VPCD_PDU msg) := { + connId := conn_id, + msg := msg +} + +template VPCD_RecvFrom tr_VPCD_Recv(template ConnectionId conn_id, template VPCD_PDU msg) := { + connId := conn_id, + msg := msg +} + +private function IPL4_to_VPCD_RecvFrom(in ASP_RecvFrom pin, out VPCD_RecvFrom pout) { + pout.connId := pin.connId; + pout.msg := dec_VPCD_PDU(pin.msg); +} with { extension "prototype(fast)" } + +private function VPCD_to_IPL4_Send(in VPCD_Send pin, out ASP_Send pout) { + pout.connId := pin.connId; + pout.proto := { tcp := {} }; + pout.msg := enc_VPCD_PDU(pin.msg); +} with { extension "prototype(fast)" } + +type port VPCD_CODEC_PT message { + out VPCD_Send; + in VPCD_RecvFrom, + ASP_ConnId_ReadyToRelease, + ASP_Event; +} with { extension "user IPL4asp_PT + out(VPCD_Send -> ASP_Send: function(VPCD_to_IPL4_Send)) + in(ASP_RecvFrom -> VPCD_RecvFrom: function(IPL4_to_VPCD_RecvFrom); + ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple; + ASP_Event -> ASP_Event: simple)" +} + + + +} diff --git a/library/VPCD_CodecPort_CtrlFunct.ttcn b/library/VPCD_CodecPort_CtrlFunct.ttcn new file mode 100644 index 0000000..62b79c5 --- /dev/null +++ b/library/VPCD_CodecPort_CtrlFunct.ttcn @@ -0,0 +1,52 @@ +module VPCD_CodecPort_CtrlFunct { + + import from VPCD_CodecPort all; + import from IPL4asp_Types all; + + external function f_IPL4_listen( + inout VPCD_CODEC_PT portRef, + in HostName locName, + in PortNumber locPort, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_connect( + inout VPCD_CODEC_PT portRef, + in HostName remName, + in PortNumber remPort, + in HostName locName, + in PortNumber locPort, + in ConnectionId connId, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_close( + inout VPCD_CODEC_PT portRef, + in ConnectionId id, + in ProtoTuple proto := { unspecified := {} } + ) return Result; + + external function f_IPL4_setUserData( + inout VPCD_CODEC_PT portRef, + in ConnectionId id, + in UserData userData + ) return Result; + + external function f_IPL4_getUserData( + inout VPCD_CODEC_PT portRef, + in ConnectionId id, + out UserData userData + ) return Result; + + external function f_IPL4_setGetMsgLen( + inout VPCD_CODEC_PT portRef, + in ConnectionId id, + inout f_IPL4_getMsgLen f, + in ro_integer msgLenArgs + ); + + +} + diff --git a/library/VPCD_CodecPort_CtrlFunctDef.cc b/library/VPCD_CodecPort_CtrlFunctDef.cc new file mode 100644 index 0000000..74c1176 --- /dev/null +++ b/library/VPCD_CodecPort_CtrlFunctDef.cc @@ -0,0 +1,66 @@ +#include "IPL4asp_PortType.hh" +#include "VPCD_CodecPort.hh" +#include "IPL4asp_PT.hh" + +namespace VPCD__CodecPort__CtrlFunct { + + IPL4asp__Types::Result f__IPL4__listen( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options); + } + + IPL4asp__Types::Result f__IPL4__connect( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::HostName& remName, + const IPL4asp__Types::PortNumber& remPort, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__connect(portRef, remName, remPort, + locName, locPort, connId, proto, options); + } + + IPL4asp__Types::Result f__IPL4__close( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto) + { + return f__IPL4__PROVIDER__close(portRef, connId, proto); + } + + IPL4asp__Types::Result f__IPL4__setUserData( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__setUserData(portRef, connId, userData); + } + + IPL4asp__Types::Result f__IPL4__getUserData( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__getUserData(portRef, connId, userData); + } + + void f__IPL4__setGetMsgLen( + VPCD__CodecPort::VPCD__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + Socket__API__Definitions::f__getMsgLen& f, + const Socket__API__Definitions::ro__integer& msgLenArgs) + { + return f__IPL4__PROVIDER__setGetMsgLen(portRef, connId, f, msgLenArgs); + } + + +} + diff --git a/library/VPCD_Types.ttcn b/library/VPCD_Types.ttcn new file mode 100644 index 0000000..5caa0be --- /dev/null +++ b/library/VPCD_Types.ttcn @@ -0,0 +1,75 @@ +module VPCD_Types { + +/* VPCD/VPICC Types, implementing the protocol used by vpcd/vpicc of + * vsmartcard.git by Frank Morgner. + */ + +import from General_Types all; +import from Osmocom_Types all; + +type enumerated VPCD_CtrlCmd { + VPCD_CTRL_OFF (0), + VPCD_CTRL_ON (1), + VPCD_CTRL_RESET (2), + VPCD_CTRL_ATR (4) +} with { variant "FIELDLENGTH(8)" }; + +type union VPCD_MsgUnion { + VPCD_CtrlCmd ctrl, + octetstring data +}; + +type record VPCD_PDU { + uint16_t len, + VPCD_MsgUnion u +} with { + variant (len) "LENGTHTO(u)" + variant (u) "CROSSTAG( + ctrl, len = 1; + data, OTHERWISE)" +}; + + +template (value) VPCD_PDU ts_VPCD_CTRL(template (value) VPCD_CtrlCmd cmd) := { + len := 0, // overwritten + u := { + ctrl := cmd + } +} +template (value) VPCD_PDU ts_VPCD_CTRL_OFF := ts_VPCD_CTRL(VPCD_CTRL_OFF); +template (value) VPCD_PDU ts_VPCD_CTRL_ON := ts_VPCD_CTRL(VPCD_CTRL_ON); +template (value) VPCD_PDU ts_VPCD_CTRL_RESET := ts_VPCD_CTRL(VPCD_CTRL_RESET); +template (value) VPCD_PDU ts_VPCD_CTRL_ATR := ts_VPCD_CTRL(VPCD_CTRL_ATR); +template (value) VPCD_PDU ts_VPCD_DATA(template (value) octetstring data) := { + len := 0, //overwritten + u := { + data := data + } +} + +template (present) VPCD_PDU tr_VPCD_CTRL(template (present) VPCD_CtrlCmd cmd) := { + len := ?, + u := { + ctrl := cmd + } +} +template (present) VPCD_PDU tr_VPCD_CTRL_OFF := tr_VPCD_CTRL(VPCD_CTRL_OFF); +template (present) VPCD_PDU tr_VPCD_CTRL_ON := tr_VPCD_CTRL(VPCD_CTRL_ON); +template (present) VPCD_PDU tr_VPCD_CTRL_RESET := tr_VPCD_CTRL(VPCD_CTRL_RESET); +template (present) VPCD_PDU tr_VPCD_CTRL_ATR := tr_VPCD_CTRL(VPCD_CTRL_ATR); +template (present) VPCD_PDU tr_VPCD_DATA(template (present) octetstring data) := { + len := ?, + u := { + data := data + } +} + +external function enc_VPCD_PDU(in VPCD_PDU msg) return octetstring + with { extension "prototype(convert) encode(RAW)" }; + +external function dec_VPCD_PDU(in octetstring msg) return VPCD_PDU + with { extension "prototype(convert) decode(RAW)" }; + + + +} with { encode "RAW" }; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16175 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb Gerrit-Change-Number: 16175 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:57:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:57:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 ) Change subject: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1 Gerrit-Change-Number: 16081 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 07:57:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:57:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:57:45 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 ) Change subject: library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields ...................................................................... library/PCUIF_Types.ttcn: extend RACH.ind with TRX / TS number fields Since there can be multiple PDCH channels configured on different timeslots, different TRXes, and BTSes, the PTCCH/U handling code in OsmoPCU needs to know the exact origin of a given RACH.ind. Otherwise, it is not known which subscriber originated a given PTCCH/U indication, and hence it is impossible to send PTCCH/D Timing Advance notification properly. Fortunately, we can extend the RACH.ind message without even bumping the protocol version, because every single PDU has a fixed size defined by the largest message - INFO.ind. In case if the actual message payload is smaller, the rest is filled with a constant padding byte (0x00). Older versions of OsmoPCU will consider the new fields as padding, while the messages from older OsmoBTS versions will always have both fields set to 0x00. Since C0/TS0 cannot be configured to PDCH, this can be easily detected on the other end. Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1 Related: OS#4102, OS#1545 --- M bts/BTS_Tests.ttcn M library/PCUIF_Types.ttcn M pcu/PCU_Tests_RAW.ttcn M pcu/PCU_Tests_RAW_SNS.ttcn 4 files changed, 24 insertions(+), 13 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 87c9131..779f7c3 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -4170,8 +4170,8 @@ chan_nr := ts_RslChanNr_PDCH(7), link_id := ts_RslLinkID_OSMO_PTCCH(0)); - /* TODO: check time-slot and TRX number as soon as we extend the PCU interface */ - pcu_rach_ind := tr_PCUIF_RACH_IND(ra := ra, fn := fn, sapi := PCU_IF_SAPI_PTCCH); + pcu_rach_ind := tr_PCUIF_RACH_IND(bts_nr := 0, trx_nr := 0, ts_nr := 7, + ra := ra, fn := fn, sapi := PCU_IF_SAPI_PTCCH); /* Expect a RACH.ind on the PCU interface (timeout is one multi-frame) */ T.start(52.0 * 4.615 / 1000.0); @@ -4333,7 +4333,7 @@ timer T := 2.0; T.start; alt { - [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RACH_IND(0, oct2int(ra), 0, ?, fn))) { + [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RACH_IND(0, 0, 0, oct2int(ra), 0, ?, fn))) { T.stop; } [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_RACH_IND)) { @@ -4382,7 +4382,7 @@ /* Compose the expected message */ pcu_rach_ind := tr_PCUIF_RACH_IND( - bts_nr := 0, + bts_nr := 0, trx_nr := 0, ts_nr := 0, ra := bit2int(ra11), is_11bit := 1, burst_type := pcu_bt, diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index ae0762a..8ce41c4 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -130,7 +130,9 @@ uint32_t fn, uint16_t arfcn, uint8_t is_11bit, - PCUIF_BurstType burst_type + PCUIF_BurstType burst_type, + uint8_t trx_nr, + uint8_t ts_nr } with { variant "" }; type record PCUIF_InfoTrx { @@ -565,6 +567,8 @@ } template (value) PCUIF_Message ts_PCUIF_RACH_IND(template (value) uint8_t bts_nr, + template (value) uint8_t trx_nr, + template (value) uint8_t ts_nr, template (value) uint16_t ra, template (value) uint8_t is_11bit, template (value) PCUIF_BurstType burst_type, @@ -584,11 +588,15 @@ fn := fn, arfcn := arfcn, is_11bit := is_11bit, - burst_type := burst_type + burst_type := burst_type, + trx_nr := trx_nr, + ts_nr := ts_nr } } } template PCUIF_Message tr_PCUIF_RACH_IND(template uint8_t bts_nr := ?, + template uint8_t trx_nr := ?, + template uint8_t ts_nr := ?, template uint16_t ra := ?, template uint8_t is_11bit := ?, template PCUIF_BurstType burst_type := ?, @@ -605,7 +613,9 @@ fn := fn, arfcn := ?, is_11bit := is_11bit, - burst_type := burst_type + burst_type := burst_type, + trx_nr := trx_nr, + ts_nr := ts_nr } } } diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 6a5f5d0..9d0882f 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -515,7 +515,7 @@ /* Send RACH.ind */ log("Sending RACH.ind on fn=", fn, " with RA=", ra, ", TA=", ta); - BTS.send(ts_PCUIF_RACH_IND(bts_nr := bts_nr, + BTS.send(ts_PCUIF_RACH_IND(bts_nr := bts_nr, trx_nr := 0, ts_nr := 0, ra := ra, is_11bit := is_11bit, burst_type := burst_type, fn := fn, arfcn := 871, @@ -524,7 +524,7 @@ /* Expect Immediate (TBF) Assignment on TS0/AGCH */ T.start(2.0); alt { - [] BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := bts_nr, trx_nr := ?, ts_nr := 0, + [] BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := bts_nr, trx_nr := 0, ts_nr := 0, sapi := PCU_IF_SAPI_AGCH, data := ?)) -> value pcu_msg { rr_imm_ass := dec_GsmRrMessage(pcu_msg.u.data_req.data); @@ -778,7 +778,7 @@ 0, 0, 0, 0 }; -private altstep as_ta_ptcch(uint8_t bts_nr := 0, /* TODO: TRX / TS number */ +private altstep as_ta_ptcch(uint8_t bts_nr := 0, uint8_t trx_nr := 0, uint8_t ts_nr := 7, in PTCCH_TAI_ToA_MAP toa_map := ptcch_toa_map_def) runs on RAW_PCU_Test_CT { var RAW_PCU_Event event; @@ -794,7 +794,7 @@ ", fn=", event.data.tdma_fn, ", ToA=", toa_map[ss], " (QTA)"); /* TODO: do we care about RA and burst format? */ - BTS.send(ts_PCUIF_RACH_IND(bts_nr := bts_nr, + BTS.send(ts_PCUIF_RACH_IND(bts_nr, trx_nr, ts_nr, ra := oct2int('3A'O), is_11bit := 0, burst_type := BURST_TYPE_0, @@ -821,7 +821,7 @@ alt { /* Keep sending of Access Bursts during two multi-frames (period of PTCCH/D) * with increasing ToA (Timing of Arrival) values: 0, 7, 14, 28, 35... */ - [] as_ta_ptcch(bts_nr := 0, toa_map := ptcch_toa_map); + [] as_ta_ptcch(bts_nr := 0, trx_nr := 0, ts_nr := 7, toa_map := ptcch_toa_map); /* In the end of 2nd multi-frame we should receive a PTCCH/D block */ [] BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 7, sapi := PCU_IF_SAPI_PTCCH)) -> value pcu_msg { diff --git a/pcu/PCU_Tests_RAW_SNS.ttcn b/pcu/PCU_Tests_RAW_SNS.ttcn index 28dd654..c8520e7 100644 --- a/pcu/PCU_Tests_RAW_SNS.ttcn +++ b/pcu/PCU_Tests_RAW_SNS.ttcn @@ -374,7 +374,8 @@ f_sns_bringup_1c1u(); activate(as_pcu_activate()); - f_pcuif_tx(ts_PCUIF_RACH_IND(bts_nr:=0, ra:=23, is_11bit:=0, burst_type:=BURST_TYPE_0, + f_pcuif_tx(ts_PCUIF_RACH_IND(bts_nr:=0, trx_nr:=0, ts_nr:=0, ra:=23, + is_11bit:=0, burst_type:=BURST_TYPE_0, fn:=42, arfcn:=871, qta:=0)); PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_DATA_REQ(bts_nr:=0, trx_nr:=0, ts_nr:=0, block_nr:=?, fn:=?, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia5c4e504a21dc5508920553d3856027455dba1b1 Gerrit-Change-Number: 16081 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:58:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:58:29 +0000 Subject: Change in libosmocore[master]: logging.h: define ansi color constants In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16156 ) Change subject: logging.h: define ansi color constants ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a Gerrit-Change-Number: 16156 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 23 Nov 2019 07:58:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:58:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:58:32 +0000 Subject: Change in libosmocore[master]: fix DLSMS logging category color: '[1:38m' isn't actually defined In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16157 ) Change subject: fix DLSMS logging category color: '[1:38m' isn't actually defined ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2 Gerrit-Change-Number: 16157 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 07:58:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:58:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:58:37 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 07:58:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:58:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:58:42 +0000 Subject: Change in libosmocore[master]: fix osmo_escape_str_c() and osmo_quote_str_c() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16159 ) Change subject: fix osmo_escape_str_c() and osmo_quote_str_c() ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8 Gerrit-Change-Number: 16159 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 07:58:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:58:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:58:47 +0000 Subject: Change in libosmocore[master]: logging.h: define ansi color constants In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16156 ) Change subject: logging.h: define ansi color constants ...................................................................... logging.h: define ansi color constants It's hard to figure out what color logging categories have with those ANSI color code strings. Instead, define these OSMO_LOGCOLOR_* constants. Naming: commonly, the logging.h header has the "LOG" prefix in the name, but it seems saner to include the OSMO_ prefix: it seems too likely that some libosmocore user somewhere already has defined "LOGCOLOR_RED" somewhere. Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a --- M include/osmocom/core/logging.h M src/logging.c M tests/logging/logging_test.c M tests/loggingrb/loggingrb_test.c 4 files changed, 33 insertions(+), 14 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index 139d291..75650ba 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -127,6 +127,25 @@ #define DLRSPRO -19 /*!< Osmocom Remote SIM Protocol */ #define OSMO_NUM_DLIB 19 /*!< Number of logging sub-systems in libraries */ +/* Colors that can be used in log_info_cat.color */ +#define OSMO_LOGCOLOR_NORMAL NULL +#define OSMO_LOGCOLOR_RED "\033[1;31m" +#define OSMO_LOGCOLOR_GREEN "\033[1;32m" +#define OSMO_LOGCOLOR_YELLOW "\033[1;33m" +#define OSMO_LOGCOLOR_BLUE "\033[1;34m" +#define OSMO_LOGCOLOR_PURPLE "\033[1;35m" +#define OSMO_LOGCOLOR_CYAN "\033[1;36m" +#define OSMO_LOGCOLOR_DARKRED "\033[31m" +#define OSMO_LOGCOLOR_DARKGREEN "\033[32m" +#define OSMO_LOGCOLOR_DARKYELLOW "\033[33m" +#define OSMO_LOGCOLOR_DARKBLUE "\033[34m" +#define OSMO_LOGCOLOR_DARKPURPLE "\033[35m" +#define OSMO_LOGCOLOR_DARKCYAN "\033[36m" +#define OSMO_LOGCOLOR_DARKGREY "\033[1;30m" +#define OSMO_LOGCOLOR_GREY "\033[37m" +#define OSMO_LOGCOLOR_BRIGHTWHITE "\033[1;37m" +#define OSMO_LOGCOLOR_END "\033[0;m" + /*! Configuration of single log category / sub-system */ struct log_category { uint8_t loglevel; /*!< configured log-level */ diff --git a/src/logging.c b/src/logging.c index b030f8a..7baa777 100644 --- a/src/logging.c +++ b/src/logging.c @@ -344,11 +344,11 @@ } static const struct value_string level_colors[] = { - { LOGL_DEBUG, "\033[1;34m" }, - { LOGL_INFO, "\033[1;32m" }, - { LOGL_NOTICE, "\033[1;33m" }, - { LOGL_ERROR, "\033[1;31m" }, - { LOGL_FATAL, "\033[1;31m" }, + { LOGL_DEBUG, OSMO_LOGCOLOR_BLUE }, + { LOGL_INFO, OSMO_LOGCOLOR_GREEN }, + { LOGL_NOTICE, OSMO_LOGCOLOR_YELLOW }, + { LOGL_ERROR, OSMO_LOGCOLOR_RED }, + { LOGL_FATAL, OSMO_LOGCOLOR_RED }, { 0, NULL } }; @@ -428,7 +428,7 @@ ret = snprintf(buf + offset, rem, "%s%s%s%s ", target->use_color ? level_color(level) : "", log_category_name(subsys), - target->use_color ? "\033[0;m" : "", + target->use_color ? OSMO_LOGCOLOR_END : "", c_subsys ? c_subsys : ""); if (ret < 0) goto err; @@ -438,7 +438,7 @@ ret = snprintf(buf + offset, rem, "%s%s%s%s ", target->use_color ? level_color(level) : "", log_level_str(level), - target->use_color ? "\033[0;m" : "", + target->use_color ? OSMO_LOGCOLOR_END : "", c_subsys ? c_subsys : ""); if (ret < 0) goto err; @@ -501,7 +501,7 @@ } if (target->use_color) { - ret = snprintf(buf + offset, rem, "\033[0;m"); + ret = snprintf(buf + offset, rem, OSMO_LOGCOLOR_END); if (ret < 0) goto err; OSMO_SNPRINTF_RET(ret, rem, offset, len); diff --git a/tests/logging/logging_test.c b/tests/logging/logging_test.c index 8fd71d0..b9cb57f 100644 --- a/tests/logging/logging_test.c +++ b/tests/logging/logging_test.c @@ -37,19 +37,19 @@ [DRLL] = { .name = "DRLL", .description = "A-bis Radio Link Layer (RLL)", - .color = "\033[1;31m", + .color = OSMO_LOGCOLOR_RED, .enabled = 1, .loglevel = LOGL_NOTICE, }, [DCC] = { .name = "DCC", .description = "Layer3 Call Control (CC)", - .color = "\033[1;32m", + .color = OSMO_LOGCOLOR_GREEN, .enabled = 1, .loglevel = LOGL_NOTICE, }, [DMM] = { .name = NULL, .description = "Layer3 Mobility Management (MM)", - .color = "\033[1;33m", + .color = OSMO_LOGCOLOR_YELLOW, .enabled = 1, .loglevel = LOGL_NOTICE, }, }; diff --git a/tests/loggingrb/loggingrb_test.c b/tests/loggingrb/loggingrb_test.c index 3372c0c..0b2ae5b 100644 --- a/tests/loggingrb/loggingrb_test.c +++ b/tests/loggingrb/loggingrb_test.c @@ -34,19 +34,19 @@ [DRLL] = { .name = "DRLL", .description = "A-bis Radio Link Layer (RLL)", - .color = "\033[1;31m", + .color = OSMO_LOGCOLOR_RED, .enabled = 1, .loglevel = LOGL_NOTICE, }, [DCC] = { .name = "DCC", .description = "Layer3 Call Control (CC)", - .color = "\033[1;32m", + .color = OSMO_LOGCOLOR_GREEN, .enabled = 1, .loglevel = LOGL_NOTICE, }, [DMM] = { .name = NULL, .description = "Layer3 Mobility Management (MM)", - .color = "\033[1;33m", + .color = OSMO_LOGCOLOR_BLUE, .enabled = 1, .loglevel = LOGL_NOTICE, }, }; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a Gerrit-Change-Number: 16156 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:58:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:58:48 +0000 Subject: Change in libosmocore[master]: fix DLSMS logging category color: '[1:38m' isn't actually defined In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16157 ) Change subject: fix DLSMS logging category color: '[1:38m' isn't actually defined ...................................................................... fix DLSMS logging category color: '[1:38m' isn't actually defined Instead it apparently renders as bright white, so just use that constant instead. Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2 --- M src/logging.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/logging.c b/src/logging.c index 7baa777..4d6224d 100644 --- a/src/logging.c +++ b/src/logging.c @@ -163,7 +163,7 @@ .name = "DLSMS", .description = "Layer3 Short Message Service (SMS)", .enabled = 1, .loglevel = LOGL_NOTICE, - .color = "\033[1;38m", + .color = OSMO_LOGCOLOR_BRIGHTWHITE, }, [INT2IDX(DLCTRL)] = { .name = "DLCTRL", -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic775b6e37ccf61dc71a540b41d6a16a8a9291dc2 Gerrit-Change-Number: 16157 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:58:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:58:48 +0000 Subject: Change in libosmocore[master]: cosmetic: logging.h: fix comment s/levels/subsystems In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16158 ) Change subject: cosmetic: logging.h: fix comment s/levels/subsystems ...................................................................... cosmetic: logging.h: fix comment s/levels/subsystems Change-Id: I242a4a44649bc4dac055985ba8fd63b2f784ee6d --- M include/osmocom/core/logging.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index 75650ba..79eec10 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -105,7 +105,7 @@ #define LOGL_ERROR 7 /*!< error condition, requires user action */ #define LOGL_FATAL 8 /*!< fatal, program aborted */ -/* logging levels defined by the library itself */ +/* logging subsystems defined by the library itself */ #define DLGLOBAL -1 /*!< global logging */ #define DLLAPD -2 /*!< LAPD implementation */ #define DLINP -3 /*!< (A-bis) Input sub-system */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I242a4a44649bc4dac055985ba8fd63b2f784ee6d Gerrit-Change-Number: 16158 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:58:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:58:48 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16030 ) Change subject: osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order ...................................................................... osmo_sockaddr_str: API doc: fix 32bit addr mixup of host/network byte order Of course both v4 and v6 addresses are kept in network byte order when represented in bytes, but when writing, I somehow must have assumed that inet_pton() returns host byte order. Fix that mixup in the API docs: osmo_sockaddr_str_from_32() and osmo_sockaddr_str_to_32() actually use network byte order. osmo_sockaddr_str_from_32n() and osmo_sockaddr_str_to_32n() actually use host byte order, though reflecting 'n' in their name. sockaddr_str_test: use hexdump instead of %x to show the osmo_sockaddr_str_to_32*() conversions so that the error becomes obvious. (Printing %x reverses the bytes again and made it look correct.) Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 --- M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 3 files changed, 58 insertions(+), 54 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/sockaddr_str.c b/src/sockaddr_str.c index 5c548b4..304363d 100644 --- a/src/sockaddr_str.c +++ b/src/sockaddr_str.c @@ -255,7 +255,7 @@ return 0; } -/*! Convert IPv4 address from 32bit host-byte-order to osmo_sockaddr_str, and set port. +/*! Convert IPv4 address from 32bit network-byte-order to osmo_sockaddr_str, and set port. * \param[out] sockaddr_str The instance to copy to. * \param[in] addr 32bit IPv4 address data. * \param[in] port Port number. @@ -270,7 +270,8 @@ return osmo_sockaddr_str_from_in_addr(sockaddr_str, &addr, port); } -/*! Convert IPv4 address from 32bit network-byte-order to osmo_sockaddr_str, and set port. +/*! Convert IPv4 address from 32bit host-byte-order to osmo_sockaddr_str, and set port. + * For legacy reasons, this function has a misleading 'n' in its name. * \param[out] sockaddr_str The instance to copy to. * \param[in] addr 32bit IPv4 address data. * \param[in] port Port number. @@ -376,9 +377,9 @@ return 0; } -/*! Convert osmo_sockaddr_str address string to IPv4 address data in host-byte-order. +/*! Convert osmo_sockaddr_str address string to IPv4 address data in network-byte-order. * \param[in] sockaddr_str The instance to convert the IP of. - * \param[out] dst IPv4 address data in 32bit host-byte-order format to write to. + * \param[out] dst IPv4 address data in 32bit network-byte-order format to write to. * \return 0 on success, negative on error (e.g. invalid IPv4 address string). */ int osmo_sockaddr_str_to_32(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) @@ -396,9 +397,10 @@ return 0; } -/*! Convert osmo_sockaddr_str address string to IPv4 address data in network-byte-order. +/*! Convert osmo_sockaddr_str address string to IPv4 address data in host-byte-order. + * For legacy reasons, this function has a misleading 'n' in its name. * \param[in] sockaddr_str The instance to convert the IP of. - * \param[out] dst IPv4 address data in 32bit network-byte-order format to write to. + * \param[out] dst IPv4 address data in 32bit host-byte-order format to write to. * \return 0 on success, negative on error (e.g. invalid IPv4 address string). */ int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) diff --git a/tests/sockaddr_str/sockaddr_str_test.c b/tests/sockaddr_str/sockaddr_str_test.c index 7d8fe4f..7e015ce 100644 --- a/tests/sockaddr_str/sockaddr_str_test.c +++ b/tests/sockaddr_str/sockaddr_str_test.c @@ -149,7 +149,8 @@ uint32_t a = 0; rc = osmo_sockaddr_str_to_32(x, &a); - printf(" osmo_sockaddr_str_to_32() %s uint32_t=0x%x\n", rc_name(rc), a); + printf(" osmo_sockaddr_str_to_32() %s uint8_t[4]=[ %s]\n", rc_name(rc), + osmo_hexdump((void*)&a, sizeof(a))); if (rc == 0) { struct osmo_sockaddr_str back; @@ -165,7 +166,8 @@ uint32_t a = 0; rc = osmo_sockaddr_str_to_32n(x, &a); - printf(" osmo_sockaddr_str_to_32n() %s uint32_t=0x%x\n", rc_name(rc), a); + printf(" osmo_sockaddr_str_to_32n() %s uint8_t[4]=[ %s]\n", rc_name(rc), + osmo_hexdump((void*)&a, sizeof(a))); if (rc == 0) { struct osmo_sockaddr_str back; diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index 31f630f..33d9d7e 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -7,9 +7,9 @@ osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=01020304 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc == 0 uint32_t=0x4030201 + osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 01 02 03 04 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } - osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0x1020304 + osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 04 03 02 01 ] -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005010203040000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } @@ -26,9 +26,9 @@ osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=00000000 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc == 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } - osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0x0 + osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } @@ -45,9 +45,9 @@ osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=ffffffff -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc == 0 uint32_t=0xffffffff + osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ ff ff ff ff ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } - osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0xffffffff + osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ ff ff ff ff ] -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=0200ffffffffffff0000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } @@ -63,8 +63,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000001000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -77,8 +77,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000001000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -92,8 +92,8 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00010002000300000000000000000004 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000001000200030000000000000000000400000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } @@ -109,8 +109,8 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000000000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } @@ -126,8 +126,8 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000001 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000000000000000000000000000000000000000000000100000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } @@ -143,8 +143,8 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=ffffffffffffffffffffffffffffffff -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a00ffff00000000ffffffffffffffffffffffffffffffff00000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -161,8 +161,8 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=ffffffffffffffffffffffffffffffff -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } DIFFERS! - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a00ffff00000000ffffffffffffffffffffffffffffffff00000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -179,8 +179,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000001000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -193,8 +193,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000001000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -207,8 +207,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -222,8 +222,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000005000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -237,8 +237,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -252,8 +252,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000005000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -266,8 +266,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -281,9 +281,9 @@ osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=01020304 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc == 0 uint32_t=0x4030201 + osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 01 02 03 04 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } - osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0x1020304 + osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 04 03 02 01 ] -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000000010203040000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } @@ -299,8 +299,8 @@ osmo_sockaddr_str_is_nonzero() = false osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -316,8 +316,8 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=0000000000000000000000010a090807 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } DIFFERS! - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000001000000000000000000000000000000010a09080700000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } @@ -335,9 +335,9 @@ osmo_sockaddr_str_to_in_addr() rc == 0 in_addr=00000000 -> osmo_sockaddr_str_from_in_addr() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 - osmo_sockaddr_str_to_32() rc == 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } - osmo_sockaddr_str_to_32n() rc == 0 uint32_t=0x0 + osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } @@ -354,8 +354,8 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } @@ -372,8 +372,8 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } DIFFERS! - osmo_sockaddr_str_to_32() rc < 0 uint32_t=0x0 - osmo_sockaddr_str_to_32n() rc < 0 uint32_t=0x0 + osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3cf150cc0cc06dd36039fbde091bc71b01697322 Gerrit-Change-Number: 16030 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:58:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:58:49 +0000 Subject: Change in libosmocore[master]: utils.h: add OSMO_NAME_C_IMPL() macro In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15957 ) Change subject: utils.h: add OSMO_NAME_C_IMPL() macro ...................................................................... utils.h: add OSMO_NAME_C_IMPL() macro Provide a common implementation for foo_name_c() functions that base on foo_name_buf() functions. char *foo_name_c(void *ctx, example_t arg) { OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg) } Rationale: the most efficient way of composing strings that have optional parts or require loops for composition is by writing to a ready char[], and this in turn is easiest done by using OSMO_STRBUF_* API. Using such a basic name string implementation which typically returns a length, I often want a more convenient version that returns a char*, which can just be inlined in a "%s" string format -- crucially: skipping string composition when inlined in a LOGP(). This common implementation allows saving code dup, only the function signature is needed. Why not include the function signature in the macro? The two sets of varargs (1: signature args, 2: function call args) are hard to do. Also, having an explicit signature is good for readability and code grepping / ctags. Upcoming uses: in libosmocore in the mslookup (D-GSM) implementation (osmo_mslookup_result_name_c()), and in osmo_msc's codec negotiation implementation (sdp_audio_codecs_name_c(), sdp_msg_name_c(), ...). I54b6c0810f181259da307078977d9ef3d90458c9 (libosmocore) If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 (osmo-msc) Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 --- M include/osmocom/core/utils.h M tests/utils/utils_test.c M tests/utils/utils_test.ok 3 files changed, 154 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved neels: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index c4e6f5f..86d45bc 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -271,4 +272,59 @@ bool osmo_str_startswith(const char *str, const char *startswith_str); +/*! Translate a buffer function to a talloc context function. + * This is the full function body of a char *foo_name_c(void *ctx, val...) function, implemented by an + * int foo_name_buf(buf, buflen, val...) function: + * + * char *foo_name_c(void *ctx, example_t arg) + * { + * OSMO_NAME_C_IMPL(ctx, 64, "ERROR", foo_name_buf, arg) + * } + * + * Return a talloc'd string containing the result of the given foo_name_buf() function, or ON_ERROR on error in the called + * foo_name_buf() function. + * + * If ON_ERROR is NULL, the function returns NULL on error rc from FUNC_BUF. Take care: returning NULL in printf() like + * formats (LOGP()) makes the program crash. If ON_ERROR is non-NULL, it must be a string constant, which is not + * returned directly, but written to an allocated string buffer first. + * + * \param[in] INITIAL_BUFSIZE Which size to first talloc from ctx -- a larger size makes a reallocation less likely, a + * smaller size allocates less unused bytes, zero allocates once but still runs the string composition twice. + * \param[in] ON_ERROR String constant to copy on error rc returned by FUNC_BUF, or NULL to return NULL. + * \param[in] FUNC_BUF Name of a function with signature foo_buf(char *buf, size_t buflen, ...). + * \param[in] FUNC_BUF_ARGS Additional arguments to pass to FUNC_BUF after the buf and buflen. + */ +#define OSMO_NAME_C_IMPL(CTX, INITIAL_BUFSIZE, ON_ERROR, FUNC_BUF, FUNC_BUF_ARGS...) \ + size_t _len = INITIAL_BUFSIZE; \ + int _needed; \ + char *_str = NULL; \ + if ((INITIAL_BUFSIZE) > 0) { \ + _str = (char*)talloc_named_const(CTX, _len, __func__); \ + OSMO_ASSERT(_str); \ + } \ + _needed = FUNC_BUF(_str, _len, ## FUNC_BUF_ARGS); \ + if (_needed < 0) \ + goto OSMO_NAME_C_on_error; \ + if (_needed < _len) \ + return _str; \ + _len = _needed + 1; \ + if (_str) \ + talloc_free(_str); \ + _str = (char*)talloc_named_const(CTX, _len, __func__); \ + OSMO_ASSERT(_str); \ + _needed = FUNC_BUF(_str, _len, ## FUNC_BUF_ARGS); \ + if (_needed < 0) \ + goto OSMO_NAME_C_on_error; \ + return _str; \ +OSMO_NAME_C_on_error: \ + /* Re-using and re-sizing above allocated buf ends up in very complex code. Just free and strdup. */ \ + if (_str) \ + talloc_free(_str); \ + if (!(ON_ERROR)) \ + return NULL; \ + _str = talloc_strdup(CTX, ON_ERROR); \ + OSMO_ASSERT(_str); \ + talloc_set_name_const(_str, __func__); \ + return _str; + /*! @} */ diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index 70d017f..55c9e7f 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -1058,6 +1058,86 @@ startswith_test_str("abc", "xyz", false); } +static int foo_name_buf(char *buf, size_t buflen, const char *arg) +{ + if (!arg) + return -EINVAL; + return snprintf(buf, buflen, "%s", arg); +} + +static char *foo_name_c(void *ctx, const char *arg) +{ + OSMO_NAME_C_IMPL(ctx, 10, "ERROR", foo_name_buf, arg) +} + +static char *foo_name_c_null(void *ctx, const char *arg) +{ + OSMO_NAME_C_IMPL(ctx, 10, NULL, foo_name_buf, arg) +} + +static char *foo_name_c_zero(void *ctx, const char *arg) +{ + OSMO_NAME_C_IMPL(ctx, 0, "ERROR", foo_name_buf, arg) +} + +static char *foo_name_c_zero_null(void *ctx, const char *arg) +{ + OSMO_NAME_C_IMPL(ctx, 0, NULL, foo_name_buf, arg) +} + +static void name_c_impl_test() +{ + char *test_strs[] = { + "test", + "longer than 10 chars", + NULL, + }; + struct { + const char *label; + char *(*func)(void *, const char*); + } funcs[] = { + { + "OSMO_NAME_C_IMPL(10, \"ERROR\")", + foo_name_c, + }, + { + "OSMO_NAME_C_IMPL(10, NULL)", + foo_name_c_null, + }, + { + "OSMO_NAME_C_IMPL(0, \"ERROR\")", + foo_name_c_zero, + }, + { + "OSMO_NAME_C_IMPL(0, NULL)", + foo_name_c_zero_null, + }, + }; + + int i; + void *ctx = talloc_named_const(NULL, 0, __func__); + int allocs = talloc_total_blocks(ctx); + + printf("\n%s\n", __func__); + for (i = 0; i < ARRAY_SIZE(test_strs); i++) { + char *test_str = test_strs[i]; + int j; + printf("%2d: %s\n", i, osmo_quote_str(test_str, -1)); + + for (j = 0; j < ARRAY_SIZE(funcs); j++) { + char *str = funcs[j].func(ctx, test_str); + printf(" %30s -> %s", funcs[j].label, osmo_quote_str(str, -1)); + printf(" allocated %d", (int)talloc_total_blocks(ctx) - allocs); + if (str) { + printf(" %zu bytes, name '%s'", talloc_total_size(str), talloc_get_name(str)); + talloc_free(str); + } + printf("\n"); + } + } + talloc_free(ctx); +} + int main(int argc, char **argv) { static const struct log_info log_info = {}; @@ -1078,5 +1158,6 @@ strbuf_test(); strbuf_test_nolen(); startswith_test(); + name_c_impl_test(); return 0; } diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index c150a8d..b603647 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -360,3 +360,20 @@ osmo_str_startswith("abc", "abc") == true osmo_str_startswith("abc", "abcd") == false osmo_str_startswith("abc", "xyz") == false + +name_c_impl_test + 0: "test" + OSMO_NAME_C_IMPL(10, "ERROR") -> "test" allocated 1 10 bytes, name 'foo_name_c' + OSMO_NAME_C_IMPL(10, NULL) -> "test" allocated 1 10 bytes, name 'foo_name_c_null' + OSMO_NAME_C_IMPL(0, "ERROR") -> "test" allocated 1 5 bytes, name 'foo_name_c_zero' + OSMO_NAME_C_IMPL(0, NULL) -> "test" allocated 1 5 bytes, name 'foo_name_c_zero_null' + 1: "longer than 10 chars" + OSMO_NAME_C_IMPL(10, "ERROR") -> "longer than 10 chars" allocated 1 21 bytes, name 'foo_name_c' + OSMO_NAME_C_IMPL(10, NULL) -> "longer than 10 chars" allocated 1 21 bytes, name 'foo_name_c_null' + OSMO_NAME_C_IMPL(0, "ERROR") -> "longer than 10 chars" allocated 1 21 bytes, name 'foo_name_c_zero' + OSMO_NAME_C_IMPL(0, NULL) -> "longer than 10 chars" allocated 1 21 bytes, name 'foo_name_c_zero_null' + 2: NULL + OSMO_NAME_C_IMPL(10, "ERROR") -> "ERROR" allocated 1 6 bytes, name 'foo_name_c' + OSMO_NAME_C_IMPL(10, NULL) -> NULL allocated 0 + OSMO_NAME_C_IMPL(0, "ERROR") -> "ERROR" allocated 1 6 bytes, name 'foo_name_c_zero' + OSMO_NAME_C_IMPL(0, NULL) -> NULL allocated 0 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida5ba8d9640ea641aafef0236800f6d489d3d322 Gerrit-Change-Number: 15957 Gerrit-PatchSet: 11 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:58:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:58:49 +0000 Subject: Change in libosmocore[master]: fix osmo_escape_str_c() and osmo_quote_str_c() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16159 ) Change subject: fix osmo_escape_str_c() and osmo_quote_str_c() ...................................................................... fix osmo_escape_str_c() and osmo_quote_str_c() The osmo_escape_str_c() and osmo_quote_str_c() functions return truncated results when characters need escaping. For example: osmo_quote_str_c(NULL, "foo"); --> "foo" osmo_quote_str_c(NULL, "foo\n"); --> "foo\n osmo_quote_str_c(NULL, "foo\tbar\t\n"); --> "foo\tbar\t Implement these _c variants using OSMO_NAME_C_IMPL() to always allocate sufficient memory. However, current osmo_escape_str_buf2() and osmo_quote_str_buf2() fail to return the required buffer size (even though that information is readily avaiable), so these don't qualify for accurate use of OSMO_NAME_C_IMPL(). Hence, move the implementations of osmo_escape_str and osmo_quote_str to an internal static function that returns the characters needed, so that all dynamically allocating implementations can return un-truncated results. Of course, external callers would also benefit from escape/quote API that accurately returns the amount of characters needed, but I am not changing public API in this patch, on purpose, ... yet. Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8 --- M src/utils.c 1 file changed, 49 insertions(+), 31 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/utils.c b/src/utils.c index 6fc2ee6..904f6e4 100644 --- a/src/utils.c +++ b/src/utils.c @@ -668,13 +668,15 @@ } /*! Return the string with all non-printable characters escaped. + * This internal function is the implementation for all osmo_escape_str* and osmo_quote_str* API versions. + * It provides a return value of characters-needed, to allow producing un-truncated strings in all cases. * \param[out] buf string buffer to write escaped characters to. * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). - * \return The output buffer (buf). + * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). */ -char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) +static size_t _osmo_escape_str_buf(char *buf, size_t bufsize, const char *str, int in_len) { struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; int in_pos = 0; @@ -729,6 +731,19 @@ } done: + return sb.chars_needed; +} + +/*! Return the string with all non-printable characters escaped. + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \return The output buffer (buf). + */ +char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) +{ + _osmo_escape_str_buf(buf, bufsize, str, in_len); return buf; } @@ -750,10 +765,31 @@ */ char *osmo_escape_str_c(const void *ctx, const char *str, int in_len) { - char *buf = talloc_size(ctx, in_len+1); - if (!buf) - return NULL; - return osmo_escape_str_buf2(buf, in_len+1, str, in_len); + /* The string will be at least as long as in_len, but some characters might need escaping. + * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_escape_str_buf, str, in_len); +} + +/*! Return a quoted and escaped representation of the string. + * This internal function is the implementation for all osmo_quote_str* API versions. + * It provides a return value of characters-needed, to allow producing un-truncated strings in all cases. + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + */ +static size_t _osmo_quote_str_buf(char *buf, size_t bufsize, const char *str, int in_len) +{ + struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; + if (!str) + OSMO_STRBUF_PRINTF(sb, "NULL"); + else { + OSMO_STRBUF_PRINTF(sb, "\""); + OSMO_STRBUF_APPEND(sb, _osmo_escape_str_buf, str, in_len); + OSMO_STRBUF_PRINTF(sb, "\""); + } + return sb.chars_needed; } /*! Like osmo_escape_str_buf2(), but returns double-quotes around a string, or "NULL" for a NULL string. @@ -767,14 +803,7 @@ */ char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) { - struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; - if (!str) - OSMO_STRBUF_PRINTF(sb, "NULL"); - else { - OSMO_STRBUF_PRINTF(sb, "\""); - OSMO_STRBUF_APPEND_NOLEN(sb, osmo_escape_str_buf2, str, in_len); - OSMO_STRBUF_PRINTF(sb, "\""); - } + _osmo_quote_str_buf(buf, bufsize, str, in_len); return buf; } @@ -792,7 +821,7 @@ return "NULL"; if (!buf || !bufsize) return "(error)"; - osmo_quote_str_buf2(buf, bufsize, str, in_len); + _osmo_quote_str_buf(buf, bufsize, str, in_len); return buf; } @@ -804,7 +833,8 @@ */ const char *osmo_quote_str(const char *str, int in_len) { - return osmo_quote_str_buf(str, in_len, namebuf, sizeof(namebuf)); + _osmo_quote_str_buf(namebuf, sizeof(namebuf), str, in_len); + return namebuf; } /*! Like osmo_quote_str_buf() but returns the result in a dynamically-allocated buffer. @@ -814,21 +844,9 @@ */ char *osmo_quote_str_c(const void *ctx, const char *str, int in_len) { - size_t len = in_len == -1 ? strlen(str) : in_len; - char *buf; - - /* account for two quote characters + terminating NUL */ - len += 3; - - /* some minimum length for things like "NULL" or "(error)" */ - if (len < 32) - len = 32; - - buf = talloc_size(ctx, len); - if (!buf) - return NULL; - - return osmo_quote_str_buf2(buf, len, str, in_len); + /* The string will be at least as long as in_len, but some characters might need escaping. + * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_quote_str_buf, str, in_len); } /*! perform an integer square root operation on unsigned 32bit integer. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I16c08eced41bf1b7acf6e95f658068ace99ca4c8 Gerrit-Change-Number: 16159 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:59:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:59:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add sdp to MNCC In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032 ) Change subject: msc: add sdp to MNCC ...................................................................... msc: add sdp to MNCC SDP is added to the MNCC protocol in osmo-msc Ie16f0804c4d99760cd4a0c544d0889b6313eebb7. This patch adds SDP to the ttcn3 MNCC messaging. These changes still work with current osmo-msc master that doesn't send SDP / ignores received SDP in MNCC. Change-Id: Ic9568c8927507e161aadfad1a4d20aa896d8ae30 --- M library/MNCC_EncDec.cc M library/MNCC_Types.ttcn M library/mncc.h 3 files changed, 106 insertions(+), 50 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/library/MNCC_EncDec.cc b/library/MNCC_EncDec.cc index b4937e7..f2692d7 100644 --- a/library/MNCC_EncDec.cc +++ b/library/MNCC_EncDec.cc @@ -259,7 +259,7 @@ case MNCC_RTP_FREE: in_rtp = (const struct gsm_mncc_rtp *) in_mncc; rtp = MNCC__PDU__Rtp(in_rtp->callref, in_rtp->ip, in_rtp->port, in_rtp->payload_type, - in_rtp->payload_msg_type); + in_rtp->payload_msg_type, in_rtp->sdp); u.rtp() = rtp; break; default: @@ -315,6 +315,7 @@ sign.imsi() = CHARSTRING(in_mncc->imsi); sign.lchan__type() = in_mncc->lchan_type; sign.lchan__mode() = in_mncc->lchan_mode; + sign.sdp() = in_mncc->sdp; u.signal() = sign; break; } diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn index 828f341..5296579 100644 --- a/library/MNCC_Types.ttcn +++ b/library/MNCC_Types.ttcn @@ -360,7 +360,9 @@ charstring imsi, uint8_t lchan_type, /* empty in OSmoMSC */ - uint8_t lchan_mode /* empty in OsmoMSC */ + uint8_t lchan_mode, /* empty in OsmoMSC */ + + charstring sdp optional }; @@ -374,7 +376,9 @@ uint32_t ip, uint16_t rtp_port, uint32_t payload_type, - uint32_t payload_msg_type + uint32_t payload_msg_type, + + charstring sdp optional }; type record MNCC_PDU_Hello { @@ -464,7 +468,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -494,7 +499,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -527,7 +533,8 @@ emergency := omit, imsi := imsi, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } }; @@ -559,7 +566,8 @@ emergency := *, imsi := imsi, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } }; @@ -592,7 +600,8 @@ emergency := omit, imsi := imsi, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } }; @@ -623,7 +632,8 @@ emergency := omit, imsi := imsi, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } }; @@ -656,7 +666,8 @@ emergency := *, imsi := imsi, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -688,7 +699,8 @@ emergency := omit, imsi := imsi, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -719,7 +731,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -750,7 +763,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -791,7 +805,8 @@ emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -822,7 +837,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -855,7 +871,8 @@ emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -887,7 +904,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -922,7 +940,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -955,7 +974,8 @@ emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -988,7 +1008,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1021,7 +1042,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1053,7 +1075,8 @@ emergency := omit, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1088,7 +1111,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1120,7 +1144,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1152,7 +1177,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1183,7 +1209,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1217,7 +1244,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1249,7 +1277,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1283,7 +1312,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1316,7 +1346,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1349,7 +1380,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1381,7 +1413,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1413,7 +1446,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1443,7 +1477,8 @@ emergency := omit, imsi := ?, lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1490,7 +1525,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1521,7 +1557,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1552,7 +1589,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1583,7 +1621,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1614,7 +1653,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1653,7 +1693,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1684,7 +1725,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1715,7 +1757,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1747,7 +1790,8 @@ emergency := *, imsi := ?, lchan_type := ?, - lchan_mode := ? + lchan_mode := ?, + sdp := * } } } @@ -1778,7 +1822,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1810,7 +1855,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1849,7 +1895,8 @@ emergency := omit, imsi := "", lchan_type := 0, - lchan_mode := 0 + lchan_mode := 0, + sdp := "" } } } @@ -1877,7 +1924,8 @@ ip := 0, rtp_port := 0, payload_type := 0, - payload_msg_type := 0 + payload_msg_type := 0, + sdp := "" } } } @@ -1897,7 +1945,8 @@ ip := ip, rtp_port := rtp_port, payload_type := payload_type, - payload_msg_type := ? + payload_msg_type := ?, + sdp := * } } } @@ -1911,7 +1960,8 @@ ip := ip, rtp_port := rtp_port, payload_type := pt, - payload_msg_type := 0 + payload_msg_type := 0, + sdp := "" } } } @@ -1926,7 +1976,8 @@ ip := ip, rtp_port := rtp_port, payload_type := pt, - payload_msg_type := 0 + payload_msg_type := 0, + sdp := "" } } } diff --git a/library/mncc.h b/library/mncc.h index 3e00db8..9aff948 100644 --- a/library/mncc.h +++ b/library/mncc.h @@ -265,6 +265,8 @@ unsigned char lchan_type; unsigned char lchan_mode; + + char sdp[1024]; }; struct gsm_data_frame { @@ -296,6 +298,8 @@ uint16_t port; uint32_t payload_type; uint32_t payload_msg_type; + + char sdp[1024]; }; struct gsm_mncc_bridge { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic9568c8927507e161aadfad1a4d20aa896d8ae30 Gerrit-Change-Number: 16032 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:59:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:59:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: overhaul voice call testing In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 ) Change subject: msc: overhaul voice call testing ...................................................................... msc: overhaul voice call testing * Semantic: We don't really know which side the MSC first creates a CRCX for. Instead of assuming that the RAN side is always CRCX'd first, simply handle a "first" and a "second" CRCX, not making any assumptions which is for which side. Notably, there still are quite a few places assuming which CRCX corresponds to the RAN/CN side, but the changes are sufficient to still pass the tests when osmo-msc swaps the CRCX order; sometimes for slightly obscure reasons, for example because it doesn't matter that the wrong port number is returned during a subsequent MDCX... Cleaning up the rest is still todo for later. Remove code dup from call establishing code, particularly for MGCP. Use f_mo_call_establish() and f_mt_call() where ever possible, to make all of the call establishing tests handle upcoming changes in osmo-msc's order of messages, without re-implementing the changes for each test individually. The X-Osmux parameter was so far expected to appear in the first CRCX received, assuming that this first CRCX is for the RAN. Instead, detect whether X-Osmux is contained in a CRCX, and reply with an Osmux CID if so, regardless of it being the first or second CRCX. Count the number of X-Osmux parameters received in CRCX messages, and compare after call setup to verify X-Osmux presence. Since f_mo_call_establish() can't handle RANAP assignment, a few Iu tests that worked with the older code dup will break by this patch. This is fixed by a subsequent patch, see I0ead36333ab665147b8d222070ea5cf8afc555ec. * Details, per patch chunk: Change ts_BSSMAP_IE_AoIP_TLA4 to a non-value template, so that we can use a wildcard for the assigned port number from MGCP (depending on RAN or CN CRCX first, the RAN port number can be one or the other). In CallParameters, move MGCP handling instructions into a separate record "CrcxResponse", and have two of them for handling the first and the second CRCX, replacing mgw_rtp_{ip,port}_{bss,mss} and mgcp_connection_id_{bss,mss}. In CallParameters, add some flags for early-exiting call establishment with a particular desired behavior, for specialized tests. In CallParameters, use common default values and don't repeat them in each and every call establishing test. Set cpars.mo_call := {true,false} implicitly when f_{mo,mt}_call_establish() are invoked. Remove CRCX comments implying RAN or CN side, instead just talk of the "first" and the "second" CRCX. Implement one common f_handle_crcx() function, which is used by f_mo_call_establish(), f_mt_call_complete(), as_optional_mgcp_crcx(), and implicitly uses the first/second CRCX handling. For Assigment, use a wildcard RTP port so that we don't have to assume which CRCX was for the RAN side. In f_mo_call_establish(), insert special case conditions to make it enact errors at specific times, for individual tests. That saves re-implementing the entire call establishment (code dup). For error cases, add expectation of a CC Release message in the call establishment. This should not apply for normal successful operation, but because interleave does not support conditionals, add flags got_mncc_setup_compl_ind and got_cc_connect to break the interleave when establishing is complete, so that the CC Release is skipped. A CC Release always breaks the interleave, at whatever time it arrives. Tests adopting f_{mo,mt}_call instead of code dup: f_tc_mo_setup_and_nothing() f_tc_mo_crcx_ran_timeout() f_tc_mo_crcx_ran_reject() f_tc_mo_release_timeout() f_tc_mo_cc_bssmap_clear() Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f --- M library/BSSMAP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 3 files changed, 292 insertions(+), 335 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 41755db..406dfc5 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -420,6 +420,19 @@ template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA6(OCT16 ip, uint16_t pt) := ts_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt, 18); +template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_IE_AoIP_TLA(template BSSMAP_FIELD_IPAddress addr, + template uint16_t udp_port, + template integer len := ?) := { + elementIdentifier := '7C'O, + lengthIndicator := len, + ipAddress := addr, + uDPPortValue := udp_port +} +template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_IE_AoIP_TLA4(template OCT4 ip, template uint16_t pt) := + tr_BSSMAP_IE_AoIP_TLA({ipv4:=ip}, pt, 6); +template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_IE_AoIP_TLA6(template OCT16 ip, template uint16_t pt) := + tr_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt, 18); + template (value) BSSMAP_IE_KC128 ts_BSSMAP_IE_Kc128(OCT16 kc128) := { elementIdentifier := '83'O, kC128_Value := kc128 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 7a94d85..4330b53 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -676,6 +676,13 @@ /* re-configure MSC behaviour via VTY */ } +type record CrcxResponse { + integer resp, /* 1 = reply with OK, 0 = do not reply, -1 = reply with error */ + HostName mgw_rtp_ip, + PortNumber mgw_rtp_port, + MgcpConnectionId mgcp_connection_id /* MGCP Connection ID BSS Side */ +} + /* parameters related to a (MO?) voice call */ type record CallParameters { /* CC related parameters */ @@ -695,24 +702,24 @@ PortNumber bss_rtp_port optional, /* BSS Side RTP Port */ HostName mss_rtp_ip optional, /* MSS Side RTP IP */ PortNumber mss_rtp_port optional, /* MSS Side RTP Port */ - HostName mgw_rtp_ip_bss, /* BSS-facing MGW RTP IP */ - PortNumber mgw_rtp_port_bss, /* BSS-facing MGW RTP Port */ - HostName mgw_rtp_ip_mss, /* MSS-facing MGW RTP IP */ - PortNumber mgw_rtp_port_mss, /* MSS-facing MGW RTP Port */ + integer got_crcx_count, + CrcxResponse mgw_conn_1, + CrcxResponse mgw_conn_2, uint7_t rtp_payload_type, /* dynamic RTP payload type */ charstring rtp_sdp_format, /* AMR/8000 or the like */ boolean mgw_drop_dlcx optional, /* Provoke errors by not responding to DLCX (f_mt_call and f_mt_call) */ + boolean stop_after_cc_setup, /* Special case: stop call establish after CC Setup */ + boolean ran_clear_when_alerting, /* Special case: send Clear upon CC Alerting */ MgcpCallId mgcp_call_id optional, /* MGCP Call ID; CallAgent allocated */ MgcpEndpoint mgcp_ep optional /* MGCP Endpoint, CallAgent or MGW allocated */, - MgcpConnectionId mgcp_connection_id_bss, /* MGCP Connection ID BSS Side */ - MgcpConnectionId mgcp_connection_id_mss, /* MGCP Connection ID MSS Side */ - boolean use_osmux /* MSC is expected to use Osmux for this call */ + boolean use_osmux, /* MSC is expected to use Osmux for this call */ + integer got_osmux_count } -template (value) CallParameters t_CallParams(hexstring called, integer tid) := { +template (value) CallParameters t_CallParams(hexstring called := '12345'H, integer tid := 0) := { called_party := called, transaction_id := tid, mo_call := false, @@ -724,32 +731,43 @@ bss_rtp_port := 9000, mss_rtp_ip := omit, mss_rtp_port := omit, - mgw_rtp_ip_bss := "1.1.1.1", - mgw_rtp_port_bss := 10000, - mgw_rtp_ip_mss := "1.1.1.1", - mgw_rtp_port_mss := 11000, + got_crcx_count := 0, + mgw_conn_1 := { + resp := 1, + mgw_rtp_ip := "1.1.1.1", + mgw_rtp_port := 10000, + mgcp_connection_id := '11111'H + }, + mgw_conn_2 := { + resp := 1, + mgw_rtp_ip := "1.1.1.1", + mgw_rtp_port := 11000, + mgcp_connection_id := '22222'H + }, rtp_payload_type := 98, rtp_sdp_format := "AMR/8000", mgw_drop_dlcx := false, + stop_after_cc_setup := false, + ran_clear_when_alerting := false, mgcp_call_id := omit, - mgcp_ep := omit, - mgcp_connection_id_bss := '0'H,// - mgcp_connection_id_mss := '0'H,// - use_osmux := false + mgcp_ep := "rtpbridge/1 at mgw", + use_osmux := false, + got_osmux_count := 0 }; /* Allocate a call reference and send SETUP via MNCC to MSC */ function f_mt_call_initate(inout CallParameters cpars) runs on BSC_ConnHdlr { + cpars.mo_call := false; cpars.mncc_callref := f_rnd_int(2147483648); MNCC.send(ts_MNCC_SETUP_req(cpars.mncc_callref, hex2str(g_pars.msisdn), hex2str(cpars.called_party), hex2str(g_pars.imsi))); } private template (value) SDP_Message ts_SDP_CRCX_CN(CallParameters cpars) := - ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, + cpars.mgw_conn_2.mgw_rtp_port, { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), @@ -770,6 +788,8 @@ log("f_mt_call_complete 1"); + cpars.got_osmux_count := 0; + /* MS <- MSC: Expect CC SETUP */ BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_SETUP(cpars.transaction_id, *, cpars.called_party))); @@ -783,53 +803,26 @@ /* Ask MSC via MNCC to create the RTP socket on the MSC/MGW side */ MNCC.send(ts_MNCC_RTP_CREATE(cpars.mncc_callref)); - /* First MGCP CRCX (for BSS/RAN side) */ + /* First MGCP CRCX */ MGCP.receive(tr_CRCX) -> value mgcp_cmd { log("f_mt_call_complete 3"); - cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - - /* When the endpoint contains a wildcard we keep the endpoint - * identifier we have set up in cpars. Otherwise we use the - * endpoint name that the call agent has supplied */ - if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard) == false) { - cpars.mgcp_ep := mgcp_cmd.line.ep; + if (not f_handle_crcx(cpars, mgcp_cmd)) { + return; } - - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_bss, cpars.mgw_rtp_ip_bss, - hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_bss, - { int2str(cpars.rtp_payload_type) }, - { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, - cpars.rtp_sdp_format)), - valueof(ts_SDP_ptime(20)) })); - - if (cpars.use_osmux) { - osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); - if (osmux_cid != -1) { /* we expect MSC to use wildcard here */ - setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != -1"); - mtc.stop; - } - osmux_cid := 0; - mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); - } else { - mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); - } - - f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); - MGCP.send(mgcp_resp); } if (g_pars.ran_is_geran) { - var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass := - valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss)); + var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass := + tr_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_conn_1.mgw_rtp_ip), ?); interleave { /* Second MGCP CRCX (this time for MSS/CN side) */ [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { log("f_mt_call_complete 4"); - var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + if (not f_handle_crcx(cpars, mgcp_cmd)) { + break; + } } /* MSC acknowledges the MNCC_CREATE to the MNCC handler */ @@ -839,7 +832,7 @@ /* expect the MSC to trigger a BSSMAP ASSIGNMENT */ [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap { - var BSSMAP_IE_AoIP_TransportLayerAddress tla; + var template BSSMAP_IE_AoIP_TransportLayerAddress tla; var BSSMAP_IE_SpeechCodec codec; var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; log("f_mt_call_complete 6"); @@ -853,8 +846,8 @@ mtc.stop; } osmuxCID := valueof(ts_OsmuxCID(0)); - if (cpars.use_osmux and not match(bssap.pdu.bssmap.assignmentRequest.osmuxCID, osmuxCID)) { - setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + if (not match(bssap.pdu.bssmap.assignmentRequest.osmuxCID, osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE. Expected ", osmuxCID, " Got ", bssap.pdu.bssmap.assignmentRequest.osmuxCID); mtc.stop; } bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec, osmuxCID)); @@ -877,9 +870,9 @@ /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */ [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { log("f_mt_call_complete 8"); - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, + cpars.mgw_conn_2.mgw_rtp_port, { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), @@ -890,9 +883,9 @@ setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != 0"); mtc.stop; } - mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgw_conn_1.mgcp_connection_id, osmux_cid, sdp); } else { - mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp); + mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp); } MGCP.send(mgcp_resp); } @@ -900,25 +893,25 @@ /* MDCX setting up the CN side remote RTP address received from MNCC CONNECT */ [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { log("f_mt_call_complete 9"); - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, + cpars.mgw_conn_2.mgw_rtp_port, { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp)); } } } else { - var template TransportLayerAddress rab_tla := ? /* FIXME: encode the mgw_rtp_ip_bss/mgw_rtp_port_bss */ + var template TransportLayerAddress rab_tla := ? /* FIXME: encode the mgw_rtp_ip/mgw_rtp_port */ var template RAB_SetupOrModifyList rab_sml := tr_RAB_SML(rab_id := ?, tla := rab_tla, binding_id := ?); interleave { [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp)); /* MSC acknowledges the MNCC_CREATE to the MNCC handler */ MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)); } @@ -930,6 +923,13 @@ } } + if (cpars.use_osmux == (cpars.got_osmux_count != 0)) { + log("Osmux ok: use_osmux = ", cpars.use_osmux, " got_osmux_count = ", cpars.got_osmux_count); + } else { + setverdict(fail, "Osmux failure: use_osmux = ", cpars.use_osmux, " got_osmux_count = ", cpars.got_osmux_count); + mtc.stop; + } + log("f_mt_call_complete DONE"); } @@ -958,6 +958,139 @@ setverdict(pass); } +/* Reply to a received CRCX with an OK (or the reply configured in cpars), using the given parameters. + * Return true when an OK reply was sent, false otherwise. + * Count occurence of Osmux, include Osmux parameters in the reply if necessary. */ +function f_handle_crcx(inout CallParameters cpars, MgcpCommand mgcp_cmd) +runs on BSC_ConnHdlr +return boolean { + var CrcxResponse conn := cpars.mgw_conn_1; + if (cpars.got_crcx_count > 0) { + conn := cpars.mgw_conn_2; + } + cpars.got_crcx_count := cpars.got_crcx_count + 1; + + var MgcpMessage mgcp_msg := { + command := mgcp_cmd + } + var template MgcpResponse mgcp_resp; + var MgcpOsmuxCID osmux_cid; + var MgcpCallId call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); + if (ispresent(cpars.mgcp_call_id)) { + if (cpars.mgcp_call_id != call_id) { + setverdict(fail, "CRCX contained unexpected call id. Expected:", cpars.mgcp_call_id, " got:", call_id); + mtc.stop; + } + } else { + cpars.mgcp_call_id := call_id; + } + + /* When the endpoint contains a wildcard we keep the endpoint + * identifier we have set up in cpars. Otherwise we use the + * endpoint name that the call agent has supplied */ + if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard) == false) { + cpars.mgcp_ep := mgcp_cmd.line.ep; + } + + if (conn.resp == -1) { + /* Reply with error */ + var MgcpResponse mgcp_rsp := { + line := { + code := "542", + trans_id := mgcp_cmd.line.trans_id, + string := "FORCED_FAIL" + }, + sdp := omit + + } + var MgcpParameter mgcp_rsp_param := { + code := "Z", + val := cpars.mgcp_ep + }; + mgcp_rsp.params[0] := mgcp_rsp_param; + MGCP.send(mgcp_rsp); + return false; + } + + if (conn.resp == 0) { + /* Do not reply at all */ + return false; + } + + if (conn.resp != 1) { + setverdict(fail, "Unexpected value for cpars.mgw_conn_*.resp, expect -1, 0 or 1"); + mtc.stop; + } + + var SDP_Message sdp := valueof(ts_SDP(conn.mgw_rtp_ip, conn.mgw_rtp_ip, + hex2str(cpars.mgcp_call_id), "42", + conn.mgw_rtp_port, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + + if (f_mgcp_contains_par(mgcp_msg, "X-OSMUX")) { + if (not cpars.use_osmux) { + setverdict(fail, "MSC sent X-Osmux parameter in MGCP, but not expecting any Osmux"); + mtc.stop; + } + cpars.got_osmux_count := cpars.got_osmux_count + 1; + /* we expect MSC to use wildcard here, i.e. osmux_cid == -1 */ + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + log("f_handle_crcx(): got Osmux CID: ", osmux_cid); + if (osmux_cid != -1) { + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != -1"); + mtc.stop; + } + + osmux_cid := 0; + mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, conn.mgcp_connection_id, osmux_cid, sdp); + } else { + mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, conn.mgcp_connection_id, sdp); + } + + f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); + MGCP.send(mgcp_resp); + return true; +} + + +altstep as_optional_mgcp_crcx(CallParameters cpars) runs on BSC_ConnHdlr { + var MgcpCommand mgcp_cmd; + [] MGCP.receive(tr_CRCX) -> value mgcp_cmd { + log("as_optional_mgcp_crcx: rx CRCX"); + f_handle_crcx(cpars, mgcp_cmd); + + /* Without this 'repeat', the as_optional_mgcp_crcx() exits currently waiting interleaves as soon as an + * CRCX is handled. */ + repeat; + } +} + +private altstep as_optional_mgcp_mdcx(HostName mgw_rtp_ip, PortNumber mgw_rtp_port) runs on BSC_ConnHdlr { + var MgcpCommand mgcp_cmd; + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + log("as_optional_mgcp_mdcx: rx MDCX"); + log(mgcp_cmd); + var charstring conn_id; + var charstring rtp_payload_type; + f_mgcp_find_param_entry(mgcp_cmd.params, "I", conn_id); + rtp_payload_type := mgcp_cmd.sdp.media_list[0].media_field.fmts[0]; + + var SDP_Message sdp := valueof(ts_SDP(mgw_rtp_ip, mgw_rtp_ip, + mgcp_cmd.sdp.origin.session_id, "42", + mgw_rtp_port, + { rtp_payload_type }, + { valueof(ts_SDP_ptime(20)) })); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, str2hex(conn_id), sdp)); + + /* Without this 'repeat', currently active other interleave and alt series exit as soon as an MDCX is + * handled. */ + repeat; + } +} + function f_mo_call_establish(inout CallParameters cpars) runs on BSC_ConnHdlr { @@ -968,6 +1101,8 @@ var PDU_BSSAP bssap; var MgcpOsmuxCID osmux_cid; + cpars.mo_call := true; + if (cpars.emergency) { f_establish_fully(EST_TYPE_EMERG_CALL); } else { @@ -984,8 +1119,14 @@ BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); } - var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass := - valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss)); + if (cpars.stop_after_cc_setup) { + return; + } + + var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass := + tr_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_conn_1.mgw_rtp_ip), ?); + + var default mdcx := activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_port)); interleave { [] MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc { @@ -994,43 +1135,20 @@ MNCC.send(ts_MNCC_RTP_CREATE(cpars.mncc_callref)); } - /* First MGCP CRCX (for BSS/RAN side) */ + /* First MGCP CRCX */ [] MGCP.receive(tr_CRCX) -> value mgcp_cmd { log("f_mo_call_establish 2: rx 1st CRCX"); - cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - - /* When the endpoint contains a wildcard we keep the endpoint - * identifier we have set up in cpars. Otherwise we use the - * endpoint name that the call agent has supplied */ - if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard) == false) { - cpars.mgcp_ep := mgcp_cmd.line.ep; + if (not f_handle_crcx(cpars, mgcp_cmd)) { + break; + } } - if (cpars.use_osmux) { - osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + /* Second MGCP CRCX */ + [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { + log("f_mo_call_establish 6: rx 2nd CRCX"); + if (not f_handle_crcx(cpars, mgcp_cmd)) { + break; } - - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_bss, cpars.mgw_rtp_ip_bss, - hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_bss, - { int2str(cpars.rtp_payload_type) }, - { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, - cpars.rtp_sdp_format)), - valueof(ts_SDP_ptime(20)) })); - - if (cpars.use_osmux) { - osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); - if (osmux_cid != -1) { /* we expect MSC to use wildcard here */ - setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != -1"); - mtc.stop; - } - osmux_cid := 0; - mgcp_resp := ts_CRCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); - } else { - mgcp_resp := ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, sdp); - } - f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep)); - MGCP.send(mgcp_resp); } [] MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)) { @@ -1050,7 +1168,7 @@ var BSSMAP_IE_SpeechCodec codec; var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; - if (tla_ass != bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer) { + if (not match(bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer, tla_ass)) { log("Expected:", tla_ass); log("Got:", bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer); setverdict(fail, "MSC sent Assignment Request with unexpected AoIP Transport Layer IE"); @@ -1084,9 +1202,9 @@ /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */ [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { log("f_mo_call_establish 5: rx MDCX for the RAN side"); - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, + cpars.mgw_conn_2.mgw_rtp_port, { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), @@ -1098,22 +1216,25 @@ setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != 0"); mtc.stop; } - mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_bss, osmux_cid, sdp); + mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgw_conn_1.mgcp_connection_id, osmux_cid, sdp); } else { - mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp); + mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp); } MGCP.send(mgcp_resp); } - /* Second MGCP CRCX (this time for MSS/CN side) */ - [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { - log("f_mo_call_establish 6: rx 2nd CRCX, for CN side"); - var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); - } - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(cpars.transaction_id))) { log("f_mo_call_establish 7: rx CC Alerting"); + + if (cpars.ran_clear_when_alerting) { + if (g_pars.ran_is_geran) { + BSSAP.send(ts_BSSMAP_ClearRequest(0)); + } else { + BSSAP.send(ts_RANAP_IuReleaseRequest(ts_RanapCause_om_intervention)); + } + break; + } + cpars.mncc_callref := mncc.u.signal.callref; /* Call Proceeding */ MNCC.send(ts_MNCC_RTP_CONNECT(cpars.mncc_callref, @@ -1127,33 +1248,32 @@ log("f_mo_call_establish 8: rx MNCC SETUP COMPLETE ind"); } - /* second MDCX setting up the CN side remote RTP address and codec received from MNCC RTP CONNECT */ - [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { - log("f_mo_call_establish 9: rx MDCX for CN side"); - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, - hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, - { int2str(cpars.rtp_payload_type) }, - { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, - cpars.rtp_sdp_format)), - valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); - } - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CONNECT(cpars.transaction_id))) { log("f_mo_call_establish 10: rx CC CONNECT"); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT_ACK(cpars.transaction_id))); } + + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) { + log("f_mo_call_establish 11: rx CC RELEASE"); + f_expect_clear(); + break; + } + } + + f_sleep(0.5); + deactivate(mdcx); + + if (cpars.use_osmux == (cpars.got_osmux_count != 0)) { + log("Osmux ok: use_osmux = ", cpars.use_osmux, " got_osmux_count = ", cpars.got_osmux_count); + } else { + setverdict(fail, "Osmux failure: use_osmux = ", cpars.use_osmux, " got_osmux_count = ", cpars.got_osmux_count); + mtc.stop; } log("f_mo_call_establish DONE"); setverdict(pass); } -private altstep as_optional_mgcp_mdcx() runs on BSC_ConnHdlr { - [] MGCP.receive(tr_MDCX) {}; -} - function f_call_hangup(inout CallParameters cpars, boolean release_by_ms, boolean is_csfb := false) runs on BSC_ConnHdlr { @@ -1194,7 +1314,7 @@ respond_to_dlcx := not (isbound(cpars.mgw_drop_dlcx) and valueof(cpars.mgw_drop_dlcx)); - var default mdcx := activate(as_optional_mgcp_mdcx()); + var default mdcx := activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_port)); /* clearing of radio channel */ interleave { diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index c290d7c..b4db43d 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -608,12 +608,7 @@ friend function f_tc_lu_and_mo_call(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); - var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - + var CallParameters cpars := valueof(t_CallParams); f_perform_lu(); f_mo_call(cpars); } @@ -939,7 +934,6 @@ private function f_emerg_call(MobileIdentityLV mi) runs on BSC_ConnHdlr { var CallParameters cpars := valueof(t_CallParams('112'H, 0)); cpars.emergency := true; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; f_mo_call(cpars); } @@ -1213,14 +1207,14 @@ f_init_handler(pars, 190.0); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); + cpars.mgw_conn_2.resp := 0; + cpars.stop_after_cc_setup := true; + + f_vty_config(MSCVTY, "msc", "mncc guard-timeout 20"); f_perform_lu(); - f_establish_fully(); - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); - - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); + f_mo_call_establish(cpars); var default ccrel := activate(as_optional_cc_rel(cpars)); @@ -1247,28 +1241,15 @@ var MgcpCommand mgcp_cmd; f_perform_lu(); + /* Do not respond to the second CRCX */ + cpars.mgw_conn_2.resp := 0; + f_mo_call_establish(cpars); - f_establish_fully(); - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); + var default ccrel := activate(as_optional_cc_rel(cpars)); - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); - MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc; - cpars.mncc_callref := mncc.u.signal.callref; - MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); + f_expect_clear(60.0); - MGCP.receive(tr_CRCX) -> value mgcp_cmd; - cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - cpars.mgcp_ep := mgcp_cmd.line.ep; - /* never respond to this */ - - /* When the connection with the MGW fails, the MSC will first request - * a release via call control. We will answer this request normally. */ - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))); - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id))); - - f_expect_clear(30.0); + deactivate(ccrel); } testcase TC_mo_crcx_ran_timeout() runs on MTC_CT { var BSC_ConnHdlr vc_conn; @@ -1282,75 +1263,18 @@ /* Test MO Call with reject to RAN-side CRCX */ friend function f_tc_mo_crcx_ran_reject(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); + var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - var MNCC_PDU mncc; - var MgcpCommand mgcp_cmd; + + /* Respond with error for the first CRCX */ + cpars.mgw_conn_1.resp := -1; f_perform_lu(); + f_mo_call_establish(cpars); - f_establish_fully(); - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); - - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); - MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc; - cpars.mncc_callref := mncc.u.signal.callref; - MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); - - MGCP.receive(tr_CRCX) -> value mgcp_cmd; - - /* Detect if the received CRCX is a wildcarded CRCX request. If yes, - * set an endpoint name that fits the pattern. If not, just use the - * endpoint name from the request */ - if (match(mgcp_cmd.line.ep, t_MGCP_EP_wildcard)) { - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - } else { - cpars.mgcp_ep := mgcp_cmd.line.ep; - } - - cpars.mgcp_call_id := f_MgcpCmd_extract_call_id(mgcp_cmd); - - /* Respond to CRCX with error */ - var MgcpResponse mgcp_rsp := { - line := { - code := "542", - trans_id := mgcp_cmd.line.trans_id, - string := "FORCED_FAIL" - }, - sdp := omit - } - var MgcpParameter mgcp_rsp_param := { - code := "Z", - val := cpars.mgcp_ep - }; - mgcp_rsp.params[0] := mgcp_rsp_param; - MGCP.send(mgcp_rsp); - - timer T := 30.0; - T.start; - alt { - [] T.timeout { - setverdict(fail, "Timeout waiting for channel release"); - mtc.stop; - } - [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) { - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id))); - repeat; - } - [] MNCC.receive { repeat; } - [] GSUP.receive { repeat; } - /* Note: As we did not respond properly to the CRCX from the MSC we - * expect the MSC to omit any further MGCP operation (At least in the - * the current implementation, there is no recovery mechanism implemented - * and a DLCX can not be performed as the MSC does not know a specific - * endpoint yet. */ - [] MGCP.receive { - setverdict(fail, "Unexpected MGCP message"); - mtc.stop; - } - [] as_clear_cmd_compl_disc(); - } + var default ccrel := activate(as_optional_cc_rel(cpars)); + f_expect_clear(60.0); + deactivate(ccrel); } testcase TC_mo_crcx_ran_reject() runs on MTC_CT { var BSC_ConnHdlr vc_conn; @@ -1520,10 +1444,6 @@ friend function f_tc_gsup_cancel(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; /* Location Update to make subscriber known */ f_perform_lu(); @@ -1741,15 +1661,8 @@ private function f_tc_lu_and_mt_call(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '10004'H; - cpars.mgcp_connection_id_mss := '10005'H; cpars.use_osmux := pars.use_osmux; - /* Note: This is an optional parameter. When the call-agent (MSC) does - * supply a full endpoint name this setting will be overwritten. */ - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - f_perform_lu(); f_mt_call(cpars); } @@ -1773,11 +1686,6 @@ private function f_tc_mo_setup_dtmf_dup(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.mo_call := true; f_perform_lu(); f_mo_seq_dtmf_dup(cpars); @@ -1838,20 +1746,11 @@ var MNCC_PDU mncc; var MgcpCommand mgcp_cmd; + /* Do not respond to the second CRCX */ + cpars.mgw_conn_2.resp := 0; + f_perform_lu(); - - f_establish_fully(); - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); - - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); - MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc; - cpars.mncc_callref := mncc.u.signal.callref; - MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); - - /* Drop CRCX */ - MGCP.receive(tr_CRCX) -> value mgcp_cmd; + f_mo_call_establish(cpars); var default ccrel := activate(as_optional_cc_rel(cpars)); @@ -1872,13 +1771,6 @@ private function f_tc_lu_and_mt_call_no_dlcx_resp(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '10004'H; - cpars.mgcp_connection_id_mss := '10005'H; - - /* Note: This is an optional parameter. When the call-agent (MSC) does - * supply a full endpoint name this setting will be overwritten. */ - cpars.mgcp_ep := "rtpbridge/1 at mgw"; /* Intentionally disable the CRCX response */ cpars.mgw_drop_dlcx := true; @@ -3107,10 +2999,6 @@ /* Call parameters taken from f_tc_lu_and_mt_call */ var CallParameters cpars := valueof(t_CallParams('123456'H, 0)); - cpars.mgcp_connection_id_bss := '10004'H; - cpars.mgcp_connection_id_mss := '10005'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.bss_rtp_port := 1110; /* Perform location update */ f_perform_lu(); @@ -3190,51 +3078,13 @@ friend function f_tc_mo_cc_bssmap_clear(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - var MNCC_PDU mncc; - var MgcpCommand mgcp_cmd; + cpars.ran_clear_when_alerting := true; f_perform_lu(); - f_establish_fully(); - f_create_mncc_expect(hex2str(cpars.called_party)); - f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit}); - - BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party))); - MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc; - cpars.mncc_callref := mncc.u.signal.callref; - log("mncc_callref=", cpars.mncc_callref); - MNCC.send(ts_MNCC_CALL_PROC_req(cpars.mncc_callref, cpars.mncc_bearer_cap)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); - - MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref)); - BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(cpars.transaction_id))); - MGCP.receive(tr_CRCX); - - f_sleep(1.0); - if (pars.ran_is_geran) { - BSSAP.send(ts_BSSMAP_ClearRequest(0)); - } else { - BSSAP.send(ts_RANAP_IuReleaseRequest(ts_RanapCause_om_intervention)); - } - var default ccrel := activate(as_optional_cc_rel(cpars)); - - if (pars.ran_is_geran) { - interleave { - [] MNCC.receive(tr_MNCC_REL_ind(?, ?)) { }; - [] BSSAP.receive(tr_BSSMAP_ClearCommand) { - BSSAP.send(ts_BSSMAP_ClearComplete); - }; - } - } else { - interleave { - [] MNCC.receive(tr_MNCC_REL_ind(?, ?)) { }; - [] BSSAP.receive(tr_RANAP_IuReleaseCommand(?)) { - BSSAP.send(ts_RANAP_IuReleaseComplete); - }; - } - } - + f_mo_call_establish(cpars); + f_expect_clear() deactivate(ccrel); f_sleep(1.0); @@ -3255,10 +3105,6 @@ /* Call parameters taken from f_tc_lu_and_mt_call */ var CallParameters cpars := valueof(t_CallParams('123456'H, 0)); - cpars.mgcp_connection_id_bss := '10004'H; - cpars.mgcp_connection_id_mss := '10005'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.bss_rtp_port := 1110; /* Perform location update */ f_perform_lu(); @@ -5020,13 +4866,6 @@ var octetstring vlr_name := f_enc_dns_hostname(mp_vlr_name); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '10004'H; - cpars.mgcp_connection_id_mss := '10005'H; - - /* Note: This is an optional parameter. When the call-agent (MSC) does - * supply a full endpoint name this setting will be overwritten. */ - cpars.mgcp_ep := "rtpbridge/1 at mgw"; /* Initiate a call via MNCC interface */ f_mt_call_initate(cpars); @@ -5142,11 +4981,6 @@ private function f_tc_ho_inter_bsc_unknown_cell(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.mo_call := true; f_perform_lu(); f_mo_call_establish(cpars); @@ -5175,25 +5009,20 @@ private altstep as_mgcp_ack_all_mdcx(CallParameters cpars) runs on BSC_ConnHdlr { var MgcpCommand mgcp_cmd; [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { - var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss, + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, hex2str(cpars.mgcp_call_id), "42", - cpars.mgw_rtp_port_mss, + cpars.mgw_conn_2.mgw_rtp_port, { int2str(cpars.rtp_payload_type) }, { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, cpars.rtp_sdp_format)), valueof(ts_SDP_ptime(20)) })); - MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp)); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp)); repeat; } } private function f_tc_ho_inter_bsc0(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.mo_call := true; f_init_handler(pars); @@ -5353,11 +5182,6 @@ private function f_tc_ho_inter_msc_out(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); - cpars.bss_rtp_port := 1110; - cpars.mgcp_connection_id_bss := '22222'H; - cpars.mgcp_connection_id_mss := '33333'H; - cpars.mgcp_ep := "rtpbridge/1 at mgw"; - cpars.mo_call := true; var hexstring ho_number := f_gen_msisdn(99999); f_init_handler(pars); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15938 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8b82476f55a98f7a94d5c4f1cd80eac427b2d20f Gerrit-Change-Number: 15938 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:59:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:59:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: fix Iu mo call In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 ) Change subject: msc: fix Iu mo call ...................................................................... msc: fix Iu mo call Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec --- M library/ranap/RANAP_Templates.ttcn M msc/BSC_ConnectionHandler.ttcn 2 files changed, 48 insertions(+), 31 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/library/ranap/RANAP_Templates.ttcn b/library/ranap/RANAP_Templates.ttcn index df4ea03..a1b0a59 100644 --- a/library/ranap/RANAP_Templates.ttcn +++ b/library/ranap/RANAP_Templates.ttcn @@ -1305,7 +1305,7 @@ protocolIEs := { { id := id_RAB_SetupOrModifyList, - criticality := reject, + criticality := ignore, value_ := { rAB_SetupOrModifyList := rab_sml } diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 4330b53..7bbae34 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1091,6 +1091,20 @@ } } +private altstep as_optional_mgcp_dlcx(CallParameters cpars) runs on BSC_ConnHdlr { + var MgcpCommand mgcp_cmd; + var boolean respond_to_dlcx := not (isbound(cpars.mgw_drop_dlcx) and valueof(cpars.mgw_drop_dlcx)); + [] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { + log("as_optional_mgcp_dlcx: rx MGCP DLCX"); + if (respond_to_dlcx) { + MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id)); + } + /* Without this 'repeat', currently active other interleave and alt series exit as soon as a + * DLCX is handled. */ + repeat; + } +} + function f_mo_call_establish(inout CallParameters cpars) runs on BSC_ConnHdlr { @@ -1099,6 +1113,7 @@ var template MgcpResponse mgcp_resp; var boolean respond_to_dlcx; var PDU_BSSAP bssap; + var RANAP_PDU ranap; var MgcpOsmuxCID osmux_cid; cpars.mo_call := true; @@ -1193,11 +1208,29 @@ } BSSAP.send(bssap); } - /* - [!g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) { - //BSSAP.send(ts_RANAP_RabAssResp(rab_sml)); FIXME + [] BSSAP.receive(tr_RANAP_RabAssReq(*)) -> value ranap { + log("f_mo_call_establish 4.iu: rx RANAP RAB Assignment Request"); + var RAB_SetupOrModifiedList l := { + { + { + id := id_RAB_SetupOrModifiedItem, + criticality := ignore, + value_ := { + rAB_SetupOrModifiedItem := { + rAB_ID := int2bit(23, 8), + transportLayerAddress := hex2bit( '350001c0a8021500000000000000000000000000'H), + iuTransportAssociation := { + bindingID := '040c0000'O + }, + dl_dataVolumes := omit, + iE_Extensions := omit + } + } + } + } + }; + BSSAP.send(ts_RANAP_RabAssResp(l)); } - */ /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */ [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { @@ -1315,48 +1348,32 @@ respond_to_dlcx := not (isbound(cpars.mgw_drop_dlcx) and valueof(cpars.mgw_drop_dlcx)); var default mdcx := activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_port)); + var default dlcx := activate(as_optional_mgcp_dlcx(cpars)); /* clearing of radio channel */ - interleave { - //[g_pars.ran_is_geran] BSSAP.receive(t_clear) { - [] BSSAP.receive(t_clear) { + alt { + [g_pars.ran_is_geran] BSSAP.receive(t_clear) { log("f_call_hangup 5: rx BSSAP Clear Command"); BSSAP.send(ts_BSSMAP_ClearComplete); BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND); log("f_call_hangup 6: rx SCCP DISC"); + setverdict(pass); } - /* - [!g_pars.ran_is_geran] BSSAP.receive(t_iurel) { + [not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_IuReleaseCommand(?)) { + log("f_call_hangup 5.iu: rx Iu Release Command"); BSSAP.send(ts_RANAP_IuReleaseComplete); BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND); - } - */ - [] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { - log("f_call_hangup 7: rx MGCP DLCX"); - if (respond_to_dlcx) { - MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id)); - } - dlcx_contained_ci := f_MgcpCmd_contains_par(mgcp_cmd, "I"); + log("f_call_hangup 6.iu: rx SCCP DISC"); + setverdict(pass); } } - /* Two DLCXes expected, one for RAN and one for CN side. - * Unless the first DLCX did not contain a CI, in which case it was a wildcard DLCX for both. */ - if (dlcx_contained_ci) { - MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { - log("f_call_hangup 8: rx MGCP DLCX"); - if (respond_to_dlcx) { - MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id)); - } - } - } - + f_sleep(1.0); f_create_mgcp_delete_ep(cpars.mgcp_ep); log("f_call_hangup 9: done"); deactivate(mdcx); - - setverdict(pass); + deactivate(dlcx); } function f_mt_call(inout CallParameters cpars) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec Gerrit-Change-Number: 15939 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:59:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:59:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add and fix Iu mt call In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15940 ) Change subject: msc: add and fix Iu mt call ...................................................................... msc: add and fix Iu mt call Change-Id: I3ce29f3d9254656dc295674e8cec72a741b7764a --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn M msc/MSC_Tests_Iu.ttcn 3 files changed, 88 insertions(+), 11 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 7bbae34..11f0a5f 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -905,21 +905,89 @@ } } else { - var template TransportLayerAddress rab_tla := ? /* FIXME: encode the mgw_rtp_ip/mgw_rtp_port */ - var template RAB_SetupOrModifyList rab_sml := tr_RAB_SML(rab_id := ?, tla := rab_tla, binding_id := ?); - interleave { [] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd { - var SDP_Message sdp := valueof(ts_SDP_CRCX_CN(cpars)); - MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp)); - /* MSC acknowledges the MNCC_CREATE to the MNCC handler */ - MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)); + log("f_mt_call_complete 4.iu"); + if (not f_handle_crcx(cpars, mgcp_cmd)) { + break; } - [] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) { - //BSSAP.send(ts_RANAP_RabAssResp(rab_sml)); FIXME } - /* FIXME: same MNCC and MGCP as in 2G above */ + /* MSC acknowledges the MNCC_CREATE to the MNCC handler */ + [] MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)) { + log("f_mt_call_complete 5.iu"); + } + + [] BSSAP.receive(tr_RANAP_RabAssReq(?)) { + log("f_mt_call_complete 6.iu"); + var RAB_SetupOrModifiedList l := { + { + { + id := id_RAB_SetupOrModifiedItem, + criticality := ignore, + value_ := { + rAB_SetupOrModifiedItem := { + rAB_ID := int2bit(23, 8), + transportLayerAddress := hex2bit( '350001c0a8021500000000000000000000000000'H), + iuTransportAssociation := { + bindingID := '040c0000'O + }, + dl_dataVolumes := omit, + iE_Extensions := omit + } + } + } + } + }; + BSSAP.send(ts_RANAP_RabAssResp(l)); + + BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT(cpars.transaction_id))); + } + + [] MNCC.receive(tr_MNCC_SETUP_cnf(cpars.mncc_callref)) { + log("f_mt_call_complete 7.iu"); + MNCC.send(ts_MNCC_RTP_CONNECT(cpars.mncc_callref, + /* ip 42.23.11.5 */ hex2int('42231105'H), + /* port 423 */ 423, + /* payload type 3 = GSM FR */ 3)); + } + + /* MDCX setting up the RAN side remote RTP address received from Assignment Complete */ + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + log("f_mt_call_complete 8.iu"); + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, + hex2str(cpars.mgcp_call_id), "42", + cpars.mgw_conn_2.mgw_rtp_port, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + if (cpars.use_osmux) { + osmux_cid := f_MgcpCmd_extract_osmux_cid(mgcp_cmd); + if (osmux_cid != 0) { /* we expect MSC to use specific CID here */ + setverdict(fail, "MSC using unexpected CID " & int2str(osmux_cid) & " != 0"); + mtc.stop; + } + mgcp_resp := ts_MDCX_ACK_osmux(mgcp_cmd.line.trans_id, cpars.mgw_conn_1.mgcp_connection_id, osmux_cid, sdp); + } else { + mgcp_resp := ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp); + } + MGCP.send(mgcp_resp); + } + + /* MDCX setting up the CN side remote RTP address received from MNCC CONNECT */ + [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + log("f_mt_call_complete 9.iu"); + var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_ip, + hex2str(cpars.mgcp_call_id), "42", + cpars.mgw_conn_2.mgw_rtp_port, + { int2str(cpars.rtp_payload_type) }, + { valueof(ts_SDP_rtpmap(cpars.rtp_payload_type, + cpars.rtp_sdp_format)), + valueof(ts_SDP_ptime(20)) })); + MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_2.mgcp_connection_id, sdp)); + } + } } diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index b4db43d..4ef592f 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1658,7 +1658,7 @@ } /* LU followed by MT call (including paging) */ -private function f_tc_lu_and_mt_call(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { +friend function f_tc_lu_and_mt_call(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { f_init_handler(pars); var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); cpars.use_osmux := pars.use_osmux; diff --git a/msc/MSC_Tests_Iu.ttcn b/msc/MSC_Tests_Iu.ttcn index 628fbcd..987baf0 100644 --- a/msc/MSC_Tests_Iu.ttcn +++ b/msc/MSC_Tests_Iu.ttcn @@ -249,6 +249,13 @@ vc_conn.done; } +testcase TC_iu_lu_and_mt_call() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(3); + vc_conn := f_start_handler(refers(f_tc_lu_and_mt_call), 1142, ran_idx := 2, ran_is_geran := false); + vc_conn.done; +} + testcase TC_iu_lu_and_mo_sms() runs on MTC_CT { var BSC_ConnHdlr vc_conn; f_init(3); @@ -438,6 +445,8 @@ execute( TC_iu_mo_release_timeout() ); execute( TC_reset_two_1iu() ); + execute( TC_iu_lu_and_mt_call() ); + execute( TC_iu_lu_and_mo_sms() ); execute( TC_iu_lu_and_mt_sms() ); execute( TC_iu_lu_and_mt_sms_paging_and_nothing() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3ce29f3d9254656dc295674e8cec72a741b7764a Gerrit-Change-Number: 15940 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:59:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:59:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: log tweaks for call / call hangup In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15941 ) Change subject: msc: log tweaks for call / call hangup ...................................................................... msc: log tweaks for call / call hangup Change-Id: I06474e3d592195a8c422493166d9f042da1ac7e6 --- M msc/BSC_ConnectionHandler.ttcn 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 11f0a5f..a1c8bd3 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1389,6 +1389,7 @@ t_clear := tr_BSSMAP_ClearCommandCSFB; } + log("f_call_hangup 0: tx MNCC_DISC_REQ"); MNCC.send(ts_MNCC_DISC_req(cpars.mncc_callref, valueof(ts_MNCC_cause(23)))); BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_DISC(cpars.transaction_id))); @@ -1449,9 +1450,10 @@ f_mt_call_establish(cpars); - /* Hold the call for some time */ + log("Hold the call for some time"); f_sleep(3.0); + log("Hangup"); f_call_hangup(cpars, true); setverdict(pass); @@ -1462,9 +1464,10 @@ f_mo_call_establish(cpars); - /* Hold the call for some time */ + log("Hold the call for some time"); f_sleep(3.0); + log("Hangup"); f_call_hangup(cpars, false); setverdict(pass); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15941 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I06474e3d592195a8c422493166d9f042da1ac7e6 Gerrit-Change-Number: 15941 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:59:09 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:59:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add f_tc_invalid_mgcp_crash In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15942 ) Change subject: msc: add f_tc_invalid_mgcp_crash ...................................................................... msc: add f_tc_invalid_mgcp_crash Make sure that osmo-msc doesn't crash if a successful CRCX response contains an invalid IP address. Originally/recently, osmo-msc did not validate the IP addresses at all. In an intermediate patch I added error handling, releasing the call. That uncovered a use-after-free problem in libosmo-mgcp-client. This problem is fixed by osmo_fsm_set_dealloc_ctx() and an osmo-mgw fix (see I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 in osmo-mgw). Add this test to make sure the crash is not re-introduced. Change-Id: I0c76b0a7a33a96a39a242ecd387ba3769161cf7a --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 2 files changed, 40 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index a1c8bd3..0846c04 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -711,6 +711,7 @@ (f_mt_call and f_mt_call) */ boolean stop_after_cc_setup, /* Special case: stop call establish after CC Setup */ boolean ran_clear_when_alerting, /* Special case: send Clear upon CC Alerting */ + boolean expect_release, /* Special case: expect call establish to cause direct CC Rel */ MgcpCallId mgcp_call_id optional, /* MGCP Call ID; CallAgent allocated */ MgcpEndpoint mgcp_ep optional /* MGCP Endpoint, CallAgent or MGW allocated */, @@ -749,6 +750,7 @@ mgw_drop_dlcx := false, stop_after_cc_setup := false, ran_clear_when_alerting := false, + expect_release := false, mgcp_call_id := omit, mgcp_ep := "rtpbridge/1 at mgw", use_osmux := false, @@ -1210,6 +1212,8 @@ tr_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_conn_1.mgw_rtp_ip), ?); var default mdcx := activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_port)); + var boolean got_mncc_setup_compl_ind := false; + var boolean got_cc_connect := false; interleave { [] MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc { @@ -1347,15 +1351,27 @@ [] MNCC.receive(tr_MNCC_SETUP_COMPL_ind(?)) -> value mncc { log("f_mo_call_establish 8: rx MNCC SETUP COMPLETE ind"); + got_mncc_setup_compl_ind := true; + if (not cpars.expect_release and got_cc_connect) { + break; + } } [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CONNECT(cpars.transaction_id))) { log("f_mo_call_establish 10: rx CC CONNECT"); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT_ACK(cpars.transaction_id))); + got_cc_connect := true; + if (not cpars.expect_release and got_mncc_setup_compl_ind) { + break; + } } [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) { log("f_mo_call_establish 11: rx CC RELEASE"); + if (not cpars.expect_release) { + setverdict(fail, "Got unexpected CC Release"); + mtc.stop; + } f_expect_clear(); break; } diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 4ef592f..480ec96 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -5662,6 +5662,29 @@ vc_conn.done; } +friend function f_tc_invalid_mgcp_crash(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars); + var CallParameters cpars := valueof(t_CallParams('12345'H, 0)); + + /* Set invalid IP address so that osmo-msc discards the rtp_stream and MGCP endpoint FSM instances in the middle + * of successful MGCP response dispatch. If things aren't safeguarded, the on_success() in osmo_mgcpc_ep_fsm + * will cause a use-after-free after that event dispatch. */ + cpars.mgw_conn_1.mgw_rtp_ip := "0.0.0.0"; + cpars.mgw_conn_2.mgw_rtp_ip := "0.0.0.0"; + cpars.rtp_sdp_format := "FOO/8000"; + cpars.expect_release := true; + + f_perform_lu(); + f_mo_call_establish(cpars); +} +testcase TC_invalid_mgcp_crash() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + + vc_conn := f_start_handler(refers(f_tc_invalid_mgcp_crash), 7); + vc_conn.done; +} + control { execute( TC_cr_before_reset() ); execute( TC_lu_imsi_noauth_tmsi() ); @@ -5792,6 +5815,7 @@ if (mp_enable_osmux_test) { execute( TC_lu_and_mt_call_osmux() ); } + execute( TC_invalid_mgcp_crash() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15942 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0c76b0a7a33a96a39a242ecd387ba3769161cf7a Gerrit-Change-Number: 15942 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:59:09 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:59:09 +0000 Subject: Change in osmo-ttcn3-hacks[master]: re-implement compare-results.sh as compare-results.py In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15943 ) Change subject: re-implement compare-results.sh as compare-results.py ...................................................................... re-implement compare-results.sh as compare-results.py The compare-results.sh is annoyingly slow. Since our ttcn3 tests containers support Python 2, re-implement in Python for much quicker evaluation. Change-Id: I0747c9d66ffc7e4121497a2416fca78d7b56c8e6 --- A compare-results.py D compare-results.sh M start-testsuite.sh 3 files changed, 138 insertions(+), 214 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/compare-results.py b/compare-results.py new file mode 100755 index 0000000..d1adb20 --- /dev/null +++ b/compare-results.py @@ -0,0 +1,137 @@ +#!/usr/bin/env python +# Copyright 2018 sysmocom - s.f.m.c. GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import argparse +import re + +doc = "Compare TTCN3 test run results with expected results by junit logs." + +# The nicest would be to use an XML library, but I don't want to introduce dependencies on the build slaves. +re_testcase = re.compile(r'''''') +re_testcase_end = re.compile(r'''(|]*/>)''') +re_failure = re.compile(r'''($')" ]; then - test_result="pass" - else - test_result="FAIL" - fi -} - -pass=0 -xfail=0 -more_failures=0 -more_successes=0 -skipped=0 -new=0 - -while read line; do - parse_testcase "$line" - exp_suite_name="$suite_name" - exp_test_name="$test_name" - exp_test_result="$test_result" - matched="0" - - while read line; do - parse_testcase "$line" - if [ "x$exp_suite_name" != "x$suite_name" ]; then - continue - fi - if [ "x$exp_test_name" != "x$test_name" ]; then - continue - fi - - if [ "x$exp_test_result" = "x$test_result" ]; then - if [ "x$exp_test_result" = "xFAIL" ]; then - exp_test_result="xfail" - (( xfail += 1 )) - else - (( pass += 1 )) - fi - echo "$exp_test_result $suite_name.$test_name" - else - if [ "x$exp_test_result" = "xFAIL" ]; then - exp_test_result="xfail" - fi - echo "$exp_test_result->$test_result $suite_name.$test_name" - if [ "x$test_result" = "xFAIL" ]; then - (( more_failures += 1 )) - else - (( more_successes += 1 )) - fi - fi - matched="1" - break - done <<< "$(grep " Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 07:59:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 07:59:45 +0000 Subject: Change in osmo-sgsn[master]: Improve logging in gprs_llc.c code In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 ) Change subject: Improve logging in gprs_llc.c code ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Id89cc6760179fb9b1709a30b5d1af41d466b280b Gerrit-Change-Number: 16147 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 23 Nov 2019 07:59:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:00:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:00:05 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm.c: Send XID reset with received TLLI In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16151 ) Change subject: gprs_gmm.c: Send XID reset with received TLLI ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ide51726abb82f5784eca4ab8d62b2ad8512be843 Gerrit-Change-Number: 16151 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 23 Nov 2019 08:00:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:00:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:00:14 +0000 Subject: Change in osmo-sgsn[master]: gprs_llc.c: Use enum instead of hardcoded value In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16150 ) Change subject: gprs_llc.c: Use enum instead of hardcoded value ...................................................................... gprs_llc.c: Use enum instead of hardcoded value Change-Id: I89815f44f615a188f46a13f3785b3f7484f73bb3 --- M src/sgsn/gprs_llc.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/sgsn/gprs_llc.c b/src/sgsn/gprs_llc.c index 244d22c..ed5d55e 100644 --- a/src/sgsn/gprs_llc.c +++ b/src/sgsn/gprs_llc.c @@ -1115,7 +1115,7 @@ int gprs_llgmm_reset(struct gprs_llc_llme *llme) { struct msgb *msg = msgb_alloc_headroom(4096, 1024, "LLC_XID"); - struct gprs_llc_lle *lle = &llme->lle[1]; + struct gprs_llc_lle *lle = &llme->lle[GPRS_SAPI_GMM]; uint8_t xid_bytes[1024]; int xid_bytes_len, rc; uint8_t *xid; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16150 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I89815f44f615a188f46a13f3785b3f7484f73bb3 Gerrit-Change-Number: 16150 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:00:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:00:14 +0000 Subject: Change in osmo-sgsn[master]: Improve logging in gprs_llc.c code In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 ) Change subject: Improve logging in gprs_llc.c code ...................................................................... Improve logging in gprs_llc.c code Change-Id: Id89cc6760179fb9b1709a30b5d1af41d466b280b --- M include/osmocom/sgsn/gprs_sgsn.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_llc.c 3 files changed, 26 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h index 0a52a7d..0886ce7 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/gprs_sgsn.h @@ -257,15 +257,15 @@ LOGP(DMM, level, "UE(%p){NOTSUPPORTED} " fmt, ue, ## args) #endif -#define LOGGBP(llme, level, fmt, args...) \ - LOGP(DMM, level, "LLME(%08x/%08x){%s} " fmt, (llme)->old_tlli, \ +#define LOGGBP(llme, category, level, fmt, args...) \ + LOGP(category, level, "LLME(%08x/%08x){%s} " fmt, (llme)->old_tlli, \ (llme)->tlli, get_value_string_or_null(gprs_llc_llme_state_names, (llme)->state), ## args); #define LOGGBIUP(llme, msg, level, fmt, args...) \ do { \ struct ranap_ue_conn_ctx * _ue; \ if (llme) { \ - LOGGBP(llme, level, fmt, ## args); \ + LOGGBP(llme, DMM, level, fmt, ## args); \ } else if ((msg) && (_ue = MSG_IU_UE_CTX(msg))) { \ LOGIUP(_ue, level, fmt, ## args); \ } else { OSMO_ASSERT(0); } \ diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 17daa7d..7a09760 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1625,7 +1625,7 @@ if (llme) { /* send a XID reset to re-set all LLC sequence numbers * in the MS */ - LOGGBP(llme, LOGL_NOTICE, "LLC XID RESET\n"); + LOGGBP(llme, DMM, LOGL_NOTICE, "LLC XID RESET\n"); gprs_llgmm_reset(llme); } /* The MS has to perform GPRS attach */ @@ -1905,7 +1905,7 @@ if (llme && !mmctx && gh->msg_type != GSM48_MT_GMM_ATTACH_REQ && gh->msg_type != GSM48_MT_GMM_RA_UPD_REQ) { - LOGGBP(llme, LOGL_NOTICE, "Cannot handle GMM for unknown MM CTX\n"); + LOGGBP(llme, DMM, LOGL_NOTICE, "Cannot handle GMM for unknown MM CTX\n"); /* 4.7.10 */ if (gh->msg_type == GSM48_MT_GMM_STATUS) { /* TLLI unassignment */ diff --git a/src/sgsn/gprs_llc.c b/src/sgsn/gprs_llc.c index 2a27da8..244d22c 100644 --- a/src/sgsn/gprs_llc.c +++ b/src/sgsn/gprs_llc.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -528,7 +529,7 @@ struct gprs_llc_llme *llme; /* FIXME: don't use the TLLI but the 0xFFFF unassigned? */ llme = llme_alloc(tlli); - LOGP(DLLC, LOGL_NOTICE, "LLC RX: unknown TLLI 0x%08x, " + LOGGBP(llme, DLLC, LOGL_NOTICE, "LLC RX: unknown TLLI 0x%08x, " "creating LLME on the fly\n", tlli); lle = &llme->lle[sapi]; return lle; @@ -1047,6 +1048,10 @@ uint32_t old_tlli, uint32_t new_tlli) { unsigned int i; + bool free = false; + + LOGGBP(llme, DLLC, LOGL_NOTICE, "LLGM Assign pre (%08x => %08x)\n", + old_tlli, new_tlli); if (old_tlli == TLLI_UNASSIGNED && new_tlli != TLLI_UNASSIGNED) { /* TLLI Assignment 8.3.1 */ @@ -1087,10 +1092,16 @@ struct gprs_llc_lle *l = &llme->lle[i]; l->state = GPRS_LLES_UNASSIGNED; } - llme_free(llme); + free = true; } else return -EINVAL; + LOGGBP(llme, DLLC, LOGL_NOTICE, "LLGM Assign post (%08x => %08x)\n", + old_tlli, new_tlli); + + if (free) + llme_free(llme); + return 0; } @@ -1109,11 +1120,13 @@ int xid_bytes_len, rc; uint8_t *xid; - LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); + LOGGBP(llme, DLLC, LOGL_NOTICE, "LLGM Reset\n"); 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)); + LOGGBP(llme, DLLC, LOGL_ERROR, + "osmo_get_rand_id() failed for LLC XID reset: %s\n", + strerror(-rc)); return rc; } @@ -1144,11 +1157,13 @@ int xid_bytes_len, rc; uint8_t *xid; - LOGP(DLLC, LOGL_NOTICE, "LLGM Reset\n"); + LOGGBP(llme, DLLC, LOGL_NOTICE, "LLGM Reset (SAPI=%" PRIu8 ")\n", sapi); 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)); + LOGGBP(llme, DLLC, LOGL_ERROR, + "osmo_get_rand_id() failed for LLC XID reset: %s\n", + strerror(-rc)); return rc; } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Id89cc6760179fb9b1709a30b5d1af41d466b280b Gerrit-Change-Number: 16147 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:00:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:00:15 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm.c: Send XID reset with received TLLI In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16151 ) Change subject: gprs_gmm.c: Send XID reset with received TLLI ...................................................................... gprs_gmm.c: Send XID reset with received TLLI Otherwise lower layers will end up using a TLLI from PTMSI which was not yet announced to the MS if it is still not in GMM attached state, as showcased by SGSN_Tests.TC_attach_req_id_req_ra_update. Related: OS#3957, OS#4245 Change-Id: Ide51726abb82f5784eca4ab8d62b2ad8512be843 --- M src/sgsn/gprs_gmm.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 7a09760..f62d0d1 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1626,7 +1626,7 @@ /* send a XID reset to re-set all LLC sequence numbers * in the MS */ LOGGBP(llme, DMM, LOGL_NOTICE, "LLC XID RESET\n"); - gprs_llgmm_reset(llme); + gprs_llgmm_reset_oldmsg(msg, GPRS_SAPI_GMM, llme); } /* The MS has to perform GPRS attach */ /* Device is still IMSI attached for CS but initiate GPRS ATTACH, -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ide51726abb82f5784eca4ab8d62b2ad8512be843 Gerrit-Change-Number: 16151 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:00:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:00:45 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 ) Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 Gerrit-Change-Number: 16016 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:00:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:00:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:00:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sgsn: Introduce test TC_attach_req_id_req_ra_update In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 ) Change subject: sgsn: Introduce test TC_attach_req_id_req_ra_update ...................................................................... sgsn: Introduce test TC_attach_req_id_req_ra_update The scenario in this test triggers a crash in osmo-sgsn fixed by osmo-sgsn.git I64fa5cf1b427d3abb99e553e584897261a827ce6. With that osmo-sgsn patch applied, the process doesn't crash anymore but the test still fails due to an XID message being sent with a new yet-not-seen-by-ttcn3 TLLI and as a result TTCN3 BSSGP_Emulation fails: BSSGP_Emulation.ttcn:390 setverdict(fail): none -> fail reason: "Couldn't find Component for TLLI 'FE791757'O", new component reason: "Couldn't find Component for TLLI 'FE791757'O" Other than that, the test runs fine. It still needs to be clarified whether the new TLLI sent by osmo-sgsn is expected and test needs to be fixed, or whether it's an sgsn bug. Related: OS#3957, OS#4245 Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 --- M sgsn/SGSN_Tests.ttcn M sgsn/expected-results.xml 2 files changed, 41 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index a89a949..f070429 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -1070,7 +1070,7 @@ f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, old_ra, false, omit, omit)); alt { - [] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) { + [] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) { /* gmm cause: implicitly detached */ setverdict(pass); } /* FIXME: Expect XID RESET? */ @@ -2814,6 +2814,42 @@ f_cleanup(); } +private function f_TC_attach_req_id_req_ra_update(charstring id) runs on BSSGP_ConnHdlr { + var RoutingAreaIdentificationV old_ra := f_random_RAI(); + var RoutingAreaIdentificationV new_ra := f_random_RAI(); + while (old_ra == new_ra) { new_ra := f_random_RAI(); }; + var template PDU_L3_MS_SGSN attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit); + var PDU_L3_SGSN_MS l3_mt; + + f_send_l3(attach_req, 0); + + BSSGP[0].receive(tr_GMM_ID_REQ(?)); + + f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, new_ra, false, omit, omit)); + alt { + [] BSSGP[0].receive(tr_GMM_RAU_REJECT('0a'O)) { + setverdict(pass); + } + [] BSSGP[0].receive { repeat; } + } +} + +/* This test triggers crash in osmo-sgsn before osmo-sgsn.git I64fa5cf1b427d3abb99e553e584897261a827ce6. + * See OS#3957 and OS#4245 for more information. + */ +testcase TC_attach_req_id_req_ra_update() runs on test_CT { + /* + * MS --> SGSN: Attach Req (TMSI, RAI=901-70-356-101) + * MS <-- SGSN: Identity Request (IMEI) + * MS --> SGSN: RA Updating (RAI=901-70-2758-208) + */ + var BSSGP_ConnHdlr vc_conn; + f_init(); + vc_conn := f_start_handler(refers(f_TC_attach_req_id_req_ra_update), testcasename(), g_gb, 47); + vc_conn.done; + f_cleanup(); +} + control { execute( TC_attach() ); execute( TC_attach_mnc3() ); @@ -2870,6 +2906,9 @@ execute( TC_llc_null() ); execute( TC_llc_sabm_dm_llgmm() ); execute( TC_llc_sabm_dm_ll5() ); + + /* At the end, may crash osmo-sgsn, see OS#3957, OS#4245 */ + execute( TC_attach_req_id_req_ra_update() ); } diff --git a/sgsn/expected-results.xml b/sgsn/expected-results.xml index fc8856a..8381064 100644 --- a/sgsn/expected-results.xml +++ b/sgsn/expected-results.xml @@ -62,4 +62,5 @@ + -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id5554a91a8bda712e282c5a3e9e30fb0ca1ec0e8 Gerrit-Change-Number: 16016 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:01:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:01:41 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Sat, 23 Nov 2019 08:01:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:01:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:01:45 +0000 Subject: Change in docker-playground[master]: respawn.sh: Add logging and limit loop iterations In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16137 ) Change subject: respawn.sh: Add logging and limit loop iterations ...................................................................... respawn.sh: Add logging and limit loop iterations Since we'll now log the script and its children output to a file, let's make sure the loop doesn't run countless times upon failing child process, producing lots of potential undesired output. For instance, if osmo-bts fails to read vty config and exits immediately. Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 --- M osmo-bts-latest/respawn.sh M osmo-bts-master/respawn.sh M osmo-pcu-latest/respawn.sh M osmo-pcu-master/respawn.sh 4 files changed, 28 insertions(+), 4 deletions(-) Approvals: pespin: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/osmo-bts-latest/respawn.sh b/osmo-bts-latest/respawn.sh index ae5cf60..2413916 100755 --- a/osmo-bts-latest/respawn.sh +++ b/osmo-bts-latest/respawn.sh @@ -2,8 +2,14 @@ trap "kill 0" EXIT -while [ -e /etc/passwd ]; do +i=0 +max_i=500 +while [ $i -lt $max_i ]; do + echo "$i: starting: $*" $* & LAST_PID=$! wait $LAST_PID + echo "$i: stopped pid $LAST_PID with status $?" + i=$(expr $i + 1) done +echo "exiting after $max_i runs" diff --git a/osmo-bts-master/respawn.sh b/osmo-bts-master/respawn.sh index ae5cf60..2413916 100755 --- a/osmo-bts-master/respawn.sh +++ b/osmo-bts-master/respawn.sh @@ -2,8 +2,14 @@ trap "kill 0" EXIT -while [ -e /etc/passwd ]; do +i=0 +max_i=500 +while [ $i -lt $max_i ]; do + echo "$i: starting: $*" $* & LAST_PID=$! wait $LAST_PID + echo "$i: stopped pid $LAST_PID with status $?" + i=$(expr $i + 1) done +echo "exiting after $max_i runs" diff --git a/osmo-pcu-latest/respawn.sh b/osmo-pcu-latest/respawn.sh index ae5cf60..2413916 100755 --- a/osmo-pcu-latest/respawn.sh +++ b/osmo-pcu-latest/respawn.sh @@ -2,8 +2,14 @@ trap "kill 0" EXIT -while [ -e /etc/passwd ]; do +i=0 +max_i=500 +while [ $i -lt $max_i ]; do + echo "$i: starting: $*" $* & LAST_PID=$! wait $LAST_PID + echo "$i: stopped pid $LAST_PID with status $?" + i=$(expr $i + 1) done +echo "exiting after $max_i runs" diff --git a/osmo-pcu-master/respawn.sh b/osmo-pcu-master/respawn.sh index ae5cf60..2413916 100755 --- a/osmo-pcu-master/respawn.sh +++ b/osmo-pcu-master/respawn.sh @@ -2,8 +2,14 @@ trap "kill 0" EXIT -while [ -e /etc/passwd ]; do +i=0 +max_i=500 +while [ $i -lt $max_i ]; do + echo "$i: starting: $*" $* & LAST_PID=$! wait $LAST_PID + echo "$i: stopped pid $LAST_PID with status $?" + i=$(expr $i + 1) done +echo "exiting after $max_i runs" -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icc8cac889d94d4cce7d6365781d5b5364404b5b9 Gerrit-Change-Number: 16137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:01:46 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:01:46 +0000 Subject: Change in docker-playground[master]: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16064 ) Change subject: Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file ...................................................................... Update ttcn3-*/jenkins.sh to log stdout+stderr of process to log file This way we get VTY parsing failures as well as backtraces upon process crash. Related: OS#4212 Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 --- M ttcn3-bsc-test/jenkins-sccplite.sh M ttcn3-bsc-test/jenkins.sh M ttcn3-bsc-test/osmo-bsc.cfg M ttcn3-bsc-test/osmo-stp.cfg M ttcn3-bsc-test/sccplite/osmo-bsc.cfg M ttcn3-bscnat-test/jenkins.sh M ttcn3-bscnat-test/osmo-bsc-nat.cfg M ttcn3-bts-test/jenkins.sh M ttcn3-bts-test/oml/osmo-bts.cfg M ttcn3-bts-test/osmo-bsc.cfg M ttcn3-bts-test/osmo-bts.cfg M ttcn3-bts-test/virtphy/osmo-bts.cfg M ttcn3-ggsn-test/osmo-ggsn.cfg M ttcn3-hlr-test/jenkins.sh M ttcn3-hlr-test/osmo-hlr.cfg M ttcn3-mgw-test/osmo-mgw.cfg M ttcn3-msc-test/jenkins.sh M ttcn3-msc-test/osmo-msc.cfg M ttcn3-msc-test/osmo-stp.cfg M ttcn3-pcu-test/jenkins-sns.sh M ttcn3-pcu-test/jenkins.sh M ttcn3-pcu-test/osmo-pcu.cfg M ttcn3-pcu-test/sns/osmo-pcu.cfg M ttcn3-remsim-test/jenkins.sh M ttcn3-sgsn-test/jenkins.sh M ttcn3-sgsn-test/osmo-sgsn.cfg M ttcn3-sgsn-test/osmo-stp.cfg M ttcn3-sip-test/jenkins.sh M ttcn3-sip-test/osmo-sip-connector.cfg M ttcn3-stp-test/osmo-stp.cfg 30 files changed, 50 insertions(+), 139 deletions(-) Approvals: pespin: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/ttcn3-bsc-test/jenkins-sccplite.sh b/ttcn3-bsc-test/jenkins-sccplite.sh index 0a2ff8b..b3791a5 100755 --- a/ttcn3-bsc-test/jenkins-sccplite.sh +++ b/ttcn3-bsc-test/jenkins-sccplite.sh @@ -33,9 +33,7 @@ --network $NET_NAME --ip 172.18.12.10$i \ --name ${BUILD_TAG}-bts$i -d \ $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh \ - osmo-bts-omldummy \ - 172.18.12.20 $((i + 1234)) 1 + /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-omldummy 172.18.12.20 $((i + 1234)) 1 >>/data/osmo-bts-omldummy-${i}.log 2>&1" done echo Starting container with BSC testsuite diff --git a/ttcn3-bsc-test/jenkins.sh b/ttcn3-bsc-test/jenkins.sh index af5c965..3455dc1 100755 --- a/ttcn3-bsc-test/jenkins.sh +++ b/ttcn3-bsc-test/jenkins.sh @@ -41,8 +41,7 @@ --network $NET_NAME --ip 172.18.2.10$i \ --name ${BUILD_TAG}-bts$i -d \ $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh \ - osmo-bts-omldummy 172.18.2.20 $((i + 1234)) 1 + /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-omldummy 172.18.2.20 $((i + 1234)) 1 >>/data/osmo-bts-omldummy-${i}.log 2>&1" done echo Starting container with BSC testsuite diff --git a/ttcn3-bsc-test/osmo-bsc.cfg b/ttcn3-bsc-test/osmo-bsc.cfg index beee66b..4f8fdc2 100644 --- a/ttcn3-bsc-test/osmo-bsc.cfg +++ b/ttcn3-bsc-test/osmo-bsc.cfg @@ -7,9 +7,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bsc.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bsc-test/osmo-stp.cfg b/ttcn3-bsc-test/osmo-stp.cfg index cc734d4..9102114 100644 --- a/ttcn3-bsc-test/osmo-stp.cfg +++ b/ttcn3-bsc-test/osmo-stp.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-stp.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bsc-test/sccplite/osmo-bsc.cfg b/ttcn3-bsc-test/sccplite/osmo-bsc.cfg index 326a5c0..3519d3e 100644 --- a/ttcn3-bsc-test/sccplite/osmo-bsc.cfg +++ b/ttcn3-bsc-test/sccplite/osmo-bsc.cfg @@ -7,7 +7,7 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bsc.log +log stderr logging filter all 1 logging color 1 logging print category 1 diff --git a/ttcn3-bscnat-test/jenkins.sh b/ttcn3-bscnat-test/jenkins.sh index 61ea89b..d52e79a 100755 --- a/ttcn3-bscnat-test/jenkins.sh +++ b/ttcn3-bscnat-test/jenkins.sh @@ -23,7 +23,8 @@ --network $NET_NAME --ip 172.18.15.20 \ -v $VOL_BASE_DIR/bscnat:/data \ --name ${BUILD_TAG}-bscnat -d \ - $REPO_USER/osmo-nitb-$IMAGE_SUFFIX osmo-bsc_nat -c /data/osmo-bsc-nat.cfg + $REPO_USER/osmo-nitb-$IMAGE_SUFFIX \ + /bin/sh -c "osmo-bsc_nat -c /data/osmo-bsc-nat.cfg >/data/osmo-bsc-nat.log 2>&1" echo Starting container with BSCNAT testsuite docker run --rm \ diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg b/ttcn3-bscnat-test/osmo-bsc-nat.cfg index b873b21..c7518b7 100644 --- a/ttcn3-bscnat-test/osmo-bsc-nat.cfg +++ b/ttcn3-bscnat-test/osmo-bsc-nat.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bsc_nat.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index 2d49e0b..194720b 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -18,7 +18,7 @@ -v $VOL_BASE_DIR/bsc:/data \ --name ${BUILD_TAG}-bsc -d \ $REPO_USER/osmo-bsc-$IMAGE_SUFFIX \ - osmo-bsc -c /data/osmo-bsc.cfg + /bin/sh -c "osmo-bsc -c /data/osmo-bsc.cfg >>/data/osmo-bsc.log 2>&1" } start_bts() { @@ -35,7 +35,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-bts -d \ $REPO_USER/osmo-bts-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh osmo-bts-$variant -c /data/osmo-bts.cfg -i 172.18.9.10 + /bin/sh -c "/usr/local/bin/respawn.sh osmo-bts-$variant -c /data/osmo-bts.cfg -i 172.18.9.10 >>/data/osmo-bts.log 2>&1" } start_fake_trx() { @@ -59,7 +59,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-trxcon -d \ $REPO_USER/osmocom-bb-host-master \ - trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 + /bin/sh -c "trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2 >>/data/trxcon.log 2>&1" } start_virtphy() { @@ -70,6 +70,7 @@ --name ${BUILD_TAG}-virtphy -d \ $REPO_USER/osmocom-bb-host-master \ virtphy -s /data/unix/osmocom_l2 + /bin/sh -c "virtphy -s /data/unix/osmocom_l2 >>/data/virtphy.log 2>&1" } start_testsuite() { diff --git a/ttcn3-bts-test/oml/osmo-bts.cfg b/ttcn3-bts-test/oml/osmo-bts.cfg index 2ed761a..a6e3a23 100644 --- a/ttcn3-bts-test/oml/osmo-bts.cfg +++ b/ttcn3-bts-test/oml/osmo-bts.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bts.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bts-test/osmo-bsc.cfg b/ttcn3-bts-test/osmo-bsc.cfg index 63bde9e..4675216 100644 --- a/ttcn3-bts-test/osmo-bsc.cfg +++ b/ttcn3-bts-test/osmo-bsc.cfg @@ -7,9 +7,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bsc.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bts-test/osmo-bts.cfg b/ttcn3-bts-test/osmo-bts.cfg index 1c97528..ea04b36 100644 --- a/ttcn3-bts-test/osmo-bts.cfg +++ b/ttcn3-bts-test/osmo-bts.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bts.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-bts-test/virtphy/osmo-bts.cfg b/ttcn3-bts-test/virtphy/osmo-bts.cfg index ce47b6d..51e6128 100644 --- a/ttcn3-bts-test/virtphy/osmo-bts.cfg +++ b/ttcn3-bts-test/virtphy/osmo-bts.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-bts.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-ggsn-test/osmo-ggsn.cfg b/ttcn3-ggsn-test/osmo-ggsn.cfg index 6644dae..7dff25f 100644 --- a/ttcn3-ggsn-test/osmo-ggsn.cfg +++ b/ttcn3-ggsn-test/osmo-ggsn.cfg @@ -6,39 +6,12 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-ggsn.log - logging filter all 1 - logging color 0 - logging print category 1 - logging timestamp 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 debug - 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 log stderr logging filter all 1 logging color 1 - logging print category 0 - logging timestamp 0 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 logging level ip info logging level tun info logging level ggsn info diff --git a/ttcn3-hlr-test/jenkins.sh b/ttcn3-hlr-test/jenkins.sh index 3d942de..2bf1f98 100755 --- a/ttcn3-hlr-test/jenkins.sh +++ b/ttcn3-hlr-test/jenkins.sh @@ -22,7 +22,7 @@ -v $VOL_BASE_DIR/hlr:/data \ --name ${BUILD_TAG}-hlr -d \ $REPO_USER/osmo-hlr-$IMAGE_SUFFIX \ - osmo-hlr + /bin/sh -c "osmo-hlr -c /data/osmo-hlr.cfg >/data/osmo-hlr.log 2>&1" echo Starting container with HLR testsuite docker run --rm \ diff --git a/ttcn3-hlr-test/osmo-hlr.cfg b/ttcn3-hlr-test/osmo-hlr.cfg index c5dcd89..5cda49e 100644 --- a/ttcn3-hlr-test/osmo-hlr.cfg +++ b/ttcn3-hlr-test/osmo-hlr.cfg @@ -8,15 +8,6 @@ log stderr logging filter all 1 logging color 1 - logging print category 1 - logging timestamp 1 - logging print extended-timestamp 1 - logging level all debug - logging level linp error -! -log file /data/osmo-hlr.log - logging filter all 1 - logging color 0 logging print level 1 logging print category 1 logging print category-hex 0 diff --git a/ttcn3-mgw-test/osmo-mgw.cfg b/ttcn3-mgw-test/osmo-mgw.cfg index 3c08ee0..b410dca 100644 --- a/ttcn3-mgw-test/osmo-mgw.cfg +++ b/ttcn3-mgw-test/osmo-mgw.cfg @@ -9,32 +9,6 @@ log stderr logging filter all 1 logging color 1 - logging print category 1 - logging timestamp 1 - logging print extended-timestamp 1 - logging level all everything - logging level rtp 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 notice - 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 debug -! -log file /data/osmo-mgw.log - logging filter all 1 - logging color 0 logging print level 1 logging print category 1 logging timestamp 1 diff --git a/ttcn3-msc-test/jenkins.sh b/ttcn3-msc-test/jenkins.sh index a0a5f87..28bc4b7 100755 --- a/ttcn3-msc-test/jenkins.sh +++ b/ttcn3-msc-test/jenkins.sh @@ -38,7 +38,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-msc -d \ $REPO_USER/osmo-msc-$IMAGE_SUFFIX \ - osmo-msc + /bin/sh -c "osmo-msc -c /data/osmo-msc.cfg >>/data/osmo-msc.log 2>&1" echo Starting container with MSC testsuite docker run --rm \ diff --git a/ttcn3-msc-test/osmo-msc.cfg b/ttcn3-msc-test/osmo-msc.cfg index 48765d2..a713786 100644 --- a/ttcn3-msc-test/osmo-msc.cfg +++ b/ttcn3-msc-test/osmo-msc.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-msc.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-msc-test/osmo-stp.cfg b/ttcn3-msc-test/osmo-stp.cfg index 620fa68..6d081fd 100644 --- a/ttcn3-msc-test/osmo-stp.cfg +++ b/ttcn3-msc-test/osmo-stp.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-stp.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-pcu-test/jenkins-sns.sh b/ttcn3-pcu-test/jenkins-sns.sh index fb6ccd3..51b5f64 100755 --- a/ttcn3-pcu-test/jenkins-sns.sh +++ b/ttcn3-pcu-test/jenkins-sns.sh @@ -27,7 +27,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-pcu-sns -d \ $REPO_USER/osmo-pcu-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg + /bin/sh -c "/usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg -i 172.18.14.10 >>/data/osmo-pcu.log 2>&1" echo Starting container with PCU testsuite docker run --rm \ diff --git a/ttcn3-pcu-test/jenkins.sh b/ttcn3-pcu-test/jenkins.sh index 8c855f1..d4e8be0 100755 --- a/ttcn3-pcu-test/jenkins.sh +++ b/ttcn3-pcu-test/jenkins.sh @@ -34,7 +34,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-pcu -d \ $REPO_USER/osmo-pcu-$IMAGE_SUFFIX \ - /usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg -i 172.18.13.10 + /bin/sh -c "/usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg -i 172.18.13.10 >>/data/osmo-pcu.log 2>&1" echo Starting container with PCU testsuite docker run --rm \ diff --git a/ttcn3-pcu-test/osmo-pcu.cfg b/ttcn3-pcu-test/osmo-pcu.cfg index e486362..d7ef445 100644 --- a/ttcn3-pcu-test/osmo-pcu.cfg +++ b/ttcn3-pcu-test/osmo-pcu.cfg @@ -2,7 +2,7 @@ logging level set-all debug logging filter all 1 -log file /data/osmo-pcu.log +log stderr logging filter all 1 logging color 1 logging print level 1 diff --git a/ttcn3-pcu-test/sns/osmo-pcu.cfg b/ttcn3-pcu-test/sns/osmo-pcu.cfg index 0b20ecb..884261a 100644 --- a/ttcn3-pcu-test/sns/osmo-pcu.cfg +++ b/ttcn3-pcu-test/sns/osmo-pcu.cfg @@ -2,9 +2,9 @@ logging level set-all debug logging filter all 1 -log file /data/osmo-pcu.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print level 1 logging print category 1 logging print category-hex 0 diff --git a/ttcn3-remsim-test/jenkins.sh b/ttcn3-remsim-test/jenkins.sh index 38da9b3..e09bc88 100755 --- a/ttcn3-remsim-test/jenkins.sh +++ b/ttcn3-remsim-test/jenkins.sh @@ -14,7 +14,7 @@ -v $VOL_BASE_DIR/server:/data \ --name ${BUILD_TAG}-server -d \ $REPO_USER/osmo-remsim-$IMAGE_SUFFIX \ - osmo-remsim-server + /bin/sh -c "osmo-remsim-server >/data/osmo-remsim-server.log 2>&1" } start_bankd() { @@ -24,7 +24,7 @@ -v $VOL_BASE_DIR/bankd:/data \ --name ${BUILD_TAG}-bankd -d \ $REPO_USER/osmo-remsim-$IMAGE_SUFFIX \ - osmo-remsim-bankd -i 172.18.17.10 + /bin/sh -c "osmo-remsim-bankd -i 172.18.17.10 >/data/osmo-remsim-bankd.log 2>&1" } start_client() { @@ -34,7 +34,7 @@ -v $VOL_BASE_DIR/client:/data \ --name ${BUILD_TAG}-client-d \ $REPO_USER/osmo-remsim-$IMAGE_SUFFIX \ - osmo-remsim-client + /bin/sh -c "osmo-remsim-client >/data/osmo-remsim-client.log 2>&1" } diff --git a/ttcn3-sgsn-test/jenkins.sh b/ttcn3-sgsn-test/jenkins.sh index 462c5b2..7f322f4 100755 --- a/ttcn3-sgsn-test/jenkins.sh +++ b/ttcn3-sgsn-test/jenkins.sh @@ -41,7 +41,7 @@ -v $VOL_BASE_DIR/sgsn:/data \ --name ${BUILD_TAG}-sgsn -d \ $REPO_USER/osmo-sgsn-$IMAGE_SUFFIX \ - osmo-sgsn + /bin/sh -c "osmo-sgsn -c /data/osmo-sgsn.cfg >/data/osmo-sgsn.log 2>&1" echo Starting container with SGSN testsuite docker run --rm \ diff --git a/ttcn3-sgsn-test/osmo-sgsn.cfg b/ttcn3-sgsn-test/osmo-sgsn.cfg index 5bf7325..68af562 100644 --- a/ttcn3-sgsn-test/osmo-sgsn.cfg +++ b/ttcn3-sgsn-test/osmo-sgsn.cfg @@ -6,7 +6,7 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-sgsn.log +log stderr logging filter all 1 logging color 1 logging print category 1 diff --git a/ttcn3-sgsn-test/osmo-stp.cfg b/ttcn3-sgsn-test/osmo-stp.cfg index 30adf32..a0b5b0b 100644 --- a/ttcn3-sgsn-test/osmo-stp.cfg +++ b/ttcn3-sgsn-test/osmo-stp.cfg @@ -6,9 +6,9 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-stp.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 diff --git a/ttcn3-sip-test/jenkins.sh b/ttcn3-sip-test/jenkins.sh index 02c7cd6..0bc0357 100755 --- a/ttcn3-sip-test/jenkins.sh +++ b/ttcn3-sip-test/jenkins.sh @@ -27,7 +27,7 @@ -v $VOL_BASE_DIR/unix:/data/unix \ --name ${BUILD_TAG}-sip-connector -d \ $REPO_USER/osmo-sip-$IMAGE_SUFFIX \ - osmo-sip-connector + /bin/sh -c "osmo-sip-connector -c /data/osmo-sip-connector.cfg >>/data/osmo-sip-connector.log 2>&1" echo Starting container with SIP testsuite docker run --rm \ diff --git a/ttcn3-sip-test/osmo-sip-connector.cfg b/ttcn3-sip-test/osmo-sip-connector.cfg index 04ef19c..7f54c1c 100644 --- a/ttcn3-sip-test/osmo-sip-connector.cfg +++ b/ttcn3-sip-test/osmo-sip-connector.cfg @@ -6,11 +6,11 @@ logging level set-all debug logging filter all 1 ! -log file /data/osmo-sip-connector.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 - logging timestamp 0 + logging timestamp 1 logging print extended-timestamp 1 logging print file basename logging level all everything diff --git a/ttcn3-stp-test/osmo-stp.cfg b/ttcn3-stp-test/osmo-stp.cfg index a9e377f..20fb298 100644 --- a/ttcn3-stp-test/osmo-stp.cfg +++ b/ttcn3-stp-test/osmo-stp.cfg @@ -5,39 +5,13 @@ log gsmtap 172.18.19.203 logging level set-all debug logging filter all 1 -log file /data/osmo-stp.log +log stderr logging filter all 1 - logging color 0 + logging color 1 logging print category 1 logging timestamp 1 logging print extended-timestamp 1 logging level set-all debug -log stderr - logging filter all 1 - logging color 1 - logging print category-hex 1 - logging print category 1 - logging timestamp 0 - logging print file 1 - 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 notice - logging level lstats notice - logging level lgsup notice - logging level loap notice - logging level lss7 debug - logging level lsccp debug - logging level lsua debug - logging level lm3ua debug - logging level lmgcp notice - logging level ljibuf notice - logging level lrspro notice ! stats interval 5 ! -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I3d9f6de638dbc07391a32c6a0cbd469dc5adf2b5 Gerrit-Change-Number: 16064 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:02:09 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:02:09 +0000 Subject: Change in osmo-pcu[master]: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16083 ) Change subject: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ib204acce1a7e33f6651b9da2a7b4a9b9ae461093 Gerrit-Change-Number: 16083 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:02:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:02:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:02:11 +0000 Subject: Change in osmo-pcu[master]: PTCCH: implement basic message codec and API In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16082 ) Change subject: PTCCH: implement basic message codec and API ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id79e95aafdde4a71977c64385fce48b729a51ca9 Gerrit-Change-Number: 16082 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:02:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:02:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:02:15 +0000 Subject: Change in osmo-pcu[master]: pcuif_proto.h: extend RACH.ind with TRX / TS numbers In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16084 ) Change subject: pcuif_proto.h: extend RACH.ind with TRX / TS numbers ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If209001885ffb14b64a8e808df3700d85a4b2ef9 Gerrit-Change-Number: 16084 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:02:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:02:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:02:19 +0000 Subject: Change in osmo-pcu[master]: PTCCH: implement basic message codec and API In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16082 ) Change subject: PTCCH: implement basic message codec and API ...................................................................... PTCCH: implement basic message codec and API Change-Id: Id79e95aafdde4a71977c64385fce48b729a51ca9 Related: OS#1545 --- M src/bts.cpp M src/pdch.cpp M src/pdch.h 3 files changed, 54 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index a9ff553..24666af 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -252,6 +252,7 @@ for (size_t ts_no = 0; ts_no < ARRAY_SIZE(trx->pdch); ++ts_no) { struct gprs_rlcmac_pdch *pdch = &trx->pdch[ts_no]; + pdch->init_ptcch_msg(); pdch->ts_no = ts_no; pdch->trx = trx; } diff --git a/src/pdch.cpp b/src/pdch.cpp index e4b25e1..beb2c13 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -48,6 +48,7 @@ } #include +#include #include extern void *tall_pcu_ctx; @@ -961,3 +962,37 @@ { return trx->bts->bts_data(); } + +/* PTCCH (Packet Timing Advance Control Channel) */ +void gprs_rlcmac_pdch::init_ptcch_msg(void) +{ + memset(ptcch_msg, PTCCH_TAI_FREE, PTCCH_TAI_NUM); + memset(ptcch_msg + PTCCH_TAI_NUM, PTCCH_PADDING, 7); +} + +uint8_t gprs_rlcmac_pdch::reserve_tai(uint8_t ta) +{ + uint8_t tai; + + for (tai = 0; tai < PTCCH_TAI_NUM; tai++) { + if (ptcch_msg[tai] == PTCCH_TAI_FREE) { + ptcch_msg[tai] = ta; + return tai; + } + } + + /* Special case: no free TAI available */ + return PTCCH_TAI_FREE; +} + +void gprs_rlcmac_pdch::release_tai(uint8_t tai) +{ + OSMO_ASSERT(tai < PTCCH_TAI_NUM); + ptcch_msg[tai] = PTCCH_TAI_FREE; +} + +void gprs_rlcmac_pdch::update_ta(uint8_t tai, uint8_t ta) +{ + OSMO_ASSERT(tai < PTCCH_TAI_NUM); + ptcch_msg[tai] = ta; +} diff --git a/src/pdch.h b/src/pdch.h index 3015023..d55f58e 100644 --- a/src/pdch.h +++ b/src/pdch.h @@ -35,6 +35,11 @@ #include +/* PTCCH (Packet Timing Advance Control Channel) */ +#define PTCCH_TAI_FREE 0x7f /*!< Special value for unused TA Indexes */ +#define PTCCH_TAI_NUM 16 /*!< Number of PTCCH/U slots and thus TA Indexes */ +#define PTCCH_PADDING 0x2b /*!< PTCCH/D messages need to be padded to 23 octets */ + /* * PDCH instance */ @@ -88,6 +93,19 @@ struct llist_head paging_list; /* list of paging messages */ uint32_t last_rts_fn; /* store last frame number of RTS */ + /* PTCCH (Packet Timing Advance Control Channel) */ + uint8_t ptcch_msg[GSM_MACBLOCK_LEN]; /* 'ready to use' PTCCH/D message */ +#ifdef __cplusplus + /* Initialize the PTCCH/D message */ + void init_ptcch_msg(void); + /* Obtain an unused TA Index for a TBF */ + uint8_t reserve_tai(uint8_t ta); + /* Mark a given TA Index as free, so it can be used again */ + void release_tai(uint8_t tai); + /* Update the actual Timing Advance value for a given TA Index */ + void update_ta(uint8_t tai, uint8_t ta); +#endif + /* back pointers */ struct gprs_rlcmac_trx *trx; uint8_t ts_no; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id79e95aafdde4a71977c64385fce48b729a51ca9 Gerrit-Change-Number: 16082 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:02:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:02:19 +0000 Subject: Change in osmo-pcu[master]: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16083 ) Change subject: PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH ...................................................................... PTCCH: properly handle RTS.req for PCU_IF_SAPI_PTCCH Change-Id: Ib204acce1a7e33f6651b9da2a7b4a9b9ae461093 Related: OS#1545 --- M src/osmo-bts-litecell15/lc15_l1_if.c M src/osmo-bts-oc2g/oc2g_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.c M src/pcu_l1_if.cpp M src/pcu_l1_if.h 5 files changed, 44 insertions(+), 21 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index 1df7941..670263f 100644 --- a/src/osmo-bts-litecell15/lc15_l1_if.c +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -161,8 +161,11 @@ case GsmL1_Sapi_Pacch: rc = pcu_rx_rts_req_pdtch(fl1h->trx_no, rts_ind->u8Tn, rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; case GsmL1_Sapi_Ptcch: - // FIXME + rc = pcu_rx_rts_req_ptcch(fl1h->trx_no, rts_ind->u8Tn, + rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; default: break; } diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c index f9768ae..a02e962 100644 --- a/src/osmo-bts-oc2g/oc2g_l1_if.c +++ b/src/osmo-bts-oc2g/oc2g_l1_if.c @@ -162,8 +162,11 @@ case GsmL1_Sapi_Pacch: rc = pcu_rx_rts_req_pdtch(fl1h->trx_no, rts_ind->u8Tn, rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; case GsmL1_Sapi_Ptcch: - // FIXME + rc = pcu_rx_rts_req_ptcch(fl1h->trx_no, rts_ind->u8Tn, + rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; default: break; } diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index 5d127dd..9b310cc 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -144,8 +144,11 @@ case GsmL1_Sapi_Pacch: rc = pcu_rx_rts_req_pdtch(fl1h->trx_no, rts_ind->u8Tn, rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; case GsmL1_Sapi_Ptcch: - // FIXME + rc = pcu_rx_rts_req_ptcch(fl1h->trx_no, rts_ind->u8Tn, + rts_ind->u32Fn, rts_ind->u8BlockNbr); + break; default: break; } diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 883cb22..9c7724c 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -185,24 +185,21 @@ msgb_free(msg); } -void pcu_l1if_tx_ptcch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn, - uint32_t fn, uint8_t block_nr) +void pcu_l1if_tx_ptcch(uint8_t trx, uint8_t ts, uint16_t arfcn, + uint32_t fn, uint8_t block_nr, + uint8_t *data, size_t data_len) { struct gprs_rlcmac_bts *bts = bts_main_data(); if (bts->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_PTCCH)) - gsmtap_send(bts->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PTCCH, 0, fn, 0, 0, msg->data, msg->len); + gsmtap_send(bts->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PTCCH, 0, fn, 0, 0, data, data_len); #ifdef ENABLE_DIRECT_PHY if (bts->trx[trx].fl1h) { - l1if_pdch_req(bts->trx[trx].fl1h, ts, 1, fn, arfcn, block_nr, - msg->data, msg->len); - msgb_free(msg); + l1if_pdch_req(bts->trx[trx].fl1h, ts, 1, fn, arfcn, block_nr, data, data_len); return; } #endif - pcu_tx_data_req(trx, ts, PCU_IF_SAPI_PTCCH, arfcn, fn, block_nr, - msg->data, msg->len); - msgb_free(msg); + pcu_tx_data_req(trx, ts, PCU_IF_SAPI_PTCCH, arfcn, fn, block_nr, data, data_len); } void pcu_l1if_tx_agch(bitvec * block, int plen) @@ -361,6 +358,25 @@ return gprs_rlcmac_rcv_rts_block(bts_main_data(), trx, ts, fn, block_nr); } +extern "C" int pcu_rx_rts_req_ptcch(uint8_t trx, uint8_t ts, + uint32_t fn, uint8_t block_nr) +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + struct gprs_rlcmac_pdch *pdch; + + /* Prevent buffer overflow */ + if (trx >= ARRAY_SIZE(bts->trx) || ts >= 8) + return -EINVAL; + + /* Make sure PDCH time-slot is enabled */ + pdch = &bts->trx[trx].pdch[ts]; + if (!pdch->m_is_enabled) + return -EAGAIN; + + pcu_l1if_tx_ptcch(trx, ts, bts->trx[trx].arfcn, fn, block_nr, + pdch->ptcch_msg, GSM_MACBLOCK_LEN); + return 0; +} static int pcu_rx_rts_req(struct gsm_pcu_if_rts_req *rts_req) { @@ -377,13 +393,8 @@ rts_req->fn, rts_req->block_nr); break; case PCU_IF_SAPI_PTCCH: - /* FIXME */ - { - struct msgb *msg = msgb_alloc(GSM_MACBLOCK_LEN, "l1_prim"); - memset(msgb_put(msg, GSM_MACBLOCK_LEN), 0x2b, GSM_MACBLOCK_LEN); - pcu_l1if_tx_ptcch(msg, rts_req->trx_nr, rts_req->ts_nr, - rts_req->arfcn, rts_req->fn, rts_req->block_nr); - } + pcu_rx_rts_req_ptcch(rts_req->trx_nr, rts_req->ts_nr, + rts_req->fn, rts_req->block_nr); break; default: LOGP(DL1IF, LOGL_ERROR, "Received PCU RTS request with " diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index cb2a6df..888ad28 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -154,8 +154,9 @@ #ifdef __cplusplus void pcu_l1if_tx_pdtch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn, uint32_t fn, uint8_t block_nr); -void pcu_l1if_tx_ptcch(msgb *msg, uint8_t trx, uint8_t ts, uint16_t arfcn, - uint32_t fn, uint8_t block_nr); +void pcu_l1if_tx_ptcch(uint8_t trx, uint8_t ts, uint16_t arfcn, + uint32_t fn, uint8_t block_nr, + uint8_t *data, size_t data_len); void pcu_l1if_tx_agch(bitvec * block, int len); void pcu_l1if_tx_pch(bitvec * block, int plen, const char *imsi); @@ -174,6 +175,8 @@ #endif int pcu_rx_rts_req_pdtch(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr); +int pcu_rx_rts_req_ptcch(uint8_t trx, uint8_t ts, + uint32_t fn, uint8_t block_nr); int pcu_rx_data_ind_pdtch(uint8_t trx, uint8_t ts, uint8_t *data, uint8_t len, uint32_t fn, struct pcu_l1_meas *meas); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ib204acce1a7e33f6651b9da2a7b4a9b9ae461093 Gerrit-Change-Number: 16083 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:02:20 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:02:20 +0000 Subject: Change in osmo-pcu[master]: pcuif_proto.h: extend RACH.ind with TRX / TS numbers In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16084 ) Change subject: pcuif_proto.h: extend RACH.ind with TRX / TS numbers ...................................................................... pcuif_proto.h: extend RACH.ind with TRX / TS numbers Since there can be multiple PDCH channels configured on different timeslots, different TRXes, and BTSes, the PTCCH/U handling code in OsmoPCU needs to know the exact origin of a given RACH.ind. Otherwise, it is not known which subscriber originated a given PTCCH/U indication, and hence it is impossible to send PTCCH/D Timing Advance notification properly. Fortunately, we can extend the RACH.ind message without even bumping the protocol version, because every single PDU has a fixed size defined by the largest message - INFO.ind. In case if the actual message payload is smaller, the rest is filled with a constant padding byte (0x00). Older versions of OsmoPCU will consider the new fields as padding, while the messages from older OsmoBTS versions will always have both fields set to 0x00. Since C0/TS0 cannot be configured to PDCH, this can be easily detected on the other end. Change-Id: If209001885ffb14b64a8e808df3700d85a4b2ef9 Related: OS#1545 --- M include/osmocom/pcu/pcuif_proto.h 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h index fd989a5..e88607e 100644 --- a/include/osmocom/pcu/pcuif_proto.h +++ b/include/osmocom/pcu/pcuif_proto.h @@ -108,6 +108,8 @@ uint16_t arfcn; uint8_t is_11bit; uint8_t burst_type; + uint8_t trx_nr; + uint8_t ts_nr; } __attribute__ ((packed)); struct gsm_pcu_if_info_trx { -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If209001885ffb14b64a8e808df3700d85a4b2ef9 Gerrit-Change-Number: 16084 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:03:38 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:03:38 +0000 Subject: Change in osmo-bsc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15841 ) Change subject: fsm: use deferred deallocation ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib7fce7b7d54dfb87af97544796680919e5929a50 Gerrit-Change-Number: 15841 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:03:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:03:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:03:40 +0000 Subject: Change in osmo-bsc[master]: fsm: use deferred deallocation In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15841 ) Change subject: fsm: use deferred deallocation ...................................................................... fsm: use deferred deallocation Since osmo-bsc uses the MGCP client FSMs, it is required to enable this new feature to guarantee safe operation. The issue is described in detail in commit logs linked below. Depends: Ief4dba9ea587c9b4aea69993e965fbb20fb80e78 (libosmocore), I0adc13a1a998e953b6c850efa2761350dd07e03a (libosmocore) Related: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 (osmo-mgw) Change-Id: Ib7fce7b7d54dfb87af97544796680919e5929a50 --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 0fe35b3..da2914d 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -821,6 +821,8 @@ osmo_stats_init(tall_bsc_ctx); rate_ctr_init(tall_bsc_ctx); + osmo_fsm_set_dealloc_ctx(OTC_SELECT); + /* Allocate global gsm_network struct */ rc = bsc_network_alloc(); if (rc) { @@ -939,7 +941,7 @@ } while (1) { - osmo_select_main(0); + osmo_select_main_ctx(0); } return 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15841 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib7fce7b7d54dfb87af97544796680919e5929a50 Gerrit-Change-Number: 15841 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:04:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:04:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: HLR: Add test for generating EPS (LTE) tuples with separation bit == 1 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15366 ) Change subject: HLR: Add test for generating EPS (LTE) tuples with separation bit == 1 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15366 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I40c6cf7e28ad9331e6c27fe7acafa3f9e277eedf Gerrit-Change-Number: 15366 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:04:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:06:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:06:55 +0000 Subject: Change in osmo-sip-connector[master]: exit if the sip agent failed to start In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/15532 ) Change subject: exit if the sip agent failed to start ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/15532 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: I22ed16c77391b4f270df498dda587ed657279390 Gerrit-Change-Number: 15532 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: keith Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Reviewer: zecke Gerrit-Comment-Date: Sat, 23 Nov 2019 08:06:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:07:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:07:01 +0000 Subject: Change in osmo-sip-connector[master]: exit if the sip agent failed to start In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/15532 ) Change subject: exit if the sip agent failed to start ...................................................................... exit if the sip agent failed to start When the sip agent start fails (i.e. port can not bind because IP doesn't exist) exit the sip-connector Relates: OS#4197 Change-Id: I22ed16c77391b4f270df498dda587ed657279390 --- M src/main.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified Objections: zecke: I would prefer this is not merged as is diff --git a/src/main.c b/src/main.c index 13fdd5d..3385e37 100644 --- a/src/main.c +++ b/src/main.c @@ -158,9 +158,11 @@ /* sofia sip */ sip_agent_init(&g_app.sip.agent, &g_app); rc = sip_agent_start(&g_app.sip.agent); - if (rc < 0) + if (rc < 0) { LOGP(DSIP, LOGL_ERROR, - "Failed to initialize SIP. Running broken\n"); + "Failed to initialize SIP\n"); + exit(1); + } calls_init(); app_setup(&g_app); -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/15532 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: I22ed16c77391b4f270df498dda587ed657279390 Gerrit-Change-Number: 15532 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: keith Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Reviewer: zecke Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:09:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:09:14 +0000 Subject: Change in osmo-trx[master]: CommonLibs: check HAVE_CONFIG_H before including it In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/15684 ) Change subject: CommonLibs: check HAVE_CONFIG_H before including it ...................................................................... Patch Set 2: @ipse, @sergey, @mold, can we please get some feedback to move this ahead? It shold be in your own best interest to get xtrx support merged anytime soon. We want that, too, but waiting 6 weeks for input isn't helping :/ -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15684 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Idb9e938e7794b67b1db23a31e106c8945f79cf24 Gerrit-Change-Number: 15684 Gerrit-PatchSet: 2 Gerrit-Owner: rauf.gyulaliev at fairwaves.co Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:09:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:09:23 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:09:23 +0000 Subject: Change in osmo-trx[master]: Initial XTRX support In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/15685 ) Change subject: Initial XTRX support ...................................................................... Patch Set 3: @ipse, @sergey, @mold, can we please get some feedback to move this ahead? It shold be in your own best interest to get xtrx support merged anytime soon. We want that, too, but waiting 6 weeks for input isn't helping :/ -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15685 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I1067dfef53aa2669cc7c189cccae10074c674390 Gerrit-Change-Number: 15685 Gerrit-PatchSet: 3 Gerrit-Owner: rauf.gyulaliev at fairwaves.co Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 23 Nov 2019 08:09:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:10:18 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:10:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Introduce test TC_mo_ping_pong In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15681 ) Change subject: pcu: Introduce test TC_mo_ping_pong ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15681 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3be5123ff5294e5851652ec14d54589442082b28 Gerrit-Change-Number: 15681 Gerrit-PatchSet: 6 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:10:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:10:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:10:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Introduce test TC_mo_ping_pong In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15681 ) Change subject: pcu: Introduce test TC_mo_ping_pong ...................................................................... pcu: Introduce test TC_mo_ping_pong Ideally some more checks should be done on this test at the end, but it's fine keeping it as it is for now and can be extended later. Change-Id: I3be5123ff5294e5851652ec14d54589442082b28 --- M pcu/PCU_Tests_RAW.ttcn 1 file changed, 89 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 9d0882f..6129831 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -571,6 +571,22 @@ return true; } +private function f_imm_ass_verify_dl_tbf_ass(GsmRrMessage rr_imm_ass, out PacketDlAssign dl_tbf_ass) +runs on RAW_PCU_Test_CT return boolean { + + /* Make sure we received a DL TBF Assignment */ + if (match(rr_imm_ass, tr_IMM_TBF_ASS(dl := true, rest := tr_IaRestOctets_DLAss(?)))) { + dl_tbf_ass := rr_imm_ass.payload.imm_ass.rest_octets.hh.pa.uldl.ass.dl; + log("Rx Downlink TBF assignment: ", dl_tbf_ass); + setverdict(pass); + } else { + setverdict(fail, "Failed to match DL TBF Assignment"); + return false; + } + + return true; +} + /* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */ private function f_pcuif_tx_data_ind(octetstring data, int16_t lqual_cb := 0) runs on RAW_PCU_Test_CT { @@ -591,6 +607,24 @@ sapi := PCU_IF_SAPI_PDTCH)) -> value pcu_msg; } +/* Expect an Immediate Assignment (paging) from PCU on PCUIF on specified sapi. */ +private function f_pcuif_rx_pch_imm_tbf_ass(out GsmRrMessage rr_imm_ass) +runs on RAW_PCU_Test_CT { + var PCUIF_Message pcu_msg; + var octetstring macblock; + BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 0, + sapi := PCU_IF_SAPI_PCH)) -> value pcu_msg; + /* First 3 bytes contain paging group: */ + macblock := substr(pcu_msg.u.data_req.data, 3, pcu_msg.u.data_req.len - 3); + rr_imm_ass := dec_GsmRrMessage(macblock); + if (not match(rr_imm_ass, tr_IMM_TBF_ASS())) { + setverdict(fail, "Failed to match Immediate Assignment: ", rr_imm_ass); + mtc.stop; + } + BTS.send(ts_PCUIF_DATA_CNF(bts_nr := 0, trx_nr := 0, ts_nr := 0, block_nr := 0, + fn := 0, arfcn := 871, sapi := PCU_IF_SAPI_PCH, data := macblock)); +} + private function f_tx_rlcmac_ul_block(template (value) RlcmacUlBlock ul_data, int16_t lqual_cb := 0) runs on RAW_PCU_Test_CT { var octetstring data; @@ -1053,6 +1087,60 @@ f_rx_rlcmac_dl_block_exp_dummy(dl_block); } +/* Test scenario where MS wants to send some data on PDCH against SGSN and it is + * answered, so TBFs for uplink and later for downlink are created. + */ +testcase TC_mo_ping_pong() runs on RAW_PCU_Test_CT { + var GsmRrMessage rr_imm_ass; + var PacketUlAssign ul_tbf_ass; + var PacketDlAssign dl_tbf_ass; + var RlcmacDlBlock dl_block; + var PCUIF_Message pcu_msg; + var octetstring data; + var boolean ok; + var OCT4 tlli := '00000001'O; + + /* Initialize NS/BSSGP side */ + f_init_bssgp(); + + /* Initialize the PCU interface abstraction */ + f_init_raw(testcasename()); + + /* Establish BSSGP connection to the PCU */ + f_bssgp_establish(); + f_bssgp_client_llgmm_assign('FFFFFFFF'O, tlli); + + /* Establish an Uplink TBF */ + ok := f_establish_tbf(rr_imm_ass); + if (not ok) { + setverdict(fail, "Failed to establish TBF"); + mtc.stop; + } + ok := f_imm_ass_verify_ul_tbf_ass(rr_imm_ass, ul_tbf_ass); + if (not ok) { + setverdict(fail, "Immediate Assignment not an Uplink TBF"); + mtc.stop; + } + + /* Send one UL block and make sure it is ACKED fine */ + f_tx_rlcmac_ul_n_blocks(ul_tbf_ass, 1); + f_rx_rlcmac_dl_block_exp_ack_nack(dl_block); + + /* UL block should be received in SGSN */ + BSSGP[0].receive(tr_BSSGP_UL_UD(tlli, mp_gb_cfg.cell_id)); + + /* Now SGSN sends some DL data, PCU will page on CCCH (PCH) */ + BSSGP[0].send(ts_BSSGP_DL_UD(tlli, f_rnd_octstring(10))); + f_pcuif_rx_pch_imm_tbf_ass(rr_imm_ass); + + ok := f_imm_ass_verify_dl_tbf_ass(rr_imm_ass, dl_tbf_ass); + if (not ok) { + setverdict(fail, "Immediate Assignment not a Downlink TBF"); + mtc.stop; + } + + /* TODO: ACK the assignment and the DL block somehow? */ +} control { execute( TC_ns_reset() ); @@ -1070,6 +1158,7 @@ execute( TC_ta_ptcch_ul_multi_tbf() ); execute( TC_cs_lqual_ul_tbf() ); execute( TC_t3169() ); + execute( TC_mo_ping_pong() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15681 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3be5123ff5294e5851652ec14d54589442082b28 Gerrit-Change-Number: 15681 Gerrit-PatchSet: 7 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:11:14 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:11:14 +0000 Subject: Change in libosmocore[master]: vty/vty.c: log received commands from telnet interface In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14974 ) Change subject: vty/vty.c: log received commands from telnet interface ...................................................................... Patch Set 6: do we have any other opinions than mine on this patch? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5f6639f6ebc3e8f8df50ef48538df94285b759fd Gerrit-Change-Number: 14974 Gerrit-PatchSet: 6 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Sat, 23 Nov 2019 08:11:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:12:09 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:12:09 +0000 Subject: Change in osmo-bts[master]: remove dummy UL measurement results for lost sacch frames In-Reply-To: References: Message-ID: laforge has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/14762 ) Change subject: remove dummy UL measurement results for lost sacch frames ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/14762 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idfa123f8d02a9d8be1f6de6923fc2a8628020145 Gerrit-Change-Number: 14762 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:13:57 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:13:57 +0000 Subject: Change in osmo-msc[master]: Fix some typos In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16074 ) Change subject: Fix some typos ...................................................................... Patch Set 3: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/16074/3/doc/manuals/chapters/counters_generated.adoc File doc/manuals/chapters/counters_generated.adoc: https://gerrit.osmocom.org/c/osmo-msc/+/16074/3/doc/manuals/chapters/counters_generated.adoc at 30 PS3, Line 30: successful > I may be wrong, but 'successfully' seems more suitable here. you know this is a generated file, right? -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad Gerrit-Change-Number: 16074 Gerrit-PatchSet: 3 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:13:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:13:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:13:59 +0000 Subject: Change in osmo-msc[master]: Fix some typos In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16074 ) Change subject: Fix some typos ...................................................................... Fix some typos Fix typos and common misspellings in code comments and log messages. Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad --- M doc/manuals/chapters/counters_generated.adoc M doc/manuals/chapters/running.adoc M doc/sequence_charts/msc_log_to_ladder.py M include/osmocom/msc/gsm_data.h M include/osmocom/msc/mncc.h M include/osmocom/msc/msc_roles.h M include/osmocom/msc/sgs_server.h M include/osmocom/msc/vlr.h M src/libmsc/gsm_04_08.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/gsm_09_11.c M src/libmsc/mncc_call.c M src/libmsc/mncc_sock.c M src/libmsc/msc_a.c M src/libmsc/msc_vty.c M src/libmsc/ran_msg_a.c M src/libmsc/ran_peer.c M src/libmsc/sgs_iface.c M src/libmsc/smpp_openbsc.c M src/libmsc/sms_queue.c M src/libvlr/vlr.c M src/libvlr/vlr_auth_fsm.c M src/libvlr/vlr_lu_fsm.c M src/libvlr/vlr_sgs.c M src/libvlr/vlr_sgs_fsm.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.c M tests/msc_vlr/msc_vlr_test_gsm_ciph.err 27 files changed, 50 insertions(+), 50 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/doc/manuals/chapters/counters_generated.adoc b/doc/manuals/chapters/counters_generated.adoc index 1b40d8b..e2587e8 100644 --- a/doc/manuals/chapters/counters_generated.adoc +++ b/doc/manuals/chapters/counters_generated.adoc @@ -27,7 +27,7 @@ | sms:rp_err_other | <> | Other error of MS responses on a sms delive attempt. | sms:deliver_unknown_error | <> | Unknown error occurred during sms delivery. | call:mo_setup | <> | Received setup requests from a MS to init a MO call. -| call:mo_connect_ack | <> | Received a connect ack from MS of a MO call. Call is now succesful connected up. +| call:mo_connect_ack | <> | Received a connect ack from MS of a MO call. Call is now successful connected up. | call:mt_setup | <> | Sent setup requests to the MS (MT). | call:mt_connect | <> | Sent a connect to the MS (MT). | call:active | <> | Count total amount of calls that ever reached active state. diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index 9d56f1f..71f336b 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -44,7 +44,7 @@ Same as option -M (deprecated). *-C, --no-dbcounter*:: Deprecated. DB statistics and counter has been removed. - This option is only valid for compatiblity and does nothing. + This option is only valid for compatibility and does nothing. === Multiple instances diff --git a/doc/sequence_charts/msc_log_to_ladder.py b/doc/sequence_charts/msc_log_to_ladder.py index 1ceaeb6..30b6594 100755 --- a/doc/sequence_charts/msc_log_to_ladder.py +++ b/doc/sequence_charts/msc_log_to_ladder.py @@ -713,7 +713,7 @@ help='Pick output format: mscgen format or libosmocore/contrib/ladder_to_msc.py format') parser.add_argument('-m', '--mask-values', dest='mask_values', action='store_true', help='Do not output specific values like IP address, port, endpoint CI, instead just indicate that a value is' - ' present. This makes the output reproducable across various logs.') + ' present. This makes the output reproducible across various logs.') parser.add_argument('-s', '--start-with', dest='start_with_re', default=None, help='Skip until the first message with this label (regex), e.g. -s "CC SETUP"') diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index 11b6e82..bcee213 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -83,7 +83,7 @@ [MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR] = {"sms:deliver_unknown_error", "Unknown error occurred 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_MO_CONNECT_ACK] = {"call:mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now successful 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."}, diff --git a/include/osmocom/msc/mncc.h b/include/osmocom/msc/mncc.h index 28ee9b3..4414a8d 100644 --- a/include/osmocom/msc/mncc.h +++ b/include/osmocom/msc/mncc.h @@ -53,7 +53,7 @@ #define MNCC_SETUP_CNF 0x0104 #define MNCC_SETUP_COMPL_REQ 0x0105 #define MNCC_SETUP_COMPL_IND 0x0106 -/* MNCC_REJ_* is perfomed via MNCC_REL_* */ +/* MNCC_REJ_* is performed via MNCC_REL_* */ #define MNCC_CALL_CONF_IND 0x0107 #define MNCC_CALL_PROC_REQ 0x0108 #define MNCC_PROGRESS_REQ 0x0109 @@ -132,7 +132,7 @@ /* which fields are present */ uint32_t fields; - /* data derived informations (MNCC_F_ based) */ + /* data derived information (MNCC_F_ based) */ struct gsm_mncc_bearer_cap bearer_cap; struct gsm_mncc_number called; struct gsm_mncc_number calling; diff --git a/include/osmocom/msc/msc_roles.h b/include/osmocom/msc/msc_roles.h index b22bc7b..4957175 100644 --- a/include/osmocom/msc/msc_roles.h +++ b/include/osmocom/msc/msc_roles.h @@ -236,7 +236,7 @@ MSC_A_EV_FROM_T_SEND_END_SIGNAL_REQUEST, /* gsm_04_08.c has successfully received a valid Complete Layer 3 message, i.e. Location Updating, CM Service - * Request, Paging Reponse or IMSI Detach. */ + * Request, Paging Response or IMSI Detach. */ MSC_A_EV_COMPLETE_LAYER_3_OK, /* Received a Classmark Update -- during GERAN ciphering, msc_a may have to wait for Classmark information to diff --git a/include/osmocom/msc/sgs_server.h b/include/osmocom/msc/sgs_server.h index a89022d..400bd9e 100644 --- a/include/osmocom/msc/sgs_server.h +++ b/include/osmocom/msc/sgs_server.h @@ -44,7 +44,7 @@ char vlr_name[SGS_VLR_NAME_MAXLEN]; /* timers on VLR side */ unsigned int timer[_NUM_SGS_STATE_TIMERS]; - /* countrs on VLR side */ + /* counters on VLR side */ unsigned int counter[_NUM_SGS_STATE_COUNTERS]; } cfg; }; diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h index 52912eb..ee5a234 100644 --- a/include/osmocom/msc/vlr.h +++ b/include/osmocom/msc/vlr.h @@ -40,7 +40,7 @@ /* VLR subscriber authentication state */ enum vlr_subscr_auth_state { - /* subscriber needs to be autenticated */ + /* subscriber needs to be authenticated */ VLR_SUB_AS_NEEDS_AUTH, /* waiting for AuthInfo from HLR/AUC */ VLR_SUB_AS_NEEDS_AUTH_WAIT_AI, @@ -66,7 +66,7 @@ VLR_ULA_E_SEND_ID_NACK, /* Result of Send-ID from PVLR */ VLR_ULA_E_AUTH_RES, /* Result of auth procedure */ VLR_ULA_E_CIPH_RES, /* Result of Ciphering Mode Command */ - VLR_ULA_E_ID_IMSI, /* IMSI recieved from MS */ + VLR_ULA_E_ID_IMSI, /* IMSI received from MS */ VLR_ULA_E_ID_IMEI, /* IMEI received from MS */ VLR_ULA_E_ID_IMEISV, /* IMEISV received from MS */ VLR_ULA_E_HLR_IMEI_ACK, /* Check_IMEI_VLR result from HLR */ @@ -420,7 +420,7 @@ void vlr_subscr_enable_expire_lu(struct vlr_subscr *vsub); -/* Process Acccess Request FSM */ +/* Process Access Request FSM */ enum proc_arq_vlr_event { PR_ARQ_E_START, diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 0bdc4fb..750c766 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -341,7 +341,7 @@ } /* TODO: 10.5.1.6 MS Classmark for UMTS / Classmark 2 */ - /* TODO: 10.5.3.14 Aditional update parameters (CS fallback calls) */ + /* TODO: 10.5.3.14 Additional update parameters (CS fallback calls) */ /* TODO: 10.5.7.8 Device properties */ /* TODO: 10.5.1.15 MS network feature support */ @@ -676,7 +676,7 @@ /* * Handle CM Service Requests * a) Verify that the packet is long enough to contain the information - * we require otherwsie reject with INCORRECT_MESSAGE + * we require otherwise reject with INCORRECT_MESSAGE * b) Try to parse the TMSI. If we do not have one reject * c) Check that we know the subscriber with the TMSI otherwise reject * with a HLR cause diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 7e2d70b..4e604e5 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -280,7 +280,7 @@ mncc_set_cause(&rel, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_RESOURCE_UNAVAIL); gsm48_cc_tx_release(trans, &rel); } - /* Ressource unavailable */ + /* Resource unavailable */ if (trans->cc.mncc_initiated) mncc_release_ind(trans->net, trans, trans->callref, GSM48_CAUSE_LOC_PRN_S_LU, @@ -1922,7 +1922,7 @@ if (!trans) { LOG_TRANS(trans, LOGL_ERROR, "No memory for trans.\n"); vlr_subscr_put(vsub, __func__); - /* Ressource unavailable */ + /* Resource unavailable */ mncc_release_ind(net, NULL, data->callref, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_RESOURCE_UNAVAIL); diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c index 8a13cda..b696a67 100644 --- a/src/libmsc/gsm_09_11.c +++ b/src/libmsc/gsm_09_11.c @@ -265,7 +265,7 @@ if (trans->msc_a) { LOG_MSC_A_CAT(msc_a, DPAG, LOGL_ERROR, - "Handle paging error: transaction already associated with subsciber," + "Handle paging error: transaction already associated with subscriber," " apparently it was already handled. Skip.\n"); return; } diff --git a/src/libmsc/mncc_call.c b/src/libmsc/mncc_call.c index 34c7299..e5fc820 100644 --- a/src/libmsc/mncc_call.c +++ b/src/libmsc/mncc_call.c @@ -192,7 +192,7 @@ /* Disassociate the rtp_stream from this MNCC call instance, and clear the remote RTP IP:port info. * When the MNCC FSM ends for any reason, it will release the RTP stream (which usually triggers complete tear down of - * the call_leg and CC transaction). If the RTP stream should still remain in use, e.g. during Subseqent inter-MSC + * the call_leg and CC transaction). If the RTP stream should still remain in use, e.g. during Subsequent inter-MSC * Handover where this MNCC was a forwarding to a remote MSC that is no longer needed, this function must be called * before the MNCC FSM instance terminates. Call this *before* setting a new remote RTP address on the rtp_stream, since * this clears the rtp_stream->remote ip:port information. */ diff --git a/src/libmsc/mncc_sock.c b/src/libmsc/mncc_sock.c index 0a4e99b..670d692 100644 --- a/src/libmsc/mncc_sock.c +++ b/src/libmsc/mncc_sock.c @@ -82,7 +82,7 @@ /* re-enable the generation of ACCEPT for new connections */ state->listen_bfd.when |= BSC_FD_READ; - /* release all exisitng calls */ + /* release all existing calls */ gsm0408_clear_all_trans(state->net, TRANS_CC); /* flush the queue */ diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 3c316ea..0b07fbc 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -1323,7 +1323,7 @@ dst = &vsub->classmark; } - LOG_MSC_A(msc_a, LOGL_DEBUG, "A5 capabilities recived from Classmark Update: %s\n", + LOG_MSC_A(msc_a, LOGL_DEBUG, "A5 capabilities received from Classmark Update: %s\n", osmo_gsm48_classmark_a5_name(classmark)); osmo_gsm48_classmark_update(dst, classmark); @@ -1643,7 +1643,7 @@ MSC_EV_CALL_LEG_RTP_COMPLETE); OSMO_ASSERT(cl); - /* HACK: We put the connection in loopback mode at the beginnig to + /* HACK: We put the connection in loopback mode at the beginning to * trick the hNodeB into doing the IuUP negotiation with itself. * This is a hack we need because osmo-mgw does not support IuUP yet, see OS#2459. */ if (msc_a->c.ran->type == OSMO_RAT_UTRAN_IU) diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 51504ef..f833585 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -1929,7 +1929,7 @@ { if (vty->type != VTY_FILE) { vty_out(vty, "The IPA name cannot be changed at run-time; " - "It can only be set in the configuraton file.%s", VTY_NEWLINE); + "It can only be set in the configuration file.%s", VTY_NEWLINE); return CMD_WARNING; } diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 59789b0..cb228ef 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -514,7 +514,7 @@ int i; if (gsm0808_dec_encrypt_info(&encr_info, ie_encryption_information->val, ie_encryption_information->len) <= 0) { - LOG_RAN_A_DEC_MSG(LOGL_ERROR, "Failed to decode Encryption Informaiton IE\n"); + LOG_RAN_A_DEC_MSG(LOGL_ERROR, "Failed to decode Encryption Information IE\n"); return -EINVAL; } @@ -524,7 +524,7 @@ } if (encr_info.key_len > sizeof(geran_encr.key)) { - LOG_RAN_A_DEC_MSG(LOGL_ERROR, "Failed to decode Encryption Informaiton IE:" + LOG_RAN_A_DEC_MSG(LOGL_ERROR, "Failed to decode Encryption Information IE:" " encryption key is too long: %u\n", geran_encr.key_len); return -EINVAL; } diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index 77740a0..da88873 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -650,7 +650,7 @@ switch (page_where) { case CELL_IDENT_NO_CELL: - LOG_SCCP_RAN_CAT(sri, DPAG, LOGL_ERROR, "Asked to page on NO_CELL, wich doesn't make sense.\n"); + LOG_SCCP_RAN_CAT(sri, DPAG, LOGL_ERROR, "Asked to page on NO_CELL, which doesn't make sense.\n"); return 0; case CELL_IDENT_UTRAN_PLMN_LAC_RNC: diff --git a/src/libmsc/sgs_iface.c b/src/libmsc/sgs_iface.c index 5ccded7..422ce72 100644 --- a/src/libmsc/sgs_iface.c +++ b/src/libmsc/sgs_iface.c @@ -336,7 +336,7 @@ } /* Comfortable status message generator that also generates some basic - * context-dependent dependand log output */ + * context-dependent log output */ static int sgs_tx_status(struct sgs_connection *sgc, const char *imsi, enum sgsap_sgs_cause cause, struct msgb *msg, int sgsap_iei) { @@ -352,7 +352,7 @@ LOGSGC_VSUB(sgc, subscr_info(imsi), LOGL_ERROR, "Rx %s with invalid mandatory %s IEI!\n", sgsap_msg_type_name(msg->data[0]), sgsap_iei_name(sgsap_iei)); } else if (cause == SGSAP_SGS_CAUSE_COND_IE_ERROR) { - LOGSGC_VSUB(sgc, subscr_info(imsi), LOGL_ERROR, "Rx %s with errornous conditional %s IEI!\n", + LOGSGC_VSUB(sgc, subscr_info(imsi), LOGL_ERROR, "Rx %s with erroneous conditional %s IEI!\n", sgsap_msg_type_name(msg->data[0]), sgsap_iei_name(sgsap_iei)); } else { LOGSGC_VSUB(sgc, subscr_info(imsi), LOGL_ERROR, "Rx %s failed with cause %s at %s IEI!\n", @@ -860,7 +860,7 @@ vlr_subscr_put(vsub, __func__); /* If we do not find an existing connection and allocating a new one - * faild, give up and return status. */ + * failed, give up and return status. */ if (!msc_a) return sgs_tx_status(sgc, imsi, SGSAP_SGS_CAUSE_MSG_INCOMP_STATE, msg, 0); @@ -1278,7 +1278,7 @@ sgs_tx(mme->conn, msg_sgs); } -/*! initalize SGs new interface +/*! initialize SGs new interface * \param[in] ctx talloc context * \param[in] network associated gsm network * \returns returns allocated sgs_stae, NULL in case of error. */ diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c index e4c3891..98b3b53 100644 --- a/src/libmsc/smpp_openbsc.c +++ b/src/libmsc/smpp_openbsc.c @@ -319,7 +319,7 @@ llist_for_each_entry(esme, &smsc->esme_list, list) { /* we currently send an alert notification to each ESME that is - * connected, and do not require a (non-existant) delivery + * connected, and do not require a (non-existent) delivery * pending flag to be set before. */ if (!esme->bind_flags) { LOGP(DSMPP, LOGL_DEBUG, @@ -367,7 +367,7 @@ * to the ESME */ case S_SMS_UNKNOWN_ERROR: if (sms->smpp.transaction_mode) { - /* Send back the SUBMIT-SM response with apropriate error */ + /* Send back the SUBMIT-SM response with appropriate error */ LOGP(DLSMS, LOGL_INFO, "SMPP SUBMIT-SM: Error\n"); rc = smpp_tx_submit_r(sms->smpp.esme, sms->smpp.sequence_nr, diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c index d60cb4a..c00a8c6 100644 --- a/src/libmsc/sms_queue.c +++ b/src/libmsc/sms_queue.c @@ -1,4 +1,4 @@ -/* SMS queue to continously attempt to deliver SMS */ +/* SMS queue to continuously attempt to deliver SMS */ /* * (C) 2010 by Holger Hans Peter Freyther * All Rights Reserved diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index ca6f90d..0f9c991 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -360,7 +360,7 @@ } /* Find subscriber by IMSI, or create new subscriber if not found. - * \param[in] vlr VLR instace. + * \param[in] vlr VLR instance. * \param[in] imsi IMSI string. * \param[out] created if non-NULL, returns whether a new entry was created. */ struct vlr_subscr *_vlr_subscr_find_or_create_by_imsi(struct vlr_instance *vlr, @@ -390,7 +390,7 @@ } /* Find subscriber by TMSI, or create new subscriber if not found. - * \param[in] vlr VLR instace. + * \param[in] vlr VLR instance. * \param[in] tmsi TMSI. * \param[out] created if non-NULL, returns whether a new entry was created. */ struct vlr_subscr *_vlr_subscr_find_or_create_by_tmsi(struct vlr_instance *vlr, @@ -730,7 +730,7 @@ if (key_seq >= ARRAY_SIZE(vsub->auth_tuples)) { LOGVSUBP(LOGL_NOTICE, vsub, - "Skipping auth tuple wih invalid cksn %zu\n", + "Skipping auth tuple with invalid cksn %zu\n", key_seq); continue; } diff --git a/src/libvlr/vlr_auth_fsm.c b/src/libvlr/vlr_auth_fsm.c index 036c3d7..dcdf584 100644 --- a/src/libvlr/vlr_auth_fsm.c +++ b/src/libvlr/vlr_auth_fsm.c @@ -1,4 +1,4 @@ -/* Osmocom Visitor Location Register (VLR) Autentication FSM */ +/* Osmocom Visitor Location Register (VLR) Authentication FSM */ /* (C) 2016 by Harald Welte * diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c index 2db5711..e4d40f0 100644 --- a/src/libvlr/vlr_lu_fsm.c +++ b/src/libvlr/vlr_lu_fsm.c @@ -688,7 +688,7 @@ static bool lai_in_this_vlr(struct vlr_instance *vlr, const struct osmo_location_area_id *lai) { - /* TODO: VLR needs to keep a locally configued list of LAIs */ + /* TODO: VLR needs to keep a locally configured list of LAIs */ return true; } diff --git a/src/libvlr/vlr_sgs.c b/src/libvlr/vlr_sgs.c index 452de2c..269dda6 100644 --- a/src/libvlr/vlr_sgs.c +++ b/src/libvlr/vlr_sgs.c @@ -44,7 +44,7 @@ }; /* Reset all SGs-Associations back to zero. - * \param[in] vlr VLR instace. */ + * \param[in] vlr VLR instance. */ void vlr_sgs_reset(struct vlr_instance *vlr) { struct vlr_subscr *vsub; @@ -59,11 +59,11 @@ } /*! Perform an SGs location update. - * \param[in] vlr VLR instace. + * \param[in] vlr VLR instance. * \param[in] cfg SGs interface configuration parameters. - * \param[in] response_cb calback function that is called when LU is done. - * \param[in] paging_cb calback function that is called when LU needs to page. - * \param[in] mminfo_cb calback function that is called to provide MM info to the UE. + * \param[in] response_cb callback function that is called when LU is done. + * \param[in] paging_cb callback function that is called when LU needs to page. + * \param[in] mminfo_cb callback function that is called to provide MM info to the UE. * \param[in] mme_name fqdn of the requesting MME (mme-name). * \param[in] type location update type (normal or IMSI attach). * \param[in] imsi mobile identity (IMSI). @@ -299,7 +299,7 @@ { struct vlr_subscr *vsub = arg; - /* 3GPP TS 29.118 does not specify a specif action that has to happen + /* 3GPP TS 29.118 does not specify a specific action that has to happen * in case Ts5 times out. The timeout just indicates that the paging * failed. Other actions may check the status of Ts5 to see if a paging * is still ongoing or not. */ @@ -327,7 +327,7 @@ /* Note: 3GPP TS 29.118, chapter 4.2.2 mentions paging in the FSM * diagram, but paging never causes a state transition except when * an explicit failure is indicated (MME actively rejects paging). - * Apparantly it is also possible that an LU happens while the paging + * Apparently it is also possible that an LU happens while the paging * is still ongoing and Ts5 is running. (chapter 5.1.2.3). This means * that the paging procedure is intended to run in parallel to the * SGs FSM and given that the benaviour around Ts5 must be implemented diff --git a/src/libvlr/vlr_sgs_fsm.c b/src/libvlr/vlr_sgs_fsm.c index 49ad09a..a131b7e 100644 --- a/src/libvlr/vlr_sgs_fsm.c +++ b/src/libvlr/vlr_sgs_fsm.c @@ -54,7 +54,7 @@ struct vlr_subscr *vsub = fi->priv; osmo_fsm_inst_state_chg(fi, SGS_UE_ST_NULL, 0, 0); - /* Note: This is only relevent for cases where we are in the middle + /* Note: This is only relevant for cases where we are in the middle * of an TMSI reallocation procedure. Should a failure of some sort * put us to NULL state, we have to free the pending TMSI */ vsub->tmsi_new = GSM_RESERVED_TMSI; @@ -156,7 +156,7 @@ /* Check if we expect a TMSI REALLOCATION COMPLETE message from the MME * by checking the tmsi_new flag. If this flag is not GSM_RESERVED_TMSI * we know that we have a TMSI pending and need to wait for the MME - * to acknowlege first */ + * to acknowledge first */ if (vsub->tmsi_new != GSM_RESERVED_TMSI) { osmo_fsm_inst_state_chg(fi, SGS_UE_ST_ASSOCIATED, vsub->sgs.cfg.timer[SGS_STATE_TS6_2], SGS_STATE_TS6_2); @@ -355,7 +355,7 @@ .event_names = sgs_ue_fsm_event_names, }; -/*! Initalize/Register SGs FSM in osmo-fsm subsystem */ +/*! Initialize/Register SGs FSM in osmo-fsm subsystem */ void vlr_sgs_fsm_init(void) { if (osmo_fsm_find_by_name(sgs_ue_fsm.name) != &sgs_ue_fsm) diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c index 155afbe..9026241 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c @@ -1267,7 +1267,7 @@ } /* During CM Service Request or Paging Response we already have Classmark 2 that indicates A5/3 - * availablity. Here, in a hacky way remove the knowledge of Classmark 2 to tickle a code path where + * availability. Here, in a hacky way remove the knowledge of Classmark 2 to tickle a code path where * proc_arq_fsm needs a Classmark Update during Ciphering. Shouldn't happen in reality though. */ static void test_cm_service_needs_classmark_update() { diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err index e3949e9..96a5303 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err +++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err @@ -2995,7 +2995,7 @@ lu_result_sent == 0 - BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3 DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: RAN decode: CLASSMARK_UPDATE -DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities recived from Classmark Update: no-cm1 no-cm2 no-cm3 +DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities received from Classmark Update: no-cm1 no-cm2 no-cm3 DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: Received Event MSC_A_EV_CLASSMARK_UPDATE DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: state_chg to MSC_A_ST_AUTH_CIPH DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN encode: CIPHER_MODE_COMMAND on GERAN-A @@ -3639,7 +3639,7 @@ lu_result_sent == 0 - BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3 DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: RAN decode: CLASSMARK_UPDATE -DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities recived from Classmark Update: no-cm1 no-cm2 no-cm3 +DBSSAP msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities received from Classmark Update: no-cm1 no-cm2 no-cm3 DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: Received Event MSC_A_EV_CLASSMARK_UPDATE DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: state_chg to MSC_A_ST_AUTH_CIPH DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN encode: CIPHER_MODE_COMMAND on GERAN-A @@ -3990,7 +3990,7 @@ DREF msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: - rx_from_ms: now used by 1 (paging-response) - BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3 DBSSAP msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: RAN decode: CLASSMARK_UPDATE -DBSSAP msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities recived from Classmark Update: no-cm1 no-cm2 no-cm3 +DBSSAP msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: A5 capabilities received from Classmark Update: no-cm1 no-cm2 no-cm3 DMSC msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: Received Event MSC_A_EV_CLASSMARK_UPDATE DMSC msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_WAIT_CLASSMARK_UPDATE}: state_chg to MSC_A_ST_AUTH_CIPH DMSC msc_a(IMSI-901700000004620:MSISDN-42342:GERAN-A:PAGING_RESP){MSC_A_ST_AUTH_CIPH}: RAN encode: CIPHER_MODE_COMMAND on GERAN-A -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie66b89065f2100c1d2125ce5a6c9b1d58df7c8ad Gerrit-Change-Number: 16074 Gerrit-PatchSet: 3 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:15:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:15:07 +0000 Subject: Change in simtrace2[master]: free USB buffer when allocation failed In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16097 ) Change subject: free USB buffer when allocation failed ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/simtrace2/+/16097/1/firmware/libcommon/source/card_emu.c File firmware/libcommon/source/card_emu.c: https://gerrit.osmocom.org/c/simtrace2/+/16097/1/firmware/libcommon/source/card_emu.c at 274 PS1, Line 274: msg = msgb_dequeue(queue); Are we sure we are not accidentially dequeing the [only, first] buffer in the queue whihc might currently be in transmit by the USB device peripheral? -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie9ebdd2ff966f67c9afd1ed760f106558f0091ad Gerrit-Change-Number: 16097 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 23 Nov 2019 08:15:07 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:21:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:21:22 +0000 Subject: Change in osmo-ci[master]: osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16176 ) Change subject: osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag ...................................................................... osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag Change-Id: I9e3c65342d1bb62d7baa9d589930aa042fb5f7a9 Closes: OS#4279 Related: OS#4246 Depends: osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 --- M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/76/16176/1 diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index 097dcb1..7863176 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -40,7 +40,7 @@ - stow - texinfo # by gsm-manuals - - python-nwdiag + - python3-nwdiag - python-pychart # by gapk - libasound-dev -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16176 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9e3c65342d1bb62d7baa9d589930aa042fb5f7a9 Gerrit-Change-Number: 16176 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:25:58 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 08:25:58 +0000 Subject: Change in osmo-hlr[master]: change format of 'last LU seen' In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15359 ) Change subject: change format of 'last LU seen' ...................................................................... Patch Set 3: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/15359/3/src/hlr_vty_subscr.c File src/hlr_vty_subscr.c: https://gerrit.osmocom.org/c/osmo-hlr/+/15359/3/src/hlr_vty_subscr.c at 44 PS3, Line 44: tm !tm -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15359 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I6731968f05050399f4dd43b241290186e0c59e1a Gerrit-Change-Number: 15359 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:25:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:33:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:33:11 +0000 Subject: Change in osmo-ci[master]: WIP: coverity: Make sure curl is installed, as our coverity upload jo... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/14506 ) Change subject: WIP: coverity: Make sure curl is installed, as our coverity upload job needs it ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/14506 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9918b89971bf6c2e200f1d96d993d5fbd6741b71 Gerrit-Change-Number: 14506 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: zecke Gerrit-Comment-Date: Sat, 23 Nov 2019 08:33:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:33:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:33:25 +0000 Subject: Change in osmo-ci[master]: dockerfile: Add 'dahdi-source' for libosmo-abis In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16033 ) Change subject: dockerfile: Add 'dahdi-source' for libosmo-abis ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Icfd244268958be71f538d27307cdf0fabeecd956 Gerrit-Change-Number: 16033 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Sat, 23 Nov 2019 08:33:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:33:26 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:33:26 +0000 Subject: Change in osmo-ci[master]: dockerfile: Add 'dahdi-source' for libosmo-abis In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16033 ) Change subject: dockerfile: Add 'dahdi-source' for libosmo-abis ...................................................................... dockerfile: Add 'dahdi-source' for libosmo-abis Change-Id: Icfd244268958be71f538d27307cdf0fabeecd956 --- M docker/Dockerfile_osmocom_jenkins.amd64 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Verified osmith: Looks good to me, approved diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index bc69985..c5318fb 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -21,6 +21,7 @@ bzip2 \ coccinelle \ cppcheck \ + dahdi-source \ dblatex \ dbus \ debhelper \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Icfd244268958be71f538d27307cdf0fabeecd956 Gerrit-Change-Number: 16033 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:33:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:33:40 +0000 Subject: Change in osmo-ci[master]: WIP: coverity: Make sure curl is installed, as our coverity upload jo... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/14506 ) Change subject: WIP: coverity: Make sure curl is installed, as our coverity upload job needs it ...................................................................... Patch Set 2: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/14506 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9918b89971bf6c2e200f1d96d993d5fbd6741b71 Gerrit-Change-Number: 14506 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: zecke Gerrit-Comment-Date: Sat, 23 Nov 2019 08:33:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:33:46 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:33:46 +0000 Subject: Change in osmo-ci[master]: WIP: coverity: Make sure curl is installed, as our coverity upload jo... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/14506 ) Change subject: WIP: coverity: Make sure curl is installed, as our coverity upload job needs it ...................................................................... WIP: coverity: Make sure curl is installed, as our coverity upload job needs it This is untested. I'm on the train and have very limited understanding of Ansible Change-Id: I9918b89971bf6c2e200f1d96d993d5fbd6741b71 --- M jobs/coverity.yml 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/jobs/coverity.yml b/jobs/coverity.yml index 576fa29..5614fc0 100644 --- a/jobs/coverity.yml +++ b/jobs/coverity.yml @@ -2,9 +2,19 @@ - project: name: osmocom-coverity jobs: + - osmocom-coverity-deps - osmocom-coverity - job: + name: 'osmocom-coverity-deps' + apt: + name: "{{ item }}" + cache_valid_time: 3600 + update_cache: yes + with_items: + - curl + +- job: name: 'osmocom-coverity' project-type: freestyle defaults: global -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/14506 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9918b89971bf6c2e200f1d96d993d5fbd6741b71 Gerrit-Change-Number: 14506 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: zecke Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 08:42:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 08:42:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: GSUP_Types: Add support for GSUP_IE_RAT_TYPE In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15365 ) Change subject: GSUP_Types: Add support for GSUP_IE_RAT_TYPE ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15365 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5d899fc6f6d4cf6123609b596022a853561f35f5 Gerrit-Change-Number: 15365 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 08:42:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 09:33:28 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 09:33:28 +0000 Subject: Change in osmo-ci[master]: osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16176 ) Change subject: osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16176 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9e3c65342d1bb62d7baa9d589930aa042fb5f7a9 Gerrit-Change-Number: 16176 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Sat, 23 Nov 2019 09:33:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 10:47:33 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 10:47:33 +0000 Subject: Change in osmo-pcu[master]: PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCH In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16085 ) Change subject: PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCH ...................................................................... Patch Set 4: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I482d60a46b9d253dfe0b16140eac9fea6420b30c Gerrit-Change-Number: 16085 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 10:47:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 11:10:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 11:10:16 +0000 Subject: Change in osmo-ci[master]: osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16176 ) Change subject: osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16176 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9e3c65342d1bb62d7baa9d589930aa042fb5f7a9 Gerrit-Change-Number: 16176 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 23 Nov 2019 11:10:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 11:10:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 11:10:51 +0000 Subject: Change in osmo-ci[master]: osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16176 ) Change subject: osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag ...................................................................... osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag Change-Id: I9e3c65342d1bb62d7baa9d589930aa042fb5f7a9 Closes: OS#4279 Related: OS#4246 Depends: osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94 --- M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: fixeria: Looks good to me, approved laforge: Verified diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index 097dcb1..7863176 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -40,7 +40,7 @@ - stow - texinfo # by gsm-manuals - - python-nwdiag + - python3-nwdiag - python-pychart # by gapk - libasound-dev -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16176 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9e3c65342d1bb62d7baa9d589930aa042fb5f7a9 Gerrit-Change-Number: 16176 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 11:12:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 11:12:21 +0000 Subject: Change in osmo-pcu[master]: PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCH In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16085 ) Change subject: PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCH ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I482d60a46b9d253dfe0b16140eac9fea6420b30c Gerrit-Change-Number: 16085 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 11:12:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 11:12:23 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 11:12:23 +0000 Subject: Change in osmo-pcu[master]: PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCH In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16085 ) Change subject: PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCH ...................................................................... PTCCH: properly handle RACH.ind for PCU_IF_SAPI_PTCCH Change-Id: I482d60a46b9d253dfe0b16140eac9fea6420b30c Related: OS#1545 --- M src/bts.cpp M src/bts.h M src/osmo-bts-litecell15/lc15_l1_if.c M src/osmo-bts-oc2g/oc2g_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.c M src/pcu_l1_if.cpp M src/pcu_l1_if.h 7 files changed, 104 insertions(+), 17 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index 24666af..c8b6375 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -842,6 +842,53 @@ return rc; } +/* PTCCH/U sub-slot / frame-number mapping (see 3GPP TS 45.002, table 6) */ +static uint32_t ptcch_slot_map[PTCCH_TAI_NUM] = { + 12, 38, 64, 90, + 116, 142, 168, 194, + 220, 246, 272, 298, + 324, 350, 376, 402, +}; + +int BTS::rcv_ptcch_rach(uint8_t trx_nr, uint8_t ts_nr, uint32_t fn, int16_t qta) +{ + struct gprs_rlcmac_bts *bts = bts_data(); + struct gprs_rlcmac_pdch *pdch; + uint32_t fn416 = fn % 416; + uint8_t ss; + + /* Prevent buffer overflow */ + if (trx_nr >= ARRAY_SIZE(bts->trx) || ts_nr >= 8) { + LOGP(DRLCMAC, LOGL_ERROR, "Malformed RACH.ind message " + "(TRX=%u TS=%u FN=%u)\n", trx_nr, ts_nr, fn); + return -EINVAL; + } + + /* Make sure PDCH time-slot is enabled */ + pdch = &bts->trx[trx_nr].pdch[ts_nr]; + if (!pdch->m_is_enabled) { + LOGP(DRLCMAC, LOGL_NOTICE, "Rx PTCCH RACH.ind for inactive PDCH " + "(TRX=%u TS=%u FN=%u)\n", trx_nr, ts_nr, fn); + return -EAGAIN; + } + + /* Convert TDMA frame-number to PTCCH/U sub-slot number */ + for (ss = 0; ss < PTCCH_TAI_NUM; ss++) + if (ptcch_slot_map[ss] == fn416) + break; + if (ss == PTCCH_TAI_NUM) { + LOGP(DRLCMAC, LOGL_ERROR, "Failed to map PTCCH/U sub-slot for fn=%u\n", fn); + return -ENODEV; + } + + /* Apply the new Timing Advance value */ + LOGP(DRLCMAC, LOGL_INFO, "Continuous Timing Advance update " + "for TAI %u, new TA is %u\n", ss, qta2ta(qta)); + pdch->update_ta(ss, qta2ta(qta)); + + return 0; +} + void BTS::snd_dl_ass(gprs_rlcmac_tbf *tbf, bool poll, const char *imsi) { int plen; diff --git a/src/bts.h b/src/bts.h index c2cc316..54a29cb 100644 --- a/src/bts.h +++ b/src/bts.h @@ -301,6 +301,7 @@ uint32_t rfn_to_fn(int32_t rfn); int rcv_rach(uint16_t ra, uint32_t Fn, int16_t qta, bool is_11bit, enum ph_burst_type burst_type); + int rcv_ptcch_rach(uint8_t trx_nr, uint8_t ts_nr, uint32_t fn, int16_t qta); void snd_dl_ass(gprs_rlcmac_tbf *tbf, bool poll, const char *imsi); diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index 670263f..24eb0fa 100644 --- a/src/osmo-bts-litecell15/lc15_l1_if.c +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -223,10 +223,6 @@ data_ind->u32Fn, &meas); break; - case GsmL1_Sapi_Ptcch: - // FIXME - rc = -1; - break; default: LOGP(DL1IF, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI %s\n", get_value_string(lc15bts_l1sapi_names, data_ind->sapi)); @@ -251,8 +247,21 @@ return 0; 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), true); + + switch (ra_ind->sapi) { + case GsmL1_Sapi_Pdtch: + bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, + qta2ta(ra_ind->measParam.i16BurstTiming), true); + break; + case GsmL1_Sapi_Ptcch: + pcu_rx_rach_ind_pdtch(fl1h->trx_no, ra_ind->u8Tn, ra_ind->u32Fn, + ra_ind->measParam.i16BurstTiming); + break; + default: + LOGP(DL1IF, LOGL_NOTICE, "Rx PH-RA.ind for unknown L1 SAPI %s\n", + get_value_string(lc15bts_l1sapi_names, ra_ind->sapi)); + return -ENOTSUP; + } return 0; } diff --git a/src/osmo-bts-oc2g/oc2g_l1_if.c b/src/osmo-bts-oc2g/oc2g_l1_if.c index a02e962..11fecba 100644 --- a/src/osmo-bts-oc2g/oc2g_l1_if.c +++ b/src/osmo-bts-oc2g/oc2g_l1_if.c @@ -229,9 +229,6 @@ data_ind->u32Fn, &meas); break; - case GsmL1_Sapi_Ptcch: - // FIXME - break; default: LOGP(DL1IF, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI %s\n", get_value_string(oc2gbts_l1sapi_names, data_ind->sapi)); @@ -250,8 +247,20 @@ LOGP(DL1IF, LOGL_DEBUG, "PH-RA-IND L1 qta=%d\n", ra_ind->measParam.i16BurstTiming); - bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, - qta2ta(ra_ind->measParam.i16BurstTiming), true); + switch (ra_ind->sapi) { + case GsmL1_Sapi_Pdtch: + bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, + qta2ta(ra_ind->measParam.i16BurstTiming), true); + break; + case GsmL1_Sapi_Ptcch: + pcu_rx_rach_ind_pdtch(fl1h->trx_no, ra_ind->u8Tn, ra_ind->u32Fn, + ra_ind->measParam.i16BurstTiming); + break; + default: + LOGP(DL1IF, LOGL_NOTICE, "Rx PH-RA.ind for unknown L1 SAPI %s\n", + get_value_string(oc2gbts_l1sapi_names, ra_ind->sapi)); + return -ENOTSUP; + } return 0; } diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index 9b310cc..751629c 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -208,10 +208,6 @@ data_ind->u32Fn, &meas); break; - case GsmL1_Sapi_Ptcch: - // FIXME - rc = -1; - break; default: LOGP(DL1IF, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI %s\n", get_value_string(femtobts_l1sapi_names, data_ind->sapi)); @@ -240,8 +236,21 @@ return 0; 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), true); + + switch (ra_ind->sapi) { + case GsmL1_Sapi_Pdtch: + bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, + qta2ta(ra_ind->measParam.i16BurstTiming), true); + break; + case GsmL1_Sapi_Ptcch: + pcu_rx_rach_ind_pdtch(fl1h->trx_no, ra_ind->u8Tn, ra_ind->u32Fn, + ra_ind->measParam.i16BurstTiming); + break; + default: + LOGP(DL1IF, LOGL_NOTICE, "Rx PH-RA.ind for unknown L1 SAPI %s\n", + get_value_string(femtobts_l1sapi_names, ra_ind->sapi)); + return -ENOTSUP; + } return 0; } diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 9c7724c..5e22c5c 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -405,6 +405,12 @@ return rc; } +/* C -> C++ adapter for direct DSP access code (e.g. osmo-bts-sysmo) */ +extern "C" int pcu_rx_rach_ind_pdtch(uint8_t trx_nr, uint8_t ts_nr, uint32_t fn, int16_t qta) +{ + return BTS::main_bts()->rcv_ptcch_rach(trx_nr, ts_nr, fn, qta); +} + static int pcu_rx_rach_ind(struct gsm_pcu_if_rach_ind *rach_ind) { int rc = 0; @@ -421,6 +427,11 @@ rach_ind->qta, rach_ind->is_11bit, (ph_burst_type)rach_ind->burst_type); break; + case PCU_IF_SAPI_PTCCH: + rc = BTS::main_bts()->rcv_ptcch_rach( + rach_ind->trx_nr, rach_ind->ts_nr, + rach_ind->fn, rach_ind->qta); + break; default: LOGP(DL1IF, LOGL_ERROR, "Received PCU rach request with " "unsupported sapi %d\n", rach_ind->sapi); diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index 888ad28..a77a6c8 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -178,6 +178,7 @@ int pcu_rx_rts_req_ptcch(uint8_t trx, uint8_t ts, uint32_t fn, uint8_t block_nr); +int pcu_rx_rach_ind_pdtch(uint8_t trx_nr, uint8_t ts_nr, uint32_t fn, int16_t qta); int pcu_rx_data_ind_pdtch(uint8_t trx, uint8_t ts, uint8_t *data, uint8_t len, uint32_t fn, struct pcu_l1_meas *meas); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I482d60a46b9d253dfe0b16140eac9fea6420b30c Gerrit-Change-Number: 16085 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 11:36:59 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 11:36:59 +0000 Subject: Change in osmo-ttcn3-hacks[master]: GSUP_Types: Add support for GSUP_IE_RAT_TYPE In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15365 ) Change subject: GSUP_Types: Add support for GSUP_IE_RAT_TYPE ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15365 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I5d899fc6f6d4cf6123609b596022a853561f35f5 Gerrit-Change-Number: 15365 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 11:36:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 11:53:44 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 11:53:44 +0000 Subject: Change in osmo-bsc[master]: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed wh... In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15909 ) Change subject: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed when the BTS configured with none combined CCCH mode. ...................................................................... Patch Set 1: Should we abandon this change? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I33ea7808ac1bd064b88fd609bd7dfe0c8aa341f2 Gerrit-Change-Number: 15909 Gerrit-PatchSet: 1 Gerrit-Owner: mqng2 Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 11:53:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 12:14:00 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 12:14:00 +0000 Subject: Change in osmo-sgsn[master]: Use libosmocore constant for IMSI length in ACL entry In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#5) to the change originally created by Max. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/12224 ) Change subject: Use libosmocore constant for IMSI length in ACL entry ...................................................................... Use libosmocore constant for IMSI length in ACL entry Presumably the length is chosen to match that of imsi in osmo_gsup_message. Change-Id: I138aea409aab0c748c75546e628797fc7498bf40 --- M include/osmocom/sgsn/gprs_sgsn.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/24/12224/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/12224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I138aea409aab0c748c75546e628797fc7498bf40 Gerrit-Change-Number: 12224 Gerrit-PatchSet: 5 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: msuraev Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 13:11:21 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 13:11:21 +0000 Subject: Change in osmo-sgsn[master]: Use libosmocore constant for IMSI length in ACL entry In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/12224 ) Change subject: Use libosmocore constant for IMSI length in ACL entry ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/12224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I138aea409aab0c748c75546e628797fc7498bf40 Gerrit-Change-Number: 12224 Gerrit-PatchSet: 5 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: msuraev Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 13:11:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 13:56:36 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 13:56:36 +0000 Subject: Change in libosmocore[master]: make use of OTC_GLOBAL when allocating library-internal contexts In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13338 ) Change subject: make use of OTC_GLOBAL when allocating library-internal contexts ...................................................................... Patch Set 15: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/13338/15/src/ctrl/control_vty.c File src/ctrl/control_vty.c: https://gerrit.osmocom.org/c/libosmocore/+/13338/15/src/ctrl/control_vty.c at 85 PS15, Line 85: ctx Wouldn't GCC warn us that this argument is passed but not used? I really like the approach of Wireshark - the '_U_' macro / attribute. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/13338 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I48f475efd3ee0d5120b8fc30861e852d1a6920b1 Gerrit-Change-Number: 13338 Gerrit-PatchSet: 15 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 13:56:36 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 14:36:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 14:36:25 +0000 Subject: Change in osmo-sgsn[master]: Use libosmocore constant for IMSI length in ACL entry In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/12224 ) Change subject: Use libosmocore constant for IMSI length in ACL entry ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/12224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I138aea409aab0c748c75546e628797fc7498bf40 Gerrit-Change-Number: 12224 Gerrit-PatchSet: 5 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: msuraev Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 23 Nov 2019 14:36:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 14:36:27 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 23 Nov 2019 14:36:27 +0000 Subject: Change in osmo-sgsn[master]: Use libosmocore constant for IMSI length in ACL entry In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/12224 ) Change subject: Use libosmocore constant for IMSI length in ACL entry ...................................................................... Use libosmocore constant for IMSI length in ACL entry Presumably the length is chosen to match that of imsi in osmo_gsup_message. Change-Id: I138aea409aab0c748c75546e628797fc7498bf40 --- M include/osmocom/sgsn/gprs_sgsn.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h index 0886ce7..289e0c4 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/gprs_sgsn.h @@ -428,7 +428,7 @@ */ struct imsi_acl_entry { struct llist_head list; - char imsi[16+1]; + char imsi[OSMO_IMSI_BUF_SIZE]; }; /* see GSM 09.02, 17.7.1, PDP-Context and GPRSSubscriptionData */ -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/12224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I138aea409aab0c748c75546e628797fc7498bf40 Gerrit-Change-Number: 12224 Gerrit-PatchSet: 5 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Stefan Sperling Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: msuraev Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 19:25:21 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 19:25:21 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16177 ) Change subject: trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread ...................................................................... trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread The previous approach was based on threading.Timer, so on each clock iteration one thread spawned another new thread. So far it worked well, but such frequent spawning involves an additional overhead. After this change, CLCKGen.start() allocates and starts a new thread, that periodically sends clock indications and sleep()s during the indication intervals. The CLCKGen.stop() in its turn terminates that thread and frees the memory. Change-Id: Ibe477eb0a1ee2193c1ff16452a407be7e858b2ef --- M src/target/trx_toolkit/clck_gen.py M src/target/trx_toolkit/transceiver.py 2 files changed, 41 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/77/16177/1 diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py index c58d8bd..92ca217 100755 --- a/src/target/trx_toolkit/clck_gen.py +++ b/src/target/trx_toolkit/clck_gen.py @@ -4,7 +4,7 @@ # TRX Toolkit # Simple TDMA frame clock generator # -# (C) 2017-2018 by Vadim Yanitskiy +# (C) 2017-2019 by Vadim Yanitskiy # # All Rights Reserved # @@ -22,13 +22,14 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -APP_CR_HOLDERS = [("2017-2018", "Vadim Yanitskiy ")] +APP_CR_HOLDERS = [("2017-2019", "Vadim Yanitskiy ")] import logging as log +import threading import signal +import time from app_common import ApplicationBase -from threading import Timer from udp_link import UDPLink from gsm_shared import * @@ -40,32 +41,54 @@ # Average loop back delay LO_DELAY_US = 90.0 - # State variables - timer = None - def __init__(self, clck_links, clck_start = 0, ind_period = 102): + # This event is needed to control the thread + self._breaker = threading.Event() + self._thread = None + self.clck_links = clck_links self.ind_period = ind_period self.clck_start = clck_start - self.clck_src = clck_start # Calculate counter time self.ctr_interval = self.GSM_FRAME_US - self.LO_DELAY_US self.ctr_interval /= self.SEC_DELAY_US self.ctr_interval *= self.ind_period + @property + def running(self): + if self._thread is None: + return False + return self._thread.isAlive() + def start(self): - # Send the first indication - self.send_clck_ind() + # Make sure we won't start two threads + assert(self._thread is None) + + # (Re)set the clock counter + self.clck_src = self.clck_start + + # Initialize and start a new thread + self._thread = threading.Thread(target = self._worker) + self._thread.start() def stop(self): - # Stop pending timer - if self.timer is not None: - self.timer.cancel() - self.timer = None + # No thread, no problem ;) + if self._thread is None: + return - # Reset the clock source - self.clck_src = self.clck_start + # Stop the thread first + self._breaker.set() + self._thread.join() + + # Free memory, reset breaker + del self._thread + self._thread = None + self._breaker.clear() + + def _worker(self): + while not self._breaker.wait(self.ctr_interval): + self.send_clck_ind() def send_clck_ind(self): # Keep clock cycle @@ -87,10 +110,6 @@ # Increase frame count self.clck_src += self.ind_period - # Schedule a new indication - self.timer = Timer(self.ctr_interval, self.send_clck_ind) - self.timer.start() - # Just a wrapper for independent usage class Application(ApplicationBase): def __init__(self): @@ -102,7 +121,7 @@ # Configure logging log.basicConfig(level = log.DEBUG, - format = "[%(levelname)s] %(filename)s:%(lineno)d %(message)s") + format = "[%(levelname)s] TID#%(thread)s %(filename)s:%(lineno)d %(message)s") def run(self): self.link = UDPLink("127.0.0.1", 5800, "0.0.0.0", 5700) diff --git a/src/target/trx_toolkit/transceiver.py b/src/target/trx_toolkit/transceiver.py index 37680e7..b1a5c11 100644 --- a/src/target/trx_toolkit/transceiver.py +++ b/src/target/trx_toolkit/transceiver.py @@ -172,10 +172,10 @@ # Transceiver was started clck_links.append(self.clck_if) - if not self.clck_gen.timer and len(clck_links) > 0: + if not self.clck_gen.running and len(clck_links) > 0: log.info("Starting clock generator") self.clck_gen.start() - elif self.clck_gen.timer and not clck_links: + elif self.clck_gen.running and not clck_links: log.info("Stopping clock generator") self.clck_gen.stop() -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibe477eb0a1ee2193c1ff16452a407be7e858b2ef Gerrit-Change-Number: 16177 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 19:25:21 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 19:25:21 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: turn CLCKGen's thread into a daemon References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16178 ) Change subject: trx_toolkit/clck_gen.py: turn CLCKGen's thread into a daemon ...................................................................... trx_toolkit/clck_gen.py: turn CLCKGen's thread into a daemon If the main thread crashes, the CLCKGen's thread would never stop. It would also happen if the main thread terminates without calling CLCKGen.stop(). Let's prevent this by creating a daemon thread. Change-Id: I9d41c5baa25fa0a263758414a164c1bded25e04e --- M src/target/trx_toolkit/clck_gen.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/78/16178/1 diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py index 92ca217..a50c985 100755 --- a/src/target/trx_toolkit/clck_gen.py +++ b/src/target/trx_toolkit/clck_gen.py @@ -70,6 +70,7 @@ # Initialize and start a new thread self._thread = threading.Thread(target = self._worker) + self._thread.setDaemon(True) self._thread.start() def stop(self): @@ -128,6 +129,9 @@ self.clck = CLCKGen([self.link], ind_period = 51) self.clck.start() + # Block unless we receive a signal + self.clck._thread.join() + def sig_handler(self, signum, frame): log.info("Signal %d received" % signum) if signum == signal.SIGINT: -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9d41c5baa25fa0a263758414a164c1bded25e04e Gerrit-Change-Number: 16178 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 19:25:22 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 23 Nov 2019 19:25:22 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: drop unneeded debug print() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16179 ) Change subject: trx_toolkit/clck_gen.py: drop unneeded debug print() ...................................................................... trx_toolkit/clck_gen.py: drop unneeded debug print() Change-Id: I372af77d5b0b24fa38e304b782ca5b3d0888211b --- M src/target/trx_toolkit/clck_gen.py 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/79/16179/1 diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py index a50c985..0219bb4 100755 --- a/src/target/trx_toolkit/clck_gen.py +++ b/src/target/trx_toolkit/clck_gen.py @@ -135,7 +135,6 @@ def sig_handler(self, signum, frame): log.info("Signal %d received" % signum) if signum == signal.SIGINT: - print("Stopping timer") self.clck.stop() if __name__ == '__main__': -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16179 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I372af77d5b0b24fa38e304b782ca5b3d0888211b Gerrit-Change-Number: 16179 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 23 19:25:30 2019 From: gerrit-no-reply at lists.osmocom.org (ipse) Date: Sat, 23 Nov 2019 19:25:30 +0000 Subject: Change in osmo-trx[master]: Initial XTRX support In-Reply-To: References: Message-ID: ipse has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/15685 ) Change subject: Initial XTRX support ...................................................................... Patch Set 3: > @ipse, @sergey, @mold, can we please get some feedback to move this ahead? It shold be in your own best interest to get xtrx support merged anytime soon. We want that, too, but waiting 6 weeks for input isn't helping :/ Hi, Harald, I've fixed the comments above in the updated branch but when testing `osmo-trx` in the loopback mode I found that it can't decode the signal it transmits. I can resubmit the patches but I thought it would be better to wait until we understand the issue - if it's something wrong with the recent `osmo-trx` or with the XTRX adapter code. We haven't had time to do that yet, unfortunately. -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15685 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I1067dfef53aa2669cc7c189cccae10074c674390 Gerrit-Change-Number: 15685 Gerrit-PatchSet: 3 Gerrit-Owner: rauf.gyulaliev at fairwaves.co Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 23 Nov 2019 19:25:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:06:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:06:41 +0000 Subject: Change in osmo-e1-recorder[master]: storage.c: Fix compiler error due to missing writev() declaration References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16180 ) Change subject: storage.c: Fix compiler error due to missing writev() declaration ...................................................................... storage.c: Fix compiler error due to missing writev() declaration storage.c:90:7: error: implicit declaration of function ?writev?; did you mean ?write?? [-Werror=implicit-function-declaration] 90 | rc = writev(g_out_fd, iov, ARRAY_SIZE(iov)); | ^~~~~~ | write Change-Id: If98737199f5a6e8fb37a4fd6403ee973dcf70612 --- M src/storage.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/80/16180/1 diff --git a/src/storage.c b/src/storage.c index 0a926e4..bcb50a2 100644 --- a/src/storage.c +++ b/src/storage.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16180 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: If98737199f5a6e8fb37a4fd6403ee973dcf70612 Gerrit-Change-Number: 16180 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:06:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:06:41 +0000 Subject: Change in osmo-e1-recorder[master]: fix various compiler warnings References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16181 ) Change subject: fix various compiler warnings ...................................................................... fix various compiler warnings Change-Id: I65a862132563f578eff11b8d085960b820f5d4b7 --- M src/e1cap_dump.c M src/hdlc-test.c M src/storage.c 3 files changed, 11 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/81/16181/1 diff --git a/src/e1cap_dump.c b/src/e1cap_dump.c index 1986041..232769c 100644 --- a/src/e1cap_dump.c +++ b/src/e1cap_dump.c @@ -53,7 +53,7 @@ time_t nowtime; struct tm *nowtm; char tmbuf[64]; - static char buf[64]; + static char buf[64+20]; nowtime = tv->tv_sec; nowtm = localtime(&nowtime); @@ -62,6 +62,7 @@ return buf; } +#if 0 static int all_bytes_are(unsigned char ch, const uint8_t *data, int len) { int i; @@ -72,6 +73,7 @@ } return 1; } +#endif static void handle_hdlc_frame_content(const uint8_t *data, unsigned int len, void *priv) @@ -151,6 +153,8 @@ static void handle_data(struct osmo_e1cap_pkthdr *pkt, uint8_t *data, int len) { + struct timeval tv; + flip_buf_bits(data, len); #if 0 /* filter out all-ff/all-fe/all-7f */ @@ -170,8 +174,9 @@ switch (g_mode) { case MODE_PRINT: + tv = pkt->ts; printf("%s %02u/%02u %u (%u): %s\n", - timeval2str(&pkt->ts), + timeval2str(&tv), pkt->line_nr, pkt->ts_nr, pkt->capture_mode, pkt->len, osmo_hexdump_nospc(data, len)); diff --git a/src/hdlc-test.c b/src/hdlc-test.c index 1c7c6ef..0814ca0 100644 --- a/src/hdlc-test.c +++ b/src/hdlc-test.c @@ -12,12 +12,11 @@ int string_len = strlen(hex); int byte_len = string_len/2; int bit_len = byte_len*8; - int rc; printf("hex string = %s\n", hex); bytes = alloca(byte_len); bits = alloca(bit_len); - rc = osmo_hexparse(hex, bytes, byte_len); + osmo_hexparse(hex, bytes, byte_len); printf("parsed bytes = %s\n", osmo_hexdump(bytes, byte_len)); printf("MSB mode\n"); diff --git a/src/storage.c b/src/storage.c index bcb50a2..ddbadd0 100644 --- a/src/storage.c +++ b/src/storage.c @@ -66,6 +66,7 @@ int e1frame_store(struct e1inp_ts *ts, struct msgb *msg, enum osmo_e1cap_capture_mode mode) { struct osmo_e1cap_pkthdr _h, *h = &_h; + struct timeval tv; int rc; struct iovec iov[2] = { { @@ -78,7 +79,8 @@ }; h->len = htonl(msg->len); - gettimeofday(&h->ts, NULL); + tv = h->ts; + gettimeofday(&tv, NULL); h->line_nr = ts->line->num; h->ts_nr = ts->num; h->capture_mode = mode; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16181 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I65a862132563f578eff11b8d085960b820f5d4b7 Gerrit-Change-Number: 16181 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:06:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:06:41 +0000 Subject: Change in osmo-e1-recorder[master]: convert build system to autotools References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16182 ) Change subject: convert build system to autotools ...................................................................... convert build system to autotools Change-Id: I705b5356309507c39eaf517ca5b9ce0e1aa89852 --- A Makefile.am A configure.ac A doc/Makefile.am A doc/examples/Makefile.am A doc/examples/osmo-e1-recorder.cfg A git-version-gen A osmoappdesc.py D src/Makefile A src/Makefile.am A tests/Makefile.am 10 files changed, 578 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/82/16182/1 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..24f0b24 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,28 @@ +AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6 + +## FIXME: automake >= 1.13 or autoconf >= 2.70 provide better suited AC_CONFIG_MACRO_DIRS for configure.ac +## remove line below when OE toolchain is updated to version which include those +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +SUBDIRS = \ + doc \ + src \ + tests \ + $(NULL) + +BUILT_SOURCES = $(top_srcdir)/.version +EXTRA_DIST = git-version-gen osmoappdesc.py .version + +AM_DISTCHECK_CONFIGURE_FLAGS = \ + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) + + at RELMAKE@ + +$(top_srcdir)/.version: + echo $(VERSION) > $@-t && mv $@-t $@ +dist-hook: + echo $(VERSION) > $(distdir)/.tarball-version diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..dd26f5a --- /dev/null +++ b/configure.ac @@ -0,0 +1,205 @@ +dnl Process this file with autoconf to produce a configure script +AC_INIT([osmo-e1-recorder], + m4_esyscmd([./git-version-gen .tarball-version]), + [openbsc at lists.osmocom.org]) + +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + +AM_INIT_AUTOMAKE([dist-bzip2]) +AC_CONFIG_TESTDIR(tests) + +dnl kernel style compile messages +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +dnl include release helper +RELMAKE='-include osmo-release.mk' +AC_SUBST([RELMAKE]) + +dnl checks for programs +AC_PROG_MAKE_SET +AC_PROG_CC +AC_PROG_INSTALL +LT_INIT + +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + +dnl check for AX_CHECK_COMPILE_FLAG +m4_ifdef([AX_CHECK_COMPILE_FLAG], [], [ + AC_MSG_ERROR([Please install autoconf-archive; re-run 'autoreconf -fi' for it to take effect.]) + ]) + +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.2.0) +PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.2.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.2.0) +PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0) + +dnl checks for header files +AC_HEADER_STDC + +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 + +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: + a) deprecation (allow upstream to mark deprecation without breaking builds); + b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + +# The following test is taken from WebKit's webkit.m4 +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fvisibility=hidden " +AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])], + [ AC_MSG_RESULT([yes]) + SYMBOL_VISIBILITY="-fvisibility=hidden"], + AC_MSG_RESULT([no])) +CFLAGS="$saved_CFLAGS" +AC_SUBST(SYMBOL_VISIBILITY) + +AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) +AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) +AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) +AX_CHECK_COMPILE_FLAG([-Wnull-dereference], [CFLAGS="$CFLAGS -Wnull-dereference"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"]) + +# Coverage build taken from WebKit's configure.in +AC_MSG_CHECKING([whether to enable code coverage support]) +AC_ARG_ENABLE(coverage, + AC_HELP_STRING([--enable-coverage], + [enable code coverage support [default=no]]), + [],[enable_coverage="no"]) +AC_MSG_RESULT([$enable_coverage]) +if test "$enable_coverage" = "yes"; then + COVERAGE_CFLAGS="-ftest-coverage -fprofile-arcs" + COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs" + AC_SUBST([COVERAGE_CFLAGS]) + AC_SUBST([COVERAGE_LDFLAGS]) +fi + +AC_ARG_ENABLE(profile, + [AS_HELP_STRING([--enable-profile], [Compile with profiling support enabled], )], + [profile=$enableval], [profile="no"]) +if test x"$profile" = x"yes" +then + CFLAGS="$CFLAGS -pg" + CPPFLAGS="$CPPFLAGS -pg" +fi + +AC_ARG_ENABLE([external_tests], + AC_HELP_STRING([--enable-external-tests], + [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 + 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.]) + fi +fi +AC_MSG_CHECKING([whether to enable VTY/CTRL tests]) +AC_MSG_RESULT([$enable_ext_tests]) +AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes") + +# Generate manuals +AC_ARG_ENABLE(manuals, + [AS_HELP_STRING( + [--enable-manuals], + [Generate manual PDFs [default=no]], + )], + [osmo_ac_build_manuals=$enableval], [osmo_ac_build_manuals="no"]) +AM_CONDITIONAL([BUILD_MANUALS], [test x"$osmo_ac_build_manuals" = x"yes"]) +AC_ARG_VAR(OSMO_GSM_MANUALS_DIR, [path to common osmo-gsm-manuals files, overriding pkg-config and "../osmo-gsm-manuals" + fallback]) +if test x"$osmo_ac_build_manuals" = x"yes" +then + # Find OSMO_GSM_MANUALS_DIR (env, pkg-conf, fallback) + if test -n "$OSMO_GSM_MANUALS_DIR"; then + echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from env)" + else + OSMO_GSM_MANUALS_DIR="$($PKG_CONFIG osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null)" + if test -n "$OSMO_GSM_MANUALS_DIR"; then + echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from pkg-conf)" + else + OSMO_GSM_MANUALS_DIR="../osmo-gsm-manuals" + echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (fallback)" + fi + fi + if ! test -d "$OSMO_GSM_MANUALS_DIR"; then + AC_MSG_ERROR("OSMO_GSM_MANUALS_DIR does not exist! Install osmo-gsm-manuals or set OSMO_GSM_MANUALS_DIR.") + fi + + # Find and run check-depends + CHECK_DEPENDS="$OSMO_GSM_MANUALS_DIR/check-depends.sh" + if ! test -x "$CHECK_DEPENDS"; then + CHECK_DEPENDS="osmo-gsm-manuals-check-depends" + fi + if ! $CHECK_DEPENDS; then + AC_MSG_ERROR("missing dependencies for --enable-manuals") + fi + + # Put in Makefile with absolute path + OSMO_GSM_MANUALS_DIR="$(realpath "$OSMO_GSM_MANUALS_DIR")" + AC_SUBST([OSMO_GSM_MANUALS_DIR]) +fi + +# https://www.freedesktop.org/software/systemd/man/daemon.html +AC_ARG_WITH([systemdsystemunitdir], + [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],, + [with_systemdsystemunitdir=auto]) +AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [ + def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) + + AS_IF([test "x$def_systemdsystemunitdir" = "x"], + [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"], + [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])]) + with_systemdsystemunitdir=no], + [with_systemdsystemunitdir="$def_systemdsystemunitdir"])]) +AS_IF([test "x$with_systemdsystemunitdir" != "xno"], + [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])]) +AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"]) + +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + +dnl Generate the output +AM_CONFIG_HEADER(config.h) + +AC_OUTPUT( + src/Makefile + doc/Makefile + tests/Makefile + doc/examples/Makefile + Makefile) diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..5a23107 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = \ + examples \ + $(NULL) diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am new file mode 100644 index 0000000..35dd524 --- /dev/null +++ b/doc/examples/Makefile.am @@ -0,0 +1,30 @@ +OSMOCONF_FILES = \ + osmo-e1-recorder.cfg + +osmoconfdir = $(sysconfdir)/osmocom +osmoconf_DATA = $(OSMOCONF_FILES) + +EXTRA_DIST = $(OSMOCONF_FILES) + +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)/examples/$$f" && \ + mkdir -p "$$(dirname $$j)" && \ + $(INSTALL_DATA) $(srcdir)/$$f $$j; \ + done + +uninstall-hook: + @$(PRE_UNINSTALL) + for f in $$($(CFG_FILES)); do \ + j="$(DESTDIR)$(docdir)/examples/$$f" && \ + $(RM) $$j; \ + done diff --git a/doc/examples/osmo-e1-recorder.cfg b/doc/examples/osmo-e1-recorder.cfg new file mode 100644 index 0000000..b1db2ce --- /dev/null +++ b/doc/examples/osmo-e1-recorder.cfg @@ -0,0 +1,65 @@ +! +! osmo-e1-recorder (0) configuration saved from vty +!! +! +line vty + no login +! +e1_input + e1_line 0 driver dahdi + e1_line 0 port 0 + no e1_line 0 keepalive + e1_line 1 driver dahdi + e1_line 1 port 1 + no e1_line 1 keepalive +recorder + file-size-mb 1024 + storage-path /space + line 0 mirror 1 + line 0 ts 1 mode raw + line 0 ts 2 mode raw + line 0 ts 3 mode raw + line 0 ts 4 mode raw + line 0 ts 5 mode raw + line 0 ts 6 mode raw + line 0 ts 7 mode raw + line 0 ts 8 mode raw + line 0 ts 9 mode raw + line 0 ts 10 mode raw + line 0 ts 11 mode raw + line 0 ts 12 mode raw + line 0 ts 13 mode raw + line 0 ts 14 mode raw + line 0 ts 15 mode raw + line 0 ts 16 mode raw + line 0 ts 17 mode raw + line 0 ts 18 mode raw + line 0 ts 19 mode raw + line 0 ts 20 mode raw + line 0 ts 21 mode raw + line 0 ts 22 mode raw + line 0 ts 23 mode raw + line 1 mirror 0 + line 1 ts 1 mode raw + line 1 ts 2 mode raw + line 1 ts 3 mode raw + line 1 ts 4 mode raw + line 1 ts 5 mode raw + line 1 ts 6 mode raw + line 1 ts 7 mode raw + line 1 ts 8 mode raw + line 1 ts 9 mode raw + line 1 ts 10 mode raw + line 1 ts 11 mode raw + line 1 ts 12 mode raw + line 1 ts 13 mode raw + line 1 ts 14 mode raw + line 1 ts 15 mode raw + line 1 ts 16 mode raw + line 1 ts 17 mode raw + line 1 ts 18 mode raw + line 1 ts 19 mode raw + line 1 ts 20 mode raw + line 1 ts 21 mode raw + line 1 ts 22 mode raw + line 1 ts 23 mode raw diff --git a/git-version-gen b/git-version-gen new file mode 100755 index 0000000..42cf3d2 --- /dev/null +++ b/git-version-gen @@ -0,0 +1,151 @@ +#!/bin/sh +# Print a version string. +scriptversion=2010-01-28.01 + +# Copyright (C) 2007-2010 Free Software Foundation, Inc. +# +# This program is free software: you can 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 . + +# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. +# It may be run two ways: +# - from a git repository in which the "git describe" command below +# produces useful output (thus requiring at least one signed tag) +# - from a non-git-repo directory containing a .tarball-version file, which +# presumes this script is invoked like "./git-version-gen .tarball-version". + +# In order to use intra-version strings in your project, you will need two +# separate generated version string files: +# +# .tarball-version - present only in a distribution tarball, and not in +# a checked-out repository. Created with contents that were learned at +# the last time autoconf was run, and used by git-version-gen. Must not +# be present in either $(srcdir) or $(builddir) for git-version-gen to +# give accurate answers during normal development with a checked out tree, +# but must be present in a tarball when there is no version control system. +# Therefore, it cannot be used in any dependencies. GNUmakefile has +# hooks to force a reconfigure at distribution time to get the value +# correct, without penalizing normal development with extra reconfigures. +# +# .version - present in a checked-out repository and in a distribution +# tarball. Usable in dependencies, particularly for files that don't +# want to depend on config.h but do want to track version changes. +# Delete this file prior to any autoconf run where you want to rebuild +# files to pick up a version string change; and leave it stale to +# minimize rebuild time after unrelated changes to configure sources. +# +# It is probably wise to add these two files to .gitignore, so that you +# don't accidentally commit either generated file. +# +# Use the following line in your configure.ac, so that $(VERSION) will +# automatically be up-to-date each time configure is run (and note that +# since configure.ac no longer includes a version string, Makefile rules +# should not depend on configure.ac for version updates). +# +# AC_INIT([GNU project], +# m4_esyscmd([build-aux/git-version-gen .tarball-version]), +# [bug-project at example]) +# +# Then use the following lines in your Makefile.am, so that .version +# will be present for dependencies, and so that .tarball-version will +# exist in distribution tarballs. +# +# BUILT_SOURCES = $(top_srcdir)/.version +# $(top_srcdir)/.version: +# echo $(VERSION) > $@-t && mv $@-t $@ +# dist-hook: +# echo $(VERSION) > $(distdir)/.tarball-version + +case $# in + 1) ;; + *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version"; exit 1;; +esac + +tarball_version_file=$1 +nl=' +' + +# First see if there is a tarball-only version file. +# then try "git describe", then default. +if test -f $tarball_version_file +then + v=`cat $tarball_version_file` || exit 1 + case $v in + *$nl*) v= ;; # reject multi-line output + [0-9]*) ;; + *) v= ;; + esac + test -z "$v" \ + && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2 +fi + +if test -n "$v" +then + : # use $v +elif + v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \ + || git describe --abbrev=4 HEAD 2>/dev/null` \ + && case $v in + [0-9]*) ;; + v[0-9]*) ;; + *) (exit 1) ;; + esac +then + # Is this a new git that lists number of commits since the last + # tag or the previous older version that did not? + # Newer: v6.10-77-g0f8faeb + # Older: v6.10-g0f8faeb + case $v in + *-*-*) : git describe is okay three part flavor ;; + *-*) + : git describe is older two part flavor + # Recreate the number of commits and rewrite such that the + # result is the same as if we were using the newer version + # of git describe. + vtag=`echo "$v" | sed 's/-.*//'` + numcommits=`git rev-list "$vtag"..HEAD | wc -l` + v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; + ;; + esac + + # Change the first '-' to a '.', so version-comparing tools work properly. + # Remove the "g" in git describe's output string, to save a byte. + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; +else + v=UNKNOWN +fi + +v=`echo "$v" |sed 's/^v//'` + +# Don't declare a version "dirty" merely because a time stamp has changed. +git status > /dev/null 2>&1 + +dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= +case "$dirty" in + '') ;; + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; + *) v="$v-dirty" ;; + esac ;; +esac + +# Omit the trailing newline, so that m4_esyscmd can use the result directly. +echo "$v" | tr -d '\012' + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/osmoappdesc.py b/osmoappdesc.py new file mode 100644 index 0000000..485a83b --- /dev/null +++ b/osmoappdesc.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +app_configs = { + "osmo-e1-recorder": ["doc/examples/osmo-e1-recorder.cfg"] +} + +apps = [(4444, "src/osmo-e1-recorder", "osmo-e1-recorder", "osmo-e1-recorder") + ] + +vty_command = ["./src/osmo-e1-recorder", "-c", + "doc/examples/osmo-e1-recorder.cfg"] + +vty_app = apps[0] diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 25c00d6..0000000 --- a/src/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -CFLAGS=-g -Wall -LDFLAGS=-losmocore -losmogsm -losmovty -losmoabis -ltalloc - -all: osmo-e1-recorder osmo-e1cap-dump hdlc-test - -osmo-e1-recorder: e1_recorder.o storage.o vty.o - $(CC) $(LDFLAGS) -o$@ $^ - -osmo-e1cap-dump: e1cap_dump.o storage.o flip_bits.o hdlc.o - $(CC) $(LDFLAGS) -o$@ $^ - -hdlc-test: hdlc.o hdlc-test.o - $(CC) $(LDFLAGS) -o$@ $^ - -%.o: %.c - $(CC) $(CFLAGS) -o $@ -c $^ - -clean: - @rm *.o osmo-e1-recorder osmo-e1cap-dump diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..8d348e6 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,55 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_builddir) \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOVTY_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(NULL) + +AM_LDFLAGS = \ + $(COVERAGE_LDFLAGS) \ + $(NULL) + +LDADD = \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOVTY_LIBS) \ + $(COVERAGE_LDFLAGS) \ + $(LIBOSMOABIS_LIBS) \ + $(NULL) + +noinst_HEADERS = \ + flip_bits.h \ + hdlc.h \ + recorder.h \ + storage.h + +bin_PROGRAMS = \ + osmo-e1-recorder \ + osmo-e1cap-dump \ + hdlc-test \ + $(NULL) + +osmo_e1_recorder_SOURCES = \ + e1_recorder.c \ + storage.c \ + vty.c \ + $(NULL) + +osmo_e1cap_dump_SOURCES = \ + e1cap_dump.c \ + storage.c \ + flip_bits.c \ + hdlc.c \ + $(NULL) + +hdlc_test_SOURCES = \ + hdlc-test.c \ + hdlc.c \ + $(NULL) diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..970df87 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,28 @@ +DISTCLEANFILES = \ + atconfig \ + $(NULL) + +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 +else +python-tests: $(BUILT_SOURCES) + echo "Not running python-based tests (determined at configure-time)" +endif + +# 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 osmo-e1-recorder -p 4444 \ + -r "$(top_builddir)/src/osmo-e1-recorder -c $(top_srcdir)/doc/examples/osmo-e1-recorder.cfg" \ + $(U) $(srcdir)/*.vty + +check-local: + $(MAKE) $(AM_MAKEFLAGS) python-tests -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I705b5356309507c39eaf517ca5b9ce0e1aa89852 Gerrit-Change-Number: 16182 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:06:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:06:41 +0000 Subject: Change in osmo-e1-recorder[master]: update .gitignore References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16183 ) Change subject: update .gitignore ...................................................................... update .gitignore Change-Id: Id9adf8d444013272a461bd5f4dbe64a5d0b373b4 --- M .gitignore 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/83/16183/1 diff --git a/.gitignore b/.gitignore index 31ef3a6..12ed619 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,27 @@ *.o *.swp *.cfg* +*.out +*.e1cap +*.pcap src/osmo-e1-recorder src/osmo-e1cap-dump +src/hdlc-test +Makefile.in +Makefile + +.version +.tarball-version +aclocal.m4 +autom4te.cache +compile +config.* +configure +depcomp +install-sh +libtool +ltmain.sh +missing +m4 +.deps +stamp-h1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: Id9adf8d444013272a461bd5f4dbe64a5d0b373b4 Gerrit-Change-Number: 16183 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:06:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:06:42 +0000 Subject: Change in osmo-e1-recorder[master]: add contrib/jenkins.sh References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16184 ) Change subject: add contrib/jenkins.sh ...................................................................... add contrib/jenkins.sh Change-Id: I79d9e12ef723841db186cd122da4dadb3f7d3969 --- A contrib/jenkins.sh 1 file changed, 67 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/84/16184/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..38bd1a9 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# jenkins build helper script for openbsc. This is how we build on jenkins.osmocom.org +# +# environment variables: +# * WITH_MANUALS: build manual PDFs if set to "1" +# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1") +# + +if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then + echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" + exit 2 +fi + + +set -ex + +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst + +osmo-clean-workspace.sh + +mkdir "$deps" || true + +osmo-build-dep.sh libosmocore "" '--disable-doxygen --enable-gnutls' + +verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") + +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" +export PATH="$inst/bin:$PATH" + +osmo-build-dep.sh libosmo-abis + +# Additional configure options and depends +CONFIG="" +if [ "$WITH_MANUALS" = "1" ]; then + osmo-build-dep.sh osmo-gsm-manuals + CONFIG="--enable-manuals" +fi + +set +x +echo +echo +echo +echo " =============================== osmo-e1-recorder ===============================" +echo +set -x + +cd "$base" +autoreconf --install --force +./configure --enable-sanitize --enable-external-tests --enable-werror $CONFIG +$MAKE $PARALLEL_MAKE +LD_LIBRARY_PATH="$inst/lib" $MAKE check \ + || cat-testlogs.sh +LD_LIBRARY_PATH="$inst/lib" \ + DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests --enable-werror $CONFIG" \ + $MAKE distcheck \ + || cat-testlogs.sh + +if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then + make -C "$base/doc/manuals" publish +fi + +$MAKE maintainer-clean +osmo-clean-workspace.sh -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I79d9e12ef723841db186cd122da4dadb3f7d3969 Gerrit-Change-Number: 16184 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:06:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:06:42 +0000 Subject: Change in osmo-e1-recorder[master]: e1_recorder: Skip storing data to disk if line is in ALARM state References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16185 ) Change subject: e1_recorder: Skip storing data to disk if line is in ALARM state ...................................................................... e1_recorder: Skip storing data to disk if line is in ALARM state Change-Id: Ie4c671053d372bc700f506198d1916853da03b9e --- M src/e1_recorder.c M src/recorder.h 2 files changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/85/16185/1 diff --git a/src/e1_recorder.c b/src/e1_recorder.c index 9110ccb..4887c3d 100644 --- a/src/e1_recorder.c +++ b/src/e1_recorder.c @@ -28,6 +28,29 @@ } } +static int sig_inp_cbfn(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) +{ + struct input_signal_data *isd = signal_data; + struct e1_recorder_line *rline; + + OSMO_ASSERT(subsys == SS_L_INPUT); + OSMO_ASSERT(isd->line && isd->line->num < ARRAY_SIZE(g_recorder.line)); + + switch (signal) { + case S_L_INP_LINE_ALARM: + LOGP(DMAIN, LOGL_NOTICE, "Line %u: ALARM\n", isd->line->num); + rline = &g_recorder.line[isd->line->num]; + rline->has_alarm = true; + break; + case S_L_INP_LINE_NOALARM: + LOGP(DMAIN, LOGL_NOTICE, "Line %u: NOALARM\n", isd->line->num); + rline = &g_recorder.line[isd->line->num]; + rline->has_alarm = false; + break; + } + return 0; +} + /* receive a raw message frome the E1 timeslot */ void e1ts_raw_recv(struct e1inp_ts *ts, struct msgb *msg) { @@ -35,6 +58,11 @@ enum osmo_e1cap_capture_mode cap_mode = ts2cap_mode(ts); int rc; + if (rline->has_alarm) { + DEBUGP(DMAIN, "Skipping storage as line %u is in ALARM\n", ts->line->num); + return; + } + /* FIXME: special processing of TFP and PGSL */ rc = e1frame_store(ts, msg, cap_mode); @@ -144,6 +172,8 @@ handle_options(argc, argv); + osmo_signal_register_handler(SS_L_INPUT, sig_inp_cbfn, NULL); + rc = vty_read_config_file(g_config_file, NULL); if (rc < 0) exit(1); diff --git a/src/recorder.h b/src/recorder.h index 12bc993..458fb1d 100644 --- a/src/recorder.h +++ b/src/recorder.h @@ -17,6 +17,7 @@ }; struct e1_recorder_line { + bool has_alarm; struct { bool enabled; uint8_t line_nr; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: Ie4c671053d372bc700f506198d1916853da03b9e Gerrit-Change-Number: 16185 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:06:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:06:42 +0000 Subject: Change in osmo-e1-recorder[master]: fix recording of timestamp and make e1cap format portable References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16186 ) Change subject: fix recording of timestamp and make e1cap format portable ...................................................................... fix recording of timestamp and make e1cap format portable The original format included a 'struct timeval' into the packet header, which unfortunately is non-potrable between e.g. i386 and amd64. Furthermore, the code acutally writing the timveal into the header was broken, resulting in invalid timestamps in all e1cap taken so far. Change-Id: I0d22ad8f772d173c2252c2f6c562faee2e578806 --- M src/e1cap_dump.c M src/storage.c M src/storage.h 3 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/86/16186/1 diff --git a/src/e1cap_dump.c b/src/e1cap_dump.c index 232769c..027aa82 100644 --- a/src/e1cap_dump.c +++ b/src/e1cap_dump.c @@ -174,7 +174,8 @@ switch (g_mode) { case MODE_PRINT: - tv = pkt->ts; + tv.tv_sec = pkt->ts.tv_sec; + tv.tv_usec = pkt->ts.tv_usec; printf("%s %02u/%02u %u (%u): %s\n", timeval2str(&tv), pkt->line_nr, pkt->ts_nr, pkt->capture_mode, diff --git a/src/storage.c b/src/storage.c index ddbadd0..a084535 100644 --- a/src/storage.c +++ b/src/storage.c @@ -79,8 +79,9 @@ }; h->len = htonl(msg->len); - tv = h->ts; gettimeofday(&tv, NULL); + h->ts.tv_sec = tv.tv_sec; + h->ts.tv_usec = tv.tv_usec; h->line_nr = ts->line->num; h->ts_nr = ts->num; h->capture_mode = mode; diff --git a/src/storage.h b/src/storage.h index c7c1890..0ea9937 100644 --- a/src/storage.h +++ b/src/storage.h @@ -11,7 +11,10 @@ /* header for each frame we store */ struct osmo_e1cap_pkthdr { /* Timestamp at which frame was received */ - struct timeval ts; + struct { + uint32_t tv_sec; + uint32_t tv_usec; + } ts; /* length of frame data after this header */ uint32_t len; /* line/span number on which frame was received */ -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I0d22ad8f772d173c2252c2f6c562faee2e578806 Gerrit-Change-Number: 16186 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:13:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:13:15 +0000 Subject: Change in osmo-e1-recorder[master]: storage.c: Fix compiler error due to missing writev() declaration In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16180 ) Change subject: storage.c: Fix compiler error due to missing writev() declaration ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16180 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: If98737199f5a6e8fb37a4fd6403ee973dcf70612 Gerrit-Change-Number: 16180 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 24 Nov 2019 17:13:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:17:36 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:17:36 +0000 Subject: Change in osmo-e1-recorder[master]: convert build system to autotools In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16182 ) Change subject: convert build system to autotools ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I705b5356309507c39eaf517ca5b9ce0e1aa89852 Gerrit-Change-Number: 16182 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 24 Nov 2019 17:17:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:17:43 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:17:43 +0000 Subject: Change in osmo-e1-recorder[master]: update .gitignore In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16183 ) Change subject: update .gitignore ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: Id9adf8d444013272a461bd5f4dbe64a5d0b373b4 Gerrit-Change-Number: 16183 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 24 Nov 2019 17:17:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:17:50 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:17:50 +0000 Subject: Change in osmo-e1-recorder[master]: add contrib/jenkins.sh In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16184 ) Change subject: add contrib/jenkins.sh ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I79d9e12ef723841db186cd122da4dadb3f7d3969 Gerrit-Change-Number: 16184 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 24 Nov 2019 17:17:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:22:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:22:29 +0000 Subject: Change in osmo-e1-recorder[master]: make e1cap format portable In-Reply-To: References: Message-ID: laforge has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16186 ) Change subject: make e1cap format portable ...................................................................... make e1cap format portable The original format included a 'struct timeval' into the packet header, which unfortunately is non-potrable between e.g. i386 and amd64. Change-Id: I0d22ad8f772d173c2252c2f6c562faee2e578806 --- M src/e1cap_dump.c M src/storage.h 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/86/16186/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I0d22ad8f772d173c2252c2f6c562faee2e578806 Gerrit-Change-Number: 16186 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:43:36 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:43:36 +0000 Subject: Change in osmo-e1-recorder[master]: add contrib/jenkins.sh In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16184 ) Change subject: add contrib/jenkins.sh ...................................................................... Patch Set 3: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I79d9e12ef723841db186cd122da4dadb3f7d3969 Gerrit-Change-Number: 16184 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 24 Nov 2019 17:43:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:43:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:43:40 +0000 Subject: Change in osmo-e1-recorder[master]: update .gitignore In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16183 ) Change subject: update .gitignore ...................................................................... Patch Set 3: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: Id9adf8d444013272a461bd5f4dbe64a5d0b373b4 Gerrit-Change-Number: 16183 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 24 Nov 2019 17:43:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:43:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:43:44 +0000 Subject: Change in osmo-e1-recorder[master]: convert build system to autotools In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16182 ) Change subject: convert build system to autotools ...................................................................... Patch Set 3: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I705b5356309507c39eaf517ca5b9ce0e1aa89852 Gerrit-Change-Number: 16182 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 24 Nov 2019 17:43:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:43:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:43:51 +0000 Subject: Change in osmo-e1-recorder[master]: storage.c: Fix compiler error due to missing writev() declaration In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16180 ) Change subject: storage.c: Fix compiler error due to missing writev() declaration ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16180 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: If98737199f5a6e8fb37a4fd6403ee973dcf70612 Gerrit-Change-Number: 16180 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 24 Nov 2019 17:43:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:44:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:44:03 +0000 Subject: Change in osmo-e1-recorder[master]: fix various compiler warnings In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16181 ) Change subject: fix various compiler warnings ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16181 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I65a862132563f578eff11b8d085960b820f5d4b7 Gerrit-Change-Number: 16181 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 24 Nov 2019 17:44:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:44:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:44:07 +0000 Subject: Change in osmo-e1-recorder[master]: storage.c: Fix compiler error due to missing writev() declaration In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16180 ) Change subject: storage.c: Fix compiler error due to missing writev() declaration ...................................................................... storage.c: Fix compiler error due to missing writev() declaration storage.c:90:7: error: implicit declaration of function ?writev?; did you mean ?write?? [-Werror=implicit-function-declaration] 90 | rc = writev(g_out_fd, iov, ARRAY_SIZE(iov)); | ^~~~~~ | write Change-Id: If98737199f5a6e8fb37a4fd6403ee973dcf70612 --- M src/storage.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/src/storage.c b/src/storage.c index 0a926e4..bcb50a2 100644 --- a/src/storage.c +++ b/src/storage.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16180 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: If98737199f5a6e8fb37a4fd6403ee973dcf70612 Gerrit-Change-Number: 16180 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:44:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:44:07 +0000 Subject: Change in osmo-e1-recorder[master]: fix various compiler warnings In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16181 ) Change subject: fix various compiler warnings ...................................................................... fix various compiler warnings Change-Id: I65a862132563f578eff11b8d085960b820f5d4b7 --- M src/e1cap_dump.c M src/hdlc-test.c M src/storage.c 3 files changed, 13 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/src/e1cap_dump.c b/src/e1cap_dump.c index 1986041..027aa82 100644 --- a/src/e1cap_dump.c +++ b/src/e1cap_dump.c @@ -53,7 +53,7 @@ time_t nowtime; struct tm *nowtm; char tmbuf[64]; - static char buf[64]; + static char buf[64+20]; nowtime = tv->tv_sec; nowtm = localtime(&nowtime); @@ -62,6 +62,7 @@ return buf; } +#if 0 static int all_bytes_are(unsigned char ch, const uint8_t *data, int len) { int i; @@ -72,6 +73,7 @@ } return 1; } +#endif static void handle_hdlc_frame_content(const uint8_t *data, unsigned int len, void *priv) @@ -151,6 +153,8 @@ static void handle_data(struct osmo_e1cap_pkthdr *pkt, uint8_t *data, int len) { + struct timeval tv; + flip_buf_bits(data, len); #if 0 /* filter out all-ff/all-fe/all-7f */ @@ -170,8 +174,10 @@ switch (g_mode) { case MODE_PRINT: + tv.tv_sec = pkt->ts.tv_sec; + tv.tv_usec = pkt->ts.tv_usec; printf("%s %02u/%02u %u (%u): %s\n", - timeval2str(&pkt->ts), + timeval2str(&tv), pkt->line_nr, pkt->ts_nr, pkt->capture_mode, pkt->len, osmo_hexdump_nospc(data, len)); diff --git a/src/hdlc-test.c b/src/hdlc-test.c index 1c7c6ef..0814ca0 100644 --- a/src/hdlc-test.c +++ b/src/hdlc-test.c @@ -12,12 +12,11 @@ int string_len = strlen(hex); int byte_len = string_len/2; int bit_len = byte_len*8; - int rc; printf("hex string = %s\n", hex); bytes = alloca(byte_len); bits = alloca(bit_len); - rc = osmo_hexparse(hex, bytes, byte_len); + osmo_hexparse(hex, bytes, byte_len); printf("parsed bytes = %s\n", osmo_hexdump(bytes, byte_len)); printf("MSB mode\n"); diff --git a/src/storage.c b/src/storage.c index bcb50a2..a084535 100644 --- a/src/storage.c +++ b/src/storage.c @@ -66,6 +66,7 @@ int e1frame_store(struct e1inp_ts *ts, struct msgb *msg, enum osmo_e1cap_capture_mode mode) { struct osmo_e1cap_pkthdr _h, *h = &_h; + struct timeval tv; int rc; struct iovec iov[2] = { { @@ -78,7 +79,9 @@ }; h->len = htonl(msg->len); - gettimeofday(&h->ts, NULL); + gettimeofday(&tv, NULL); + h->ts.tv_sec = tv.tv_sec; + h->ts.tv_usec = tv.tv_usec; h->line_nr = ts->line->num; h->ts_nr = ts->num; h->capture_mode = mode; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16181 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I65a862132563f578eff11b8d085960b820f5d4b7 Gerrit-Change-Number: 16181 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:44:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:44:08 +0000 Subject: Change in osmo-e1-recorder[master]: convert build system to autotools In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16182 ) Change subject: convert build system to autotools ...................................................................... convert build system to autotools Change-Id: I705b5356309507c39eaf517ca5b9ce0e1aa89852 --- A Makefile.am A configure.ac A doc/Makefile.am A doc/examples/Makefile.am A doc/examples/osmo-e1-recorder.cfg A git-version-gen A osmoappdesc.py D src/Makefile A src/Makefile.am A tests/Makefile.am 10 files changed, 578 insertions(+), 19 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..24f0b24 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,28 @@ +AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6 + +## FIXME: automake >= 1.13 or autoconf >= 2.70 provide better suited AC_CONFIG_MACRO_DIRS for configure.ac +## remove line below when OE toolchain is updated to version which include those +ACLOCAL_AMFLAGS = -I m4 +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +SUBDIRS = \ + doc \ + src \ + tests \ + $(NULL) + +BUILT_SOURCES = $(top_srcdir)/.version +EXTRA_DIST = git-version-gen osmoappdesc.py .version + +AM_DISTCHECK_CONFIGURE_FLAGS = \ + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) + + at RELMAKE@ + +$(top_srcdir)/.version: + echo $(VERSION) > $@-t && mv $@-t $@ +dist-hook: + echo $(VERSION) > $(distdir)/.tarball-version diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..dd26f5a --- /dev/null +++ b/configure.ac @@ -0,0 +1,205 @@ +dnl Process this file with autoconf to produce a configure script +AC_INIT([osmo-e1-recorder], + m4_esyscmd([./git-version-gen .tarball-version]), + [openbsc at lists.osmocom.org]) + +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + +AM_INIT_AUTOMAKE([dist-bzip2]) +AC_CONFIG_TESTDIR(tests) + +dnl kernel style compile messages +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +dnl include release helper +RELMAKE='-include osmo-release.mk' +AC_SUBST([RELMAKE]) + +dnl checks for programs +AC_PROG_MAKE_SET +AC_PROG_CC +AC_PROG_INSTALL +LT_INIT + +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + +dnl check for AX_CHECK_COMPILE_FLAG +m4_ifdef([AX_CHECK_COMPILE_FLAG], [], [ + AC_MSG_ERROR([Please install autoconf-archive; re-run 'autoreconf -fi' for it to take effect.]) + ]) + +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.2.0) +PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.2.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.2.0) +PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0) + +dnl checks for header files +AC_HEADER_STDC + +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 + +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: + a) deprecation (allow upstream to mark deprecation without breaking builds); + b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + +# The following test is taken from WebKit's webkit.m4 +saved_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fvisibility=hidden " +AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])], + [ AC_MSG_RESULT([yes]) + SYMBOL_VISIBILITY="-fvisibility=hidden"], + AC_MSG_RESULT([no])) +CFLAGS="$saved_CFLAGS" +AC_SUBST(SYMBOL_VISIBILITY) + +AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"]) +AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"]) +AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"]) +AX_CHECK_COMPILE_FLAG([-Wnull-dereference], [CFLAGS="$CFLAGS -Wnull-dereference"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"]) +AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"]) + +# Coverage build taken from WebKit's configure.in +AC_MSG_CHECKING([whether to enable code coverage support]) +AC_ARG_ENABLE(coverage, + AC_HELP_STRING([--enable-coverage], + [enable code coverage support [default=no]]), + [],[enable_coverage="no"]) +AC_MSG_RESULT([$enable_coverage]) +if test "$enable_coverage" = "yes"; then + COVERAGE_CFLAGS="-ftest-coverage -fprofile-arcs" + COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs" + AC_SUBST([COVERAGE_CFLAGS]) + AC_SUBST([COVERAGE_LDFLAGS]) +fi + +AC_ARG_ENABLE(profile, + [AS_HELP_STRING([--enable-profile], [Compile with profiling support enabled], )], + [profile=$enableval], [profile="no"]) +if test x"$profile" = x"yes" +then + CFLAGS="$CFLAGS -pg" + CPPFLAGS="$CPPFLAGS -pg" +fi + +AC_ARG_ENABLE([external_tests], + AC_HELP_STRING([--enable-external-tests], + [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 + 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.]) + fi +fi +AC_MSG_CHECKING([whether to enable VTY/CTRL tests]) +AC_MSG_RESULT([$enable_ext_tests]) +AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes") + +# Generate manuals +AC_ARG_ENABLE(manuals, + [AS_HELP_STRING( + [--enable-manuals], + [Generate manual PDFs [default=no]], + )], + [osmo_ac_build_manuals=$enableval], [osmo_ac_build_manuals="no"]) +AM_CONDITIONAL([BUILD_MANUALS], [test x"$osmo_ac_build_manuals" = x"yes"]) +AC_ARG_VAR(OSMO_GSM_MANUALS_DIR, [path to common osmo-gsm-manuals files, overriding pkg-config and "../osmo-gsm-manuals" + fallback]) +if test x"$osmo_ac_build_manuals" = x"yes" +then + # Find OSMO_GSM_MANUALS_DIR (env, pkg-conf, fallback) + if test -n "$OSMO_GSM_MANUALS_DIR"; then + echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from env)" + else + OSMO_GSM_MANUALS_DIR="$($PKG_CONFIG osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null)" + if test -n "$OSMO_GSM_MANUALS_DIR"; then + echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from pkg-conf)" + else + OSMO_GSM_MANUALS_DIR="../osmo-gsm-manuals" + echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (fallback)" + fi + fi + if ! test -d "$OSMO_GSM_MANUALS_DIR"; then + AC_MSG_ERROR("OSMO_GSM_MANUALS_DIR does not exist! Install osmo-gsm-manuals or set OSMO_GSM_MANUALS_DIR.") + fi + + # Find and run check-depends + CHECK_DEPENDS="$OSMO_GSM_MANUALS_DIR/check-depends.sh" + if ! test -x "$CHECK_DEPENDS"; then + CHECK_DEPENDS="osmo-gsm-manuals-check-depends" + fi + if ! $CHECK_DEPENDS; then + AC_MSG_ERROR("missing dependencies for --enable-manuals") + fi + + # Put in Makefile with absolute path + OSMO_GSM_MANUALS_DIR="$(realpath "$OSMO_GSM_MANUALS_DIR")" + AC_SUBST([OSMO_GSM_MANUALS_DIR]) +fi + +# https://www.freedesktop.org/software/systemd/man/daemon.html +AC_ARG_WITH([systemdsystemunitdir], + [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],, + [with_systemdsystemunitdir=auto]) +AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [ + def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) + + AS_IF([test "x$def_systemdsystemunitdir" = "x"], + [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"], + [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])]) + with_systemdsystemunitdir=no], + [with_systemdsystemunitdir="$def_systemdsystemunitdir"])]) +AS_IF([test "x$with_systemdsystemunitdir" != "xno"], + [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])]) +AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"]) + +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + +dnl Generate the output +AM_CONFIG_HEADER(config.h) + +AC_OUTPUT( + src/Makefile + doc/Makefile + tests/Makefile + doc/examples/Makefile + Makefile) diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..5a23107 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = \ + examples \ + $(NULL) diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am new file mode 100644 index 0000000..35dd524 --- /dev/null +++ b/doc/examples/Makefile.am @@ -0,0 +1,30 @@ +OSMOCONF_FILES = \ + osmo-e1-recorder.cfg + +osmoconfdir = $(sysconfdir)/osmocom +osmoconf_DATA = $(OSMOCONF_FILES) + +EXTRA_DIST = $(OSMOCONF_FILES) + +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)/examples/$$f" && \ + mkdir -p "$$(dirname $$j)" && \ + $(INSTALL_DATA) $(srcdir)/$$f $$j; \ + done + +uninstall-hook: + @$(PRE_UNINSTALL) + for f in $$($(CFG_FILES)); do \ + j="$(DESTDIR)$(docdir)/examples/$$f" && \ + $(RM) $$j; \ + done diff --git a/doc/examples/osmo-e1-recorder.cfg b/doc/examples/osmo-e1-recorder.cfg new file mode 100644 index 0000000..b1db2ce --- /dev/null +++ b/doc/examples/osmo-e1-recorder.cfg @@ -0,0 +1,65 @@ +! +! osmo-e1-recorder (0) configuration saved from vty +!! +! +line vty + no login +! +e1_input + e1_line 0 driver dahdi + e1_line 0 port 0 + no e1_line 0 keepalive + e1_line 1 driver dahdi + e1_line 1 port 1 + no e1_line 1 keepalive +recorder + file-size-mb 1024 + storage-path /space + line 0 mirror 1 + line 0 ts 1 mode raw + line 0 ts 2 mode raw + line 0 ts 3 mode raw + line 0 ts 4 mode raw + line 0 ts 5 mode raw + line 0 ts 6 mode raw + line 0 ts 7 mode raw + line 0 ts 8 mode raw + line 0 ts 9 mode raw + line 0 ts 10 mode raw + line 0 ts 11 mode raw + line 0 ts 12 mode raw + line 0 ts 13 mode raw + line 0 ts 14 mode raw + line 0 ts 15 mode raw + line 0 ts 16 mode raw + line 0 ts 17 mode raw + line 0 ts 18 mode raw + line 0 ts 19 mode raw + line 0 ts 20 mode raw + line 0 ts 21 mode raw + line 0 ts 22 mode raw + line 0 ts 23 mode raw + line 1 mirror 0 + line 1 ts 1 mode raw + line 1 ts 2 mode raw + line 1 ts 3 mode raw + line 1 ts 4 mode raw + line 1 ts 5 mode raw + line 1 ts 6 mode raw + line 1 ts 7 mode raw + line 1 ts 8 mode raw + line 1 ts 9 mode raw + line 1 ts 10 mode raw + line 1 ts 11 mode raw + line 1 ts 12 mode raw + line 1 ts 13 mode raw + line 1 ts 14 mode raw + line 1 ts 15 mode raw + line 1 ts 16 mode raw + line 1 ts 17 mode raw + line 1 ts 18 mode raw + line 1 ts 19 mode raw + line 1 ts 20 mode raw + line 1 ts 21 mode raw + line 1 ts 22 mode raw + line 1 ts 23 mode raw diff --git a/git-version-gen b/git-version-gen new file mode 100755 index 0000000..42cf3d2 --- /dev/null +++ b/git-version-gen @@ -0,0 +1,151 @@ +#!/bin/sh +# Print a version string. +scriptversion=2010-01-28.01 + +# Copyright (C) 2007-2010 Free Software Foundation, Inc. +# +# This program is free software: you can 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 . + +# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. +# It may be run two ways: +# - from a git repository in which the "git describe" command below +# produces useful output (thus requiring at least one signed tag) +# - from a non-git-repo directory containing a .tarball-version file, which +# presumes this script is invoked like "./git-version-gen .tarball-version". + +# In order to use intra-version strings in your project, you will need two +# separate generated version string files: +# +# .tarball-version - present only in a distribution tarball, and not in +# a checked-out repository. Created with contents that were learned at +# the last time autoconf was run, and used by git-version-gen. Must not +# be present in either $(srcdir) or $(builddir) for git-version-gen to +# give accurate answers during normal development with a checked out tree, +# but must be present in a tarball when there is no version control system. +# Therefore, it cannot be used in any dependencies. GNUmakefile has +# hooks to force a reconfigure at distribution time to get the value +# correct, without penalizing normal development with extra reconfigures. +# +# .version - present in a checked-out repository and in a distribution +# tarball. Usable in dependencies, particularly for files that don't +# want to depend on config.h but do want to track version changes. +# Delete this file prior to any autoconf run where you want to rebuild +# files to pick up a version string change; and leave it stale to +# minimize rebuild time after unrelated changes to configure sources. +# +# It is probably wise to add these two files to .gitignore, so that you +# don't accidentally commit either generated file. +# +# Use the following line in your configure.ac, so that $(VERSION) will +# automatically be up-to-date each time configure is run (and note that +# since configure.ac no longer includes a version string, Makefile rules +# should not depend on configure.ac for version updates). +# +# AC_INIT([GNU project], +# m4_esyscmd([build-aux/git-version-gen .tarball-version]), +# [bug-project at example]) +# +# Then use the following lines in your Makefile.am, so that .version +# will be present for dependencies, and so that .tarball-version will +# exist in distribution tarballs. +# +# BUILT_SOURCES = $(top_srcdir)/.version +# $(top_srcdir)/.version: +# echo $(VERSION) > $@-t && mv $@-t $@ +# dist-hook: +# echo $(VERSION) > $(distdir)/.tarball-version + +case $# in + 1) ;; + *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version"; exit 1;; +esac + +tarball_version_file=$1 +nl=' +' + +# First see if there is a tarball-only version file. +# then try "git describe", then default. +if test -f $tarball_version_file +then + v=`cat $tarball_version_file` || exit 1 + case $v in + *$nl*) v= ;; # reject multi-line output + [0-9]*) ;; + *) v= ;; + esac + test -z "$v" \ + && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2 +fi + +if test -n "$v" +then + : # use $v +elif + v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \ + || git describe --abbrev=4 HEAD 2>/dev/null` \ + && case $v in + [0-9]*) ;; + v[0-9]*) ;; + *) (exit 1) ;; + esac +then + # Is this a new git that lists number of commits since the last + # tag or the previous older version that did not? + # Newer: v6.10-77-g0f8faeb + # Older: v6.10-g0f8faeb + case $v in + *-*-*) : git describe is okay three part flavor ;; + *-*) + : git describe is older two part flavor + # Recreate the number of commits and rewrite such that the + # result is the same as if we were using the newer version + # of git describe. + vtag=`echo "$v" | sed 's/-.*//'` + numcommits=`git rev-list "$vtag"..HEAD | wc -l` + v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; + ;; + esac + + # Change the first '-' to a '.', so version-comparing tools work properly. + # Remove the "g" in git describe's output string, to save a byte. + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; +else + v=UNKNOWN +fi + +v=`echo "$v" |sed 's/^v//'` + +# Don't declare a version "dirty" merely because a time stamp has changed. +git status > /dev/null 2>&1 + +dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= +case "$dirty" in + '') ;; + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; + *) v="$v-dirty" ;; + esac ;; +esac + +# Omit the trailing newline, so that m4_esyscmd can use the result directly. +echo "$v" | tr -d '\012' + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/osmoappdesc.py b/osmoappdesc.py new file mode 100644 index 0000000..485a83b --- /dev/null +++ b/osmoappdesc.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +app_configs = { + "osmo-e1-recorder": ["doc/examples/osmo-e1-recorder.cfg"] +} + +apps = [(4444, "src/osmo-e1-recorder", "osmo-e1-recorder", "osmo-e1-recorder") + ] + +vty_command = ["./src/osmo-e1-recorder", "-c", + "doc/examples/osmo-e1-recorder.cfg"] + +vty_app = apps[0] diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 25c00d6..0000000 --- a/src/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -CFLAGS=-g -Wall -LDFLAGS=-losmocore -losmogsm -losmovty -losmoabis -ltalloc - -all: osmo-e1-recorder osmo-e1cap-dump hdlc-test - -osmo-e1-recorder: e1_recorder.o storage.o vty.o - $(CC) $(LDFLAGS) -o$@ $^ - -osmo-e1cap-dump: e1cap_dump.o storage.o flip_bits.o hdlc.o - $(CC) $(LDFLAGS) -o$@ $^ - -hdlc-test: hdlc.o hdlc-test.o - $(CC) $(LDFLAGS) -o$@ $^ - -%.o: %.c - $(CC) $(CFLAGS) -o $@ -c $^ - -clean: - @rm *.o osmo-e1-recorder osmo-e1cap-dump diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..8d348e6 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,55 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_builddir) \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOVTY_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(NULL) + +AM_LDFLAGS = \ + $(COVERAGE_LDFLAGS) \ + $(NULL) + +LDADD = \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOVTY_LIBS) \ + $(COVERAGE_LDFLAGS) \ + $(LIBOSMOABIS_LIBS) \ + $(NULL) + +noinst_HEADERS = \ + flip_bits.h \ + hdlc.h \ + recorder.h \ + storage.h + +bin_PROGRAMS = \ + osmo-e1-recorder \ + osmo-e1cap-dump \ + hdlc-test \ + $(NULL) + +osmo_e1_recorder_SOURCES = \ + e1_recorder.c \ + storage.c \ + vty.c \ + $(NULL) + +osmo_e1cap_dump_SOURCES = \ + e1cap_dump.c \ + storage.c \ + flip_bits.c \ + hdlc.c \ + $(NULL) + +hdlc_test_SOURCES = \ + hdlc-test.c \ + hdlc.c \ + $(NULL) diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..970df87 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,28 @@ +DISTCLEANFILES = \ + atconfig \ + $(NULL) + +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 +else +python-tests: $(BUILT_SOURCES) + echo "Not running python-based tests (determined at configure-time)" +endif + +# 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 osmo-e1-recorder -p 4444 \ + -r "$(top_builddir)/src/osmo-e1-recorder -c $(top_srcdir)/doc/examples/osmo-e1-recorder.cfg" \ + $(U) $(srcdir)/*.vty + +check-local: + $(MAKE) $(AM_MAKEFLAGS) python-tests -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I705b5356309507c39eaf517ca5b9ce0e1aa89852 Gerrit-Change-Number: 16182 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:44:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:44:08 +0000 Subject: Change in osmo-e1-recorder[master]: update .gitignore In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16183 ) Change subject: update .gitignore ...................................................................... update .gitignore Change-Id: Id9adf8d444013272a461bd5f4dbe64a5d0b373b4 --- M .gitignore 1 file changed, 22 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/.gitignore b/.gitignore index 31ef3a6..12ed619 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,27 @@ *.o *.swp *.cfg* +*.out +*.e1cap +*.pcap src/osmo-e1-recorder src/osmo-e1cap-dump +src/hdlc-test +Makefile.in +Makefile + +.version +.tarball-version +aclocal.m4 +autom4te.cache +compile +config.* +configure +depcomp +install-sh +libtool +ltmain.sh +missing +m4 +.deps +stamp-h1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: Id9adf8d444013272a461bd5f4dbe64a5d0b373b4 Gerrit-Change-Number: 16183 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:44:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:44:08 +0000 Subject: Change in osmo-e1-recorder[master]: add contrib/jenkins.sh In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16184 ) Change subject: add contrib/jenkins.sh ...................................................................... add contrib/jenkins.sh Change-Id: I79d9e12ef723841db186cd122da4dadb3f7d3969 --- A contrib/jenkins.sh 1 file changed, 67 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..38bd1a9 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# jenkins build helper script for openbsc. This is how we build on jenkins.osmocom.org +# +# environment variables: +# * WITH_MANUALS: build manual PDFs if set to "1" +# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1") +# + +if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then + echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" + exit 2 +fi + + +set -ex + +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst + +osmo-clean-workspace.sh + +mkdir "$deps" || true + +osmo-build-dep.sh libosmocore "" '--disable-doxygen --enable-gnutls' + +verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") + +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" +export PATH="$inst/bin:$PATH" + +osmo-build-dep.sh libosmo-abis + +# Additional configure options and depends +CONFIG="" +if [ "$WITH_MANUALS" = "1" ]; then + osmo-build-dep.sh osmo-gsm-manuals + CONFIG="--enable-manuals" +fi + +set +x +echo +echo +echo +echo " =============================== osmo-e1-recorder ===============================" +echo +set -x + +cd "$base" +autoreconf --install --force +./configure --enable-sanitize --enable-external-tests --enable-werror $CONFIG +$MAKE $PARALLEL_MAKE +LD_LIBRARY_PATH="$inst/lib" $MAKE check \ + || cat-testlogs.sh +LD_LIBRARY_PATH="$inst/lib" \ + DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests --enable-werror $CONFIG" \ + $MAKE distcheck \ + || cat-testlogs.sh + +if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then + make -C "$base/doc/manuals" publish +fi + +$MAKE maintainer-clean +osmo-clean-workspace.sh -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I79d9e12ef723841db186cd122da4dadb3f7d3969 Gerrit-Change-Number: 16184 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 17:56:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 17:56:25 +0000 Subject: Change in osmo-e1-recorder[master]: e1cap_dump: fix superchannel without pcap output References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16187 ) Change subject: e1cap_dump: fix superchannel without pcap output ...................................................................... e1cap_dump: fix superchannel without pcap output We have to check if g_pcap_fd is >= 0,as we initialize it to -1. Change-Id: I458c02b4619b6fb2c7d30b1ce3bbac86243a6977 --- M src/e1cap_dump.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/87/16187/1 diff --git a/src/e1cap_dump.c b/src/e1cap_dump.c index 027aa82..c172b55 100644 --- a/src/e1cap_dump.c +++ b/src/e1cap_dump.c @@ -78,7 +78,7 @@ static void handle_hdlc_frame_content(const uint8_t *data, unsigned int len, void *priv) { - if (g_pcap_fd && len >= 4) { + if (g_pcap_fd >= 0 && len >= 4) { uint8_t *cur = msgb_put(g_pcap_msg, len-2); memcpy(cur, data, len-2); printf("==> %s\n", msgb_hexdump(g_pcap_msg)); -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16187 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I458c02b4619b6fb2c7d30b1ce3bbac86243a6977 Gerrit-Change-Number: 16187 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 18:43:34 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 18:43:34 +0000 Subject: Change in libosmocore[master]: vty: track parent nodes also for telnet sessions In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16162 ) Change subject: vty: track parent nodes also for telnet sessions ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16162/2/src/vty/command.c File src/vty/command.c: https://gerrit.osmocom.org/c/libosmocore/+/16162/2/src/vty/command.c at 2361 PS2, Line 2361: llist_add(&parent->entry, &vty->parent_nodes); > Don't you need to initialize ->entry beforehand? or having it set to 0 is fine? INIT_LLIST_HEAD() is only needed for a list's head, not for the entries added to it. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 Gerrit-Change-Number: 16162 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Sun, 24 Nov 2019 18:43:34 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 18:56:34 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 18:56:34 +0000 Subject: Change in libosmocore[master]: msgb_put: more elaborate logging of head/tailroom failure In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16164 ) Change subject: msgb_put: more elaborate logging of head/tailroom failure ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16164/2/include/osmocom/core/msgb.h File include/osmocom/core/msgb.h: https://gerrit.osmocom.org/c/libosmocore/+/16164/2/include/osmocom/core/msgb.h at 243 PS2, Line 243: " (allocated %u, head at %u, len %u, tailroom %u < want tailroom %u)\n", > Ah it's fine, sorry. yeah, the difference is a count -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16164 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726 Gerrit-Change-Number: 16164 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 24 Nov 2019 18:56:34 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 19:01:31 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 19:01:31 +0000 Subject: Change in libosmocore[master]: add osmo_escape_cstr and osmo_quote_cstr In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16160 to look at the new patch set (#4). Change subject: add osmo_escape_cstr and osmo_quote_cstr ...................................................................... add osmo_escape_cstr and osmo_quote_cstr Provide string escaping that - returns the required buffer size, so it can be used with OSMO_STRBUF_APPEND(). - uses C compatible string constant escaping sequences. This is intended as a replacement for all previous osmo_escape_str* and osmo_quote_str* API. It pains me that I didn't get them right the first nor the second time: - The buffer functions do not return the chars needed, which is required for allocating sufficient memory in the *_c versions of the functions. - Because of that, these functions are accurately usable for OSMO_STRBUF_APPEND(), producing truncated strings, for example when dumping a GSUP message. - They do not use the C equivalent string constant escaping: for some reason I thought "\15" would be valid, but it should be "\x0f". If I could, I would completely drop those mislead implementations ... but backwards compat prohibits that. A previous patch already provided internal static functions that accurately return the required buffer size. Enhance these to also support C compatible string escaping, and use them as implementation of the new functions: osmo_escape_cstr_buf() osmo_escape_cstr_c() osmo_quote_cstr_buf() osmo_quote_cstr_c() In the tests for these, also test C string equivalence. Naming: from API versions, it would be kind of logical to call them osmo_escape_str_buf3() and osmo_escape_str_c2(). Since these anyway return a different escaping, it makes sense to me to have distinct names instead. Quasi missing are variants of the non-C-compatible weird legacy escaping that return the required buffer size, but I refrain from adding those, because we have enough API cruft as it is. Just always use these new cstr variants. Change-Id: I3dfb892036e01000033dd8e7e4a6a0c32a3caa9b --- M include/osmocom/core/utils.h M src/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 4 files changed, 301 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/16160/4 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3dfb892036e01000033dd8e7e4a6a0c32a3caa9b Gerrit-Change-Number: 16160 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 19:01:33 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 19:01:33 +0000 Subject: Change in libosmocore[master]: vty_app_info.is_config_node: add OSMO_DEPRECATED References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16188 ) Change subject: vty_app_info.is_config_node: add OSMO_DEPRECATED ...................................................................... vty_app_info.is_config_node: add OSMO_DEPRECATED Although this OSMO_DEPRECATED doesn't seem to generate a warning when compiling code that sets .is_config_node = foo, it seems a good idea to add the deprecation tag. It is deprecated since commit "vty: track parent nodes also for telnet sessions" I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 Change-Id: I800507b27cb0d536c1a4c203d7f7b90eec05a69c --- M include/osmocom/vty/vty.h 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/88/16188/1 diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index 9acaa7d..b63dc3b 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -5,6 +5,7 @@ #include #include +#include /*! \defgroup vty VTY (Virtual TTY) interface * @{ @@ -186,7 +187,9 @@ int (*go_parent_cb)(struct vty *vty); /*! OBSOLETED: Implicit parent node tracking has replaced the use of this callback. This callback is no longer * called, ever, and can be left NULL. */ - int (*is_config_node)(struct vty *vty, int node); + int (*is_config_node)(struct vty *vty, int node) + OSMO_DEPRECATED("Implicit parent node tracking has replaced the use of this callback. This callback is" + " no longer called, ever, and can be left NULL."); /*! Check if the config is consistent before write */ int (*config_is_consistent)(struct vty *vty); }; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16188 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I800507b27cb0d536c1a4c203d7f7b90eec05a69c Gerrit-Change-Number: 16188 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 19:01:33 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 19:01:33 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16189 ) Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... add osmo_gsup_make_response() and osmo_gsup_message_name_*() As I am implementing GSUP proxy forwarding between osmo-hlr instances, it becomes apparent that many code paths omit to copy back essential information in replies to GSUP requests. Provide a definitive common function that ensures a response is routed back to the sender with all message fields reflecting the same subscriber, session identification and message realm. It is up to osmo-hlr's GSUP server and all clients to use this function in all relevant GSUP message composition. The most important user is osmo-hlr, which for now does all proxy routing tasks for directly attached clients. However, if a core network entity other than the home HLR of a subscriber launches an MT request, client programs like osmo-msc should also ensure to use this function, so that responses are sure to reach the requesting peer. osmo_gsup_message_name_*() are useful to check the osmo_gsup_make_response() results in gsup_test.c, and are also otherwise useful for debug logging. So far it prints exactly those elements required to be copied to a response. Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 --- M include/osmocom/gsm/gsup.h M src/gsm/gsup.c M src/gsm/libosmogsm.map M tests/gsup/gsup_test.c M tests/gsup/gsup_test.ok 5 files changed, 244 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/89/16189/1 diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index c883dfb..bf7b99d 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -203,6 +203,7 @@ #define OSMO_GSUP_IS_MSGT_REQUEST(msgt) (((msgt) & 0b00000011) == 0b00) #define OSMO_GSUP_IS_MSGT_ERROR(msgt) (((msgt) & 0b00000011) == 0b01) +#define OSMO_GSUP_TO_MSGT_RESULT(msgt) (((msgt) & 0b11111100) | 0b10) #define OSMO_GSUP_TO_MSGT_ERROR(msgt) (((msgt) & 0b11111100) | 0b01) extern const struct value_string osmo_gsup_message_type_names[]; @@ -390,4 +391,10 @@ int osmo_gsup_get_err_msg_type(enum osmo_gsup_message_type type_in) OSMO_DEPRECATED("Use OSMO_GSUP_TO_MSGT_ERROR() instead"); +int osmo_gsup_make_response(struct osmo_gsup_message *reply, + const struct osmo_gsup_message *rx, bool error, bool final_response); + +size_t osmo_gsup_message_name_buf(char *buf, size_t bufsize, const struct osmo_gsup_message *msg); +char *osmo_gsup_message_name_c(void *ctx, const struct osmo_gsup_message *msg); + /*! @} */ diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c index ad7a2a4..b6cfcae 100644 --- a/src/gsm/gsup.c +++ b/src/gsm/gsup.c @@ -903,4 +903,140 @@ {} }; +/*! Set fields that need to be copied from a received message over to its response message. + * + * Note that fields like reply->destination_name may reference the same memory as rx and are not deep-copied, as usual + * when using this GSUP API. + * + * These fields are copied to the reply message, iff they are still unset: + * - Set reply->message_type to the rx's matching RESULT code (or ERROR code if error == true). + * - IMSI, + * - Set reply->destination_name to rx->source_name (for proxy routing), + * - sm_rp_mr (for SMS), + * - session_id (for SS/USSD), + * - if rx->session_state is not NONE, set tx->session_state depending on the final_response argument: + * If false, set to OSMO_GSUP_SESSION_STATE_CONTINUE, else OSMO_GSUP_SESSION_STATE_END. + * + * If values in reply are already set, they will not be overwritten. The return code is an optional way of finding out + * whether all values that were already set in 'reply' are indeed matching the 'rx' values that would have been set. + * + * \param[in] rx Received GSUP message that is being replied to. + * \param[inout] reply The message that should be the response to rx, either empty or with some values already set up. + * \return 0 if the resulting message is a valid response for rx, nonzero otherwise. If rc is nonzero, the reply message + * will have all fields set as if zero were returned, so it is possible to compose invalid responses by + * ignoring the return value (for flexibility). The rc is intended to warn if the reply message already + * contained data that is incompatible with rx, e.g. a mismatching IMSI. + */ +int osmo_gsup_make_response(struct osmo_gsup_message *reply, + const struct osmo_gsup_message *rx, bool error, bool final_response) +{ + int rc = 0; + + if (!reply->message_type) { + if (error) + reply->message_type = OSMO_GSUP_TO_MSGT_ERROR(rx->message_type); + else + reply->message_type = OSMO_GSUP_TO_MSGT_RESULT(rx->message_type); + } + + if (!reply->imsi[0]) + OSMO_STRLCPY_ARRAY(reply->imsi, rx->imsi); + + if (reply->message_class == OSMO_GSUP_MESSAGE_CLASS_UNSET) + reply->message_class = rx->message_class; + + if (!reply->destination_name || !reply->destination_name_len) { + reply->destination_name = rx->source_name; + reply->destination_name_len = rx->source_name_len; + } + + /* RP-Message-Reference is mandatory for SM Service */ + if (!reply->sm_rp_mr) + reply->sm_rp_mr = rx->sm_rp_mr; + + /* For SS/USSD, it's important to keep both session state and ID IEs */ + if (!reply->session_id) + reply->session_id = rx->session_id; + if (rx->session_state != OSMO_GSUP_SESSION_STATE_NONE + && reply->session_state == OSMO_GSUP_SESSION_STATE_NONE) { + if (final_response || rx->session_state == OSMO_GSUP_SESSION_STATE_END) + reply->session_state = OSMO_GSUP_SESSION_STATE_END; + else + reply->session_state = OSMO_GSUP_SESSION_STATE_CONTINUE; + } + + if (strcmp(reply->imsi, rx->imsi)) + rc |= 1 << 0; + if (reply->message_class != rx->message_class) + rc |= 1 << 1; + if (rx->sm_rp_mr && (!reply->sm_rp_mr || *rx->sm_rp_mr != *reply->sm_rp_mr)) + rc |= 1 << 2; + if (reply->session_id != rx->session_id) + rc |= 1 << 3; + return rc; +} + +/*! Print the most important value of a GSUP message to a string buffer in human readable form. + * \param[out] buf The buffer to write to. + * \param[out] buflen sizeof(buf). + * \param[in] msg GSUP message to print. + */ +size_t osmo_gsup_message_name_buf(char *buf, size_t buflen, const struct osmo_gsup_message *msg) +{ + struct osmo_strbuf sb = { .buf = buf, .len = buflen }; + if (!msg) { + OSMO_STRBUF_PRINTF(sb, "NULL"); + return sb.chars_needed; + } + + if (msg->message_class) + OSMO_STRBUF_PRINTF(sb, "%s ", osmo_gsup_message_class_name(msg->message_class)); + + OSMO_STRBUF_PRINTF(sb, "%s:", osmo_gsup_message_type_name(msg->message_type)); + + OSMO_STRBUF_PRINTF(sb, " imsi="); + OSMO_STRBUF_APPEND(sb, osmo_quote_cstr_buf, msg->imsi, strnlen(msg->imsi, sizeof(msg->imsi))); + + if (msg->cause) + OSMO_STRBUF_PRINTF(sb, " cause=%s", get_value_string(gsm48_gmm_cause_names, msg->cause)); + + switch (msg->cn_domain) { + case OSMO_GSUP_CN_DOMAIN_CS: + OSMO_STRBUF_PRINTF(sb, " cn_domain=CS"); + break; + case OSMO_GSUP_CN_DOMAIN_PS: + OSMO_STRBUF_PRINTF(sb, " cn_domain=PS"); + break; + default: + if (msg->cn_domain) + OSMO_STRBUF_PRINTF(sb, " cn_domain=?(%d)", msg->cn_domain); + break; + } + + if (msg->source_name_len) { + OSMO_STRBUF_PRINTF(sb, " source_name="); + OSMO_STRBUF_APPEND(sb, osmo_quote_cstr_buf, (char*)msg->source_name, msg->source_name_len); + } + + if (msg->destination_name_len) { + OSMO_STRBUF_PRINTF(sb, " destination_name="); + OSMO_STRBUF_APPEND(sb, osmo_quote_cstr_buf, (char*)msg->destination_name, msg->destination_name_len); + } + + if (msg->session_id) + OSMO_STRBUF_PRINTF(sb, " session_id=%u", msg->session_id); + if (msg->session_state) + OSMO_STRBUF_PRINTF(sb, " session_state=%s", osmo_gsup_session_state_name(msg->session_state)); + + if (msg->sm_rp_mr) + OSMO_STRBUF_PRINTF(sb, " sm_rp_mr=%u", *msg->sm_rp_mr); + + return sb.chars_needed; +} + +char *osmo_gsup_message_name_c(void *ctx, const struct osmo_gsup_message *msg) +{ + OSMO_NAME_C_IMPL(ctx, 64, "ERROR", osmo_gsup_message_name_buf, msg) +} + /*! @} */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a0e3b32..2eb0120 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -602,6 +602,9 @@ osmo_gsup_session_state_names; osmo_gsup_message_class_names; osmo_gsup_get_err_msg_type; +osmo_gsup_make_response; +osmo_gsup_message_name_buf; +osmo_gsup_message_name_c; osmo_gsup_sms_encode_sm_rp_da; osmo_gsup_sms_decode_sm_rp_da; diff --git a/tests/gsup/gsup_test.c b/tests/gsup/gsup_test.c index b84c88f..14ba8f9 100644 --- a/tests/gsup/gsup_test.c +++ b/tests/gsup/gsup_test.c @@ -20,6 +20,8 @@ #define TEST_SOURCE_NAME_IE 0x60, 0x05, 'M', 'S', 'C', '-', 'A' #define TEST_DESTINATION_NAME_IE 0x61, 0x05, 'M', 'S', 'C', '-', 'B' +void *ctx; + static void test_gsup_messages_dec_enc(void) { int test_idx; @@ -727,6 +729,69 @@ } } +static void test_gsup_make_response(void) +{ + char *source_name = "incoming-source-name"; + char *destination_name = "preset-destination-name"; + uint8_t sm_rp_mr = 23; + uint8_t other_sm_rp_mr = 17; + struct osmo_gsup_message rx = { + .message_type = OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, + .imsi = "1234567", + .message_class = OSMO_GSUP_MESSAGE_CLASS_SUBSCRIBER_MANAGEMENT, + .source_name = (uint8_t*)source_name, + .source_name_len = strlen(source_name) + 1, + .sm_rp_mr = &sm_rp_mr, + .session_id = 42, + .session_state = OSMO_GSUP_SESSION_STATE_BEGIN, + }; + struct osmo_gsup_message nonempty = { + .message_type = OSMO_GSUP_MSGT_ROUTING_ERROR, + .imsi = "987654321", + .message_class = OSMO_GSUP_MESSAGE_CLASS_INTER_MSC, + .destination_name = (uint8_t*)destination_name, + .destination_name_len = strlen(destination_name) + 1, + .sm_rp_mr = &other_sm_rp_mr, + .session_id = 11, + .session_state = OSMO_GSUP_SESSION_STATE_END, + }; + void *name_ctx = talloc_named_const(ctx, 0, __func__); + int error; + int final; + char *nonempty_str; + int rc; + + printf("\n%s()\n", __func__); + printf("rx = %s\n", osmo_gsup_message_name_c(name_ctx, &rx)); + + printf("\nwriting to an empty struct osmo_gsup_message should populate values as needed:\n"); + for (error = 0; error <= 1; error++) { + for (final = 0; final <= 1; final++) { + struct osmo_gsup_message target = {}; + printf("- args (error=%d, final=%d)\n", error, final); + rc = osmo_gsup_make_response(&target, &rx, error, final); + printf(" %s\n", osmo_gsup_message_name_c(name_ctx, &target)); + printf(" rc = %d\n", rc); + } + } + + printf("\nwriting to an already populated struct osmo_gsup_message, should have no effect:\n"); + nonempty_str = osmo_gsup_message_name_c(name_ctx, &nonempty); + for (error = 0; error <= 1; error++) { + for (final = 0; final <= 1; final++) { + struct osmo_gsup_message target = nonempty; + char *result; + printf("- args (error=%d, final=%d)\n", error, final); + rc = osmo_gsup_make_response(&target, &rx, error, final); + result = osmo_gsup_message_name_c(name_ctx, &target); + printf(" %s\n", result); + if (strcmp(result, nonempty_str)) + printf(" ERROR: expected: %s\n", nonempty_str); + printf(" rc = %d\n", rc); + } + } +} + const struct log_info_cat default_categories[] = { }; @@ -737,7 +802,7 @@ int main(int argc, char **argv) { - void *ctx = talloc_named_const(NULL, 0, "gsup_test"); + ctx = talloc_named_const(NULL, 0, "gsup_test"); osmo_init_logging2(ctx, &info); log_set_print_filename(osmo_stderr_target, 0); log_set_print_timestamp(osmo_stderr_target, 0); @@ -745,6 +810,7 @@ log_set_print_category(osmo_stderr_target, 1); test_gsup_messages_dec_enc(); + test_gsup_make_response(); printf("Done.\n"); return EXIT_SUCCESS; diff --git a/tests/gsup/gsup_test.ok b/tests/gsup/gsup_test.ok index db8bc2f..cdbf23f 100644 --- a/tests/gsup/gsup_test.ok +++ b/tests/gsup/gsup_test.ok @@ -77,4 +77,35 @@ E Abort OK Testing E Routing Error E Routing Error OK + +test_gsup_make_response() +rx = Subscriber-Management OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: imsi="1234567" source_name="incoming-source-name\0" session_id=42 session_state=BEGIN sm_rp_mr=23 + +writing to an empty struct osmo_gsup_message should populate values as needed: +- args (error=0, final=0) + Subscriber-Management OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: imsi="1234567" destination_name="incoming-source-name\0" session_id=42 session_state=CONTINUE sm_rp_mr=23 + rc = 0 +- args (error=0, final=1) + Subscriber-Management OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: imsi="1234567" destination_name="incoming-source-name\0" session_id=42 session_state=END sm_rp_mr=23 + rc = 0 +- args (error=1, final=0) + Subscriber-Management OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR: imsi="1234567" destination_name="incoming-source-name\0" session_id=42 session_state=CONTINUE sm_rp_mr=23 + rc = 0 +- args (error=1, final=1) + Subscriber-Management OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR: imsi="1234567" destination_name="incoming-source-name\0" session_id=42 session_state=END sm_rp_mr=23 + rc = 0 + +writing to an already populated struct osmo_gsup_message, should have no effect: +- args (error=0, final=0) + Inter-MSC OSMO_GSUP_MSGT_ROUTING_ERROR: imsi="987654321" destination_name="preset-destination-name\0" session_id=11 session_state=END sm_rp_mr=17 + rc = 15 +- args (error=0, final=1) + Inter-MSC OSMO_GSUP_MSGT_ROUTING_ERROR: imsi="987654321" destination_name="preset-destination-name\0" session_id=11 session_state=END sm_rp_mr=17 + rc = 15 +- args (error=1, final=0) + Inter-MSC OSMO_GSUP_MSGT_ROUTING_ERROR: imsi="987654321" destination_name="preset-destination-name\0" session_id=11 session_state=END sm_rp_mr=17 + rc = 15 +- args (error=1, final=1) + Inter-MSC OSMO_GSUP_MSGT_ROUTING_ERROR: imsi="987654321" destination_name="preset-destination-name\0" session_id=11 session_state=END sm_rp_mr=17 + rc = 15 Done. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 19:02:42 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 19:02:42 +0000 Subject: Change in libosmocore[master]: vty: track parent nodes also for telnet sessions In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16162 ) Change subject: vty: track parent nodes also for telnet sessions ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16162/2/include/osmocom/vty/vty.h File include/osmocom/vty/vty.h: https://gerrit.osmocom.org/c/libosmocore/+/16162/2/include/osmocom/vty/vty.h at 189 PS2, Line 189: int (*is_config_node)(struct vty *vty, int node); > worth checking if a field in a struct can be marked as deprecated. this compiles fine: int (*is_config_node)(struct vty *vty, int node) OSMO_DEPRECATED("Implicit parent node tracking has replaced the use of this callback. This callback is no longer called, ever, and can be left NULL."); but seems to have no effect: even though osmo-hlr's hlr.c sets an .is_config_node, the compilation doesn't show any deprecation warning. We can decide in the subsequent patch whether we also want to add the OSMO_DEPRECATED warning https://gerrit.osmocom.org/c/libosmocore/+/16188 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 Gerrit-Change-Number: 16162 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Sun, 24 Nov 2019 19:02:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 19:03:11 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 19:03:11 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16167 ) Change subject: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() ...................................................................... Patch Set 2: Code-Review+2 combining 2x +1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16167 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic7fc279bf3c741811cfc002538e28e8f8560e338 Gerrit-Change-Number: 16167 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 24 Nov 2019 19:03:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 20:55:45 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 20:55:45 +0000 Subject: Change in libosmocore[master]: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16161 ) Change subject: GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR ...................................................................... GSUP: rename E_ROUTING_ERROR to ROUTING_ERROR GSUP routing was introduced when adding the E interface. Hence that was the first realm where routing errors could occur. I did notice back then that this message type was special: it does not convey a response to a particular message kind -- it does not make sense, for example, to return an Updating Location Error cause, and do that for all conceivable message types. Instead, this tells the sender that a deeper error exists, i.e. that the desired peer is completely gone and unreachable. I did not foresee though that for D-GSM, there would also be arbitrary GSUP proxy routing, and that this error is not limited to E interface semantics. >From today's point of view, adding the "_E_" in the name was a mistake. Remove that "_E_" to yield OSMO_GSUP_MSGT_ROUTING_ERROR (with unchanged message type discriminator), but provide a #define linking the old name OSMO_GSUP_MSGT_E_ROUTING_ERROR to the new one. The only visible change should be that osmo_gsup_message_type_names[] now returns the new name without "_E_". I am not aware of any regression test fallout from that. Change-Id: Ic8e8bd11522d6c51ac7aaf946516cbce26bc6e1e --- M include/osmocom/gsm/gsup.h M src/gsm/gsup.c 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index 49ddb74..c883dfb 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -196,9 +196,11 @@ OSMO_GSUP_MSGT_E_CLOSE = 0b01000111, OSMO_GSUP_MSGT_E_ABORT = 0b01001011, - OSMO_GSUP_MSGT_E_ROUTING_ERROR = 0b01001110, + OSMO_GSUP_MSGT_ROUTING_ERROR = 0b01001110, }; +#define OSMO_GSUP_MSGT_E_ROUTING_ERROR OSMO_GSUP_MSGT_ROUTING_ERROR + #define OSMO_GSUP_IS_MSGT_REQUEST(msgt) (((msgt) & 0b00000011) == 0b00) #define OSMO_GSUP_IS_MSGT_ERROR(msgt) (((msgt) & 0b00000011) == 0b01) #define OSMO_GSUP_TO_MSGT_ERROR(msgt) (((msgt) & 0b11111100) | 0b01) diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c index 2f9d85d..ad7a2a4 100644 --- a/src/gsm/gsup.c +++ b/src/gsm/gsup.c @@ -101,7 +101,7 @@ OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_CLOSE), OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_ABORT), - OSMO_VALUE_STRING(OSMO_GSUP_MSGT_E_ROUTING_ERROR), + OSMO_VALUE_STRING(OSMO_GSUP_MSGT_ROUTING_ERROR), { 0, NULL } }; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic8e8bd11522d6c51ac7aaf946516cbce26bc6e1e Gerrit-Change-Number: 16161 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 20:55:46 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 20:55:46 +0000 Subject: Change in libosmocore[master]: fsm.h: add missing include of logging.h In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16163 ) Change subject: fsm.h: add missing include of logging.h ...................................................................... fsm.h: add missing include of logging.h Change-Id: I783bf0eb40b674fb6a77f7673563fdf156975f5a --- M include/osmocom/core/fsm.h 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, approved diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index 269befa..7b262c7 100644 --- a/include/osmocom/core/fsm.h +++ b/include/osmocom/core/fsm.h @@ -10,6 +10,7 @@ #include #include #include +#include /*! \defgroup fsm Finite State Machine abstraction * @{ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16163 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I783bf0eb40b674fb6a77f7673563fdf156975f5a Gerrit-Change-Number: 16163 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 20:55:47 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 20:55:47 +0000 Subject: Change in libosmocore[master]: msgb_put: more elaborate logging of head/tailroom failure In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16164 ) Change subject: msgb_put: more elaborate logging of head/tailroom failure ...................................................................... msgb_put: more elaborate logging of head/tailroom failure Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726 --- M include/osmocom/core/msgb.h 1 file changed, 12 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h index 1833a6c..cc76e3a 100644 --- a/include/osmocom/core/msgb.h +++ b/include/osmocom/core/msgb.h @@ -239,7 +239,11 @@ { unsigned char *tmp = msgb->tail; if (msgb_tailroom(msgb) < (int) len) - MSGB_ABORT(msgb, "Not enough tailroom msgb_put (%u < %u)\n", + MSGB_ABORT(msgb, "Not enough tailroom msgb_put" + " (allocated %u, head at %u, len %u, tailroom %u < want tailroom %u)\n", + msgb->data_len - sizeof(struct msgb), + msgb->head - msgb->_data, + msgb->len, msgb_tailroom(msgb), len); msgb->tail += len; msgb->len += len; @@ -335,8 +339,13 @@ static inline unsigned char *msgb_push(struct msgb *msgb, unsigned int len) { if (msgb_headroom(msgb) < (int) len) - MSGB_ABORT(msgb, "Not enough headroom msgb_push (%u < %u)\n", - msgb_headroom(msgb), len); + MSGB_ABORT(msgb, "Not enough headroom msgb_push" + " (allocated %u, head at %u < want headroom %u, len %u, tailroom %u)\n", + msgb->data_len - sizeof(struct msgb), + msgb->head - msgb->_data, + len, + msgb->len, + msgb_tailroom(msgb)); msgb->data -= len; msgb->len += len; return msgb->data; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16164 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I55b68098e1037c74ebe5faa86e34bd4494f5b726 Gerrit-Change-Number: 16164 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 20:55:48 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 20:55:48 +0000 Subject: Change in libosmocore[master]: utils_test: add osmo_print_n_test() In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16165 ) Change subject: utils_test: add osmo_print_n_test() ...................................................................... utils_test: add osmo_print_n_test() A couple of times recently I've needed to copy out a substring to a buffer with limited size. Use of strncpy() or osmo_strlcpy() are nontrivial here. I wanted to have a dedicated function. After I wrote that function with a test, I noticed that I had already implemented the same thing a while ago, as osmo_print_n() :P So here is just the test. Change-Id: Ia716abdc1f58af6065b84f4f567388a32a7b39fc --- M src/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 3 files changed, 82 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/utils.c b/src/utils.c index 904f6e4..4378431 100644 --- a/src/utils.c +++ b/src/utils.c @@ -509,6 +509,8 @@ * Copy at most \a siz bytes from \a src to \a dst, ensuring that the result is * NUL terminated. The NUL character is included in \a siz, i.e. passing the * actual sizeof(*dst) is correct. + * + * Note, a similar function that also limits the input buffer size is osmo_print_n(). */ size_t osmo_strlcpy(char *dst, const char *src, size_t siz) { diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index 55c9e7f..69510af 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -1138,6 +1138,59 @@ talloc_free(ctx); } +static void osmo_print_n_test(void) +{ + struct token_test { + const char *src; + size_t token_len; + size_t buf_size; + const char *expect_token; + int expect_rc; + }; + struct token_test tests[] = { + { "foo=bar", 3, 100, "foo", 3 }, + { "foo", 10, 100, "foo", 3 }, + { "foo", 3, 100, "foo", 3 }, + { NULL, 10, 100, "", 0 }, + { "", 10, 100, "", 0 }, + { "foo=bar", 0, 100, "", 0 }, + + { "foo=bar", 3, 2, "f", 3 }, + { "foo", 10, 2, "f", 3 }, + { "foo", 3, 2, "f", 3 }, + { NULL, 10, 2, "", 0 }, + { "", 10, 2, "", 0 }, + { "foo=bar", 0, 2, "", 0 }, + + { "foo=bar", 3, 1, "", 3 }, + { "foo", 10, 1, "", 3 }, + { "foo", 3, 1, "", 3 }, + { NULL, 10, 1, "", 0 }, + { "", 10, 1, "", 0 }, + { "foo=bar", 0, 1, "", 0 }, + + { "foo=bar", 3, 0, "unchanged", 3 }, + { "foo", 10, 0, "unchanged", 3 }, + { "foo", 3, 0, "unchanged", 3 }, + { NULL, 10, 0, "unchanged", 0 }, + { "", 10, 0, "unchanged", 0 }, + { "foo=bar", 0, 0, "unchanged", 0 }, + }; + struct token_test *t; + printf("\n%s()\n", __func__); + for (t = tests; t - tests < ARRAY_SIZE(tests); t++) { + char buf[100] = "unchanged"; + int rc = osmo_print_n(buf, t->buf_size, t->src, t->token_len); + printf("%s token_len=%zu buf_size=%zu", osmo_quote_str(t->src, -1), t->token_len, t->buf_size); + printf(" -> token=%s rc=%d", osmo_quote_str(buf, -1), rc); + if (strcmp(buf, t->expect_token)) + printf(" ERROR: expected token %s", osmo_quote_str(t->expect_token, -1)); + if (rc != t->expect_rc) + printf(" ERROR: expected rc %d", t->expect_rc); + printf("\n"); + } +} + int main(int argc, char **argv) { static const struct log_info log_info = {}; @@ -1159,5 +1212,6 @@ strbuf_test_nolen(); startswith_test(); name_c_impl_test(); + osmo_print_n_test(); return 0; } diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index b603647..d5cf491 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -377,3 +377,29 @@ OSMO_NAME_C_IMPL(10, NULL) -> NULL allocated 0 OSMO_NAME_C_IMPL(0, "ERROR") -> "ERROR" allocated 1 6 bytes, name 'foo_name_c_zero' OSMO_NAME_C_IMPL(0, NULL) -> NULL allocated 0 + +osmo_print_n_test() +"foo=bar" token_len=3 buf_size=100 -> token="foo" rc=3 +"foo" token_len=10 buf_size=100 -> token="foo" rc=3 +"foo" token_len=3 buf_size=100 -> token="foo" rc=3 +NULL token_len=10 buf_size=100 -> token="" rc=0 +"" token_len=10 buf_size=100 -> token="" rc=0 +"foo=bar" token_len=0 buf_size=100 -> token="" rc=0 +"foo=bar" token_len=3 buf_size=2 -> token="f" rc=3 +"foo" token_len=10 buf_size=2 -> token="f" rc=3 +"foo" token_len=3 buf_size=2 -> token="f" rc=3 +NULL token_len=10 buf_size=2 -> token="" rc=0 +"" token_len=10 buf_size=2 -> token="" rc=0 +"foo=bar" token_len=0 buf_size=2 -> token="" rc=0 +"foo=bar" token_len=3 buf_size=1 -> token="" rc=3 +"foo" token_len=10 buf_size=1 -> token="" rc=3 +"foo" token_len=3 buf_size=1 -> token="" rc=3 +NULL token_len=10 buf_size=1 -> token="" rc=0 +"" token_len=10 buf_size=1 -> token="" rc=0 +"foo=bar" token_len=0 buf_size=1 -> token="" rc=0 +"foo=bar" token_len=3 buf_size=0 -> token="unchanged" rc=3 +"foo" token_len=10 buf_size=0 -> token="unchanged" rc=3 +"foo" token_len=3 buf_size=0 -> token="unchanged" rc=3 +NULL token_len=10 buf_size=0 -> token="unchanged" rc=0 +"" token_len=10 buf_size=0 -> token="unchanged" rc=0 +"foo=bar" token_len=0 buf_size=0 -> token="unchanged" rc=0 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16165 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia716abdc1f58af6065b84f4f567388a32a7b39fc Gerrit-Change-Number: 16165 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 20:55:48 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 20:55:48 +0000 Subject: Change in libosmocore[master]: utils: add osmo_strnchr() In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16166 ) Change subject: utils: add osmo_strnchr() ...................................................................... utils: add osmo_strnchr() When finding a char in a string, I want to be able to limit the search area by size, not only by nul terminator. Change-Id: I48f8ace9f51f8a06796648883afcabe3b4e8b537 --- M include/osmocom/core/utils.h M src/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 4 files changed, 65 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 86d45bc..1abbe98 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -139,6 +139,7 @@ uint8_t *osmo_encode_big_endian(uint64_t value, size_t data_len); size_t osmo_strlcpy(char *dst, const char *src, size_t siz); +const char *osmo_strnchr(const char *str, size_t str_size, char c); bool osmo_is_hexstr(const char *str, int min_digits, int max_digits, bool require_even); diff --git a/src/utils.c b/src/utils.c index 4378431..c3e3efb 100644 --- a/src/utils.c +++ b/src/utils.c @@ -525,6 +525,28 @@ return ret; } +/*! Find first occurence of a char in a size limited string. + * Like strchr() but with a buffer size limit. + * \param[in] str String buffer to examine. + * \param[in] str_size sizeof(str). + * \param[in] c Character to look for. + * \return Pointer to the matched char, or NULL if not found. + */ +const char *osmo_strnchr(const char *str, size_t str_size, char c) +{ + const char *end = str + str_size; + const char *pos; + if (!str) + return NULL; + for (pos = str; pos < end; pos++) { + if (c == *pos) + return pos; + if (!*pos) + return NULL; + } + return NULL; +} + /*! Validate that a given string is a hex string within given size limits. * Note that each hex digit amounts to a nibble, so if checking for a hex * string to result in N bytes, pass amount of digits as 2*N. diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index 69510af..a79b8ed 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -1191,6 +1191,39 @@ } } +static void osmo_strnchr_test(void) +{ + struct test { + const char *haystack; + size_t haystack_len; + const char *needle; + int expect_offset; + }; + struct test tests[] = { + { "foo=bar", 8, "=", 3 }, + { "foo=bar", 4, "=", 3 }, + { "foo=bar", 3, "=", -1 }, + { "foo=bar", 0, "=", -1 }, + { "foo\0=bar", 9, "=", -1 }, + { "foo\0=bar", 9, "\0", 3 }, + }; + struct test *t; + printf("\n%s()\n", __func__); + for (t = tests; t - tests < ARRAY_SIZE(tests); t++) { + const char *r = osmo_strnchr(t->haystack, t->haystack_len, t->needle[0]); + int offset = -1; + if (r) + offset = r - t->haystack; + printf("osmo_strnchr(%s, %zu, ", + osmo_quote_str(t->haystack, -1), t->haystack_len); + printf("'%s') -> %d", + osmo_escape_str(t->needle, 1), offset); + if (offset != t->expect_offset) + printf(" ERROR expected %d", t->expect_offset); + printf("\n"); + } +} + int main(int argc, char **argv) { static const struct log_info log_info = {}; @@ -1213,5 +1246,6 @@ startswith_test(); name_c_impl_test(); osmo_print_n_test(); + osmo_strnchr_test(); return 0; } diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index d5cf491..89e0fed 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -403,3 +403,11 @@ NULL token_len=10 buf_size=0 -> token="unchanged" rc=0 "" token_len=10 buf_size=0 -> token="unchanged" rc=0 "foo=bar" token_len=0 buf_size=0 -> token="unchanged" rc=0 + +osmo_strnchr_test() +osmo_strnchr("foo=bar", 8, '=') -> 3 +osmo_strnchr("foo=bar", 4, '=') -> 3 +osmo_strnchr("foo=bar", 3, '=') -> -1 +osmo_strnchr("foo=bar", 0, '=') -> -1 +osmo_strnchr("foo", 9, '=') -> -1 +osmo_strnchr("foo", 9, '\0') -> 3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16166 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I48f8ace9f51f8a06796648883afcabe3b4e8b537 Gerrit-Change-Number: 16166 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 20:55:49 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 20:55:49 +0000 Subject: Change in libosmocore[master]: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16167 ) Change subject: osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() ...................................................................... osmo_sockaddr_str: deprecate osmo_sockaddr_str_*_32n() Follow up for patch I3cf150cc0cc06dd36039fbde091bc71b01697322 osmo_sockaddr_str_{from,to}_32n actually use host byte order. Deprecate these and introduce a more accurately named version ending in h. Change-Id: Ic7fc279bf3c741811cfc002538e28e8f8560e338 --- M TODO-RELEASE M include/osmocom/core/sockaddr_str.h M src/sockaddr_str.c M tests/sockaddr_str/sockaddr_str_test.c M tests/sockaddr_str/sockaddr_str_test.ok 5 files changed, 60 insertions(+), 36 deletions(-) Approvals: neels: Looks good to me, approved laforge: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index 692bdc1..be858ae 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -11,3 +11,7 @@ core struct osmo_tdef fields min_val,max_val added, ABI break (arrays of structs used in programs) gsm API added osmo_gsm48_rfpowercap2powerclass() gb API added bssgp_bvc_ctx_free() +core osmo_sockaddr_str_from_32n(), + osmo_sockaddr_str_to_32n() Deprecate: named 'n' but use host byte order. +core osmo_sockaddr_str_from_32h(), + osmo_sockaddr_str_to_32h() New, use host byte order and are named appropriately. diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index d7a8cdf..e42216a 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -31,6 +31,7 @@ #include #include #include +#include struct in_addr; struct in6_addr; @@ -77,7 +78,7 @@ int osmo_sockaddr_str_from_in_addr(struct osmo_sockaddr_str *sockaddr_str, const struct in_addr *addr, uint16_t port); int osmo_sockaddr_str_from_in6_addr(struct osmo_sockaddr_str *sockaddr_str, const struct in6_addr *addr, uint16_t port); int osmo_sockaddr_str_from_32(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port); -int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port); +int osmo_sockaddr_str_from_32h(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port); int osmo_sockaddr_str_from_sockaddr_in(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_in *src); int osmo_sockaddr_str_from_sockaddr_in6(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_in6 *src); int osmo_sockaddr_str_from_sockaddr(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_storage *src); @@ -85,9 +86,14 @@ int osmo_sockaddr_str_to_in_addr(const struct osmo_sockaddr_str *sockaddr_str, struct in_addr *dst); int osmo_sockaddr_str_to_in6_addr(const struct osmo_sockaddr_str *sockaddr_str, struct in6_addr *dst); int osmo_sockaddr_str_to_32(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip); -int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip); +int osmo_sockaddr_str_to_32h(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip); int osmo_sockaddr_str_to_sockaddr_in(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_in *dst); int osmo_sockaddr_str_to_sockaddr_in6(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_in6 *dst); int osmo_sockaddr_str_to_sockaddr(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_storage *dst); +int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) + OSMO_DEPRECATED("osmo_sockaddr_str_from_32n() actually uses *host* byte order. Use osmo_sockaddr_str_from_32h() instead"); +int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) + OSMO_DEPRECATED("osmo_sockaddr_str_to_32n() actually uses *host* byte order. Use osmo_sockaddr_str_to_32h() instead"); + /*! @} */ diff --git a/src/sockaddr_str.c b/src/sockaddr_str.c index 304363d..c38a05c 100644 --- a/src/sockaddr_str.c +++ b/src/sockaddr_str.c @@ -277,13 +277,20 @@ * \param[in] port Port number. * \return 0 on success, negative on error. */ -int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) +int osmo_sockaddr_str_from_32h(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) { if (!sockaddr_str) return -ENOSPC; return osmo_sockaddr_str_from_32(sockaddr_str, osmo_ntohl(ip), port); } +/*! DEPRECATED: the name suggests a conversion from network byte order, but actually converts from host byte order. Use + * osmo_sockaddr_str_from_32 for network byte order and osmo_sockaddr_str_from_32h for host byte order. */ +int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) +{ + return osmo_sockaddr_str_from_32h(sockaddr_str, ip, port); +} + /*! Convert IPv4 address and port to osmo_sockaddr_str. * \param[out] sockaddr_str The instance to copy to. * \param[in] src IPv4 address and port data. @@ -403,7 +410,7 @@ * \param[out] dst IPv4 address data in 32bit host-byte-order format to write to. * \return 0 on success, negative on error (e.g. invalid IPv4 address string). */ -int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) +int osmo_sockaddr_str_to_32h(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) { int rc; uint32_t ip_h; @@ -418,6 +425,13 @@ return 0; } +/*! DEPRECATED: the name suggests a conversion to network byte order, but actually converts to host byte order. Use + * osmo_sockaddr_str_to_32() for network byte order and osmo_sockaddr_str_to_32h() for host byte order. */ +int osmo_sockaddr_str_to_32n(const struct osmo_sockaddr_str *sockaddr_str, uint32_t *ip) +{ + return osmo_sockaddr_str_to_32h(sockaddr_str, ip); +} + /*! Convert osmo_sockaddr_str address string and port to IPv4 address and port data. * \param[in] sockaddr_str The instance to convert the IP and port of. * \param[out] dst IPv4 address and port data to write to. diff --git a/tests/sockaddr_str/sockaddr_str_test.c b/tests/sockaddr_str/sockaddr_str_test.c index 7e015ce..64a6104 100644 --- a/tests/sockaddr_str/sockaddr_str_test.c +++ b/tests/sockaddr_str/sockaddr_str_test.c @@ -165,14 +165,14 @@ { uint32_t a = 0; - rc = osmo_sockaddr_str_to_32n(x, &a); - printf(" osmo_sockaddr_str_to_32n() %s uint8_t[4]=[ %s]\n", rc_name(rc), + rc = osmo_sockaddr_str_to_32h(x, &a); + printf(" osmo_sockaddr_str_to_32h() %s uint8_t[4]=[ %s]\n", rc_name(rc), osmo_hexdump((void*)&a, sizeof(a))); if (rc == 0) { struct osmo_sockaddr_str back; - rc = osmo_sockaddr_str_from_32n(&back, a, x->port); - printf(" -> osmo_sockaddr_str_from_32n() %s ", rc_name(rc)); + rc = osmo_sockaddr_str_from_32h(&back, a, x->port); + printf(" -> osmo_sockaddr_str_from_32h() %s ", rc_name(rc)); dump_oip(&back); if (memcmp(x, &back, sizeof(back))) printf(" DIFFERS!\n"); diff --git a/tests/sockaddr_str/sockaddr_str_test.ok b/tests/sockaddr_str/sockaddr_str_test.ok index 33d9d7e..910e919 100644 --- a/tests/sockaddr_str/sockaddr_str_test.ok +++ b/tests/sockaddr_str/sockaddr_str_test.ok @@ -9,8 +9,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 01 02 03 04 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 04 03 02 01 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 04 03 02 01 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005010203040000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 5 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -28,8 +28,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 00 00 00 00 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 00 00 00 00 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 0 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -47,8 +47,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ ff ff ff ff ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ ff ff ff ff ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ ff ff ff ff ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=0200ffffffffffff0000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "255.255.255.255", .port = 65535 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -64,7 +64,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000001000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -78,7 +78,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000001000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -93,7 +93,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00010002000300000000000000000004 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000001000200030000000000000000000400000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "1:2:3::4", .port = 5 } @@ -110,7 +110,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000000000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 0 } @@ -127,7 +127,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000001 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000000000000000000000000000000000000000000000100000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::1", .port = 0 } @@ -144,7 +144,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=ffffffffffffffffffffffffffffffff -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a00ffff00000000ffffffffffffffffffffffffffffffff00000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -162,7 +162,7 @@ -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } DIFFERS! osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a00ffff00000000ffffffffffffffffffffffffffffffff00000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", .port = 65535 } @@ -180,7 +180,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000001000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -194,7 +194,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000001000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -208,7 +208,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -223,7 +223,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000005000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -238,7 +238,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -253,7 +253,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000005000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -267,7 +267,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0a00000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -283,8 +283,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 01 02 03 04 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 04 03 02 01 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 04 03 02 01 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000000010203040000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "1.2.3.4", .port = 0 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -300,7 +300,7 @@ osmo_sockaddr_str_to_in_addr() rc < 0 in_addr=00000000 osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=02000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr() rc < 0 sockaddr_storage=0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 @@ -317,7 +317,7 @@ -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } DIFFERS! osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000001000000000000000000000000000000010a09080700000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::1:a09:807", .port = 1 } @@ -337,8 +337,8 @@ osmo_sockaddr_str_to_in6_addr() rc < 0 in6_addr=00000000000000000000000000000000 osmo_sockaddr_str_to_32() rc == 0 uint8_t[4]=[ 00 00 00 00 ] -> osmo_sockaddr_str_from_32() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } - osmo_sockaddr_str_to_32n() rc == 0 uint8_t[4]=[ 00 00 00 00 ] - -> osmo_sockaddr_str_from_32n() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } + osmo_sockaddr_str_to_32h() rc == 0 uint8_t[4]=[ 00 00 00 00 ] + -> osmo_sockaddr_str_from_32h() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_sockaddr_in() rc == 0 sockaddr_in=02000005000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in() rc == 0 { .af = AF_INET, .ip = "0.0.0.0", .port = 5 } osmo_sockaddr_str_to_sockaddr_in6() rc < 0 sockaddr_in6=00000000000000000000000000000000000000000000000000000000 @@ -355,7 +355,7 @@ osmo_sockaddr_str_to_in6_addr() rc == 0 in6_addr=00000000000000000000000000000000 -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } @@ -373,7 +373,7 @@ -> osmo_sockaddr_str_from_in6_addr() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } DIFFERS! osmo_sockaddr_str_to_32() rc < 0 uint8_t[4]=[ 00 00 00 00 ] - osmo_sockaddr_str_to_32n() rc < 0 uint8_t[4]=[ 00 00 00 00 ] + osmo_sockaddr_str_to_32h() rc < 0 uint8_t[4]=[ 00 00 00 00 ] osmo_sockaddr_str_to_sockaddr_in() rc < 0 sockaddr_in=00000000000000000000000000000000 osmo_sockaddr_str_to_sockaddr_in6() rc == 0 sockaddr_in6=0a000005000000000000000000000000000000000000000000000000 -> osmo_sockaddr_str_from_sockaddr_in6() rc == 0 { .af = AF_INET6, .ip = "::", .port = 5 } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16167 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic7fc279bf3c741811cfc002538e28e8f8560e338 Gerrit-Change-Number: 16167 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 21:09:41 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 21:09:41 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16189 to look at the new patch set (#2). Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... add osmo_gsup_make_response() and osmo_gsup_message_name_*() As I am implementing GSUP proxy forwarding between osmo-hlr instances, it becomes apparent that many code paths omit to copy back essential information in replies to GSUP requests. Provide a definitive common function that ensures a response is routed back to the sender with all message fields reflecting the same subscriber, session identification and message realm. It is up to osmo-hlr's GSUP server and all clients to use this function in all relevant GSUP message composition. The most important user is osmo-hlr, which for now does all proxy routing tasks for directly attached clients. However, if a core network entity other than the home HLR of a subscriber launches an MT request, client programs like osmo-msc should also ensure to use this function, so that responses are sure to reach the requesting peer. osmo_gsup_message_name_*() are useful to check the osmo_gsup_make_response() results in gsup_test.c, and are also otherwise useful for debug logging. So far it prints exactly those elements required to be copied to a response. Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 --- M include/osmocom/gsm/gsup.h M src/gsm/gsup.c M src/gsm/libosmogsm.map M tests/gsup/gsup_test.c M tests/gsup/gsup_test.ok 5 files changed, 245 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/89/16189/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 21:19:42 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 21:19:42 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16189 to look at the new patch set (#3). Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... add osmo_gsup_make_response() and osmo_gsup_message_name_*() As I am implementing GSUP proxy forwarding between osmo-hlr instances, it becomes apparent that many code paths omit to copy back essential information in replies to GSUP requests. Provide a definitive common function that ensures a response can be routed back to the sender via proxies, with all message fields reflecting the same subscriber, session identification and message realm. It is up to osmo-hlr's GSUP server and all clients to use this function in all relevant GSUP message composition. The most important user is osmo-hlr, which for now does all proxy routing tasks for directly attached clients. However, if a core network entity other than the home HLR of a subscriber launches an MT request, client programs like osmo-msc should also ensure to use this function, so that responses are sure to reach the requesting peer. osmo_gsup_message_name_*() are useful to check the osmo_gsup_make_response() results in gsup_test.c, and are also otherwise useful for debug logging. So far it prints exactly those elements required to be copied to a response. Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 --- M include/osmocom/gsm/gsup.h M src/gsm/gsup.c M src/gsm/libosmogsm.map M tests/gsup/gsup_test.c M tests/gsup/gsup_test.ok 5 files changed, 245 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/89/16189/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 21:24:26 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 21:24:26 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16189 ) Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... Patch Set 3: I almost added osmo_gsup_make_response() in osmo-hlr instead. On the one hand, all GSUP users I know use libosmo-gsupclient, which is implemented in osmo-hlr.git. It makes sense to avoid spreading GSUP implementations across several repositories. On the other hand, osmo-hlr.git has no gsup.c file, and no implementation with semantics as close to the individual IEs as libosmocore's gsup.c. Whether an IE is absolutely required in a response message is a pretty low level decision. So in the end, I placed it here. But it's not a very strong opinion of mine. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Comment-Date: Sun, 24 Nov 2019 21:24:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 21:28:48 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 21:28:48 +0000 Subject: Change in osmo-mgw[master]: fix use-after-free: require new fsm deferred dealloc, check for term In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/15839 ) Change subject: fix use-after-free: require new fsm deferred dealloc, check for term ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/osmo-mgw/+/15839/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-mgw/+/15839/3//COMMIT_MSG at 7 PS3, Line 7: fix use-after-free > As far as I can see, in the current code you're still using generic deallocation and osmo_select_mai [?] you mean in osmo-mgw? This patch is about libosmo-mgcp-client, used by osmo-msc and osmo-bsc. So those need to use osmo_select_main_ctx(), osmo-mgw itself doesn't matter here. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 Gerrit-Change-Number: 15839 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 24 Nov 2019 21:28:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 21:29:01 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 21:29:01 +0000 Subject: Change in osmo-mgw[master]: fix use-after-free: require new fsm deferred dealloc, check for term In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/15839 ) Change subject: fix use-after-free: require new fsm deferred dealloc, check for term ...................................................................... Patch Set 3: Code-Review+2 combine 3x +1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 Gerrit-Change-Number: 15839 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 24 Nov 2019 21:29:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 21:29:07 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 21:29:07 +0000 Subject: Change in osmo-mgw[master]: fix use-after-free: require new fsm deferred dealloc, check for term In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/15839 ) Change subject: fix use-after-free: require new fsm deferred dealloc, check for term ...................................................................... fix use-after-free: require new fsm deferred dealloc, check for term API doc: require osmo_fsm_set_dealloc_ctx(). mgcp_client during delete: do not reparent the FSM when it is already terminating. I have recently discovered a vulnerability: if an endpoint FSM deallocates during event handling of a successful MGCP response, this causes a use-after-free; and once that is fixed, a state change on the already terminated FSM causes a pointer corruption by using already cleaned data structures. osmo_fsm_set_dealloc_ctx() fixes the use-after-free, and osmo_fsm_set_term_stops_actions() fixes the pointer corruption. Related: Ib7fce7b7d54dfb87af97544796680919e5929a50 (osmo-bsc), I08c03946605aa12e0a5ce8b3c773704ef5327a7a (osmo-msc) Depends: Ief4dba9ea587c9b4aea69993e965fbb20fb80e78 (libosmocore), I0adc13a1a998e953b6c850efa2761350dd07e03a (libosmocore) Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 --- M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c M src/libosmo-mgcp-client/mgcp_client_fsm.c 2 files changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve neels: Looks good to me, approved diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c index 2259788..ef4da17 100644 --- a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c @@ -255,6 +255,9 @@ * MGCP messages to set up the endpoint will be sent on the given mgcp_client, as soon as the first * osmo_mgcpc_ep_ci_request() is invoked. * + * IMPORTANT: To avoid use-after-free problems, using this FSM requires use of deferred FSM deallocation using + * osmo_fsm_set_dealloc_ctx(), e.g. using osmo_select_main_ctx(OTC_SELECT) with osmo_select_main_ctx() as main loop. + * * A typical sequence of events would be: * * ep = osmo_mgcpc_ep_alloc(..., mgcp_client_rtpbridge_wildcard(client)); diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 7565d32..800ae1b 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -708,6 +708,9 @@ OSMO_ASSERT(mgcp_ctx); + if (fi->proc.terminating) + return; + /* Unlink FSM from parent */ osmo_fsm_inst_unlink_parent(fi, NULL); -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 Gerrit-Change-Number: 15839 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 21:31:47 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sun, 24 Nov 2019 21:31:47 +0000 Subject: Change in libosmocore[master]: fix osmo_quote_str_c() to alloc sufficient size In-Reply-To: References: Message-ID: neels has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16029 ) Change subject: fix osmo_quote_str_c() to alloc sufficient size ...................................................................... Abandoned instead merged as I16c08eced41bf1b7acf6e95f658068ace99ca4c8 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I04d97e8eec93ffb74006503c356a68cceaf429ac Gerrit-Change-Number: 16029 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: osmith Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 22:16:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 22:16:16 +0000 Subject: Change in simtrace2[master]: card_emu_tests: Cosmetic changes (re-order code; more comments) References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16190 ) Change subject: card_emu_tests: Cosmetic changes (re-order code; more comments) ...................................................................... card_emu_tests: Cosmetic changes (re-order code; more comments) Change-Id: I36aefc824187ee99d83a451d869b137c13334d91 --- M firmware/test/card_emu_tests.c 1 file changed, 20 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/90/16190/1 diff --git a/firmware/test/card_emu_tests.c b/firmware/test/card_emu_tests.c index fe1739b..a5ba62e 100644 --- a/firmware/test/card_emu_tests.c +++ b/firmware/test/card_emu_tests.c @@ -13,7 +13,9 @@ #define PHONE_INT 2 #define PHONE_DATAOUT 3 -/* stub functions required by card_emu.c */ +/*********************************************************************** + * stub functions required by card_emu.c + ***********************************************************************/ void card_emu_uart_wait_tx_idle(uint8_t uart_chan) { @@ -30,6 +32,7 @@ static uint8_t tx_debug_buf[1024]; static unsigned int tx_debug_buf_idx; +/* the card emulator wants to send some data to the host [reader] */ int card_emu_uart_tx(uint8_t uart_chan, uint8_t byte) { printf("UART_TX(%02x)\n", byte); @@ -37,13 +40,6 @@ return 1; } -static void reader_check_and_clear(const uint8_t *data, unsigned int len) -{ - assert(len == tx_debug_buf_idx); - assert(!memcmp(tx_debug_buf, data, len)); - tx_debug_buf_idx = 0; -} - void card_emu_uart_enable(uint8_t uart_chan, uint8_t rxtx) { char *rts; @@ -95,7 +91,21 @@ printf("tc_etu_disable(tc_chan=%u)\n", chan_nr); } -const uint8_t atr[] = { 0x3b, 0x02, 0x14, 0x50 }; + + +/*********************************************************************** + * test helper functions + ***********************************************************************/ + + +static void reader_check_and_clear(const uint8_t *data, unsigned int len) +{ + assert(len == tx_debug_buf_idx); + assert(!memcmp(tx_debug_buf, data, len)); + tx_debug_buf_idx = 0; +} + +static const uint8_t atr[] = { 0x3b, 0x02, 0x14, 0x50 }; static int verify_atr(struct card_handle *ch) { @@ -130,6 +140,7 @@ verify_atr(ch); } +/* emulate the host/reader sending some bytes to the [emulated] card */ static void reader_send_bytes(struct card_handle *ch, const uint8_t *bytes, unsigned int len) { unsigned int i; -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16190 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I36aefc824187ee99d83a451d869b137c13334d91 Gerrit-Change-Number: 16190 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 22:16:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 22:16:16 +0000 Subject: Change in simtrace2[master]: fix typo: libisb -> libusb References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16191 ) Change subject: fix typo: libisb -> libusb ...................................................................... fix typo: libisb -> libusb Change-Id: I0a9505e3eeb7ae4ffda7081dcbb1ed63835600a5 --- M host/libusb_util.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/91/16191/1 diff --git a/host/libusb_util.c b/host/libusb_util.c index 45e3f50..71fb488 100644 --- a/host/libusb_util.c +++ b/host/libusb_util.c @@ -1,4 +1,4 @@ -/* libisb utilities +/* libusb utilities * * (C) 2010-2016 by Harald Welte * -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I0a9505e3eeb7ae4ffda7081dcbb1ed63835600a5 Gerrit-Change-Number: 16191 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 22:16:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 22:16:17 +0000 Subject: Change in simtrace2[master]: simtrace2-remsim: Implement/Fix the 'skip_atr' option References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16192 ) Change subject: simtrace2-remsim: Implement/Fix the 'skip_atr' option ...................................................................... simtrace2-remsim: Implement/Fix the 'skip_atr' option Change-Id: Id8206738635af0dd55836bbbcbfbe7381c375e97 --- M host/simtrace2-remsim.c 1 file changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/92/16192/1 diff --git a/host/simtrace2-remsim.c b/host/simtrace2-remsim.c index 73a7272..101d425 100644 --- a/host/simtrace2-remsim.c +++ b/host/simtrace2-remsim.c @@ -746,12 +746,14 @@ /* select remote (forwarded) SIM */ st_modem_sim_select_remote(ci->slot); - /* set the ATR */ - uint8_t real_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, - 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, - 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 }; - atr_update_csum(real_atr, sizeof(real_atr)); - cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); + if (!skip_atr) { + /* set the ATR */ + uint8_t real_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, + 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, + 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 }; + atr_update_csum(real_atr, sizeof(real_atr)); + cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); + } /* select remote (forwarded) SIM */ st_modem_reset_pulse(ci->slot, 300); -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Id8206738635af0dd55836bbbcbfbe7381c375e97 Gerrit-Change-Number: 16192 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 22:16:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 22:16:17 +0000 Subject: Change in simtrace2[master]: remove unused function process_do_error() References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16193 ) Change subject: remove unused function process_do_error() ...................................................................... remove unused function process_do_error() Change-Id: I02bc23a340b086b0de4e69affb6f965bff6bbc0b --- M host/simtrace2-remsim.c 1 file changed, 0 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/93/16193/1 diff --git a/host/simtrace2-remsim.c b/host/simtrace2-remsim.c index 101d425..918c9fd 100644 --- a/host/simtrace2-remsim.c +++ b/host/simtrace2-remsim.c @@ -385,19 +385,6 @@ return 0; } -/*! \brief Process a ERROR indication message from the SIMtrace2 */ -static int process_do_error(struct cardem_inst *ci, uint8_t *buf, int len) -{ - struct cardemu_usb_msg_error *err; - err = (struct cardemu_usb_msg_error *) buf; - - printf("=> ERROR: %u/%u/%u: %s\n", - err->severity, err->subsystem, err->code, - err->msg_len ? (char *)err->msg : ""); - - return 0; -} - /*! \brief Process a RX-DATA indication message from the SIMtrace2 */ static int process_do_rx_da(struct cardem_inst *ci, uint8_t *buf, int len) { @@ -447,12 +434,6 @@ return 0; } -#if 0 - case SIMTRACE_CMD_DO_ERROR - rc = process_do_error(ci, buf, len); - break; -#endif - /*! \brief Process an incoming message from the SIMtrace2 */ static int process_usb_msg(struct cardem_inst *ci, uint8_t *buf, int len) { -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I02bc23a340b086b0de4e69affb6f965bff6bbc0b Gerrit-Change-Number: 16193 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 22:16:18 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 22:16:18 +0000 Subject: Change in simtrace2[master]: host: use autotools and split shared code to libosmo-simtrace2 References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16194 ) Change subject: host: use autotools and split shared code to libosmo-simtrace2 ...................................................................... host: use autotools and split shared code to libosmo-simtrace2 Change-Id: I57e77f927ee9e169cc794c5dc6b128a2d590201b --- M contrib/jenkins.sh A host/.gitignore A host/Makefile.am R host/Makefile.old A host/configure.ac R host/contrib/99-simtrace2.rules A host/contrib/Makefile.am A host/git-version-gen A host/include/Makefile.am R host/include/osmocom/simtrace2/apdu_dispatch.h A host/include/osmocom/simtrace2/gsmtap.h R host/include/osmocom/simtrace2/libusb_util.h A host/include/osmocom/simtrace2/simtrace2_api.h A host/include/osmocom/simtrace2/simtrace_prot.h A host/include/osmocom/simtrace2/simtrace_usb.h A host/lib/Makefile.am R host/lib/apdu_dispatch.c A host/lib/gsmtap.c R host/lib/libusb_util.c A host/lib/simtrace2_api.c A host/libosmo-simtrace2.pc.in D host/simtrace.h D host/simtrace2-remsim.c D host/simtrace_prot.h D host/simtrace_usb.h A host/src/Makefile.am R host/src/simtrace2-discovery.c R host/src/simtrace2-discovery.h A host/src/simtrace2-remsim.c R host/src/simtrace2-sniff.c R host/src/simtrace2_usb.c R host/src/usb2udp.c 32 files changed, 1,245 insertions(+), 836 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/94/16194/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index b85e4b3..a8426bd 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -50,9 +50,15 @@ echo echo "=============== HOST START ==============" cd $TOPDIR/host -make clean -make -make clean +autoreconf --install --force +./configure --enable-sanitize --enable-werror +$MAKE $PARALLEL_MAKE +#$MAKE distcheck || cat-testlogs.sh +make dist + +#if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then +# make -C "$base/doc/manuals" publish +#fi if [ "x$publish" = "x--publish" ]; then echo @@ -69,6 +75,10 @@ fi echo +echo "=============== HOST CLEAN ==============" +$MAKE maintainer-clean + +echo echo "=============== FIRMWARE CLEAN ==============" cd $TOPDIR/firmware/ for build in $BUILDS; do diff --git a/host/.gitignore b/host/.gitignore new file mode 100644 index 0000000..44ca2a0 --- /dev/null +++ b/host/.gitignore @@ -0,0 +1,32 @@ +.o +*.a +*.lo +*.la +.deps +Makefile +Makefile.in + +#configure +aclocal.m4 +autom4te.cache/ +compile +config.guess +config.log +config.status +config.sub +configure +configure.lineno +depcomp +install-sh +missing +stamp-h1 + +#libtool +ltmain.sh +libtool +.libs + +.tarball-version +.version + +*.pc diff --git a/host/Makefile.am b/host/Makefile.am new file mode 100644 index 0000000..d1b3b31 --- /dev/null +++ b/host/Makefile.am @@ -0,0 +1,14 @@ +AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6 + +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include +SUBDIRS = include lib src contrib #tests examples doc + +EXTRA_DIST = .version git-version-gen + + at RELMAKE@ + +BUILT_SOURCES = $(top_srcdir)/.version +$(top_srcdir)/.version: + echo $(VERSION) > $@-t && mv $@-t $@ +dist-hook: + echo $(VERSION) > $(distdir)/.tarball-version diff --git a/host/Makefile b/host/Makefile.old similarity index 94% rename from host/Makefile rename to host/Makefile.old index aee399c..ab767cd 100644 --- a/host/Makefile +++ b/host/Makefile.old @@ -5,7 +5,7 @@ all: $(APPS) -simtrace2-remsim: simtrace2-remsim.o apdu_dispatch.o simtrace2-discovery.o libusb_util.o +simtrace2-remsim: simtrace2-remsim.o apdu_dispatch.o simtrace2-discovery.o simtrace2_api.o libusb_util.o $(CC) -o $@ $^ $(LDFLAGS) `pkg-config --libs libosmosim libpcsclite` simtrace2-remsim-usb2udp: usb2udp.o simtrace2-discovery.o diff --git a/host/configure.ac b/host/configure.ac new file mode 100644 index 0000000..7929884 --- /dev/null +++ b/host/configure.ac @@ -0,0 +1,102 @@ +AC_INIT([simtrace2], + m4_esyscmd([./git-version-gen .tarball-version]), + [simtrace at lists.osmocom.org]) + +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + +AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip 1.6 subdir-objects]) +AC_CONFIG_TESTDIR(tests) + +dnl kernel style compile messages +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +dnl include release helper +RELMAKE='-include osmo-release.mk' +AC_SUBST([RELMAKE]) + +dnl checks for programs +AC_PROG_MAKE_SET +AC_PROG_CC +AC_PROG_INSTALL +LT_INIT([pic-only]) + +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + +AC_CONFIG_MACRO_DIR([m4]) + +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 " +AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])], + [ AC_MSG_RESULT([yes]) + SYMBOL_VISIBILITY="-fvisibility=hidden"], + AC_MSG_RESULT([no])) +CFLAGS="$saved_CFLAGS" +AC_SUBST(SYMBOL_VISIBILITY) + +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOSIM, libosmosim >= 1.0.0) +PKG_CHECK_MODULES(LIBUSB, libusb-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 + +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: + a) deprecation (allow upstream to mark deprecation without breaking builds); + b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + +AC_OUTPUT( + libosmo-simtrace2.pc + include/Makefile + src/Makefile + lib/Makefile + contrib/Makefile + Makefile) diff --git a/host/99-simtrace2.rules b/host/contrib/99-simtrace2.rules similarity index 100% rename from host/99-simtrace2.rules rename to host/contrib/99-simtrace2.rules diff --git a/host/contrib/Makefile.am b/host/contrib/Makefile.am new file mode 100644 index 0000000..4f11962 --- /dev/null +++ b/host/contrib/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = 99-simtrace2.rules diff --git a/host/git-version-gen b/host/git-version-gen new file mode 100755 index 0000000..42cf3d2 --- /dev/null +++ b/host/git-version-gen @@ -0,0 +1,151 @@ +#!/bin/sh +# Print a version string. +scriptversion=2010-01-28.01 + +# Copyright (C) 2007-2010 Free Software Foundation, Inc. +# +# This program is free software: you can 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 . + +# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. +# It may be run two ways: +# - from a git repository in which the "git describe" command below +# produces useful output (thus requiring at least one signed tag) +# - from a non-git-repo directory containing a .tarball-version file, which +# presumes this script is invoked like "./git-version-gen .tarball-version". + +# In order to use intra-version strings in your project, you will need two +# separate generated version string files: +# +# .tarball-version - present only in a distribution tarball, and not in +# a checked-out repository. Created with contents that were learned at +# the last time autoconf was run, and used by git-version-gen. Must not +# be present in either $(srcdir) or $(builddir) for git-version-gen to +# give accurate answers during normal development with a checked out tree, +# but must be present in a tarball when there is no version control system. +# Therefore, it cannot be used in any dependencies. GNUmakefile has +# hooks to force a reconfigure at distribution time to get the value +# correct, without penalizing normal development with extra reconfigures. +# +# .version - present in a checked-out repository and in a distribution +# tarball. Usable in dependencies, particularly for files that don't +# want to depend on config.h but do want to track version changes. +# Delete this file prior to any autoconf run where you want to rebuild +# files to pick up a version string change; and leave it stale to +# minimize rebuild time after unrelated changes to configure sources. +# +# It is probably wise to add these two files to .gitignore, so that you +# don't accidentally commit either generated file. +# +# Use the following line in your configure.ac, so that $(VERSION) will +# automatically be up-to-date each time configure is run (and note that +# since configure.ac no longer includes a version string, Makefile rules +# should not depend on configure.ac for version updates). +# +# AC_INIT([GNU project], +# m4_esyscmd([build-aux/git-version-gen .tarball-version]), +# [bug-project at example]) +# +# Then use the following lines in your Makefile.am, so that .version +# will be present for dependencies, and so that .tarball-version will +# exist in distribution tarballs. +# +# BUILT_SOURCES = $(top_srcdir)/.version +# $(top_srcdir)/.version: +# echo $(VERSION) > $@-t && mv $@-t $@ +# dist-hook: +# echo $(VERSION) > $(distdir)/.tarball-version + +case $# in + 1) ;; + *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version"; exit 1;; +esac + +tarball_version_file=$1 +nl=' +' + +# First see if there is a tarball-only version file. +# then try "git describe", then default. +if test -f $tarball_version_file +then + v=`cat $tarball_version_file` || exit 1 + case $v in + *$nl*) v= ;; # reject multi-line output + [0-9]*) ;; + *) v= ;; + esac + test -z "$v" \ + && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2 +fi + +if test -n "$v" +then + : # use $v +elif + v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \ + || git describe --abbrev=4 HEAD 2>/dev/null` \ + && case $v in + [0-9]*) ;; + v[0-9]*) ;; + *) (exit 1) ;; + esac +then + # Is this a new git that lists number of commits since the last + # tag or the previous older version that did not? + # Newer: v6.10-77-g0f8faeb + # Older: v6.10-g0f8faeb + case $v in + *-*-*) : git describe is okay three part flavor ;; + *-*) + : git describe is older two part flavor + # Recreate the number of commits and rewrite such that the + # result is the same as if we were using the newer version + # of git describe. + vtag=`echo "$v" | sed 's/-.*//'` + numcommits=`git rev-list "$vtag"..HEAD | wc -l` + v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; + ;; + esac + + # Change the first '-' to a '.', so version-comparing tools work properly. + # Remove the "g" in git describe's output string, to save a byte. + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; +else + v=UNKNOWN +fi + +v=`echo "$v" |sed 's/^v//'` + +# Don't declare a version "dirty" merely because a time stamp has changed. +git status > /dev/null 2>&1 + +dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= +case "$dirty" in + '') ;; + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; + *) v="$v-dirty" ;; + esac ;; +esac + +# Omit the trailing newline, so that m4_esyscmd can use the result directly. +echo "$v" | tr -d '\012' + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/host/include/Makefile.am b/host/include/Makefile.am new file mode 100644 index 0000000..4222484 --- /dev/null +++ b/host/include/Makefile.am @@ -0,0 +1,7 @@ +nobase_include_HEADERS = \ + osmocom/simtrace2/apdu_dispatch.h \ + osmocom/simtrace2/libusb_util.h \ + osmocom/simtrace2/simtrace2_api.h \ + osmocom/simtrace2/simtrace_usb.h \ + osmocom/simtrace2/simtrace_prot.h \ + osmocom/simtrace2/gsmtap.h diff --git a/host/apdu_dispatch.h b/host/include/osmocom/simtrace2/apdu_dispatch.h similarity index 100% rename from host/apdu_dispatch.h rename to host/include/osmocom/simtrace2/apdu_dispatch.h diff --git a/host/include/osmocom/simtrace2/gsmtap.h b/host/include/osmocom/simtrace2/gsmtap.h new file mode 100644 index 0000000..d7184dc --- /dev/null +++ b/host/include/osmocom/simtrace2/gsmtap.h @@ -0,0 +1,6 @@ +#pragma once +#include +#include + +int osmo_st2_gsmtap_init(const char *gsmtap_host); +int osmo_st2_gsmtap_send_apdu(uint8_t sub_type, const uint8_t *apdu, unsigned int len); diff --git a/host/libusb_util.h b/host/include/osmocom/simtrace2/libusb_util.h similarity index 100% rename from host/libusb_util.h rename to host/include/osmocom/simtrace2/libusb_util.h diff --git a/host/include/osmocom/simtrace2/simtrace2_api.h b/host/include/osmocom/simtrace2/simtrace2_api.h new file mode 100644 index 0000000..5a9f4a3 --- /dev/null +++ b/host/include/osmocom/simtrace2/simtrace2_api.h @@ -0,0 +1,52 @@ +#pragma once + +#include +#include + +/* transport to a SIMtrace device */ +struct st_transport { + /* USB */ + struct libusb_device_handle *usb_devh; + struct { + uint8_t in; + uint8_t out; + uint8_t irq_in; + } usb_ep; + + /* UDP */ + int udp_fd; +}; + +/* a SIMtrace slot; communicates over a transport */ +struct st_slot { + /* transport through which the slot can be reached */ + struct st_transport *transp; + /* number of the slot within the transport */ + uint8_t slot_nr; +}; + +/* One istance of card emulation */ +struct cardem_inst { + /* slot on which this card emulation instance runs */ + struct st_slot *slot; + /* libosmosim SIM card profile */ + const struct osim_cla_ins_card_profile *card_prof; + /* libosmosim SIM card channel */ + struct osim_chan_hdl *chan; +}; + + +int cardem_request_card_insert(struct cardem_inst *ci, bool inserted); +int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t le); +int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, + const uint8_t *data, uint16_t data_len_in); +int cardem_request_sw_tx(struct cardem_inst *ci, const uint8_t *sw); +int cardem_request_set_atr(struct cardem_inst *ci, const uint8_t *atr, unsigned int atr_len); + + +int st_modem_reset_pulse(struct st_slot *slot, uint16_t duration_ms); +int st_modem_reset_active(struct st_slot *slot); +int st_modem_reset_inactive(struct st_slot *slot); +int st_modem_sim_select_local(struct st_slot *slot); +int st_modem_sim_select_remote(struct st_slot *slot); +int st_modem_get_status(struct st_slot *slot); diff --git a/host/include/osmocom/simtrace2/simtrace_prot.h b/host/include/osmocom/simtrace2/simtrace_prot.h new file mode 120000 index 0000000..cf485f3 --- /dev/null +++ b/host/include/osmocom/simtrace2/simtrace_prot.h @@ -0,0 +1 @@ +../../../../firmware/libcommon/include/simtrace_prot.h \ No newline at end of file diff --git a/host/include/osmocom/simtrace2/simtrace_usb.h b/host/include/osmocom/simtrace2/simtrace_usb.h new file mode 120000 index 0000000..ec0c021 --- /dev/null +++ b/host/include/osmocom/simtrace2/simtrace_usb.h @@ -0,0 +1 @@ +../../../../firmware/libcommon/include/simtrace_usb.h \ No newline at end of file diff --git a/host/lib/Makefile.am b/host/lib/Makefile.am new file mode 100644 index 0000000..8416923 --- /dev/null +++ b/host/lib/Makefile.am @@ -0,0 +1,19 @@ +# This is _NOT_ the library release version, it's an API version. +# Please read chapter "Library interface versions" of the libtool documentation +# before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html +ST2_LIBVERSION=0:0:0 + +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) +AM_CFLAGS= -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOSIM_CFLAGS) $(LIBUSB_CFLAGS) $(COVERAGE_CFLAGS) +AM_LDFLAGS = $(COVERAGE_LDFLAGS) +COMMONLIBS = $(LIBOSMOCORE_LIBS) $(LIBOSMOSIM_LIBS) $(LIBUSB_LIBS) + +lib_LTLIBRARIES = libosmo-simtrace2.la + +libosmo_simtrace2_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(ST2_LIBVERSION) +libosmo_simtrace2_la_LIBADD = $(COMMONLIBS) +libosmo_simtrace2_la_SOURCES = \ + apdu_dispatch.c \ + gsmtap.c \ + libusb_util.c \ + simtrace2_api.c diff --git a/host/apdu_dispatch.c b/host/lib/apdu_dispatch.c similarity index 98% rename from host/apdu_dispatch.c rename to host/lib/apdu_dispatch.c index 7c7ed01..ae892eb 100644 --- a/host/apdu_dispatch.c +++ b/host/lib/apdu_dispatch.c @@ -27,7 +27,7 @@ #include #include -#include "apdu_dispatch.h" +#include /*! \brief Has the command-data phase been completed yet? */ static inline bool is_dc_complete(struct apdu_context *ac) diff --git a/host/lib/gsmtap.c b/host/lib/gsmtap.c new file mode 100644 index 0000000..d5575e0 --- /dev/null +++ b/host/lib/gsmtap.c @@ -0,0 +1,57 @@ +#include + +#include +#include + +#include +#include +#include +#include + +/* global GSMTAP instance */ +static struct gsmtap_inst *g_gti; + +int osmo_st2_gsmtap_init(const char *gsmtap_host) +{ + if (g_gti) + return -EEXIST; + + g_gti = gsmtap_source_init(gsmtap_host, GSMTAP_UDP_PORT, 0); + if (!g_gti) { + perror("unable to open GSMTAP"); + return -EIO; + } + gsmtap_source_add_sink(g_gti); + + return 0; +} + +int osmo_st2_gsmtap_send_apdu(uint8_t sub_type, const uint8_t *apdu, unsigned int len) +{ + struct gsmtap_hdr *gh; + unsigned int gross_len = len + sizeof(*gh); + uint8_t *buf = malloc(gross_len); + int rc; + + if (!buf) + return -ENOMEM; + + memset(buf, 0, sizeof(*gh)); + gh = (struct gsmtap_hdr *) buf; + gh->version = GSMTAP_VERSION; + gh->hdr_len = sizeof(*gh)/4; + gh->type = GSMTAP_TYPE_SIM; + gh->sub_type = sub_type; + + memcpy(buf + sizeof(*gh), apdu, len); + + rc = write(gsmtap_inst_fd(g_gti), buf, gross_len); + if (rc < 0) { + perror("write gsmtap"); + free(buf); + return rc; + } + + free(buf); + return 0; +} diff --git a/host/libusb_util.c b/host/lib/libusb_util.c similarity index 98% rename from host/libusb_util.c rename to host/lib/libusb_util.c index 71fb488..d88b043 100644 --- a/host/libusb_util.c +++ b/host/lib/libusb_util.c @@ -1,6 +1,6 @@ /* libusb utilities * - * (C) 2010-2016 by Harald Welte + * (C) 2010-2019 by Harald Welte * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -25,7 +25,7 @@ #include -#include "libusb_util.h" +#include static char path_buf[USB_MAX_PATH_LEN]; diff --git a/host/lib/simtrace2_api.c b/host/lib/simtrace2_api.c new file mode 100644 index 0000000..0d48b8e --- /dev/null +++ b/host/lib/simtrace2_api.c @@ -0,0 +1,281 @@ + +/* simtrace2-protocol - USB protocol library code for SIMtrace2 + * + * (C) 2016-2019 by Harald Welte + * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * This program is free software; you can redistribute it and/or + * modify 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 +#include +#include +#define _GNU_SOURCE +#include + +#include +#include +#include +#include +#include + +#include + +//#include +#include +#include +//#include "apdu_dispatch.h" +//#include "simtrace2-discovery.h" + +#include +#include +#include +#include +#include + +/*********************************************************************** + * SIMTRACE core protocol + ***********************************************************************/ + +/*! \brief allocate a message buffer for simtrace use */ +static struct msgb *st_msgb_alloc(void) +{ + return msgb_alloc_headroom(1024+32, 32, "SIMtrace"); +} + +#if 0 +static void apdu_out_cb(uint8_t *buf, unsigned int len, void *user_data) +{ + printf("APDU: %s\n", osmo_hexdump(buf, len)); + gsmtap_send_sim(buf, len); +} +#endif + +/*! \brief Transmit a given command to the SIMtrace2 device */ +int st_transp_tx_msg(struct st_transport *transp, struct msgb *msg) +{ + int rc; + + printf("<- %s\n", msgb_hexdump(msg)); + + if (transp->udp_fd < 0) { + int xfer_len; + + rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.out, + msgb_data(msg), msgb_length(msg), + &xfer_len, 100000); + } else { + rc = write(transp->udp_fd, msgb_data(msg), msgb_length(msg)); + } + + msgb_free(msg); + return rc; +} + +static struct simtrace_msg_hdr *st_push_hdr(struct msgb *msg, uint8_t msg_class, uint8_t msg_type, + uint8_t slot_nr) +{ + struct simtrace_msg_hdr *sh; + + sh = (struct simtrace_msg_hdr *) msgb_push(msg, sizeof(*sh)); + memset(sh, 0, sizeof(*sh)); + sh->msg_class = msg_class; + sh->msg_type = msg_type; + sh->slot_nr = slot_nr; + sh->msg_len = msgb_length(msg); + + return sh; +} + +/* transmit a given message to a specified slot. Expects all headers + * present before calling the function */ +int st_slot_tx_msg(struct st_slot *slot, struct msgb *msg, + uint8_t msg_class, uint8_t msg_type) +{ + st_push_hdr(msg, msg_class, msg_type, slot->slot_nr); + + return st_transp_tx_msg(slot->transp, msg); +} + +/*********************************************************************** + * Card Emulation protocol + ***********************************************************************/ + + +/*! \brief Request the SIMtrace2 to generate a card-insert signal */ +int cardem_request_card_insert(struct cardem_inst *ci, bool inserted) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_cardinsert *cins; + + cins = (struct cardemu_usb_msg_cardinsert *) msgb_put(msg, sizeof(*cins)); + memset(cins, 0, sizeof(*cins)); + if (inserted) + cins->card_insert = 1; + + return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_CARDINSERT); +} + +/*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Rx */ +int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t le) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_tx_data *txd; + txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); + + printf("<= %s(%02x, %d)\n", __func__, pb, le); + + memset(txd, 0, sizeof(*txd)); + txd->data_len = 1; + txd->flags = CEMU_DATA_F_PB_AND_RX; + /* one data byte */ + msgb_put_u8(msg, pb); + + return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); +} + +/*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Tx */ +int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, + const uint8_t *data, uint16_t data_len_in) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_tx_data *txd; + uint8_t *cur; + + txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); + + printf("<= %s(%02x, %s, %d)\n", __func__, pb, + osmo_hexdump(data, data_len_in), data_len_in); + + memset(txd, 0, sizeof(*txd)); + txd->data_len = 1 + data_len_in; + txd->flags = CEMU_DATA_F_PB_AND_TX; + /* procedure byte */ + msgb_put_u8(msg, pb); + /* data */ + cur = msgb_put(msg, data_len_in); + memcpy(cur, data, data_len_in); + + return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); +} + +/*! \brief Request the SIMtrace2 to send a Status Word */ +int cardem_request_sw_tx(struct cardem_inst *ci, const uint8_t *sw) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_tx_data *txd; + uint8_t *cur; + + txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); + + printf("<= %s(%02x %02x)\n", __func__, sw[0], sw[1]); + + memset(txd, 0, sizeof(*txd)); + txd->data_len = 2; + txd->flags = CEMU_DATA_F_PB_AND_TX | CEMU_DATA_F_FINAL; + cur = msgb_put(msg, 2); + cur[0] = sw[0]; + cur[1] = sw[1]; + + return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); +} + +int cardem_request_set_atr(struct cardem_inst *ci, const uint8_t *atr, unsigned int atr_len) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_set_atr *satr; + uint8_t *cur; + + satr = (struct cardemu_usb_msg_set_atr *) msgb_put(msg, sizeof(*satr)); + + printf("<= %s(%s)\n", __func__, osmo_hexdump(atr, atr_len)); + + memset(satr, 0, sizeof(*satr)); + satr->atr_len = atr_len; + cur = msgb_put(msg, atr_len); + memcpy(cur, atr, atr_len); + + return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); +} + +/*********************************************************************** + * Modem Control protocol + ***********************************************************************/ + +static int _modem_reset(struct st_slot *slot, uint8_t asserted, uint16_t pulse_ms) +{ + struct msgb *msg = st_msgb_alloc(); + struct st_modem_reset *sr ; + + sr = (struct st_modem_reset *) msgb_put(msg, sizeof(*sr)); + sr->asserted = asserted; + sr->pulse_duration_msec = pulse_ms; + + return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_RESET); +} + +/*! \brief pulse the RESET line of the modem for \a duration_ms milli-seconds*/ +int st_modem_reset_pulse(struct st_slot *slot, uint16_t duration_ms) +{ + return _modem_reset(slot, 2, duration_ms); +} + +/*! \brief assert the RESET line of the modem */ +int st_modem_reset_active(struct st_slot *slot) +{ + return _modem_reset(slot, 1, 0); +} + +/*! \brief de-assert the RESET line of the modem */ +int st_modem_reset_inactive(struct st_slot *slot) +{ + return _modem_reset(slot, 0, 0); +} + +static int _modem_sim_select(struct st_slot *slot, uint8_t remote_sim) +{ + struct msgb *msg = st_msgb_alloc(); + struct st_modem_sim_select *ss; + + ss = (struct st_modem_sim_select *) msgb_put(msg, sizeof(*ss)); + ss->remote_sim = remote_sim; + + return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_SIM_SELECT); +} + +/*! \brief select local (physical) SIM for given slot */ +int st_modem_sim_select_local(struct st_slot *slot) +{ + return _modem_sim_select(slot, 0); +} + +/*! \brief select remote (emulated/forwarded) SIM for given slot */ +int st_modem_sim_select_remote(struct st_slot *slot) +{ + return _modem_sim_select(slot, 1); +} + +/*! \brief Request slot to send us status information about the modem */ +int st_modem_get_status(struct st_slot *slot) +{ + struct msgb *msg = st_msgb_alloc(); + + return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_BD_MODEM_STATUS); +} diff --git a/host/libosmo-simtrace2.pc.in b/host/libosmo-simtrace2.pc.in new file mode 100644 index 0000000..6e9f6f2 --- /dev/null +++ b/host/libosmo-simtrace2.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Osmocom SIMtrace2 library +Description: Library for SIM Card / Smart Card tracing + emulation +Version: @VERSION@ +Libs: -L${libdir} -losmo-simtrace2 +Cflags: -I${includedir}/ diff --git a/host/simtrace.h b/host/simtrace.h deleted file mode 100644 index c4a20da..0000000 --- a/host/simtrace.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _SIMTRACE_H -#define _SIMTRACE_H - -#define SIMTRACE_USB_VENDOR 0x1d50 -#define SIMTRACE_USB_PRODUCT 0x60e3 - -#endif diff --git a/host/simtrace2-remsim.c b/host/simtrace2-remsim.c deleted file mode 100644 index 918c9fd..0000000 --- a/host/simtrace2-remsim.c +++ /dev/null @@ -1,758 +0,0 @@ -/* simtrace2-remsim - main program for the host PC to provide a remote SIM - * using the SIMtrace 2 firmware in card emulation mode - * - * (C) 2016-2017 by Harald Welte - * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon - * - * This program is free software; you can redistribute it and/or - * modify 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 -#include -#include -#define _GNU_SOURCE -#include - -#include -#include -#include -#include -#include - -#include - -#include "libusb_util.h" -#include "simtrace.h" -#include "simtrace_prot.h" -#include "apdu_dispatch.h" -#include "simtrace2-discovery.h" - -#include -#include -#include -#include -#include -#include -#include - -/* transport to a SIMtrace device */ -struct st_transport { - /* USB */ - struct libusb_device_handle *usb_devh; - struct { - uint8_t in; - uint8_t out; - uint8_t irq_in; - } usb_ep; - - /* UDP */ - int udp_fd; -}; - -/* a SIMtrace slot; communicates over a transport */ -struct st_slot { - /* transport through which the slot can be reached */ - struct st_transport *transp; - /* number of the slot within the transport */ - uint8_t slot_nr; -}; - -/* One istance of card emulation */ -struct cardem_inst { - /* slot on which this card emulation instance runs */ - struct st_slot *slot; - /* libosmosim SIM card profile */ - const struct osim_cla_ins_card_profile *card_prof; - /* libosmosim SIM card channel */ - struct osim_chan_hdl *chan; -}; - -/* global GSMTAP instance */ -static struct gsmtap_inst *g_gti; - -static int gsmtap_send_sim(const uint8_t *apdu, unsigned int len) -{ - struct gsmtap_hdr *gh; - unsigned int gross_len = len + sizeof(*gh); - uint8_t *buf = malloc(gross_len); - int rc; - - if (!buf) - return -ENOMEM; - - memset(buf, 0, sizeof(*gh)); - gh = (struct gsmtap_hdr *) buf; - gh->version = GSMTAP_VERSION; - gh->hdr_len = sizeof(*gh)/4; - gh->type = GSMTAP_TYPE_SIM; - - memcpy(buf + sizeof(*gh), apdu, len); - - rc = write(gsmtap_inst_fd(g_gti), buf, gross_len); - if (rc < 0) { - perror("write gsmtap"); - free(buf); - return rc; - } - - free(buf); - return 0; -} - -/*********************************************************************** - * SIMTRACE pcore protocol - ***********************************************************************/ - -/*! \brief allocate a message buffer for simtrace use */ -static struct msgb *st_msgb_alloc(void) -{ - return msgb_alloc_headroom(1024+32, 32, "SIMtrace"); -} - -#if 0 -static void apdu_out_cb(uint8_t *buf, unsigned int len, void *user_data) -{ - printf("APDU: %s\n", osmo_hexdump(buf, len)); - gsmtap_send_sim(buf, len); -} -#endif - -/*! \brief Transmit a given command to the SIMtrace2 device */ -int st_transp_tx_msg(struct st_transport *transp, struct msgb *msg) -{ - int rc; - - printf("<- %s\n", msgb_hexdump(msg)); - - if (transp->udp_fd < 0) { - int xfer_len; - - rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.out, - msgb_data(msg), msgb_length(msg), - &xfer_len, 100000); - } else { - rc = write(transp->udp_fd, msgb_data(msg), msgb_length(msg)); - } - - msgb_free(msg); - return rc; -} - -static struct simtrace_msg_hdr *st_push_hdr(struct msgb *msg, uint8_t msg_class, uint8_t msg_type, - uint8_t slot_nr) -{ - struct simtrace_msg_hdr *sh; - - sh = (struct simtrace_msg_hdr *) msgb_push(msg, sizeof(*sh)); - memset(sh, 0, sizeof(*sh)); - sh->msg_class = msg_class; - sh->msg_type = msg_type; - sh->slot_nr = slot_nr; - sh->msg_len = msgb_length(msg); - - return sh; -} - -/* transmit a given message to a specified slot. Expects all headers - * present before calling the function */ -int st_slot_tx_msg(struct st_slot *slot, struct msgb *msg, - uint8_t msg_class, uint8_t msg_type) -{ - st_push_hdr(msg, msg_class, msg_type, slot->slot_nr); - - return st_transp_tx_msg(slot->transp, msg); -} - -/*********************************************************************** - * Card Emulation protocol - ***********************************************************************/ - - -/*! \brief Request the SIMtrace2 to generate a card-insert signal */ -static int cardem_request_card_insert(struct cardem_inst *ci, bool inserted) -{ - struct msgb *msg = st_msgb_alloc(); - struct cardemu_usb_msg_cardinsert *cins; - - cins = (struct cardemu_usb_msg_cardinsert *) msgb_put(msg, sizeof(*cins)); - memset(cins, 0, sizeof(*cins)); - if (inserted) - cins->card_insert = 1; - - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_CARDINSERT); -} - -/*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Rx */ -static int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t le) -{ - struct msgb *msg = st_msgb_alloc(); - struct cardemu_usb_msg_tx_data *txd; - txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); - - printf("<= %s(%02x, %d)\n", __func__, pb, le); - - memset(txd, 0, sizeof(*txd)); - txd->data_len = 1; - txd->flags = CEMU_DATA_F_PB_AND_RX; - /* one data byte */ - msgb_put_u8(msg, pb); - - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); -} - -/*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Tx */ -static int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, - const uint8_t *data, uint16_t data_len_in) -{ - struct msgb *msg = st_msgb_alloc(); - struct cardemu_usb_msg_tx_data *txd; - uint8_t *cur; - - txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); - - printf("<= %s(%02x, %s, %d)\n", __func__, pb, - osmo_hexdump(data, data_len_in), data_len_in); - - memset(txd, 0, sizeof(*txd)); - txd->data_len = 1 + data_len_in; - txd->flags = CEMU_DATA_F_PB_AND_TX; - /* procedure byte */ - msgb_put_u8(msg, pb); - /* data */ - cur = msgb_put(msg, data_len_in); - memcpy(cur, data, data_len_in); - - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); -} - -/*! \brief Request the SIMtrace2 to send a Status Word */ -static int cardem_request_sw_tx(struct cardem_inst *ci, const uint8_t *sw) -{ - struct msgb *msg = st_msgb_alloc(); - struct cardemu_usb_msg_tx_data *txd; - uint8_t *cur; - - txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); - - printf("<= %s(%02x %02x)\n", __func__, sw[0], sw[1]); - - memset(txd, 0, sizeof(*txd)); - txd->data_len = 2; - txd->flags = CEMU_DATA_F_PB_AND_TX | CEMU_DATA_F_FINAL; - cur = msgb_put(msg, 2); - cur[0] = sw[0]; - cur[1] = sw[1]; - - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); -} - -static void atr_update_csum(uint8_t *atr, unsigned int atr_len) -{ - uint8_t csum = 0; - int i; - - for (i = 1; i < atr_len - 1; i++) - csum = csum ^ atr[i]; - - atr[atr_len-1] = csum; -} - -static int cardem_request_set_atr(struct cardem_inst *ci, const uint8_t *atr, unsigned int atr_len) -{ - struct msgb *msg = st_msgb_alloc(); - struct cardemu_usb_msg_set_atr *satr; - uint8_t *cur; - - satr = (struct cardemu_usb_msg_set_atr *) msgb_put(msg, sizeof(*satr)); - - printf("<= %s(%s)\n", __func__, osmo_hexdump(atr, atr_len)); - - memset(satr, 0, sizeof(*satr)); - satr->atr_len = atr_len; - cur = msgb_put(msg, atr_len); - memcpy(cur, atr, atr_len); - - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); -} - -/*********************************************************************** - * Modem Control protocol - ***********************************************************************/ - -static int _modem_reset(struct st_slot *slot, uint8_t asserted, uint16_t pulse_ms) -{ - struct msgb *msg = st_msgb_alloc(); - struct st_modem_reset *sr ; - - sr = (struct st_modem_reset *) msgb_put(msg, sizeof(*sr)); - sr->asserted = asserted; - sr->pulse_duration_msec = pulse_ms; - - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_RESET); -} - -/*! \brief pulse the RESET line of the modem for \a duration_ms milli-seconds*/ -int st_modem_reset_pulse(struct st_slot *slot, uint16_t duration_ms) -{ - return _modem_reset(slot, 2, duration_ms); -} - -/*! \brief assert the RESET line of the modem */ -int st_modem_reset_active(struct st_slot *slot) -{ - return _modem_reset(slot, 1, 0); -} - -/*! \brief de-assert the RESET line of the modem */ -int st_modem_reset_inactive(struct st_slot *slot) -{ - return _modem_reset(slot, 0, 0); -} - -static int _modem_sim_select(struct st_slot *slot, uint8_t remote_sim) -{ - struct msgb *msg = st_msgb_alloc(); - struct st_modem_sim_select *ss; - - ss = (struct st_modem_sim_select *) msgb_put(msg, sizeof(*ss)); - ss->remote_sim = remote_sim; - - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_SIM_SELECT); -} - -/*! \brief select local (physical) SIM for given slot */ -int st_modem_sim_select_local(struct st_slot *slot) -{ - return _modem_sim_select(slot, 0); -} - -/*! \brief select remote (emulated/forwarded) SIM for given slot */ -int st_modem_sim_select_remote(struct st_slot *slot) -{ - return _modem_sim_select(slot, 1); -} - -/*! \brief Request slot to send us status information about the modem */ -int st_modem_get_status(struct st_slot *slot) -{ - struct msgb *msg = st_msgb_alloc(); - - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_BD_MODEM_STATUS); -} - - -/*********************************************************************** - * Incoming Messages - ***********************************************************************/ - -/*! \brief Process a STATUS message from the SIMtrace2 */ -static int process_do_status(struct cardem_inst *ci, uint8_t *buf, int len) -{ - struct cardemu_usb_msg_status *status; - status = (struct cardemu_usb_msg_status *) buf; - - printf("=> STATUS: flags=0x%x, fi=%u, di=%u, wi=%u wtime=%u\n", - status->flags, status->fi, status->di, status->wi, - status->waiting_time); - - return 0; -} - -/*! \brief Process a PTS indication message from the SIMtrace2 */ -static int process_do_pts(struct cardem_inst *ci, uint8_t *buf, int len) -{ - struct cardemu_usb_msg_pts_info *pts; - pts = (struct cardemu_usb_msg_pts_info *) buf; - - printf("=> PTS req: %s\n", osmo_hexdump(pts->req, sizeof(pts->req))); - - return 0; -} - -/*! \brief Process a RX-DATA indication message from the SIMtrace2 */ -static int process_do_rx_da(struct cardem_inst *ci, uint8_t *buf, int len) -{ - static struct apdu_context ac; - struct cardemu_usb_msg_rx_data *data; - int rc; - - data = (struct cardemu_usb_msg_rx_data *) buf; - - printf("=> DATA: flags=%x, %s: ", data->flags, - osmo_hexdump(data->data, data->data_len)); - - rc = apdu_segment_in(&ac, data->data, data->data_len, - data->flags & CEMU_DATA_F_TPDU_HDR); - - if (rc & APDU_ACT_TX_CAPDU_TO_CARD) { - struct msgb *tmsg = msgb_alloc(1024, "TPDU"); - struct osim_reader_hdl *rh = ci->chan->card->reader; - uint8_t *cur; - - /* Copy TPDU header */ - cur = msgb_put(tmsg, sizeof(ac.hdr)); - memcpy(cur, &ac.hdr, sizeof(ac.hdr)); - /* Copy D(c), if any */ - if (ac.lc.tot) { - cur = msgb_put(tmsg, ac.lc.tot); - memcpy(cur, ac.dc, ac.lc.tot); - } - /* send to actual card */ - tmsg->l3h = tmsg->tail; - rc = rh->ops->transceive(rh, tmsg); - if (rc < 0) { - fprintf(stderr, "error during transceive: %d\n", rc); - msgb_free(tmsg); - return rc; - } - msgb_apdu_sw(tmsg) = msgb_get_u16(tmsg); - ac.sw[0] = msgb_apdu_sw(tmsg) >> 8; - ac.sw[1] = msgb_apdu_sw(tmsg) & 0xff; - printf("SW=0x%04x, len_rx=%d\n", msgb_apdu_sw(tmsg), msgb_l3len(tmsg)); - if (msgb_l3len(tmsg)) - cardem_request_pb_and_tx(ci, ac.hdr.ins, tmsg->l3h, msgb_l3len(tmsg)); - cardem_request_sw_tx(ci, ac.sw); - } else if (ac.lc.tot > ac.lc.cur) { - cardem_request_pb_and_rx(ci, ac.hdr.ins, ac.lc.tot - ac.lc.cur); - } - return 0; -} - -/*! \brief Process an incoming message from the SIMtrace2 */ -static int process_usb_msg(struct cardem_inst *ci, uint8_t *buf, int len) -{ - struct simtrace_msg_hdr *sh = (struct simtrace_msg_hdr *)buf; - int rc; - - printf("-> %s\n", osmo_hexdump(buf, len)); - - buf += sizeof(*sh); - - switch (sh->msg_type) { - case SIMTRACE_MSGT_BD_CEMU_STATUS: - rc = process_do_status(ci, buf, len); - break; - case SIMTRACE_MSGT_DO_CEMU_PTS: - rc = process_do_pts(ci, buf, len); - break; - case SIMTRACE_MSGT_DO_CEMU_RX_DATA: - rc = process_do_rx_da(ci, buf, len); - break; - default: - printf("unknown simtrace msg type 0x%02x\n", sh->msg_type); - rc = -1; - break; - } - - return rc; -} - -static void print_welcome(void) -{ - printf("simtrace2-remsim - Remote SIM card forwarding\n" - "(C) 2010-2017, Harald Welte \n" - "(C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon \n\n"); -} - -static void print_help(void) -{ - printf( "\t-r\t--remote-udp-host HOST\n" - "\t-p\t--remote-udp-port PORT\n" - "\t-h\t--help\n" - "\t-i\t--gsmtap-ip\tA.B.C.D\n" - "\t-a\t--skip-atr\n" - "\t-k\t--keep-running\n" - "\t-V\t--usb-vendor\tVENDOR_ID\n" - "\t-P\t--usb-product\tPRODUCT_ID\n" - "\t-C\t--usb-config\tCONFIG_ID\n" - "\t-I\t--usb-interface\tINTERFACE_ID\n" - "\t-S\t--usb-altsetting ALTSETTING_ID\n" - "\t-A\t--usb-address\tADDRESS\n" - "\t-H\t--usb-path\tPATH\n" - "\n" - ); -} - -static const struct option opts[] = { - { "remote-udp-host", 1, 0, 'r' }, - { "remote-udp-port", 1, 0, 'p' }, - { "gsmtap-ip", 1, 0, 'i' }, - { "skip-atr", 0, 0, 'a' }, - { "help", 0, 0, 'h' }, - { "keep-running", 0, 0, 'k' }, - { "usb-vendor", 1, 0, 'V' }, - { "usb-product", 1, 0, 'P' }, - { "usb-config", 1, 0, 'C' }, - { "usb-interface", 1, 0, 'I' }, - { "usb-altsetting", 1, 0, 'S' }, - { "usb-address", 1, 0, 'A' }, - { "usb-path", 1, 0, 'H' }, - { NULL, 0, 0, 0 } -}; - -static void run_mainloop(struct cardem_inst *ci) -{ - struct st_transport *transp = ci->slot->transp; - unsigned int msg_count, byte_count = 0; - uint8_t buf[16*265]; - int xfer_len; - int rc; - - printf("Entering main loop\n"); - - while (1) { - /* read data from SIMtrace2 device (local or via USB) */ - if (transp->udp_fd < 0) { - rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.in, - buf, sizeof(buf), &xfer_len, 100); - if (rc < 0 && rc != LIBUSB_ERROR_TIMEOUT && - rc != LIBUSB_ERROR_INTERRUPTED && - rc != LIBUSB_ERROR_IO) { - fprintf(stderr, "BULK IN transfer error; rc=%d\n", rc); - return; - } - } else { - rc = read(transp->udp_fd, buf, sizeof(buf)); - if (rc <= 0) { - fprintf(stderr, "shor read from UDP\n"); - return; - } - xfer_len = rc; - } - /* dispatch any incoming data */ - if (xfer_len > 0) { - printf("URB: %s\n", osmo_hexdump(buf, xfer_len)); - process_usb_msg(ci, buf, xfer_len); - msg_count++; - byte_count += xfer_len; - } - } -} - -static struct st_transport _transp; - -static struct st_slot _slot = { - .transp = &_transp, - .slot_nr = 0, -}; - -struct cardem_inst _ci = { - .slot = &_slot, -}; - -struct cardem_inst *ci = &_ci; - -static void signal_handler(int signal) -{ - switch (signal) { - case SIGINT: - cardem_request_card_insert(ci, false); - exit(0); - break; - default: - break; - } -} - -int main(int argc, char **argv) -{ - struct st_transport *transp = ci->slot->transp; - char *gsmtap_host = "127.0.0.1"; - int rc; - int c, ret = 1; - int skip_atr = 0; - int keep_running = 0; - int remote_udp_port = 52342; - int if_num = 0, vendor_id = -1, product_id = -1; - int config_id = -1, altsetting = 0, addr = -1; - char *remote_udp_host = NULL; - char *path = NULL; - struct osim_reader_hdl *reader; - struct osim_card_hdl *card; - - print_welcome(); - - while (1) { - int option_index = 0; - - c = getopt_long(argc, argv, "r:p:hi:V:P:C:I:S:A:H:ak", opts, &option_index); - if (c == -1) - break; - switch (c) { - case 'r': - remote_udp_host = optarg; - break; - case 'p': - remote_udp_port = atoi(optarg); - break; - case 'h': - print_help(); - exit(0); - break; - case 'i': - gsmtap_host = optarg; - break; - case 'a': - skip_atr = 1; - break; - case 'k': - keep_running = 1; - break; - case 'V': - vendor_id = strtol(optarg, NULL, 16); - break; - case 'P': - product_id = strtol(optarg, NULL, 16); - break; - case 'C': - config_id = atoi(optarg); - break; - case 'I': - if_num = atoi(optarg); - break; - case 'S': - altsetting = atoi(optarg); - break; - case 'A': - addr = atoi(optarg); - break; - case 'H': - path = optarg; - break; - } - } - - if (!remote_udp_host && (vendor_id < 0 || product_id < 0)) { - fprintf(stderr, "You have to specify the vendor and product ID\n"); - goto do_exit; - } - - transp->udp_fd = -1; - - ci->card_prof = &osim_uicc_sim_cic_profile; - - if (!remote_udp_host) { - rc = libusb_init(NULL); - if (rc < 0) { - fprintf(stderr, "libusb initialization failed\n"); - goto do_exit; - } - } else { - transp->udp_fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, - remote_udp_host, remote_udp_port+if_num, - OSMO_SOCK_F_CONNECT); - if (transp->udp_fd < 0) { - fprintf(stderr, "error binding UDP port\n"); - goto do_exit; - } - } - - g_gti = gsmtap_source_init(gsmtap_host, GSMTAP_UDP_PORT, 0); - if (!g_gti) { - perror("unable to open GSMTAP"); - goto close_exit; - } - gsmtap_source_add_sink(g_gti); - - reader = osim_reader_open(OSIM_READER_DRV_PCSC, 0, "", NULL); - if (!reader) { - perror("unable to open PC/SC reader"); - goto close_exit; - } - - card = osim_card_open(reader, OSIM_PROTO_T0); - if (!card) { - perror("unable to open SIM card"); - goto close_exit; - } - - ci->chan = llist_entry(card->channels.next, struct osim_chan_hdl, list); - if (!ci->chan) { - perror("SIM card has no channel?!?"); - goto close_exit; - } - - signal(SIGINT, &signal_handler); - - do { - if (transp->udp_fd < 0) { - struct usb_interface_match _ifm, *ifm = &_ifm; - ifm->vendor = vendor_id; - ifm->product = product_id; - ifm->configuration = config_id; - ifm->interface = if_num; - ifm->altsetting = altsetting; - ifm->addr = addr; - if (path) - osmo_strlcpy(ifm->path, path, sizeof(ifm->path)); - transp->usb_devh = usb_open_claim_interface(NULL, ifm); - if (!transp->usb_devh) { - fprintf(stderr, "can't open USB device\n"); - goto close_exit; - } - - rc = libusb_claim_interface(transp->usb_devh, if_num); - if (rc < 0) { - fprintf(stderr, "can't claim interface %d; rc=%d\n", if_num, rc); - goto close_exit; - } - - rc = get_usb_ep_addrs(transp->usb_devh, if_num, &transp->usb_ep.out, - &transp->usb_ep.in, &transp->usb_ep.irq_in); - if (rc < 0) { - fprintf(stderr, "can't obtain EP addrs; rc=%d\n", rc); - goto close_exit; - } - } - - /* simulate card-insert to modem (owhw, not qmod) */ - cardem_request_card_insert(ci, true); - - /* select remote (forwarded) SIM */ - st_modem_sim_select_remote(ci->slot); - - if (!skip_atr) { - /* set the ATR */ - uint8_t real_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, - 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, - 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 }; - atr_update_csum(real_atr, sizeof(real_atr)); - cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); - } - - /* select remote (forwarded) SIM */ - st_modem_reset_pulse(ci->slot, 300); - - run_mainloop(ci); - ret = 0; - - if (transp->udp_fd < 0) - libusb_release_interface(transp->usb_devh, 0); -close_exit: - if (transp->usb_devh) - libusb_close(transp->usb_devh); - if (keep_running) - sleep(1); - } while (keep_running); - - if (transp->udp_fd < 0) - libusb_exit(NULL); -do_exit: - return ret; -} diff --git a/host/simtrace_prot.h b/host/simtrace_prot.h deleted file mode 120000 index a9fffe1..0000000 --- a/host/simtrace_prot.h +++ /dev/null @@ -1 +0,0 @@ -../firmware/libcommon/include/simtrace_prot.h \ No newline at end of file diff --git a/host/simtrace_usb.h b/host/simtrace_usb.h deleted file mode 120000 index f1e0982..0000000 --- a/host/simtrace_usb.h +++ /dev/null @@ -1 +0,0 @@ -../firmware/libcommon/include/simtrace_usb.h \ No newline at end of file diff --git a/host/src/Makefile.am b/host/src/Makefile.am new file mode 100644 index 0000000..b0f1f91 --- /dev/null +++ b/host/src/Makefile.am @@ -0,0 +1,18 @@ +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include +AM_CFLAGS=-Wall -g $(LIBOSMOCORE_CFLAGS) $(LIBOSMOSIM_CFLAGS) $(LIBUSB_CFLAGS) $(COVERAGE_FLAGS) +AM_LDFLAGS=$(COVERAGE_LDFLAGS) + +LDADD= $(top_builddir)/lib/libosmo-simtrace2.la \ + $(LIBOSMOCORE_LIBS) $(LIBOSMOSIM_LIBS) $(LIBUSB_LIBS) + +noinst_HEADERS = simtrace2-discovery.h + +bin_PROGRAMS = simtrace2-remsim simtrace2-remsim-usb2udp simtrace2-list simtrace2-sniff + +simtrace2_remsim_SOURCES = simtrace2-remsim.c simtrace2-discovery.c + +simtrace2_remsim_usb2udp_SOURCES = usb2udp.c simtrace2-discovery.c + +simtrace2_list_SOURCES = simtrace2_usb.c + +simtrace2_sniff_SOURCES = simtrace2-sniff.c simtrace2-discovery.c diff --git a/host/simtrace2-discovery.c b/host/src/simtrace2-discovery.c similarity index 100% rename from host/simtrace2-discovery.c rename to host/src/simtrace2-discovery.c diff --git a/host/simtrace2-discovery.h b/host/src/simtrace2-discovery.h similarity index 100% rename from host/simtrace2-discovery.h rename to host/src/simtrace2-discovery.h diff --git a/host/src/simtrace2-remsim.c b/host/src/simtrace2-remsim.c new file mode 100644 index 0000000..c76e587 --- /dev/null +++ b/host/src/simtrace2-remsim.c @@ -0,0 +1,463 @@ +/* simtrace2-remsim - main program for the host PC to provide a remote SIM + * using the SIMtrace 2 firmware in card emulation mode + * + * (C) 2016-2017 by Harald Welte + * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * This program is free software; you can redistribute it and/or + * modify 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 +#include +#include +#define _GNU_SOURCE +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include "simtrace2-discovery.h" + +#include +#include +#include +#include +#include + +static void atr_update_csum(uint8_t *atr, unsigned int atr_len) +{ + uint8_t csum = 0; + int i; + + for (i = 1; i < atr_len - 1; i++) + csum = csum ^ atr[i]; + + atr[atr_len-1] = csum; +} + +/*********************************************************************** + * Incoming Messages + ***********************************************************************/ + +/*! \brief Process a STATUS message from the SIMtrace2 */ +static int process_do_status(struct cardem_inst *ci, uint8_t *buf, int len) +{ + struct cardemu_usb_msg_status *status; + status = (struct cardemu_usb_msg_status *) buf; + + printf("=> STATUS: flags=0x%x, fi=%u, di=%u, wi=%u wtime=%u\n", + status->flags, status->fi, status->di, status->wi, + status->waiting_time); + + return 0; +} + +/*! \brief Process a PTS indication message from the SIMtrace2 */ +static int process_do_pts(struct cardem_inst *ci, uint8_t *buf, int len) +{ + struct cardemu_usb_msg_pts_info *pts; + pts = (struct cardemu_usb_msg_pts_info *) buf; + + printf("=> PTS req: %s\n", osmo_hexdump(pts->req, sizeof(pts->req))); + + return 0; +} + +/*! \brief Process a RX-DATA indication message from the SIMtrace2 */ +static int process_do_rx_da(struct cardem_inst *ci, uint8_t *buf, int len) +{ + static struct apdu_context ac; + struct cardemu_usb_msg_rx_data *data; + int rc; + + data = (struct cardemu_usb_msg_rx_data *) buf; + + printf("=> DATA: flags=%x, %s: ", data->flags, + osmo_hexdump(data->data, data->data_len)); + + rc = apdu_segment_in(&ac, data->data, data->data_len, + data->flags & CEMU_DATA_F_TPDU_HDR); + + if (rc & APDU_ACT_TX_CAPDU_TO_CARD) { + struct msgb *tmsg = msgb_alloc(1024, "TPDU"); + struct osim_reader_hdl *rh = ci->chan->card->reader; + uint8_t *cur; + + /* Copy TPDU header */ + cur = msgb_put(tmsg, sizeof(ac.hdr)); + memcpy(cur, &ac.hdr, sizeof(ac.hdr)); + /* Copy D(c), if any */ + if (ac.lc.tot) { + cur = msgb_put(tmsg, ac.lc.tot); + memcpy(cur, ac.dc, ac.lc.tot); + } + /* send to actual card */ + tmsg->l3h = tmsg->tail; + rc = rh->ops->transceive(rh, tmsg); + if (rc < 0) { + fprintf(stderr, "error during transceive: %d\n", rc); + msgb_free(tmsg); + return rc; + } + msgb_apdu_sw(tmsg) = msgb_get_u16(tmsg); + ac.sw[0] = msgb_apdu_sw(tmsg) >> 8; + ac.sw[1] = msgb_apdu_sw(tmsg) & 0xff; + printf("SW=0x%04x, len_rx=%d\n", msgb_apdu_sw(tmsg), msgb_l3len(tmsg)); + if (msgb_l3len(tmsg)) + cardem_request_pb_and_tx(ci, ac.hdr.ins, tmsg->l3h, msgb_l3len(tmsg)); + cardem_request_sw_tx(ci, ac.sw); + } else if (ac.lc.tot > ac.lc.cur) { + cardem_request_pb_and_rx(ci, ac.hdr.ins, ac.lc.tot - ac.lc.cur); + } + return 0; +} + +/*! \brief Process an incoming message from the SIMtrace2 */ +static int process_usb_msg(struct cardem_inst *ci, uint8_t *buf, int len) +{ + struct simtrace_msg_hdr *sh = (struct simtrace_msg_hdr *)buf; + int rc; + + printf("-> %s\n", osmo_hexdump(buf, len)); + + buf += sizeof(*sh); + + switch (sh->msg_type) { + case SIMTRACE_MSGT_BD_CEMU_STATUS: + rc = process_do_status(ci, buf, len); + break; + case SIMTRACE_MSGT_DO_CEMU_PTS: + rc = process_do_pts(ci, buf, len); + break; + case SIMTRACE_MSGT_DO_CEMU_RX_DATA: + rc = process_do_rx_da(ci, buf, len); + break; + default: + printf("unknown simtrace msg type 0x%02x\n", sh->msg_type); + rc = -1; + break; + } + + return rc; +} + +static void print_welcome(void) +{ + printf("simtrace2-remsim - Remote SIM card forwarding\n" + "(C) 2010-2017, Harald Welte \n" + "(C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon \n\n"); +} + +static void print_help(void) +{ + printf( "\t-r\t--remote-udp-host HOST\n" + "\t-p\t--remote-udp-port PORT\n" + "\t-h\t--help\n" + "\t-i\t--gsmtap-ip\tA.B.C.D\n" + "\t-a\t--skip-atr\n" + "\t-k\t--keep-running\n" + "\t-V\t--usb-vendor\tVENDOR_ID\n" + "\t-P\t--usb-product\tPRODUCT_ID\n" + "\t-C\t--usb-config\tCONFIG_ID\n" + "\t-I\t--usb-interface\tINTERFACE_ID\n" + "\t-S\t--usb-altsetting ALTSETTING_ID\n" + "\t-A\t--usb-address\tADDRESS\n" + "\t-H\t--usb-path\tPATH\n" + "\n" + ); +} + +static const struct option opts[] = { + { "remote-udp-host", 1, 0, 'r' }, + { "remote-udp-port", 1, 0, 'p' }, + { "gsmtap-ip", 1, 0, 'i' }, + { "skip-atr", 0, 0, 'a' }, + { "help", 0, 0, 'h' }, + { "keep-running", 0, 0, 'k' }, + { "usb-vendor", 1, 0, 'V' }, + { "usb-product", 1, 0, 'P' }, + { "usb-config", 1, 0, 'C' }, + { "usb-interface", 1, 0, 'I' }, + { "usb-altsetting", 1, 0, 'S' }, + { "usb-address", 1, 0, 'A' }, + { "usb-path", 1, 0, 'H' }, + { NULL, 0, 0, 0 } +}; + +static void run_mainloop(struct cardem_inst *ci) +{ + struct st_transport *transp = ci->slot->transp; + unsigned int msg_count, byte_count = 0; + uint8_t buf[16*265]; + int xfer_len; + int rc; + + printf("Entering main loop\n"); + + while (1) { + /* read data from SIMtrace2 device (local or via USB) */ + if (transp->udp_fd < 0) { + rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.in, + buf, sizeof(buf), &xfer_len, 100); + if (rc < 0 && rc != LIBUSB_ERROR_TIMEOUT && + rc != LIBUSB_ERROR_INTERRUPTED && + rc != LIBUSB_ERROR_IO) { + fprintf(stderr, "BULK IN transfer error; rc=%d\n", rc); + return; + } + } else { + rc = read(transp->udp_fd, buf, sizeof(buf)); + if (rc <= 0) { + fprintf(stderr, "shor read from UDP\n"); + return; + } + xfer_len = rc; + } + /* dispatch any incoming data */ + if (xfer_len > 0) { + printf("URB: %s\n", osmo_hexdump(buf, xfer_len)); + process_usb_msg(ci, buf, xfer_len); + msg_count++; + byte_count += xfer_len; + } + } +} + +static struct st_transport _transp; + +static struct st_slot _slot = { + .transp = &_transp, + .slot_nr = 0, +}; + +struct cardem_inst _ci = { + .slot = &_slot, +}; + +struct cardem_inst *ci = &_ci; + +static void signal_handler(int signal) +{ + switch (signal) { + case SIGINT: + cardem_request_card_insert(ci, false); + exit(0); + break; + default: + break; + } +} + +int main(int argc, char **argv) +{ + struct st_transport *transp = ci->slot->transp; + char *gsmtap_host = "127.0.0.1"; + int rc; + int c, ret = 1; + int skip_atr = 0; + int keep_running = 0; + int remote_udp_port = 52342; + int if_num = 0, vendor_id = -1, product_id = -1; + int config_id = -1, altsetting = 0, addr = -1; + char *remote_udp_host = NULL; + char *path = NULL; + struct osim_reader_hdl *reader; + struct osim_card_hdl *card; + + print_welcome(); + + while (1) { + int option_index = 0; + + c = getopt_long(argc, argv, "r:p:hi:V:P:C:I:S:A:H:ak", opts, &option_index); + if (c == -1) + break; + switch (c) { + case 'r': + remote_udp_host = optarg; + break; + case 'p': + remote_udp_port = atoi(optarg); + break; + case 'h': + print_help(); + exit(0); + break; + case 'i': + gsmtap_host = optarg; + break; + case 'a': + skip_atr = 1; + break; + case 'k': + keep_running = 1; + break; + case 'V': + vendor_id = strtol(optarg, NULL, 16); + break; + case 'P': + product_id = strtol(optarg, NULL, 16); + break; + case 'C': + config_id = atoi(optarg); + break; + case 'I': + if_num = atoi(optarg); + break; + case 'S': + altsetting = atoi(optarg); + break; + case 'A': + addr = atoi(optarg); + break; + case 'H': + path = optarg; + break; + } + } + + if (!remote_udp_host && (vendor_id < 0 || product_id < 0)) { + fprintf(stderr, "You have to specify the vendor and product ID\n"); + goto do_exit; + } + + transp->udp_fd = -1; + + ci->card_prof = &osim_uicc_sim_cic_profile; + + if (!remote_udp_host) { + rc = libusb_init(NULL); + if (rc < 0) { + fprintf(stderr, "libusb initialization failed\n"); + goto do_exit; + } + } else { + transp->udp_fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + remote_udp_host, remote_udp_port+if_num, + OSMO_SOCK_F_CONNECT); + if (transp->udp_fd < 0) { + fprintf(stderr, "error binding UDP port\n"); + goto do_exit; + } + } + + rc = osmo_st2_gsmtap_init(gsmtap_host); + if (rc < 0) { + perror("unable to open GSMTAP"); + goto close_exit; + } + + reader = osim_reader_open(OSIM_READER_DRV_PCSC, 0, "", NULL); + if (!reader) { + perror("unable to open PC/SC reader"); + goto close_exit; + } + + card = osim_card_open(reader, OSIM_PROTO_T0); + if (!card) { + perror("unable to open SIM card"); + goto close_exit; + } + + ci->chan = llist_entry(card->channels.next, struct osim_chan_hdl, list); + if (!ci->chan) { + perror("SIM card has no channel?!?"); + goto close_exit; + } + + signal(SIGINT, &signal_handler); + + do { + if (transp->udp_fd < 0) { + struct usb_interface_match _ifm, *ifm = &_ifm; + ifm->vendor = vendor_id; + ifm->product = product_id; + ifm->configuration = config_id; + ifm->interface = if_num; + ifm->altsetting = altsetting; + ifm->addr = addr; + if (path) + osmo_strlcpy(ifm->path, path, sizeof(ifm->path)); + transp->usb_devh = usb_open_claim_interface(NULL, ifm); + if (!transp->usb_devh) { + fprintf(stderr, "can't open USB device\n"); + goto close_exit; + } + + rc = libusb_claim_interface(transp->usb_devh, if_num); + if (rc < 0) { + fprintf(stderr, "can't claim interface %d; rc=%d\n", if_num, rc); + goto close_exit; + } + + rc = get_usb_ep_addrs(transp->usb_devh, if_num, &transp->usb_ep.out, + &transp->usb_ep.in, &transp->usb_ep.irq_in); + if (rc < 0) { + fprintf(stderr, "can't obtain EP addrs; rc=%d\n", rc); + goto close_exit; + } + } + + /* simulate card-insert to modem (owhw, not qmod) */ + cardem_request_card_insert(ci, true); + + /* select remote (forwarded) SIM */ + st_modem_sim_select_remote(ci->slot); + + if (!skip_atr) { + /* set the ATR */ + uint8_t real_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, + 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, + 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 }; + atr_update_csum(real_atr, sizeof(real_atr)); + cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); + } + + /* select remote (forwarded) SIM */ + st_modem_reset_pulse(ci->slot, 300); + + run_mainloop(ci); + ret = 0; + + if (transp->udp_fd < 0) + libusb_release_interface(transp->usb_devh, 0); +close_exit: + if (transp->usb_devh) + libusb_close(transp->usb_devh); + if (keep_running) + sleep(1); + } while (keep_running); + + if (transp->udp_fd < 0) + libusb_exit(NULL); +do_exit: + return ret; +} diff --git a/host/simtrace2-sniff.c b/host/src/simtrace2-sniff.c similarity index 88% rename from host/simtrace2-sniff.c rename to host/src/simtrace2-sniff.c index dddf5cf..f3c37dc 100644 --- a/host/simtrace2-sniff.c +++ b/host/src/simtrace2-sniff.c @@ -37,33 +37,19 @@ #include -#include "libusb_util.h" -#include "simtrace.h" -#include "simtrace_usb.h" -#include "simtrace_prot.h" +#include +#include +#include #include "simtrace2-discovery.h" -#include -#include +#include + #include #include #include #include #include -/* as of August 26, 2018 we don't have any released libosmocore version which includes those - * definitions yet. Let's ensure some backwards compatibility: */ -#ifndef GSMTAP_SIM_APDU -#define GSMTAP_SIM_APDU 0x00 /* APDU data (complete APDU) */ -#define GSMTAP_SIM_ATR 0x01 /* card ATR data */ -#define GSMTAP_SIM_PPS_REQ 0x02 /* PPS request data */ -#define GSMTAP_SIM_PPS_RSP 0x03 /* PPS response data */ -#define GSMTAP_SIM_TPDU_HDR 0x04 /* TPDU command header */ -#define GSMTAP_SIM_TPDU_CMD 0x05 /* TPDU command body */ -#define GSMTAP_SIM_TPDU_RSP 0x06 /* TPDU response body */ -#define GSMTAP_SIM_TPDU_SW 0x07 /* TPDU response trailer */ -#endif - /* transport to a SIMtrace device */ struct st_transport { /* USB */ @@ -75,39 +61,6 @@ } usb_ep; }; -/* global GSMTAP instance */ -static struct gsmtap_inst *g_gti; - -static int gsmtap_send_sim(uint8_t sub_type, const uint8_t *data, unsigned int len) -{ - struct gsmtap_hdr *gh; - unsigned int gross_len = len + sizeof(*gh); - uint8_t *buf = malloc(gross_len); - int rc; - - if (!buf) - return -ENOMEM; - - memset(buf, 0, sizeof(*gh)); - gh = (struct gsmtap_hdr *) buf; - gh->version = GSMTAP_VERSION; - gh->hdr_len = sizeof(*gh)/4; - gh->type = GSMTAP_TYPE_SIM; - gh->sub_type = sub_type; - - memcpy(buf + sizeof(*gh), data, len); - - rc = write(gsmtap_inst_fd(g_gti), buf, gross_len); - if (rc < 0) { - perror("write gsmtap"); - free(buf); - return rc; - } - - free(buf); - return 0; -} - const struct value_string change_flags[] = { { .value = SNIFF_CHANGE_FLAG_CARD_INSERT, @@ -252,11 +205,11 @@ /* Send message as GSNTAP */ switch (type) { case SIMTRACE_MSGT_SNIFF_ATR: - gsmtap_send_sim(GSMTAP_SIM_ATR, data->data, data->length); + osmo_st2_gsmtap_send_apdu(GSMTAP_SIM_ATR, data->data, data->length); break; case SIMTRACE_MSGT_SNIFF_TPDU: /* TPDU is now considered as APDU since SIMtrace sends complete TPDU */ - gsmtap_send_sim(GSMTAP_SIM_APDU, data->data, data->length); + osmo_st2_gsmtap_send_apdu(GSMTAP_SIM_APDU, data->data, data->length); break; default: break; @@ -542,12 +495,11 @@ } printf("(%s)\n", strbuf); - g_gti = gsmtap_source_init(gsmtap_host, GSMTAP_UDP_PORT, 0); - if (!g_gti) { + rc = osmo_st2_gsmtap_init(gsmtap_host); + if (rc < 0) { perror("unable to open GSMTAP"); goto close_exit; } - gsmtap_source_add_sink(g_gti); signal(SIGINT, &signal_handler); diff --git a/host/simtrace2_usb.c b/host/src/simtrace2_usb.c similarity index 96% rename from host/simtrace2_usb.c rename to host/src/simtrace2_usb.c index 1e3104a..d31ff29 100644 --- a/host/simtrace2_usb.c +++ b/host/src/simtrace2_usb.c @@ -23,8 +23,8 @@ #include -#include "libusb_util.h" -#include "simtrace_usb.h" +#include +#include static const struct dev_id compatible_dev_ids[] = { { USB_VENDOR_OPENMOKO, USB_PRODUCT_OWHW_SAM3 }, diff --git a/host/usb2udp.c b/host/src/usb2udp.c similarity index 98% rename from host/usb2udp.c rename to host/src/usb2udp.c index 97ffad0..9927594 100644 --- a/host/usb2udp.c +++ b/host/src/usb2udp.c @@ -35,9 +35,8 @@ #include -#include "simtrace_usb.h" -#include "simtrace_prot.h" -#include "apdu_dispatch.h" +#include +#include #include "simtrace2-discovery.h" #include -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I57e77f927ee9e169cc794c5dc6b128a2d590201b Gerrit-Change-Number: 16194 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 22:16:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 22:16:19 +0000 Subject: Change in simtrace2[master]: use osmo_st2_ or osmo_ prefix for [shared] library symbols References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16195 ) Change subject: use osmo_st2_ or osmo_ prefix for [shared] library symbols ...................................................................... use osmo_st2_ or osmo_ prefix for [shared] library symbols Change-Id: Ie2686b30717b9541b1217802ca967cd0a4cbde9b --- M host/include/osmocom/simtrace2/apdu_dispatch.h M host/include/osmocom/simtrace2/simtrace2_api.h M host/lib/apdu_dispatch.c M host/lib/gsmtap.c M host/lib/simtrace2_api.c M host/src/simtrace2-remsim.c 6 files changed, 87 insertions(+), 75 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/95/16195/1 diff --git a/host/include/osmocom/simtrace2/apdu_dispatch.h b/host/include/osmocom/simtrace2/apdu_dispatch.h index 2c99858..af9c989 100644 --- a/host/include/osmocom/simtrace2/apdu_dispatch.h +++ b/host/include/osmocom/simtrace2/apdu_dispatch.h @@ -23,7 +23,7 @@ #include -struct apdu_context { +struct osmo_apdu_context { struct osim_apdu_cmd_hdr hdr; uint8_t dc[256]; uint8_t de[256]; @@ -39,11 +39,11 @@ } le; }; -enum apdu_action { +enum osmo_apdu_action { APDU_ACT_TX_CAPDU_TO_CARD = 0x0001, APDU_ACT_RX_MORE_CAPDU_FROM_READER = 0x0002, }; -int apdu_segment_in(struct apdu_context *ac, const uint8_t *apdu_buf, - unsigned int apdu_len, bool new_apdu); +int osmo_apdu_segment_in(struct osmo_apdu_context *ac, const uint8_t *apdu_buf, + unsigned int apdu_len, bool new_apdu); diff --git a/host/include/osmocom/simtrace2/simtrace2_api.h b/host/include/osmocom/simtrace2/simtrace2_api.h index 5a9f4a3..d31fb85 100644 --- a/host/include/osmocom/simtrace2/simtrace2_api.h +++ b/host/include/osmocom/simtrace2/simtrace2_api.h @@ -4,7 +4,7 @@ #include /* transport to a SIMtrace device */ -struct st_transport { +struct osmo_st2_transport { /* USB */ struct libusb_device_handle *usb_devh; struct { @@ -18,35 +18,41 @@ }; /* a SIMtrace slot; communicates over a transport */ -struct st_slot { +struct osmo_st2_slot { /* transport through which the slot can be reached */ - struct st_transport *transp; + struct osmo_st2_transport *transp; /* number of the slot within the transport */ uint8_t slot_nr; }; /* One istance of card emulation */ -struct cardem_inst { +struct osmo_st2_cardem_inst { /* slot on which this card emulation instance runs */ - struct st_slot *slot; + struct osmo_st2_slot *slot; /* libosmosim SIM card profile */ const struct osim_cla_ins_card_profile *card_prof; /* libosmosim SIM card channel */ struct osim_chan_hdl *chan; }; +int osmo_st2_transp_tx_msg(struct osmo_st2_transport *transp, struct msgb *msg); -int cardem_request_card_insert(struct cardem_inst *ci, bool inserted); -int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t le); -int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, - const uint8_t *data, uint16_t data_len_in); -int cardem_request_sw_tx(struct cardem_inst *ci, const uint8_t *sw); -int cardem_request_set_atr(struct cardem_inst *ci, const uint8_t *atr, unsigned int atr_len); +int osmo_st2_slot_tx_msg(struct osmo_st2_slot *slot, struct msgb *msg, + uint8_t msg_class, uint8_t msg_type); -int st_modem_reset_pulse(struct st_slot *slot, uint16_t duration_ms); -int st_modem_reset_active(struct st_slot *slot); -int st_modem_reset_inactive(struct st_slot *slot); -int st_modem_sim_select_local(struct st_slot *slot); -int st_modem_sim_select_remote(struct st_slot *slot); -int st_modem_get_status(struct st_slot *slot); +int osmo_st2_cardem_request_card_insert(struct osmo_st2_cardem_inst *ci, bool inserted); +int osmo_st2_cardem_request_pb_and_rx(struct osmo_st2_cardem_inst *ci, uint8_t pb, uint8_t le); +int osmo_st2_cardem_request_pb_and_tx(struct osmo_st2_cardem_inst *ci, uint8_t pb, + const uint8_t *data, uint16_t data_len_in); +int osmo_st2_cardem_request_sw_tx(struct osmo_st2_cardem_inst *ci, const uint8_t *sw); +int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8_t *atr, + unsigned int atr_len); + + +int osmo_st2_modem_reset_pulse(struct osmo_st2_slot *slot, uint16_t duration_ms); +int osmo_st2_modem_reset_active(struct osmo_st2_slot *slot); +int osmo_st2_modem_reset_inactive(struct osmo_st2_slot *slot); +int osmo_st2_modem_sim_select_local(struct osmo_st2_slot *slot); +int osmo_st2_modem_sim_select_remote(struct osmo_st2_slot *slot); +int osmo_st2_modem_get_status(struct osmo_st2_slot *slot); diff --git a/host/lib/apdu_dispatch.c b/host/lib/apdu_dispatch.c index ae892eb..62a75aa 100644 --- a/host/lib/apdu_dispatch.c +++ b/host/lib/apdu_dispatch.c @@ -30,13 +30,13 @@ #include /*! \brief Has the command-data phase been completed yet? */ -static inline bool is_dc_complete(struct apdu_context *ac) +static inline bool is_dc_complete(struct osmo_apdu_context *ac) { return (ac->lc.tot == ac->lc.cur); } /*! \brief Has the expected-data phase been completed yet? */ -static inline bool is_de_complete(struct apdu_context *ac) +static inline bool is_de_complete(struct osmo_apdu_context *ac) { return (ac->le.tot == ac->le.cur); } @@ -50,7 +50,7 @@ return buf; } -static void dump_apdu_ctx(const struct apdu_context *ac) +static void dump_apdu_ctx(const struct osmo_apdu_context *ac) { printf("%s; case=%d, lc=%d(%d), le=%d(%d)\n", dump_apdu_hdr(&ac->hdr), ac->apdu_case, @@ -71,8 +71,8 @@ * The function retunrs APDU_ACT_RX_MORE_CAPDU_FROM_READER when there * is more data to be received from the card reader (GSM Phone). */ -int apdu_segment_in(struct apdu_context *ac, const uint8_t *apdu_buf, - unsigned int apdu_len, bool new_apdu) +int osmo_apdu_segment_in(struct osmo_apdu_context *ac, const uint8_t *apdu_buf, + unsigned int apdu_len, bool new_apdu) { int rc = 0; diff --git a/host/lib/gsmtap.c b/host/lib/gsmtap.c index d5575e0..103f2fc 100644 --- a/host/lib/gsmtap.c +++ b/host/lib/gsmtap.c @@ -8,9 +8,10 @@ #include #include -/* global GSMTAP instance */ +/*! global GSMTAP instance */ static struct gsmtap_inst *g_gti; +/*! initialize the global GSMTAP instance for SIM traces */ int osmo_st2_gsmtap_init(const char *gsmtap_host) { if (g_gti) @@ -26,6 +27,11 @@ return 0; } +/*! log one APDU via the global GSMTAP instance. + * \param[in] sub_type GSMTAP sub-type (GSMTAP_SIM_* constant) + * \param[in] apdu User-provided buffer with APDU to log + * \param[in] len Length of apdu in bytes + */ int osmo_st2_gsmtap_send_apdu(uint8_t sub_type, const uint8_t *apdu, unsigned int len) { struct gsmtap_hdr *gh; diff --git a/host/lib/simtrace2_api.c b/host/lib/simtrace2_api.c index 0d48b8e..7a0289d 100644 --- a/host/lib/simtrace2_api.c +++ b/host/lib/simtrace2_api.c @@ -69,7 +69,7 @@ #endif /*! \brief Transmit a given command to the SIMtrace2 device */ -int st_transp_tx_msg(struct st_transport *transp, struct msgb *msg) +int osmo_st2_transp_tx_msg(struct osmo_st2_transport *transp, struct msgb *msg) { int rc; @@ -106,12 +106,12 @@ /* transmit a given message to a specified slot. Expects all headers * present before calling the function */ -int st_slot_tx_msg(struct st_slot *slot, struct msgb *msg, - uint8_t msg_class, uint8_t msg_type) +int osmo_st2_slot_tx_msg(struct osmo_st2_slot *slot, struct msgb *msg, + uint8_t msg_class, uint8_t msg_type) { st_push_hdr(msg, msg_class, msg_type, slot->slot_nr); - return st_transp_tx_msg(slot->transp, msg); + return osmo_st2_transp_tx_msg(slot->transp, msg); } /*********************************************************************** @@ -120,7 +120,7 @@ /*! \brief Request the SIMtrace2 to generate a card-insert signal */ -int cardem_request_card_insert(struct cardem_inst *ci, bool inserted) +int osmo_st2_cardem_request_card_insert(struct osmo_st2_cardem_inst *ci, bool inserted) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_cardinsert *cins; @@ -130,11 +130,11 @@ if (inserted) cins->card_insert = 1; - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_CARDINSERT); + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_CARDINSERT); } /*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Rx */ -int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t le) +int osmo_st2_cardem_request_pb_and_rx(struct osmo_st2_cardem_inst *ci, uint8_t pb, uint8_t le) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_tx_data *txd; @@ -148,12 +148,12 @@ /* one data byte */ msgb_put_u8(msg, pb); - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); } /*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Tx */ -int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, - const uint8_t *data, uint16_t data_len_in) +int osmo_st2_cardem_request_pb_and_tx(struct osmo_st2_cardem_inst *ci, uint8_t pb, + const uint8_t *data, uint16_t data_len_in) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_tx_data *txd; @@ -173,11 +173,11 @@ cur = msgb_put(msg, data_len_in); memcpy(cur, data, data_len_in); - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); } /*! \brief Request the SIMtrace2 to send a Status Word */ -int cardem_request_sw_tx(struct cardem_inst *ci, const uint8_t *sw) +int osmo_st2_cardem_request_sw_tx(struct osmo_st2_cardem_inst *ci, const uint8_t *sw) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_tx_data *txd; @@ -194,10 +194,10 @@ cur[0] = sw[0]; cur[1] = sw[1]; - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); } -int cardem_request_set_atr(struct cardem_inst *ci, const uint8_t *atr, unsigned int atr_len) +int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8_t *atr, unsigned int atr_len) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_set_atr *satr; @@ -212,14 +212,14 @@ cur = msgb_put(msg, atr_len); memcpy(cur, atr, atr_len); - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); } /*********************************************************************** * Modem Control protocol ***********************************************************************/ -static int _modem_reset(struct st_slot *slot, uint8_t asserted, uint16_t pulse_ms) +static int _modem_reset(struct osmo_st2_slot *slot, uint8_t asserted, uint16_t pulse_ms) { struct msgb *msg = st_msgb_alloc(); struct st_modem_reset *sr ; @@ -228,28 +228,28 @@ sr->asserted = asserted; sr->pulse_duration_msec = pulse_ms; - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_RESET); + return osmo_st2_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_RESET); } /*! \brief pulse the RESET line of the modem for \a duration_ms milli-seconds*/ -int st_modem_reset_pulse(struct st_slot *slot, uint16_t duration_ms) +int osmo_st2_modem_reset_pulse(struct osmo_st2_slot *slot, uint16_t duration_ms) { return _modem_reset(slot, 2, duration_ms); } /*! \brief assert the RESET line of the modem */ -int st_modem_reset_active(struct st_slot *slot) +int osmo_st2_modem_reset_active(struct osmo_st2_slot *slot) { return _modem_reset(slot, 1, 0); } /*! \brief de-assert the RESET line of the modem */ -int st_modem_reset_inactive(struct st_slot *slot) +int osmo_st2_modem_reset_inactive(struct osmo_st2_slot *slot) { return _modem_reset(slot, 0, 0); } -static int _modem_sim_select(struct st_slot *slot, uint8_t remote_sim) +static int _modem_sim_select(struct osmo_st2_slot *slot, uint8_t remote_sim) { struct msgb *msg = st_msgb_alloc(); struct st_modem_sim_select *ss; @@ -257,25 +257,25 @@ ss = (struct st_modem_sim_select *) msgb_put(msg, sizeof(*ss)); ss->remote_sim = remote_sim; - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_SIM_SELECT); + return osmo_st2_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_SIM_SELECT); } /*! \brief select local (physical) SIM for given slot */ -int st_modem_sim_select_local(struct st_slot *slot) +int osmo_st2_modem_sim_select_local(struct osmo_st2_slot *slot) { return _modem_sim_select(slot, 0); } /*! \brief select remote (emulated/forwarded) SIM for given slot */ -int st_modem_sim_select_remote(struct st_slot *slot) +int osmo_st2_modem_sim_select_remote(struct osmo_st2_slot *slot) { return _modem_sim_select(slot, 1); } /*! \brief Request slot to send us status information about the modem */ -int st_modem_get_status(struct st_slot *slot) +int osmo_st2_modem_get_status(struct osmo_st2_slot *slot) { struct msgb *msg = st_msgb_alloc(); - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_BD_MODEM_STATUS); + return osmo_st2_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_BD_MODEM_STATUS); } diff --git a/host/src/simtrace2-remsim.c b/host/src/simtrace2-remsim.c index c76e587..5362733 100644 --- a/host/src/simtrace2-remsim.c +++ b/host/src/simtrace2-remsim.c @@ -68,7 +68,7 @@ ***********************************************************************/ /*! \brief Process a STATUS message from the SIMtrace2 */ -static int process_do_status(struct cardem_inst *ci, uint8_t *buf, int len) +static int process_do_status(struct osmo_st2_cardem_inst *ci, uint8_t *buf, int len) { struct cardemu_usb_msg_status *status; status = (struct cardemu_usb_msg_status *) buf; @@ -81,7 +81,7 @@ } /*! \brief Process a PTS indication message from the SIMtrace2 */ -static int process_do_pts(struct cardem_inst *ci, uint8_t *buf, int len) +static int process_do_pts(struct osmo_st2_cardem_inst *ci, uint8_t *buf, int len) { struct cardemu_usb_msg_pts_info *pts; pts = (struct cardemu_usb_msg_pts_info *) buf; @@ -92,9 +92,9 @@ } /*! \brief Process a RX-DATA indication message from the SIMtrace2 */ -static int process_do_rx_da(struct cardem_inst *ci, uint8_t *buf, int len) +static int process_do_rx_da(struct osmo_st2_cardem_inst *ci, uint8_t *buf, int len) { - static struct apdu_context ac; + static struct osmo_apdu_context ac; struct cardemu_usb_msg_rx_data *data; int rc; @@ -103,8 +103,8 @@ printf("=> DATA: flags=%x, %s: ", data->flags, osmo_hexdump(data->data, data->data_len)); - rc = apdu_segment_in(&ac, data->data, data->data_len, - data->flags & CEMU_DATA_F_TPDU_HDR); + rc = osmo_apdu_segment_in(&ac, data->data, data->data_len, + data->flags & CEMU_DATA_F_TPDU_HDR); if (rc & APDU_ACT_TX_CAPDU_TO_CARD) { struct msgb *tmsg = msgb_alloc(1024, "TPDU"); @@ -132,16 +132,16 @@ ac.sw[1] = msgb_apdu_sw(tmsg) & 0xff; printf("SW=0x%04x, len_rx=%d\n", msgb_apdu_sw(tmsg), msgb_l3len(tmsg)); if (msgb_l3len(tmsg)) - cardem_request_pb_and_tx(ci, ac.hdr.ins, tmsg->l3h, msgb_l3len(tmsg)); - cardem_request_sw_tx(ci, ac.sw); + osmo_st2_cardem_request_pb_and_tx(ci, ac.hdr.ins, tmsg->l3h, msgb_l3len(tmsg)); + osmo_st2_cardem_request_sw_tx(ci, ac.sw); } else if (ac.lc.tot > ac.lc.cur) { - cardem_request_pb_and_rx(ci, ac.hdr.ins, ac.lc.tot - ac.lc.cur); + osmo_st2_cardem_request_pb_and_rx(ci, ac.hdr.ins, ac.lc.tot - ac.lc.cur); } return 0; } /*! \brief Process an incoming message from the SIMtrace2 */ -static int process_usb_msg(struct cardem_inst *ci, uint8_t *buf, int len) +static int process_usb_msg(struct osmo_st2_cardem_inst *ci, uint8_t *buf, int len) { struct simtrace_msg_hdr *sh = (struct simtrace_msg_hdr *)buf; int rc; @@ -212,9 +212,9 @@ { NULL, 0, 0, 0 } }; -static void run_mainloop(struct cardem_inst *ci) +static void run_mainloop(struct osmo_st2_cardem_inst *ci) { - struct st_transport *transp = ci->slot->transp; + struct osmo_st2_transport *transp = ci->slot->transp; unsigned int msg_count, byte_count = 0; uint8_t buf[16*265]; int xfer_len; @@ -251,24 +251,24 @@ } } -static struct st_transport _transp; +static struct osmo_st2_transport _transp; -static struct st_slot _slot = { +static struct osmo_st2_slot _slot = { .transp = &_transp, .slot_nr = 0, }; -struct cardem_inst _ci = { +struct osmo_st2_cardem_inst _ci = { .slot = &_slot, }; -struct cardem_inst *ci = &_ci; +struct osmo_st2_cardem_inst *ci = &_ci; static void signal_handler(int signal) { switch (signal) { case SIGINT: - cardem_request_card_insert(ci, false); + osmo_st2_cardem_request_card_insert(ci, false); exit(0); break; default: @@ -278,7 +278,7 @@ int main(int argc, char **argv) { - struct st_transport *transp = ci->slot->transp; + struct osmo_st2_transport *transp = ci->slot->transp; char *gsmtap_host = "127.0.0.1"; int rc; int c, ret = 1; @@ -427,10 +427,10 @@ } /* simulate card-insert to modem (owhw, not qmod) */ - cardem_request_card_insert(ci, true); + osmo_st2_cardem_request_card_insert(ci, true); /* select remote (forwarded) SIM */ - st_modem_sim_select_remote(ci->slot); + osmo_st2_modem_sim_select_remote(ci->slot); if (!skip_atr) { /* set the ATR */ @@ -438,11 +438,11 @@ 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 }; atr_update_csum(real_atr, sizeof(real_atr)); - cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); + osmo_st2_cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); } /* select remote (forwarded) SIM */ - st_modem_reset_pulse(ci->slot, 300); + osmo_st2_modem_reset_pulse(ci->slot, 300); run_mainloop(ci); ret = 0; -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie2686b30717b9541b1217802ca967cd0a4cbde9b Gerrit-Change-Number: 16195 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Nov 24 22:16:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 24 Nov 2019 22:16:19 +0000 Subject: Change in simtrace2[master]: merge simtrace2-discovery.[ch] to libusb_util.[ch] References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16196 ) Change subject: merge simtrace2-discovery.[ch] to libusb_util.[ch] ...................................................................... merge simtrace2-discovery.[ch] to libusb_util.[ch] Change-Id: I4defbec70986a90c1f0cfb7587393265b73c0163 --- M host/include/osmocom/simtrace2/libusb_util.h M host/lib/libusb_util.c M host/src/Makefile.am D host/src/simtrace2-discovery.c D host/src/simtrace2-discovery.h M host/src/simtrace2-remsim.c M host/src/simtrace2-sniff.c M host/src/usb2udp.c 8 files changed, 48 insertions(+), 129 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/96/16196/1 diff --git a/host/include/osmocom/simtrace2/libusb_util.h b/host/include/osmocom/simtrace2/libusb_util.h index 2b2d92e..3280b27 100644 --- a/host/include/osmocom/simtrace2/libusb_util.h +++ b/host/include/osmocom/simtrace2/libusb_util.h @@ -68,3 +68,6 @@ libusb_device_handle *usb_open_claim_interface(libusb_context *ctx, const struct usb_interface_match *ifm); + +int get_usb_ep_addrs(libusb_device_handle *devh, unsigned int if_num, + uint8_t *out, uint8_t *in, uint8_t *irq); diff --git a/host/lib/libusb_util.c b/host/lib/libusb_util.c index d88b043..50cd087 100644 --- a/host/lib/libusb_util.c +++ b/host/lib/libusb_util.c @@ -295,3 +295,44 @@ return usb_devh; } + +/*! \brief obtain the endpoint addresses for a given USB interface */ +int get_usb_ep_addrs(libusb_device_handle *devh, unsigned int if_num, + uint8_t *out, uint8_t *in, uint8_t *irq) +{ + libusb_device *dev = libusb_get_device(devh); + struct libusb_config_descriptor *cdesc; + const struct libusb_interface_descriptor *idesc; + const struct libusb_interface *iface; + int rc, l; + + rc = libusb_get_active_config_descriptor(dev, &cdesc); + if (rc < 0) + return rc; + + iface = &cdesc->interface[if_num]; + /* FIXME: we assume there's no altsetting */ + idesc = &iface->altsetting[0]; + + for (l = 0; l < idesc->bNumEndpoints; l++) { + const struct libusb_endpoint_descriptor *edesc = &idesc->endpoint[l]; + switch (edesc->bmAttributes & 3) { + case LIBUSB_TRANSFER_TYPE_BULK: + if (edesc->bEndpointAddress & 0x80) { + if (in) + *in = edesc->bEndpointAddress; + } else { + if (out) + *out = edesc->bEndpointAddress; + } + break; + case LIBUSB_TRANSFER_TYPE_INTERRUPT: + if (irq) + *irq = edesc->bEndpointAddress; + break; + default: + break; + } + } + return 0; +} diff --git a/host/src/Makefile.am b/host/src/Makefile.am index b0f1f91..29f2405 100644 --- a/host/src/Makefile.am +++ b/host/src/Makefile.am @@ -5,14 +5,12 @@ LDADD= $(top_builddir)/lib/libosmo-simtrace2.la \ $(LIBOSMOCORE_LIBS) $(LIBOSMOSIM_LIBS) $(LIBUSB_LIBS) -noinst_HEADERS = simtrace2-discovery.h - bin_PROGRAMS = simtrace2-remsim simtrace2-remsim-usb2udp simtrace2-list simtrace2-sniff -simtrace2_remsim_SOURCES = simtrace2-remsim.c simtrace2-discovery.c +simtrace2_remsim_SOURCES = simtrace2-remsim.c -simtrace2_remsim_usb2udp_SOURCES = usb2udp.c simtrace2-discovery.c +simtrace2_remsim_usb2udp_SOURCES = usb2udp.c simtrace2_list_SOURCES = simtrace2_usb.c -simtrace2_sniff_SOURCES = simtrace2-sniff.c simtrace2-discovery.c +simtrace2_sniff_SOURCES = simtrace2-sniff.c diff --git a/host/src/simtrace2-discovery.c b/host/src/simtrace2-discovery.c deleted file mode 100644 index a7306ce..0000000 --- a/host/src/simtrace2-discovery.c +++ /dev/null @@ -1,94 +0,0 @@ -/* simtrace2-discovery - host PC library to scan for matching USB - * devices - * - * (C) 2016 by Harald Welte - * - * This program is free software; you can redistribute it and/or - * modify 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 - -/*! \brief obtain the endpoint addresses for a given USB interface */ -int get_usb_ep_addrs(libusb_device_handle *devh, unsigned int if_num, - uint8_t *out, uint8_t *in, uint8_t *irq) -{ - libusb_device *dev = libusb_get_device(devh); - struct libusb_config_descriptor *cdesc; - const struct libusb_interface_descriptor *idesc; - const struct libusb_interface *iface; - int rc, l; - - rc = libusb_get_active_config_descriptor(dev, &cdesc); - if (rc < 0) - return rc; - - iface = &cdesc->interface[if_num]; - /* FIXME: we assume there's no altsetting */ - idesc = &iface->altsetting[0]; - - for (l = 0; l < idesc->bNumEndpoints; l++) { - const struct libusb_endpoint_descriptor *edesc = &idesc->endpoint[l]; - switch (edesc->bmAttributes & 3) { - case LIBUSB_TRANSFER_TYPE_BULK: - if (edesc->bEndpointAddress & 0x80) { - if (in) - *in = edesc->bEndpointAddress; - } else { - if (out) - *out = edesc->bEndpointAddress; - } - break; - case LIBUSB_TRANSFER_TYPE_INTERRUPT: - if (irq) - *irq = edesc->bEndpointAddress; - break; - default: - break; - } - } - return 0; -} - -#if 0 - struct libusb_device_descriptor ddesc; - int rc, i, j, k; - - rc = libusb_get_device_descriptor(devh, &ddesc); - if (rc < 0) - return; - - for (i = 0; i < ddesc.bNumConfigurations; i++) { - struct libusb_config_descriptor *cdesc; - rc = libusb_get_config_descriptor(devh, i, &cdesc); - if (rc < 0) - return; - - for (j = 0; j < cdesc->bNumInterfaces; j++) { - const struct libusb_interface *iface = cdesc->interface[j]; - for (k = 0; k < iface->num_altsetting; k++) { - const struct libusb_interface_descriptor *idesc = iface->altsetting[k]; - /* make sure this is the interface we're looking for */ - if (idesc->bInterfaceClass != 0xFF || - idesc->bInterfaceSubClass != if_class || - idsec->bInterfaceProtocol != if_proto) - continue; - /* FIXME */ - } - } - - libusb_free_config_descriptor(cdesc); - } -#endif diff --git a/host/src/simtrace2-discovery.h b/host/src/simtrace2-discovery.h deleted file mode 100644 index cfba956..0000000 --- a/host/src/simtrace2-discovery.h +++ /dev/null @@ -1,26 +0,0 @@ -/* simtrace2-discovery - host PC library to scan for matching USB - * devices - * - * (C) 2016 by Harald Welte - * - * This program is free software; you can redistribute it and/or - * modify 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. - */ -#pragma once - -#include -#include - -int get_usb_ep_addrs(libusb_device_handle *devh, unsigned int if_num, - uint8_t *out, uint8_t *in, uint8_t *irq); diff --git a/host/src/simtrace2-remsim.c b/host/src/simtrace2-remsim.c index 5362733..03d11df 100644 --- a/host/src/simtrace2-remsim.c +++ b/host/src/simtrace2-remsim.c @@ -44,8 +44,6 @@ #include #include -#include "simtrace2-discovery.h" - #include #include #include diff --git a/host/src/simtrace2-sniff.c b/host/src/simtrace2-sniff.c index f3c37dc..7e8e5eb 100644 --- a/host/src/simtrace2-sniff.c +++ b/host/src/simtrace2-sniff.c @@ -40,7 +40,6 @@ #include #include #include -#include "simtrace2-discovery.h" #include diff --git a/host/src/usb2udp.c b/host/src/usb2udp.c index 9927594..23800fd 100644 --- a/host/src/usb2udp.c +++ b/host/src/usb2udp.c @@ -37,7 +37,7 @@ #include #include -#include "simtrace2-discovery.h" +#include #include #include -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I4defbec70986a90c1f0cfb7587393265b73c0163 Gerrit-Change-Number: 16196 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:45:57 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:45:57 +0000 Subject: Change in osmo-hlr[master]: add osmo_gsup_msgb_alloc() In-Reply-To: References: Message-ID: Hello fixeria, laforge, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/15915 to look at the new patch set (#9). Change subject: add osmo_gsup_msgb_alloc() ...................................................................... add osmo_gsup_msgb_alloc() Throughout osmo-hlr's code, the GSUP msgb allocation is duplicated as: msgb_alloc_headroom(1024+16, 16, "foo"); Instead, use one common function to keep the magic numbers in one place. Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e --- M include/osmocom/hlr/gsup_server.h M src/gsup_server.c M src/hlr.c M src/hlr_ussd.c M src/luop.c 5 files changed, 17 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/15915/9 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e Gerrit-Change-Number: 15915 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:00 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:00 +0000 Subject: Change in osmo-hlr[master]: move headers to include/osmocom/hlr References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16197 ) Change subject: move headers to include/osmocom/hlr ...................................................................... move headers to include/osmocom/hlr Apply the same headers structure that we keep in most Osmocom source trees: Keep noinst_HEADERS in include/osmocom/hlr and include them using #include The only header kept in src/ is db_bootstrap.h, because it is generated during build time. If it was built in include/osmocom/hlr, we would need db.o to depend on db_bootstrap.h in a different subdir, which automake can't do well. Change-Id: Ic912fe27f545b85443c5fb713d8c3c8aac23c9ad --- M configure.ac M include/Makefile.am A include/osmocom/Makefile.am A include/osmocom/hlr/Makefile.am R include/osmocom/hlr/auc.h R include/osmocom/hlr/ctrl.h R include/osmocom/hlr/db.h R include/osmocom/hlr/gsup_router.h R include/osmocom/hlr/gsup_server.h R include/osmocom/hlr/hlr.h R include/osmocom/hlr/hlr_ussd.h R include/osmocom/hlr/hlr_vty.h R include/osmocom/hlr/hlr_vty_subscr.h R include/osmocom/hlr/logging.h R include/osmocom/hlr/luop.h R include/osmocom/hlr/rand.h M src/Makefile.am M src/auc.c M src/ctrl.c M src/db.c M src/db_auc.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/hlr.c M src/hlr_db_tool.c M src/hlr_ussd.c M src/hlr_vty.c M src/hlr_vty_subscr.c M src/logging.c M src/luop.c M src/osmo-euse-demo.c M tests/auc/Makefile.am M tests/auc/auc_test.c M tests/auc/gen_ts_55_205_test_sets/main_template.c M tests/db/Makefile.am M tests/db/db_test.c M tests/gsup/Makefile.am M tests/gsup/gsup_test.c M tests/gsup_server/Makefile.am M tests/gsup_server/gsup_server_test.c 42 files changed, 99 insertions(+), 90 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/97/16197/1 diff --git a/configure.ac b/configure.ac index ca78f38..f7714aa 100644 --- a/configure.ac +++ b/configure.ac @@ -175,6 +175,8 @@ src/Makefile src/gsupclient/Makefile include/Makefile + include/osmocom/Makefile + include/osmocom/hlr/Makefile libosmo-gsup-client.pc sql/Makefile doc/manuals/Makefile diff --git a/include/Makefile.am b/include/Makefile.am index dac7011..d8eb1ec 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,2 +1,3 @@ -nobase_include_HEADERS = osmocom/gsupclient/gsup_client.h +SUBDIRS = osmocom +nobase_include_HEADERS = osmocom/gsupclient/gsup_client.h diff --git a/include/osmocom/Makefile.am b/include/osmocom/Makefile.am new file mode 100644 index 0000000..dbc2344 --- /dev/null +++ b/include/osmocom/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = \ + hlr \ + $(NULL) diff --git a/include/osmocom/hlr/Makefile.am b/include/osmocom/hlr/Makefile.am new file mode 100644 index 0000000..77a8764 --- /dev/null +++ b/include/osmocom/hlr/Makefile.am @@ -0,0 +1,14 @@ +noinst_HEADERS = \ + auc.h \ + ctrl.h \ + db.h \ + gsup_router.h \ + gsup_server.h \ + hlr.h \ + hlr_ussd.h \ + hlr_vty.h \ + hlr_vty_subscr.h \ + logging.h \ + luop.h \ + rand.h \ + $(NULL) diff --git a/src/auc.h b/include/osmocom/hlr/auc.h similarity index 100% rename from src/auc.h rename to include/osmocom/hlr/auc.h diff --git a/src/ctrl.h b/include/osmocom/hlr/ctrl.h similarity index 100% rename from src/ctrl.h rename to include/osmocom/hlr/ctrl.h diff --git a/src/db.h b/include/osmocom/hlr/db.h similarity index 100% rename from src/db.h rename to include/osmocom/hlr/db.h diff --git a/src/gsup_router.h b/include/osmocom/hlr/gsup_router.h similarity index 94% rename from src/gsup_router.h rename to include/osmocom/hlr/gsup_router.h index bff484e..0fc10d0 100644 --- a/src/gsup_router.h +++ b/include/osmocom/hlr/gsup_router.h @@ -1,7 +1,7 @@ #pragma once #include -#include "gsup_server.h" +#include struct gsup_route { struct llist_head list; diff --git a/src/gsup_server.h b/include/osmocom/hlr/gsup_server.h similarity index 100% rename from src/gsup_server.h rename to include/osmocom/hlr/gsup_server.h diff --git a/src/hlr.h b/include/osmocom/hlr/hlr.h similarity index 100% rename from src/hlr.h rename to include/osmocom/hlr/hlr.h diff --git a/src/hlr_ussd.h b/include/osmocom/hlr/hlr_ussd.h similarity index 97% rename from src/hlr_ussd.h rename to include/osmocom/hlr/hlr_ussd.h index 393ca6c..08e810e 100644 --- a/src/hlr_ussd.h +++ b/include/osmocom/hlr/hlr_ussd.h @@ -5,7 +5,7 @@ #include #include -#include "gsup_server.h" +#include #define NCSS_GUARD_TIMEOUT_DEFAULT 30 diff --git a/src/hlr_vty.h b/include/osmocom/hlr/hlr_vty.h similarity index 97% rename from src/hlr_vty.h rename to include/osmocom/hlr/hlr_vty.h index 280b55a..acd6510 100644 --- a/src/hlr_vty.h +++ b/include/osmocom/hlr/hlr_vty.h @@ -25,7 +25,7 @@ #include #include #include -#include "hlr.h" +#include enum hlr_vty_node { HLR_NODE = _LAST_OSMOVTY_NODE + 1, diff --git a/src/hlr_vty_subscr.h b/include/osmocom/hlr/hlr_vty_subscr.h similarity index 100% rename from src/hlr_vty_subscr.h rename to include/osmocom/hlr/hlr_vty_subscr.h diff --git a/src/logging.h b/include/osmocom/hlr/logging.h similarity index 100% rename from src/logging.h rename to include/osmocom/hlr/logging.h diff --git a/src/luop.h b/include/osmocom/hlr/luop.h similarity index 96% rename from src/luop.h rename to include/osmocom/hlr/luop.h index f96593b..77a1dec 100644 --- a/src/luop.h +++ b/include/osmocom/hlr/luop.h @@ -27,8 +27,8 @@ #include #include -#include "db.h" -#include "gsup_server.h" +#include +#include #define CANCEL_TIMEOUT_SECS 30 #define ISD_TIMEOUT_SECS 30 diff --git a/src/rand.h b/include/osmocom/hlr/rand.h similarity index 100% rename from src/rand.h rename to include/osmocom/hlr/rand.h diff --git a/src/Makefile.am b/src/Makefile.am index a042e4e..a5b71cf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,6 +11,7 @@ $(NULL) AM_CPPFLAGS = -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ $(NULL) EXTRA_DIST = \ @@ -24,18 +25,6 @@ CLEANFILES = $(BUILT_SOURCES) noinst_HEADERS = \ - auc.h \ - db.h \ - hlr.h \ - luop.h \ - gsup_router.h \ - gsup_server.h \ - logging.h \ - rand.h \ - ctrl.h \ - hlr_vty.h \ - hlr_vty_subscr.h \ - hlr_ussd.h \ db_bootstrap.h \ $(NULL) diff --git a/src/auc.c b/src/auc.c index 79c3918..28c441f 100644 --- a/src/auc.c +++ b/src/auc.c @@ -23,8 +23,8 @@ #include #include -#include "logging.h" -#include "rand.h" +#include +#include #define hexb(buf) osmo_hexdump_nospc((void*)buf, sizeof(buf)) #define hex(buf,sz) osmo_hexdump_nospc((void*)buf, sz) diff --git a/src/ctrl.c b/src/ctrl.c index c610d92..b78be12 100644 --- a/src/ctrl.c +++ b/src/ctrl.c @@ -28,9 +28,9 @@ #include #include -#include "hlr.h" -#include "ctrl.h" -#include "db.h" +#include +#include +#include #define SEL_BY "by-" #define SEL_BY_IMSI SEL_BY "imsi-" diff --git a/src/db.c b/src/db.c index 75ca889..ed2e568 100644 --- a/src/db.c +++ b/src/db.c @@ -23,8 +23,8 @@ #include #include -#include "logging.h" -#include "db.h" +#include +#include #include "db_bootstrap.h" /* This constant is currently duplicated in sql/hlr.sql and must be kept in sync! */ diff --git a/src/db_auc.c b/src/db_auc.c index 2cf7143..e3a840e 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -26,10 +26,10 @@ #include -#include "logging.h" -#include "db.h" -#include "auc.h" -#include "rand.h" +#include +#include +#include +#include #define LOGAUC(imsi, level, fmt, args ...) LOGP(DAUC, level, "IMSI='%s': " fmt, imsi, ## args) diff --git a/src/db_hlr.c b/src/db_hlr.c index 694ac53..e52b5ed 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -33,11 +33,11 @@ #include -#include "logging.h" -#include "hlr.h" -#include "db.h" -#include "gsup_server.h" -#include "luop.h" +#include +#include +#include +#include +#include #define LOGHLR(imsi, level, fmt, args ...) LOGP(DAUC, level, "IMSI='%s': " fmt, imsi, ## args) diff --git a/src/gsup_router.c b/src/gsup_router.c index df978ba..adf3af7 100644 --- a/src/gsup_router.c +++ b/src/gsup_router.c @@ -23,9 +23,9 @@ #include #include -#include "logging.h" -#include "gsup_server.h" -#include "gsup_router.h" +#include +#include +#include /*! Find a route for the given address. * \param[in] gs gsup server diff --git a/src/gsup_send.c b/src/gsup_send.c index 247a7e7..29aeaa5 100644 --- a/src/gsup_send.c +++ b/src/gsup_send.c @@ -21,8 +21,8 @@ #include -#include "gsup_server.h" -#include "gsup_router.h" +#include +#include #include diff --git a/src/gsup_server.c b/src/gsup_server.c index e75bbd7..bee6aef 100644 --- a/src/gsup_server.c +++ b/src/gsup_server.c @@ -27,8 +27,8 @@ #include #include -#include "gsup_server.h" -#include "gsup_router.h" +#include +#include static void osmo_gsup_server_send(struct osmo_gsup_conn *conn, int proto_ext, struct msgb *msg_tx) diff --git a/src/hlr.c b/src/hlr.c index 6bfc141..0970bb1 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -37,16 +37,16 @@ #include #include -#include "db.h" -#include "hlr.h" -#include "ctrl.h" -#include "logging.h" -#include "gsup_server.h" -#include "gsup_router.h" -#include "rand.h" -#include "luop.h" -#include "hlr_vty.h" -#include "hlr_ussd.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include struct hlr *g_hlr; static void *hlr_ctx = NULL; diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index fcef597..1212018 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -29,9 +29,9 @@ #include #include -#include "logging.h" -#include "db.h" -#include "rand.h" +#include +#include +#include struct hlr_db_tool_ctx { /* DB context */ diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c index 1568815..00023ba 100644 --- a/src/hlr_ussd.c +++ b/src/hlr_ussd.c @@ -29,12 +29,12 @@ #include #include -#include "hlr.h" -#include "hlr_ussd.h" -#include "gsup_server.h" -#include "gsup_router.h" -#include "logging.h" -#include "db.h" +#include +#include +#include +#include +#include +#include /*********************************************************************** * core data structures expressing config from VTY @@ -317,7 +317,7 @@ * Internal USSD Handlers ***********************************************************************/ -#include "db.h" +#include static int handle_ussd_own_msisdn(struct osmo_gsup_conn *conn, struct ss_session *ss, const struct osmo_gsup_message *gsup, const struct ss_request *req) diff --git a/src/hlr_vty.c b/src/hlr_vty.c index f7c5bc8..6701cd9 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -33,12 +33,12 @@ #include #include -#include "db.h" -#include "hlr.h" -#include "hlr_vty.h" -#include "hlr_vty_subscr.h" -#include "hlr_ussd.h" -#include "gsup_server.h" +#include +#include +#include +#include +#include +#include struct cmd_node hlr_node = { HLR_NODE, @@ -150,7 +150,7 @@ * USSD Entity ***********************************************************************/ -#include "hlr_ussd.h" +#include #define USSD_STR "USSD Configuration\n" #define UROUTE_STR "Routing Configuration\n" diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 73dfab6..d2c4c81 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -28,8 +28,8 @@ #include #include -#include "hlr.h" -#include "db.h" +#include +#include struct vty; diff --git a/src/logging.c b/src/logging.c index 3fa2a69..3713ab3 100644 --- a/src/logging.c +++ b/src/logging.c @@ -1,5 +1,5 @@ #include -#include "logging.h" +#include const struct log_info_cat hlr_log_info_cat[] = { [DMAIN] = { diff --git a/src/luop.c b/src/luop.c index aff4d81..652ce0d 100644 --- a/src/luop.c +++ b/src/luop.c @@ -28,10 +28,10 @@ #include #include -#include "gsup_server.h" -#include "gsup_router.h" -#include "logging.h" -#include "luop.h" +#include +#include +#include +#include const struct value_string lu_state_names[] = { { LU_S_NULL, "NULL" }, diff --git a/src/osmo-euse-demo.c b/src/osmo-euse-demo.c index 4e4ef78..e707a9c 100644 --- a/src/osmo-euse-demo.c +++ b/src/osmo-euse-demo.c @@ -44,7 +44,7 @@ #include -#include "logging.h" +#include static struct osmo_gsup_client *g_gc; diff --git a/tests/auc/Makefile.am b/tests/auc/Makefile.am index a3814b6..9b65d71 100644 --- a/tests/auc/Makefile.am +++ b/tests/auc/Makefile.am @@ -2,12 +2,12 @@ AM_CPPFLAGS = \ $(all_includes) \ - -I$(top_srcdir)/src \ $(NULL) AM_CFLAGS = \ -Wall \ -ggdb3 \ + -I$(top_srcdir)/include \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(NULL) diff --git a/tests/auc/auc_test.c b/tests/auc/auc_test.c index e23cc02..cdbd0b7 100644 --- a/tests/auc/auc_test.c +++ b/tests/auc/auc_test.c @@ -29,8 +29,8 @@ #include -#include "logging.h" -#include "auc.h" +#include +#include #define comment_start() fprintf(stderr, "\n===== %s\n", __func__); #define comment_end() fprintf(stderr, "===== %s: SUCCESS\n\n", __func__); diff --git a/tests/auc/gen_ts_55_205_test_sets/main_template.c b/tests/auc/gen_ts_55_205_test_sets/main_template.c index a78bddb..3fafdf5 100644 --- a/tests/auc/gen_ts_55_205_test_sets/main_template.c +++ b/tests/auc/gen_ts_55_205_test_sets/main_template.c @@ -33,8 +33,8 @@ #include -#include "logging.h" -#include "auc.h" +#include +#include #define comment_start() fprintf(stderr, "\n===== %s\n", __func__); #define comment_end() fprintf(stderr, "===== %s: SUCCESS\n\n", __func__); diff --git a/tests/db/Makefile.am b/tests/db/Makefile.am index 5730937..f13824d 100644 --- a/tests/db/Makefile.am +++ b/tests/db/Makefile.am @@ -1,7 +1,7 @@ AM_CFLAGS = \ $(all_includes) \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ -Wall \ -ggdb3 \ $(LIBOSMOCORE_CFLAGS) \ diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 1da2752..d6060dd 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -27,8 +27,8 @@ #include #include -#include "db.h" -#include "logging.h" +#include +#include #define comment_start() fprintf(stderr, "\n===== %s\n", __func__); #define comment(fmt, args...) fprintf(stderr, "\n--- " fmt "\n\n", ## args); diff --git a/tests/gsup/Makefile.am b/tests/gsup/Makefile.am index 907aae8..2f56504 100644 --- a/tests/gsup/Makefile.am +++ b/tests/gsup/Makefile.am @@ -1,11 +1,11 @@ AM_CPPFLAGS = \ $(all_includes) \ - -I$(top_srcdir)/src \ $(NULL) AM_CFLAGS = \ -Wall \ -ggdb3 \ + -I$(top_srcdir)/include \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ diff --git a/tests/gsup/gsup_test.c b/tests/gsup/gsup_test.c index 41865d2..a41ba88 100644 --- a/tests/gsup/gsup_test.c +++ b/tests/gsup/gsup_test.c @@ -24,8 +24,8 @@ #include #include -#include "logging.h" -#include "luop.h" +#include +#include struct osmo_gsup_server; diff --git a/tests/gsup_server/Makefile.am b/tests/gsup_server/Makefile.am index 686ce37..e64ac4a 100644 --- a/tests/gsup_server/Makefile.am +++ b/tests/gsup_server/Makefile.am @@ -1,11 +1,11 @@ AM_CPPFLAGS = \ $(all_includes) \ - -I$(top_srcdir)/src \ $(NULL) AM_CFLAGS = \ -Wall \ -ggdb3 \ + -I$(top_srcdir)/include \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ diff --git a/tests/gsup_server/gsup_server_test.c b/tests/gsup_server/gsup_server_test.c index cc475be..4aec69b 100644 --- a/tests/gsup_server/gsup_server_test.c +++ b/tests/gsup_server/gsup_server_test.c @@ -20,7 +20,7 @@ #include #include -#include "gsup_server.h" +#include #define comment_start() printf("\n===== %s\n", __func__) #define comment_end() printf("===== %s: SUCCESS\n\n", __func__) -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ic912fe27f545b85443c5fb713d8c3c8aac23c9ad Gerrit-Change-Number: 16197 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:00 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:00 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Makefile convenience: add VTY_TEST var to run only one test VTY transcript tests run all *.vty test scripts, and it is not so trivial to figure out the test-db creation and cmdline to run only one of them when debugging. Add VTY_TEST var, useful to pick one test on the cmdline: cd tests make vty-test VTY_TEST=test_nodes.vty Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 --- M tests/Makefile.am 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/98/16198/1 diff --git a/tests/Makefile.am b/tests/Makefile.am index 357fbac..b44a209 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -52,6 +52,7 @@ endif VTY_TEST_DB = hlr_vty_test.db +VTY_TEST ?= *.vty # To update the VTY script from current application behavior, # pass -u to vty_script_runner.py by doing: @@ -63,7 +64,7 @@ osmo_verify_transcript_vty.py -v \ -n OsmoHLR -p 4258 \ -r "$(top_builddir)/src/osmo-hlr -c $(top_srcdir)/doc/examples/osmo-hlr.cfg -l $(VTY_TEST_DB)" \ - $(U) $(srcdir)/*.vty + $(U) $(srcdir)/$(VTY_TEST) -rm -f $(VTY_TEST_DB) -rm $(VTY_TEST_DB)-* -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:01 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:01 +0000 Subject: Change in osmo-hlr[master]: remove gsup_test References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16199 ) Change subject: remove gsup_test ...................................................................... remove gsup_test The test doesn't do much: it encodes an Insert Subscriber Data request for the sole purpose to ensure the msgb is allocated large enough. A bug like that is easily avoided statically. Also, the lu functions will get refactored soon, it doesn't make sense to me to drag this test along. Change-Id: I42e1c72bf4cce8034f968cd4392773bf2b643c1b --- M configure.ac M tests/Makefile.am D tests/gsup/Makefile.am D tests/gsup/gsup_test.c D tests/gsup/gsup_test.err D tests/gsup/gsup_test.ok M tests/testsuite.at 7 files changed, 0 insertions(+), 145 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/99/16199/1 diff --git a/configure.ac b/configure.ac index f7714aa..d39edb2 100644 --- a/configure.ac +++ b/configure.ac @@ -186,7 +186,6 @@ tests/auc/Makefile tests/auc/gen_ts_55_205_test_sets/Makefile tests/gsup_server/Makefile - tests/gsup/Makefile tests/db/Makefile tests/db_upgrade/Makefile ) diff --git a/tests/Makefile.am b/tests/Makefile.am index b44a209..bbe21b5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,6 @@ auc \ gsup_server \ db \ - gsup \ db_upgrade \ $(NULL) diff --git a/tests/gsup/Makefile.am b/tests/gsup/Makefile.am deleted file mode 100644 index 2f56504..0000000 --- a/tests/gsup/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - -I$(top_srcdir)/include \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - -no-install \ - $(NULL) - -EXTRA_DIST = \ - gsup_test.ok \ - gsup_test.err \ - $(NULL) - -noinst_PROGRAMS = \ - gsup_test \ - $(NULL) - -gsup_test_SOURCES = \ - gsup_test.c \ - $(NULL) - -gsup_test_LDADD = \ - $(top_srcdir)/src/luop.c \ - $(top_srcdir)/src/gsup_server.c \ - $(top_srcdir)/src/gsup_router.c \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(NULL) - -.PHONY: update_exp -update_exp: - $(builddir)/gsup_test >"$(srcdir)/gsup_test.ok" 2>"$(srcdir)/gsup_test.err" diff --git a/tests/gsup/gsup_test.c b/tests/gsup/gsup_test.c deleted file mode 100644 index a41ba88..0000000 --- a/tests/gsup/gsup_test.c +++ /dev/null @@ -1,91 +0,0 @@ -/* (C) 2018 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 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 - -struct osmo_gsup_server; - -/* override osmo_gsup_addr_send() to not actually send anything. */ -int osmo_gsup_addr_send(struct osmo_gsup_server *gs, - const uint8_t *addr, size_t addrlen, - struct msgb *msg) -{ - LOGP(DMAIN, LOGL_DEBUG, "%s\n", msgb_hexdump(msg)); - msgb_free(msg); - return 0; -} - -int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi, - struct hlr_subscriber *subscr) -{ - return 0; -} - -/* Verify that the internally allocated msgb is large enough */ -void test_gsup_tx_insert_subscr_data() -{ - struct lu_operation luop = { - .state = LU_S_LU_RECEIVED, - .subscr = { - .imsi = "123456789012345", - .msisdn = "987654321098765", - .nam_cs = true, - .nam_ps = true, - }, - .is_ps = true, - }; - - lu_op_tx_insert_subscr_data(&luop); -} - -const struct log_info_cat default_categories[] = { - [DMAIN] = { - .name = "DMAIN", - .description = "Main Program", - .enabled = 1, .loglevel = LOGL_DEBUG, - }, -}; - -static struct log_info info = { - .cat = default_categories, - .num_cat = ARRAY_SIZE(default_categories), -}; - -int main(int argc, char **argv) -{ - void *ctx = talloc_named_const(NULL, 0, "gsup_test"); - osmo_init_logging2(ctx, &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); - - test_gsup_tx_insert_subscr_data(); - - printf("Done.\n"); - return EXIT_SUCCESS; -} diff --git a/tests/gsup/gsup_test.err b/tests/gsup/gsup_test.err deleted file mode 100644 index 0aeae30..0000000 --- a/tests/gsup/gsup_test.err +++ /dev/null @@ -1,2 +0,0 @@ -DMAIN 10 01 08 21 43 65 87 09 21 43 f5 08 09 08 89 67 45 23 01 89 67 f5 05 07 10 01 01 12 02 01 2a 28 01 01 -DMAIN LU OP state change: LU RECEIVED -> ISD SENT diff --git a/tests/gsup/gsup_test.ok b/tests/gsup/gsup_test.ok deleted file mode 100644 index 619c561..0000000 --- a/tests/gsup/gsup_test.ok +++ /dev/null @@ -1 +0,0 @@ -Done. diff --git a/tests/testsuite.at b/tests/testsuite.at index bd758c9..58c197d 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -15,13 +15,6 @@ AT_CHECK([$abs_top_builddir/tests/auc/auc_ts_55_205_test_sets], [], [expout], [experr]) AT_CLEANUP -AT_SETUP([gsup]) -AT_KEYWORDS([gsup]) -cat $abs_srcdir/gsup/gsup_test.ok > expout -cat $abs_srcdir/gsup/gsup_test.err > experr -AT_CHECK([$abs_top_builddir/tests/gsup/gsup_test], [], [expout], [experr]) -AT_CLEANUP - AT_SETUP([gsup_server]) AT_KEYWORDS([gsup_server]) cat $abs_srcdir/gsup_server/gsup_server_test.ok > expout -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I42e1c72bf4cce8034f968cd4392773bf2b643c1b Gerrit-Change-Number: 16199 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:01 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:01 +0000 Subject: Change in osmo-hlr[master]: test_nodes.vty: tweak: add some '?' checks References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16200 ) Change subject: test_nodes.vty: tweak: add some '?' checks ...................................................................... test_nodes.vty: tweak: add some '?' checks I added these "by accident" when implementing D-GSM related VTY tests, now submitting them separately. Change-Id: I92a4245cae806270b00330403cc114017ab7af53 --- M tests/test_nodes.vty 1 file changed, 50 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/00/16200/1 diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index 2be9617..ccc30ba 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -1,3 +1,15 @@ +OsmoHLR> ? + show Show running system information + list Print command list + exit Exit current mode and down to previous mode + help Description of the interactive help system + enable Turn on privileged mode command + terminal Set terminal line parameters + who Display who is on vty + logging Configure logging + no Negate a command or set its defaults + logp Print a message on all log outputs; useful for placing markers in test logs + subscriber Subscriber management commands OsmoHLR> list show version show online-help @@ -25,6 +37,21 @@ show subscriber (imsi|msisdn|id|imei) IDENT OsmoHLR> enable +OsmoHLR# ? + help Description of the interactive help system + list Print command list + write Write running configuration to memory, network, or terminal + show Show running system information + exit Exit current mode and down to previous mode + disable Turn off privileged mode command + configure Configuration from vty interface + copy Copy configuration + terminal Set terminal line parameters + who Display who is on vty + logging Configure logging + no Negate a command or set its defaults + logp Print a message on all log outputs; useful for placing markers in test logs + subscriber Subscriber management commands OsmoHLR# list help ... @@ -45,6 +72,16 @@ ... OsmoHLR# configure terminal +OsmoHLR(config)# ? +... + banner Set banner string + service Set up miscellaneous service + line Configure a terminal line + ctrl Configure the Control Interface + log Configure logging sub-system + stats Configure stats sub-system + hlr Configure the HLR + mslookup Configure Distributed GSM mslookup OsmoHLR(config)# list help ... @@ -54,6 +91,14 @@ hlr OsmoHLR(config)# hlr +OsmoHLR(config-hlr)# ? +... + euse Configure a particular External USSD Entity + no Negate a command or set its defaults + ussd USSD Configuration + ncss-guard-timeout Set guard timer for NCSS (call independent SS) session activity + store-imei Save the IMEI in the database when receiving Check IMEI requests. Note that an MSC does not necessarily send Check IMEI requests (for OsmoMSC, you may want to set 'check-imei-rqd 1'). + subscriber-create-on-demand Make a new record when a subscriber is first seen. OsmoHLR(config-hlr)# list help ... @@ -75,11 +120,12 @@ no subscriber-create-on-demand OsmoHLR(config-hlr)# gsup -OsmoHLR(config-hlr-gsup)# list - help +OsmoHLR(config-hlr-gsup)# ? ... - exit - end + bind Listen/Bind related socket option + ipa-name Set the IPA name of this HLR, for proxying to remote HLRs +OsmoHLR(config-hlr-gsup)# list +... bind ip A.B.C.D OsmoHLR(config-hlr-gsup)# exit -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I92a4245cae806270b00330403cc114017ab7af53 Gerrit-Change-Number: 16200 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:01 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:01 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... db v4: add column last_lu_seen_ps Location Updating procedures from both CS and PS overwrite the same last_lu_seen field of a subscriber. For upcoming D-GSM it will be important to distinguish those, because only CS attaches qualify for MSISDN lookup. Add column last_lu_seen_ps, and upon PS LU, do not overwrite last_lu_seen, so that last_lu_seen now only reflects CS LU. In the VTY, dump both LU dates distinctively. Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba --- M include/osmocom/hlr/db.h M sql/hlr.sql M src/db.c M src/db_hlr.c M src/hlr_vty_subscr.c M tests/db_upgrade/db_upgrade_test.ok 6 files changed, 80 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/01/16201/1 diff --git a/include/osmocom/hlr/db.h b/include/osmocom/hlr/db.h index 15d83de..eacc78e 100644 --- a/include/osmocom/hlr/db.h +++ b/include/osmocom/hlr/db.h @@ -28,6 +28,7 @@ DB_STMT_AUC_3G_INSERT, DB_STMT_AUC_3G_DELETE, DB_STMT_SET_LAST_LU_SEEN, + DB_STMT_SET_LAST_LU_SEEN_PS, DB_STMT_EXISTS_BY_IMSI, DB_STMT_EXISTS_BY_MSISDN, _NUM_DB_STMT @@ -95,6 +96,7 @@ bool ms_purged_cs; bool ms_purged_ps; time_t last_lu_seen; + time_t last_lu_seen_ps; }; /* A format string for use with strptime(3). This format string is diff --git a/sql/hlr.sql b/sql/hlr.sql index f8fdc0b..ad57661 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -42,7 +42,8 @@ -- Timestamp of last location update seen from subscriber -- The value is a string which encodes a UTC timestamp in granularity of seconds. - last_lu_seen TIMESTAMP default NULL + last_lu_seen TIMESTAMP default NULL, + last_lu_seen_ps TIMESTAMP default NULL ); CREATE TABLE subscriber_apn ( @@ -77,4 +78,4 @@ -- Set HLR database schema version number -- Note: This constant is currently duplicated in src/db.c and must be kept in sync! -PRAGMA user_version = 3; +PRAGMA user_version = 4; diff --git a/src/db.c b/src/db.c index 992dbad..5e5ad35 100644 --- a/src/db.c +++ b/src/db.c @@ -28,7 +28,7 @@ #include "db_bootstrap.h" /* This constant is currently duplicated in sql/hlr.sql and must be kept in sync! */ -#define CURRENT_SCHEMA_VERSION 3 +#define CURRENT_SCHEMA_VERSION 4 #define SEL_COLUMNS \ "id," \ @@ -45,7 +45,8 @@ "lmsi," \ "ms_purged_cs," \ "ms_purged_ps," \ - "last_lu_seen" + "last_lu_seen," \ + "last_lu_seen_ps" \ static const char *stmt_sql[] = { [DB_STMT_SEL_BY_IMSI] = "SELECT " SEL_COLUMNS " FROM subscriber WHERE imsi = ?", @@ -79,6 +80,7 @@ " VALUES($subscriber_id, $algo_id_3g, $k, $op, $opc, $ind_bitlen)", [DB_STMT_AUC_3G_DELETE] = "DELETE FROM auc_3g WHERE subscriber_id = $subscriber_id", [DB_STMT_SET_LAST_LU_SEEN] = "UPDATE subscriber SET last_lu_seen = datetime($val, 'unixepoch') WHERE id = $subscriber_id", + [DB_STMT_SET_LAST_LU_SEEN_PS] = "UPDATE subscriber SET last_lu_seen_ps = datetime($val, 'unixepoch') WHERE id = $subscriber_id", [DB_STMT_EXISTS_BY_IMSI] = "SELECT 1 FROM subscriber WHERE imsi = $imsi", [DB_STMT_EXISTS_BY_MSISDN] = "SELECT 1 FROM subscriber WHERE msisdn = $msisdn", }; @@ -423,11 +425,28 @@ return rc; } +static int db_upgrade_v4(struct db_context *dbc) +{ + int rc; + const char *statements[] = { + "ALTER TABLE subscriber ADD COLUMN last_lu_seen_ps TIMESTAMP default NULL", + "PRAGMA user_version = 4", + }; + + rc = db_run_statements(dbc, statements, ARRAY_SIZE(statements)); + if (rc != SQLITE_DONE) { + LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 4\n"); + return rc; + } + return rc; +} + typedef int (*db_upgrade_func_t)(struct db_context *dbc); static db_upgrade_func_t db_upgrade_path[] = { db_upgrade_v1, db_upgrade_v2, db_upgrade_v3, + db_upgrade_v4, }; static int db_get_user_version(struct db_context *dbc) diff --git a/src/db_hlr.c b/src/db_hlr.c index e52b5ed..b3e3887 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -438,14 +438,36 @@ return ret; } +static void parse_last_lu_seen(time_t *dst, const char *last_lu_seen_str, const char *imsi, const char *label) +{ + struct tm tm = {0}; + time_t val; + if (!last_lu_seen_str || last_lu_seen_str[0] == '\0') + return; + + if (strptime(last_lu_seen_str, DB_LAST_LU_SEEN_FMT, &tm) == NULL) { + LOGP(DAUC, LOGL_ERROR, "IMSI-%s: Last LU Seen %s: Cannot parse timestamp '%s'\n", + imsi, label, last_lu_seen_str); + return; + } + + errno = 0; + val = mktime(&tm); + if (val == -1) { + LOGP(DAUC, LOGL_ERROR, "IMSI-%s: Last LU Seen %s: Cannot convert timestamp '%s' to time_t: %s\n", + imsi, label, last_lu_seen_str, strerror(errno)); + val = 0; + } + + *dst = val; +} + /* Common code for db_subscr_get_by_*() functions. */ static int db_sel(struct db_context *dbc, sqlite3_stmt *stmt, struct hlr_subscriber *subscr, const char **err) { int rc; int ret = 0; - const char *last_lu_seen_str; - struct tm tm = {0}; /* execute the statement */ rc = sqlite3_step(stmt); @@ -479,20 +501,10 @@ subscr->lmsi = sqlite3_column_int(stmt, 11); subscr->ms_purged_cs = sqlite3_column_int(stmt, 12); subscr->ms_purged_ps = sqlite3_column_int(stmt, 13); - last_lu_seen_str = (const char *)sqlite3_column_text(stmt, 14); - if (last_lu_seen_str && last_lu_seen_str[0] != '\0') { - if (strptime(last_lu_seen_str, DB_LAST_LU_SEEN_FMT, &tm) == NULL) { - LOGP(DAUC, LOGL_ERROR, "Cannot parse last LU timestamp '%s' of subscriber with IMSI='%s': %s\n", - last_lu_seen_str, subscr->imsi, strerror(errno)); - } else { - subscr->last_lu_seen = mktime(&tm); - if (subscr->last_lu_seen == -1) { - LOGP(DAUC, LOGL_ERROR, "Cannot convert LU timestamp '%s' to time_t: %s\n", - last_lu_seen_str, strerror(errno)); - subscr->last_lu_seen = 0; - } - } - } + parse_last_lu_seen(&subscr->last_lu_seen, (const char *)sqlite3_column_text(stmt, 14), + subscr->imsi, "CS"); + parse_last_lu_seen(&subscr->last_lu_seen_ps, (const char *)sqlite3_column_text(stmt, 15), + subscr->imsi, "PS"); out: db_remove_reset(stmt); @@ -770,7 +782,7 @@ goto out; } - stmt = dbc->stmt[DB_STMT_SET_LAST_LU_SEEN]; + stmt = dbc->stmt[is_ps? DB_STMT_SET_LAST_LU_SEEN_PS : DB_STMT_SET_LAST_LU_SEEN]; if (!db_bind_int64(stmt, "$subscriber_id", subscr_id)) return -EIO; diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index d2c4c81..adbfcab 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -47,12 +47,24 @@ return s; } +static void dump_last_lu_seen(struct vty *vty, const char *domain_label, time_t last_lu_seen) +{ + uint32_t age; + char datebuf[26]; /* for ctime_r(3) */ + if (!last_lu_seen) + return; + vty_out(vty, " last LU seen on %s: %s UTC", domain_label, get_datestr(&last_lu_seen, datebuf)); + if (!timestamp_age(&last_lu_seen, &age)) + vty_out(vty, " (invalid timestamp)%s", VTY_NEWLINE); + else + vty_out(vty, " (%us ago)%s", age, VTY_NEWLINE); +} + static void subscr_dump_full_vty(struct vty *vty, struct hlr_subscriber *subscr) { int rc; struct osmo_sub_auth_data aud2g; struct osmo_sub_auth_data aud3g; - char datebuf[26]; /* for ctime_r(3) */ vty_out(vty, " ID: %"PRIu64"%s", subscr->id, VTY_NEWLINE); @@ -87,8 +99,8 @@ vty_out(vty, " PS disabled%s", VTY_NEWLINE); if (subscr->ms_purged_ps) vty_out(vty, " PS purged%s", VTY_NEWLINE); - if (subscr->last_lu_seen) - vty_out(vty, " last LU seen: %s UTC%s", get_datestr(&subscr->last_lu_seen, datebuf), VTY_NEWLINE); + dump_last_lu_seen(vty, "CS", subscr->last_lu_seen); + dump_last_lu_seen(vty, "PS", subscr->last_lu_seen_ps); if (!*subscr->imsi) return; diff --git a/tests/db_upgrade/db_upgrade_test.ok b/tests/db_upgrade/db_upgrade_test.ok index 49e7151..67d0006 100644 --- a/tests/db_upgrade/db_upgrade_test.ok +++ b/tests/db_upgrade/db_upgrade_test.ok @@ -83,6 +83,7 @@ DDB Database test.db' has been upgraded to HLR DB schema version 1 DDB Database test.db' has been upgraded to HLR DB schema version 2 DDB Database test.db' has been upgraded to HLR DB schema version 3 +DDB Database test.db' has been upgraded to HLR DB schema version 4 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. Resulting db: @@ -124,6 +125,7 @@ imeisv|VARCHAR|0||0 imsi|VARCHAR(15)|1||0 last_lu_seen|TIMESTAMP|0|NULL|0 +last_lu_seen_ps|TIMESTAMP|0|NULL|0 lmsi|INTEGER|0||0 ms_purged_cs|BOOLEAN|1|0|0 ms_purged_ps|BOOLEAN|1|0|0 @@ -139,13 +141,13 @@ vlr_number|VARCHAR(15)|0||0 Table subscriber contents: -ggsn_number|gmlc_number|id|imei|imeisv|imsi|last_lu_seen|lmsi|ms_purged_cs|ms_purged_ps|msc_number|msisdn|nam_cs|nam_ps|periodic_lu_tmr|periodic_rau_tau_tmr|sgsn_address|sgsn_number|smsc_number|vlr_number -||1|||123456789012345|||0|0||098765432109876|1|1||||||MSC-1 -||2|||111111111|||1|0|||1|1|||||| -||3|||222222222|||0|1||22222|1|1|||||| -||4|||333333|||0|0||3|0|1|||||| -||5|||444444444444444|||0|0||4444|1|0|||||| -||6|||5555555|||0|0||55555555555555|0|0|||||| +ggsn_number|gmlc_number|id|imei|imeisv|imsi|last_lu_seen|last_lu_seen_ps|lmsi|ms_purged_cs|ms_purged_ps|msc_number|msisdn|nam_cs|nam_ps|periodic_lu_tmr|periodic_rau_tau_tmr|sgsn_address|sgsn_number|smsc_number|vlr_number +||1|||123456789012345||||0|0||098765432109876|1|1||||||MSC-1 +||2|||111111111||||1|0|||1|1|||||| +||3|||222222222||||0|1||22222|1|1|||||| +||4|||333333||||0|0||3|0|1|||||| +||5|||444444444444444||||0|0||4444|1|0|||||| +||6|||5555555||||0|0||55555555555555|0|0|||||| Table: subscriber_apn name|type|notnull|dflt_value|pk @@ -166,5 +168,5 @@ rc = 0 DMAIN hlr starting DDB using database: test.db -DDB Database test.db' has HLR DB schema version 3 +DDB Database test.db' has HLR DB schema version 4 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:02 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:02 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation References: Message-ID: Hello osmith, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 to review the following change. Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... add libosmo-mslookup and mDNS implementation Create a library with generic functions for performing a distributed subscriber lookup, which allow querying IPs and ports of services by MSISDN/IMSI. The first implementation uses multicast DNS packets. I decided to write custom DNS functions instead of using libc-ares (which we use in OsmoSGSN already), because it is only a DNS client implementation and we need both client and server. The DNS code is abstracted from the mslookup specific code, so the DNS part could in theory be replaced with a third party library in the future. We decided to place the mslookup library in the OsmoHLR source tree (instead of libosmocore), because the way we have implemented the D-GSM network, OsmoHLR will be the only user of the library for now. In the future, OsmoMSC may need it, but it depends on OsmoHLR already. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A include/osmocom/mslookup/mslookup_client_mdns.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_msg.h A src/mslookup/mdns_record.c A src/mslookup/mdns_record.h A src/mslookup/mdns_rfc.c A src/mslookup/mdns_rfc.h A src/mslookup/mdns_sock.c A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c A src/mslookup/mslookup_client_mdns.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 38 files changed, 4,375 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/1 diff --git a/configure.ac b/configure.ac index d39edb2..1afb5c7 100644 --- a/configure.ac +++ b/configure.ac @@ -174,10 +174,12 @@ doc/examples/Makefile src/Makefile src/gsupclient/Makefile + src/mslookup/Makefile include/Makefile include/osmocom/Makefile include/osmocom/hlr/Makefile libosmo-gsup-client.pc + libosmo-mslookup.pc sql/Makefile doc/manuals/Makefile contrib/Makefile @@ -188,4 +190,5 @@ tests/gsup_server/Makefile tests/db/Makefile tests/db_upgrade/Makefile + tests/mslookup/Makefile ) diff --git a/debian/control b/debian/control index debf669..dda411e 100644 --- a/debian/control +++ b/debian/control @@ -59,6 +59,28 @@ . This package contains the development headers. +Package: libosmo-mslookup0 +Section: libs +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Description: Osmocom MS lookup library + This shared library contains routines for looking up mobile subscribers. + +Package: libosmo-mslookup-dev +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + libosmo-mslookup0 (= ${binary:Version}), + libosmocore-dev +Pre-Depends: ${misc:Pre-Depends} +Description: Development headers of Osmocom MS lookup library + This shared library contains routines for looking up mobile subscribers. + . + This package contains the development headers. + Package: osmo-hlr-doc Architecture: all Section: doc diff --git a/debian/libosmo-mslookup-dev.install b/debian/libosmo-mslookup-dev.install new file mode 100644 index 0000000..539bba8 --- /dev/null +++ b/debian/libosmo-mslookup-dev.install @@ -0,0 +1,5 @@ +usr/include/osmocom/mslookup +usr/lib/*/libosmo-mslookup*.a +usr/lib/*/libosmo-mslookup*.so +usr/lib/*/libosmo-mslookup*.la +usr/lib/*/pkgconfig/libosmo-mslookup.pc diff --git a/debian/libosmo-mslookup0.install b/debian/libosmo-mslookup0.install new file mode 100644 index 0000000..9cad0e8 --- /dev/null +++ b/debian/libosmo-mslookup0.install @@ -0,0 +1 @@ +usr/lib/*/libosmo-mslookup*.so.* diff --git a/include/Makefile.am b/include/Makefile.am index d8eb1ec..9827950 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,3 +1,11 @@ SUBDIRS = osmocom -nobase_include_HEADERS = osmocom/gsupclient/gsup_client.h +nobase_include_HEADERS = \ + osmocom/gsupclient/gsup_client.h \ + osmocom/mslookup/mdns.h \ + osmocom/mslookup/mdns_sock.h \ + osmocom/mslookup/mslookup_client_fake.h \ + osmocom/mslookup/mslookup_client.h \ + osmocom/mslookup/mslookup_client_mdns.h \ + osmocom/mslookup/mslookup.h \ + $(NULL) diff --git a/include/osmocom/hlr/logging.h b/include/osmocom/hlr/logging.h index ed24075..83f1acd 100644 --- a/include/osmocom/hlr/logging.h +++ b/include/osmocom/hlr/logging.h @@ -8,6 +8,7 @@ DGSUP, DAUC, DSS, + DMSLOOKUP, }; extern const struct log_info hlr_log_info; diff --git a/include/osmocom/mslookup/mdns.h b/include/osmocom/mslookup/mdns.h new file mode 100644 index 0000000..137a1f0 --- /dev/null +++ b/include/osmocom/mslookup/mdns.h @@ -0,0 +1,36 @@ +/* Copyright 2019 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 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 . + * + */ + +/*! \file mdns.h */ + +#pragma once + +#include +#include + +struct msgb *osmo_mdns_query_encode(void *ctx, uint16_t packet_id, const struct osmo_mslookup_query *query); + +struct osmo_mslookup_query *osmo_mdns_query_decode(void *ctx, const uint8_t *data, size_t data_len, + uint16_t *packet_id); + +struct msgb *osmo_mdns_result_encode(void *ctx, uint16_t packet_id, const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result); + +int osmo_mdns_result_decode(void *ctx, const uint8_t *data, size_t data_len, uint16_t *packet_id, + struct osmo_mslookup_query *query, struct osmo_mslookup_result *result); diff --git a/include/osmocom/mslookup/mdns_sock.h b/include/osmocom/mslookup/mdns_sock.h new file mode 100644 index 0000000..fde87a8 --- /dev/null +++ b/include/osmocom/mslookup/mdns_sock.h @@ -0,0 +1,33 @@ +/* Copyright 2019 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 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 + +struct osmo_mdns_sock { + struct osmo_fd osmo_fd; + struct addrinfo *ai; +}; + +struct osmo_mdns_sock *osmo_mdns_sock_init(void *ctx, const char *ip, unsigned int port, + int (*cb)(struct osmo_fd *fd, unsigned int what), + void *data, unsigned int priv_nr); +int osmo_mdns_sock_send(const struct osmo_mdns_sock *mdns_sock, struct msgb *msg); +void osmo_mdns_sock_cleanup(struct osmo_mdns_sock *mdns_sock); diff --git a/include/osmocom/mslookup/mslookup.h b/include/osmocom/mslookup/mslookup.h new file mode 100644 index 0000000..e5a42a1 --- /dev/null +++ b/include/osmocom/mslookup/mslookup.h @@ -0,0 +1,127 @@ +/* Copyright 2019 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 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 +#include + +#define OSMO_MSLOOKUP_SERVICE_MAXLEN 64 + +/*! Request HLR for the home HLR's GSUP connection. */ +#define OSMO_MSLOOKUP_SERVICE_HLR_GSUP "gsup.hlr" + +/*! Request SIP for a voice call (osmo-sip-connector or PBX). */ +#define OSMO_MSLOOKUP_SERVICE_SIP "sip.voice" + +/*! Request SMPP to deliver an SMS (osmo-msc or SMPP handler). */ +#define OSMO_MSLOOKUP_SERVICE_SMPP "smpp.sms" + +/*! Request GSUP to deliver an SMS (osmo-hlr or ESME). */ +#define OSMO_MSLOOKUP_SERVICE_SMS_GSUP "gsup.sms" + +bool osmo_mslookup_service_valid(const char *service); + +enum osmo_mslookup_id_type { + OSMO_MSLOOKUP_ID_NONE = 0, + OSMO_MSLOOKUP_ID_IMSI, + OSMO_MSLOOKUP_ID_MSISDN, +}; + +extern const struct value_string osmo_mslookup_id_type_names[]; +static inline const char *osmo_mslookup_id_type_name(enum osmo_mslookup_id_type val) +{ return get_value_string(osmo_mslookup_id_type_names, val); } + +struct osmo_mslookup_id { + enum osmo_mslookup_id_type type; + union { + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; + char msisdn[GSM23003_MSISDN_MAX_DIGITS+1]; + }; +}; + +int osmo_mslookup_id_cmp(const struct osmo_mslookup_id *a, const struct osmo_mslookup_id *b); +bool osmo_mslookup_id_valid(const struct osmo_mslookup_id *id); + +enum osmo_mslookup_result_code { + OSMO_MSLOOKUP_RC_NONE = 0, + /*! An intermediate valid result. The request is still open for more results. */ + OSMO_MSLOOKUP_RC_RESULT, + /*! Returned when the final request timeout has elapsed without results. */ + OSMO_MSLOOKUP_RC_NOT_FOUND, +}; + +extern const struct value_string osmo_mslookup_result_code_names[]; +static inline const char *osmo_mslookup_result_code_name(enum osmo_mslookup_result_code val) +{ return get_value_string(osmo_mslookup_result_code_names, val); } + +/*! Information to request from a lookup. */ +struct osmo_mslookup_query { + /*! Which service to request: HLR, SMS or voice. Typically an OSMO_MSLOOKUP_SERVICE_* constant, but could be an + * arbitrary string that service providers understand. */ + char service[OSMO_MSLOOKUP_SERVICE_MAXLEN + 1]; + /*! IMSI or MSISDN to look up. */ + struct osmo_mslookup_id id; + + /*! Caller provided private data, if desired. */ + void *priv; +}; + +/*! Result data as passed back to a lookup client that invoked an osmo_mslookup_client_request. */ +struct osmo_mslookup_result { + /*! Outcome of the request. */ + enum osmo_mslookup_result_code rc; + + /*! IP address and port to reach the given service via IPv4, if any. */ + struct osmo_sockaddr_str host_v4; + + /*! IP address and port to reach the given service via IPv6, if any. */ + struct osmo_sockaddr_str host_v6; + + /*! How long ago the service last verified presence of the subscriber, in seconds, or zero if the presence is + * invariable (like the home HLR record for an IMSI). + * If a subscriber has recently moved to a different location, we get multiple replies and want to choose the + * most recent one. If this were a timestamp, firstly the time zones would need to be taken care of. + * Even if we choose UTC, a service provider with an inaccurate date/time would end up affecting the result. + * The least susceptible to configuration errors or difference in local and remote clock is a value that + * indicates the actual age of the record in seconds. The time that the lookup query took to be answered should + * be neglectable here, since we would typically wait one second (or very few seconds) for lookup replies, + * while typical Location Updating periods are in the range of 15 minutes. */ + uint32_t age; + + /*! Whether this is the last result returned for this request. */ + bool last; +}; + +int osmo_mslookup_query_from_domain_str(struct osmo_mslookup_query *q, const char *domain); + +size_t osmo_mslookup_id_name_buf(char *buf, size_t buflen, const struct osmo_mslookup_id *id); +char *osmo_mslookup_id_name_c(void *ctx, const struct osmo_mslookup_id *id); +char *osmo_mslookup_id_name_b(char *buf, size_t buflen, const struct osmo_mslookup_id *id); + +size_t osmo_mslookup_result_name_buf(char *buf, size_t buflen, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result); +char *osmo_mslookup_result_name_c(void *ctx, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result); +char *osmo_mslookup_result_name_b(char *buf, size_t buflen, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result); diff --git a/include/osmocom/mslookup/mslookup_client.h b/include/osmocom/mslookup/mslookup_client.h new file mode 100644 index 0000000..b749686 --- /dev/null +++ b/include/osmocom/mslookup/mslookup_client.h @@ -0,0 +1,127 @@ +/* Copyright 2019 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 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 +#include +#include + +struct osmo_mslookup_client; +struct osmo_mslookup_result; + +typedef void (*osmo_mslookup_cb_t)(struct osmo_mslookup_client *client, + uint32_t request_handle, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result); + +/*! This part of a lookup request is not seen by the individual query method implementations. */ +struct osmo_mslookup_query_handling { + /*! Wait at least this long before returning any results. + * + * If nonzero, result_cb will be called as soon as this delay has elapsed, either with the so far youngest age + * result, or with a "not found yet" result. After this delay has elapsed, receiving results will continue + * until result_timeout_milliseconds has elapsed. + * + * If zero, responses are fed to the result_cb right from the start, every time a younger aged result than + * before comes in. + * + * If a result with age == 0 is received, min_delay_milliseconds is ignored, the result is returned immediately + * and listening for responses ends. + * + * Rationale: If a subscriber has recently moved between sites, multiple results will arrive, and the youngest + * age wins. It can make sense to wait a minimum time for responses before determining the winning result. + * + * However, if no result or no valid result has arrived within a short period, the subscriber may be at a site + * that is far away or that is currently experiencing high latency. It is thus a good safety net to still + * receive results for an extended period of time. + * + * For some services, it is possible to establish links to every received result, and whichever link succeeds + * will be used (for example for SIP calls: first to pick up the call gets connected, the others are dropped + * silently). + */ + uint32_t min_delay_milliseconds; + + /*! Total time in milliseconds to listen for lookup responses. + * + * When this timeout elapses, osmo_mslookup_client_request_cancel() is called implicitly; Manually invoking + * osmo_mslookup_client_request_cancel() after result_timeout_milliseconds has elapsed is not necessary, but is + * still safe to do anyway. + * + * If zero, min_delay_milliseconds is also used as result_timeout_milliseconds; if that is also zero, a default + * timeout value is used. + * + * If result_timeout_milliseconds <= min_delay_milliseconds, then min_delay_milliseconds is used as + * result_timeout_milliseconds, i.e. the timeout triggers as soon as min_delay_milliseconds hits. + * + * osmo_mslookup_client_request_cancel() can be called any time to end the request. + */ + uint32_t result_timeout_milliseconds; + + /*! Invoked every time a result with a younger age than the previous result has arrived. + * To stop receiving results before result_timeout_milliseconds has elapsed, call + * osmo_mslookup_client_request_cancel(). + */ + osmo_mslookup_cb_t result_cb; +}; + +uint32_t osmo_mslookup_client_request(struct osmo_mslookup_client *client, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_query_handling *handling); + +void osmo_mslookup_client_request_cancel(struct osmo_mslookup_client *client, uint32_t request_handle); + +struct osmo_mslookup_client *osmo_mslookup_client_new(void *ctx); +bool osmo_mslookup_client_active(struct osmo_mslookup_client *client); +void osmo_mslookup_client_free(struct osmo_mslookup_client *client); + +struct osmo_mslookup_client_method { + struct llist_head entry; + + /*! Human readable name of this lookup method. */ + const char *name; + + /*! Private data for the lookup method implementation. */ + void *priv; + + /*! Backpointer to the client this method is added to. */ + struct osmo_mslookup_client *client; + + /*! Launch a lookup query. Called from osmo_mslookup_client_request(). + * The implementation returns results by calling osmo_mslookup_client_rx_result(). */ + void (*request)(struct osmo_mslookup_client_method *method, + const struct osmo_mslookup_query *query, + uint32_t request_handle); + /*! End a lookup query. Called from osmo_mslookup_client_request_cancel(). It is guaranteed to be called + * exactly once per above request() invocation. (The API user is required to invoke + * osmo_mslookup_client_request_cancel() exactly once per osmo_mslookup_client_request().) */ + void (*request_cleanup)(struct osmo_mslookup_client_method *method, + uint32_t request_handle); + + /*! The mslookup_client is removing this method, clean up all open requests, lists and allocations. */ + void (*destruct)(struct osmo_mslookup_client_method *method); +}; + +void osmo_mslookup_client_method_add(struct osmo_mslookup_client *client, + struct osmo_mslookup_client_method *method); +bool osmo_mslookup_client_method_del(struct osmo_mslookup_client *client, + struct osmo_mslookup_client_method *method); +void osmo_mslookup_client_rx_result(struct osmo_mslookup_client *client, uint32_t request_handle, + const struct osmo_mslookup_result *result); diff --git a/include/osmocom/mslookup/mslookup_client_fake.h b/include/osmocom/mslookup/mslookup_client_fake.h new file mode 100644 index 0000000..65df42f --- /dev/null +++ b/include/osmocom/mslookup/mslookup_client_fake.h @@ -0,0 +1,33 @@ +/* Copyright 2019 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 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 . + * + */ + +/*! MS lookup fake API for testing purposes. */ +#include + +struct osmo_mslookup_fake_response { + struct timeval time_to_reply; + struct osmo_mslookup_id for_id; + const char *for_service; + struct osmo_mslookup_result result; + bool sent; +}; + +struct osmo_mslookup_client_method *osmo_mslookup_client_add_fake(struct osmo_mslookup_client *client, + struct osmo_mslookup_fake_response *responses, + size_t responses_len); diff --git a/include/osmocom/mslookup/mslookup_client_mdns.h b/include/osmocom/mslookup/mslookup_client_mdns.h new file mode 100644 index 0000000..bdefc13 --- /dev/null +++ b/include/osmocom/mslookup/mslookup_client_mdns.h @@ -0,0 +1,36 @@ +/* Copyright 2019 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 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 + +struct osmo_mslookup_client; +struct osmo_mslookup_client_method; + +/*! MS Lookup mDNS server bind default IP. Taken from the Administratevly Scoped block, particularly the Organizational + * Scoped range, https://tools.ietf.org/html/rfc2365 . */ +#define OSMO_MSLOOKUP_MDNS_IP4 "239.192.23.42" +#define OSMO_MSLOOKUP_MDNS_IP6 "ff08::23:42" // <-- TODO: sane? +#define OSMO_MSLOOKUP_MDNS_PORT 4266 + +struct osmo_mslookup_client_method *osmo_mslookup_client_add_mdns(struct osmo_mslookup_client *client, const char *ip, + uint16_t port, int initial_packet_id); + +const struct osmo_sockaddr_str *osmo_mslookup_client_method_mdns_get_bind_addr(struct osmo_mslookup_client_method *dns_method); diff --git a/libosmo-mslookup.pc.in b/libosmo-mslookup.pc.in new file mode 100644 index 0000000..25a873c --- /dev/null +++ b/libosmo-mslookup.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Osmocom MS Lookup Library +Description: C Utility Library +Version: @VERSION@ +Libs: -L${libdir} @TALLOC_LIBS@ -losmogsm -losmo-mslookup -losmocore +Cflags: -I${includedir}/ + diff --git a/src/Makefile.am b/src/Makefile.am index a5b71cf..f858ff0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,7 @@ -SUBDIRS = gsupclient +SUBDIRS = \ + gsupclient \ + mslookup \ + $(NULL) AM_CFLAGS = \ -Wall \ diff --git a/src/mslookup/Makefile.am b/src/mslookup/Makefile.am new file mode 100644 index 0000000..eb57efa --- /dev/null +++ b/src/mslookup/Makefile.am @@ -0,0 +1,35 @@ +# This is _NOT_ the library release version, it's an API version. +# Please read chapter "Library interface versions" of the libtool documentation +# before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html +LIBVERSION=0:0:0 + +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CFLAGS = -fPIC -Wall $(PCSC_CFLAGS) $(TALLOC_CFLAGS) +AM_LDFLAGS = $(COVERAGE_LDFLAGS) + +noinst_HEADERS = \ + mdns_msg.h \ + mdns_record.h \ + mdns_rfc.h \ + $(NULL) + +lib_LTLIBRARIES = libosmo-mslookup.la + +libosmo_mslookup_la_SOURCES = \ + mdns.c \ + mdns_msg.c \ + mdns_record.c \ + mdns_rfc.c \ + mdns_sock.c \ + mslookup.c \ + mslookup_client.c \ + mslookup_client_fake.c \ + mslookup_client_mdns.c \ + $(NULL) + +libosmo_mslookup_la_LDFLAGS = -version-info $(LIBVERSION) +libosmo_mslookup_la_LIBADD = \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(TALLOC_LIBS) \ + $(NULL) diff --git a/src/mslookup/mdns.c b/src/mslookup/mdns.c new file mode 100644 index 0000000..ede4bcf --- /dev/null +++ b/src/mslookup/mdns.c @@ -0,0 +1,394 @@ +/* mslookup specific functions for encoding and decoding mslookup queries/results into mDNS packets, using the high + * level functions from mdns_msg.c and mdns_record.c to build the request/answer messages. */ + +/* Copyright 2019 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 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 "mdns_msg.h" +#include "mdns_record.h" + +static struct msgb *osmo_mdns_msgb_alloc(const char *label) +{ + return msgb_alloc(1024, __func__); +} + +/*! Combine the mslookup query service, ID and ID type into a domain string. + * \returns allocated buffer with the resulting domain (i.e. "sip.voice.123.msisdn") on success, + * NULL on failure. + */ +static char *domain_from_query(void *ctx, const struct osmo_mslookup_query *query) +{ + const char *id; + + /* Get id from query */ + switch (query->id.type) { + case OSMO_MSLOOKUP_ID_IMSI: + id = query->id.imsi; + break; + case OSMO_MSLOOKUP_ID_MSISDN: + id = query->id.msisdn; + break; + default: + LOGP(DMSLOOKUP, LOGL_ERROR, "can't encode mslookup query id type %i", query->id.type); + return NULL; + } + + return talloc_asprintf(ctx, "%s.%s.%s", query->service, id, osmo_mslookup_id_type_name(query->id.type)); +} + +/*! Encode a mslookup query into a mDNS packet. + * \returns msgb, or NULL on error. + */ +struct msgb *osmo_mdns_query_encode(void *ctx, uint16_t packet_id, const struct osmo_mslookup_query *query) +{ + struct osmo_mdns_msg_request req = {0}; + struct msgb *msg = osmo_mdns_msgb_alloc(__func__); + + req.id = packet_id; + req.type = OSMO_MDNS_RFC_RECORD_TYPE_ALL; + req.domain = domain_from_query(ctx, query); + if (!req.domain) { + msgb_free(msg); + return NULL; + } + if (osmo_mdns_msg_request_encode(ctx, msg, &req)) { + msgb_free(msg); + return NULL; + } + talloc_free(req.domain); + return msg; +} + +/*! Decode a mDNS request packet into a mslookup query. + * \param[out] packet_id the result must be sent with the same packet_id. + * \returns allocated mslookup query on success, + * NULL on error. + */ +struct osmo_mslookup_query *osmo_mdns_query_decode(void *ctx, const uint8_t *data, size_t data_len, + uint16_t *packet_id) +{ + struct osmo_mdns_msg_request *req = NULL; + struct osmo_mslookup_query *query = NULL; + + req = osmo_mdns_msg_request_decode(ctx, data, data_len); + if (!req) + return NULL; + + query = talloc_zero(ctx, struct osmo_mslookup_query); + if (osmo_mslookup_query_from_domain_str(query, req->domain) < 0) + goto error; + + *packet_id = req->id; + talloc_free(req); + return query; +error: + if (req) + talloc_free(req); + if (query) + talloc_free(query); + return NULL; +} + +/*! Parse sockaddr_str from mDNS record, so the mslookup result can be filled with it. + * \param[out] sockaddr_str resulting IPv4 or IPv6 sockaddr_str. + * \param[in] rec single record of the abstracted list of mDNS records + * \returns 0 on success, + * -EINVAL on error. + */ +static int sockaddr_str_from_mdns_record(struct osmo_sockaddr_str *sockaddr_str, struct osmo_mdns_record *rec) +{ + switch (rec->type) { + case OSMO_MDNS_RFC_RECORD_TYPE_A: + if (rec->length != 4) { + LOGP(DMSLOOKUP, LOGL_ERROR, "unexpected length of A record\n"); + return -EINVAL; + } + osmo_sockaddr_str_from_32(sockaddr_str, *(uint32_t *)rec->data, 0); + break; + case OSMO_MDNS_RFC_RECORD_TYPE_AAAA: + if (rec->length != 16) { + LOGP(DMSLOOKUP, LOGL_ERROR, "unexpected length of AAAA record\n"); + return -EINVAL; + } + osmo_sockaddr_str_from_in6_addr(sockaddr_str, (struct in6_addr*)rec->data, 0); + break; + default: + LOGP(DMSLOOKUP, LOGL_ERROR, "unexpected record type\n"); + return -EINVAL; + } + return 0; +} + +/*! Encode a successful mslookup result, along with the original query and packet_id into one mDNS answer packet. + * + * The records in the packet are ordered as follows: + * 1) "age", ip_v4/v6, "port" (only IPv4 or IPv6 present) or + * 2) "age", ip_v4, "port", ip_v6, "port" (both IPv4 and v6 present). + * "age" and "port" are TXT records, ip_v4 is an A record, ip_v6 is an AAAA record. + * + * \param[in] packet_id as received in osmo_mdns_query_decode(). + * \param[in] query the original query, so we can send the domain back in the answer (i.e. "sip.voice.1234.msisdn"). + * \param[in] result holds the age, IPs and ports of the queried service. + * \returns msg on success, NULL on error. + */ +struct msgb *osmo_mdns_result_encode(void *ctx, uint16_t packet_id, const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + struct osmo_mdns_msg_answer ans = {}; + struct osmo_mdns_record *rec_age = NULL; + struct osmo_mdns_record rec_ip_v4 = {0}; + struct osmo_mdns_record rec_ip_v6 = {0}; + struct osmo_mdns_record *rec_ip_v4_port = NULL; + struct osmo_mdns_record *rec_ip_v6_port = NULL; + struct in_addr rec_ip_v4_in; + struct in6_addr rec_ip_v6_in; + struct msgb *msg = osmo_mdns_msgb_alloc(__func__); + char buf[256]; + + ctx = talloc_named(ctx, 0, "osmo_mdns_result_encode"); + + /* Prepare answer (ans) */ + ans.domain = domain_from_query(ctx, query); + if (!ans.domain) + goto error; + ans.id = packet_id; + INIT_LLIST_HEAD(&ans.records); + + /* Record for age */ + rec_age = osmo_mdns_record_txt_keyval_encode(ctx, "age", "%"PRIu32, result->age); + OSMO_ASSERT(rec_age); + llist_add_tail(&rec_age->list, &ans.records); + + /* Records for IPv4 */ + if (osmo_sockaddr_str_is_set(&result->host_v4)) { + if (osmo_sockaddr_str_to_in_addr(&result->host_v4, &rec_ip_v4_in) < 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "failed to encode ipv4: %s\n", + osmo_mslookup_result_name_b(buf, sizeof(buf), query, result)); + goto error; + } + rec_ip_v4.type = OSMO_MDNS_RFC_RECORD_TYPE_A; + rec_ip_v4.data = (uint8_t *)&rec_ip_v4_in; + rec_ip_v4.length = sizeof(rec_ip_v4_in); + llist_add_tail(&rec_ip_v4.list, &ans.records); + + rec_ip_v4_port = osmo_mdns_record_txt_keyval_encode(ctx, "port", "%"PRIu16, result->host_v4.port); + OSMO_ASSERT(rec_ip_v4_port); + llist_add_tail(&rec_ip_v4_port->list, &ans.records); + } + + /* Records for IPv6 */ + if (osmo_sockaddr_str_is_set(&result->host_v6)) { + if (osmo_sockaddr_str_to_in6_addr(&result->host_v6, &rec_ip_v6_in) < 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "failed to encode ipv6: %s\n", + osmo_mslookup_result_name_b(buf, sizeof(buf), query, result)); + goto error; + } + rec_ip_v6.type = OSMO_MDNS_RFC_RECORD_TYPE_AAAA; + rec_ip_v6.data = (uint8_t *)&rec_ip_v6_in; + rec_ip_v6.length = sizeof(rec_ip_v6_in); + llist_add_tail(&rec_ip_v6.list, &ans.records); + + rec_ip_v6_port = osmo_mdns_record_txt_keyval_encode(ctx, "port", "%"PRIu16, result->host_v6.port); + OSMO_ASSERT(rec_ip_v6_port); + llist_add_tail(&rec_ip_v6_port->list, &ans.records); + } + + if (osmo_mdns_msg_answer_encode(ctx, msg, &ans)) { + LOGP(DMSLOOKUP, LOGL_ERROR, "failed to encode mDNS answer: %s\n", + osmo_mslookup_result_name_b(buf, sizeof(buf), query, result)); + goto error; + } + talloc_free(ctx); + return msg; +error: + msgb_free(msg); + talloc_free(ctx); + return NULL; +} + +static int decode_uint32_t(const char *str, uint32_t *val) +{ + long long int lld; + char *endptr = NULL; + *val = 0; + errno = 0; + lld = strtoll(str, &endptr, 10); + if (errno || !endptr || *endptr) + return -EINVAL; + if (lld < 0 || lld > UINT32_MAX) + return -EINVAL; + *val = lld; + return 0; +} + +static int decode_port(const char *str, uint16_t *port) +{ + uint32_t val; + if (decode_uint32_t(str, &val)) + return -EINVAL; + if (val > 65535) + return -EINVAL; + *port = val; + return 0; +} + +/*! Read expected mDNS records into mslookup result. + * + * The records in the packet must be ordered as follows: + * 1) "age", ip_v4/v6, "port" (only IPv4 or IPv6 present) or + * 2) "age", ip_v4, "port", ip_v6, "port" (both IPv4 and v6 present). + * "age" and "port" are TXT records, ip_v4 is an A record, ip_v6 is an AAAA record. + * + * \param[out] result holds the age, IPs and ports of the queried service. + * \param[in] ans abstracted mDNS answer with a list of resource records. + * \returns 0 on success, + * -EINVAL on error. + */ +int osmo_mdns_result_from_answer(struct osmo_mslookup_result *result, const struct osmo_mdns_msg_answer *ans) +{ + struct osmo_mdns_record *rec; + char txt_key[64]; + char txt_value[64]; + bool found_age = false; + bool found_ip_v4 = false; + bool found_ip_v6 = false; + struct osmo_sockaddr_str *expect_port_for = NULL; + + result->rc = OSMO_MSLOOKUP_RC_NONE; + + llist_for_each_entry(rec, &ans->records, list) { + switch (rec->type) { + case OSMO_MDNS_RFC_RECORD_TYPE_A: + if (expect_port_for) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "'A' record found, but still expecting a 'port' value first\n"); + return -EINVAL; + } + if (found_ip_v4) { + LOGP(DMSLOOKUP, LOGL_ERROR, "'A' record found twice in mDNS answer\n"); + return -EINVAL; + } + found_ip_v4 = true; + expect_port_for = &result->host_v4; + if (sockaddr_str_from_mdns_record(expect_port_for, rec)) { + LOGP(DMSLOOKUP, LOGL_ERROR, "'A' record with invalid address data\n"); + return -EINVAL; + } + break; + case OSMO_MDNS_RFC_RECORD_TYPE_AAAA: + if (expect_port_for) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "'AAAA' record found, but still expecting a 'port' value first\n"); + return -EINVAL; + } + if (found_ip_v6) { + LOGP(DMSLOOKUP, LOGL_ERROR, "'AAAA' record found twice in mDNS answer\n"); + return -EINVAL; + } + found_ip_v6 = true; + expect_port_for = &result->host_v6; + if (sockaddr_str_from_mdns_record(expect_port_for, rec) != 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "'AAAA' record with invalid address data\n"); + return -EINVAL; + } + break; + case OSMO_MDNS_RFC_RECORD_TYPE_TXT: + if (osmo_mdns_record_txt_keyval_decode(rec, txt_key, sizeof(txt_key), + txt_value, sizeof(txt_value)) != 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "failed to decode txt record\n"); + return -EINVAL; + } + if (strcmp(txt_key, "age") == 0) { + if (found_age) { + LOGP(DMSLOOKUP, LOGL_ERROR, "duplicate 'TXT' record for 'age'\n"); + return -EINVAL; + } + found_age = true; + if (decode_uint32_t(txt_value, &result->age)) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "'TXT' record: invalid 'age' value ('age=%s')\n", txt_value); + return -EINVAL; + } + } else if (strcmp(txt_key, "port") == 0) { + if (!expect_port_for) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "'TXT' record for 'port' without previous 'A' or 'AAAA' record\n"); + return -EINVAL; + } + if (decode_port(txt_value, &expect_port_for->port)) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "'TXT' record: invalid 'port' value ('port=%s')\n", txt_value); + return -EINVAL; + } + expect_port_for = NULL; + } else { + LOGP(DMSLOOKUP, LOGL_ERROR, "unexpected key '%s' in TXT record\n", txt_key); + return -EINVAL; + } + break; + default: + LOGP(DMSLOOKUP, LOGL_ERROR, "unexpected record type\n"); + return -EINVAL; + } + } + + /* Check if everything was found */ + if (!found_age || !(found_ip_v4 || found_ip_v6) || expect_port_for) { + LOGP(DMSLOOKUP, LOGL_ERROR, "missing resource records in mDNS answer\n"); + return -EINVAL; + } + + result->rc = OSMO_MSLOOKUP_RC_RESULT; + return 0; +} + +/*! Decode a mDNS answer packet into a mslookup result, query and packet_id. + * \param[out] packet_id same ID as sent in the request packet. + * \param[out] query the original query (service, ID, ID type). + * \param[out] result holds the age, IPs and ports of the queried service. + * \returns 0 on success, + * -EINVAL on error. + */ +int osmo_mdns_result_decode(void *ctx, const uint8_t *data, size_t data_len, uint16_t *packet_id, + struct osmo_mslookup_query *query, struct osmo_mslookup_result *result) +{ + int rc = -EINVAL; + struct osmo_mdns_msg_answer *ans; + ans = osmo_mdns_msg_answer_decode(ctx, data, data_len); + if (!ans) + goto exit_free; + + if (osmo_mslookup_query_from_domain_str(query, ans->domain) < 0) + goto exit_free; + + if (osmo_mdns_result_from_answer(result, ans) < 0) + goto exit_free; + + *packet_id = ans->id; + rc = 0; +exit_free: + if (ans) + talloc_free(ans); + return rc; +} diff --git a/src/mslookup/mdns_msg.c b/src/mslookup/mdns_msg.c new file mode 100644 index 0000000..ef94c04 --- /dev/null +++ b/src/mslookup/mdns_msg.c @@ -0,0 +1,186 @@ +/* High level mDNS encoding and decoding functions for whole messages: + * Request message (header, question) + * Answer message (header, resource record 1, ... resource record N)*/ + +/* Copyright 2019 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 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 "mdns_msg.h" +#include "mdns_record.h" +#include +#include +#include + +/*! Encode request message into one mDNS packet, consisting of the header section and one question section. + * \returns 0 on success, + * -EINVAL on error. + */ +int osmo_mdns_msg_request_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_msg_request *req) +{ + struct osmo_mdns_rfc_header hdr = {0}; + struct osmo_mdns_rfc_question qst = {0}; + + hdr.id = req->id; + hdr.qdcount = 1; + osmo_mdns_rfc_header_encode(msg, &hdr); + + qst.domain = req->domain; + qst.qtype = req->type; + qst.qclass = OSMO_MDNS_RFC_CLASS_IN; + if (osmo_mdns_rfc_question_encode(ctx, msg, &qst) != 0) + return -EINVAL; + + return 0; +} + +/*! Decode request message from a mDNS packet, consisting of the header section and one question section. + * \returns allocated request message on success, + * NULL on error. + */ +struct osmo_mdns_msg_request *osmo_mdns_msg_request_decode(void *ctx, const uint8_t *data, size_t data_len) +{ + struct osmo_mdns_rfc_header hdr = {0}; + size_t hdr_len = sizeof(struct osmo_mdns_rfc_header); + struct osmo_mdns_rfc_question* qst = NULL; + struct osmo_mdns_msg_request *ret = NULL; + + if (data_len < hdr_len || osmo_mdns_rfc_header_decode(data, hdr_len, &hdr) != 0 || hdr.qr != 0) + return NULL; + + qst = osmo_mdns_rfc_question_decode(ctx, data + hdr_len, data_len - hdr_len); + if (!qst) + return NULL; + + ret = talloc(ctx, struct osmo_mdns_msg_request); + ret->id = hdr.id; + ret->domain = talloc_strdup(ret, qst->domain); + ret->type = qst->qtype; + + talloc_free(qst); + return ret; +} + +/*! Initialize the linked list for resource records in a answer message. */ +void osmo_mdns_msg_answer_init(struct osmo_mdns_msg_answer *ans) +{ + *ans = (struct osmo_mdns_msg_answer){}; + INIT_LLIST_HEAD(&ans->records); +} + +/*! Encode answer message into one mDNS packet, consisting of the header section and N resource records. + * + * To keep things simple, this sends the domain with each resource record. Other DNS implementations make use of + * "message compression", which would send a question section with the domain before the resource records, and then + * point inside each resource record with an offset back to the domain in the question section (RFC 1035 4.1.4). + * \returns 0 on success, + * -EINVAL on error. + */ +int osmo_mdns_msg_answer_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_msg_answer *ans) +{ + struct osmo_mdns_rfc_header hdr = {0}; + struct osmo_mdns_record *ans_record; + + hdr.id = ans->id; + hdr.qr = 1; + hdr.ancount = llist_count(&ans->records); + osmo_mdns_rfc_header_encode(msg, &hdr); + + llist_for_each_entry(ans_record, &ans->records, list) { + struct osmo_mdns_rfc_record rec = {0}; + + rec.domain = ans->domain; + rec.type = ans_record->type; + rec.class = OSMO_MDNS_RFC_CLASS_IN; + rec.ttl = 0; + rec.rdlength = ans_record->length; + rec.rdata = ans_record->data; + + if (osmo_mdns_rfc_record_encode(ctx, msg, &rec) != 0) + return -EINVAL; + } + + return 0; +} + +/*! Decode answer message from a mDNS packet. + * + * Answer messages must consist of one header and one or more resource records. An additional question section or + * message compression (RFC 1035 4.1.4) are not supported. +* \returns allocated answer message on success, + * NULL on error. + */ +struct osmo_mdns_msg_answer *osmo_mdns_msg_answer_decode(void *ctx, const uint8_t *data, size_t data_len) +{ + struct osmo_mdns_rfc_header hdr = {}; + size_t hdr_len = sizeof(struct osmo_mdns_rfc_header); + struct osmo_mdns_msg_answer *ret = talloc_zero(ctx, struct osmo_mdns_msg_answer); + + /* Parse header section */ + if (data_len < hdr_len || osmo_mdns_rfc_header_decode(data, hdr_len, &hdr) != 0 || hdr.qr != 1) + goto error; + ret->id = hdr.id; + data_len -= hdr_len; + data += hdr_len; + + /* Parse resource records */ + INIT_LLIST_HEAD(&ret->records); + while (data_len) { + size_t record_len; + struct osmo_mdns_rfc_record *rec; + struct osmo_mdns_record* ret_record; + + rec = osmo_mdns_rfc_record_decode(ret, data, data_len, &record_len); + if (!rec) + goto error; + + /* Copy domain to ret */ + if (ret->domain) { + if (strcmp(ret->domain, rec->domain) != 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "domain mismatch in resource records ('%s' vs '%s')\n", + ret->domain, rec->domain); + goto error; + } + } + else + ret->domain = talloc_strdup(ret, rec->domain); + + /* Add simplified record to ret */ + ret_record = talloc(ret, struct osmo_mdns_record); + ret_record->type = rec->type; + ret_record->length = rec->rdlength; + ret_record->data = talloc_memdup(ret_record, rec->rdata, rec->rdlength); + llist_add_tail(&ret_record->list, &ret->records); + + data += record_len; + data_len -= record_len; + talloc_free(rec); + } + + /* Verify record count */ + if (llist_count(&ret->records) != hdr.ancount) { + LOGP(DMSLOOKUP, LOGL_ERROR, "amount of parsed records (%i) doesn't match count in header (%i)\n", + llist_count(&ret->records), hdr.ancount); + goto error; + } + + return ret; +error: + talloc_free(ret); + return NULL; +} diff --git a/src/mslookup/mdns_msg.h b/src/mslookup/mdns_msg.h new file mode 100644 index 0000000..e4ab13f --- /dev/null +++ b/src/mslookup/mdns_msg.h @@ -0,0 +1,43 @@ +/* Copyright 2019 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 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 "mdns_rfc.h" + +struct osmo_mdns_msg_request { + uint16_t id; + char *domain; + enum osmo_mdns_rfc_record_type type; +}; + +struct osmo_mdns_msg_answer { + uint16_t id; + char *domain; + struct llist_head records; +}; + +int osmo_mdns_msg_request_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_msg_request *req); +struct osmo_mdns_msg_request *osmo_mdns_msg_request_decode(void *ctx, const uint8_t *data, size_t data_len); + +void osmo_mdns_msg_answer_init(struct osmo_mdns_msg_answer *answer); +int osmo_mdns_msg_answer_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_msg_answer *ans); +struct osmo_mdns_msg_answer *osmo_mdns_msg_answer_decode(void *ctx, const uint8_t *data, size_t data_len); +int osmo_mdns_result_from_answer(struct osmo_mslookup_result *result, const struct osmo_mdns_msg_answer *ans); diff --git a/src/mslookup/mdns_record.c b/src/mslookup/mdns_record.c new file mode 100644 index 0000000..c9b6e4c --- /dev/null +++ b/src/mslookup/mdns_record.c @@ -0,0 +1,104 @@ +/* High level mDNS functions for specific resource records, in particular for handling "key=value" TXT records. */ + +/* Copyright 2019 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 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 "mdns_record.h" + +/*! Get a TXT resource record, which stores a key=value string. + * \returns allocated resource record on success, + * NULL on error. + */ +static struct osmo_mdns_record *_osmo_mdns_record_txt_encode(void *ctx, const char *key, const char *value) +{ + struct osmo_mdns_record *ret = talloc_zero(ctx, struct osmo_mdns_record); + size_t len = strlen(key) + 1 + strlen(value); + + ret->data = (uint8_t *)talloc_asprintf(ctx, "%c%s=%s", (char)len, key, value); + if (!ret->data) + return NULL; + ret->type = OSMO_MDNS_RFC_RECORD_TYPE_TXT; + ret->length = len + 1; + return ret; +} + +/*! Get a TXT resource record, which stores a key=value string, but build value from a format string. + * \returns allocated resource record on success, + * NULL on error. + */ +struct osmo_mdns_record *osmo_mdns_record_txt_keyval_encode(void *ctx, const char *key, const char *value_fmt, ...) +{ + va_list ap; + char *value = NULL; + struct osmo_mdns_record *r; + + if (!value_fmt) + return _osmo_mdns_record_txt_encode(ctx, key, ""); + + va_start(ap, value_fmt); + value = talloc_vasprintf(ctx, value_fmt, ap); + if (!value) + return NULL; + va_end(ap); + r = _osmo_mdns_record_txt_encode(ctx, key, value); + talloc_free(value); + return r; +} + +/*! Decode a TXT resource record, which stores a key=value string. + * \returns 0 on success, + * -EINVAL on error. + */ +int osmo_mdns_record_txt_keyval_decode(const struct osmo_mdns_record *rec, + char *key_buf, size_t key_size, char *value_buf, size_t value_size) +{ + const char *key_value; + const char *key_value_end; + const char *sep; + const char *value; + + if (rec->type != OSMO_MDNS_RFC_RECORD_TYPE_TXT) + return -EINVAL; + + key_value = (const char *)rec->data; + key_value_end = key_value + rec->length; + + /* Verify and then skip the redundant string length byte */ + if (*key_value != rec->length - 1) + return -EINVAL; + key_value++; + + if (key_value >= key_value_end) + return -EINVAL; + + /* Find equals sign */ + sep = osmo_strnchr(key_value, key_value_end - key_value, '='); + if (!sep) + return -EINVAL; + + /* Parse key */ + osmo_token_copy(key_buf, key_size, key_value, sep - key_value); + + /* Parse value */ + value = sep + 1; + osmo_token_copy(value_buf, value_size, value, key_value_end - value); + return 0; +} diff --git a/src/mslookup/mdns_record.h b/src/mslookup/mdns_record.h new file mode 100644 index 0000000..d5247c5 --- /dev/null +++ b/src/mslookup/mdns_record.h @@ -0,0 +1,35 @@ +/* Copyright 2019 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 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 "mdns_rfc.h" +#include +#include + +struct osmo_mdns_record { + struct llist_head list; + enum osmo_mdns_rfc_record_type type; + uint16_t length; + uint8_t *data; +}; + +struct osmo_mdns_record *osmo_mdns_record_txt_keyval_encode(void *ctx, const char *key, const char *value_fmt, ...); +int osmo_mdns_record_txt_keyval_decode(const struct osmo_mdns_record *rec, + char *key_buf, size_t key_size, char *value_buf, size_t value_size); diff --git a/src/mslookup/mdns_rfc.c b/src/mslookup/mdns_rfc.c new file mode 100644 index 0000000..199d5f1 --- /dev/null +++ b/src/mslookup/mdns_rfc.c @@ -0,0 +1,261 @@ +/* Low level mDNS encoding and decoding functions of the qname IE, header/question sections and resource records, + * as described in these RFCs: + * - RFC 1035 (Domain names - implementation and specification) + * - RFC 3596 (DNS Extensions to Support IP Version 6) */ + +/* Copyright 2019 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 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 "mdns_rfc.h" + +/* + * Encode/decode IEs + */ + +/*! Encode a domain string as qname (RFC 1035 4.1.2). + * \param[in] domain multiple labels separated by dots, e.g. "sip.voice.1234.msisdn". + * \returns allocated buffer with length-value pairs for each label (e.g. 0x03 "sip" 0x05 "voice" ...), + * NULL on error. + */ +char *osmo_mdns_rfc_qname_encode(void *ctx, const char *domain) +{ + char *domain_dup; + char *domain_iter; + char buf[OSMO_MDNS_RFC_MAX_NAME_LEN + 2] = ""; /* len(qname) is len(domain) +1 */ + struct osmo_strbuf sb = { .buf = buf, .len = sizeof(buf) }; + char *label; + + if (strlen(domain) > OSMO_MDNS_RFC_MAX_NAME_LEN) + return NULL; + + domain_iter = domain_dup = talloc_strdup(ctx, domain); + while ((label = strsep(&domain_iter, "."))) { + size_t len = strlen(label); + + /* Empty domain, dot at start, two dots in a row, or ending with a dot */ + if (!len) + goto error; + + OSMO_STRBUF_PRINTF(sb, "%c%s", (char)len, label); + } + + talloc_free(domain_dup); + return talloc_strdup(ctx, buf); + +error: + talloc_free(domain_dup); + return NULL; +} + +/*! Decode a domain string from a qname (RFC 1035 4.1.2). + * \param[in] qname buffer with length-value pairs for each label (e.g. 0x03 "sip" 0x05 "voice" ...) + * \param[in] qname_max_len amount of bytes that can be read at most from the memory location that qname points to. + * \returns allocated buffer with domain string, multiple labels separated by dots (e.g. "sip.voice.1234.msisdn"), + * NULL on error. + */ +char *osmo_mdns_rfc_qname_decode(void *ctx, const char *qname, size_t qname_max_len) +{ + const char *next_label, *qname_end = qname + qname_max_len; + char buf[OSMO_MDNS_RFC_MAX_NAME_LEN + 1]; + int i = 0; + + if (qname_max_len < 1) + return NULL; + + while (*qname) { + size_t len = *qname; + next_label = qname + len + 1; + + if (next_label >= qname_end || i + len > OSMO_MDNS_RFC_MAX_NAME_LEN) + return NULL; + + if (i) { + /* Two dots in a row is not allowed */ + if (buf[i - 1] == '.') + return NULL; + + buf[i] = '.'; + i++; + } + + memcpy(buf + i, qname + 1, len); + i += len; + qname = next_label; + } + buf[i] = '\0'; + + return talloc_strdup(ctx, buf); +} + +/* + * Encode/decode message sections + */ + +/*! Encode header section (RFC 1035 4.1.1). */ +void osmo_mdns_rfc_header_encode(struct msgb *msg, const struct osmo_mdns_rfc_header *hdr) +{ + struct osmo_mdns_rfc_header *buf = (struct osmo_mdns_rfc_header *) msgb_put(msg, sizeof(*hdr)); + memcpy(buf, hdr, sizeof(*hdr)); + + osmo_store16be(buf->id, &buf->id); + osmo_store16be(buf->qdcount, &buf->qdcount); + osmo_store16be(buf->ancount, &buf->ancount); + osmo_store16be(buf->nscount, &buf->nscount); + osmo_store16be(buf->arcount, &buf->arcount); +} + +/*! Decode header section (RFC 1035 4.1.1). */ +int osmo_mdns_rfc_header_decode(const uint8_t *data, size_t data_len, struct osmo_mdns_rfc_header *hdr) +{ + if (data_len != sizeof(*hdr)) + return -EINVAL; + + memcpy(hdr, data, data_len); + + hdr->id = osmo_load16be(&hdr->id); + hdr->qdcount = osmo_load16be(&hdr->qdcount); + hdr->ancount = osmo_load16be(&hdr->ancount); + hdr->nscount = osmo_load16be(&hdr->nscount); + hdr->arcount = osmo_load16be(&hdr->arcount); + + return 0; +} + +/*! Encode question section (RFC 1035 4.1.2). */ +int osmo_mdns_rfc_question_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_question *qst) +{ + char *qname; + size_t qname_len; + uint8_t *qname_buf; + + /* qname */ + qname = osmo_mdns_rfc_qname_encode(ctx, qst->domain); + if (!qname) + return -EINVAL; + qname_len = strlen(qname) + 1; + qname_buf = msgb_put(msg, qname_len); + memcpy(qname_buf, qname, qname_len); + talloc_free(qname); + + /* qtype and qclass */ + msgb_put_u16(msg, qst->qtype); + msgb_put_u16(msg, qst->qclass); + + return 0; +} + +/*! Decode question section (RFC 1035 4.1.2). */ +struct osmo_mdns_rfc_question *osmo_mdns_rfc_question_decode(void *ctx, const uint8_t *data, size_t data_len) +{ + struct osmo_mdns_rfc_question *ret; + size_t qname_len = data_len - 4; + + if (data_len < 6) + return NULL; + + /* qname */ + ret = talloc_zero(ctx, struct osmo_mdns_rfc_question); + if (!ret) + return NULL; + ret->domain = osmo_mdns_rfc_qname_decode(ret, (const char *)data, qname_len); + if (!ret->domain) { + talloc_free(ret); + return NULL; + } + + /* qtype and qclass */ + ret->qtype = osmo_load16be(data + qname_len); + ret->qclass = osmo_load16be(data + qname_len + 2); + + return ret; +} + +/* + * Encode/decode resource records + */ + +/*! Encode one resource record (RFC 1035 4.1.3). */ +int osmo_mdns_rfc_record_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_record *rec) +{ + char *name; + size_t name_len; + uint8_t *buf; + + /* name */ + name = osmo_mdns_rfc_qname_encode(ctx, rec->domain); + if (!name) + return -EINVAL; + name_len = strlen(name) + 1; + buf = msgb_put(msg, name_len); + memcpy(buf, name, name_len); + talloc_free(name); + + /* type, class, ttl, rdlength */ + msgb_put_u16(msg, rec->type); + msgb_put_u16(msg, rec->class); + msgb_put_u32(msg, rec->ttl); + msgb_put_u16(msg, rec->rdlength); + + /* rdata */ + buf = msgb_put(msg, rec->rdlength); + memcpy(buf, rec->rdata, rec->rdlength); + return 0; +} + +/*! Decode one resource record (RFC 1035 4.1.3). */ +struct osmo_mdns_rfc_record *osmo_mdns_rfc_record_decode(void *ctx, const uint8_t *data, size_t data_len, + size_t *record_len) +{ + struct osmo_mdns_rfc_record *ret = talloc_zero(ctx, struct osmo_mdns_rfc_record); + size_t name_len; + + /* name */ + ret->domain = osmo_mdns_rfc_qname_decode(ret, (const char *)data, data_len - 10); + if (!ret->domain) + goto error; + name_len = strlen(ret->domain) + 2; + if (name_len + 10 > data_len) + goto error; + + /* type, class, ttl, rdlength */ + ret->type = osmo_load16be(data + name_len); + ret->class = osmo_load16be(data + name_len + 2); + ret->ttl = osmo_load32be(data + name_len + 4); + ret->rdlength = osmo_load16be(data + name_len + 8); + if (name_len + 10 + ret->rdlength > data_len) + goto error; + + /* rdata */ + ret->rdata = talloc_memdup(ret, data + name_len + 10, ret->rdlength); + if (!ret->rdata) + return NULL; + + *record_len = name_len + 10 + ret->rdlength; + return ret; +error: + talloc_free(ret); + return NULL; +} + diff --git a/src/mslookup/mdns_rfc.h b/src/mslookup/mdns_rfc.h new file mode 100644 index 0000000..257bcca --- /dev/null +++ b/src/mslookup/mdns_rfc.h @@ -0,0 +1,111 @@ +/* Copyright 2019 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 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 +#include +#include +#include + +/* RFC 1035 2.3.4 */ +#define OSMO_MDNS_RFC_MAX_NAME_LEN 255 + +enum osmo_mdns_rfc_record_type { + OSMO_MDNS_RFC_RECORD_TYPE_UNKNOWN = 0, + + /* RFC 1035 3.2.2 */ + OSMO_MDNS_RFC_RECORD_TYPE_A = 1, /* IPv4 address */ + OSMO_MDNS_RFC_RECORD_TYPE_TXT = 16, /* Text strings */ + + /* RFC 3596 2.1 */ + OSMO_MDNS_RFC_RECORD_TYPE_AAAA = 28, /* IPv6 address */ + + /* RFC 1035 3.2.3 */ + OSMO_MDNS_RFC_RECORD_TYPE_ALL = 255, /* Request only: ask for all */ +}; + +enum osmo_mdns_rfc_class { + OSMO_MDNS_RFC_CLASS_UNKNOWN = 0, + + /* RFC 1035 3.2.4 */ + OSMO_MDNS_RFC_CLASS_IN = 1, /* Internet and IP networks */ + + /* RFC 1035 3.2.5 */ + OSMO_MDNS_RFC_CLASS_ALL = 255, /* Request only: ask for all */ +}; + +/* RFC 1035 4.1.1 */ +struct osmo_mdns_rfc_header { +#if OSMO_IS_LITTLE_ENDIAN + uint16_t id; + uint8_t rd:1, + tc:1, + aa:1, + opcode:4, + qr:1; /* QR (0: query, 1: response) */ + uint8_t rcode:4, + z:3, + ra:1; + uint16_t qdcount; /* Number of questions */ + uint16_t ancount; /* Number of answers */ + uint16_t nscount; /* Number of authority records */ + uint16_t arcount; /* Number of additional records */ +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint16_t id; + uint8_t qr:1, opcode:4, aa:1, tc:1, rd:1; + uint8_t ra:1, z:3, rcode:4; + uint16_t qdcount; + uint16_t ancount; + uint16_t nscount; + uint16_t arcount; +#endif +} __attribute__ ((packed)); + +/* RFC 1035 4.1.2 */ +struct osmo_mdns_rfc_question { + char *domain; /* Domain to be encoded as qname (e.g. "hlr.1234567.imsi") */ + enum osmo_mdns_rfc_record_type qtype; + enum osmo_mdns_rfc_class qclass; +}; + +/* RFC 1035 4.1.3 */ +struct osmo_mdns_rfc_record { + char *domain; /* Domain to be encoded as name (e.g. "hlr.1234567.imsi") */ + enum osmo_mdns_rfc_record_type type; + enum osmo_mdns_rfc_class class; + uint32_t ttl; + uint16_t rdlength; + uint8_t *rdata; +}; + +char *osmo_mdns_rfc_qname_encode(void *ctx, const char *domain); +char *osmo_mdns_rfc_qname_decode(void *ctx, const char *qname, size_t qname_len); + +void osmo_mdns_rfc_header_encode(struct msgb *msg, const struct osmo_mdns_rfc_header *hdr); +int osmo_mdns_rfc_header_decode(const uint8_t *data, size_t data_len, struct osmo_mdns_rfc_header *hdr); + +int osmo_mdns_rfc_question_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_question *qst); +struct osmo_mdns_rfc_question *osmo_mdns_rfc_question_decode(void *ctx, const uint8_t *data, size_t data_len); + +int osmo_mdns_rfc_record_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_record *rec); +struct osmo_mdns_rfc_record *osmo_mdns_rfc_record_decode(void *ctx, const uint8_t *data, size_t data_len, + size_t *record_len); diff --git a/src/mslookup/mdns_sock.c b/src/mslookup/mdns_sock.c new file mode 100644 index 0000000..e45dfe2 --- /dev/null +++ b/src/mslookup/mdns_sock.c @@ -0,0 +1,146 @@ +/* Copyright 2019 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 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 + +/*! Open socket to send and receive multicast data. + * + * The socket is opened with SO_REUSEADDR, so we can bind to the same IP and port multiple times. Note that the callback + * will not only be called when someone else is sending data, but also for data that was sent from this osmo_mdns_sock. + * + * \param[in] ip multicast IPv4 or IPv6 address. + * \param[in] port port number. + * \param[in] cb callback for incoming data (should read from osmo_fd->fd). + * \param[in] data userdata passed to osmo_fd (available in cb as osmo_fd->data). + * \param[in] priv_nr additional userdata integer passed to osmo_fd (available in cb as osmo_fd->priv_nr). + * \returns allocated osmo_mdns_sock, + * NULL on error. + */ +struct osmo_mdns_sock *osmo_mdns_sock_init(void *ctx, const char *ip, unsigned int port, + int (*cb)(struct osmo_fd *fd, unsigned int what), + void *data, unsigned int priv_nr) +{ + struct osmo_mdns_sock *ret; + int sock, rc; + struct addrinfo hints = {0}; + struct ip_mreq multicast_req = {0}; + in_addr_t iface = INADDR_ANY; + char portbuf[10]; + int y = 1; + + snprintf(portbuf, sizeof(portbuf) -1, "%u", port); + ret = talloc_zero(ctx, struct osmo_mdns_sock); + OSMO_ASSERT(ret); + + /* Fill addrinfo */ + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = SOCK_DGRAM; + hints.ai_flags = (AI_PASSIVE | AI_NUMERICHOST); + rc = getaddrinfo(ip, portbuf, &hints, &ret->ai); + if (rc != 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: getaddrinfo: %s\n", gai_strerror(rc)); + ret->ai = NULL; + goto error; + } + + /* Open socket */ + sock = socket(ret->ai->ai_family, ret->ai->ai_socktype, 0); + if (sock == -1) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: socket: %s\n", strerror(errno)); + goto error; + } + + /* Set multicast options */ + rc = setsockopt(sock, IPPROTO_IP, IP_MULTICAST_IF, (char*)&iface, sizeof(iface)); + if (rc == -1) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: setsockopt: %s\n", strerror(errno)); + goto error; + } + memcpy(&multicast_req.imr_multiaddr, &((struct sockaddr_in*)(ret->ai->ai_addr))->sin_addr, + sizeof(multicast_req.imr_multiaddr)); + multicast_req.imr_interface.s_addr = htonl(INADDR_ANY); + rc = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*)&multicast_req, sizeof(multicast_req)); + if (rc == -1) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: setsockopt: %s\n", strerror(errno)); + goto error; + } + + /* Always allow binding the same IP and port twice. This is needed in OsmoHLR (where the code becomes cleaner by + * just using a different socket for server and client code) and in the mslookup_client_mdns_test. Also for + * osmo-mslookup-client if it is running multiple times in parallel (i.e. two incoming calls almost at the same + * time need to be resolved with the simple dialplan example that just starts new processes). */ + rc = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *)&y, sizeof(y)); + if (rc == -1) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: setsockopt: %s\n", strerror(errno)); + goto error; + } + + /* Bind and register osmo_fd callback */ + rc = bind(sock, ret->ai->ai_addr, ret->ai->ai_addrlen); + if (rc == -1) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: bind: %s\n", strerror(errno)); + goto error; + } + osmo_fd_setup(&ret->osmo_fd, sock, OSMO_FD_READ, cb, data, priv_nr); + if (osmo_fd_register(&ret->osmo_fd) != 0) + goto error; + + return ret; +error: + if (ret->ai) + freeaddrinfo(ret->ai); + talloc_free(ret); + return NULL; +} + +/*! Send msgb over mdns_sock and consume msgb. + * \returns 0 on success, + * -1 on error. + */ +int osmo_mdns_sock_send(const struct osmo_mdns_sock *mdns_sock, struct msgb *msg) +{ + size_t len = msgb_length(msg); + int rc = sendto(mdns_sock->osmo_fd.fd, msgb_data(msg), len, 0, mdns_sock->ai->ai_addr, + mdns_sock->ai->ai_addrlen); + msgb_free(msg); + return (rc == len) ? 0 : -1; +} + +/*! Tear down osmo_mdns_sock. */ +void osmo_mdns_sock_cleanup(struct osmo_mdns_sock *mdns_sock) +{ + osmo_fd_close(&mdns_sock->osmo_fd); + freeaddrinfo(mdns_sock->ai); + talloc_free(mdns_sock); +} diff --git a/src/mslookup/mslookup.c b/src/mslookup/mslookup.c new file mode 100644 index 0000000..c7edb82 --- /dev/null +++ b/src/mslookup/mslookup.c @@ -0,0 +1,256 @@ +/* Copyright 2019 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 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 + +#define CMP(a,b) (a < b? -1 : (a > b? 1 : 0)) + +const struct value_string osmo_mslookup_id_type_names[] = { + { OSMO_MSLOOKUP_ID_NONE, "none" }, + { OSMO_MSLOOKUP_ID_IMSI, "imsi" }, + { OSMO_MSLOOKUP_ID_MSISDN, "msisdn" }, + {} +}; + +const struct value_string osmo_mslookup_result_code_names[] = { + { OSMO_MSLOOKUP_RC_NONE, "none" }, + { OSMO_MSLOOKUP_RC_RESULT, "result" }, + { OSMO_MSLOOKUP_RC_NOT_FOUND, "not-found" }, + {} +}; + +/*! Compare two struct osmo_mslookup_id. + * \returns 0 if a and b are equal, + * < 0 if a (or the ID type / start of ID) is < b, + * > 0 if a (or the ID type / start of ID) is > b. + */ +int osmo_mslookup_id_cmp(const struct osmo_mslookup_id *a, const struct osmo_mslookup_id *b) +{ + int cmp; + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + + cmp = CMP(a->type, b->type); + if (cmp) + return cmp; + + switch (a->type) { + case OSMO_MSLOOKUP_ID_IMSI: + return strncmp(a->imsi, b->imsi, sizeof(a->imsi)); + case OSMO_MSLOOKUP_ID_MSISDN: + return strncmp(a->msisdn, b->msisdn, sizeof(a->msisdn)); + default: + return 0; + } +} + +bool osmo_mslookup_id_valid(const struct osmo_mslookup_id *id) +{ + switch (id->type) { + case OSMO_MSLOOKUP_ID_IMSI: + return osmo_imsi_str_valid(id->imsi); + case OSMO_MSLOOKUP_ID_MSISDN: + return osmo_msisdn_str_valid(id->msisdn); + default: + return false; + } +} + +bool osmo_mslookup_service_valid(const char *service) +{ + return strlen(service) > 0; +} + +/*! Write ID and ID type to a buffer. + * \param[out] buf nul-terminated {id}.{id_type} string (e.g. "1234.msisdn") or +* "?.none" if the ID type is invalid. + * \returns amount of bytes written to buf. + */ +size_t osmo_mslookup_id_name_buf(char *buf, size_t buflen, const struct osmo_mslookup_id *id) +{ + struct osmo_strbuf sb = { .buf = buf, .len = buflen }; + switch (id->type) { + case OSMO_MSLOOKUP_ID_IMSI: + OSMO_STRBUF_PRINTF(sb, "%s", id->imsi); + break; + case OSMO_MSLOOKUP_ID_MSISDN: + OSMO_STRBUF_PRINTF(sb, "%s", id->msisdn); + break; + default: + OSMO_STRBUF_PRINTF(sb, "?"); + break; + } + OSMO_STRBUF_PRINTF(sb, ".%s", osmo_mslookup_id_type_name(id->type)); + return sb.chars_needed; +} + +/*! Same as osmo_mslookup_id_name_buf(), but return a talloc allocated string of sufficient size. */ +char *osmo_mslookup_id_name_c(void *ctx, const struct osmo_mslookup_id *id) +{ + OSMO_NAME_C_IMPL(ctx, 64, "ERROR", osmo_mslookup_id_name_buf, id) +} + +/*! Same as osmo_mslookup_id_name_buf(), but directly return the char* (for printf-like string formats). */ +char *osmo_mslookup_id_name_b(char *buf, size_t buflen, const struct osmo_mslookup_id *id) +{ + int rc = osmo_mslookup_id_name_buf(buf, buflen, id); + if (rc < 0 && buflen) + buf[0] = '\0'; + return buf; +} + +/*! Write mslookup result string to buffer. + * \param[in] query with the service, ID and ID type to be written to buf like a domain string, or NULL to omit. + * \param[in] result with the result code, IPv4/v6 and age to be written to buf or NULL to omit. + * \param[out] buf result as flat string, which looks like the following for a valid query and result with IPv4 and v6 + * answer: "sip.voice.1234.msisdn -> ipv4: 42.42.42.42:1337 -> ipv6: [1234:5678:9ABC::]:1338 (age=1)", + * the result part can also be " -> timeout" or " -> rc=5" depending on the result code. + * \returns amount of bytes written to buf. + */ +size_t osmo_mslookup_result_name_buf(char *buf, size_t buflen, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + struct osmo_strbuf sb = { .buf = buf, .len = buflen }; + if (query) { + OSMO_STRBUF_PRINTF(sb, "%s.", query->service); + OSMO_STRBUF_APPEND(sb, osmo_mslookup_id_name_buf, &query->id); + } + if (result && result->rc == OSMO_MSLOOKUP_RC_NONE) + result = NULL; + if (result) { + if (result->rc != OSMO_MSLOOKUP_RC_RESULT) + OSMO_STRBUF_PRINTF(sb, " %s", osmo_mslookup_result_code_name(result->rc)); + if (result->rc == OSMO_MSLOOKUP_RC_RESULT) { + if (result->host_v4.ip[0]) { + OSMO_STRBUF_PRINTF(sb, " -> ipv4: " OSMO_SOCKADDR_STR_FMT, + OSMO_SOCKADDR_STR_FMT_ARGS(&result->host_v4)); + } + if (result->host_v6.ip[0]) { + OSMO_STRBUF_PRINTF(sb, " -> ipv6: " OSMO_SOCKADDR_STR_FMT, + OSMO_SOCKADDR_STR_FMT_ARGS(&result->host_v6)); + } + OSMO_STRBUF_PRINTF(sb, " (age=%u)", result->age); + } + OSMO_STRBUF_PRINTF(sb, " %s", result->last ? "(last)" : "(not-last)"); + } + return sb.chars_needed; +} + +/*! Same as osmo_mslookup_result_name_buf(), but return a talloc allocated string of sufficient size. */ +char *osmo_mslookup_result_name_c(void *ctx, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + OSMO_NAME_C_IMPL(ctx, 64, "ERROR", osmo_mslookup_result_name_buf, query, result) +} + +/*! Same as osmo_mslookup_result_name_buf(), but directly return the char* (for printf-like string formats). */ +char *osmo_mslookup_result_name_b(char *buf, size_t buflen, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + int rc = osmo_mslookup_result_name_buf(buf, buflen, query, result); + if (rc < 0 && buflen) + buf[0] = '\0'; + return buf; +} + +/*! Copy part of a string to a buffer and nul-terminate it. + * \returns 0 on success, + * negative on error. + */ +static int token(char *dest, size_t dest_size, const char *start, const char *end) +{ + int len; + if (start >= end) + return -10; + len = end - start; + if (len >= dest_size) + return -11; + strncpy(dest, start, len); + dest[len] = '\0'; + return 0; +} + +/*! Parse a string like "foo.moo.goo.123456789012345.msisdn" into service="foo.moo.goo", id="123456789012345" and + * id_type="msisdn", placed in a struct osmo_mslookup_query. + * \returns 0 on success, + * negative on error. + */ +int osmo_mslookup_query_from_domain_str(struct osmo_mslookup_query *q, const char *domain) +{ + const char *last_dot; + const char *second_last_dot; + const char *id_type; + const char *id; + int rc; + + *q = (struct osmo_mslookup_query){}; + + if (!domain) + return -1; + + last_dot = strrchr(domain, '.'); + + if (!last_dot) + return -2; + + if (last_dot <= domain) + return -3; + + for (second_last_dot = last_dot - 1; second_last_dot > domain && *second_last_dot != '.'; second_last_dot--); + if (second_last_dot == domain || *second_last_dot != '.') + return -3; + + id_type = last_dot + 1; + if (!*id_type) + return -4; + + q->id.type = get_string_value(osmo_mslookup_id_type_names, id_type); + + id = second_last_dot + 1; + switch (q->id.type) { + case OSMO_MSLOOKUP_ID_IMSI: + rc = token(q->id.imsi, sizeof(q->id.imsi), id, last_dot); + if (rc) + return rc; + if (!osmo_imsi_str_valid(q->id.imsi)) + return -5; + break; + case OSMO_MSLOOKUP_ID_MSISDN: + rc = token(q->id.msisdn, sizeof(q->id.msisdn), id, last_dot); + if (rc) + return rc; + if (!osmo_msisdn_str_valid(q->id.msisdn)) + return -6; + break; + default: + return -7; + } + + return token(q->service, sizeof(q->service), domain, second_last_dot); +} diff --git a/src/mslookup/mslookup_client.c b/src/mslookup/mslookup_client.c new file mode 100644 index 0000000..f53f374 --- /dev/null +++ b/src/mslookup/mslookup_client.c @@ -0,0 +1,311 @@ +/* Copyright 2019 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 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 + +/*! Lookup client's internal data for a query. */ +struct osmo_mslookup_client { + struct llist_head lookup_methods; + struct llist_head requests; + uint32_t next_request_handle; +}; + +/*! Lookup client's internal data for a query. + * The request methods only get to see the query part, and result handling is done commonly for all request methods. */ +struct osmo_mslookup_client_request { + struct llist_head entry; + struct osmo_mslookup_client *client; + uint32_t request_handle; + + struct osmo_mslookup_query query; + struct osmo_mslookup_query_handling handling; + struct osmo_timer_list timeout; + bool waiting_min_delay; + + struct osmo_mslookup_result result; +}; + +static struct osmo_mslookup_client_request *get_request(struct osmo_mslookup_client *client, uint32_t request_handle) +{ + struct osmo_mslookup_client_request *r; + if (!request_handle) + return NULL; + llist_for_each_entry(r, &client->requests, entry) { + if (r->request_handle == request_handle) + return r; + } + return NULL; +} + +struct osmo_mslookup_client *osmo_mslookup_client_new(void *ctx) +{ + struct osmo_mslookup_client *client = talloc_zero(ctx, struct osmo_mslookup_client); + OSMO_ASSERT(client); + INIT_LLIST_HEAD(&client->lookup_methods); + INIT_LLIST_HEAD(&client->requests); + return client; +} + +/*! Return whether any lookup methods are available. + * \param[in] client Client to query. + * \return true when a client is present that has at least one osmo_mslookup_client_method registered. + */ +bool osmo_mslookup_client_active(struct osmo_mslookup_client *client) +{ + if (!client) + return false; + if (llist_empty(&client->lookup_methods)) + return false; + return true; +} + +static void _osmo_mslookup_client_method_del(struct osmo_mslookup_client_method *method) +{ + if (method->destruct) + method->destruct(method); + llist_del(&method->entry); + talloc_free(method); +} + +/*! Stop and free mslookup client and all registered lookup methods. + */ +void osmo_mslookup_client_free(struct osmo_mslookup_client *client) +{ + struct osmo_mslookup_client_method *m, *n; + if (!client) + return; + llist_for_each_entry_safe(m, n, &client->lookup_methods, entry) { + _osmo_mslookup_client_method_del(m); + } + talloc_free(client); +} + +/*! Add an osmo_mslookup_client_method to service MS Lookup requests. + * Note, osmo_mslookup_client_method_del() will talloc_free() the method pointer, so it needs to be dynamically + * allocated. + * \param client The osmo_mslookup_client instance to add to. + * \param method A fully initialized method struct, allocated by talloc. + */ +void osmo_mslookup_client_method_add(struct osmo_mslookup_client *client, + struct osmo_mslookup_client_method *method) +{ + method->client = client; + llist_add_tail(&method->entry, &client->lookup_methods); +} + +/*! \return false if the method was not listed, true if the method was listed, removed and talloc_free()d. + */ +bool osmo_mslookup_client_method_del(struct osmo_mslookup_client *client, + struct osmo_mslookup_client_method *method) +{ + struct osmo_mslookup_client_method *m; + llist_for_each_entry(m, &client->lookup_methods, entry) { + if (m == method) { + _osmo_mslookup_client_method_del(method); + return true; + } + } + return false; +} + +static void osmo_mslookup_request_send_result(struct osmo_mslookup_client_request *r, bool finish) +{ + struct osmo_mslookup_client *client = r->client; + uint32_t request_handle = r->request_handle; + + r->result.last = finish; + r->handling.result_cb(r->client, r->request_handle, &r->query, &r->result); + + /* Make sure the request struct is discarded. + * The result_cb() may already have triggered a cleanup, so query by request_handle. */ + if (finish) + osmo_mslookup_client_request_cancel(client, request_handle); +} + +void osmo_mslookup_client_rx_result(struct osmo_mslookup_client *client, uint32_t request_handle, + const struct osmo_mslookup_result *result) +{ + struct osmo_mslookup_client_request *req = get_request(client, request_handle); + + if (!req) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "Internal error: Got mslookup result for a request that does not exist (handle %u)\n", + req->request_handle); + return; + } + + /* Ignore incoming results that are not successful */ + if (result->rc != OSMO_MSLOOKUP_RC_RESULT) + return; + + /* If we already stored an earlier successful result, keep that if its age is younger. */ + if (req->result.rc == OSMO_MSLOOKUP_RC_RESULT + && result->age >= req->result.age) + return; + + req->result = *result; + + /* If age == 0, it doesn't get any better, so return the result immediately. */ + if (req->result.age == 0) { + osmo_mslookup_request_send_result(req, true); + return; + } + + if (req->waiting_min_delay) + return; + + osmo_mslookup_request_send_result(req, false); +} + +static void _osmo_mslookup_client_request_cleanup(struct osmo_mslookup_client_request *r) +{ + struct osmo_mslookup_client_method *m; + osmo_timer_del(&r->timeout); + llist_for_each_entry(m, &r->client->lookup_methods, entry) { + if (!m->request_cleanup) + continue; + m->request_cleanup(m, r->request_handle); + } + llist_del(&r->entry); + talloc_free(r); +} + +static void timeout_cb(void *data); + +static void set_timer(struct osmo_mslookup_client_request *r, unsigned long milliseconds) +{ + osmo_timer_setup(&r->timeout, timeout_cb, r); + osmo_timer_schedule(&r->timeout, milliseconds / 1000, (milliseconds % 1000) * 1000); +} + +static void timeout_cb(void *data) +{ + struct osmo_mslookup_client_request *r = data; + if (r->waiting_min_delay) { + /* The initial delay has passed. See if it stops here, or whether the overall timeout continues. */ + r->waiting_min_delay = false; + + if (r->handling.result_timeout_milliseconds <= r->handling.min_delay_milliseconds) { + /* It ends here. Return a final result. */ + if (r->result.rc != OSMO_MSLOOKUP_RC_RESULT) + r->result.rc = OSMO_MSLOOKUP_RC_NOT_FOUND; + osmo_mslookup_request_send_result(r, true); + return; + } + + /* We continue to listen for results. If one is already on record, send it now. */ + if (r->result.rc == OSMO_MSLOOKUP_RC_RESULT) + osmo_mslookup_request_send_result(r, false); + + set_timer(r, r->handling.result_timeout_milliseconds - r->handling.min_delay_milliseconds); + return; + } + /* The final timeout has passed, finish and clean up the request. */ + switch (r->result.rc) { + case OSMO_MSLOOKUP_RC_RESULT: + /* If the rc == OSMO_MSLOOKUP_RC_RESULT, this result has already been sent. + * Don't send it again, instead send an RC_NONE, last=true result. */ + r->result.rc = OSMO_MSLOOKUP_RC_NONE; + break; + default: + r->result.rc = OSMO_MSLOOKUP_RC_NOT_FOUND; + break; + } + osmo_mslookup_request_send_result(r, true); +} + +/*! Launch a subscriber lookup with the provided query. + * A request is cleared implicitly when the handling->result_cb is invoked; if the quer->priv pointer becomes invalid + * before that, a request should be canceled by calling osmo_mslookup_client_request_cancel() with the returned + * request_handle. A request handle of zero indicates error. + * \return a nonzero request_handle that allows ending the request, or 0 on invalid query data. */ +uint32_t osmo_mslookup_client_request(struct osmo_mslookup_client *client, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_query_handling *handling) +{ + struct osmo_mslookup_client_request *r; + struct osmo_mslookup_client_request *other; + struct osmo_mslookup_client_method *m; + + if (!osmo_mslookup_service_valid(query->service) + || !osmo_mslookup_id_valid(&query->id)) { + char buf[256]; + LOGP(DMSLOOKUP, LOGL_ERROR, "Invalid query: %s\n", + osmo_mslookup_result_name_b(buf, sizeof(buf), query, NULL)); + return 0; + } + + r = talloc_zero(client, struct osmo_mslookup_client_request); + OSMO_ASSERT(r); + + /* A request_handle of zero means error, so make sure we don't use a zero handle. */ + if (!client->next_request_handle) + client->next_request_handle++; + *r = (struct osmo_mslookup_client_request){ + .client = client, + .query = *query, + .handling = *handling, + .request_handle = client->next_request_handle++, + }; + + if (!r->handling.result_timeout_milliseconds) + r->handling.result_timeout_milliseconds = r->handling.min_delay_milliseconds; + if (!r->handling.result_timeout_milliseconds) + r->handling.result_timeout_milliseconds = 1000; + + /* Paranoia: make sure a request_handle exists only once, by expiring an already existing one. This is unlikely + * to happen in practice: before we get near wrapping a uint32_t range, previous requests should long have + * timed out or ended. */ + llist_for_each_entry(other, &client->requests, entry) { + if (other->request_handle != r->request_handle) + continue; + osmo_mslookup_request_send_result(other, true); + /* we're sure it exists only once. */ + break; + } + + /* Now sure that the new request_handle does not exist a second time. */ + llist_add_tail(&r->entry, &client->requests); + + if (r->handling.min_delay_milliseconds) { + r->waiting_min_delay = true; + set_timer(r, r->handling.min_delay_milliseconds); + } else { + set_timer(r, r->handling.result_timeout_milliseconds); + } + + /* Let the lookup implementations know */ + llist_for_each_entry(m, &client->lookup_methods, entry) { + m->request(m, query, r->request_handle); + } + return r->request_handle; +} + +/*! End or cancel a subscriber lookup. This *must* be invoked exactly once per osmo_mslookup_client_request() invocation, + * either after a lookup has concluded or to abort an ongoing lookup. + * \param[in] request_handle The request_handle returned by an osmo_mslookup_client_request() invocation. + */ +void osmo_mslookup_client_request_cancel(struct osmo_mslookup_client *client, uint32_t request_handle) +{ + struct osmo_mslookup_client_request *r = get_request(client, request_handle); + if (!r) + return; + _osmo_mslookup_client_request_cleanup(r); +} diff --git a/src/mslookup/mslookup_client_fake.c b/src/mslookup/mslookup_client_fake.c new file mode 100644 index 0000000..b5f1e21 --- /dev/null +++ b/src/mslookup/mslookup_client_fake.c @@ -0,0 +1,157 @@ +/* Copyright 2019 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 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 + +/* Fake mslookup method */ + +struct fake_lookup_state { + struct osmo_mslookup_client *client; + struct llist_head requests; + struct osmo_timer_list async_response_timer; + struct osmo_mslookup_fake_response *responses; + size_t responses_len; +}; + +struct fake_lookup_request { + struct llist_head entry; + uint32_t request_handle; + struct osmo_mslookup_query query; + struct timeval received_at; +}; + +/*! Args for osmo_timer_schedule: seconds and microseconds. */ +#define ASYNC_RESPONSE_PERIOD 0, (1e6 / 10) +static void fake_lookup_async_response(void *state); + +static void fake_lookup_request(struct osmo_mslookup_client_method *method, + const struct osmo_mslookup_query *query, + uint32_t request_handle) +{ + struct fake_lookup_state *state = method->priv; + char buf[256]; + LOGP(DMSLOOKUP, LOGL_DEBUG, "%s(%s)\n", __func__, osmo_mslookup_result_name_b(buf, sizeof(buf), query, NULL)); + + /* A real implementation would send packets to some remote server. + * Here this is simulated: add to the list of requests, which fake_lookup_async_response() will reply upon + * according to the test data listing the replies that the test wants to generate. */ + + struct fake_lookup_request *r = talloc_zero(method->client, struct fake_lookup_request); + *r = (struct fake_lookup_request){ + .request_handle = request_handle, + .query = *query, + }; + osmo_gettimeofday(&r->received_at, NULL); + llist_add_tail(&r->entry, &state->requests); +} + +static void fake_lookup_request_cleanup(struct osmo_mslookup_client_method *method, + uint32_t request_handle) +{ + struct fake_lookup_state *state = method->priv; + + /* Tear down any state associated with this handle. */ + struct fake_lookup_request *r; + llist_for_each_entry(r, &state->requests, entry) { + if (r->request_handle != request_handle) + continue; + llist_del(&r->entry); + talloc_free(r); + LOGP(DMSLOOKUP, LOGL_DEBUG, "%s() ok\n", __func__); + return; + } + LOGP(DMSLOOKUP, LOGL_DEBUG, "%s() FAILED\n", __func__); +} + +static void fake_lookup_async_response(void *data) +{ + struct fake_lookup_state *state = data; + struct fake_lookup_request *req, *n; + struct timeval now; + char str[256]; + + osmo_gettimeofday(&now, NULL); + + llist_for_each_entry_safe(req, n, &state->requests, entry) { + struct osmo_mslookup_fake_response *resp; + + for (resp = state->responses; + (resp - state->responses) < state->responses_len; + resp++) { + struct timeval diff; + + if (resp->sent) + continue; + if (osmo_mslookup_id_cmp(&req->query.id, &resp->for_id) != 0) + continue; + if (strcmp(req->query.service, resp->for_service) != 0) + continue; + + timersub(&now, &req->received_at, &diff); + if (timercmp(&diff, &resp->time_to_reply, <)) + continue; + + /* It's time to reply to this request. */ + LOGP(DMSLOOKUP, LOGL_DEBUG, "osmo_mslookup_client_rx_result(): %s\n", + osmo_mslookup_result_name_b(str, sizeof(str), &req->query, &resp->result)); + osmo_mslookup_client_rx_result(state->client, req->request_handle, &resp->result); + resp->sent = true; + + /* The req will have been cleaned up now, so we must not iterate over state->responses anymore + * with this req. */ + break; + } + } + + osmo_timer_schedule(&state->async_response_timer, ASYNC_RESPONSE_PERIOD); +} + +struct osmo_mslookup_client_method *osmo_mslookup_client_add_fake(struct osmo_mslookup_client *client, + struct osmo_mslookup_fake_response *responses, + size_t responses_len) +{ + struct osmo_mslookup_client_method *method = talloc_zero(client, struct osmo_mslookup_client_method); + OSMO_ASSERT(method); + + struct fake_lookup_state *state = talloc_zero(method, struct fake_lookup_state); + OSMO_ASSERT(state); + *state = (struct fake_lookup_state){ + .client = client, + .responses = responses, + .responses_len = responses_len, + }; + INIT_LLIST_HEAD(&state->requests); + + *method = (struct osmo_mslookup_client_method){ + .name = "fake", + .priv = state, + .request = fake_lookup_request, + .request_cleanup = fake_lookup_request_cleanup, + }; + + osmo_timer_setup(&state->async_response_timer, fake_lookup_async_response, state); + osmo_mslookup_client_method_add(client, method); + + osmo_timer_schedule(&state->async_response_timer, ASYNC_RESPONSE_PERIOD); + return method; +} diff --git a/src/mslookup/mslookup_client_mdns.c b/src/mslookup/mslookup_client_mdns.c new file mode 100644 index 0000000..12501ee --- /dev/null +++ b/src/mslookup/mslookup_client_mdns.c @@ -0,0 +1,223 @@ +/* Copyright 2019 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 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 + +struct osmo_mdns_method_state { + /* Parameters passed by _add_method_dns() */ + struct osmo_sockaddr_str bind_addr; + + struct osmo_mdns_sock *mc; + + struct osmo_mslookup_client *client; + struct llist_head requests; + uint16_t next_packet_id; +}; + +struct osmo_mdns_method_request { + struct llist_head entry; + uint32_t request_handle; + struct osmo_mslookup_query query; + uint16_t packet_id; +}; + +static int request_handle_by_query(uint32_t *request_handle, struct osmo_mdns_method_state *state, + struct osmo_mslookup_query *query, uint16_t packet_id) +{ + struct osmo_mdns_method_request *request; + + llist_for_each_entry(request, &state->requests, entry) { + if (strcmp(request->query.service, query->service) != 0) + continue; + if (osmo_mslookup_id_cmp(&request->query.id, &query->id) != 0) + continue; + + /* Match! */ + *request_handle = request->request_handle; + return 0; + } + return -1; +} + +static int mdns_method_recv(struct osmo_fd *osmo_fd, unsigned int what) +{ + struct osmo_mdns_method_state *state = osmo_fd->data; + struct osmo_mslookup_result result; + struct osmo_mslookup_query query; + uint16_t packet_id; + int n; + uint8_t buffer[1024]; + uint32_t request_handle = 0; + void *ctx = state; + + n = read(osmo_fd->fd, buffer, sizeof(buffer)); + if (n < 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "failed to read from socket\n"); + return n; + } + + if (osmo_mdns_result_decode(ctx, buffer, n, &packet_id, &query, &result) < 0) + return -EINVAL; + + if (request_handle_by_query(&request_handle, state, &query, packet_id) != 0) + return -EINVAL; + + osmo_mslookup_client_rx_result(state->client, request_handle, &result); + return n; +} + +static void mdns_method_request(struct osmo_mslookup_client_method *method, const struct osmo_mslookup_query *query, + uint32_t request_handle) +{ + char buf[256]; + struct osmo_mdns_method_state *state = method->priv; + struct msgb *msg; + struct osmo_mdns_method_request *r = talloc_zero(method->client, struct osmo_mdns_method_request); + + *r = (struct osmo_mdns_method_request){ + .request_handle = request_handle, + .query = *query, + .packet_id = state->next_packet_id, + }; + llist_add(&r->entry, &state->requests); + state->next_packet_id++; + + msg = osmo_mdns_query_encode(method->client, r->packet_id, query); + if (!msg) { + LOGP(DMSLOOKUP, LOGL_ERROR, "Cannot encode request: %s\n", + osmo_mslookup_result_name_b(buf, sizeof(buf), query, NULL)); + } + + /* Send over the wire */ + LOGP(DMSLOOKUP, LOGL_DEBUG, "sending mDNS query: %s.%s\n", query->service, + osmo_mslookup_id_name_b(buf, sizeof(buf), &query->id)); + if (osmo_mdns_sock_send(state->mc, msg) == -1) + LOGP(DMSLOOKUP, LOGL_ERROR, "sending mDNS query failed\n"); +} + +static void mdns_method_request_cleanup(struct osmo_mslookup_client_method *method, uint32_t request_handle) +{ + struct osmo_mdns_method_state *state = method->priv; + + /* Tear down any state associated with this handle. */ + struct osmo_mdns_method_request *r; + llist_for_each_entry(r, &state->requests, entry) { + if (r->request_handle != request_handle) + continue; + llist_del(&r->entry); + talloc_free(r); + return; + } +} + +static void mdns_method_destruct(struct osmo_mslookup_client_method *method) +{ + struct osmo_mdns_method_state *state = method->priv; + struct osmo_mdns_method_request *e, *n; + if (!state) + return; + + /* Drop all DNS lookup request state. Triggering a timeout event and cleanup for mslookup client users will + * happen in the mslookup_client.c, we will simply stop responding from this lookup method. */ + llist_for_each_entry_safe(e, n, &state->requests, entry) { + llist_del(&e->entry); + } + + osmo_mdns_sock_cleanup(state->mc); +} + +/*! Initialize the mDNS lookup method. + * \param[in] client the client to attach the method to. + * \param[in] ip IPv4 or IPv6 address string. + * \param[in] port The port to bind to. + * \param[in] initial_packet_id Used in the first mslookup query, then increased by one in each following query. All + * servers answer to each query with the same packet ID. Set to -1 to use a random + * initial ID (recommended unless you need deterministic output). This ID is for visually + * distinguishing the packets in packet sniffers, the mslookup client uses not just the + * ID, but all query parameters (service type, ID, ID type), to determine if a reply is + * relevant. */ +struct osmo_mslookup_client_method *osmo_mslookup_client_add_mdns(struct osmo_mslookup_client *client, const char *ip, + uint16_t port, int initial_packet_id) +{ + struct osmo_mdns_method_state *state; + struct osmo_mslookup_client_method *m; + + m = talloc_zero(client, struct osmo_mslookup_client_method); + OSMO_ASSERT(m); + + state = talloc_zero(m, struct osmo_mdns_method_state); + OSMO_ASSERT(state); + INIT_LLIST_HEAD(&state->requests); + if (osmo_sockaddr_str_from_str(&state->bind_addr, ip, port)) { + LOGP(DMSLOOKUP, LOGL_ERROR, "mslookup mDNS: invalid address/port: %s %u\n", + ip, port); + goto error_cleanup; + } + + if (initial_packet_id == -1) { + if (osmo_get_rand_id((uint8_t *)&state->next_packet_id, 2) < 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "mslookup mDNS: failed to generate random initial packet ID\n"); + goto error_cleanup; + } + } else + state->next_packet_id = initial_packet_id; + + state->client = client; + + state->mc = osmo_mdns_sock_init(state, ip, port, mdns_method_recv, state, 0); + if (!state->mc) + goto error_cleanup; + + *m = (struct osmo_mslookup_client_method){ + .name = "mDNS", + .priv = state, + .request = mdns_method_request, + .request_cleanup = mdns_method_request_cleanup, + .destruct = mdns_method_destruct, + }; + + osmo_mslookup_client_method_add(client, m); + return m; + +error_cleanup: + talloc_free(m); + return NULL; +} + +const struct osmo_sockaddr_str *osmo_mslookup_client_method_mdns_get_bind_addr(struct osmo_mslookup_client_method + *dns_method) +{ + struct osmo_mdns_method_state *state; + if (!dns_method || !dns_method->priv) + return NULL; + state = dns_method->priv; + return &state->bind_addr; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index bbe21b5..bc5fc87 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,6 +3,7 @@ gsup_server \ db \ db_upgrade \ + mslookup \ $(NULL) # The `:;' works around a Bash 3.2 bug when the output is not writeable. diff --git a/tests/mslookup/Makefile.am b/tests/mslookup/Makefile.am new file mode 100644 index 0000000..ebf2add --- /dev/null +++ b/tests/mslookup/Makefile.am @@ -0,0 +1,69 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + -ggdb3 \ + -I$(top_srcdir)/include \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(NULL) + +AM_LDFLAGS = \ + -no-install \ + $(NULL) + +EXTRA_DIST = \ + mdns_test.err \ + mslookup_client_mdns_test.err \ + mslookup_client_test.err \ + mslookup_test.err \ + $(NULL) + +check_PROGRAMS = \ + mdns_test \ + mslookup_client_mdns_test \ + mslookup_client_test \ + mslookup_test \ + $(NULL) + +mslookup_test_SOURCES = \ + mslookup_test.c \ + $(NULL) +mslookup_test_LDADD = \ + $(top_builddir)/src/mslookup/libosmo-mslookup.la \ + $(LIBOSMOGSM_LIBS) \ + $(NULL) + +mslookup_client_test_SOURCES = \ + mslookup_client_test.c \ + $(NULL) +mslookup_client_test_LDADD = \ + $(top_builddir)/src/mslookup/libosmo-mslookup.la \ + $(LIBOSMOGSM_LIBS) \ + $(NULL) + +mslookup_client_mdns_test_SOURCES = \ + mslookup_client_mdns_test.c \ + $(NULL) +mslookup_client_mdns_test_LDADD = \ + $(top_builddir)/src/mslookup/libosmo-mslookup.la \ + $(LIBOSMOGSM_LIBS) \ + $(NULL) + +mdns_test_SOURCES = \ + mdns_test.c \ + $(NULL) +mdns_test_LDADD = \ + $(top_builddir)/src/mslookup/libosmo-mslookup.la \ + $(LIBOSMOGSM_LIBS) \ + $(NULL) + +.PHONY: update_exp +update_exp: + for i in $(check_PROGRAMS); do \ + echo "Updating $$i.err"; \ + $(builddir)/$$i 2>"$(srcdir)/$$i.err"; \ + done diff --git a/tests/mslookup/mdns_test.c b/tests/mslookup/mdns_test.c new file mode 100644 index 0000000..ac87bbe --- /dev/null +++ b/tests/mslookup/mdns_test.c @@ -0,0 +1,603 @@ +/* Copyright 2019 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 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 "../../src/mslookup/mdns_rfc.h" +#include "../../src/mslookup/mdns_record.h" +#include "../../src/mslookup/mdns_msg.h" +#include +#include +#include +#include +#include +#include + +struct qname_enc_dec_test { + const char *domain; + const char *qname; + size_t qname_max_len; /* default: strlen(qname) + 1 */ +}; + +static const struct qname_enc_dec_test qname_enc_dec_test_data[] = { + { + /* OK: typical mslookup domain */ + .domain = "hlr.1234567.imsi", + .qname = "\x03" "hlr" "\x07" "1234567" "\x04" "imsi", + }, + { + /* Wrong format: double dot */ + .domain = "hlr..imsi", + .qname = NULL, + }, + { + /* Wrong format: double dot */ + .domain = "hlr", + .qname = "\x03hlr\0\x03imsi", + }, + { + /* Wrong format: dot at end */ + .domain = "hlr.", + .qname = NULL, + }, + { + /* Wrong format: dot at start */ + .domain = ".hlr", + .qname = NULL, + }, + { + /* Wrong format: empty */ + .domain = "", + .qname = NULL, + }, + { + /* OK: maximum length */ + .domain = + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "12345" + , + .qname = + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\x05" "12345" + }, + { + /* Error: too long domain */ + .domain = + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "12345toolong" + , + .qname = NULL, + }, + { + /* Error: too long qname */ + .domain = NULL, + .qname = + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + }, + { + /* Error: wrong token length in qname */ + .domain = NULL, + .qname = "\x03" "hlr" "\x07" "1234567" "\x05" "imsi", + }, + { + /* Error: wrong token length in qname */ + .domain = NULL, + .qname = "\x02" "hlr" "\x07" "1234567" "\x04" "imsi", + }, + { + /* Wrong format: token length at end of qname */ + .domain = NULL, + .qname = "\x03hlr\x03", + }, + { + /* Error: overflow in label length */ + .domain = NULL, + .qname = "\x03" "hlr" "\x07" "1234567" "\x04" "imsi", + .qname_max_len = 17, + }, +}; + +void test_enc_dec_rfc_qname(void *ctx) +{ + char quote_buf[300]; + int i; + + fprintf(stderr, "-- %s --\n", __func__); + + for (i = 0; i < ARRAY_SIZE(qname_enc_dec_test_data); i++) { + const struct qname_enc_dec_test *t = &qname_enc_dec_test_data[i]; + char *res; + + if (t->domain) { + fprintf(stderr, "domain: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->domain, -1)); + fprintf(stderr, "exp: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->qname, -1)); + res = osmo_mdns_rfc_qname_encode(ctx, t->domain); + fprintf(stderr, "res: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), res, -1)); + if (t->qname == res || (t->qname && res && strcmp(t->qname, res) == 0)) + fprintf(stderr, "=> OK\n"); + else + fprintf(stderr, "=> ERROR\n"); + if (res) + talloc_free(res); + fprintf(stderr, "\n"); + } + + if (t->qname) { + size_t qname_max_len = t->qname_max_len; + if (qname_max_len) + fprintf(stderr, "qname_max_len: %lu\n", qname_max_len); + else + qname_max_len = strlen(t->qname) + 1; + + fprintf(stderr, "qname: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->qname, -1)); + fprintf(stderr, "exp: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->domain, -1)); + res = osmo_mdns_rfc_qname_decode(ctx, t->qname, qname_max_len); + fprintf(stderr, "res: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), res, -1)); + if (t->domain == res || (t->domain && res && strcmp(t->domain, res) == 0)) + fprintf(stderr, "=> OK\n"); + else + fprintf(stderr, "=> ERROR\n"); + if (res) + talloc_free(res); + fprintf(stderr, "\n"); + } + } +} + +#define PRINT_HDR(hdr, name) \ + fprintf(stderr, "header %s:\n" \ + ".id = %i\n" \ + ".qr = %i\n" \ + ".opcode = %x\n" \ + ".aa = %i\n" \ + ".tc = %i\n" \ + ".rd = %i\n" \ + ".ra = %i\n" \ + ".z = %x\n" \ + ".rcode = %x\n" \ + ".qdcount = %u\n" \ + ".ancount = %u\n" \ + ".nscount = %u\n" \ + ".arcount = %u\n", \ + name, hdr.id, hdr.qr, hdr.opcode, hdr.aa, hdr.tc, hdr.rd, hdr.ra, hdr.z, hdr.rcode, hdr.qdcount, \ + hdr.ancount, hdr.nscount, hdr.arcount) + +static const struct osmo_mdns_rfc_header header_enc_dec_test_data[] = { + { + /* Typical use case for mslookup */ + .id = 1337, + .qdcount = 1, + }, + { + /* Fill out everything */ + .id = 42, + .qr = 1, + .opcode = 0x02, + .aa = 1, + .tc = 1, + .rd = 1, + .ra = 1, + .z = 0x02, + .rcode = 0x03, + .qdcount = 1234, + .ancount = 1111, + .nscount = 2222, + .arcount = 3333, + }, +}; + +void test_enc_dec_rfc_header() +{ + int i; + + fprintf(stderr, "-- %s --\n", __func__); + for (i = 0; i< ARRAY_SIZE(header_enc_dec_test_data); i++) { + const struct osmo_mdns_rfc_header in = header_enc_dec_test_data[i]; + struct osmo_mdns_rfc_header out = {0}; + struct msgb *msg = msgb_alloc(4096, "dns_test"); + + PRINT_HDR(in, "in"); + osmo_mdns_rfc_header_encode(msg, &in); + fprintf(stderr, "encoded: %s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg))); + assert(osmo_mdns_rfc_header_decode(msgb_data(msg), msgb_length(msg), &out) == 0); + PRINT_HDR(out, "out"); + + fprintf(stderr, "in (hexdump): %s\n", osmo_hexdump((unsigned char *)&in, sizeof(in))); + fprintf(stderr, "out (hexdump): %s\n", osmo_hexdump((unsigned char *)&out, sizeof(out))); + assert(memcmp(&in, &out, sizeof(in)) == 0); + + fprintf(stderr, "=> OK\n\n"); + msgb_free(msg); + } +} + +void test_enc_dec_rfc_header_einval() +{ + struct osmo_mdns_rfc_header out = {0}; + struct msgb *msg = msgb_alloc(4096, "dns_test"); + fprintf(stderr, "-- %s --\n", __func__); + + assert(osmo_mdns_rfc_header_decode(msgb_data(msg), 11, &out) == -EINVAL); + fprintf(stderr, "=> OK\n\n"); + + msgb_free(msg); +} + +#define PRINT_QST(qst, name) \ + fprintf(stderr, "question %s:\n" \ + ".domain = %s\n" \ + ".qtype = %i\n" \ + ".qclass = %i\n", \ + name, (qst)->domain, (qst)->qtype, (qst)->qclass) + +static const struct osmo_mdns_rfc_question question_enc_dec_test_data[] = { + { + .domain = "hlr.1234567.imsi", + .qtype = OSMO_MDNS_RFC_RECORD_TYPE_ALL, + .qclass = OSMO_MDNS_RFC_CLASS_IN, + }, + { + .domain = "hlr.1234567.imsi", + .qtype = OSMO_MDNS_RFC_RECORD_TYPE_A, + .qclass = OSMO_MDNS_RFC_CLASS_ALL, + }, + { + .domain = "hlr.1234567.imsi", + .qtype = OSMO_MDNS_RFC_RECORD_TYPE_AAAA, + .qclass = OSMO_MDNS_RFC_CLASS_ALL, + }, +}; + +void test_enc_dec_rfc_question(void *ctx) +{ + int i; + + fprintf(stderr, "-- %s --\n", __func__); + for (i = 0; i< ARRAY_SIZE(question_enc_dec_test_data); i++) { + const struct osmo_mdns_rfc_question in = question_enc_dec_test_data[i]; + struct osmo_mdns_rfc_question *out; + struct msgb *msg = msgb_alloc(4096, "dns_test"); + + PRINT_QST(&in, "in"); + assert(osmo_mdns_rfc_question_encode(ctx, msg, &in) == 0); + fprintf(stderr, "encoded: %s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg))); + out = osmo_mdns_rfc_question_decode(ctx, msgb_data(msg), msgb_length(msg)); + assert(out); + PRINT_QST(out, "out"); + + if (strcmp(in.domain, out->domain) != 0) + fprintf(stderr, "=> ERROR: domain does not match\n"); + else if (in.qtype != out->qtype) + fprintf(stderr, "=> ERROR: qtype does not match\n"); + else if (in.qclass != out->qclass) + fprintf(stderr, "=> ERROR: qclass does not match\n"); + else + fprintf(stderr, "=> OK\n"); + + fprintf(stderr, "\n"); + msgb_free(msg); + talloc_free(out); + } +} + +void test_enc_dec_rfc_question_null(void *ctx) +{ + uint8_t data[5] = {0}; + + fprintf(stderr, "-- %s --\n", __func__); + assert(osmo_mdns_rfc_question_decode(ctx, data, sizeof(data)) == NULL); + fprintf(stderr, "=> OK\n\n"); +} + +#define PRINT_REC(rec, name) \ + fprintf(stderr, "question %s:\n" \ + ".domain = %s\n" \ + ".type = %i\n" \ + ".class = %i\n" \ + ".ttl = %i\n" \ + ".rdlength = %i\n" \ + ".rdata = %s\n", \ + name, (rec)->domain, (rec)->type, (rec)->class, (rec)->ttl, (rec)->rdlength, \ + osmo_quote_str((char *)(rec)->rdata, (rec)->rdlength)) + +static const struct osmo_mdns_rfc_record record_enc_dec_test_data[] = { + { + .domain = "hlr.1234567.imsi", + .type = OSMO_MDNS_RFC_RECORD_TYPE_A, + .class = OSMO_MDNS_RFC_CLASS_IN, + .ttl = 1234, + .rdlength = 9, + .rdata = (uint8_t *)"10.42.2.1", + }, +}; + +void test_enc_dec_rfc_record(void *ctx) +{ + int i; + + fprintf(stderr, "-- %s --\n", __func__); + for (i=0; i< ARRAY_SIZE(record_enc_dec_test_data); i++) { + const struct osmo_mdns_rfc_record in = record_enc_dec_test_data[i]; + struct osmo_mdns_rfc_record *out; + struct msgb *msg = msgb_alloc(4096, "dns_test"); + size_t record_len; + + PRINT_REC(&in, "in"); + assert(osmo_mdns_rfc_record_encode(ctx, msg, &in) == 0); + fprintf(stderr, "encoded: %s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg))); + out = osmo_mdns_rfc_record_decode(ctx, msgb_data(msg), msgb_length(msg), &record_len); + fprintf(stderr, "record_len: %lu\n", record_len); + assert(out); + PRINT_REC(out, "out"); + + if (strcmp(in.domain, out->domain) != 0) + fprintf(stderr, "=> ERROR: domain does not match\n"); + else if (in.type != out->type) + fprintf(stderr, "=> ERROR: type does not match\n"); + else if (in.class != out->class) + fprintf(stderr, "=> ERROR: class does not match\n"); + else if (in.ttl != out->ttl) + fprintf(stderr, "=> ERROR: ttl does not match\n"); + else if (in.rdlength != out->rdlength) + fprintf(stderr, "=> ERROR: rdlength does not match\n"); + else if (memcmp(in.rdata, out->rdata, in.rdlength) != 0) + fprintf(stderr, "=> ERROR: rdata does not match\n"); + else + fprintf(stderr, "=> OK\n"); + + fprintf(stderr, "\n"); + msgb_free(msg); + talloc_free(out); + } +} + +static uint8_t ip_v4_n[] = {23, 42, 47, 11}; +static uint8_t ip_v6_n[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00}; + + +enum test_records { + RECORD_NONE, + RECORD_A, + RECORD_AAAA, + RECORD_TXT_AGE, + RECORD_TXT_PORT_444, + RECORD_TXT_PORT_666, + RECORD_TXT_INVALID_KEY, + RECORD_TXT_INVALID_NO_KEY_VALUE, + RECORD_INVALID, +}; +struct result_from_answer_test { + const char *desc; + const enum test_records records[5]; + bool error; + const struct osmo_mslookup_result res; +}; + +static void test_result_from_answer(void *ctx) +{ + void *print_ctx = talloc_named_const(ctx, 0, __func__); + struct osmo_sockaddr_str test_host_v4 = {.af = AF_INET, .port=444, .ip = "23.42.47.11"}; + struct osmo_sockaddr_str test_host_v6 = {.af = AF_INET6, .port=666, + .ip = "1122:3344:5566:7788:99aa:bbcc:ddee:ff00"}; + struct osmo_mslookup_result test_result_v4 = {.rc = OSMO_MSLOOKUP_RC_RESULT, .age = 3, + .host_v4 = test_host_v4}; + struct osmo_mslookup_result test_result_v6 = {.rc = OSMO_MSLOOKUP_RC_RESULT, .age = 3, + .host_v6 = test_host_v6}; + struct osmo_mslookup_result test_result_v4_v6 = {.rc = OSMO_MSLOOKUP_RC_RESULT, .age = 3, + .host_v4 = test_host_v4, .host_v6 = test_host_v6}; + struct result_from_answer_test result_from_answer_data[] = { + { + .desc = "IPv4", + .records = {RECORD_TXT_AGE, RECORD_A, RECORD_TXT_PORT_444}, + .res = test_result_v4 + }, + { + .desc = "IPv6", + .records = {RECORD_TXT_AGE, RECORD_AAAA, RECORD_TXT_PORT_666}, + .res = test_result_v6 + }, + { + .desc = "IPv4 + IPv6", + .records = {RECORD_TXT_AGE, RECORD_A, RECORD_TXT_PORT_444, RECORD_AAAA, RECORD_TXT_PORT_666}, + .res = test_result_v4_v6 + }, + { + .desc = "A twice", + .records = {RECORD_TXT_AGE, RECORD_A, RECORD_TXT_PORT_444, RECORD_A}, + .error = true + }, + { + .desc = "AAAA twice", + .records = {RECORD_TXT_AGE, RECORD_AAAA, RECORD_TXT_PORT_444, RECORD_AAAA}, + .error = true + }, + { + .desc = "invalid TXT: no key/value pair", + .records = {RECORD_TXT_AGE, RECORD_AAAA, RECORD_TXT_INVALID_NO_KEY_VALUE}, + .error = true + }, + { + .desc = "age twice", + .records = {RECORD_TXT_AGE, RECORD_TXT_AGE}, + .error = true + }, + { + .desc = "port as first record", + .records = {RECORD_TXT_PORT_444}, + .error = true + }, + { + .desc = "port without previous ip record", + .records = {RECORD_TXT_AGE, RECORD_TXT_PORT_444}, + .error = true + }, + { + .desc = "invalid TXT: invalid key", + .records = {RECORD_TXT_AGE, RECORD_AAAA, RECORD_TXT_INVALID_KEY}, + .error = true + }, + { + .desc = "unexpected record type", + .records = {RECORD_TXT_AGE, RECORD_INVALID}, + .error = true + }, + { + .desc = "missing record: age", + .records = {RECORD_A, RECORD_TXT_PORT_444}, + .error = true + }, + { + .desc = "missing record: port for ipv4", + .records = {RECORD_TXT_AGE, RECORD_A}, + .error = true + }, + { + .desc = "missing record: port for ipv4 #2", + .records = {RECORD_TXT_AGE, RECORD_AAAA, RECORD_TXT_PORT_666, RECORD_A}, + .error = true + }, + }; + int i = 0; + int j = 0; + + fprintf(stderr, "-- %s --\n", __func__); + for (i = 0; i < ARRAY_SIZE(result_from_answer_data); i++) { + struct result_from_answer_test *t = &result_from_answer_data[i]; + struct osmo_mdns_msg_answer ans = {0}; + struct osmo_mslookup_result res = {0}; + void *ctx_test = talloc_named_const(ctx, 0, t->desc); + bool is_error; + + fprintf(stderr, "---\n"); + fprintf(stderr, "test: %s\n", t->desc); + fprintf(stderr, "error: %s\n", t->error ? "true" : "false"); + fprintf(stderr, "records:\n"); + /* Build records list */ + INIT_LLIST_HEAD(&ans.records); + for (j = 0; j < ARRAY_SIZE(t->records); j++) { + struct osmo_mdns_record *rec = NULL; + + switch (t->records[j]) { + case RECORD_NONE: + break; + case RECORD_A: + fprintf(stderr, "- A 42.42.42.42\n"); + rec = talloc_zero(ctx_test, struct osmo_mdns_record); + rec->type = OSMO_MDNS_RFC_RECORD_TYPE_A; + rec->data = ip_v4_n; + rec->length = sizeof(ip_v4_n); + break; + case RECORD_AAAA: + fprintf(stderr, "- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00\n"); + rec = talloc_zero(ctx_test, struct osmo_mdns_record); + rec->type = OSMO_MDNS_RFC_RECORD_TYPE_AAAA; + rec->data = ip_v6_n; + rec->length = sizeof(ip_v6_n); + break; + case RECORD_TXT_AGE: + fprintf(stderr, "- TXT age=3\n"); + rec = osmo_mdns_record_txt_keyval_encode(ctx_test, "age", "3"); + break; + case RECORD_TXT_PORT_444: + fprintf(stderr, "- TXT port=444\n"); + rec = osmo_mdns_record_txt_keyval_encode(ctx_test, "port", "444"); + break; + case RECORD_TXT_PORT_666: + fprintf(stderr, "- TXT port=666\n"); + rec = osmo_mdns_record_txt_keyval_encode(ctx_test, "port", "666"); + break; + case RECORD_TXT_INVALID_KEY: + fprintf(stderr, "- TXT hello=world\n"); + rec = osmo_mdns_record_txt_keyval_encode(ctx_test, "hello", "world"); + break; + case RECORD_TXT_INVALID_NO_KEY_VALUE: + fprintf(stderr, "- TXT 12345\n"); + rec = osmo_mdns_record_txt_keyval_encode(ctx_test, "12", "45"); + rec->data[3] = '3'; + break; + case RECORD_INVALID: + fprintf(stderr, "- (invalid)\n"); + rec = talloc_zero(ctx, struct osmo_mdns_record); + rec->type = OSMO_MDNS_RFC_RECORD_TYPE_UNKNOWN; + break; + } + + if (rec) + llist_add_tail(&rec->list, &ans.records); + } + + /* Verify output */ + is_error = (osmo_mdns_result_from_answer(&res, &ans) != 0); + if (t->error != is_error) { + fprintf(stderr, "got %s\n", is_error ? "error" : "no error"); + OSMO_ASSERT(false); + } + if (!t->error) { + fprintf(stderr, "exp: %s\n", osmo_mslookup_result_name_c(print_ctx, NULL, &t->res)); + fprintf(stderr, "res: %s\n", osmo_mslookup_result_name_c(print_ctx, NULL, &res)); + OSMO_ASSERT(t->res.rc == res.rc); + OSMO_ASSERT(!osmo_sockaddr_str_cmp(&t->res.host_v4, &res.host_v4)); + OSMO_ASSERT(!osmo_sockaddr_str_cmp(&t->res.host_v6, &res.host_v6)); + OSMO_ASSERT(t->res.age == res.age); + OSMO_ASSERT(t->res.last == res.last); + } + + talloc_free(ctx_test); + fprintf(stderr, "=> OK\n"); + } +} + +int main() +{ + void *ctx = talloc_named_const(NULL, 0, "main"); + osmo_init_logging2(ctx, NULL); + + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_level(osmo_stderr_target, 1); + log_set_print_category(osmo_stderr_target, 1); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + + test_enc_dec_rfc_qname(ctx); + test_enc_dec_rfc_header(); + test_enc_dec_rfc_header_einval(); + test_enc_dec_rfc_question(ctx); + test_enc_dec_rfc_question_null(ctx); + test_enc_dec_rfc_record(ctx); + + test_result_from_answer(ctx); + + return 0; +} diff --git a/tests/mslookup/mdns_test.err b/tests/mslookup/mdns_test.err new file mode 100644 index 0000000..51e5afe --- /dev/null +++ b/tests/mslookup/mdns_test.err @@ -0,0 +1,336 @@ +-- test_enc_dec_rfc_qname -- +domain: "hlr.1234567.imsi" +exp: "\3hlr\a1234567\4imsi" +res: "\3hlr\a1234567\4imsi" +=> OK + +qname: "\3hlr\a1234567\4imsi" +exp: "hlr.1234567.imsi" +res: "hlr.1234567.imsi" +=> OK + +domain: "hlr..imsi" +exp: NULL +res: NULL +=> OK + +domain: "hlr" +exp: "\3hlr" +res: "\3hlr" +=> OK + +qname: "\3hlr" +exp: "hlr" +res: "hlr" +=> OK + +domain: "hlr." +exp: NULL +res: NULL +=> OK + +domain: ".hlr" +exp: NULL +res: NULL +=> OK + +domain: "" +exp: NULL +res: NULL +=> OK + +domain: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345" +exp: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345" +res: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345" +=> OK + +qname: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345" +exp: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345" +res: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345" +=> OK + +domain: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345toolong" +exp: NULL +res: NULL +=> OK + +qname: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\ +exp: NULL +res: NULL +=> OK + +qname: "\3hlr\a1234567\5imsi" +exp: NULL +res: NULL +=> OK + +qname: "\2hlr\a1234567\4imsi" +exp: NULL +res: NULL +=> OK + +qname: "\3hlr\3" +exp: NULL +res: NULL +=> OK + +qname_max_len: 17 +qname: "\3hlr\a1234567\4imsi" +exp: NULL +res: NULL +=> OK + +-- test_enc_dec_rfc_header -- +header in: +.id = 1337 +.qr = 0 +.opcode = 0 +.aa = 0 +.tc = 0 +.rd = 0 +.ra = 0 +.z = 0 +.rcode = 0 +.qdcount = 1 +.ancount = 0 +.nscount = 0 +.arcount = 0 +encoded: 05 39 00 00 00 01 00 00 00 00 00 00 +header out: +.id = 1337 +.qr = 0 +.opcode = 0 +.aa = 0 +.tc = 0 +.rd = 0 +.ra = 0 +.z = 0 +.rcode = 0 +.qdcount = 1 +.ancount = 0 +.nscount = 0 +.arcount = 0 +in (hexdump): 39 05 00 00 01 00 00 00 00 00 00 00 +out (hexdump): 39 05 00 00 01 00 00 00 00 00 00 00 +=> OK + +header in: +.id = 42 +.qr = 1 +.opcode = 2 +.aa = 1 +.tc = 1 +.rd = 1 +.ra = 1 +.z = 2 +.rcode = 3 +.qdcount = 1234 +.ancount = 1111 +.nscount = 2222 +.arcount = 3333 +encoded: 00 2a 97 a3 04 d2 04 57 08 ae 0d 05 +header out: +.id = 42 +.qr = 1 +.opcode = 2 +.aa = 1 +.tc = 1 +.rd = 1 +.ra = 1 +.z = 2 +.rcode = 3 +.qdcount = 1234 +.ancount = 1111 +.nscount = 2222 +.arcount = 3333 +in (hexdump): 2a 00 97 a3 d2 04 57 04 ae 08 05 0d +out (hexdump): 2a 00 97 a3 d2 04 57 04 ae 08 05 0d +=> OK + +-- test_enc_dec_rfc_header_einval -- +=> OK + +-- test_enc_dec_rfc_question -- +question in: +.domain = hlr.1234567.imsi +.qtype = 255 +.qclass = 1 +encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 ff 00 01 +question out: +.domain = hlr.1234567.imsi +.qtype = 255 +.qclass = 1 +=> OK + +question in: +.domain = hlr.1234567.imsi +.qtype = 1 +.qclass = 255 +encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 01 00 ff +question out: +.domain = hlr.1234567.imsi +.qtype = 1 +.qclass = 255 +=> OK + +question in: +.domain = hlr.1234567.imsi +.qtype = 28 +.qclass = 255 +encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 1c 00 ff +question out: +.domain = hlr.1234567.imsi +.qtype = 28 +.qclass = 255 +=> OK + +-- test_enc_dec_rfc_question_null -- +=> OK + +-- test_enc_dec_rfc_record -- +question in: +.domain = hlr.1234567.imsi +.type = 1 +.class = 1 +.ttl = 1234 +.rdlength = 9 +.rdata = "10.42.2.1" +encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 01 00 01 00 00 04 d2 00 09 31 30 2e 34 32 2e 32 2e 31 +record_len: 37 +question out: +.domain = hlr.1234567.imsi +.type = 1 +.class = 1 +.ttl = 1234 +.rdlength = 9 +.rdata = "10.42.2.1" +=> OK + +-- test_result_from_answer -- +--- +test: IPv4 +error: false +records: +- TXT age=3 +- A 42.42.42.42 +- TXT port=444 +exp: -> ipv4: 23.42.47.11:444 (age=3) (not-last) +res: -> ipv4: 23.42.47.11:444 (age=3) (not-last) +=> OK +--- +test: IPv6 +error: false +records: +- TXT age=3 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT port=666 +exp: -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last) +res: -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last) +=> OK +--- +test: IPv4 + IPv6 +error: false +records: +- TXT age=3 +- A 42.42.42.42 +- TXT port=444 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT port=666 +exp: -> ipv4: 23.42.47.11:444 -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last) +res: -> ipv4: 23.42.47.11:444 -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last) +=> OK +--- +test: A twice +error: true +records: +- TXT age=3 +- A 42.42.42.42 +- TXT port=444 +- A 42.42.42.42 +DLGLOBAL ERROR 'A' record found twice in mDNS answer +=> OK +--- +test: AAAA twice +error: true +records: +- TXT age=3 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT port=444 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +DLGLOBAL ERROR 'AAAA' record found twice in mDNS answer +=> OK +--- +test: invalid TXT: no key/value pair +error: true +records: +- TXT age=3 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT 12345 +DLGLOBAL ERROR failed to decode txt record +=> OK +--- +test: age twice +error: true +records: +- TXT age=3 +- TXT age=3 +DLGLOBAL ERROR duplicate 'TXT' record for 'age' +=> OK +--- +test: port as first record +error: true +records: +- TXT port=444 +DLGLOBAL ERROR 'TXT' record for 'port' without previous 'A' or 'AAAA' record +=> OK +--- +test: port without previous ip record +error: true +records: +- TXT age=3 +- TXT port=444 +DLGLOBAL ERROR 'TXT' record for 'port' without previous 'A' or 'AAAA' record +=> OK +--- +test: invalid TXT: invalid key +error: true +records: +- TXT age=3 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT hello=world +DLGLOBAL ERROR unexpected key 'hello' in TXT record +=> OK +--- +test: unexpected record type +error: true +records: +- TXT age=3 +- (invalid) +DLGLOBAL ERROR unexpected record type +=> OK +--- +test: missing record: age +error: true +records: +- A 42.42.42.42 +- TXT port=444 +DLGLOBAL ERROR missing resource records in mDNS answer +=> OK +--- +test: missing record: port for ipv4 +error: true +records: +- TXT age=3 +- A 42.42.42.42 +DLGLOBAL ERROR missing resource records in mDNS answer +=> OK +--- +test: missing record: port for ipv4 #2 +error: true +records: +- TXT age=3 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT port=666 +- A 42.42.42.42 +DLGLOBAL ERROR missing resource records in mDNS answer +=> OK diff --git a/tests/mslookup/mslookup_client_mdns_test.c b/tests/mslookup/mslookup_client_mdns_test.c new file mode 100644 index 0000000..c54250b --- /dev/null +++ b/tests/mslookup/mslookup_client_mdns_test.c @@ -0,0 +1,219 @@ +/* Copyright 2019 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 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 + +void *ctx = NULL; + +#define TEST_IP OSMO_MSLOOKUP_MDNS_IP4 +#define TEST_PORT OSMO_MSLOOKUP_MDNS_PORT + +/* + * Test server (emulates the mDNS server in OsmoHLR) and client + */ +struct osmo_mdns_sock *server_mc; + + +static void server_reply(struct osmo_mslookup_query *query, uint16_t packet_id) +{ + struct osmo_mslookup_result result = {0}; + struct msgb *msg; + + result.rc = OSMO_MSLOOKUP_RC_RESULT; + result.age = 3; + osmo_sockaddr_str_from_str(&result.host_v4, "42.42.42.42", 444); + osmo_sockaddr_str_from_str(&result.host_v6, "1122:3344:5566:7788:99aa:bbcc:ddee:ff00", 666); + + msg = osmo_mdns_result_encode(ctx, packet_id, query, &result); + OSMO_ASSERT(msg); + OSMO_ASSERT(osmo_mdns_sock_send(server_mc, msg) == 0); +} + +static int server_recv(struct osmo_fd *osmo_fd, unsigned int what) +{ + int n; + uint8_t buffer[1024]; + uint16_t packet_id; + struct osmo_mslookup_query *query; + + fprintf(stderr, "%s\n", __func__); + + /* Parse the message and print it */ + n = read(osmo_fd->fd, buffer, sizeof(buffer)); + OSMO_ASSERT(n >= 0); + + query = osmo_mdns_query_decode(ctx, buffer, n, &packet_id); + if (!query) + return -1; /* server receiving own answer is expected */ + + fprintf(stderr, "received request\n"); + server_reply(query, packet_id); + talloc_free(query); + return n; +} + +static void server_init() +{ + fprintf(stderr, "%s\n", __func__); + server_mc = osmo_mdns_sock_init(ctx, TEST_IP, TEST_PORT, server_recv, NULL, 0); + OSMO_ASSERT(server_mc); +} + +static void server_stop() +{ + fprintf(stderr, "%s\n", __func__); + OSMO_ASSERT(server_mc); + osmo_mdns_sock_cleanup(server_mc); + server_mc = NULL; +} + +struct osmo_mslookup_client* client; +struct osmo_mslookup_client_method* client_method; + +static void client_init() +{ + fprintf(stderr, "%s\n", __func__); + client = osmo_mslookup_client_new(ctx); + OSMO_ASSERT(client); + client_method = osmo_mslookup_client_add_mdns(client, TEST_IP, TEST_PORT, 1337); + OSMO_ASSERT(client_method); +} + +static void client_recv(struct osmo_mslookup_client *client, uint32_t request_handle, + const struct osmo_mslookup_query *query, const struct osmo_mslookup_result *result) +{ + char buf[256]; + fprintf(stderr, "%s\n", __func__); + fprintf(stderr, "client_recv(): %s\n", osmo_mslookup_result_name_b(buf, sizeof(buf), query, result)); + + osmo_mslookup_client_request_cancel(client, request_handle); +} + +static void client_query() +{ + struct osmo_mslookup_id id = {.type = OSMO_MSLOOKUP_ID_IMSI, + .imsi = "123456789012345"}; + const struct osmo_mslookup_query query = { + .service = OSMO_MSLOOKUP_SERVICE_HLR_GSUP, + .id = id, + }; + struct osmo_mslookup_query_handling handling = { + .result_timeout_milliseconds = 2000, + .result_cb = client_recv, + }; + + fprintf(stderr, "%s\n", __func__); + osmo_mslookup_client_request(client, &query, &handling); +} + +static void client_stop() +{ + fprintf(stderr, "%s\n", __func__); + osmo_mslookup_client_free(client); + client = NULL; +} +const struct timeval fake_time_start_time = { 0, 0 }; + +#define fake_time_passes(secs, usecs) do \ +{ \ + struct timeval diff; \ + osmo_gettimeofday_override_add(secs, usecs); \ + osmo_clock_override_add(CLOCK_MONOTONIC, secs, usecs * 1000); \ + timersub(&osmo_gettimeofday_override_time, &fake_time_start_time, &diff); \ + LOGP(DMSLOOKUP, LOGL_DEBUG, "Total time passed: %d.%06d s\n", \ + (int)diff.tv_sec, (int)diff.tv_usec); \ + osmo_timers_prepare(); \ + osmo_timers_update(); \ +} while (0) + +static void fake_time_start() +{ + struct timespec *clock_override; + + osmo_gettimeofday_override_time = fake_time_start_time; + osmo_gettimeofday_override = true; + clock_override = osmo_clock_override_gettimespec(CLOCK_MONOTONIC); + OSMO_ASSERT(clock_override); + clock_override->tv_sec = fake_time_start_time.tv_sec; + clock_override->tv_nsec = fake_time_start_time.tv_usec * 1000; + osmo_clock_override_enable(CLOCK_MONOTONIC, true); + fake_time_passes(0, 0); +} +static void test_server_client() +{ + fprintf(stderr, "-- %s --\n", __func__); + server_init(); + client_init(); + client_query(); + + /* Let the server receive the query and indirectly call server_recv(). As side effect of using the same IP and + * port, the client will also receive its own question. The client will dismiss its own question, as it is just + * looking for answers. */ + OSMO_ASSERT(osmo_select_main_ctx(1) == 1); + + /* Let the mslookup client receive the answer (also same side effect as above). It does not call the callback + * (client_recv()) just yet, because it is waiting for the best result within two seconds. */ + OSMO_ASSERT(osmo_select_main_ctx(1) == 1); + + /* Time flies by, client_recv() gets called. */ + fake_time_passes(5, 0); + + server_stop(); + client_stop(); +} + +/* + * Run all tests + */ +int main() +{ + talloc_enable_null_tracking(); + ctx = talloc_named_const(NULL, 0, "main"); + osmo_init_logging2(ctx, NULL); + + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_level(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 0); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + log_set_category_filter(osmo_stderr_target, DMSLOOKUP, true, LOGL_DEBUG); + + fake_time_start(); + + test_server_client(); + + log_fini(); + + OSMO_ASSERT(talloc_total_blocks(ctx) == 1); + talloc_free(ctx); + OSMO_ASSERT(talloc_total_blocks(NULL) == 1); + talloc_disable_null_tracking(); + + return 0; +} diff --git a/tests/mslookup/mslookup_client_mdns_test.err b/tests/mslookup/mslookup_client_mdns_test.err new file mode 100644 index 0000000..b4ea269 --- /dev/null +++ b/tests/mslookup/mslookup_client_mdns_test.err @@ -0,0 +1,14 @@ +Total time passed: 0.000000 s +-- test_server_client -- +server_init +client_init +client_query +sending mDNS query: gsup.hlr.123456789012345.imsi +server_recv +received request +server_recv +client_recv +client_recv(): gsup.hlr.123456789012345.imsi -> ipv4: 42.42.42.42:444 -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last) +Total time passed: 5.000000 s +server_stop +client_stop diff --git a/tests/mslookup/mslookup_client_test.c b/tests/mslookup/mslookup_client_test.c new file mode 100644 index 0000000..96b5846 --- /dev/null +++ b/tests/mslookup/mslookup_client_test.c @@ -0,0 +1,242 @@ +/* Copyright 2019 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 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 + +void *ctx = NULL; + +static struct osmo_mslookup_fake_response fake_lookup_responses[] = { + { + .time_to_reply = { .tv_sec = 1, }, + .for_id = { + .type = OSMO_MSLOOKUP_ID_IMSI, + .imsi = "1234567", + }, + .for_service = OSMO_MSLOOKUP_SERVICE_HLR_GSUP, + .result = { + .rc = OSMO_MSLOOKUP_RC_RESULT, + .host_v4 = { + .af = AF_INET, + .ip = "12.34.56.7", + .port = 42, + }, + .host_v6 = { + .af = AF_INET6, + .ip = "be:ef:ed:ca:fe:fa:ce::1", + .port = 42, + }, + .age = 0, + }, + }, + { + .time_to_reply = { .tv_usec = 600 * 1000, }, + .for_id = { + .type = OSMO_MSLOOKUP_ID_MSISDN, + .msisdn = "112", + }, + .for_service = OSMO_MSLOOKUP_SERVICE_SIP, + .result = { + .rc = OSMO_MSLOOKUP_RC_RESULT, + .host_v4 = { + .af = AF_INET, + .ip = "66.66.66.66", + .port = 666, + }, + .host_v6 = { + .af = AF_INET, + .ip = "6666:6666:6666::6", + .port = 666, + }, + .age = 423, + }, + }, + { + .time_to_reply = { .tv_usec = 800 * 1000, }, + .for_id = { + .type = OSMO_MSLOOKUP_ID_MSISDN, + .msisdn = "112", + }, + .for_service = OSMO_MSLOOKUP_SERVICE_SIP, + .result = { + .rc = OSMO_MSLOOKUP_RC_RESULT, + .host_v4 = { + .af = AF_INET, + .ip = "112.112.112.112", + .port = 23, + }, + .age = 235, + }, + }, + { + .time_to_reply = { .tv_sec = 1, .tv_usec = 200 * 1000, }, + .for_id = { + .type = OSMO_MSLOOKUP_ID_MSISDN, + .msisdn = "112", + }, + .for_service = OSMO_MSLOOKUP_SERVICE_SIP, + .result = { + .rc = OSMO_MSLOOKUP_RC_RESULT, + .host_v4 = { + .af = AF_INET, + .ip = "99.99.99.99", + .port = 999, + }, + .host_v6 = { + .af = AF_INET, + .ip = "9999:9999:9999::9", + .port = 999, + }, + .age = 335, + }, + }, + { + .time_to_reply = { .tv_sec = 1, .tv_usec = 500 * 1000, }, + .for_id = { + .type = OSMO_MSLOOKUP_ID_MSISDN, + .msisdn = "112", + }, + .for_service = OSMO_MSLOOKUP_SERVICE_SIP, + .result = { + .rc = OSMO_MSLOOKUP_RC_RESULT, + .host_v4 = { + .af = AF_INET, + .ip = "99.99.99.99", + .port = 999, + }, + .age = 999, + }, + }, +}; + +const struct timeval fake_time_start_time = { 0, 0 }; + +#define fake_time_passes(secs, usecs) do \ +{ \ + struct timeval diff; \ + osmo_gettimeofday_override_add(secs, usecs); \ + osmo_clock_override_add(CLOCK_MONOTONIC, secs, usecs * 1000); \ + timersub(&osmo_gettimeofday_override_time, &fake_time_start_time, &diff); \ + LOGP(DMSLOOKUP, LOGL_DEBUG, "Total time passed: %d.%06d s\n", \ + (int)diff.tv_sec, (int)diff.tv_usec); \ + osmo_timers_prepare(); \ + osmo_timers_update(); \ +} while (0) + +static void fake_time_start() +{ + struct timespec *clock_override; + + osmo_gettimeofday_override_time = fake_time_start_time; + osmo_gettimeofday_override = true; + clock_override = osmo_clock_override_gettimespec(CLOCK_MONOTONIC); + OSMO_ASSERT(clock_override); + clock_override->tv_sec = fake_time_start_time.tv_sec; + clock_override->tv_nsec = fake_time_start_time.tv_usec * 1000; + osmo_clock_override_enable(CLOCK_MONOTONIC, true); + fake_time_passes(0, 0); +} + +static void result_cb_once(struct osmo_mslookup_client *client, + uint32_t request_handle, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + LOGP(DMSLOOKUP, LOGL_DEBUG, "result_cb(): %s\n", osmo_mslookup_result_name_c(ctx, query, result)); +} + +int main() +{ + ctx = talloc_named_const(NULL, 0, "main"); + osmo_init_logging2(ctx, NULL); + + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_level(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 0); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + log_set_category_filter(osmo_stderr_target, DMSLOOKUP, true, LOGL_DEBUG); + + fake_time_start(); + + struct osmo_mslookup_client *client = osmo_mslookup_client_new(ctx); + osmo_mslookup_client_add_fake(client, fake_lookup_responses, ARRAY_SIZE(fake_lookup_responses)); + + /* Place some requests to be replied upon asynchronously */ + + struct osmo_mslookup_query_handling handling = { + .result_timeout_milliseconds = 1, /* set some timeout < min_delay_milliseconds */ + .min_delay_milliseconds = 2000, + .result_cb = result_cb_once, + }; + + struct osmo_mslookup_query q1 = { + .service = OSMO_MSLOOKUP_SERVICE_HLR_GSUP, + .id = { + .type = OSMO_MSLOOKUP_ID_IMSI, + .imsi = "1234567", + }, + }; + OSMO_ASSERT(osmo_mslookup_client_request(client, &q1, &handling)); + + struct osmo_mslookup_query q2 = { + .service = OSMO_MSLOOKUP_SERVICE_SIP, + .id = { + .type = OSMO_MSLOOKUP_ID_MSISDN, + .msisdn = "112", + }, + }; + handling.min_delay_milliseconds = 3000; + OSMO_ASSERT(osmo_mslookup_client_request(client, &q2, &handling)); + + struct osmo_mslookup_query q3 = { + .service = OSMO_MSLOOKUP_SERVICE_SMPP, + .id = { + .type = OSMO_MSLOOKUP_ID_MSISDN, + .msisdn = "00000", + }, + }; + handling.min_delay_milliseconds = 5000; + OSMO_ASSERT(osmo_mslookup_client_request(client, &q3, &handling)); + + struct osmo_mslookup_query q4 = { + .service = OSMO_MSLOOKUP_SERVICE_HLR_GSUP, + .id = { + .type = OSMO_MSLOOKUP_ID_MSISDN, + .msisdn = "666", + }, + }; + handling.min_delay_milliseconds = 10000; + uint32_t q4_handle; + OSMO_ASSERT((q4_handle = osmo_mslookup_client_request(client, &q4, &handling))); + + while (osmo_gettimeofday_override_time.tv_sec < 6) { + log_reset_context(); + fake_time_passes(0, 1e6 / 5); + } + + osmo_mslookup_client_request_cancel(client, q4_handle); + + return 0; +} diff --git a/tests/mslookup/mslookup_client_test.err b/tests/mslookup/mslookup_client_test.err new file mode 100644 index 0000000..c552837 --- /dev/null +++ b/tests/mslookup/mslookup_client_test.err @@ -0,0 +1,47 @@ +Total time passed: 0.000000 s +fake_lookup_request(gsup.hlr.1234567.imsi) +fake_lookup_request(sip.voice.112.msisdn) +fake_lookup_request(smpp.sms.00000.msisdn) +fake_lookup_request(gsup.hlr.666.msisdn) +Total time passed: 0.200000 s +Total time passed: 0.400000 s +Total time passed: 0.600000 s +osmo_mslookup_client_rx_result(): sip.voice.112.msisdn -> ipv4: 66.66.66.66:666 -> ipv6: 6666:6666:6666::6:666 (age=423) (not-last) +Total time passed: 0.800000 s +osmo_mslookup_client_rx_result(): sip.voice.112.msisdn -> ipv4: 112.112.112.112:23 (age=235) (not-last) +Total time passed: 1.000000 s +osmo_mslookup_client_rx_result(): gsup.hlr.1234567.imsi -> ipv4: 12.34.56.7:42 -> ipv6: [be:ef:ed:ca:fe:fa:ce::1]:42 (age=0) (not-last) +result_cb(): gsup.hlr.1234567.imsi -> ipv4: 12.34.56.7:42 -> ipv6: [be:ef:ed:ca:fe:fa:ce::1]:42 (age=0) (last) +fake_lookup_request_cleanup() ok +Total time passed: 1.200000 s +osmo_mslookup_client_rx_result(): sip.voice.112.msisdn -> ipv4: 99.99.99.99:999 -> ipv6: 9999:9999:9999::9:999 (age=335) (not-last) +Total time passed: 1.400000 s +Total time passed: 1.600000 s +osmo_mslookup_client_rx_result(): sip.voice.112.msisdn -> ipv4: 99.99.99.99:999 (age=999) (not-last) +Total time passed: 1.800000 s +Total time passed: 2.000000 s +Total time passed: 2.200000 s +Total time passed: 2.400000 s +Total time passed: 2.600000 s +Total time passed: 2.800000 s +Total time passed: 3.000000 s +result_cb(): sip.voice.112.msisdn -> ipv4: 112.112.112.112:23 (age=235) (last) +fake_lookup_request_cleanup() ok +Total time passed: 3.200000 s +Total time passed: 3.400000 s +Total time passed: 3.600000 s +Total time passed: 3.800000 s +Total time passed: 4.000000 s +Total time passed: 4.200000 s +Total time passed: 4.400000 s +Total time passed: 4.600000 s +Total time passed: 4.800000 s +Total time passed: 5.000000 s +result_cb(): smpp.sms.00000.msisdn not-found (last) +fake_lookup_request_cleanup() ok +Total time passed: 5.200000 s +Total time passed: 5.400000 s +Total time passed: 5.600000 s +Total time passed: 5.800000 s +Total time passed: 6.000000 s +fake_lookup_request_cleanup() ok diff --git a/tests/mslookup/mslookup_test.c b/tests/mslookup/mslookup_test.c new file mode 100644 index 0000000..302e6b7 --- /dev/null +++ b/tests/mslookup/mslookup_test.c @@ -0,0 +1,88 @@ +/* Copyright 2019 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 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 + +void *ctx; + +const char *domains[] = { + "gsup.hlr.123456789012345.imsi", + "gsup.hlr.1.imsi", + "sip.voice.1.msisdn", + "a.b.c.imsi", + "", + ".", + "...", + ".....", + ".....1.msisdn", + "fofdndsf. d.ads ofdsf. ads.kj.1243455132.msisdn", + "foo.12345678901234567890.imsi", + "gsup.hlr.123456789012345.what", + NULL, + "blarg", + "blarg.", + "blarg.1.", + "blarg.1.msisdn", + "blarg.1.msisdn.", + ".1.msisdn", + "1.msisdn", + "qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmm.1.msisdn", + "qwerty.1.qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmm", +}; + +void test_osmo_mslookup_query_from_domain_str() +{ + int i; + for (i = 0; i < ARRAY_SIZE(domains); i++) { + const char *d = domains[i]; + struct osmo_mslookup_query q; + + int rc = osmo_mslookup_query_from_domain_str(&q, d); + if (rc) + fprintf(stderr, "%s -> rc = %d\n", osmo_quote_str(d, -1), rc); + else + fprintf(stderr, "%s -> %s %s %s\n", osmo_quote_str(d, -1), + osmo_quote_str_c(ctx, q.service, -1), + osmo_quote_str_c(ctx, q.id.imsi, -1), + osmo_mslookup_id_type_name(q.id.type)); + } +} + +int main() +{ + ctx = talloc_named_const(NULL, 0, "main"); + osmo_init_logging2(ctx, NULL); + + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_level(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 0); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + log_set_category_filter(osmo_stderr_target, DMSLOOKUP, true, LOGL_DEBUG); + + test_osmo_mslookup_query_from_domain_str(); + + talloc_free(ctx); + + return 0; +} diff --git a/tests/mslookup/mslookup_test.err b/tests/mslookup/mslookup_test.err new file mode 100644 index 0000000..ee5ff21 --- /dev/null +++ b/tests/mslookup/mslookup_test.err @@ -0,0 +1,22 @@ +"gsup.hlr.123456789012345.imsi" -> "gsup.hlr" "123456789012345" imsi +"gsup.hlr.1.imsi" -> rc = -5 +"sip.voice.1.msisdn" -> "sip.voice" "1" msisdn +"a.b.c.imsi" -> rc = -5 +"" -> rc = -2 +"." -> rc = -3 +"..." -> rc = -4 +"....." -> rc = -4 +".....1.msisdn" -> "...." "1" msisdn +"fofdndsf. d.ads ofdsf. ads.kj.1243455132.msisdn" -> "fofdndsf. d.ads ofdsf. ads.kj" "1243455132" msisdn +"foo.12345678901234567890.imsi" -> rc = -11 +"gsup.hlr.123456789012345.what" -> rc = -7 +NULL -> rc = -1 +"blarg" -> rc = -2 +"blarg." -> rc = -3 +"blarg.1." -> rc = -4 +"blarg.1.msisdn" -> "blarg" "1" msisdn +"blarg.1.msisdn." -> rc = -4 +".1.msisdn" -> rc = -3 +"1.msisdn" -> rc = -3 +"qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmm.1.msisdn" -> rc = -11 +"qwerty.1.qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmm" -> rc = -7 diff --git a/tests/testsuite.at b/tests/testsuite.at index 58c197d..827e9f8 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -39,3 +39,27 @@ cat $abs_srcdir/db_upgrade/db_upgrade_test.err > experr AT_CHECK([$abs_srcdir/db_upgrade/db_upgrade_test.sh $abs_srcdir/db_upgrade $abs_builddir/db_upgrade], [], [expout], [experr]) AT_CLEANUP + +AT_SETUP([mdns]) +AT_KEYWORDS([mdns]) +cat $abs_srcdir/mslookup/mdns_test.err > experr +AT_CHECK([$abs_top_builddir/tests/mslookup/mdns_test], [0], [ignore], [experr]) +AT_CLEANUP + +AT_SETUP([mslookup]) +AT_KEYWORDS([mslookup]) +cat $abs_srcdir/mslookup/mslookup_test.err > experr +AT_CHECK([$abs_top_builddir/tests/mslookup/mslookup_test], [0], [ignore], [experr]) +AT_CLEANUP + +AT_SETUP([mslookup_client]) +AT_KEYWORDS([mslookup_client]) +cat $abs_srcdir/mslookup/mslookup_client_test.err > experr +AT_CHECK([$abs_top_builddir/tests/mslookup/mslookup_client_test], [0], [ignore], [experr]) +AT_CLEANUP + +AT_SETUP([mslookup_client_mdns]) +AT_KEYWORDS([mslookup_client_mdns]) +cat $abs_srcdir/mslookup/mslookup_client_mdns_test.err > experr +AT_CHECK([$abs_top_builddir/tests/mslookup/mslookup_client_mdns_test], [0], [ignore], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:02 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:02 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16203 ) Change subject: add osmo-mslookup-client program ...................................................................... add osmo-mslookup-client program Standalone program using libosmo-mslookup for manual testing, and for integration with all other components of the network that need to do mslookups to resolve SIP/SMPP servers etc. Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 --- M .gitignore M configure.ac M contrib/Makefile.am A contrib/dgsm/Makefile.am A contrib/dgsm/osmo-mslookup-pipe.py A contrib/dgsm/osmo-mslookup-socket.py M src/mslookup/Makefile.am A src/mslookup/osmo-mslookup-client.c 8 files changed, 939 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/03/16203/1 diff --git a/.gitignore b/.gitignore index 93f65e9..1dfa33b 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ src/osmo-hlr-db-tool src/osmo-euse-demo src/gsupclient/gsup-test-client +src/mslookup/osmo-mslookup-client tests/atconfig tests/testsuite diff --git a/configure.ac b/configure.ac index 1afb5c7..ae18286 100644 --- a/configure.ac +++ b/configure.ac @@ -184,6 +184,7 @@ doc/manuals/Makefile contrib/Makefile contrib/systemd/Makefile + contrib/dgsm/Makefile tests/Makefile tests/auc/Makefile tests/auc/gen_ts_55_205_test_sets/Makefile diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 3439c97..cfd0b15 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -1 +1,4 @@ -SUBDIRS = systemd +SUBDIRS = \ + systemd \ + dgsm \ + $(NULL) diff --git a/contrib/dgsm/Makefile.am b/contrib/dgsm/Makefile.am new file mode 100644 index 0000000..c759302 --- /dev/null +++ b/contrib/dgsm/Makefile.am @@ -0,0 +1,4 @@ +EXTRA_DIST = \ + osmo-mslookup-pipe.py \ + osmo-mslookup-socket.py \ + $(NULL) diff --git a/contrib/dgsm/osmo-mslookup-pipe.py b/contrib/dgsm/osmo-mslookup-pipe.py new file mode 100755 index 0000000..b18bf5f --- /dev/null +++ b/contrib/dgsm/osmo-mslookup-pipe.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +# vim: shiftwidth=4 tabstop=4 expandtab +import subprocess +import json + +def query_mslookup(query_str): + result = {'result': 'not-found'} + proc = subprocess.Popen(('osmo-mslookup-client', '-f', 'json', query_str), + stdout=subprocess.PIPE) + for line in iter(proc.stdout.readline,''): + if not line: + break + response = json.loads(line) + if response.get('result') == 'result': + result = response + print('Response: %r' % response) + return result + +if __name__ == '__main__': + import sys + query_str = '1000-5000 at sip.voice.12345.msisdn' + if len(sys.argv) > 1: + query_str = sys.argv[1] + print('Final result: %r' % query_mslookup(query_str)) diff --git a/contrib/dgsm/osmo-mslookup-socket.py b/contrib/dgsm/osmo-mslookup-socket.py new file mode 100755 index 0000000..a26ad9f --- /dev/null +++ b/contrib/dgsm/osmo-mslookup-socket.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +# vim: shiftwidth=4 tabstop=4 expandtab +import socket +import time + +MSLOOKUP_SOCKET_PATH = '/tmp/mslookup' + +def query_mslookup_socket(query_str, socket_path=MSLOOKUP_SOCKET_PATH): + mslookup_socket = socket.socket(socket.AF_UNIX, socket.SOCK_SEQPACKET) + mslookup_socket.setblocking(True) + mslookup_socket.connect(socket_path) + result = {'result': 'not-found'} + column_names = mslookup_socket.recv(1024).decode('ascii') + if not column_names: + return result + column_names = column_names.split('\t') + mslookup_socket.sendall(query_str.encode('ascii')) + while True: + csv = mslookup_socket.recv(1024).decode('ascii') + if not csv: + break + response = dict(zip(column_names, csv.split('\t'))) + if response.get('result') == 'result': + result = response + print('Response: %r' % response) + return result + +if __name__ == '__main__': + import sys + print( + '\nPlease run separately: osmo-mslookup-client --socket /tmp/mslookup -d\n') + query_str = '1000-5000 at sip.voice.12345.msisdn' + if len(sys.argv) > 1: + query_str = sys.argv[1] + print('Final result: %r' % query_mslookup_socket(query_str)) diff --git a/src/mslookup/Makefile.am b/src/mslookup/Makefile.am index eb57efa..abbe71f 100644 --- a/src/mslookup/Makefile.am +++ b/src/mslookup/Makefile.am @@ -33,3 +33,12 @@ $(LIBOSMOGSM_LIBS) \ $(TALLOC_LIBS) \ $(NULL) + +bin_PROGRAMS = osmo-mslookup-client +osmo_mslookup_client_SOURCES = osmo-mslookup-client.c +osmo_mslookup_client_LDADD = \ + libosmo-mslookup.la \ + $(LIBOSMOCORE_LIBS) \ + $(TALLOC_LIBS) \ + $(NULL) +osmo_mslookup_client_CFLAGS = $(TALLOC_CFLAGS) diff --git a/src/mslookup/osmo-mslookup-client.c b/src/mslookup/osmo-mslookup-client.c new file mode 100644 index 0000000..3b6d4d7 --- /dev/null +++ b/src/mslookup/osmo-mslookup-client.c @@ -0,0 +1,861 @@ +/*! \file osmo-mslookup-client.c + * Distributed GSM: find the location of subscribers, for example by multicast DNS, + * to obtain HLR, SIP or SMPP server addresses (or arbitrary service names). + */ +/* + * (C) 2019 by sysmocom s.f.m.c. GmbH + * (C) 2019 by Neels Hofmeyr + * + * 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 + +#include +#include +#include +#include +#include +#include +#include +#include + +#define CSV_HEADERS "query\tresult\tlast\tage\tv4_ip\tv4_port\tv6_ip\tv6_port" + +static void print_version(void) +{ + printf("osmo-mslookup-client version %s\n", PACKAGE_VERSION); + printf("\n" + "Copyright (C) 2019 by sysmocom - s.f.m.c. GmbH\n" + "Copyright (C) 2019 by Neels Hofmeyr \n" + "This program is free software; you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License as published by\n" + "the Free Software Foundation; either version 2 of the License, or\n" + "(at your option) any later version.\n" + "\n"); +} + +static void print_help() +{ + print_version(); + printf( +"Standalone mslookup client for Distributed GSM\n" +"\n" +"Receiving mslookup results means listening for responses on a socket. Often,\n" +"integration (e.g. FreeSwitch dialplan.py) makes it hard to select() on a socket\n" +"to read responses, because that interferes with the main program (e.g.\n" +"FreeSwitch's dialplan.py seems to be integrated with an own select() main loop\n" +"that interferes with osmo_select_main(), or an smpp.py uses\n" +"smpplib.client.listen() as main loop, etc.).\n" +"\n" +"This program provides a trivial solution, by outsourcing the mslookup main loop\n" +"to a separate process. Communication is done via cmdline arg and stdout pipe or\n" +"a unix domain socket, results are returned either in CSV or JSON format.\n" +"\n" +"This can be done one-shot, i.e. exit as soon as the response has been\n" +"determined, or in daemon form, i.e. continuously listen for requests and return\n" +"responses.\n" +"\n" +"Output is in CSV or json, see --format. The default is tab-separated CSV\n" +"with these columns:\n" +CSV_HEADERS "\n" +"\n" +"One-shot operation example:\n" +"$ osmo-mslookup-client 1000- at sip.voice.12345.msisdn -f json\n" +"{\"query\": \"sip.voice.12345.msisdn\", \"result\": \"result\", \"last\": true, \"age\": 5, \"v4\": [\"1.2.3.7\", \"23\"]}\n" +"$\n" +"\n" +"Daemon operation example:\n" +"$ osmo-mslookup-client -s /tmp/mslookup -d\n" +"(and a client program then connects to /tmp/mslookup, find an implementation\n" +"example below)\n" +"\n" +"Integrating with calling programs can be done by:\n" +"- call osmo-mslookup-client with the query string as argument.\n" +" It will open a multicast DNS socket, send out a query and wait for the\n" +" matching response. It will print the result on stdout and exit.\n" +" This method launches a new process for every mslookup query,\n" +" and creates a short-lived multicast listener for each invocation.\n" +" This is fine for low activity, but does not scale well.\n" +"\n" +"- invoke osmo-mslookup-client --socket /tmp/mslookup -d.\n" +" Individual queries can be sent by connecting to that unix domain socket,\n" +" blockingly reading the response when it arrives and disconnecting.\n" +" This way only one process keeps one multicast listener open.\n" +" Callers can connect to this socket without spawning processes.\n" +" This is recommended for scale.\n" +"\n" +"Python example clients for {CSV,JSON}x{cmdline,socket} can be found here:\n" +"http://git.osmocom.org/osmo-hlr/tree/contrib/dgsm/osmo-mslookup-pipe.py\n" +"http://git.osmocom.org/osmo-hlr/tree/contrib/dgsm/osmo-mslookup-socket.py\n" +"\n" +"\n" +"Options:\n" +"\n" +"[[delay-][timeout]@]service.number.id\n" +" A service query string with optional individual timeout.\n" +" The same format is also used on a daemon socket, if any.\n" +" The timeout consists of the min-delay and the timeout numbers,\n" +" corresponding to the --min-delay and --timeout options, in milliseconds.\n" +" These options apply if a query string lacks own numbers.\n" +" Examples:\n" +" gsup.hlr.1234567.imsi Use cmdline timeout settings\n" +" 5000 at gsup.hlr.1234567.imsi Return N results for 5 seconds\n" +" 1000-5000 at sip.voice.123.msisdn Same, but silent for first second\n" +" 10000- at smpp.sms.567.msisdn Return 1 result after 10 seconds\n" +"\n" +"--format -f csv (default)\n" +" Format result lines in CSV format.\n" +"--no-csv-headers -H\n" +" If the format is 'csv', by default, the first output line prints the\n" +" CSV headers used for CSV output format. This option disables these CSV\n" +" headers.\n" +"\n" +"--format -f json\n" +" Format result lines in json instead of semicolon separated, like:\n" +" {\"query\": \"sip.voice.12345.msisdn\", \"result\": \"ok\", \"v4\": [\"10.9.8.7\", \"5060\"]}\n" +"\n" +"--daemon -d\n" +" Keep running after a request has been serviced\n" +"\n" +"--mdns-ip -m " OSMO_MSLOOKUP_MDNS_IP4 " -m " OSMO_MSLOOKUP_MDNS_IP6 "\n" +"--mdns-port -M " OSMO_STRINGIFY_VAL(OSMO_MSLOOKUP_MDNS_PORT) "\n" +" Set multicast IP address / port to send mDNS requests and listen for\n" +" mDNS reponses\n" +"\n" +"--min-delay -t 1000 (in milliseconds)\n" +" Set minimum delay to wait before returning any results.\n" +" When this timeout has elapsed, the best current result is returned,\n" +" if any is available.\n" +" Responses arriving after the min-delay has elapsed which have a younger\n" +" age than previous results are returned immediately.\n" +" Note: When a response with age of zero comes in, the result is returned\n" +" immediately and the request is discarded: non-daemon mode exits, daemon\n" +" mode ignores later results.\n" +"\n" +"--timeout -T 1000 (in milliseconds)\n" +" Set timeout after which to stop listening for responses.\n" +" If this is smaller than -t, the value from -t will be used for -T as well.\n" +" Note: When a response with age of zero comes in, the result is returned\n" +" immediately and the request is discarded: non-daemon mode exits, daemon\n" +" mode ignores later results.\n" +"\n" +"--socket -s /path/to/unix-domain-socket\n" +" Listen to requests from and write responses to a UNIX domain socket.\n" +"\n" +"--send -S \n" +" Do not query, but send an mslookup result. This is useful only for\n" +" testing. Examples:\n" +" --send foo.123.msisdn 300 23.42.17.11 1234\n" +" --send foo.123.msisdn 300 2323:4242:1717:1111::42 1234\n" +" --send foo.123.msisdn 300 23.42.17.11 1234 2323:4242:1717:1111::42 1234\n" +"\n" +"--quiet -q\n" +" Do not print errors to stderr, do not log to stderr.\n" +"\n" +"--help -h\n" +" This help\n" +); +} + +enum result_format { + FORMAT_CSV = 0, + FORMAT_JSON, +}; + +static struct { + bool daemon; + struct osmo_sockaddr_str mdns_addr; + uint32_t min_delay; + uint32_t timeout; + const char *socket_path; + const char *format_str; + bool csv_headers; + bool send; + bool quiet; +} cmdline_opts = { + .mdns_addr = { .af=AF_INET, .ip=OSMO_MSLOOKUP_MDNS_IP4, .port=OSMO_MSLOOKUP_MDNS_PORT }, + .min_delay = 1000, + .timeout = 1000, + .csv_headers = true, +}; + +#define print_error(fmt, args...) do { \ + if (!cmdline_opts.quiet) \ + fprintf(stderr, fmt, ##args); \ + } while (0) + +char g_buf[1024]; + +long long int parse_int(long long int minval, long long int maxval, const char *arg, int *rc) +{ + long long int val; + char *endptr; + if (rc) + *rc = -1; + if (!arg) + return -1; + errno = 0; + val = strtoll(arg, &endptr, 10); + if (errno || val < minval || val > maxval || *endptr) + return -1; + if (rc) + *rc = 0; + return val; +} + +int cb_doing_nothing(struct osmo_fd *fd, unsigned int what) +{ + return 0; +} + +/* --send: Just send a response, for manual testing. */ +int do_send(int argc, char ** argv) +{ + /* parse args */ +#define ARG(NR) ((argc > NR)? argv[NR] : NULL) + const char *query_str = ARG(0); + const char *age_str = ARG(1); + const char *ip_strs[2][2] = { + { ARG(2), ARG(3) }, + { ARG(4), ARG(5) }, + }; + struct osmo_mslookup_query q = {}; + struct osmo_mslookup_result r = { .rc = OSMO_MSLOOKUP_RC_RESULT }; + int i; + int rc; + void *ctx = talloc_named_const(NULL, 0, __func__); + struct osmo_mdns_sock *sock; + + if (!query_str) { + print_error("--send needs a query string like foo.123456.imsi\n"); + return 1; + } + if (osmo_mslookup_query_from_domain_str(&q, query_str)) { + print_error("Invalid query string '%s', need a query string like foo.123456.imsi\n", + query_str); + return 1; + } + + if (!age_str) { + print_error("--send needs an age\n"); + return 1; + } + r.age = parse_int(0, UINT32_MAX, age_str, &rc); + if (rc) { + print_error("invalid age\n"); + return 1; + } + + for (i = 0; i < 2; i++) { + struct osmo_sockaddr_str addr; + uint16_t port; + if (!ip_strs[i][0]) + continue; + port = parse_int(1, 65535, ip_strs[i][1] ? : "2342", &rc); + if (rc) { + print_error("invalid port: %s\n", ip_strs[i][1] ? : "NULL"); + return 1; + } + if (osmo_sockaddr_str_from_str(&addr, ip_strs[i][0], port)) { + print_error("invalid IP addr: %s\n", ip_strs[i][0]); + return 1; + } + if (addr.af == AF_INET) + r.host_v4 = addr; + else + r.host_v6 = addr; + } + + printf("Sending mDNS to " OSMO_SOCKADDR_STR_FMT ": %s\n", OSMO_SOCKADDR_STR_FMT_ARGS(&cmdline_opts.mdns_addr), + osmo_mslookup_result_name_c(ctx, &q, &r)); + + rc = 1; + sock = osmo_mdns_sock_init(ctx, cmdline_opts.mdns_addr.ip, cmdline_opts.mdns_addr.port, + cb_doing_nothing, NULL, 0); + if (!sock) { + print_error("unable to open mDNS socket\n"); + goto exit_cleanup; + } + + struct msgb *msg = osmo_mdns_result_encode(ctx, 0, &q, &r); + if (!msg) { + print_error("unable to encode mDNS response\n"); + goto exit_cleanup; + } + + if (osmo_mdns_sock_send(sock, msg)) { + print_error("unable to send mDNS message\n"); + goto exit_cleanup; + } + + rc = 0; +exit_cleanup: + osmo_mdns_sock_cleanup(sock); + talloc_free(ctx); + return rc; +} + +static struct { + void *ctx; + unsigned int requests_handled; + struct osmo_fd socket_ofd; + struct osmo_mslookup_client *mslookup_client; + struct llist_head queries; + struct llist_head socket_clients; + enum result_format format; +} globals = { + .queries = LLIST_HEAD_INIT(globals.queries), + .socket_clients = LLIST_HEAD_INIT(globals.socket_clients), +}; + +typedef void (*formatter_t)(char *buf, size_t buflen, const char *query_str, const struct osmo_mslookup_result *r); + +void formatter_csv(char *buf, size_t buflen, const char *query_str, const struct osmo_mslookup_result *r) +{ + struct osmo_strbuf sb = { .buf=buf, .len=buflen }; + OSMO_STRBUF_PRINTF(sb, "%s", query_str); + + if (!r) + OSMO_STRBUF_PRINTF(sb, "\tERROR\t\t\t\t\t\t"); + else { + OSMO_STRBUF_PRINTF(sb, "\t%s", osmo_mslookup_result_code_name(r->rc)); + OSMO_STRBUF_PRINTF(sb, "\t%s", r->last ? "last" : "not-last"); + OSMO_STRBUF_PRINTF(sb, "\t%u", r->age); + switch (r->rc) { + case OSMO_MSLOOKUP_RC_RESULT: + if (osmo_sockaddr_str_is_nonzero(&r->host_v4)) + OSMO_STRBUF_PRINTF(sb, "\t%s\t%u", r->host_v4.ip, r->host_v4.port); + else + OSMO_STRBUF_PRINTF(sb, "\t\t"); + if (osmo_sockaddr_str_is_nonzero(&r->host_v6)) + OSMO_STRBUF_PRINTF(sb, "\t%s\t%u", r->host_v6.ip, r->host_v6.port); + else + OSMO_STRBUF_PRINTF(sb, "\t\t"); + break; + default: + OSMO_STRBUF_PRINTF(sb, "\t\t\t\t\t"); + break; + } + } +} + +void formatter_json(char *buf, size_t buflen, const char *query_str, const struct osmo_mslookup_result *r) +{ + struct osmo_strbuf sb = { .buf=buf, .len=buflen }; + OSMO_STRBUF_PRINTF(sb, "{\"query\": \"%s\"", query_str); + + if (!r) + OSMO_STRBUF_PRINTF(sb, ", \"result\": \"ERROR\""); + else { + OSMO_STRBUF_PRINTF(sb, ", \"result\": \"%s\"", osmo_mslookup_result_code_name(r->rc)); + OSMO_STRBUF_PRINTF(sb, ", \"last\": %s", r->last ? "true" : "false"); + OSMO_STRBUF_PRINTF(sb, ", \"age\": %u", r->age); + if (r->rc == OSMO_MSLOOKUP_RC_RESULT) { + if (osmo_sockaddr_str_is_nonzero(&r->host_v4)) + OSMO_STRBUF_PRINTF(sb, ", \"v4\": [\"%s\", \"%u\"]", r->host_v4.ip, r->host_v4.port); + if (osmo_sockaddr_str_is_nonzero(&r->host_v6)) + OSMO_STRBUF_PRINTF(sb, ", \"v6\": [\"%s\", \"%u\"]", r->host_v6.ip, r->host_v6.port); + } + } + OSMO_STRBUF_PRINTF(sb, "}"); +} + +formatter_t formatters[] = { + [FORMAT_CSV] = formatter_csv, + [FORMAT_JSON] = formatter_json, +}; + +void respond_str_stdout(const char *str) { + fprintf(stdout, "%s\n", str); + fflush(stdout); +} + +void start_query_str(const char *query_str); +void start_query_strs(char **query_strs, size_t query_strs_len); + +struct socket_client { + struct llist_head entry; + struct osmo_fd ofd; + char query_str[1024]; +}; + +static void socket_client_close(struct socket_client *c) +{ + struct osmo_fd *ofd = &c->ofd; + + close(ofd->fd); + ofd->fd = -1; + osmo_fd_unregister(ofd); + + llist_del(&c->entry); + talloc_free(c); +} + +void socket_client_respond_result(struct socket_client *c, const char *response) +{ + write(c->ofd.fd, response, strlen(response)); +} + +static int socket_read_cb(struct osmo_fd *ofd) +{ + struct socket_client *c = ofd->data; + int rc; + char rxbuf[1024]; + char *query_with_timeout; + char *query_str; + char *at; + + rc = recv(ofd->fd, rxbuf, sizeof(rxbuf), 0); + if (rc == 0) + goto close; + + if (rc < 0) { + if (errno == EAGAIN) + return 0; + goto close; + } + + if (rc >= sizeof(c->query_str)) + goto close; + + rxbuf[rc] = '\0'; + query_with_timeout = strtok(rxbuf, "\r\n"); + at = strchr(query_with_timeout, '@'); + query_str = at ? at + 1 : query_with_timeout; + + if (c->query_str[0]) { + print_error("ERROR: Only one query per client connect is allowed;" + " received '%s' and '%s' on the same connection\n", + c->query_str, query_str); + formatters[globals.format](g_buf, sizeof(g_buf), query_str, NULL); + socket_client_respond_result(c, g_buf); + return 0; + } + + OSMO_STRLCPY_ARRAY(c->query_str, query_str); + start_query_str(query_with_timeout); + printf("query: %s\n", query_with_timeout); + return rc; + +close: + socket_client_close(c); + return -1; +} + +static int socket_cb(struct osmo_fd *ofd, unsigned int flags) +{ + int rc = 0; + + if (flags & BSC_FD_READ) + rc = socket_read_cb(ofd); + if (rc < 0) + return rc; + + return rc; +} + +int socket_accept(struct osmo_fd *ofd, unsigned int flags) +{ + struct socket_client *c; + struct sockaddr_un un_addr; + socklen_t len; + int rc; + + len = sizeof(un_addr); + rc = accept(ofd->fd, (struct sockaddr*)&un_addr, &len); + if (rc < 0) { + print_error("Failed to accept a new connection\n"); + return -1; + } + + c = talloc_zero(globals.ctx, struct socket_client); + OSMO_ASSERT(c); + c->ofd.fd = rc; + c->ofd.when = BSC_FD_READ; + c->ofd.cb = socket_cb; + c->ofd.data = c; + + if (osmo_fd_register(&c->ofd) != 0) { + print_error("Failed to register new connection fd\n"); + close(c->ofd.fd); + c->ofd.fd = -1; + talloc_free(c); + return -1; + } + + llist_add(&c->entry, &globals.socket_clients); + + if (globals.format == FORMAT_CSV && cmdline_opts.csv_headers) + write(c->ofd.fd, CSV_HEADERS, strlen(CSV_HEADERS)); + + return 0; +} + +int socket_init(const char *sock_path) +{ + struct osmo_fd *ofd = &globals.socket_ofd; + int rc; + + ofd->fd = osmo_sock_unix_init(SOCK_SEQPACKET, 0, sock_path, OSMO_SOCK_F_BIND); + if (ofd->fd < 0) { + print_error("Could not create unix socket: %s: %s\n", sock_path, strerror(errno)); + return -1; + } + + ofd->when = BSC_FD_READ; + ofd->cb = socket_accept; + + rc = osmo_fd_register(ofd); + if (rc < 0) { + print_error("Could not register listen fd: %d\n", rc); + close(ofd->fd); + return rc; + } + return 0; +} + +void socket_close() +{ + struct socket_client *c, *n; + llist_for_each_entry_safe(c, n, &globals.socket_clients, entry) + socket_client_close(c); + if (osmo_fd_is_registered(&globals.socket_ofd)) { + close(globals.socket_ofd.fd); + globals.socket_ofd.fd = -1; + osmo_fd_unregister(&globals.socket_ofd); + } +} + +struct query { + struct llist_head entry; + + char query_str[128]; + struct osmo_mslookup_query query; + uint32_t handle; +}; + +void respond_result(const char *query_str, const struct osmo_mslookup_result *r) +{ + struct socket_client *c, *n; + formatters[globals.format](g_buf, sizeof(g_buf), query_str, r); + respond_str_stdout(g_buf); + + llist_for_each_entry_safe(c, n, &globals.socket_clients, entry) { + if (!strcmp(query_str, c->query_str)) { + socket_client_respond_result(c, g_buf); + if (r->last) + socket_client_close(c); + } + } + if (r->last) + globals.requests_handled++; +} + +void respond_err(const char *query_str) +{ + respond_result(query_str, NULL); +} + +struct query *query_by_handle(uint32_t request_handle) +{ + struct query *q; + llist_for_each_entry(q, &globals.queries, entry) { + if (request_handle == q->handle) + return q; + } + return NULL; +} + +void mslookup_result_cb(struct osmo_mslookup_client *client, + uint32_t request_handle, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + struct query *q = query_by_handle(request_handle); + if (!q) + return; + respond_result(q->query_str, result); + if (result->last) { + llist_del(&q->entry); + talloc_free(q); + } +} + +void start_query_str(const char *query_str) +{ + struct query *q; + const char *domain_str = query_str; + char *at; + struct osmo_mslookup_query_handling h = { + .min_delay_milliseconds = cmdline_opts.min_delay, + .result_timeout_milliseconds = cmdline_opts.timeout, + .result_cb = mslookup_result_cb, + }; + + at = strchr(query_str, '@'); + if (at) { + int rc; + char timeouts[16]; + char *dash; + char *timeout; + + domain_str = at + 1; + + h.min_delay_milliseconds = h.result_timeout_milliseconds = 0; + + if (osmo_print_n(timeouts, sizeof(timeouts), query_str, at - query_str) >= sizeof(timeouts)) { + print_error("ERROR: timeouts part too long in query string\n"); + respond_err(domain_str); + return; + } + + dash = strchr(timeouts, '-'); + if (dash) { + char min_delay[16]; + osmo_print_n(min_delay, sizeof(min_delay), timeouts, dash - timeouts); + h.min_delay_milliseconds = parse_int(0, UINT32_MAX, min_delay, &rc); + if (rc) { + print_error("ERROR: invalid min-delay number: %s\n", min_delay); + respond_err(domain_str); + return; + } + timeout = dash + 1; + } else { + timeout = timeouts; + } + if (*timeout) { + h.result_timeout_milliseconds = parse_int(0, UINT32_MAX, timeout, &rc); + if (rc) { + print_error("ERROR: invalid timeout number: %s\n", timeout); + respond_err(domain_str); + return; + } + } + } + + if (strlen(domain_str) >= sizeof(q->query_str)) { + print_error("ERROR: query string is too long: '%s'\n", domain_str); + respond_err(domain_str); + return; + } + + q = talloc_zero(globals.ctx, struct query); + OSMO_ASSERT(q); + OSMO_STRLCPY_ARRAY(q->query_str, domain_str); + + if (osmo_mslookup_query_from_domain_str(&q->query, q->query_str)) { + print_error("ERROR: cannot parse query string: '%s'\n", domain_str); + respond_err(domain_str); + talloc_free(q); + return; + } + + q->handle = osmo_mslookup_client_request(globals.mslookup_client, &q->query, &h); + if (!q->handle) { + print_error("ERROR: cannot send query: '%s'\n", domain_str); + respond_err(domain_str); + talloc_free(q); + return; + } + + llist_add(&q->entry, &globals.queries); +} + +void start_query_strs(char **query_strs, size_t query_strs_len) +{ + int i; + for (i = 0; i < query_strs_len; i++) + start_query_str(query_strs[i]); +} + +int main(int argc, char **argv) +{ + int rc = EXIT_FAILURE; + globals.ctx = talloc_named_const(NULL, 0, "osmo-mslookup-client"); + + osmo_init_logging2(globals.ctx, NULL); + log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_BASENAME); + log_set_print_filename_pos(osmo_stderr_target, LOG_FILENAME_POS_LINE_END); + log_set_print_level(osmo_stderr_target, 1); + log_set_print_category(osmo_stderr_target, 1); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_print_extended_timestamp(osmo_stderr_target, 1); + log_set_use_color(osmo_stderr_target, 0); + + while (1) { + int c; + long long int val; + char *endptr; + int option_index = 0; + + static struct option long_options[] = { + { "format", 1, 0, 'f' }, + { "no-csv-headers", 0, 0, 'H' }, + { "daemon", 0, 0, 'd' }, + { "mdns-ip", 1, 0, 'm' }, + { "mdns-port", 1, 0, 'M' }, + { "timeout", 1, 0, 'T' }, + { "min-delay", 1, 0, 't' }, + { "socket", 1, 0, 's' }, + { "send", 0, 0, 'S' }, + { "quiet", 0, 0, 'q' }, + { "help", 0, 0, 'h' }, + { "version", 0, 0, 'V' }, + {} + }; + +#define PARSE_INT(TARGET, MINVAL, MAXVAL) do { \ + int _rc; \ + TARGET = parse_int(MINVAL, MAXVAL, optarg, &_rc); \ + if (_rc) { \ + print_error("Invalid " #TARGET ": %s\n", optarg); \ + goto program_exit; \ + } \ + } while (0) + + c = getopt_long(argc, argv, "f:Hdm:M:t:T:s:SqhV", long_options, &option_index); + + if (c == -1) + break; + + switch (c) { + case 'f': + cmdline_opts.format_str = optarg; + break; + case 'H': + cmdline_opts.csv_headers = false; + break; + case 'd': + cmdline_opts.daemon = true; + break; + case 'm': + if (osmo_sockaddr_str_from_str(&cmdline_opts.mdns_addr, optarg, cmdline_opts.mdns_addr.port) + || !osmo_sockaddr_str_is_nonzero(&cmdline_opts.mdns_addr)) { + print_error("Invalid mDNS IP address: %s\n", optarg); + goto program_exit; + } + break; + case 'M': + PARSE_INT(cmdline_opts.mdns_addr.port, 1, 65535); + break; + case 't': + PARSE_INT(cmdline_opts.min_delay, 0, UINT32_MAX); + break; + case 'T': + PARSE_INT(cmdline_opts.timeout, 0, UINT32_MAX); + break; + case 's': + cmdline_opts.socket_path = optarg; + break; + case 'S': + cmdline_opts.send = true; + break; + case 'q': + cmdline_opts.quiet = true; + break; + + case 'h': + print_help(); + rc = 0; + goto program_exit; + case 'V': + print_version(); + rc = 0; + goto program_exit; + + default: + /* catch unknown options *as well as* missing arguments. */ + print_error("Error in command line options. Exiting.\n"); + goto program_exit; + } + } + + if (cmdline_opts.send) { + if (cmdline_opts.daemon || cmdline_opts.format_str || cmdline_opts.socket_path) { + print_error("--send option cannot have any listening related args."); + } + rc = do_send(argc - optind, argv + optind); + goto program_exit; + } + + if (!cmdline_opts.daemon && !(argc - optind)) { + print_help(); + goto program_exit; + } + + if (cmdline_opts.daemon && !cmdline_opts.timeout) { + print_error("In daemon mode, --timeout must not be zero.\n"); + goto program_exit; + } + + if (cmdline_opts.quiet) + log_target_destroy(osmo_stderr_target); + + if (cmdline_opts.format_str) { + if (osmo_str_startswith("json", cmdline_opts.format_str)) + globals.format = FORMAT_JSON; + else if (osmo_str_startswith("csv", cmdline_opts.format_str)) + globals.format = FORMAT_CSV; + else { + print_error("Invalid format: %s\n", cmdline_opts.format_str); + goto program_exit; + } + } + + if (globals.format == FORMAT_CSV && cmdline_opts.csv_headers) + respond_str_stdout(CSV_HEADERS); + + globals.mslookup_client = osmo_mslookup_client_new(globals.ctx); + if (!globals.mslookup_client + || !osmo_mslookup_client_add_mdns(globals.mslookup_client, + cmdline_opts.mdns_addr.ip, cmdline_opts.mdns_addr.port, + -1)) { + print_error("Failed to start mDNS client\n"); + goto program_exit; + } + + if (cmdline_opts.socket_path) { + if (socket_init(cmdline_opts.socket_path)) + goto program_exit; + } + + start_query_strs(&argv[optind], argc - optind); + + while (1) { + osmo_select_main_ctx(0); + + if (!cmdline_opts.daemon + && globals.requests_handled + && llist_empty(&globals.queries)) + break; + } + + rc = 0; +program_exit: + osmo_mslookup_client_free(globals.mslookup_client); + socket_close(); + log_fini(); + talloc_free(globals.ctx); + return rc; +} -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:03 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:03 +0000 Subject: Change in osmo-hlr[master]: contrib/dgsm/ add example esme and dialplan References: Message-ID: Hello osmith, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16204 to review the following change. Change subject: contrib/dgsm/ add example esme and dialplan ...................................................................... contrib/dgsm/ add example esme and dialplan Add example scripts for the distributed GSM network: esme_dgsm.py: connect to the SMPP port of OsmoMSC A and forward SMS to the SMPP port of OsmoMSC B. The IP and port of OsmoMSC B is retrieved by the receiver's MSISDN using osmo-mslookup-client. contrib/dgsm/freeswitch_dialplan_dgsm.py: resolve the destination SIP servers of calls with osmo-mslookup-client and bridge the calls accordingly. Related: OS#4254 Related: OS#4255 Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 --- M contrib/dgsm/Makefile.am A contrib/dgsm/esme_dgsm.py A contrib/dgsm/freeswitch_dialplan_dgsm.py 3 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/04/16204/1 diff --git a/contrib/dgsm/Makefile.am b/contrib/dgsm/Makefile.am index c759302..5392646 100644 --- a/contrib/dgsm/Makefile.am +++ b/contrib/dgsm/Makefile.am @@ -1,4 +1,6 @@ EXTRA_DIST = \ + esme_dgsm.py \ + freeswitch_dialplan_dgsm.py \ osmo-mslookup-pipe.py \ osmo-mslookup-socket.py \ $(NULL) diff --git a/contrib/dgsm/esme_dgsm.py b/contrib/dgsm/esme_dgsm.py new file mode 100755 index 0000000..9e8d6ae --- /dev/null +++ b/contrib/dgsm/esme_dgsm.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python3 +""" +SPDX-License-Identifier: AGPL-3.0-or-later +Copyright 2019 sysmocom s.f.m.c GmbH + +WARNING: this is just a proof-of-concept implementation, it blocks for every +received SMPP request and is not suitable for servicing more than one request +at a time. + +Based on esme.py from RCCN: +https://github.com/Rhizomatica/rccn/blob/master/rccn/esme.py +Copyright 2017 keith + +Forward SMS to the receiver's SMSC, as determined with mslookup. +Requires smpplip (pip3 install --user smpplib) and osmo-mslookup-client. + +Example SMPP configuration for osmo-msc.cfg: +smpp + local-tcp-ip 127.0.0.1 2775 + policy closed + smpp-first +# outgoing to esme_dgsm.py + esme OSMPP + no alert-notifications + password foo + default-route +# incoming from esme_dgsm.py + esme ISMPP + no alert-notifications + password foo +""" +import argparse +import json +import logging +import smpplib +import subprocess +import time + + +def can_handle_pdu(pdu): + if not isinstance(pdu, smpplib.command.DeliverSM): + logging.info('PDU is not a DeliverSM. Is OsmoMSC configured properly?') + return False + + # Multipart SMS etc. not handled here (see RCCN's esme.py) + if pdu.esm_class & smpplib.consts.SMPP_GSMFEAT_UDHI: + logging.info("UDH (User Data Header) handling not implemented in this" + " example, dropping message.") + return False + + if int(pdu.dest_addr_ton) == smpplib.consts.SMPP_TON_INTL: + logging.info("Unable to handle SMS for %s: SMPP_TON_INTL" % + (pdu.destination_addr)) + return False + + return True + + +def query_mslookup(service_type, id, id_type='msisdn'): + query_str = '%s.%s.%s' % (service_type, id, id_type) + logging.info('mslookup: ' + query_str) + + result_line = subprocess.check_output(['osmo-mslookup-client', query_str, + '-f', 'json']) + if isinstance(result_line, bytes): + result_line = result_line.decode('ascii') + + logging.info('mslookup result: ' + result_line.rstrip()) + return json.loads(result_line) + + +def tx_sms(dst_host, dst_port, source, destination, unicode_text): + smpp_client = smpplib.client.Client(dst_host, dst_port, 90) + smpp_client.connect() + smpp_client.bind_transceiver(system_id=args.dst_id, password=args.dst_pass) + logging.info('Connected to destination SMSC (%s@%s:%s)' % (args.dst_id, + dst_host, dst_port)) + + pdu = smpp_client.send_message( + source_addr_ton=smpplib.consts.SMPP_TON_ALNUM, + source_addr_npi=smpplib.consts.SMPP_NPI_UNK, + source_addr=source.decode(), + dest_addr_ton=smpplib.consts.SMPP_TON_SBSCR, + dest_addr_npi=smpplib.consts.SMPP_NPI_ISDN, + destination_addr=destination.decode(), + short_message=unicode_text, + registered_delivery=False, + ) + + smpp_client.unbind() + smpp_client.disconnect() + del pdu + del smpp_client + + +def rx_deliver_sm(pdu): + if not can_handle_pdu(pdu): + return smpplib.consts.SMPP_ESME_RSYSERR + + msisdn = pdu.destination_addr.decode() + logging.info("Incoming SMS for: " + msisdn) + + if args.sleep: + logging.info("Sleeping for %i seconds" % (args.sleep)) + time.sleep(args.sleep) + logging.info("Sleep done") + + result = query_mslookup("smpp.sms", msisdn) + if 'v4' not in result or not result['v4']: + logging.info('No IPv4 result from mslookup! This example only' + ' makes use of IPv4, dropping.') + return smpplib.consts.SMPP_ESME_RSYSERR + + dst_host, dst_port = result['v4'] + tx_sms(dst_host, dst_port, pdu.source_addr, + pdu.destination_addr, pdu.short_message) + + return smpplib.consts.SMPP_ESME_ROK + + +def smpp_bind(): + client = smpplib.client.Client(args.src_host, args.src_port, 90) + client.set_message_received_handler(rx_deliver_sm) + client.connect() + client.bind_transceiver(system_id=args.src_id, password=args.src_pass) + logging.info('Connected to source SMSC (%s@%s:%s)' % (args.src_id, + args.src_host, args.src_port)) + logging.info('Waiting for SMS...') + client.listen() + + +def main(): + global args + parser = argparse.ArgumentParser() + parser.add_argument('--src-host', default='127.0.0.1', + help='source SMSC (OsmoMSC) host (default: 127.0.0.1)') + parser.add_argument('--src-port', default=2775, type=int, + help='source SMSC (OsmoMSC) port (default: 2775)') + parser.add_argument('--src-id', default='OSMPP', + help='source system id, as configured in osmo-msc.cfg' + ' (default: OSMPP)') + parser.add_argument('--src-pass', default='foo', + help='source system password, as configured in' + ' osmo-msc.cfg (default: foo)') + parser.add_argument('--dst-id', default='ISMPP', + help='destination system id, as configured in' + ' osmo-msc.cfg (default: ISMPP)') + parser.add_argument('--dst-pass', default='foo', + help='destination system password, as configured in' + ' osmo-msc.cfg (default: foo)') + parser.add_argument('--sleep', default=0, type=float, + help='sleep time in seconds before forwarding an SMS,' + ' to test multithreading (default: 0)') + args = parser.parse_args() + + logging.basicConfig(level=logging.INFO, format='[%(asctime)s]' + ' (%(threadName)s) %(message)s', datefmt="%H:%M:%S") + smpp_bind() + + +if __name__ == "__main__": + main() diff --git a/contrib/dgsm/freeswitch_dialplan_dgsm.py b/contrib/dgsm/freeswitch_dialplan_dgsm.py new file mode 100755 index 0000000..66f2d9a --- /dev/null +++ b/contrib/dgsm/freeswitch_dialplan_dgsm.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +""" +SPDX-License-Identifier: AGPL-3.0-or-later +Copyright 2019 sysmocom s.f.m.c GmbH + +This is a freeswitch dialplan implementation, see: +https://freeswitch.org/confluence/display/FREESWITCH/mod_python + +Find the right SIP server with mslookup (depending on the destination number) +and bridge calls accordingly. +""" +import json +import subprocess + + +def query_mslookup(service_type, id, id_type='msisdn'): + query_str = '%s.%s.%s' % (service_type, id, id_type) + print('[dialplan-dgsm] mslookup: ' + query_str) + + result_line = subprocess.check_output([ + 'osmo-mslookup-client', query_str, '-f', 'json']) + if isinstance(result_line, bytes): + result_line = result_line.decode('ascii') + + print('[dialplan-dgsm] mslookup result: ' + result_line) + return json.loads(result_line) + + +def handler(session, args): + """ Handle calls: bridge to the SIP server found with mslookup. """ + print('[dialplan-dgsm] call handler') + msisdn = session.getVariable('destination_number') + + # Run osmo-mslookup-client binary. We have also tried to directly call the + # C functions with ctypes but this has lead to hard-to-debug segfaults. + try: + result = query_mslookup("sip.voice", msisdn) + + # This example only makes use of IPv4 + if not result['v4']: + print('[dialplan-dgsm] no IPv4 result from mslookup') + session.hangup('UNALLOCATED_NUMBER') + return + + sip_ip, sip_port = result['v4'] + dial_str = 'sofia/internal/sip:{}@{}:{}'.format( + msisdn, sip_ip, sip_port) + print('[dialplan-dgsm] dial_str: ' + str(dial_str)) + + session.execute('bridge', dial_str) + except: + print('[dialplan-dgsm]: exception during call handler') + session.hangup('UNALLOCATED_NUMBER') + + +def fsapi(session, stream, env, args): + """ Freeswitch refuses to load the module without this. """ + stream.write(env.serialize()) + + +def main(): + import argparse + + parser = argparse.ArgumentParser() + parser.add_argument('id', type=int) + parser.add_argument('-i', '--id-type', default='msisdn', + help='default: "msisdn"') + parser.add_argument('-s', '--service', default='sip.voice', + help='default: "sip.voice"') + args = parser.parse_args() + + result = query_mslookup(args.service, args.id, args.id_type) + print(json.dumps(result)) + + +if __name__ == '__main__': + main() -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 Gerrit-Change-Number: 16204 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:04 +0000 Subject: Change in osmo-hlr[master]: add lu_fsm and osmo_gsup_req References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: add lu_fsm and osmo_gsup_req ...................................................................... add lu_fsm and osmo_gsup_req These are seemingly orthogonal changes in one patch, because they are in fact sufficiently intertwined that we are not willing to spend the time to separate them. They are also refactoring changes, unlikely to make sense on their own. ** lu_fsm: Attempting to make luop.c keep state about incoming GSUP requests made me find shortcomings in several places: - since it predates osmo_fsm, it is a state machine that does not strictly enforce the order of state transitions or the right sequence of incoming events. - several places OSMO_ASSERT() on data received from the network. - modifies the subscriber state before a LU is accepted. - dead code about canceling a subscriber in a previous VLR. That would be a good thing to actually do, which should also be trivial now that we record vlr_name and sgsn_name, but I decided to remove the dead code for now. To both step up the LU game *and* make it easier for me to integrate osmo_gsup_req handling, I decided to create a lu_fsm, drawing from my, by now, ample experience of writing osmo_fsms. ** osmo_gsup_req: Prepare for D-GSM, where osmo-hlr will do proxy routing for remote HLRs / communicate with remote MSCs via a proxy: a) It is important that a response that osmo-hlr generates and that is sent back to a requesting MSC contains all IEs that are needed to route it back to the requester. Particularly source_name must become destination_name in the response to be able to even reach the requesting MSC. Other fields are also necessary to match, which were so far taken care of in individual numerous code paths. b) For some operations, the response to a GSUP request is generated asynchronously (like Update Location Request -> Response, or taking the response from an EUSE, or the upcoming proxying to a remote HLR). To be able to feed a request message's information back into the response, we must thus keep the request data around. Since struct osmo_gsup_message references a lot of external data, usually with pointers directly into the received msgb, it is not so trivial to pass GSUP message data around asynchronously, on its own. osmo_gsup_req is the combined solution for both a and b: it keeps all data for a GSUP message by taking ownership of the incoming msgb, and it provides an explicit API "forcing" callers to respond with osmo_gsup_req_respond(), so that all code paths trivially are definitely responding with the correct IEs set to match the request's routing (by using osmo_gsup_make_response() recently added to libosmocore). Adjust all osmo-hlr code paths to use *only* osmo_gsup_req to respond to incoming requests received on the GSUP server (above LU code being one of them). In fact, the same should be done on the client side. Hence osmo_gsup_req is implemented in a server/client agnostic way, and is placed in libosmo-gsupclient. As soon as we see routing errors in complex GSUP setups, using osmo_gsup_req in the related GSUP client is likely to resolve those problems without much thinking required beyond making all code paths use it. libosmo-gsupclient is hence added to osmo-hlr binary's own library dependencies. It would have been added by the D-GSM proxy routing anyway, we are just doing it a little sooner. ** global_title.c / osmo_gt: We so far handle a Global Title a.k.a. an IPA unit name as pointer + size, or as just pointer with implicit talloc size. To ease working with GSUP peer identification data, I require: - a non-allocated storage of a Global Title. It brings the drawback of being size limited, but our current implementation is anyway only able to handle MSC and SGSN names of 31 characters (see struct hlr_subscriber). - a single-argument handle for Global Title, - easy to use utility functions like osmo_gt_name(), osmo_gt_cmp(), and copying by simple assignment, a = b. Hence this patch adds a osmo_gt in global_title.h and global_title.c. Heavily used in LU and osmo_gsup_req. Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 --- M include/Makefile.am A include/osmocom/gsupclient/global_title.h A include/osmocom/gsupclient/gsup_req.h M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/db.h M include/osmocom/hlr/gsup_router.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/lu_fsm.h D include/osmocom/hlr/luop.h M src/Makefile.am M src/db.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/gsupclient/Makefile.am A src/gsupclient/global_title.c M src/gsupclient/gsup_client.c A src/gsupclient/gsup_req.c M src/hlr.c M src/hlr_ussd.c M src/logging.c A src/lu_fsm.c D src/luop.c M src/mslookup/mdns_record.c M tests/db/Makefile.am M tests/db/db_test.c M tests/db/db_test.err M tests/gsup_server/Makefile.am M tests/test_nodes.vty 33 files changed, 1,227 insertions(+), 910 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/16205/1 diff --git a/include/Makefile.am b/include/Makefile.am index 9827950..91401e7 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,7 +1,9 @@ SUBDIRS = osmocom nobase_include_HEADERS = \ + osmocom/gsupclient/global_title.h \ osmocom/gsupclient/gsup_client.h \ + osmocom/gsupclient/gsup_req.h \ osmocom/mslookup/mdns.h \ osmocom/mslookup/mdns_sock.h \ osmocom/mslookup/mslookup_client_fake.h \ diff --git a/include/osmocom/gsupclient/global_title.h b/include/osmocom/gsupclient/global_title.h new file mode 100644 index 0000000..b10582a --- /dev/null +++ b/include/osmocom/gsupclient/global_title.h @@ -0,0 +1,19 @@ +#pragma once +#include +#include + +/*! Global Title: Arbitrary length blob, not necessarily zero-terminated. + * In osmo-hlr, struct hlr_subscriber is mostly used as static reference and cannot serve as talloc context, which is + * why this is also implemented as a fixed-maximum-size buffer instead of a talloc'd arbitrary sized buffer. + * NOTE: The length of val may be extended in the future if it becomes necessary. + * At the time of writing, this holds IPA unit name strings of very limited length. + */ +struct osmo_gt { + size_t len; + uint8_t val[128]; +}; + +int osmo_gt_set(struct osmo_gt *gt, const uint8_t *val, size_t len); +int osmo_gt_set_str(struct osmo_gt *gt, const char *str_fmt, ...); +int osmo_gt_cmp(const struct osmo_gt *a, const struct osmo_gt *b); +const char *osmo_gt_name(const struct osmo_gt *gt); diff --git a/include/osmocom/gsupclient/gsup_req.h b/include/osmocom/gsupclient/gsup_req.h new file mode 100644 index 0000000..29a222a --- /dev/null +++ b/include/osmocom/gsupclient/gsup_req.h @@ -0,0 +1,90 @@ +#pragma once + +#include +#include + +struct osmo_gsup_req; + +#define LOG_GSUP_REQ_CAT_SRC(req, subsys, level, file, line, fmt, args...) \ + LOGPSRC(subsys, level, file, line, "GSUP %u: %s: IMSI-%s %s: " fmt, \ + (req) ? (req)->nr : 0, \ + (req) ? osmo_gt_name(&(req)->source_name) : "NULL", \ + (req) ? (req)->gsup.imsi : "NULL", \ + (req) ? osmo_gsup_message_type_name((req)->gsup.message_type) : "NULL", \ + ##args) +#define LOG_GSUP_REQ_CAT(req, subsys, level, fmt, args...) \ + LOG_GSUP_REQ_CAT_SRC(req, subsys, level, __FILE__, __LINE__, fmt, ##args) + +#define LOG_GSUP_REQ_SRC(req, level, file, line, fmt, args...) \ + LOG_GSUP_REQ_CAT_SRC(req, DLGSUP, level, file, line, fmt, ##args) + +#define LOG_GSUP_REQ(req, level, fmt, args...) \ + LOG_GSUP_REQ_SRC(req, level, __FILE__, __LINE__, fmt, ##args) + +typedef void (*osmo_gsup_req_send_response_t)(struct osmo_gsup_req *req, struct osmo_gsup_message *response); + +/* Keep track of an incoming request, to route back a response when it is ready. + * Particularly, a GSUP response to a request should be made and/or checked by osmo_gsup_make_response(), for GSUP routing + * to work, and for session states to remain valid. + */ +struct osmo_gsup_req { + /* The incoming GSUP message in decoded form. */ + const struct osmo_gsup_message gsup; + + /* Decoding result code. If decoding failed, this will be != 0. */ + int decode_rc; + + /* The ultimate source of this message: the source_name form the GSUP message, or, if not present, then the + * immediate GSUP peer. GSUP messages going via a proxy reflect the initial source in the source_name. + * This source_name is implicitly added to the routes for the conn the message was received on. */ + struct osmo_gt source_name; + + /* If the source_name is not an immediate GSUP peer, this is set to the closest intermediate peer between here + * and source_name. */ + struct osmo_gt via_proxy; + + /* Identify this request by number, for logging. */ + unsigned int nr; + + /* osmo_gsup_req can be used by both gsup_server and gsup_client. The individual method of actually sending a + * GSUP message is provided by this callback. */ + osmo_gsup_req_send_response_t send_response_cb; + + /* User supplied data pointer, may be used to provide context to send_response_cb(). */ + void *cb_data; + + /* List entry that can be used to keep a list of osmo_gsup_req instances; not used directly by osmo_gsup_req.c, + * it is up to using implementations to keep a list. If this is non-NULL, osmo_gsup_req_free() calls + * llist_del() on this. */ + struct llist_head entry; + + /* A decoded GSUP message still points into the received msgb. For a decoded osmo_gsup_message to remain valid, + * we also need to keep the msgb. */ + struct msgb *msg; +}; + +struct osmo_gsup_req *osmo_gsup_req_new(void *ctx, const struct osmo_gt *from_peer, struct msgb *msg, + osmo_gsup_req_send_response_t send_response_cb, void *cb_data, + struct llist_head *add_to_list); +void osmo_gsup_req_free(struct osmo_gsup_req *req); + +/*! Call _osmo_gsup_req_respond() to convey the sender's source file and line in the logs. */ +#define osmo_gsup_req_respond(REQ, RESPONSE, ERROR, FINAL_RESPONSE) \ + _osmo_gsup_req_respond(REQ, RESPONSE, ERROR, FINAL_RESPONSE, __FILE__, __LINE__) +int _osmo_gsup_req_respond(struct osmo_gsup_req *req, struct osmo_gsup_message *response, + bool error, bool final_response, const char *file, int line); + +/*! Call _osmo_gsup_req_respond_msgt() to convey the sender's source file and line in the logs. */ +#define osmo_gsup_req_respond_msgt(REQ, MESSAGE_TYPE, FINAL_RESPONSE) \ + _osmo_gsup_req_respond_msgt(REQ, MESSAGE_TYPE, FINAL_RESPONSE, __FILE__, __LINE__) +int _osmo_gsup_req_respond_msgt(struct osmo_gsup_req *req, enum osmo_gsup_message_type message_type, + bool final_response, const char *file, int line); + +/*! Log an error message, and call _osmo_gsup_req_respond() to convey the sender's source file and line in the logs. */ +#define osmo_gsup_req_respond_err(REQ, CAUSE, FMT, args...) do { \ + LOG_GSUP_REQ(REQ, LOGL_ERROR, "%s: " FMT "\n", \ + get_value_string(gsm48_gmm_cause_names, CAUSE), ##args); \ + _osmo_gsup_req_respond_err(REQ, CAUSE, __FILE__, __LINE__); \ + } while(0) +void _osmo_gsup_req_respond_err(struct osmo_gsup_req *req, enum gsm48_gmm_cause cause, + const char *file, int line); diff --git a/include/osmocom/hlr/Makefile.am b/include/osmocom/hlr/Makefile.am index 77a8764..532fa5d 100644 --- a/include/osmocom/hlr/Makefile.am +++ b/include/osmocom/hlr/Makefile.am @@ -9,6 +9,6 @@ hlr_vty.h \ hlr_vty_subscr.h \ logging.h \ - luop.h \ + lu_fsm.h \ rand.h \ $(NULL) diff --git a/include/osmocom/hlr/db.h b/include/osmocom/hlr/db.h index eacc78e..592a976 100644 --- a/include/osmocom/hlr/db.h +++ b/include/osmocom/hlr/db.h @@ -3,6 +3,8 @@ #include #include +#include + struct hlr; enum stmt_idx { @@ -151,13 +153,12 @@ int db_subscr_get_by_imei(struct db_context *dbc, const char *imei, struct hlr_subscriber *subscr); int db_subscr_nam(struct db_context *dbc, const char *imsi, bool nam_val, bool is_ps); int db_subscr_lu(struct db_context *dbc, int64_t subscr_id, - const char *vlr_or_sgsn_number, bool is_ps); + const struct osmo_gt *vlr_name, bool is_ps, + const struct osmo_gt *via_proxy); int db_subscr_purge(struct db_context *dbc, const char *by_imsi, bool purge_val, bool is_ps); -int hlr_subscr_nam(struct hlr *hlr, struct hlr_subscriber *subscr, bool nam_val, bool is_ps); - /*! Call sqlite3_column_text() and copy result to a char[]. * \param[out] buf A char[] used as sizeof() arg(!) and osmo_strlcpy() target. * \param[in] stmt An sqlite3_stmt*. @@ -168,3 +169,14 @@ const char *_txt = (const char *) sqlite3_column_text(stmt, idx); \ osmo_strlcpy(buf, _txt, sizeof(buf)); \ } while (0) + +/*! Call sqlite3_column_text() and copy result to a struct osmo_gt. + * \param[out] gt A struct osmo_gt* to write to. + * \param[in] stmt An sqlite3_stmt*. + * \param[in] idx Index in stmt's returned columns. + */ +#define copy_sqlite3_text_to_gt(gt, stmt, idx) \ + do { \ + const char *_txt = (const char *) sqlite3_column_text(stmt, idx); \ + osmo_gt_set_str(gt, _txt); \ + } while (0) diff --git a/include/osmocom/hlr/gsup_router.h b/include/osmocom/hlr/gsup_router.h index 0fc10d0..e3023d1 100644 --- a/include/osmocom/hlr/gsup_router.h +++ b/include/osmocom/hlr/gsup_router.h @@ -3,6 +3,8 @@ #include #include +struct osmo_gt; + struct gsup_route { struct llist_head list; @@ -12,10 +14,12 @@ struct osmo_gsup_conn *gsup_route_find(struct osmo_gsup_server *gs, const uint8_t *addr, size_t addrlen); +struct osmo_gsup_conn *gsup_route_find_gt(struct osmo_gsup_server *gs, const struct osmo_gt *gt); struct gsup_route *gsup_route_find_by_conn(const struct osmo_gsup_conn *conn); /* add a new route for the given address to the given conn */ +int gsup_route_add_gt(struct osmo_gsup_conn *conn, const struct osmo_gt *gt); int gsup_route_add(struct osmo_gsup_conn *conn, const uint8_t *addr, size_t addrlen); /* delete all routes for the given connection */ @@ -24,3 +28,6 @@ int osmo_gsup_addr_send(struct osmo_gsup_server *gs, const uint8_t *addr, size_t addrlen, struct msgb *msg); +int osmo_gsup_gt_send(struct osmo_gsup_server *gs, const struct osmo_gt *gt, struct msgb *msg); +int osmo_gsup_gt_enc_send(struct osmo_gsup_server *gs, const struct osmo_gt *gt, + const struct osmo_gsup_message *gsup); diff --git a/include/osmocom/hlr/gsup_server.h b/include/osmocom/hlr/gsup_server.h index 14f5013..c3efea2 100644 --- a/include/osmocom/hlr/gsup_server.h +++ b/include/osmocom/hlr/gsup_server.h @@ -5,6 +5,8 @@ #include #include #include +#include +#include #ifndef OSMO_GSUP_MAX_CALLED_PARTY_BCD_LEN #define OSMO_GSUP_MAX_CALLED_PARTY_BCD_LEN 43 /* TS 24.008 10.5.4.7 */ @@ -22,9 +24,6 @@ /* list of osmo_gsup_conn */ struct llist_head clients; - /* lu_operations list */ - struct llist_head *luop; - struct ipa_server_link *link; osmo_gsup_read_cb_t read_cb; struct llist_head routes; @@ -45,10 +44,15 @@ /* Set when Location Update is received: */ bool supports_cs; /* client supports OSMO_GSUP_CN_DOMAIN_CS */ bool supports_ps; /* client supports OSMO_GSUP_CN_DOMAIN_PS */ + + /* The IPA unit name received on this link. Routes with more unit names serviced by this link may exist in + * osmo_gsup_server->routes, but this is the name the immediate peer identified as in the IPA handshake. */ + struct osmo_gt peer_name; }; struct msgb *osmo_gsup_msgb_alloc(const char *label); +struct osmo_gsup_req *osmo_gsup_conn_rx(struct osmo_gsup_conn *conn, struct msgb *msg); int osmo_gsup_conn_send(struct osmo_gsup_conn *conn, struct msgb *msg); int osmo_gsup_conn_ccm_get(const struct osmo_gsup_conn *clnt, uint8_t **addr, uint8_t tag); @@ -57,7 +61,6 @@ const char *ip_addr, uint16_t tcp_port, osmo_gsup_read_cb_t read_cb, - struct llist_head *lu_op_lst, void *priv); void osmo_gsup_server_destroy(struct osmo_gsup_server *gsups); diff --git a/include/osmocom/hlr/hlr.h b/include/osmocom/hlr/hlr.h index 18c4a1d..2214a8b 100644 --- a/include/osmocom/hlr/hlr.h +++ b/include/osmocom/hlr/hlr.h @@ -24,10 +24,16 @@ #include #include +#include +#include #define HLR_DEFAULT_DB_FILE_PATH "hlr.db" struct hlr_euse; +struct osmo_gsup_conn; +enum osmo_gsup_message_type; + +extern struct osmo_tdef g_hlr_tdefs[]; struct hlr { /* GSUP server pointer */ @@ -43,6 +49,7 @@ /* Local bind addr */ char *gsup_bind_addr; + struct ipaccess_unit gsup_unit_name; struct llist_head euse_list; struct hlr_euse *euse_default; @@ -68,3 +75,4 @@ struct hlr_subscriber; void osmo_hlr_subscriber_update_notify(struct hlr_subscriber *subscr); +int hlr_subscr_nam(struct hlr *hlr, struct hlr_subscriber *subscr, bool nam_val, bool is_ps); diff --git a/include/osmocom/hlr/hlr_ussd.h b/include/osmocom/hlr/hlr_ussd.h index 08e810e..8b2e837 100644 --- a/include/osmocom/hlr/hlr_ussd.h +++ b/include/osmocom/hlr/hlr_ussd.h @@ -46,8 +46,8 @@ struct hlr_euse *euse); void ussd_route_del(struct hlr_ussd_route *rt); -int rx_proc_ss_req(struct osmo_gsup_conn *conn, const struct osmo_gsup_message *gsup); -int rx_proc_ss_error(struct osmo_gsup_conn *conn, const struct osmo_gsup_message *gsup); +void rx_proc_ss_req(struct osmo_gsup_req *req); +void rx_proc_ss_error(struct osmo_gsup_req *req); struct ss_session; struct ss_request; @@ -56,6 +56,5 @@ struct hlr_iuse { const char *name; /* call-back to be called for any incoming USSD messages for this IUSE */ - int (*handle_ussd)(struct osmo_gsup_conn *conn, struct ss_session *ss, - const struct osmo_gsup_message *gsup, const struct ss_request *req); + int (*handle_ussd)(struct ss_session *ss, const struct osmo_gsup_message *gsup, const struct ss_request *req); }; diff --git a/include/osmocom/hlr/logging.h b/include/osmocom/hlr/logging.h index 83f1acd..4e0a25c 100644 --- a/include/osmocom/hlr/logging.h +++ b/include/osmocom/hlr/logging.h @@ -9,6 +9,7 @@ DAUC, DSS, DMSLOOKUP, + DLU, }; extern const struct log_info hlr_log_info; diff --git a/include/osmocom/hlr/lu_fsm.h b/include/osmocom/hlr/lu_fsm.h new file mode 100644 index 0000000..f9a33bd --- /dev/null +++ b/include/osmocom/hlr/lu_fsm.h @@ -0,0 +1,2 @@ + +void lu_rx_gsup(struct osmo_gsup_req *req); diff --git a/include/osmocom/hlr/luop.h b/include/osmocom/hlr/luop.h deleted file mode 100644 index 77a1dec..0000000 --- a/include/osmocom/hlr/luop.h +++ /dev/null @@ -1,81 +0,0 @@ -/* OsmoHLR TX/RX lu operations */ - -/* (C) 2017 sysmocom s.f.m.c. GmbH - * All Rights Reserved - * - * Author: Harald Welte - * - * 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 -#include - -#include -#include - -#define CANCEL_TIMEOUT_SECS 30 -#define ISD_TIMEOUT_SECS 30 - -enum lu_state { - LU_S_NULL, - LU_S_LU_RECEIVED, - LU_S_CANCEL_SENT, - LU_S_CANCEL_ACK_RECEIVED, - LU_S_ISD_SENT, - LU_S_ISD_ACK_RECEIVED, - LU_S_COMPLETE, -}; - -extern const struct value_string lu_state_names[]; - -struct lu_operation { - /*! entry in global list of location update operations */ - struct llist_head list; - /*! to which gsup_server do we belong */ - struct osmo_gsup_server *gsup_server; - /*! state of the location update */ - enum lu_state state; - /*! CS (false) or PS (true) Location Update? */ - bool is_ps; - /*! currently running timer */ - struct osmo_timer_list timer; - - /*! subscriber related to this operation */ - struct hlr_subscriber subscr; - /*! peer VLR/SGSN starting the request */ - uint8_t *peer; -}; - - -struct lu_operation *lu_op_alloc(struct osmo_gsup_server *srv); -struct lu_operation *lu_op_alloc_conn(struct osmo_gsup_conn *conn); -void lu_op_statechg(struct lu_operation *luop, enum lu_state new_state); -bool lu_op_fill_subscr(struct lu_operation *luop, struct db_context *dbc, - const char *imsi); -struct lu_operation *lu_op_by_imsi(const char *imsi, - const struct llist_head *lst); - -void lu_op_tx_error(struct lu_operation *luop, enum gsm48_gmm_cause cause); -void lu_op_tx_ack(struct lu_operation *luop); -void lu_op_tx_cancel_old(struct lu_operation *luop); -void lu_op_tx_insert_subscr_data(struct lu_operation *luop); -void lu_op_tx_del_subscr_data(struct lu_operation *luop); - -void lu_op_free(struct lu_operation *luop); diff --git a/src/Makefile.am b/src/Makefile.am index f858ff0..3a83616 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -41,7 +41,6 @@ auc.c \ ctrl.c \ db.c \ - luop.c \ db_auc.c \ db_hlr.c \ gsup_router.c \ @@ -53,9 +52,11 @@ hlr_vty_subscr.c \ gsup_send.c \ hlr_ussd.c \ + lu_fsm.c \ $(NULL) osmo_hlr_LDADD = \ + $(top_builddir)/src/gsupclient/libosmo-gsup-client.la \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ @@ -71,6 +72,7 @@ logging.c \ rand_urandom.c \ dbd_decode_binary.c \ + $(srcdir)/gsupclient/global_title.c \ $(NULL) osmo_hlr_db_tool_LDADD = \ diff --git a/src/db.c b/src/db.c index 5e5ad35..e38bdaa 100644 --- a/src/db.c +++ b/src/db.c @@ -22,9 +22,11 @@ #include #include #include +#include #include #include + #include "db_bootstrap.h" /* This constant is currently duplicated in sql/hlr.sql and must be kept in sync! */ diff --git a/src/db_hlr.c b/src/db_hlr.c index b3e3887..0f9b367 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -36,8 +37,7 @@ #include #include #include -#include -#include +#include #define LOGHLR(imsi, level, fmt, args ...) LOGP(DAUC, level, "IMSI='%s': " fmt, imsi, ## args) @@ -734,7 +734,8 @@ * -EIO on database errors. */ int db_subscr_lu(struct db_context *dbc, int64_t subscr_id, - const char *vlr_or_sgsn_number, bool is_ps) + const struct osmo_gt *vlr_name, bool is_ps, + const struct osmo_gt *via_proxy) { sqlite3_stmt *stmt; int rc, ret = 0; @@ -746,7 +747,7 @@ if (!db_bind_int64(stmt, "$subscriber_id", subscr_id)) return -EIO; - if (!db_bind_text(stmt, "$number", vlr_or_sgsn_number)) + if (!db_bind_text(stmt, "$number", (char*)vlr_name->val)) return -EIO; /* execute the statement */ @@ -873,51 +874,3 @@ return ret; } - -/*! Update nam_cs/nam_ps in the db and trigger notifications to GSUP clients. - * \param[in,out] hlr Global hlr context. - * \param[in] subscr Subscriber from a fresh db_subscr_get_by_*() call. - * \param[in] nam_val True to enable CS/PS, false to disable. - * \param[in] is_ps True to enable/disable PS, false for CS. - * \returns 0 on success, ENOEXEC if there is no need to change, a negative - * value on error. - */ -int hlr_subscr_nam(struct hlr *hlr, struct hlr_subscriber *subscr, bool nam_val, bool is_ps) -{ - int rc; - struct lu_operation *luop; - struct osmo_gsup_conn *co; - bool is_val = is_ps? subscr->nam_ps : subscr->nam_cs; - - if (is_val == nam_val) { - LOGHLR(subscr->imsi, LOGL_DEBUG, "Already has the requested value when asked to %s %s\n", - nam_val ? "enable" : "disable", is_ps ? "PS" : "CS"); - return ENOEXEC; - } - - rc = db_subscr_nam(hlr->dbc, subscr->imsi, nam_val, is_ps); - if (rc) - return rc > 0? -rc : rc; - - /* If we're disabling, send a notice out to the GSUP client that is - * responsible. Otherwise no need. */ - if (nam_val) - return 0; - - /* FIXME: only send to single SGSN where latest update for IMSI came from */ - llist_for_each_entry(co, &hlr->gs->clients, list) { - luop = lu_op_alloc_conn(co); - if (!luop) { - LOGHLR(subscr->imsi, LOGL_ERROR, - "Cannot notify GSUP client, cannot allocate lu_operation," - " for %s:%u\n", - co && co->conn && co->conn->server? co->conn->server->addr : "unset", - co && co->conn && co->conn->server? co->conn->server->port : 0); - continue; - } - luop->subscr = *subscr; - lu_op_tx_del_subscr_data(luop); - lu_op_free(luop); - } - return 0; -} diff --git a/src/gsup_router.c b/src/gsup_router.c index adf3af7..671f787 100644 --- a/src/gsup_router.c +++ b/src/gsup_router.c @@ -47,6 +47,11 @@ return NULL; } +struct osmo_gsup_conn *gsup_route_find_gt(struct osmo_gsup_server *gs, const struct osmo_gt *gt) +{ + return gsup_route_find(gs, gt->val, gt->len); +} + /*! Find a GSUP connection's route (to read the IPA address from the route). * \param[in] conn GSUP connection * \return GSUP route @@ -67,10 +72,15 @@ int gsup_route_add(struct osmo_gsup_conn *conn, const uint8_t *addr, size_t addrlen) { struct gsup_route *gr; + struct osmo_gsup_conn *exists_on_conn; /* Check if we already have a route for this address */ - if (gsup_route_find(conn->server, addr, addrlen)) - return -EEXIST; + exists_on_conn = gsup_route_find(conn->server, addr, addrlen); + if (exists_on_conn) { + if (exists_on_conn != conn) + return -EEXIST; + return 0; + } /* allocate new route and populate it */ gr = talloc_zero(conn->server, struct gsup_route); @@ -86,6 +96,11 @@ return 0; } +int gsup_route_add_gt(struct osmo_gsup_conn *conn, const struct osmo_gt *gt) +{ + return gsup_route_add(conn, gt->val, gt->len); +} + /* delete all routes for the given connection */ int gsup_route_del_conn(struct osmo_gsup_conn *conn) { @@ -95,7 +110,7 @@ llist_for_each_entry_safe(gr, gr2, &conn->server->routes, list) { if (gr->conn == conn) { LOGP(DMAIN, LOGL_INFO, "Removing GSUP route for %s (GSUP disconnect)\n", - gr->addr); + osmo_quote_str_c(OTC_SELECT, (char*)gr->addr, talloc_total_size(gr->addr))); llist_del(&gr->list); talloc_free(gr); num_deleted++; diff --git a/src/gsup_send.c b/src/gsup_send.c index 29aeaa5..d650e48 100644 --- a/src/gsup_send.c +++ b/src/gsup_send.c @@ -42,7 +42,8 @@ conn = gsup_route_find(gs, addr, addrlen); if (!conn) { - DEBUGP(DLGSUP, "Cannot find route for addr %s\n", osmo_quote_str((const char*)addr, addrlen)); + LOGP(DLGSUP, LOGL_ERROR, + "Cannot find route for addr %s\n", osmo_quote_str((const char*)addr, addrlen)); msgb_free(msg); return -ENODEV; } @@ -50,3 +51,41 @@ return osmo_gsup_conn_send(conn, msg); } +/*! Send a msgb to a given address using routing. + * \param[in] gs gsup server + * \param[in] gt IPA unit name of the client (SGSN, MSC/VLR, proxy). + * \param[in] msg message buffer + */ +int osmo_gsup_gt_send(struct osmo_gsup_server *gs, const struct osmo_gt *gt, struct msgb *msg) +{ + if (gt->val[gt->len - 1]) { + /* Is not nul terminated. But for legacy reasons we (still) require that. */ + if (gt->len >= sizeof(gt->val)) { + LOGP(DLGSUP, LOGL_ERROR, "Global title (IPA unit name) is too long: %s\n", + osmo_gt_name(gt)); + return -EINVAL; + } + struct osmo_gt gt2 = *gt; + gt2.val[gt->len] = '\0'; + gt2.len++; + return osmo_gsup_addr_send(gs, gt2.val, gt2.len, msg); + } + return osmo_gsup_addr_send(gs, gt->val, gt->len, msg); +} + +int osmo_gsup_gt_enc_send(struct osmo_gsup_server *gs, const struct osmo_gt *gt, + const struct osmo_gsup_message *gsup) +{ + struct msgb *msg = osmo_gsup_msgb_alloc("GSUP Tx"); + int rc; + rc = osmo_gsup_encode(msg, gsup); + if (rc) { + LOGP(DLGSUP, LOGL_ERROR, "IMSI-%s: Cannot encode GSUP: %s\n", + gsup->imsi, osmo_gsup_message_type_name(gsup->message_type)); + msgb_free(msg); + return -EINVAL; + } + + LOGP(DLGSUP, LOGL_DEBUG, "IMSI-%s: Tx: %s\n", gsup->imsi, osmo_gsup_message_type_name(gsup->message_type)); + return osmo_gsup_gt_send(gs, gt, msg); +} diff --git a/src/gsup_server.c b/src/gsup_server.c index ed1b285..fb162c0 100644 --- a/src/gsup_server.c +++ b/src/gsup_server.c @@ -26,10 +26,15 @@ #include #include #include +#include #include #include +#define LOG_GSUP_CONN(conn, level, fmt, args...) \ + LOGP(DLGSUP, level, "GSUP peer %s: " fmt, \ + (conn) ? osmo_gt_name(&(conn)->peer_name) : "NULL", ##args) + struct msgb *osmo_gsup_msgb_alloc(const char *label) { struct msgb *msg = msgb_alloc_headroom(1024+16, 16, label); @@ -57,6 +62,107 @@ return 0; } +static void gsup_server_send_req_response(struct osmo_gsup_req *req, struct osmo_gsup_message *response) +{ + struct osmo_gsup_server *server = req->cb_data; + struct osmo_gsup_conn *conn; + struct msgb *msg = osmo_gsup_msgb_alloc("GSUP Tx"); + int rc; + + conn = gsup_route_find_gt(server, &req->source_name); + if (!conn) { + LOG_GSUP_REQ(req, LOGL_ERROR, "GSUP client that sent this request was disconnected, cannot respond\n"); + msgb_free(msg); + return; + } + + rc = osmo_gsup_encode(msg, response); + if (rc) { + LOG_GSUP_REQ(req, LOGL_ERROR, "Unable to encode: {%s}\n", + osmo_gsup_message_name_c(OTC_SELECT, response)); + msgb_free(msg); + return; + } + + rc = osmo_gsup_conn_send(conn, msg); + if (rc) + LOG_GSUP_CONN(conn, LOGL_ERROR, "Unable to send: %s\n", osmo_gsup_message_name_c(OTC_SELECT, response)); +} + +struct osmo_gsup_req *osmo_gsup_conn_rx(struct osmo_gsup_conn *conn, struct msgb *msg) +{ + struct osmo_gsup_req *req = osmo_gsup_req_new(conn->server, &conn->peer_name, msg, gsup_server_send_req_response, + conn->server, NULL); + if (!req) + return NULL; + + if (req->via_proxy.len) { + /* The source of the GSUP message is not the immediate GSUP peer, but that peer is our proxy for that + * source. Add it to the routes for this conn (so we can route responses back). */ + if (gsup_route_add_gt(conn, &req->source_name)) { + LOG_GSUP_REQ(req, LOGL_ERROR, + "GSUP message received from %s via peer %s, but there already exists a" + " different route to this source, message is not routable\n", + osmo_gt_name(&req->source_name), + osmo_gt_name(&conn->peer_name)); + osmo_gsup_req_respond_msgt(req, OSMO_GSUP_MSGT_ROUTING_ERROR, true); + return NULL; + } + } + + return req; +} + +/* Encode an error reponse to the given GSUP message with the given cause. + * Determine the error message type via OSMO_GSUP_TO_MSGT_ERROR(gsup_orig->message_type). + * Only send an error response if the original message is a Request message. + * On failure, log an error, but don't return anything: if an error occurs while trying to report an earlier error, + * there is nothing we can do really except log the error (there are no callers that would use the return code). + */ +void osmo_gsup_conn_send_err_reply(struct osmo_gsup_conn *conn, const struct osmo_gsup_message *gsup_orig, + enum gsm48_gmm_cause cause) +{ + struct osmo_gsup_message gsup_err; + struct msgb *msg_out; + int rc; + + /* No need to answer if we couldn't parse an ERROR message type, only REQUESTs need an error reply. */ + if (!OSMO_GSUP_IS_MSGT_REQUEST(gsup_orig->message_type)) + return; + + gsup_err = (struct osmo_gsup_message){ + .cause = cause, + }; + rc = osmo_gsup_make_response(&gsup_err, gsup_orig, true, true); + if (rc) { + LOG_GSUP_CONN(conn, LOGL_ERROR, "Invalid response (rc=%d): request={%s}, response={%s}\n", + rc, osmo_gsup_message_name_c(OTC_SELECT, gsup_orig), + osmo_gsup_message_name_c(OTC_SELECT, &gsup_err)); + return; + } + + if (gsup_orig->session_state != OSMO_GSUP_SESSION_STATE_NONE) + gsup_err.session_state = OSMO_GSUP_SESSION_STATE_END; + + msg_out = osmo_gsup_msgb_alloc("GSUP ERR response"); + rc = osmo_gsup_encode(msg_out, &gsup_err); + if (rc) { + LOGP(DLGSUP, LOGL_ERROR, "%s: Unable to encode error response %s (rc=%d)\n", + osmo_quote_str(gsup_orig->imsi, -1), osmo_gsup_message_type_name(gsup_err.message_type), + rc); + return; + } + + LOGP(DLGSUP, LOGL_DEBUG, "%s: GSUP tx %s\n", + osmo_quote_str(gsup_orig->imsi, -1), osmo_gsup_message_type_name(gsup_err.message_type)); + + rc = osmo_gsup_conn_send(conn, msg_out); + if (rc) + LOGP(DLGSUP, LOGL_ERROR, "%s: Unable to send error response %s (rc=%d)\n", + osmo_quote_str(gsup_orig->imsi, -1), osmo_gsup_message_type_name(gsup_err.message_type), + rc); +} + static int osmo_gsup_conn_oap_handle(struct osmo_gsup_conn *conn, struct msgb *msg_rx) { @@ -202,10 +308,18 @@ return -EINVAL; } - gsup_route_add(clnt, addr, addr_len); + osmo_gt_set(&clnt->peer_name, addr, addr_len); + gsup_route_add_gt(clnt, &clnt->peer_name); return 0; } +static void osmo_gsup_conn_free(struct osmo_gsup_conn *conn) +{ + gsup_route_del_conn(conn); + llist_del(&conn->list); + talloc_free(conn); +} + static int osmo_gsup_server_closed_cb(struct ipa_server_conn *conn) { struct osmo_gsup_conn *clnt = (struct osmo_gsup_conn *)conn->data; @@ -213,10 +327,7 @@ LOGP(DLGSUP, LOGL_INFO, "Lost GSUP client %s:%d\n", conn->addr, conn->port); - gsup_route_del_conn(clnt); - llist_del(&clnt->list); - talloc_free(clnt); - + osmo_gsup_conn_free(clnt); return 0; } @@ -298,8 +409,7 @@ struct osmo_gsup_server * osmo_gsup_server_create(void *ctx, const char *ip_addr, uint16_t tcp_port, - osmo_gsup_read_cb_t read_cb, - struct llist_head *lu_op_lst, void *priv) + osmo_gsup_read_cb_t read_cb, void *priv) { struct osmo_gsup_server *gsups; int rc; @@ -325,8 +435,6 @@ if (rc < 0) goto failed; - gsups->luop = lu_op_lst; - return gsups; failed: @@ -367,6 +475,7 @@ return 0; } + /** * Populate a gsup message structure with an Insert Subscriber Data Message. * All required memory buffers for data pointed to by pointers in struct omso_gsup_message @@ -383,39 +492,41 @@ * \returns 0 on success, and negative on error. */ int osmo_gsup_create_insert_subscriber_data_msg(struct osmo_gsup_message *gsup, const char *imsi, const char *msisdn, - uint8_t *msisdn_enc, size_t msisdn_enc_size, - uint8_t *apn_buf, size_t apn_buf_size, - enum osmo_gsup_cn_domain cn_domain) + uint8_t *msisdn_enc, size_t msisdn_enc_size, + uint8_t *apn_buf, size_t apn_buf_size, + enum osmo_gsup_cn_domain cn_domain) { - int len; + int len; - OSMO_ASSERT(gsup); + OSMO_ASSERT(gsup); + *gsup = (struct osmo_gsup_message){ + .message_type = OSMO_GSUP_MSGT_INSERT_DATA_REQUEST, + }; - gsup->message_type = OSMO_GSUP_MSGT_INSERT_DATA_REQUEST; - osmo_strlcpy(gsup->imsi, imsi, sizeof(gsup->imsi)); + osmo_strlcpy(gsup->imsi, imsi, sizeof(gsup->imsi)); - if (msisdn_enc_size < OSMO_GSUP_MAX_CALLED_PARTY_BCD_LEN) - return -ENOSPC; + if (msisdn_enc_size < OSMO_GSUP_MAX_CALLED_PARTY_BCD_LEN) + return -ENOSPC; - OSMO_ASSERT(msisdn_enc); - len = gsm48_encode_bcd_number(msisdn_enc, msisdn_enc_size, 0, msisdn); - if (len < 1) { - LOGP(DLGSUP, LOGL_ERROR, "%s: Error: cannot encode MSISDN '%s'\n", imsi, msisdn); - return -ENOSPC; - } - gsup->msisdn_enc = msisdn_enc; - gsup->msisdn_enc_len = len; + OSMO_ASSERT(msisdn_enc); + len = gsm48_encode_bcd_number(msisdn_enc, msisdn_enc_size, 0, msisdn); + if (len < 1) { + LOGP(DLGSUP, LOGL_ERROR, "%s: Error: cannot encode MSISDN '%s'\n", imsi, msisdn); + return -ENOSPC; + } + gsup->msisdn_enc = msisdn_enc; + gsup->msisdn_enc_len = len; - #pragma message "FIXME: deal with encoding the following data: gsup.hlr_enc" + #pragma message "FIXME: deal with encoding the following data: gsup.hlr_enc" - gsup->cn_domain = cn_domain; - if (gsup->cn_domain == OSMO_GSUP_CN_DOMAIN_PS) { - OSMO_ASSERT(apn_buf_size >= APN_MAXLEN); - OSMO_ASSERT(apn_buf); - /* FIXME: PDP infos - use more fine-grained access control - instead of wildcard APN */ - osmo_gsup_configure_wildcard_apn(gsup, apn_buf, apn_buf_size); - } + gsup->cn_domain = cn_domain; + if (gsup->cn_domain == OSMO_GSUP_CN_DOMAIN_PS) { + OSMO_ASSERT(apn_buf_size >= APN_MAXLEN); + OSMO_ASSERT(apn_buf); + /* FIXME: PDP infos - use more fine-grained access control + instead of wildcard APN */ + osmo_gsup_configure_wildcard_apn(gsup, apn_buf, apn_buf_size); + } - return 0; + return 0; } diff --git a/src/gsupclient/Makefile.am b/src/gsupclient/Makefile.am index 4a449ec..111d20d 100644 --- a/src/gsupclient/Makefile.am +++ b/src/gsupclient/Makefile.am @@ -8,7 +8,11 @@ lib_LTLIBRARIES = libosmo-gsup-client.la -libosmo_gsup_client_la_SOURCES = gsup_client.c +libosmo_gsup_client_la_SOURCES = \ + global_title.c \ + gsup_client.c \ + gsup_req.c \ + $(NULL) libosmo_gsup_client_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined libosmo_gsup_client_la_LIBADD = $(TALLOC_LIBS) $(LIBOSMOCORE_LIBS) $(LIBOSMOABIS_LIBS) diff --git a/src/gsupclient/global_title.c b/src/gsupclient/global_title.c new file mode 100644 index 0000000..b1d143b --- /dev/null +++ b/src/gsupclient/global_title.c @@ -0,0 +1,73 @@ +#include +#include +#include +#include + +int osmo_gt_set(struct osmo_gt *gt, const uint8_t *val, size_t len) +{ + if (!val || !len) { + *gt = (struct osmo_gt){}; + return 0; + } + if (len > sizeof(gt->val)) + return -ENOSPC; + gt->len = len; + memcpy(gt->val, val, len); + return 0; +} + +int osmo_gt_set_str(struct osmo_gt *gt, const char *str_fmt, ...) +{ + va_list ap; + if (!str_fmt) + return osmo_gt_set(gt, NULL, 0); + + va_start(ap, str_fmt); + vsnprintf((char*)(gt->val), sizeof(gt->val), str_fmt, ap); + va_end(ap); + gt->len = strlen((char*)(gt->val))+1; + return 0; +} + +int osmo_gt_cmp(const struct osmo_gt *a, const struct osmo_gt *b) +{ + int cmp; + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + if (!a->len && !b->len) + return 0; + if (!a->len && b->len) + return -1; + if (!b->len && a->len) + return 1; + + if (a->len == b->len) + return memcmp(a->val, b->val, a->len); + else if (a->len < b->len) { + cmp = memcmp(a->val, b->val, a->len); + if (!cmp) + cmp = -1; + return cmp; + } else { + /* a->len > b->len */ + cmp = memcmp(a->val, b->val, b->len); + if (!cmp) + cmp = 1; + return cmp; + } +} + +/* Return an unquoted string, not including the terminating zero. Used for writing VTY config. */ +const char *osmo_gt_name(const struct osmo_gt *gt) +{ + size_t len = gt->len; + if (!len) + return ""; + if (gt->val[len-1] == '\0') + len--; + return osmo_escape_str_c(OTC_SELECT, (char*)gt->val, len); +} diff --git a/src/gsupclient/gsup_client.c b/src/gsupclient/gsup_client.c index 814d5a2..52985c9 100644 --- a/src/gsupclient/gsup_client.c +++ b/src/gsupclient/gsup_client.c @@ -291,14 +291,15 @@ if (rc != 0) goto failed; - gsupc->link = ipa_client_conn_create(gsupc, - /* no e1inp */ NULL, - 0, - ip_addr, tcp_port, - gsup_client_updown_cb, - gsup_client_read_cb, - /* default write_cb */ NULL, - gsupc); + gsupc->link = ipa_client_conn_create2(gsupc, + /* no e1inp */ NULL, + 0, + /* no specific local IP:port */ NULL, 0, + ip_addr, tcp_port, + gsup_client_updown_cb, + gsup_client_read_cb, + /* default write_cb */ NULL, + gsupc); if (!gsupc->link) goto failed; diff --git a/src/gsupclient/gsup_req.c b/src/gsupclient/gsup_req.c new file mode 100644 index 0000000..1f3aab1 --- /dev/null +++ b/src/gsupclient/gsup_req.c @@ -0,0 +1,152 @@ + +#include + +#include +#include + +#include + +/*! Create a new osmo_gsup_req record, decode GSUP and add to a provided list of requests. + * This function takes ownership of the msgb, which will, on success, be owned by the returned osmo_gsup_req instance + * until osmo_gsup_req_free(). If a decoding error occurs, send an error response immediately, and return NULL. + * + * When this function returns, the original sender is found in req->source_name. If this is not the immediate peer name, + * then req->via_proxy is set to the immediate peer, and it is the responsibility of the caller to add req->source_name + * to the GSUP routes that are serviced by req->via_proxy (usually not relevant for clients with a single GSUP conn). + * + * Note: osmo_gsup_req API makes use of OTC_SELECT to allocate volatile buffers for logging. Use of + * osmo_select_main_ctx() is mandatory when using osmo_gsup_req. + * + * \param[in] ctx Talloc context for allocation of the new request. + * \param[in] from_peer The IPA unit name of the immediate GSUP peer from which this msgb was received. + * \param[in] msg The GSUP message buffer. + * \param[in] send_response_cb User specific method to send a GSUP response message, invoked upon + * osmo_gsup_req_respond*() functions. + * \param[inout] cb_data Context data to be used freely by the caller. + * \param[inout] add_to_list List to which to append this request, or NULL for no list. + * \return a newly allocated osmo_gsup_req, or NULL on error. + */ +struct osmo_gsup_req *osmo_gsup_req_new(void *ctx, const struct osmo_gt *from_peer, struct msgb *msg, + osmo_gsup_req_send_response_t send_response_cb, void *cb_data, + struct llist_head *add_to_list) +{ + static unsigned int next_req_nr = 1; + struct osmo_gsup_req *req; + int rc; + + if (!msgb_l2(msg) || !msgb_l2len(msg)) { + LOGP(DLGSUP, LOGL_ERROR, "Rx GSUP from %s: missing or empty L2 data\n", + osmo_gt_name(from_peer)); + msgb_free(msg); + return NULL; + } + + req = talloc_zero(ctx, struct osmo_gsup_req); + OSMO_ASSERT(req); + /* Note: req->gsup is declared const, so that the incoming message cannot be modified by handlers. */ + req->nr = next_req_nr++; + req->msg = msg; + req->send_response_cb = send_response_cb; + req->cb_data = cb_data; + if (from_peer) + req->source_name = *from_peer; + rc = osmo_gsup_decode(msgb_l2(req->msg), msgb_l2len(req->msg), (struct osmo_gsup_message*)&req->gsup); + if (rc < 0) { + LOGP(DLGSUP, LOGL_ERROR, "Rx GSUP from %s: cannot decode (rc=%d)\n", osmo_gt_name(from_peer), rc); + osmo_gsup_req_free(req); + return NULL; + } + + LOG_GSUP_REQ(req, LOGL_DEBUG, "new request: {%s}\n", osmo_gsup_message_name_c(OTC_SELECT, &req->gsup)); + + if (req->gsup.source_name_len) { + if (osmo_gt_set(&req->source_name, req->gsup.source_name, req->gsup.source_name_len)) { + LOGP(DLGSUP, LOGL_ERROR, + "Rx GSUP from %s: failed to decode source_name, message is not routable\n", + osmo_gt_name(from_peer)); + osmo_gsup_req_respond_msgt(req, OSMO_GSUP_MSGT_ROUTING_ERROR, true); + return NULL; + } + + /* The source of the GSUP message is not the immediate GSUP peer; the peer is our proxy for that source. + */ + if (osmo_gt_cmp(&req->source_name, from_peer)) + req->via_proxy = *from_peer; + } + + if (!osmo_imsi_str_valid(req->gsup.imsi)) { + osmo_gsup_req_respond_err(req, GMM_CAUSE_INV_MAND_INFO, "invalid IMSI: %s", + osmo_quote_str(req->gsup.imsi, -1)); + return NULL; + } + + if (add_to_list) + llist_add_tail(&req->entry, add_to_list); + return req; +} + +void osmo_gsup_req_free(struct osmo_gsup_req *req) +{ + LOG_GSUP_REQ(req, LOGL_DEBUG, "free\n"); + if (req->msg) + msgb_free(req->msg); + if (req->entry.prev) + llist_del(&req->entry); + talloc_free(req); +} + +int _osmo_gsup_req_respond(struct osmo_gsup_req *req, struct osmo_gsup_message *response, + bool error, bool final_response, const char *file, int line) +{ + int rc; + + rc = osmo_gsup_make_response(response, &req->gsup, error, final_response); + if (rc) { + LOG_GSUP_REQ_SRC(req, LOGL_ERROR, file, line, "Invalid response (rc=%d): {%s}\n", + rc, osmo_gsup_message_name_c(OTC_SELECT, response)); + rc = -EINVAL; + goto exit_cleanup; + } + + if (!req->send_response_cb) { + LOG_GSUP_REQ_SRC(req, LOGL_ERROR, file, line, "No send_response_cb set, cannot send: {%s}\n", + osmo_gsup_message_name_c(OTC_SELECT, response)); + rc = -EINVAL; + goto exit_cleanup; + } + + LOG_GSUP_REQ_SRC(req, LOGL_DEBUG, file, line, "Tx response: {%s}\n", + osmo_gsup_message_name_c(OTC_SELECT, response)); + req->send_response_cb(req, response); + +exit_cleanup: + if (final_response) + osmo_gsup_req_free(req); + return rc; +} + +int _osmo_gsup_req_respond_msgt(struct osmo_gsup_req *req, enum osmo_gsup_message_type message_type, + bool final_response, const char *file, int line) +{ + struct osmo_gsup_message response = { + .message_type = message_type, + }; + return _osmo_gsup_req_respond(req, &response, OSMO_GSUP_IS_MSGT_ERROR(message_type), final_response, + file, line); +} + +void _osmo_gsup_req_respond_err(struct osmo_gsup_req *req, enum gsm48_gmm_cause cause, + const char *file, int line) +{ + struct osmo_gsup_message response = { + .cause = cause, + }; + + /* No need to answer if we couldn't parse an ERROR message type, only REQUESTs need an error reply. */ + if (!OSMO_GSUP_IS_MSGT_REQUEST(req->gsup.message_type)) { + osmo_gsup_req_free(req); + return; + } + + osmo_gsup_req_respond(req, &response, true, true); +} diff --git a/src/hlr.c b/src/hlr.c index 763ee66..d1647a0 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -35,8 +35,9 @@ #include #include #include -#include +#include +#include #include #include #include @@ -44,14 +45,20 @@ #include #include #include -#include #include #include +#include struct hlr *g_hlr; static void *hlr_ctx = NULL; static int quit = 0; +struct osmo_tdef g_hlr_tdefs[] = { + /* 4222 is also the OSMO_GSUP_PORT */ + { .T = -4222, .default_val = 30, .desc = "GSUP Update Location timeout" }, + {} +}; + /* Trigger 'Insert Subscriber Data' messages to all connected GSUP clients. * * \param[in] subscr A subscriber we have new data to send for. @@ -69,6 +76,8 @@ return; } + /* FIXME: send only to current vlr_number and sgsn_number */ + llist_for_each_entry(co, &g_hlr->gs->clients, list) { struct osmo_gsup_message gsup = { }; uint8_t msisdn_enc[OSMO_GSUP_MAX_CALLED_PARTY_BCD_LEN]; @@ -222,136 +231,92 @@ return 0; } +/*! Update nam_cs/nam_ps in the db and trigger notifications to GSUP clients. + * \param[in,out] hlr Global hlr context. + * \param[in] subscr Subscriber from a fresh db_subscr_get_by_*() call. + * \param[in] nam_val True to enable CS/PS, false to disable. + * \param[in] is_ps True to enable/disable PS, false for CS. + * \returns 0 on success, ENOEXEC if there is no need to change, a negative + * value on error. + */ +int hlr_subscr_nam(struct hlr *hlr, struct hlr_subscriber *subscr, bool nam_val, bool is_ps) +{ + int rc; + bool is_val = is_ps? subscr->nam_ps : subscr->nam_cs; + struct osmo_gt vlr_name; + struct osmo_gsup_message gsup_del_data = { + .message_type = OSMO_GSUP_MSGT_DELETE_DATA_REQUEST, + }; + OSMO_STRLCPY_ARRAY(gsup_del_data.imsi, subscr->imsi); + + if (is_val == nam_val) { + LOGP(DAUC, LOGL_DEBUG, "IMSI-%s: Already has the requested value when asked to %s %s\n", + subscr->imsi, nam_val ? "enable" : "disable", is_ps ? "PS" : "CS"); + return ENOEXEC; + } + + rc = db_subscr_nam(hlr->dbc, subscr->imsi, nam_val, is_ps); + if (rc) + return rc > 0? -rc : rc; + + /* If we're disabling, send a notice out to the GSUP client that is + * responsible. Otherwise no need. */ + if (nam_val) + return 0; + + if (subscr->vlr_number && osmo_gt_set_str(&vlr_name, subscr->vlr_number)) + osmo_gsup_gt_enc_send(g_hlr->gs, &vlr_name, &gsup_del_data); + if (subscr->sgsn_number && osmo_gt_set_str(&vlr_name, subscr->sgsn_number)) + osmo_gsup_gt_enc_send(g_hlr->gs, &vlr_name, &gsup_del_data); + return 0; +} + /*********************************************************************** * Send Auth Info handling ***********************************************************************/ /* process an incoming SAI request */ -static int rx_send_auth_info(struct osmo_gsup_conn *conn, - const struct osmo_gsup_message *gsup, - struct db_context *dbc) +static int rx_send_auth_info(unsigned int auc_3g_ind, struct osmo_gsup_req *req) { - struct osmo_gsup_message gsup_out; - struct msgb *msg_out; + struct osmo_gsup_message gsup_out = { + .message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT, + }; int rc; - subscr_create_on_demand(gsup->imsi); + subscr_create_on_demand(req->gsup.imsi); - /* initialize return message structure */ - memset(&gsup_out, 0, sizeof(gsup_out)); - memcpy(&gsup_out.imsi, &gsup->imsi, sizeof(gsup_out.imsi)); - - rc = db_get_auc(dbc, gsup->imsi, conn->auc_3g_ind, + rc = db_get_auc(g_hlr->dbc, req->gsup.imsi, auc_3g_ind, gsup_out.auth_vectors, ARRAY_SIZE(gsup_out.auth_vectors), - gsup->rand, gsup->auts); + req->gsup.rand, req->gsup.auts); if (rc <= 0) { - 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: - 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; + osmo_gsup_req_respond_err(req, GMM_CAUSE_IMSI_UNKNOWN, + "IMSI known, but has no auth data;" + " Returning slightly inaccurate cause 'IMSI Unknown' via GSUP"); + return rc; case -ENOENT: - LOGP(DAUC, LOGL_NOTICE, "%s: IMSI not known\n", gsup->imsi); - gsup_out.cause = GMM_CAUSE_IMSI_UNKNOWN; - break; + osmo_gsup_req_respond_err(req, GMM_CAUSE_IMSI_UNKNOWN, "IMSI unknown"); + return rc; default: - LOGP(DAUC, LOGL_ERROR, "%s: failure to look up IMSI in db\n", gsup->imsi); - gsup_out.cause = GMM_CAUSE_NET_FAIL; - break; + osmo_gsup_req_respond_err(req, GMM_CAUSE_NET_FAIL, "failure to look up IMSI in db"); + return rc; } - } else { - gsup_out.message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT; - gsup_out.num_auth_vectors = rc; } + gsup_out.num_auth_vectors = rc; - msg_out = osmo_gsup_msgb_alloc("GSUP AUC response"); - osmo_gsup_encode(msg_out, &gsup_out); - return osmo_gsup_conn_send(conn, msg_out); + osmo_gsup_req_respond(req, &gsup_out, false, true); + return 0; } -/*********************************************************************** - * LU Operation State / Structure - ***********************************************************************/ - -static LLIST_HEAD(g_lu_ops); - -/*! Receive Cancel Location Result from old VLR/SGSN */ -void lu_op_rx_cancel_old_ack(struct lu_operation *luop, - const struct osmo_gsup_message *gsup) +/*! Receive Update Location Request, creates new lu_operation */ +static int rx_upd_loc_req(struct osmo_gsup_conn *conn, struct osmo_gsup_req *req) { - OSMO_ASSERT(luop->state == LU_S_CANCEL_SENT); - /* FIXME: Check for spoofing */ - - osmo_timer_del(&luop->timer); - - /* FIXME */ - - lu_op_tx_insert_subscr_data(luop); -} - -/*! Receive Insert Subscriber Data Result from new VLR/SGSN */ -static void lu_op_rx_insert_subscr_data_ack(struct lu_operation *luop, - const struct osmo_gsup_message *gsup) -{ - OSMO_ASSERT(luop->state == LU_S_ISD_SENT); - /* FIXME: Check for spoofing */ - - osmo_timer_del(&luop->timer); - - /* Subscriber_Present_HLR */ - /* CS only: Check_SS_required? -> MAP-FW-CHECK_SS_IND.req */ - - /* Send final ACK towards inquiring VLR/SGSN */ - lu_op_tx_ack(luop); -} - -/*! Receive GSUP message for given \ref lu_operation */ -void lu_op_rx_gsup(struct lu_operation *luop, - const struct osmo_gsup_message *gsup) -{ - switch (gsup->message_type) { - case OSMO_GSUP_MSGT_INSERT_DATA_ERROR: - /* FIXME */ - break; - case OSMO_GSUP_MSGT_INSERT_DATA_RESULT: - lu_op_rx_insert_subscr_data_ack(luop, gsup); - break; - case OSMO_GSUP_MSGT_LOCATION_CANCEL_ERROR: - /* FIXME */ - break; - case OSMO_GSUP_MSGT_LOCATION_CANCEL_RESULT: - lu_op_rx_cancel_old_ack(luop, gsup); - break; - default: - LOGP(DMAIN, LOGL_ERROR, "Unhandled GSUP msg_type 0x%02x\n", - gsup->message_type); - break; - } -} - -/*! Receive Update Location Request, creates new \ref lu_operation */ -static int rx_upd_loc_req(struct osmo_gsup_conn *conn, - const struct osmo_gsup_message *gsup) -{ - struct hlr_subscriber *subscr; - struct lu_operation *luop = lu_op_alloc_conn(conn); - if (!luop) { - LOGP(DMAIN, LOGL_ERROR, "LU REQ from conn without addr?\n"); - return -EINVAL; - } - - subscr = &luop->subscr; - - lu_op_statechg(luop, LU_S_LU_RECEIVED); - - switch (gsup->cn_domain) { + switch (req->gsup.cn_domain) { case OSMO_GSUP_CN_DOMAIN_CS: conn->supports_cs = true; break; @@ -362,144 +327,64 @@ * a request, the PS Domain is assumed." */ case OSMO_GSUP_CN_DOMAIN_PS: conn->supports_ps = true; - luop->is_ps = true; break; } - llist_add(&luop->list, &g_lu_ops); - subscr_create_on_demand(gsup->imsi); + subscr_create_on_demand(req->gsup.imsi); - /* Roughly follwing "Process Update_Location_HLR" of TS 09.02 */ - - /* 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 */ - osmo_strlcpy(luop->subscr.imsi, gsup->imsi, sizeof(luop->subscr.imsi)); - lu_op_tx_error(luop, GMM_CAUSE_IMSI_UNKNOWN); - return 0; - } - - /* Check if subscriber is generally permitted on CS or PS - * service (as requested) */ - if (!luop->is_ps && !luop->subscr.nam_cs) { - lu_op_tx_error(luop, GMM_CAUSE_PLMN_NOTALLOWED); - return 0; - } else if (luop->is_ps && !luop->subscr.nam_ps) { - lu_op_tx_error(luop, GMM_CAUSE_GPRS_NOTALLOWED); - return 0; - } - - /* TODO: Set subscriber tracing = deactive in VLR/SGSN */ - -#if 0 - /* Cancel in old VLR/SGSN, if new VLR/SGSN differs from old */ - if (luop->is_ps == false && - strcmp(subscr->vlr_number, vlr_number)) { - lu_op_tx_cancel_old(luop); - } else if (luop->is_ps == true && - strcmp(subscr->sgsn_number, sgsn_number)) { - lu_op_tx_cancel_old(luop); - } else -#endif - - /* Store the VLR / SGSN number with the subscriber, so we know where it was last seen. */ - LOGP(DAUC, LOGL_DEBUG, "IMSI='%s': storing %s = %s\n", - subscr->imsi, luop->is_ps ? "SGSN number" : "VLR number", - osmo_quote_str((const char*)luop->peer, -1)); - if (db_subscr_lu(g_hlr->dbc, subscr->id, (const char *)luop->peer, luop->is_ps)) - LOGP(DAUC, LOGL_ERROR, "IMSI='%s': Cannot update %s in the database\n", - subscr->imsi, luop->is_ps ? "SGSN number" : "VLR number"); - - /* TODO: Subscriber allowed to roam in PLMN? */ - /* TODO: Update RoutingInfo */ - /* TODO: Reset Flag MS Purged (cs/ps) */ - /* TODO: Control_Tracing_HLR / Control_Tracing_HLR_with_SGSN */ - lu_op_tx_insert_subscr_data(luop); - + lu_rx_gsup(req); return 0; } -static int rx_purge_ms_req(struct osmo_gsup_conn *conn, - const struct osmo_gsup_message *gsup) +static int rx_purge_ms_req(struct osmo_gsup_req *req) { - struct osmo_gsup_message gsup_reply = {0}; - struct msgb *msg_out; - bool is_ps = false; + bool is_ps = (req->gsup.cn_domain != OSMO_GSUP_CN_DOMAIN_CS); int rc; - LOGP(DAUC, LOGL_INFO, "%s: Purge MS (%s)\n", gsup->imsi, - is_ps ? "PS" : "CS"); - - memcpy(gsup_reply.imsi, gsup->imsi, sizeof(gsup_reply.imsi)); - - if (gsup->cn_domain == OSMO_GSUP_CN_DOMAIN_PS) - is_ps = true; + LOG_GSUP_REQ_CAT(req, DAUC, LOGL_INFO, "Purge MS (%s)\n", is_ps ? "PS" : "CS"); /* FIXME: check if the VLR that sends the purge is the same that * we have on record. Only update if yes */ /* Perform the actual update of the DB */ - rc = db_subscr_purge(g_hlr->dbc, gsup->imsi, true, is_ps); + rc = db_subscr_purge(g_hlr->dbc, req->gsup.imsi, true, is_ps); if (rc == 0) - gsup_reply.message_type = OSMO_GSUP_MSGT_PURGE_MS_RESULT; - else if (rc == -ENOENT) { - gsup_reply.message_type = OSMO_GSUP_MSGT_PURGE_MS_ERROR; - gsup_reply.cause = GMM_CAUSE_IMSI_UNKNOWN; - } else { - gsup_reply.message_type = OSMO_GSUP_MSGT_PURGE_MS_ERROR; - gsup_reply.cause = GMM_CAUSE_NET_FAIL; - } - - msg_out = osmo_gsup_msgb_alloc("GSUP AUC response"); - osmo_gsup_encode(msg_out, &gsup_reply); - return osmo_gsup_conn_send(conn, msg_out); + osmo_gsup_req_respond_msgt(req, OSMO_GSUP_MSGT_PURGE_MS_RESULT, true); + else if (rc == -ENOENT) + osmo_gsup_req_respond_err(req, GMM_CAUSE_IMSI_UNKNOWN, "IMSI unknown"); + else + osmo_gsup_req_respond_err(req, GMM_CAUSE_NET_FAIL, "db error"); + return rc; } -static int gsup_send_err_reply(struct osmo_gsup_conn *conn, const char *imsi, - enum osmo_gsup_message_type type_in, uint8_t err_cause) +static int rx_check_imei_req(struct osmo_gsup_req *req) { - int type_err = OSMO_GSUP_TO_MSGT_ERROR(type_in); - struct osmo_gsup_message gsup_reply = {0}; - struct msgb *msg_out; - - OSMO_STRLCPY_ARRAY(gsup_reply.imsi, imsi); - gsup_reply.message_type = type_err; - gsup_reply.cause = err_cause; - msg_out = osmo_gsup_msgb_alloc("GSUP ERR response"); - OSMO_ASSERT(msg_out); - osmo_gsup_encode(msg_out, &gsup_reply); - LOGP(DMAIN, LOGL_NOTICE, "Tx %s\n", osmo_gsup_message_type_name(type_err)); - return osmo_gsup_conn_send(conn, msg_out); -} - -static int rx_check_imei_req(struct osmo_gsup_conn *conn, const struct osmo_gsup_message *gsup) -{ - struct osmo_gsup_message gsup_reply = {0}; - struct msgb *msg_out; + struct osmo_gsup_message gsup_reply; char imei[GSM23003_IMEI_NUM_DIGITS_NO_CHK+1] = {0}; + const struct osmo_gsup_message *gsup = &req->gsup; int rc; /* Require IMEI */ if (!gsup->imei_enc) { - LOGP(DMAIN, LOGL_ERROR, "%s: missing IMEI\n", gsup->imsi); - gsup_send_err_reply(conn, gsup->imsi, gsup->message_type, GMM_CAUSE_INV_MAND_INFO); + osmo_gsup_req_respond_err(req, GMM_CAUSE_INV_MAND_INFO, "missing IMEI"); return -1; } /* Decode IMEI (fails if IMEI is too long) */ rc = gsm48_decode_bcd_number2(imei, sizeof(imei), gsup->imei_enc, gsup->imei_enc_len, 0); if (rc < 0) { - LOGP(DMAIN, LOGL_ERROR, "%s: failed to decode IMEI (rc: %i)\n", gsup->imsi, rc); - gsup_send_err_reply(conn, gsup->imsi, gsup->message_type, GMM_CAUSE_INV_MAND_INFO); + osmo_gsup_req_respond_err(req, GMM_CAUSE_INV_MAND_INFO, + "failed to decode IMEI %s (rc: %d)", + osmo_hexdump_c(OTC_SELECT, gsup->imei_enc, gsup->imei_enc_len), + rc); return -1; } /* Check if IMEI is too short */ - if (strlen(imei) != GSM23003_IMEI_NUM_DIGITS_NO_CHK) { - LOGP(DMAIN, LOGL_ERROR, "%s: wrong encoded IMEI length (IMEI: '%s', %lu, %i)\n", gsup->imsi, imei, - strlen(imei), GSM23003_IMEI_NUM_DIGITS_NO_CHK); - gsup_send_err_reply(conn, gsup->imsi, gsup->message_type, GMM_CAUSE_INV_MAND_INFO); + if (!osmo_imei_str_valid(imei, false)) { + osmo_gsup_req_respond_err(req, GMM_CAUSE_INV_MAND_INFO, + "invalid IMEI: %s", osmo_quote_str_c(OTC_SELECT, imei, -1)); return -1; } @@ -509,7 +394,7 @@ if (g_hlr->store_imei) { LOGP(DAUC, LOGL_DEBUG, "IMSI='%s': storing IMEI = %s\n", gsup->imsi, imei); if (db_subscr_update_imei_by_imsi(g_hlr->dbc, gsup->imsi, imei) < 0) { - gsup_send_err_reply(conn, gsup->imsi, gsup->message_type, GMM_CAUSE_INV_MAND_INFO); + osmo_gsup_req_respond_err(req, GMM_CAUSE_INV_MAND_INFO, "Failed to store IMEI in HLR db"); return -1; } } else { @@ -517,176 +402,135 @@ LOGP(DMAIN, LOGL_INFO, "IMSI='%s': has IMEI = %s (consider setting 'store-imei')\n", gsup->imsi, imei); struct hlr_subscriber subscr; if (db_subscr_get_by_imsi(g_hlr->dbc, gsup->imsi, &subscr) < 0) { - gsup_send_err_reply(conn, gsup->imsi, gsup->message_type, GMM_CAUSE_INV_MAND_INFO); + osmo_gsup_req_respond_err(req, GMM_CAUSE_INV_MAND_INFO, "IMSI unknown"); return -1; } } /* Accept all IMEIs */ - gsup_reply.imei_result = OSMO_GSUP_IMEI_RESULT_ACK; - gsup_reply.message_type = OSMO_GSUP_MSGT_CHECK_IMEI_RESULT; - msg_out = osmo_gsup_msgb_alloc("GSUP Check_IMEI response"); - memcpy(gsup_reply.imsi, gsup->imsi, sizeof(gsup_reply.imsi)); - osmo_gsup_encode(msg_out, &gsup_reply); - return osmo_gsup_conn_send(conn, msg_out); + gsup_reply = (struct osmo_gsup_message){ + .message_type = OSMO_GSUP_MSGT_CHECK_IMEI_RESULT, + .imei_result = OSMO_GSUP_IMEI_RESULT_ACK, + }; + return osmo_gsup_req_respond(req, &gsup_reply, false, true); } static char namebuf[255]; #define LOGP_GSUP_FWD(gsup, level, fmt, args ...) \ LOGP(DMAIN, level, "Forward %s (class=%s, IMSI=%s, %s->%s): " fmt, \ - osmo_gsup_message_type_name(gsup->message_type), \ - osmo_gsup_message_class_name(gsup->message_class), \ - gsup->imsi, \ - osmo_quote_str((const char *)gsup->source_name, gsup->source_name_len), \ - osmo_quote_str_buf2(namebuf, sizeof(namebuf), (const char *)gsup->destination_name, gsup->destination_name_len), \ + osmo_gsup_message_type_name((gsup)->message_type), \ + osmo_gsup_message_class_name((gsup)->message_class), \ + (gsup)->imsi, \ + osmo_quote_str((const char *)(gsup)->source_name, (gsup)->source_name_len), \ + osmo_quote_str_buf2(namebuf, sizeof(namebuf), (const char *)(gsup)->destination_name, (gsup)->destination_name_len), \ ## args) -static int read_cb_forward(struct osmo_gsup_conn *conn, struct msgb *msg, const struct osmo_gsup_message *gsup) +static int read_cb_forward(struct osmo_gsup_req *req) { int ret = -EINVAL; - struct osmo_gsup_message *gsup_err; - - /* FIXME: it would be better if the msgb never were deallocated immediately by osmo_gsup_addr_send(), which a - * select-loop volatile talloc context could facilitate. Then we would still be able to access gsup-> members - * (pointing into the msgb) even after sending failed, and we wouldn't need to copy this data before sending: */ - /* Prepare error message (before IEs get deallocated) */ - gsup_err = talloc_zero(hlr_ctx, struct osmo_gsup_message); - OSMO_STRLCPY_ARRAY(gsup_err->imsi, gsup->imsi); - gsup_err->message_class = gsup->message_class; - gsup_err->destination_name = talloc_memdup(gsup_err, gsup->destination_name, gsup->destination_name_len); - gsup_err->destination_name_len = gsup->destination_name_len; - gsup_err->message_type = gsup->message_type; - gsup_err->session_state = gsup->session_state; - gsup_err->session_id = gsup->session_id; - gsup_err->source_name = talloc_memdup(gsup_err, gsup->source_name, gsup->source_name_len); - gsup_err->source_name_len = gsup->source_name_len; + const struct osmo_gsup_message *gsup = &req->gsup; + struct osmo_gsup_message gsup_err; + struct msgb *forward_msg; + struct osmo_gt destination_name; /* Check for routing IEs */ - if (!gsup->source_name || !gsup->source_name_len || !gsup->destination_name || !gsup->destination_name_len) { - LOGP_GSUP_FWD(gsup, LOGL_ERROR, "missing routing IEs\n"); - goto end; + if (!req->gsup.source_name[0] || !req->gsup.source_name_len + || !req->gsup.destination_name[0] || !req->gsup.destination_name_len) { + LOGP_GSUP_FWD(&req->gsup, LOGL_ERROR, "missing routing IEs\n"); + goto routing_error; } - /* Verify source name (e.g. "MSC-00-00-00-00-00-00") */ - if (gsup_route_find(conn->server, gsup->source_name, gsup->source_name_len) != conn) { - LOGP_GSUP_FWD(gsup, LOGL_ERROR, "mismatching source name\n"); - goto end; + if (osmo_gt_set(&destination_name, req->gsup.destination_name, req->gsup.destination_name_len)) { + LOGP_GSUP_FWD(&req->gsup, LOGL_ERROR, "invalid destination name\n"); + goto routing_error; } - /* Forward message without re-encoding (so we don't remove unknown IEs) */ - LOGP_GSUP_FWD(gsup, LOGL_INFO, "checks passed, forwarding\n"); + LOG_GSUP_REQ(req, LOGL_INFO, "Forwarding to %s\n", osmo_gt_name(&destination_name)); - /* Remove incoming IPA header to be able to prepend an outgoing IPA header */ - msgb_pull_to_l2(msg); - ret = osmo_gsup_addr_send(g_hlr->gs, gsup->destination_name, gsup->destination_name_len, msg); - /* AT THIS POINT, THE msg MAY BE DEALLOCATED and the data like gsup->imsi, gsup->source_name etc may all be - * invalid and cause segfaults. */ - msg = NULL; - gsup = NULL; - if (ret == -ENODEV) - LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "destination not connected\n"); - else if (ret) - LOGP_GSUP_FWD(gsup_err, LOGL_ERROR, "unknown error %i\n", ret); - -end: - /* Send error back to source */ + /* Forward message without re-encoding (so we don't remove unknown IEs). + * Copy GSUP part to forward, removing incoming IPA header to be able to prepend an outgoing IPA header */ + forward_msg = osmo_gsup_msgb_alloc("GSUP forward"); + forward_msg->l2h = msgb_put(forward_msg, msgb_l2len(req->msg)); + memcpy(forward_msg->l2h, msgb_l2(req->msg), msgb_l2len(req->msg)); + ret = osmo_gsup_gt_send(g_hlr->gs, &destination_name, forward_msg); if (ret) { - struct msgb *msg_err = osmo_gsup_msgb_alloc("GSUP forward ERR response"); - OSMO_ASSERT(msg_err); - gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR; - osmo_gsup_encode(msg_err, gsup_err); - LOGP_GSUP_FWD(gsup_err, LOGL_NOTICE, "Tx %s\n", osmo_gsup_message_type_name(gsup_err->message_type)); - osmo_gsup_conn_send(conn, msg_err); + LOGP_GSUP_FWD(gsup, LOGL_ERROR, "%s (rc=%d)\n", + ret == -ENODEV ? "destination not connected" : "unknown error", + ret); + goto routing_error; } - talloc_free(gsup_err); - if (msg) - msgb_free(msg); - return ret; + osmo_gsup_req_free(req); + return 0; + +routing_error: + gsup_err = (struct osmo_gsup_message){ + .message_type = OSMO_GSUP_MSGT_ROUTING_ERROR, + .source_name = gsup->destination_name, + .source_name_len = gsup->destination_name_len, + }; + osmo_gsup_req_respond(req, &gsup_err, true, true); + return -1; } static int read_cb(struct osmo_gsup_conn *conn, struct msgb *msg) { - static struct osmo_gsup_message gsup; - int rc; - - if (!msgb_l2(msg) || !msgb_l2len(msg)) { - LOGP(DMAIN, LOGL_ERROR, "missing or empty L2 data\n"); - msgb_free(msg); + struct osmo_gsup_req *req = osmo_gsup_conn_rx(conn, msg); + if (!req) return -EINVAL; + + /* If the GSUP recipient is other than this HLR, forward. */ + if (req->gsup.destination_name_len) { + struct osmo_gt destination_name; + struct osmo_gt my_name; + osmo_gt_set_str(&my_name, g_hlr->gsup_unit_name.serno); + if (!osmo_gt_set(&destination_name, req->gsup.destination_name, req->gsup.destination_name_len) + && osmo_gt_cmp(&destination_name, &my_name)) { + return read_cb_forward(req); + } } - rc = osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup); - if (rc < 0) { - LOGP(DMAIN, LOGL_ERROR, "error in GSUP decode: %d\n", rc); - msgb_free(msg); - return rc; - } - - /* 3GPP TS 23.003 Section 2.2 clearly states that an IMSI with less than 5 - * digits is impossible. Even 5 digits is a highly theoretical case */ - if (strlen(gsup.imsi) < 5) { /* TODO: move this check to libosmogsm/gsup.c? */ - LOGP(DMAIN, LOGL_ERROR, "IMSI too short: %s\n", osmo_quote_str(gsup.imsi, -1)); - gsup_send_err_reply(conn, gsup.imsi, gsup.message_type, GMM_CAUSE_INV_MAND_INFO); - msgb_free(msg); - return -EINVAL; - } - - if (gsup.destination_name_len) - return read_cb_forward(conn, msg, &gsup); - - switch (gsup.message_type) { + switch (req->gsup.message_type) { /* requests sent to us */ case OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: - rx_send_auth_info(conn, &gsup, g_hlr->dbc); + rx_send_auth_info(conn->auc_3g_ind, req); break; case OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: - rx_upd_loc_req(conn, &gsup); + rx_upd_loc_req(conn, req); break; case OSMO_GSUP_MSGT_PURGE_MS_REQUEST: - rx_purge_ms_req(conn, &gsup); + rx_purge_ms_req(req); break; /* responses to requests sent by us */ case OSMO_GSUP_MSGT_DELETE_DATA_ERROR: - LOGP(DMAIN, LOGL_ERROR, "Error while deleting subscriber data " - "for IMSI %s\n", gsup.imsi); + LOG_GSUP_REQ(req, LOGL_ERROR, "Peer responds with: Error while deleting subscriber data\n"); + osmo_gsup_req_free(req); break; case OSMO_GSUP_MSGT_DELETE_DATA_RESULT: - LOGP(DMAIN, LOGL_ERROR, "Deleting subscriber data for IMSI %s\n", - gsup.imsi); + LOG_GSUP_REQ(req, LOGL_DEBUG, "Peer responds with: Subscriber data deleted\n"); + osmo_gsup_req_free(req); break; case OSMO_GSUP_MSGT_PROC_SS_REQUEST: case OSMO_GSUP_MSGT_PROC_SS_RESULT: - rx_proc_ss_req(conn, &gsup); + rx_proc_ss_req(req); break; case OSMO_GSUP_MSGT_PROC_SS_ERROR: - rx_proc_ss_error(conn, &gsup); + rx_proc_ss_error(req); break; case OSMO_GSUP_MSGT_INSERT_DATA_ERROR: case OSMO_GSUP_MSGT_INSERT_DATA_RESULT: case OSMO_GSUP_MSGT_LOCATION_CANCEL_ERROR: case OSMO_GSUP_MSGT_LOCATION_CANCEL_RESULT: - { - struct lu_operation *luop = lu_op_by_imsi(gsup.imsi, - &g_lu_ops); - if (!luop) { - LOGP(DMAIN, LOGL_ERROR, "GSUP message %s for " - "unknown IMSI %s\n", - osmo_gsup_message_type_name(gsup.message_type), - gsup.imsi); - break; - } - lu_op_rx_gsup(luop, &gsup); - } + lu_rx_gsup(req); break; case OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST: - rx_check_imei_req(conn, &gsup); + rx_check_imei_req(req); break; default: LOGP(DMAIN, LOGL_DEBUG, "Unhandled GSUP message type %s\n", - osmo_gsup_message_type_name(gsup.message_type)); + osmo_gsup_message_type_name(req->gsup.message_type)); + osmo_gsup_req_free(req); break; } - msgb_free(msg); return 0; } @@ -897,7 +741,7 @@ g_hlr->gs = osmo_gsup_server_create(hlr_ctx, g_hlr->gsup_bind_addr, OSMO_GSUP_PORT, - read_cb, &g_lu_ops, g_hlr); + read_cb, g_hlr); if (!g_hlr->gs) { LOGP(DMAIN, LOGL_FATAL, "Error starting GSUP server\n"); exit(1); @@ -920,7 +764,8 @@ } while (!quit) - osmo_select_main(0); + osmo_select_main_ctx(0); + osmo_gsup_server_destroy(g_hlr->gs); db_close(g_hlr->dbc); diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c index d5c0fa8..395882a 100644 --- a/src/hlr_ussd.c +++ b/src/hlr_ussd.c @@ -170,12 +170,14 @@ /* subscriber's vlr_number * MO USSD: originating MSC's vlr_number * MT USSD: looked up once per session and cached here */ - uint8_t *vlr_number; - size_t vlr_number_len; + struct osmo_gt vlr_name; /* we don't keep a pointer to the osmo_gsup_{route,conn} towards the MSC/VLR here, * as this might change during inter-VLR hand-over, and we simply look-up the serving MSC/VLR * every time we receive an USSD component from the EUSE */ + + struct osmo_gsup_req *initial_req_from_ms; + struct osmo_gsup_req *initial_req_from_euse; }; struct ss_session *ss_session_find(struct hlr *hlr, const char *imsi, uint32_t session_id) @@ -191,6 +193,10 @@ void ss_session_free(struct ss_session *ss) { osmo_timer_del(&ss->timeout); + if (ss->initial_req_from_ms) + osmo_gsup_req_free(ss->initial_req_from_ms); + if (ss->initial_req_from_euse) + osmo_gsup_req_free(ss->initial_req_from_euse); llist_del(&ss->list); talloc_free(ss); } @@ -230,59 +236,71 @@ ***********************************************************************/ /* Resolve the target MSC by ss->imsi and send GSUP message. */ -static int ss_gsup_send(struct ss_session *ss, struct osmo_gsup_server *gs, struct msgb *msg) +static int ss_gsup_send_to_ms(struct ss_session *ss, struct osmo_gsup_server *gs, struct osmo_gsup_message *gsup) { struct hlr_subscriber subscr = {}; + struct msgb *msg; int rc; + if (ss->initial_req_from_ms) { + /* Use non-final osmo_gsup_req_respond() to not deallocate the ss->initial_req_from_ms */ + osmo_gsup_req_respond(ss->initial_req_from_ms, gsup, false, false); + return 0; + } + + msg = osmo_gsup_msgb_alloc("GSUP USSD FW"); + rc = osmo_gsup_encode(msg, gsup); + if (rc) { + LOGPSS(ss, LOGL_ERROR, "Failed to encode GSUP message\n"); + return rc; + } + /* Use vlr_number as looked up by the caller, or look up now. */ - if (!ss->vlr_number) { + if (!ss->vlr_name.len) { rc = db_subscr_get_by_imsi(g_hlr->dbc, ss->imsi, &subscr); if (rc < 0) { LOGPSS(ss, LOGL_ERROR, "Cannot find subscriber, cannot route GSUP message\n"); msgb_free(msg); return -EINVAL; } - ss->vlr_number = (uint8_t *)talloc_strdup(ss, subscr.vlr_number); - ss->vlr_number_len = strlen(subscr.vlr_number) + 1; + osmo_gt_set_str(&ss->vlr_name, subscr.vlr_number); } /* Check for empty string (all vlr_number strings end in "\0", because otherwise gsup_route_find() fails) */ - if (ss->vlr_number_len == 1) { + if (ss->vlr_name.len <= 1) { LOGPSS(ss, LOGL_ERROR, "Cannot send GSUP message, no VLR number stored for subscriber\n"); msgb_free(msg); return -EINVAL; } - LOGPSS(ss, LOGL_DEBUG, "Tx SS/USSD to VLR %s\n", osmo_quote_str((char *)ss->vlr_number, ss->vlr_number_len)); - return osmo_gsup_addr_send(gs, ss->vlr_number, ss->vlr_number_len, msg); + LOGPSS(ss, LOGL_DEBUG, "Tx SS/USSD to VLR %s\n", osmo_gt_name(&ss->vlr_name)); + return osmo_gsup_gt_send(gs, &ss->vlr_name, msg); } static int ss_tx_to_ms(struct ss_session *ss, enum osmo_gsup_message_type gsup_msg_type, - bool final, struct msgb *ss_msg) + bool final, struct msgb *ss_msg) { - struct osmo_gsup_message resp = {0}; - struct msgb *resp_msg; + struct osmo_gsup_message resp = { + .message_type = gsup_msg_type, + .session_id = ss->session_id, + }; + int rc; - resp.message_type = gsup_msg_type; OSMO_STRLCPY_ARRAY(resp.imsi, ss->imsi); if (final) resp.session_state = OSMO_GSUP_SESSION_STATE_END; else resp.session_state = OSMO_GSUP_SESSION_STATE_CONTINUE; - resp.session_id = ss->session_id; if (ss_msg) { resp.ss_info = msgb_data(ss_msg); resp.ss_info_len = msgb_length(ss_msg); } - resp_msg = msgb_alloc_headroom(4000, 64, __func__); - OSMO_ASSERT(resp_msg); - osmo_gsup_encode(resp_msg, &resp); - msgb_free(ss_msg); + rc = ss_gsup_send_to_ms(ss, g_hlr->gs, &resp); - return ss_gsup_send(ss, g_hlr->gs, resp_msg); + msgb_free(ss_msg); + return rc; } #if 0 @@ -297,7 +315,7 @@ } #endif -static int ss_tx_error(struct ss_session *ss, uint8_t invoke_id, uint8_t error_code) +static int ss_tx_to_ms_error(struct ss_session *ss, uint8_t invoke_id, uint8_t error_code) { struct msgb *msg = gsm0480_gen_return_error(invoke_id, error_code); LOGPSS(ss, LOGL_NOTICE, "Tx ReturnError(%u, 0x%02x)\n", invoke_id, error_code); @@ -305,7 +323,7 @@ return ss_tx_to_ms(ss, OSMO_GSUP_MSGT_PROC_SS_RESULT, true, msg); } -static int ss_tx_ussd_7bit(struct ss_session *ss, bool final, uint8_t invoke_id, const char *text) +static int ss_tx_to_ms_ussd_7bit(struct ss_session *ss, bool final, uint8_t invoke_id, const char *text) { struct msgb *msg = gsm0480_gen_ussd_resp_7bit(invoke_id, text); LOGPSS(ss, LOGL_INFO, "Tx USSD '%s'\n", text); @@ -319,7 +337,7 @@ #include -static int handle_ussd_own_msisdn(struct osmo_gsup_conn *conn, struct ss_session *ss, +static int handle_ussd_own_msisdn(struct ss_session *ss, const struct osmo_gsup_message *gsup, const struct ss_request *req) { struct hlr_subscriber subscr; @@ -333,25 +351,25 @@ snprintf(buf, sizeof(buf), "You have no MSISDN!"); else snprintf(buf, sizeof(buf), "Your extension is %s", subscr.msisdn); - ss_tx_ussd_7bit(ss, true, req->invoke_id, buf); + ss_tx_to_ms_ussd_7bit(ss, true, req->invoke_id, buf); break; case -ENOENT: - ss_tx_error(ss, req->invoke_id, GSM0480_ERR_CODE_UNKNOWN_SUBSCRIBER); + ss_tx_to_ms_error(ss, req->invoke_id, GSM0480_ERR_CODE_UNKNOWN_SUBSCRIBER); break; case -EIO: default: - ss_tx_error(ss, req->invoke_id, GSM0480_ERR_CODE_SYSTEM_FAILURE); + ss_tx_to_ms_error(ss, req->invoke_id, GSM0480_ERR_CODE_SYSTEM_FAILURE); break; } return 0; } -static int handle_ussd_own_imsi(struct osmo_gsup_conn *conn, struct ss_session *ss, +static int handle_ussd_own_imsi(struct ss_session *ss, const struct osmo_gsup_message *gsup, const struct ss_request *req) { char buf[GSM0480_USSD_7BIT_STRING_LEN+1]; snprintf(buf, sizeof(buf), "Your IMSI is %s", ss->imsi); - ss_tx_ussd_7bit(ss, true, req->invoke_id, buf); + ss_tx_to_ms_ussd_7bit(ss, true, req->invoke_id, buf); return 0; } @@ -398,37 +416,26 @@ } /* is this GSUP connection an EUSE (true) or not (false)? */ -static bool conn_is_euse(struct osmo_gsup_conn *conn) +static bool peer_name_is_euse(const struct osmo_gt *peer_name) { - int rc; - uint8_t *addr; - - rc = osmo_gsup_conn_ccm_get(conn, &addr, IPAC_IDTAG_SERNR); - if (rc <= 5) + if (peer_name->len <= 5) return false; - if (!strncmp((char *)addr, "EUSE-", 5)) + if (!strncmp((char *)(peer_name->val), "EUSE-", 5)) return true; else return false; } -static struct hlr_euse *euse_by_conn(struct osmo_gsup_conn *conn) +static struct hlr_euse *euse_by_name(const struct osmo_gt *peer_name) { - int rc; - char *addr; - struct hlr *hlr = conn->server->priv; - - rc = osmo_gsup_conn_ccm_get(conn, (uint8_t **) &addr, IPAC_IDTAG_SERNR); - if (rc <= 5) - return NULL; - if (strncmp(addr, "EUSE-", 5)) + if (!peer_name_is_euse(peer_name)) return NULL; - return euse_find(hlr, addr+5); + return euse_find(g_hlr, (const char*)(peer_name->val)+5); } -static int handle_ss(struct ss_session *ss, const struct osmo_gsup_message *gsup, - const struct ss_request *req) +static int handle_ss(struct ss_session *ss, bool is_euse_originated, const struct osmo_gsup_message *gsup, + const struct ss_request *req) { uint8_t comp_type = gsup->ss_info[0]; @@ -441,17 +448,16 @@ * we don't handle "structured" SS requests at all. */ LOGPSS(ss, LOGL_NOTICE, "Structured SS requests are not supported, rejecting...\n"); - ss_tx_error(ss, req->invoke_id, GSM0480_ERR_CODE_FACILITY_NOT_SUPPORTED); + ss_tx_to_ms_error(ss, req->invoke_id, GSM0480_ERR_CODE_FACILITY_NOT_SUPPORTED); return -ENOTSUP; } /* Handle a USSD GSUP message for a given SS Session received from VLR or EUSE */ -static int handle_ussd(struct osmo_gsup_conn *conn, struct ss_session *ss, - const struct osmo_gsup_message *gsup, const struct ss_request *req) +static int handle_ussd(struct ss_session *ss, bool is_euse_originated, const struct osmo_gsup_message *gsup, + const struct ss_request *req) { uint8_t comp_type = gsup->ss_info[0]; struct msgb *msg_out; - bool is_euse_originated = conn_is_euse(conn); LOGPSS(ss, LOGL_INFO, "USSD CompType=%s, OpCode=%s '%s'\n", gsm0480_comp_type_name(comp_type), gsm0480_op_code_name(req->opcode), @@ -459,27 +465,27 @@ if ((ss->is_external && !ss->u.euse) || !ss->u.iuse) { LOGPSS(ss, LOGL_NOTICE, "USSD for unknown code '%s'\n", req->ussd_text); - ss_tx_error(ss, req->invoke_id, GSM0480_ERR_CODE_SS_NOT_AVAILABLE); + ss_tx_to_ms_error(ss, req->invoke_id, GSM0480_ERR_CODE_SS_NOT_AVAILABLE); return 0; } if (is_euse_originated) { - msg_out = osmo_gsup_msgb_alloc("GSUP USSD FW"); - OSMO_ASSERT(msg_out); /* Received from EUSE, Forward to VLR */ - osmo_gsup_encode(msg_out, gsup); - ss_gsup_send(ss, conn->server, msg_out); + /* Need a non-const osmo_gsup_message, because sending might modify some (routing related?) parts. */ + struct osmo_gsup_message forward = *gsup; + ss_gsup_send_to_ms(ss, g_hlr->gs, &forward); } else { /* Received from VLR (MS) */ if (ss->is_external) { /* Forward to EUSE */ - char addr[128]; - strcpy(addr, "EUSE-"); - osmo_strlcpy(addr+5, ss->u.euse->name, sizeof(addr)-5); - conn = gsup_route_find(conn->server, (uint8_t *)addr, strlen(addr)+1); + struct osmo_gt euse_name; + struct osmo_gsup_conn *conn; + osmo_gt_set_str(&euse_name, "EUSE-%s", ss->u.euse->name); + conn = gsup_route_find_gt(g_hlr->gs, &euse_name); if (!conn) { - LOGPSS(ss, LOGL_ERROR, "Cannot find conn for EUSE %s\n", addr); - ss_tx_error(ss, req->invoke_id, GSM0480_ERR_CODE_SYSTEM_FAILURE); + LOGPSS(ss, LOGL_ERROR, "Cannot find conn for EUSE %s\n", + osmo_gt_name(&euse_name)); + ss_tx_to_ms_error(ss, req->invoke_id, GSM0480_ERR_CODE_SYSTEM_FAILURE); } else { msg_out = osmo_gsup_msgb_alloc("GSUP USSD FW"); OSMO_ASSERT(msg_out); @@ -488,9 +494,10 @@ } } else { /* Handle internally */ - ss->u.iuse->handle_ussd(conn, ss, gsup, req); + ss->u.iuse->handle_ussd(ss, gsup, req); /* Release session immediately */ ss_session_free(ss); + return 0; } } @@ -500,12 +507,16 @@ /* this function is called for any SS_REQ/SS_RESP messages from both the MSC/VLR side as well * as from the EUSE side */ -int rx_proc_ss_req(struct osmo_gsup_conn *conn, const struct osmo_gsup_message *gsup) +void rx_proc_ss_req(struct osmo_gsup_req *gsup_req) { - struct hlr *hlr = conn->server->priv; + struct hlr *hlr = g_hlr; struct ss_session *ss; struct ss_request req = {0}; - struct gsup_route *gsup_rt; + const struct osmo_gsup_message *gsup = &gsup_req->gsup; + /* Remember whether this function should free the incoming gsup_req: if it is placed as ss->initial_req_from_*, + * do not free it here. If not, free it here. */ + struct osmo_gsup_req *free_gsup_req = gsup_req; + bool is_euse_originated = peer_name_is_euse(&gsup_req->source_name); LOGP(DSS, LOGL_DEBUG, "%s/0x%08x: Process SS (%s)\n", gsup->imsi, gsup->session_id, osmo_gsup_session_state_name(gsup->session_state)); @@ -516,14 +527,15 @@ LOGP(DSS, LOGL_ERROR, "%s/0x%082x: Unable to parse SS request: %s\n", gsup->imsi, gsup->session_id, osmo_hexdump(gsup->ss_info, gsup->ss_info_len)); - /* FIXME: Send a Reject component? */ - goto out_err; + osmo_gsup_req_respond_err(gsup_req, GMM_CAUSE_INV_MAND_INFO, "error parsing SS request"); + return; } } else if (gsup->session_state != OSMO_GSUP_SESSION_STATE_END) { LOGP(DSS, LOGL_ERROR, "%s/0x%082x: Missing SS payload for '%s'\n", gsup->imsi, gsup->session_id, osmo_gsup_session_state_name(gsup->session_state)); - goto out_err; + osmo_gsup_req_respond_err(gsup_req, GMM_CAUSE_INV_MAND_INFO, "missing SS payload"); + return; } switch (gsup->session_state) { @@ -532,32 +544,29 @@ if (ss_session_find(hlr, gsup->imsi, gsup->session_id)) { LOGP(DSS, LOGL_ERROR, "%s/0x%08x: BEGIN with non-unique session ID!\n", gsup->imsi, gsup->session_id); - goto out_err; + osmo_gsup_req_respond_err(gsup_req, GMM_CAUSE_INV_MAND_INFO, "BEGIN with non-unique session ID"); + return; } ss = ss_session_alloc(hlr, gsup->imsi, gsup->session_id); if (!ss) { LOGP(DSS, LOGL_ERROR, "%s/0x%08x: Unable to allocate SS session\n", gsup->imsi, gsup->session_id); - goto out_err; + osmo_gsup_req_respond_err(gsup_req, GMM_CAUSE_NET_FAIL, "Unable to allocate SS session"); + return; } /* Get IPA name from VLR conn and save as ss->vlr_number */ - if (!conn_is_euse(conn)) { - gsup_rt = gsup_route_find_by_conn(conn); - if (gsup_rt) { - ss->vlr_number = (uint8_t *)talloc_strdup(ss, (const char *)gsup_rt->addr); - ss->vlr_number_len = strlen((const char *)gsup_rt->addr) + 1; - LOGPSS(ss, LOGL_DEBUG, "Destination IPA name retrieved from GSUP route: %s\n", - osmo_quote_str((const char *)ss->vlr_number, ss->vlr_number_len)); - } else { - LOGPSS(ss, LOGL_NOTICE, "Could not find GSUP route, therefore can't set the destination" - " IPA name. We'll try to look it up later, but this should not" - " have happened.\n"); - } + if (!is_euse_originated) { + ss->initial_req_from_ms = gsup_req; + free_gsup_req = NULL; + ss->vlr_name = gsup_req->source_name; + } else { + ss->initial_req_from_euse = gsup_req; + free_gsup_req = NULL; } if (ss_op_is_ussd(req.opcode)) { - if (conn_is_euse(conn)) { + if (is_euse_originated) { /* EUSE->VLR: MT USSD. EUSE is known ('conn'), VLR is to be resolved */ - ss->u.euse = euse_by_conn(conn); + ss->u.euse = euse_by_name(&gsup_req->source_name); } else { /* VLR->EUSE: MO USSD. VLR is known ('conn'), EUSE is to be resolved */ struct hlr_ussd_route *rt; @@ -578,10 +587,10 @@ } } /* dispatch unstructured SS to routing */ - handle_ussd(conn, ss, gsup, &req); + handle_ussd(ss, is_euse_originated, &gsup_req->gsup, &req); } else { /* dispatch non-call SS to internal code */ - handle_ss(ss, gsup, &req); + handle_ss(ss, is_euse_originated, &gsup_req->gsup, &req); } break; case OSMO_GSUP_SESSION_STATE_CONTINUE: @@ -589,7 +598,8 @@ if (!ss) { LOGP(DSS, LOGL_ERROR, "%s/0x%08x: CONTINUE for unknown SS session\n", gsup->imsi, gsup->session_id); - goto out_err; + osmo_gsup_req_respond_err(gsup_req, GMM_CAUSE_INV_MAND_INFO, "CONTINUE for unknown SS session"); + return; } /* Reschedule self-destruction timer */ @@ -598,10 +608,10 @@ if (ss_op_is_ussd(req.opcode)) { /* dispatch unstructured SS to routing */ - handle_ussd(conn, ss, gsup, &req); + handle_ussd(ss, is_euse_originated, &gsup_req->gsup, &req); } else { /* dispatch non-call SS to internal code */ - handle_ss(ss, gsup, &req); + handle_ss(ss, is_euse_originated, &gsup_req->gsup, &req); } break; case OSMO_GSUP_SESSION_STATE_END: @@ -609,17 +619,17 @@ if (!ss) { LOGP(DSS, LOGL_ERROR, "%s/0x%08x: END for unknown SS session\n", gsup->imsi, gsup->session_id); - goto out_err; + return; } /* SS payload is optional for END */ if (gsup->ss_info && gsup->ss_info_len) { if (ss_op_is_ussd(req.opcode)) { /* dispatch unstructured SS to routing */ - handle_ussd(conn, ss, gsup, &req); + handle_ussd(ss, is_euse_originated, &gsup_req->gsup, &req); } else { /* dispatch non-call SS to internal code */ - handle_ss(ss, gsup, &req); + handle_ss(ss, is_euse_originated, &gsup_req->gsup, &req); } } @@ -628,18 +638,15 @@ default: LOGP(DSS, LOGL_ERROR, "%s/0x%08x: Unknown SS State %d\n", gsup->imsi, gsup->session_id, gsup->session_state); - goto out_err; + break; } - return 0; - -out_err: - return 0; + if (free_gsup_req) + osmo_gsup_req_free(free_gsup_req); } -int rx_proc_ss_error(struct osmo_gsup_conn *conn, const struct osmo_gsup_message *gsup) +void rx_proc_ss_error(struct osmo_gsup_req *req) { - LOGP(DSS, LOGL_NOTICE, "%s/0x%08x: Process SS ERROR (%s)\n", gsup->imsi, gsup->session_id, - osmo_gsup_session_state_name(gsup->session_state)); - return 0; + LOGP(DSS, LOGL_NOTICE, "%s/0x%08x: Process SS ERROR (%s)\n", req->gsup.imsi, req->gsup.session_id, + osmo_gsup_session_state_name(req->gsup.session_state)); } diff --git a/src/logging.c b/src/logging.c index 3713ab3..d123fcd 100644 --- a/src/logging.c +++ b/src/logging.c @@ -25,6 +25,12 @@ .color = "\033[1;34m", .enabled = 1, .loglevel = LOGL_NOTICE, }, + [DLU] = { + .name = "DLU", + .description = "Location Updating", + .color = "\033[1;33m", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, }; diff --git a/src/lu_fsm.c b/src/lu_fsm.c new file mode 100644 index 0000000..6479077 --- /dev/null +++ b/src/lu_fsm.c @@ -0,0 +1,289 @@ +/* Roughly follwing "Process Update_Location_HLR" of TS 09.02 */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#define LOG_LU(lu, level, fmt, args...) \ + LOGPFSML((lu)? (lu)->fi : NULL, level, fmt, ##args) + +#define LOG_LU_REQ(lu, req, level, fmt, args...) \ + LOGPFSML((lu)? (lu)->fi : NULL, level, "%s:" fmt, \ + osmo_gsup_message_type_name((req)->gsup.message_type), ##args) + +struct lu { + struct llist_head entry; + struct osmo_fsm_inst *fi; + + struct osmo_gsup_req *update_location_req; + + /* Subscriber state at time of initial Update Location Request */ + struct hlr_subscriber subscr; + bool is_ps; + + /* VLR requesting the LU. */ + struct osmo_gt vlr_name; + + /* If the LU request was received via a proxy and not immediately from a local VLR, this indicates the closest + * peer that forwarded the GSUP message. */ + struct osmo_gt via_proxy; +}; +LLIST_HEAD(g_all_lu); + +enum lu_fsm_event { + LU_EV_RX_GSUP, +}; + +enum lu_fsm_state { + LU_ST_UNVALIDATED, + LU_ST_WAIT_INSERT_DATA_RESULT, + LU_ST_WAIT_LOCATION_CANCEL_RESULT, +}; + +static const struct value_string lu_fsm_event_names[] = { + OSMO_VALUE_STRING(LU_EV_RX_GSUP), + {} +}; + +static struct osmo_tdef_state_timeout lu_fsm_timeouts[32] = { + [LU_ST_WAIT_INSERT_DATA_RESULT] = { .T = -4222 }, + [LU_ST_WAIT_LOCATION_CANCEL_RESULT] = { .T = -4222 }, +}; + +#define lu_state_chg(lu, state) \ + osmo_tdef_fsm_inst_state_chg((lu)->fi, state, lu_fsm_timeouts, g_hlr_tdefs, 5) + +static void lu_success(struct lu *lu) +{ + if (!lu->update_location_req) + LOG_LU(lu, LOGL_ERROR, "No request for this LU\n"); + else + osmo_gsup_req_respond_msgt(lu->update_location_req, OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, true); + lu->update_location_req = NULL; + osmo_fsm_inst_term(lu->fi, OSMO_FSM_TERM_REGULAR, NULL); +} + +#define lu_failure(LU, CAUSE, log_msg, args...) do { \ + if (!(LU)->update_location_req) \ + LOG_LU(LU, LOGL_ERROR, "No request for this LU\n"); \ + else \ + osmo_gsup_req_respond_err((LU)->update_location_req, CAUSE, log_msg, ##args); \ + (LU)->update_location_req = NULL; \ + osmo_fsm_inst_term((LU)->fi, OSMO_FSM_TERM_REGULAR, NULL); \ + } while(0) + +static struct osmo_fsm lu_fsm; + +static void lu_start(struct osmo_gsup_req *update_location_req) +{ + struct osmo_fsm_inst *fi; + struct lu *lu; + + OSMO_ASSERT(update_location_req); + OSMO_ASSERT(update_location_req->gsup.message_type == OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST); + + fi = osmo_fsm_inst_alloc(&lu_fsm, g_hlr, NULL, LOGL_DEBUG, update_location_req->gsup.imsi); + OSMO_ASSERT(fi); + + lu = talloc(fi, struct lu); + OSMO_ASSERT(lu); + fi->priv = lu; + *lu = (struct lu){ + .fi = fi, + .update_location_req = update_location_req, + .vlr_name = update_location_req->source_name, + .via_proxy = update_location_req->via_proxy, + /* According to GSUP specs, OSMO_GSUP_CN_DOMAIN_PS is the default. */ + .is_ps = (update_location_req->gsup.cn_domain != OSMO_GSUP_CN_DOMAIN_CS), + }; + llist_add(&lu->entry, &g_all_lu); + + osmo_fsm_inst_update_id_f_sanitize(fi, '_', "%s:IMSI-%s", lu->is_ps ? "PS" : "CS", update_location_req->gsup.imsi); + + if (!lu->vlr_name.len) { + lu_failure(lu, GMM_CAUSE_NET_FAIL, "LU without a VLR"); + return; + } + + if (db_subscr_get_by_imsi(g_hlr->dbc, update_location_req->gsup.imsi, &lu->subscr) < 0) { + lu_failure(lu, GMM_CAUSE_IMSI_UNKNOWN, "Subscriber does not exist"); + return; + } + + /* Check if subscriber is generally permitted on CS or PS + * service (as requested) */ + if (!lu->is_ps && !lu->subscr.nam_cs) { + lu_failure(lu, GMM_CAUSE_PLMN_NOTALLOWED, "nam_cs == false"); + return; + } + if (lu->is_ps && !lu->subscr.nam_ps) { + lu_failure(lu, GMM_CAUSE_GPRS_NOTALLOWED, "nam_ps == false"); + return; + } + + /* TODO: Set subscriber tracing = deactive in VLR/SGSN */ + +#if 0 + /* Cancel in old VLR/SGSN, if new VLR/SGSN differs from old */ + if (!lu->is_ps && strcmp(subscr->vlr_number, vlr_number)) { + lu_op_tx_cancel_old(lu); + } else if (lu->is_ps && strcmp(subscr->sgsn_number, sgsn_number)) { + lu_op_tx_cancel_old(lu); + } +#endif + + /* Store the VLR / SGSN number with the subscriber, so we know where it was last seen. */ + if (lu->via_proxy.len) { + LOG_GSUP_REQ(update_location_req, LOGL_DEBUG, "storing %s = %s, via proxy %s\n", + lu->is_ps ? "SGSN number" : "VLR number", + osmo_gt_name(&lu->vlr_name), + osmo_gt_name(&lu->via_proxy)); + } else { + LOG_GSUP_REQ(update_location_req, LOGL_DEBUG, "storing %s = %s\n", + lu->is_ps ? "SGSN number" : "VLR number", + osmo_gt_name(&lu->vlr_name)); + } + + if (db_subscr_lu(g_hlr->dbc, lu->subscr.id, &lu->vlr_name, lu->is_ps, &lu->via_proxy)) { + lu_failure(lu, GMM_CAUSE_NET_FAIL, "Cannot update %s in the database", + lu->is_ps ? "SGSN number" : "VLR number"); + return; + } + + /* TODO: Subscriber allowed to roam in PLMN? */ + /* TODO: Update RoutingInfo */ + /* TODO: Reset Flag MS Purged (cs/ps) */ + /* TODO: Control_Tracing_HLR / Control_Tracing_HLR_with_SGSN */ + + lu_state_chg(lu, LU_ST_WAIT_INSERT_DATA_RESULT); +} + +void lu_rx_gsup(struct osmo_gsup_req *req) +{ + struct lu *lu; + if (req->gsup.message_type == OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST) + return lu_start(req); + + llist_for_each_entry(lu, &g_all_lu, entry) { + if (strcmp(lu->subscr.imsi, req->gsup.imsi)) + continue; + if (osmo_fsm_inst_dispatch(lu->fi, LU_EV_RX_GSUP, req)) { + LOG_LU_REQ(lu, req, LOGL_ERROR, "Cannot receive GSUP messages in this state\n"); + osmo_gsup_req_respond_err(req, GMM_CAUSE_MSGT_INCOMP_P_STATE, + "LU does not accept GSUP rx"); + } + return; + } + osmo_gsup_req_respond_err(req, GMM_CAUSE_MSGT_INCOMP_P_STATE, "No Location Updating in progress for this IMSI"); +} + +static int lu_fsm_timer_cb(struct osmo_fsm_inst *fi) +{ + struct lu *lu = fi->priv; + lu_failure(lu, GSM_CAUSE_NET_FAIL, "Timeout"); + return 0; +} + +static void lu_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) +{ + struct lu *lu = fi->priv; + if (lu->update_location_req) + osmo_gsup_req_respond_err(lu->update_location_req, GSM_CAUSE_NET_FAIL, "LU aborted"); + lu->update_location_req = NULL; + llist_del(&lu->entry); +} + +static void lu_fsm_wait_insert_data_result_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + /* Transmit Insert Data Request to the VLR */ + struct lu *lu = fi->priv; + struct hlr_subscriber *subscr = &lu->subscr; + struct osmo_gsup_message gsup; + uint8_t msisdn_enc[OSMO_GSUP_MAX_CALLED_PARTY_BCD_LEN]; + uint8_t apn[APN_MAXLEN]; + + if (osmo_gsup_create_insert_subscriber_data_msg(&gsup, subscr->imsi, + subscr->msisdn, msisdn_enc, sizeof(msisdn_enc), + apn, sizeof(apn), + lu->is_ps? OSMO_GSUP_CN_DOMAIN_PS : OSMO_GSUP_CN_DOMAIN_CS)) { + lu_failure(lu, GMM_CAUSE_NET_FAIL, "cannot encode Insert Subscriber Data message"); + return; + } + + if (osmo_gsup_req_respond(lu->update_location_req, &gsup, false, false)) + lu_failure(lu, GMM_CAUSE_NET_FAIL, "cannot send %s", osmo_gsup_message_type_name(gsup.message_type)); +} + +void lu_fsm_wait_insert_data_result(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct lu *lu = fi->priv; + struct osmo_gsup_req *req; + + switch (event) { + case LU_EV_RX_GSUP: + req = data; + break; + default: + OSMO_ASSERT(false); + } + + switch (req->gsup.message_type) { + case OSMO_GSUP_MSGT_INSERT_DATA_RESULT: + osmo_gsup_req_free(req); + lu_success(lu); + break; + + case OSMO_GSUP_MSGT_INSERT_DATA_ERROR: + lu_failure(lu, GMM_CAUSE_NET_FAIL, "Rx %s", osmo_gsup_message_type_name(req->gsup.message_type)); + break; + + default: + osmo_gsup_req_respond_err(req, GMM_CAUSE_MSGT_INCOMP_P_STATE, "unexpected message type in this state"); + break; + } +} + +#define S(x) (1 << (x)) + +static const struct osmo_fsm_state lu_fsm_states[] = { + [LU_ST_UNVALIDATED] = { + .name = "UNVALIDATED", + .out_state_mask = 0 + | S(LU_ST_WAIT_INSERT_DATA_RESULT) + , + }, + [LU_ST_WAIT_INSERT_DATA_RESULT] = { + .name = "WAIT_INSERT_DATA_RESULT", + .in_event_mask = 0 + | S(LU_EV_RX_GSUP) + , + .onenter = lu_fsm_wait_insert_data_result_onenter, + .action = lu_fsm_wait_insert_data_result, + }, +}; + +static struct osmo_fsm lu_fsm = { + .name = "lu", + .states = lu_fsm_states, + .num_states = ARRAY_SIZE(lu_fsm_states), + .log_subsys = DLU, + .event_names = lu_fsm_event_names, + .timer_cb = lu_fsm_timer_cb, + .cleanup = lu_fsm_cleanup, +}; + +static __attribute__((constructor)) void lu_fsm_init() +{ + OSMO_ASSERT(osmo_fsm_register(&lu_fsm) == 0); +} diff --git a/src/luop.c b/src/luop.c deleted file mode 100644 index f63cf92..0000000 --- a/src/luop.c +++ /dev/null @@ -1,259 +0,0 @@ -/* OsmoHLR TX/RX lu operations */ - -/* (C) 2017 sysmocom s.f.m.c. GmbH - * All Rights Reserved - * - * Author: Harald Welte - * - * 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 - -const struct value_string lu_state_names[] = { - { LU_S_NULL, "NULL" }, - { LU_S_LU_RECEIVED, "LU RECEIVED" }, - { LU_S_CANCEL_SENT, "CANCEL SENT" }, - { LU_S_CANCEL_ACK_RECEIVED, "CANCEL-ACK RECEIVED" }, - { LU_S_ISD_SENT, "ISD SENT" }, - { LU_S_ISD_ACK_RECEIVED, "ISD-ACK RECEIVED" }, - { LU_S_COMPLETE, "COMPLETE" }, - { 0, NULL } -}; - -/* Transmit a given GSUP message for the given LU operation */ -static void _luop_tx_gsup(struct lu_operation *luop, - const struct osmo_gsup_message *gsup) -{ - struct msgb *msg_out; - - msg_out = osmo_gsup_msgb_alloc("GSUP LUOP"); - OSMO_ASSERT(msg_out); - osmo_gsup_encode(msg_out, gsup); - - osmo_gsup_addr_send(luop->gsup_server, luop->peer, - talloc_total_size(luop->peer), - msg_out); -} - -static inline void fill_gsup_msg(struct osmo_gsup_message *out, - const struct lu_operation *lu, - enum osmo_gsup_message_type mt) -{ - memset(out, 0, sizeof(struct osmo_gsup_message)); - if (lu) - osmo_strlcpy(out->imsi, lu->subscr.imsi, - GSM23003_IMSI_MAX_DIGITS + 1); - out->message_type = mt; -} - -/* timer call-back in case LU operation doesn't receive an response */ -static void lu_op_timer_cb(void *data) -{ - struct lu_operation *luop = data; - - DEBUGP(DMAIN, "LU OP timer expired in state %s\n", - get_value_string(lu_state_names, luop->state)); - - switch (luop->state) { - case LU_S_CANCEL_SENT: - break; - case LU_S_ISD_SENT: - break; - default: - break; - } - - lu_op_tx_error(luop, GMM_CAUSE_NET_FAIL); -} - -bool lu_op_fill_subscr(struct lu_operation *luop, struct db_context *dbc, - const char *imsi) -{ - struct hlr_subscriber *subscr = &luop->subscr; - - if (db_subscr_get_by_imsi(dbc, imsi, subscr) < 0) - return false; - - return true; -} - -struct lu_operation *lu_op_alloc(struct osmo_gsup_server *srv) -{ - struct lu_operation *luop; - - luop = talloc_zero(srv, struct lu_operation); - OSMO_ASSERT(luop); - luop->gsup_server = srv; - osmo_timer_setup(&luop->timer, lu_op_timer_cb, luop); - - return luop; -} - -void lu_op_free(struct lu_operation *luop) -{ - /* Only attempt to remove when it was ever added to a list. */ - if (luop->list.next) - llist_del(&luop->list); - - /* Delete timer just in case it is still pending. */ - osmo_timer_del(&luop->timer); - - talloc_free(luop); -} - -struct lu_operation *lu_op_alloc_conn(struct osmo_gsup_conn *conn) -{ - uint8_t *peer_addr; - struct lu_operation *luop = lu_op_alloc(conn->server); - int rc = osmo_gsup_conn_ccm_get(conn, &peer_addr, IPAC_IDTAG_SERNR); - if (rc < 0) { - lu_op_free(luop); - return NULL; - } - - luop->peer = talloc_memdup(luop, peer_addr, rc); - - return luop; -} - -/* FIXME: this doesn't seem to work at all */ -struct lu_operation *lu_op_by_imsi(const char *imsi, - const struct llist_head *lst) -{ - struct lu_operation *luop; - - llist_for_each_entry(luop, lst, list) { - if (!strcmp(imsi, luop->subscr.imsi)) - return luop; - } - return NULL; -} - -void lu_op_statechg(struct lu_operation *luop, enum lu_state new_state) -{ - enum lu_state old_state = luop->state; - - DEBUGP(DMAIN, "LU OP state change: %s -> ", - get_value_string(lu_state_names, old_state)); - DEBUGPC(DMAIN, "%s\n", - get_value_string(lu_state_names, new_state)); - - luop->state = new_state; -} - -/*! Transmit UPD_LOC_ERROR and destroy lu_operation */ -void lu_op_tx_error(struct lu_operation *luop, enum gsm48_gmm_cause cause) -{ - struct osmo_gsup_message gsup; - - DEBUGP(DMAIN, "%s: LU OP Tx Error (cause %s)\n", - luop->subscr.imsi, get_value_string(gsm48_gmm_cause_names, - cause)); - - fill_gsup_msg(&gsup, luop, OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR); - gsup.cause = cause; - - _luop_tx_gsup(luop, &gsup); - - lu_op_free(luop); -} - -/*! Transmit UPD_LOC_RESULT and destroy lu_operation */ -void lu_op_tx_ack(struct lu_operation *luop) -{ - struct osmo_gsup_message gsup; - - fill_gsup_msg(&gsup, luop, OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT); - //FIXME gsup.hlr_enc; - - _luop_tx_gsup(luop, &gsup); - - lu_op_free(luop); -} - -/*! Send Cancel Location to old VLR/SGSN */ -void lu_op_tx_cancel_old(struct lu_operation *luop) -{ - struct osmo_gsup_message gsup; - - OSMO_ASSERT(luop->state == LU_S_LU_RECEIVED); - - fill_gsup_msg(&gsup, NULL, OSMO_GSUP_MSGT_LOCATION_CANCEL_REQUEST); - //gsup.cause = FIXME; - //gsup.cancel_type = FIXME; - - _luop_tx_gsup(luop, &gsup); - - lu_op_statechg(luop, LU_S_CANCEL_SENT); - osmo_timer_schedule(&luop->timer, CANCEL_TIMEOUT_SECS, 0); -} - -/*! Transmit Insert Subscriber Data to new VLR/SGSN */ -void lu_op_tx_insert_subscr_data(struct lu_operation *luop) -{ - struct hlr_subscriber *subscr = &luop->subscr; - struct osmo_gsup_message gsup = { }; - uint8_t msisdn_enc[OSMO_GSUP_MAX_CALLED_PARTY_BCD_LEN]; - uint8_t apn[APN_MAXLEN]; - enum osmo_gsup_cn_domain cn_domain; - - OSMO_ASSERT(luop->state == LU_S_LU_RECEIVED || - luop->state == LU_S_CANCEL_ACK_RECEIVED); - - if (luop->is_ps) - cn_domain = OSMO_GSUP_CN_DOMAIN_PS; - else - cn_domain = OSMO_GSUP_CN_DOMAIN_CS; - - if (osmo_gsup_create_insert_subscriber_data_msg(&gsup, subscr->imsi, subscr->msisdn, msisdn_enc, - sizeof(msisdn_enc), apn, sizeof(apn), cn_domain) != 0) { - LOGP(DMAIN, LOGL_ERROR, - "IMSI='%s': Cannot notify GSUP client; could not create gsup message " - "for %s\n", subscr->imsi, luop->peer); - return; - } - - /* Send ISD to new VLR/SGSN */ - _luop_tx_gsup(luop, &gsup); - - lu_op_statechg(luop, LU_S_ISD_SENT); - osmo_timer_schedule(&luop->timer, ISD_TIMEOUT_SECS, 0); -} - -/*! Transmit Delete Subscriber Data to new VLR/SGSN. - * The luop is not freed. */ -void lu_op_tx_del_subscr_data(struct lu_operation *luop) -{ - struct osmo_gsup_message gsup; - - fill_gsup_msg(&gsup, luop, OSMO_GSUP_MSGT_DELETE_DATA_REQUEST); - - gsup.cn_domain = OSMO_GSUP_CN_DOMAIN_PS; - - /* Send ISD to new VLR/SGSN */ - _luop_tx_gsup(luop, &gsup); -} diff --git a/src/mslookup/mdns_record.c b/src/mslookup/mdns_record.c index c9b6e4c..05788ca 100644 --- a/src/mslookup/mdns_record.c +++ b/src/mslookup/mdns_record.c @@ -95,10 +95,10 @@ return -EINVAL; /* Parse key */ - osmo_token_copy(key_buf, key_size, key_value, sep - key_value); + osmo_print_n(key_buf, key_size, key_value, sep - key_value); /* Parse value */ value = sep + 1; - osmo_token_copy(value_buf, value_size, value, key_value_end - value); + osmo_print_n(value_buf, value_size, value, key_value_end - value); return 0; } diff --git a/tests/db/Makefile.am b/tests/db/Makefile.am index f13824d..1539145 100644 --- a/tests/db/Makefile.am +++ b/tests/db/Makefile.am @@ -30,6 +30,7 @@ $(top_builddir)/src/db_auc.o \ $(top_builddir)/src/db_hlr.o \ $(top_builddir)/src/db.o \ + $(top_builddir)/src/global_title.o \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/db/db_test.c b/tests/db/db_test.c index d6060dd..0ea2cfb 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -145,6 +146,8 @@ #define Ps(name) \ if (*subscr->name) \ Pfo(name, "'%s'", subscr) +#define Pgt(name) \ + Pfv(name, "%s", osmo_gt_name(&subscr->name)) #define Pd(name) \ Pfv(name, "%"PRId64, (int64_t)subscr->name) #define Pd_nonzero(name) \ @@ -235,6 +238,14 @@ static const char *short_imsi = "123456"; static const char *unknown_imsi = "999999999"; +static int db_subscr_lu_str(struct db_context *dbc, int64_t subscr_id, + const char *vlr_or_sgsn_number, bool is_ps) +{ + struct osmo_gt vlr_nr; + osmo_gt_set_str(&vlr_nr, vlr_or_sgsn_number); + return db_subscr_lu(dbc, subscr_id, &vlr_nr, is_ps, NULL); +} + static void test_subscr_create_update_sel_delete() { int64_t id0, id1, id2, id_short; @@ -386,39 +397,39 @@ comment("Record LU for PS and CS (SGSN and VLR names)"); - ASSERT_RC(db_subscr_lu(dbc, id0, "5952", true), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, "5952", true), 0); ASSERT_SEL(id, id0, 0); - ASSERT_RC(db_subscr_lu(dbc, id0, "712", false), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, "712", false), 0); ASSERT_SEL(id, id0, 0); comment("Record LU for PS and CS (SGSN and VLR names) *again*"); - ASSERT_RC(db_subscr_lu(dbc, id0, "111", true), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, "111", true), 0); ASSERT_SEL(id, id0, 0); - ASSERT_RC(db_subscr_lu(dbc, id0, "111", true), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, "111", true), 0); ASSERT_SEL(id, id0, 0); - ASSERT_RC(db_subscr_lu(dbc, id0, "222", false), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, "222", false), 0); ASSERT_SEL(id, id0, 0); - ASSERT_RC(db_subscr_lu(dbc, id0, "222", false), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, "222", false), 0); ASSERT_SEL(id, id0, 0); comment("Unset LU info for PS and CS (SGSN and VLR names)"); - ASSERT_RC(db_subscr_lu(dbc, id0, "", true), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, "", true), 0); ASSERT_SEL(id, id0, 0); - ASSERT_RC(db_subscr_lu(dbc, id0, "", false), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, "", false), 0); ASSERT_SEL(id, id0, 0); - ASSERT_RC(db_subscr_lu(dbc, id0, "111", true), 0); - ASSERT_RC(db_subscr_lu(dbc, id0, "222", false), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, "111", true), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, "222", false), 0); ASSERT_SEL(id, id0, 0); - ASSERT_RC(db_subscr_lu(dbc, id0, NULL, true), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, NULL, true), 0); ASSERT_SEL(id, id0, 0); - ASSERT_RC(db_subscr_lu(dbc, id0, NULL, false), 0); + ASSERT_RC(db_subscr_lu_str(dbc, id0, NULL, false), 0); ASSERT_SEL(id, id0, 0); comment("Record LU for non-existent ID"); - ASSERT_RC(db_subscr_lu(dbc, 99999, "5952", true), -ENOENT); - ASSERT_RC(db_subscr_lu(dbc, 99999, "712", false), -ENOENT); + ASSERT_RC(db_subscr_lu_str(dbc, 99999, "5952", true), -ENOENT); + ASSERT_RC(db_subscr_lu_str(dbc, 99999, "712", false), -ENOENT); ASSERT_SEL(id, 99999, -ENOENT); comment("Purge and un-purge PS and CS"); diff --git a/tests/db/db_test.err b/tests/db/db_test.err index a3e4d58..87c7d0e 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -435,7 +435,7 @@ --- Record LU for PS and CS (SGSN and VLR names) -db_subscr_lu(dbc, id0, "5952", true) --> 0 +db_subscr_lu_str(dbc, id0, "5952", true) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -445,7 +445,7 @@ .sgsn_number = '5952', } -db_subscr_lu(dbc, id0, "712", false) --> 0 +db_subscr_lu_str(dbc, id0, "712", false) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -459,7 +459,7 @@ --- Record LU for PS and CS (SGSN and VLR names) *again* -db_subscr_lu(dbc, id0, "111", true) --> 0 +db_subscr_lu_str(dbc, id0, "111", true) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -470,7 +470,7 @@ .sgsn_number = '111', } -db_subscr_lu(dbc, id0, "111", true) --> 0 +db_subscr_lu_str(dbc, id0, "111", true) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -481,7 +481,7 @@ .sgsn_number = '111', } -db_subscr_lu(dbc, id0, "222", false) --> 0 +db_subscr_lu_str(dbc, id0, "222", false) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -492,7 +492,7 @@ .sgsn_number = '111', } -db_subscr_lu(dbc, id0, "222", false) --> 0 +db_subscr_lu_str(dbc, id0, "222", false) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -506,7 +506,7 @@ --- Unset LU info for PS and CS (SGSN and VLR names) -db_subscr_lu(dbc, id0, "", true) --> 0 +db_subscr_lu_str(dbc, id0, "", true) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -516,7 +516,7 @@ .vlr_number = '222', } -db_subscr_lu(dbc, id0, "", false) --> 0 +db_subscr_lu_str(dbc, id0, "", false) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -525,9 +525,9 @@ .msisdn = '543210123456789', } -db_subscr_lu(dbc, id0, "111", true) --> 0 +db_subscr_lu_str(dbc, id0, "111", true) --> 0 -db_subscr_lu(dbc, id0, "222", false) --> 0 +db_subscr_lu_str(dbc, id0, "222", false) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -538,7 +538,7 @@ .sgsn_number = '111', } -db_subscr_lu(dbc, id0, NULL, true) --> 0 +db_subscr_lu_str(dbc, id0, NULL, true) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -548,7 +548,7 @@ .vlr_number = '222', } -db_subscr_lu(dbc, id0, NULL, false) --> 0 +db_subscr_lu_str(dbc, id0, NULL, false) --> 0 db_subscr_get_by_id(dbc, id0, &g_subscr) --> 0 struct hlr_subscriber { @@ -560,10 +560,10 @@ --- Record LU for non-existent ID -db_subscr_lu(dbc, 99999, "5952", true) --> -ENOENT +db_subscr_lu_str(dbc, 99999, "5952", true) --> -ENOENT DAUC Cannot update SGSN number for subscriber ID=99999: no such subscriber -db_subscr_lu(dbc, 99999, "712", false) --> -ENOENT +db_subscr_lu_str(dbc, 99999, "712", false) --> -ENOENT DAUC Cannot update VLR number for subscriber ID=99999: no such subscriber db_subscr_get_by_id(dbc, 99999, &g_subscr) --> -ENOENT diff --git a/tests/gsup_server/Makefile.am b/tests/gsup_server/Makefile.am index e64ac4a..bdc9eca 100644 --- a/tests/gsup_server/Makefile.am +++ b/tests/gsup_server/Makefile.am @@ -31,6 +31,8 @@ gsup_server_test_LDADD = \ $(top_srcdir)/src/gsup_server.c \ $(top_srcdir)/src/gsup_router.c \ + $(top_srcdir)/src/gsupclient/global_title.c \ + $(top_srcdir)/src/gsupclient/gsup_req.c \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOABIS_LIBS) \ diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index ccc30ba..dd8dbcf 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -150,6 +150,7 @@ logging level db notice logging level auc notice logging level ss info + logging level lu notice ... hlr store-imei -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:04 +0000 Subject: Change in osmo-hlr[master]: gsup client: add up_down_cb(), add osmo_gsup_client_create3() References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16206 ) Change subject: gsup client: add up_down_cb(), add osmo_gsup_client_create3() ...................................................................... gsup client: add up_down_cb(), add osmo_gsup_client_create3() For the GSUP clients in upcoming D-GSM enabled osmo-hlr, it will be necessary to trigger an event as soon as a GSUP client connection becomes ready for communication. Add the osmo_gsup_client->up_down_cb. Add osmo_gsup_client_create3() pass the up_down_cb in the arguments. Also add a cb data argument, and groupt the cb and data arguments after the oapc_config argument. (Usually, we have cb and data arguments last.) We need the callbacks and data pointer in the osmo_gsup_client_create() function right before startup, because this function immediately starts up the connection. Who knows whether callbacks might trigger right away. Change-Id: I6f181e42b678465bc9945f192559dc57d2083c6d --- M include/osmocom/gsupclient/gsup_client.h M src/gsupclient/gsup_client.c 2 files changed, 63 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/06/16206/1 diff --git a/include/osmocom/gsupclient/gsup_client.h b/include/osmocom/gsupclient/gsup_client.h index 154e3e0..deae4d4 100644 --- a/include/osmocom/gsupclient/gsup_client.h +++ b/include/osmocom/gsupclient/gsup_client.h @@ -39,6 +39,8 @@ /* Expects message in msg->l2h */ typedef int (*osmo_gsup_client_read_cb_t)(struct osmo_gsup_client *gsupc, struct msgb *msg); +typedef bool (*osmo_gsup_client_up_down_cb_t)(struct osmo_gsup_client *gsupc, bool up); + struct osmo_gsup_client { const char *unit_name; /* same as ipa_dev->unit_name, for backwards compat */ @@ -54,8 +56,18 @@ int got_ipa_pong; struct ipaccess_unit *ipa_dev; /* identification information sent to IPA server */ + + osmo_gsup_client_up_down_cb_t up_down_cb; }; +struct osmo_gsup_client *osmo_gsup_client_create3(void *talloc_ctx, + struct ipaccess_unit *ipa_dev, + const char *ip_addr, + unsigned int tcp_port, + struct osmo_oap_client_config *oapc_config, + osmo_gsup_client_read_cb_t read_cb, + osmo_gsup_client_up_down_cb_t up_down_cb, + void *data); struct osmo_gsup_client *osmo_gsup_client_create2(void *talloc_ctx, struct ipaccess_unit *ipa_dev, const char *ip_addr, diff --git a/src/gsupclient/gsup_client.c b/src/gsupclient/gsup_client.c index 52985c9..d522056 100644 --- a/src/gsupclient/gsup_client.c +++ b/src/gsupclient/gsup_client.c @@ -97,6 +97,12 @@ if (gsupc->is_connected) return; + if (gsupc->up_down_cb) { + /* When the up_down_cb() returns false, the user asks us not to retry connecting. */ + if (!gsupc->up_down_cb(gsupc, false)) + return; + } + gsup_client_connect(gsupc); } @@ -139,9 +145,18 @@ gsup_client_oap_register(gsupc); osmo_timer_del(&gsupc->connect_timer); + + if (gsupc->up_down_cb) + gsupc->up_down_cb(gsupc, true); } else { osmo_timer_del(&gsupc->ping_timer); + if (gsupc->up_down_cb) { + /* When the up_down_cb() returns false, the user asks us not to retry connecting. */ + if (!gsupc->up_down_cb(gsupc, false)) + return; + } + osmo_timer_schedule(&gsupc->connect_timer, OSMO_GSUP_CLIENT_RECONNECT_INTERVAL, 0); } @@ -263,28 +278,39 @@ * Use the provided ipaccess unit as the client-side identifier; ipa_dev should * be allocated in talloc_ctx talloc_ctx as well. * \param[in] talloc_ctx talloc context. - * \param[in] ipa_dev IP access unit which contains client identification information; must be allocated - * in talloc_ctx as well to ensure it lives throughout the lifetime of the connection. - * \param[in] ip_addr GSUP server IP address. - * \param[in] tcp_port GSUP server TCP port. - * \param[in] read_cb callback for reading from the GSUP connection. - * \param[in] oapc_config OPA client configuration. - * \returns a GSUP client connection or NULL on failure. + * \param[in] ipa_dev IP access unit which contains client identification information; must be allocated + * in talloc_ctx as well to ensure it lives throughout the lifetime of the connection. + * \param[in] ip_addr GSUP server IP address to connect to. + * \param[in] tcp_port GSUP server TCP port to connect to. + * \param[in] oapc_config OPA client configuration, or NULL. + * \param[in] read_cb callback for reading from the GSUP connection. + * \param[in] up_down_cb Invoked when the GSUP link is ready for communication, and when the link drops. + * \param[in] data User data stored in the returned gsupc->data, as context for the callbacks. + * \return a GSUP client connection, or NULL on failure. */ -struct osmo_gsup_client *osmo_gsup_client_create2(void *talloc_ctx, +struct osmo_gsup_client *osmo_gsup_client_create3(void *talloc_ctx, struct ipaccess_unit *ipa_dev, const char *ip_addr, unsigned int tcp_port, + struct osmo_oap_client_config *oapc_config, osmo_gsup_client_read_cb_t read_cb, - struct osmo_oap_client_config *oapc_config) + osmo_gsup_client_up_down_cb_t up_down_cb, + void *data) { struct osmo_gsup_client *gsupc; int rc; + OSMO_ASSERT(ipa_dev->unit_name); + gsupc = talloc_zero(talloc_ctx, struct osmo_gsup_client); OSMO_ASSERT(gsupc); - gsupc->unit_name = (const char *)ipa_dev->unit_name; /* API backwards compat */ - gsupc->ipa_dev = ipa_dev; + *gsupc = (struct osmo_gsup_client){ + .unit_name = (const char *)ipa_dev->unit_name, /* API backwards compat */ + .ipa_dev = ipa_dev, + .read_cb = read_cb, + .up_down_cb = up_down_cb, + .data = data, + }; /* a NULL oapc_config will mark oap_state disabled. */ rc = osmo_oap_client_init(oapc_config, &gsupc->oap_state); @@ -309,9 +335,6 @@ if (rc < 0) goto failed; - - gsupc->read_cb = read_cb; - return gsupc; failed: @@ -319,6 +342,20 @@ return NULL; } +/*! Like osmo_gsup_client_create3() but without the up_down_cb and data arguments, and with the oapc_config argument in + * a different position. + */ +struct osmo_gsup_client *osmo_gsup_client_create2(void *talloc_ctx, + struct ipaccess_unit *ipa_dev, + const char *ip_addr, + unsigned int tcp_port, + osmo_gsup_client_read_cb_t read_cb, + struct osmo_oap_client_config *oapc_config) +{ + return osmo_gsup_client_create3(talloc_ctx, ipa_dev, ip_addr, tcp_port, oapc_config, + read_cb, NULL, NULL); +} + /** * Like osmo_gsup_client_create2() except it expects a unit name instead * of a full-blown ipacess_unit as the client-side identifier. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I6f181e42b678465bc9945f192559dc57d2083c6d Gerrit-Change-Number: 16206 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:05 +0000 Subject: Change in osmo-hlr[master]: db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16207 ) Change subject: db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy ...................................................................... db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy D-GSM will store in the HLR DB whether a locally connected MSC has attached the subscriber (last_lu_seen[_ps]), or whether the attach happened via a GSUP proxy from a different site. Add columns for this separately in this patch. Change-Id: I98c7b3870559ede84adf56e4bf111f53c7487745 --- M include/osmocom/hlr/db.h M sql/hlr.sql M src/db.c M src/db_hlr.c M tests/db_upgrade/db_upgrade_test.ok 5 files changed, 75 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/07/16207/1 diff --git a/include/osmocom/hlr/db.h b/include/osmocom/hlr/db.h index 592a976..78dad3e 100644 --- a/include/osmocom/hlr/db.h +++ b/include/osmocom/hlr/db.h @@ -51,6 +51,7 @@ bool db_bind_text(sqlite3_stmt *stmt, const char *param_name, const char *text); 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); +bool db_bind_null(sqlite3_stmt *stmt, const char *param_name); void db_close(struct db_context *dbc); struct db_context *db_open(void *ctx, const char *fname, bool enable_sqlite3_logging, bool allow_upgrades); @@ -99,6 +100,9 @@ bool ms_purged_ps; time_t last_lu_seen; time_t last_lu_seen_ps; + /* talloc'd IPA unit name */ + struct osmo_gt vlr_via_proxy; + struct osmo_gt sgsn_via_proxy; }; /* A format string for use with strptime(3). This format string is diff --git a/sql/hlr.sql b/sql/hlr.sql index ad57661..98e586d 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -43,7 +43,12 @@ -- Timestamp of last location update seen from subscriber -- The value is a string which encodes a UTC timestamp in granularity of seconds. last_lu_seen TIMESTAMP default NULL, - last_lu_seen_ps TIMESTAMP default NULL + last_lu_seen_ps TIMESTAMP default NULL, + + -- When a LU was received via a proxy, that proxy's hlr_number is stored here, + -- while vlr_number reflects the MSC on the far side of that proxy. + vlr_via_proxy VARCHAR, + sgsn_via_proxy VARCHAR ); CREATE TABLE subscriber_apn ( @@ -78,4 +83,4 @@ -- Set HLR database schema version number -- Note: This constant is currently duplicated in src/db.c and must be kept in sync! -PRAGMA user_version = 4; +PRAGMA user_version = 5; diff --git a/src/db.c b/src/db.c index e38bdaa..3cbd9c9 100644 --- a/src/db.c +++ b/src/db.c @@ -30,7 +30,7 @@ #include "db_bootstrap.h" /* This constant is currently duplicated in sql/hlr.sql and must be kept in sync! */ -#define CURRENT_SCHEMA_VERSION 4 +#define CURRENT_SCHEMA_VERSION 5 #define SEL_COLUMNS \ "id," \ @@ -48,15 +48,17 @@ "ms_purged_cs," \ "ms_purged_ps," \ "last_lu_seen," \ - "last_lu_seen_ps" \ + "last_lu_seen_ps," \ + "vlr_via_proxy," \ + "sgsn_via_proxy" static const char *stmt_sql[] = { [DB_STMT_SEL_BY_IMSI] = "SELECT " SEL_COLUMNS " FROM subscriber WHERE imsi = ?", [DB_STMT_SEL_BY_MSISDN] = "SELECT " SEL_COLUMNS " FROM subscriber WHERE msisdn = ?", [DB_STMT_SEL_BY_ID] = "SELECT " SEL_COLUMNS " FROM subscriber WHERE id = ?", [DB_STMT_SEL_BY_IMEI] = "SELECT " SEL_COLUMNS " FROM subscriber WHERE imei = ?", - [DB_STMT_UPD_VLR_BY_ID] = "UPDATE subscriber SET vlr_number = $number WHERE id = $subscriber_id", - [DB_STMT_UPD_SGSN_BY_ID] = "UPDATE subscriber SET sgsn_number = $number WHERE id = $subscriber_id", + [DB_STMT_UPD_VLR_BY_ID] = "UPDATE subscriber SET vlr_number = $number, vlr_via_proxy = $proxy WHERE id = $subscriber_id", + [DB_STMT_UPD_SGSN_BY_ID] = "UPDATE subscriber SET sgsn_number = $number, sgsn_via_proxy = $proxy WHERE id = $subscriber_id", [DB_STMT_UPD_IMEI_BY_IMSI] = "UPDATE subscriber SET imei = $imei WHERE imsi = $imsi", [DB_STMT_AUC_BY_IMSI] = "SELECT id, algo_id_2g, ki, algo_id_3g, k, op, opc, sqn, ind_bitlen" @@ -185,6 +187,25 @@ return true; } +bool db_bind_null(sqlite3_stmt *stmt, const char *param_name) +{ + int rc; + int idx = param_name ? sqlite3_bind_parameter_index(stmt, param_name) : 1; + if (idx < 1) { + LOGP(DDB, LOGL_ERROR, "Error composing SQL, cannot bind parameter '%s'\n", + param_name); + return false; + } + rc = sqlite3_bind_null(stmt, idx); + if (rc != SQLITE_OK) { + LOGP(DDB, LOGL_ERROR, "Error binding NULL to SQL parameter %s: %d\n", + param_name ? param_name : "#1", rc); + db_remove_reset(stmt); + return false; + } + return true; +} + void db_close(struct db_context *dbc) { unsigned int i; @@ -443,12 +464,30 @@ return rc; } +static int db_upgrade_v5(struct db_context *dbc) +{ + int rc; + const char *statements[] = { + "ALTER TABLE subscriber ADD COLUMN vlr_via_proxy VARCHAR", + "ALTER TABLE subscriber ADD COLUMN sgsn_via_proxy VARCHAR", + "PRAGMA user_version = 5", + }; + + rc = db_run_statements(dbc, statements, ARRAY_SIZE(statements)); + if (rc != SQLITE_DONE) { + LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 5\n"); + return rc; + } + return rc; +} + typedef int (*db_upgrade_func_t)(struct db_context *dbc); static db_upgrade_func_t db_upgrade_path[] = { db_upgrade_v1, db_upgrade_v2, db_upgrade_v3, db_upgrade_v4, + db_upgrade_v5, }; static int db_get_user_version(struct db_context *dbc) diff --git a/src/db_hlr.c b/src/db_hlr.c index 0f9b367..3255dd9 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -505,6 +505,8 @@ subscr->imsi, "CS"); parse_last_lu_seen(&subscr->last_lu_seen_ps, (const char *)sqlite3_column_text(stmt, 15), subscr->imsi, "PS"); + copy_sqlite3_text_to_gt(&subscr->vlr_via_proxy, stmt, 16); + copy_sqlite3_text_to_gt(&subscr->sgsn_via_proxy, stmt, 17); out: db_remove_reset(stmt); @@ -750,6 +752,14 @@ if (!db_bind_text(stmt, "$number", (char*)vlr_name->val)) return -EIO; + if (via_proxy && via_proxy->len) { + if (!db_bind_text(stmt, "$proxy", (char*)via_proxy->val)) + return -EIO; + } else { + if (!db_bind_null(stmt, "$proxy")) + return -EIO; + } + /* execute the statement */ rc = sqlite3_step(stmt); if (rc != SQLITE_DONE) { diff --git a/tests/db_upgrade/db_upgrade_test.ok b/tests/db_upgrade/db_upgrade_test.ok index 67d0006..2bc6a39 100644 --- a/tests/db_upgrade/db_upgrade_test.ok +++ b/tests/db_upgrade/db_upgrade_test.ok @@ -84,6 +84,7 @@ DDB Database test.db' has been upgraded to HLR DB schema version 2 DDB Database test.db' has been upgraded to HLR DB schema version 3 DDB Database test.db' has been upgraded to HLR DB schema version 4 +DDB Database test.db' has been upgraded to HLR DB schema version 5 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. Resulting db: @@ -137,17 +138,19 @@ periodic_rau_tau_tmr|INTEGER|0||0 sgsn_address|VARCHAR|0||0 sgsn_number|VARCHAR(15)|0||0 +sgsn_via_proxy|VARCHAR|0||0 smsc_number|VARCHAR(15)|0||0 vlr_number|VARCHAR(15)|0||0 +vlr_via_proxy|VARCHAR|0||0 Table subscriber contents: -ggsn_number|gmlc_number|id|imei|imeisv|imsi|last_lu_seen|last_lu_seen_ps|lmsi|ms_purged_cs|ms_purged_ps|msc_number|msisdn|nam_cs|nam_ps|periodic_lu_tmr|periodic_rau_tau_tmr|sgsn_address|sgsn_number|smsc_number|vlr_number -||1|||123456789012345||||0|0||098765432109876|1|1||||||MSC-1 -||2|||111111111||||1|0|||1|1|||||| -||3|||222222222||||0|1||22222|1|1|||||| -||4|||333333||||0|0||3|0|1|||||| -||5|||444444444444444||||0|0||4444|1|0|||||| -||6|||5555555||||0|0||55555555555555|0|0|||||| +ggsn_number|gmlc_number|id|imei|imeisv|imsi|last_lu_seen|last_lu_seen_ps|lmsi|ms_purged_cs|ms_purged_ps|msc_number|msisdn|nam_cs|nam_ps|periodic_lu_tmr|periodic_rau_tau_tmr|sgsn_address|sgsn_number|sgsn_via_proxy|smsc_number|vlr_number|vlr_via_proxy +||1|||123456789012345||||0|0||098765432109876|1|1|||||||MSC-1| +||2|||111111111||||1|0|||1|1|||||||| +||3|||222222222||||0|1||22222|1|1|||||||| +||4|||333333||||0|0||3|0|1|||||||| +||5|||444444444444444||||0|0||4444|1|0|||||||| +||6|||5555555||||0|0||55555555555555|0|0|||||||| Table: subscriber_apn name|type|notnull|dflt_value|pk @@ -168,5 +171,5 @@ rc = 0 DMAIN hlr starting DDB using database: test.db -DDB Database test.db' has HLR DB schema version 4 +DDB Database test.db' has HLR DB schema version 5 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I98c7b3870559ede84adf56e4bf111f53c7487745 Gerrit-Change-Number: 16207 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:05 +0000 Subject: Change in osmo-hlr[master]: enlarge the GSUP message headroom References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16208 ) Change subject: enlarge the GSUP message headroom ...................................................................... enlarge the GSUP message headroom Make room for (more) arbitrary IPA headers, like longer IPA names as configured by the user. Change-Id: I7d86f2dadcae29fe1550ea2c9773394ab31a837b --- M src/gsup_server.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/08/16208/1 diff --git a/src/gsup_server.c b/src/gsup_server.c index fb162c0..83329a0 100644 --- a/src/gsup_server.c +++ b/src/gsup_server.c @@ -37,7 +37,7 @@ struct msgb *osmo_gsup_msgb_alloc(const char *label) { - struct msgb *msg = msgb_alloc_headroom(1024+16, 16, label); + struct msgb *msg = msgb_alloc_headroom(1024+512, 512, label); OSMO_ASSERT(msg); return msg; } -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I7d86f2dadcae29fe1550ea2c9773394ab31a837b Gerrit-Change-Number: 16208 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:05 +0000 Subject: Change in osmo-hlr[master]: implement D-GSM in osmo-hlr References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16209 ) Change subject: implement D-GSM in osmo-hlr ...................................................................... implement D-GSM in osmo-hlr Implement the mslookup server to service remote mslookup requests: - VTY mslookup/server config with service names, - the mslookup_mdns_server listening for mslookup requests, - determine whether a subscriber is on a local MSC. Use the mslookup client to proxy GSUP to remote HLRs: - VTY mslookup/client config, - remote_hlr.c to connect GSUP clients to remote GSUP servers, - proxy.c as local GSUP proxy state, so far in-memory. This is kept an opaque API without a mutable struct, so that it can be easily moved to a persistent database implementation. dgsm.c orchestrates mslookup server, client, and MUXes GSUP messages to the right proxy peers. Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b --- M include/osmocom/hlr/Makefile.am A include/osmocom/hlr/dgsm.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_vty.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/mslookup_server_mdns.h A include/osmocom/hlr/proxy.h A include/osmocom/hlr/remote_hlr.h M src/Makefile.am A src/dgsm.c A src/dgsm_vty.c M src/gsup_server.c M src/hlr.c M src/hlr_vty.c M src/hlr_vty_subscr.c M src/logging.c A src/mslookup_server.c A src/mslookup_server_mdns.c A src/proxy.c A src/remote_hlr.c M tests/test_nodes.vty 23 files changed, 2,697 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/09/16209/1 diff --git a/include/osmocom/hlr/Makefile.am b/include/osmocom/hlr/Makefile.am index 532fa5d..38011f6 100644 --- a/include/osmocom/hlr/Makefile.am +++ b/include/osmocom/hlr/Makefile.am @@ -2,6 +2,7 @@ auc.h \ ctrl.h \ db.h \ + dgsm.h \ gsup_router.h \ gsup_server.h \ hlr.h \ @@ -10,5 +11,9 @@ hlr_vty_subscr.h \ logging.h \ lu_fsm.h \ + mslookup_server.h \ + mslookup_server_mdns.h \ + proxy.h \ rand.h \ + remote_hlr.h \ $(NULL) diff --git a/include/osmocom/hlr/dgsm.h b/include/osmocom/hlr/dgsm.h new file mode 100644 index 0000000..d89ace7 --- /dev/null +++ b/include/osmocom/hlr/dgsm.h @@ -0,0 +1,78 @@ +#pragma once + +#include +#include +#include +#include + +#define LOG_DGSM(imsi, level, fmt, args...) \ + LOGP(DDGSM, level, "(IMSI-%s) " fmt, imsi, ##args) + +struct vty; +struct remote_hlr; +struct hlr_subscriber; + +extern void *dgsm_ctx; + +struct dgsm_service_host { + struct llist_head entry; + char service[OSMO_MSLOOKUP_SERVICE_MAXLEN+1]; + struct osmo_sockaddr_str host_v4; + struct osmo_sockaddr_str host_v6; +}; + +struct dgsm_msc_config { + struct llist_head entry; + struct osmo_gt name; + struct llist_head service_hosts; +}; + +/* "Sketch pad" where the VTY can store config items without yet applying. The changes will be applied by e.g. + * dgsm_mdns_server_config_apply() and dgsm_mdns_client_config_apply(). */ +struct dgsm_config { + struct { + /* Whether to listen for incoming MS Lookup requests */ + bool enable; + + struct { + bool enable; + struct osmo_sockaddr_str bind_addr; + } mdns; + + struct llist_head msc_configs; + } server; + + struct { + /* Whether to ask remote HLRs via MS Lookup if an IMSI is not known locally. */ + bool enable; + struct timeval timeout; + + struct { + /* Whether to use mDNS for IMSI MS Lookup */ + bool enable; + struct osmo_sockaddr_str query_addr; + } mdns; + + struct osmo_sockaddr_str gateway_proxy; + } client; +}; + +struct dgsm_service_host *dgsm_config_service_get(const struct osmo_gt *msc_name, const char *service); + +struct dgsm_service_host *dgsm_config_msc_service_get(struct dgsm_msc_config *msc, const char *service, bool create); +int dgsm_config_msc_service_set(struct dgsm_msc_config *msc, const char *service, const struct osmo_sockaddr_str *addr); +int dgsm_config_msc_service_del(struct dgsm_msc_config *msc, const char *service, const struct osmo_sockaddr_str *addr); + +extern const struct osmo_gt dgsm_config_msc_wildcard; +struct dgsm_msc_config *dgsm_config_msc_get(const struct osmo_gt *msc_name, bool create); + +void dgsm_init(void *ctx); +void dgsm_start(void *ctx); +void dgsm_config_apply(const struct dgsm_config *c); +void dgsm_stop(); + +bool dgsm_check_forward_gsup_msg(struct osmo_gsup_req *req); + +void dgsm_vty_init(); + +bool hlr_subscr_lu_age(const struct hlr_subscriber *subscr, uint32_t *age_p); diff --git a/include/osmocom/hlr/gsup_server.h b/include/osmocom/hlr/gsup_server.h index c3efea2..7002da0 100644 --- a/include/osmocom/hlr/gsup_server.h +++ b/include/osmocom/hlr/gsup_server.h @@ -27,6 +27,9 @@ struct ipa_server_link *link; osmo_gsup_read_cb_t read_cb; struct llist_head routes; + + /* Proxy requests from this server's clients to remote GSUP servers. */ + struct proxy *proxy; }; diff --git a/include/osmocom/hlr/hlr.h b/include/osmocom/hlr/hlr.h index 2214a8b..f9d7450 100644 --- a/include/osmocom/hlr/hlr.h +++ b/include/osmocom/hlr/hlr.h @@ -27,6 +27,8 @@ #include #include +#include + #define HLR_DEFAULT_DB_FILE_PATH "hlr.db" struct hlr_euse; @@ -68,6 +70,22 @@ /* Bitmask of DB_SUBSCR_FLAG_* */ uint8_t subscr_create_on_demand_flags; unsigned int subscr_create_on_demand_rand_msisdn_len; + + struct { + bool allow_startup; + struct dgsm_config vty; + + struct { + struct osmo_mslookup_server_mdns *mdns; + uint32_t max_age; + } server; + + struct { + unsigned int result_timeout_milliseconds; + struct osmo_mslookup_client *client; + struct osmo_mslookup_client_method *mdns; + } client; + } mslookup; }; extern struct hlr *g_hlr; diff --git a/include/osmocom/hlr/hlr_vty.h b/include/osmocom/hlr/hlr_vty.h index acd6510..1b9b59e 100644 --- a/include/osmocom/hlr/hlr_vty.h +++ b/include/osmocom/hlr/hlr_vty.h @@ -31,6 +31,10 @@ HLR_NODE = _LAST_OSMOVTY_NODE + 1, GSUP_NODE, EUSE_NODE, + MSLOOKUP_NODE, + MSLOOKUP_SERVER_NODE, + MSLOOKUP_SERVER_MSC_NODE, + MSLOOKUP_CLIENT_NODE, }; int hlr_vty_is_config_node(struct vty *vty, int node); diff --git a/include/osmocom/hlr/logging.h b/include/osmocom/hlr/logging.h index 4e0a25c..a8081af 100644 --- a/include/osmocom/hlr/logging.h +++ b/include/osmocom/hlr/logging.h @@ -10,6 +10,7 @@ DSS, DMSLOOKUP, DLU, + DDGSM, }; extern const struct log_info hlr_log_info; diff --git a/include/osmocom/hlr/mslookup_server.h b/include/osmocom/hlr/mslookup_server.h new file mode 100644 index 0000000..68a8695 --- /dev/null +++ b/include/osmocom/hlr/mslookup_server.h @@ -0,0 +1,8 @@ +#pragma once + +struct osmo_mslookup_query; +struct osmo_mslookup_result; + +struct dgsm_service_host *mslookup_server_get_local_gsup_addr(); +void osmo_mslookup_server_rx(const struct osmo_mslookup_query *query, + struct osmo_mslookup_result *result); diff --git a/include/osmocom/hlr/mslookup_server_mdns.h b/include/osmocom/hlr/mslookup_server_mdns.h new file mode 100644 index 0000000..8d4d4fc --- /dev/null +++ b/include/osmocom/hlr/mslookup_server_mdns.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include +#include + +struct osmo_mslookup_server_mdns { + struct osmo_mslookup_server *mslookup; + struct osmo_sockaddr_str bind_addr; + struct osmo_mdns_sock *sock; +}; + +struct osmo_mslookup_server_mdns *osmo_mslookup_server_mdns_start(void *ctx, const struct osmo_sockaddr_str *bind_addr); +void osmo_mslookup_server_mdns_stop(struct osmo_mslookup_server_mdns *server); diff --git a/include/osmocom/hlr/proxy.h b/include/osmocom/hlr/proxy.h new file mode 100644 index 0000000..1aaee81 --- /dev/null +++ b/include/osmocom/hlr/proxy.h @@ -0,0 +1,86 @@ +#pragma once + +#include +#include +#include +#include + +struct osmo_gsup_req; +struct remote_hlr; + +typedef time_t timestamp_t; +void timestamp_update(timestamp_t *timestamp); +bool timestamp_age(const timestamp_t *timestamp, uint32_t *age); + +struct proxy_pending_gsup_req { + struct llist_head entry; + struct osmo_gsup_req *req; + timestamp_t received_at; +}; + +struct proxy { + struct llist_head subscr_list; + struct llist_head pending_gsup_reqs; + + /* When messages arrive back from a remote HLR that this is the proxy for, reach the VLR to forward the response + * to via this osmo_gsup_server. */ + struct osmo_gsup_server *gsup_server_to_vlr; + + /* How long to keep proxy entries without a refresh, in seconds. */ + uint32_t fresh_time; + + /* How often to garbage collect the proxy cache, period in seconds. + * To change this and take effect immediately, rather use proxy_set_gc_period(). */ + uint32_t gc_period; + + struct osmo_timer_list gc_timer; +}; + +struct proxy_subscr_domain_state { + struct osmo_gt vlr_name; + timestamp_t last_lu; + + /* The name from which an Update Location Request was received. Copied to vlr_name as soon as the LU is + * completed successfully. */ + struct osmo_gt vlr_name_preliminary; + + /* Set if this is a middle proxy, i.e. a proxy behind another proxy. + * That is mostly to know whether the MS is attached at a local MSC/SGSN or further away. + * It could be a boolean, but store the full name for logging. Set only at successful LU acceptance. */ + struct osmo_gt vlr_via_proxy; +}; + +struct proxy_subscr { + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; + char msisdn[GSM23003_MSISDN_MAX_DIGITS+1]; + struct osmo_sockaddr_str remote_hlr_addr; + struct proxy_subscr_domain_state cs, ps; +}; + +void proxy_init(struct osmo_gsup_server *gsup_server_to_vlr); +void proxy_del(struct proxy *proxy); +void proxy_set_gc_period(struct proxy *proxy, uint32_t gc_period); + +/* The API to access / modify proxy entries keeps the implementation opaque, to make sure that we can easily move proxy + * storage to SQLite db. */ +const struct proxy_subscr *proxy_subscr_get_by_imsi(struct proxy *proxy, const char *imsi); +const struct proxy_subscr *proxy_subscr_get_by_msisdn(struct proxy *proxy, const char *msisdn); +void proxy_subscrs_get_by_remote_hlr(struct proxy *proxy, const struct osmo_sockaddr_str *remote_hlr_addr, + bool (*yield)(struct proxy *proxy, const struct proxy_subscr *subscr, void *data), + void *data); +const struct proxy_subscr *proxy_subscr_get_by_imsi(struct proxy *proxy, const char *imsi); +int proxy_subscr_update(struct proxy *proxy, const struct proxy_subscr *proxy_subscr); +int proxy_subscr_del(struct proxy *proxy, const char *imsi); + +void proxy_subscr_forward_to_remote_hlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct osmo_gsup_req *req); +void proxy_subscr_forward_to_remote_hlr_resolved(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr, struct osmo_gsup_req *req); + +int proxy_subscr_forward_to_vlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + const struct osmo_gsup_message *gsup, struct remote_hlr *from_remote_hlr); + +void proxy_subscr_remote_hlr_resolved(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr); +void proxy_subscr_remote_hlr_up(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr); diff --git a/include/osmocom/hlr/remote_hlr.h b/include/osmocom/hlr/remote_hlr.h new file mode 100644 index 0000000..bfa3d95 --- /dev/null +++ b/include/osmocom/hlr/remote_hlr.h @@ -0,0 +1,29 @@ +#pragma once + +#include +#include +#include + +struct osmo_gsup_client; +struct osmo_gsup_message; +struct osmo_gsup_req; +struct msgb; + +#define LOG_REMOTE_HLR(remote_hlr, level, fmt, args...) \ + LOGP(DDGSM, level, "(Proxy HLR-" OSMO_SOCKADDR_STR_FMT ") " fmt, \ + OSMO_SOCKADDR_STR_FMT_ARGS((remote_hlr) ? &(remote_hlr)->addr : NULL), ##args) + +#define LOG_REMOTE_HLR_MSG(remote_hlr, gsup_msg, level, fmt, args...) \ + LOG_REMOTE_HLR(remote_hlr, level, "%s: " fmt, osmo_gsup_message_type_name((gsup_msg)->message_type), ##args) + +/* GSUP client link for proxying to a remote HLR. */ +struct remote_hlr { + struct llist_head entry; + struct osmo_sockaddr_str addr; + struct osmo_gsup_client *gsupc; +}; + +struct remote_hlr *remote_hlr_get(const struct osmo_sockaddr_str *addr, bool create); +void remote_hlr_destroy(struct remote_hlr *remote_hlr); +int remote_hlr_msgb_send(struct remote_hlr *remote_hlr, struct msgb *msg); +void remote_hlr_gsup_forward_to_remote_hlr(struct remote_hlr *remote_hlr, struct osmo_gsup_req *req); diff --git a/src/Makefile.am b/src/Makefile.am index 3a83616..5113aa4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,6 +9,7 @@ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOVTY_CFLAGS) \ $(LIBOSMOCTRL_CFLAGS) \ + $(LIBOSMOMSLOOKUP_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(NULL) @@ -52,15 +53,23 @@ hlr_vty_subscr.c \ gsup_send.c \ hlr_ussd.c \ + proxy.c \ + dgsm.c \ + dgsm_vty.c \ + remote_hlr.c \ + mslookup_server.c \ + mslookup_server_mdns.c \ lu_fsm.c \ $(NULL) osmo_hlr_LDADD = \ $(top_builddir)/src/gsupclient/libosmo-gsup-client.la \ + $(top_builddir)/src/mslookup/libosmo-mslookup.la \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(LIBOSMOVTY_LIBS) \ $(LIBOSMOCTRL_LIBS) \ + $(LIBOSMOMSLOOKUP_LIBS) \ $(LIBOSMOABIS_LIBS) \ $(SQLITE3_LIBS) \ $(NULL) diff --git a/src/dgsm.c b/src/dgsm.c new file mode 100644 index 0000000..9856188 --- /dev/null +++ b/src/dgsm.c @@ -0,0 +1,402 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void *dgsm_ctx = NULL; + +const struct osmo_gt dgsm_config_msc_wildcard = {}; + +struct dgsm_msc_config *dgsm_config_msc_get(const struct osmo_gt *msc_name, bool create) +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + struct dgsm_msc_config *msc; + + if (!msc_name) + return NULL; + + llist_for_each_entry(msc, &c->server.msc_configs, entry) { + if (osmo_gt_cmp(&msc->name, msc_name)) + continue; + return msc; + } + if (!create) + return NULL; + + msc = talloc_zero(dgsm_ctx, struct dgsm_msc_config); + OSMO_ASSERT(msc); + INIT_LLIST_HEAD(&msc->service_hosts); + msc->name = *msc_name; + llist_add_tail(&msc->entry, &c->server.msc_configs); + return msc; +} + +struct dgsm_service_host *dgsm_config_msc_service_get(struct dgsm_msc_config *msc, const char *service, bool create) +{ + struct dgsm_service_host *e; + if (!msc) + return NULL; + + llist_for_each_entry(e, &msc->service_hosts, entry) { + if (!strcmp(e->service, service)) + return e; + } + + if (!create) + return NULL; + + e = talloc_zero(msc, struct dgsm_service_host); + OSMO_ASSERT(e); + OSMO_STRLCPY_ARRAY(e->service, service); + llist_add_tail(&e->entry, &msc->service_hosts); + return e; +} + +struct dgsm_service_host *dgsm_config_service_get(const struct osmo_gt *msc_name, const char *service) +{ + struct dgsm_msc_config *msc = dgsm_config_msc_get(msc_name, false); + if (!msc) + return NULL; + return dgsm_config_msc_service_get(msc, service, false); +} + +int dgsm_config_msc_service_set(struct dgsm_msc_config *msc, const char *service, const struct osmo_sockaddr_str *addr) +{ + struct dgsm_service_host *e; + + if (!service || !service[0] + || strlen(service) > OSMO_MSLOOKUP_SERVICE_MAXLEN) + return -EINVAL; + if (!addr || !osmo_sockaddr_str_is_nonzero(addr)) + return -EINVAL; + + e = dgsm_config_msc_service_get(msc, service, true); + if (!e) + return -EINVAL; + + switch (addr->af) { + case AF_INET: + e->host_v4 = *addr; + break; + case AF_INET6: + e->host_v6 = *addr; + break; + default: + return -EINVAL; + } + return 0; +} + +int dgsm_config_msc_service_del(struct dgsm_msc_config *msc, const char *service, const struct osmo_sockaddr_str *addr) +{ + struct dgsm_service_host *e, *n; + int deleted = 0; + + if (!msc) + return -ENOENT; + + llist_for_each_entry_safe(e, n, &msc->service_hosts, entry) { + if (service && strcmp(service, e->service)) + continue; + + if (addr) { + if (!osmo_sockaddr_str_cmp(addr, &e->host_v4)) { + e->host_v4 = (struct osmo_sockaddr_str){}; + /* Removed one addr. If the other is still there, keep the entry. */ + if (osmo_sockaddr_str_is_nonzero(&e->host_v6)) + continue; + } else if (!osmo_sockaddr_str_cmp(addr, &e->host_v6)) { + e->host_v6 = (struct osmo_sockaddr_str){}; + /* Removed one addr. If the other is still there, keep the entry. */ + if (osmo_sockaddr_str_is_nonzero(&e->host_v4)) + continue; + } else + /* No addr match, keep the entry. */ + continue; + /* Addr matched and none is left. Delete. */ + } + llist_del(&e->entry); + talloc_free(e); + deleted++; + } + return deleted; +} + +static void resolve_hlr_result_cb(struct osmo_mslookup_client *client, + uint32_t request_handle, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + struct proxy *proxy = g_hlr->gs->proxy; + const struct proxy_subscr *proxy_subscr; + const struct osmo_sockaddr_str *use_addr; + struct remote_hlr *remote_hlr; + + /* A remote HLR is answering back, indicating that it is the home HLR for a given IMSI. + * There should be a mostly empty proxy entry for that IMSI. + * Add the remote address data in the proxy. */ + if (query->id.type != OSMO_MSLOOKUP_ID_IMSI) { + LOGP(DDGSM, LOGL_ERROR, "Expected IMSI ID type in mslookup query+result: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, result)); + return; + } + + if (result->rc != OSMO_MSLOOKUP_RC_RESULT) { + LOG_DGSM(query->id.imsi, LOGL_ERROR, "Failed to resolve remote HLR: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, result)); + proxy_subscr_del(proxy, query->id.imsi); + return; + } + + if (osmo_sockaddr_str_is_nonzero(&result->host_v4)) + use_addr = &result->host_v4; + else if (osmo_sockaddr_str_is_nonzero(&result->host_v6)) + use_addr = &result->host_v6; + else { + LOG_DGSM(query->id.imsi, LOGL_ERROR, "Invalid address for remote HLR: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, result)); + proxy_subscr_del(proxy, query->id.imsi); + return; + } + + remote_hlr = remote_hlr_get(use_addr, true); + if (!remote_hlr) { + proxy_subscr_del(proxy, query->id.imsi); + return; + } + + proxy_subscr = proxy_subscr_get_by_imsi(proxy, query->id.imsi); + if (!proxy_subscr) { + LOG_DGSM(query->id.imsi, LOGL_ERROR, "No proxy entry for mslookup result: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, result)); + return; + } + + /* The remote HLR already exists and is connected. Messages for this IMSI were spooled because we did not know + * which remote HLR was responsible. Now we know, send this IMSI's messages now. */ + LOG_DGSM(query->id.imsi, LOGL_DEBUG, "Resolved remote HLR, sending spooled GSUP messages: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, result)); + + proxy_subscr_remote_hlr_resolved(proxy, proxy_subscr, remote_hlr); + + if (!remote_hlr->gsupc || !remote_hlr->gsupc->is_connected) { + LOG_REMOTE_HLR(remote_hlr, LOGL_DEBUG, "Waiting for link-up\n"); + return; + } + proxy_subscr_remote_hlr_up(proxy, proxy_subscr, remote_hlr); +} + +/* Return true when the message has been handled by D-GSM. */ +bool dgsm_check_forward_gsup_msg(struct osmo_gsup_req *req) +{ + const struct proxy_subscr *proxy_subscr; + struct proxy_subscr proxy_subscr_new; + struct proxy *proxy = g_hlr->gs->proxy; + struct osmo_mslookup_query query; + struct osmo_mslookup_query_handling handling; + uint32_t request_handle; + + /* If the IMSI is known in the local HLR, then we won't proxy. */ + if (db_subscr_exists_by_imsi(g_hlr->dbc, req->gsup.imsi) == 0) + return false; + + /* Are we already forwarding this IMSI to a remote HLR? */ + proxy_subscr = proxy_subscr_get_by_imsi(proxy, req->gsup.imsi); + if (proxy_subscr) + goto yes_we_are_proxying; + + /* The IMSI is not known locally, so we want to proxy to a remote HLR, but no proxy entry exists yet. We need to + * look up the subscriber in remote HLRs via D-GSM mslookup, forward GSUP and reply once a result is back from + * there. Defer message and kick off MS lookup. */ + + /* Add a proxy entry without a remote address to indicate that we are busy querying for a remote HLR. */ + proxy_subscr_new = (struct proxy_subscr){}; + OSMO_STRLCPY_ARRAY(proxy_subscr_new.imsi, req->gsup.imsi); + proxy_subscr = &proxy_subscr_new; + if (proxy_subscr_update(proxy, proxy_subscr)) { + LOG_DGSM(req->gsup.imsi, LOGL_ERROR, "Failed to create proxy entry\n"); + return false; + } + + /* Is a fixed gateway proxy configured? */ + if (osmo_sockaddr_str_is_nonzero(&g_hlr->mslookup.vty.client.gateway_proxy)) { + struct remote_hlr *gateway_proxy = remote_hlr_get(&g_hlr->mslookup.vty.client.gateway_proxy, true); + if (!gateway_proxy) { + LOG_DGSM(req->gsup.imsi, LOGL_ERROR, + "Failed to set up fixed gateway proxy " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&g_hlr->mslookup.vty.client.gateway_proxy)); + return false; + } + + proxy_subscr_remote_hlr_resolved(proxy, proxy_subscr, gateway_proxy); + + /* Update info */ + proxy_subscr = proxy_subscr_get_by_imsi(proxy, req->gsup.imsi); + if (!proxy_subscr) { + LOG_DGSM(req->gsup.imsi, LOGL_ERROR, "Proxy entry disappeared\n"); + return false; + } + goto yes_we_are_proxying; + } + + /* Kick off an mslookup for the remote HLR. */ + if (!g_hlr->mslookup.client.client) { + LOG_GSUP_REQ(req, LOGL_DEBUG, "mslookup client not running, cannot query remote home HLR\n"); + return false; + } + + query = (struct osmo_mslookup_query){ + .id = { + .type = OSMO_MSLOOKUP_ID_IMSI, + } + }; + OSMO_STRLCPY_ARRAY(query.id.imsi, req->gsup.imsi); + OSMO_STRLCPY_ARRAY(query.service, OSMO_MSLOOKUP_SERVICE_HLR_GSUP); + handling = (struct osmo_mslookup_query_handling){ + .min_delay_milliseconds = g_hlr->mslookup.client.result_timeout_milliseconds, + .result_cb = resolve_hlr_result_cb, + }; + request_handle = osmo_mslookup_client_request(g_hlr->mslookup.client.client, &query, &handling); + if (!request_handle) { + LOG_DGSM(req->gsup.imsi, LOGL_ERROR, "Error dispatching mslookup query for home HLR: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, &query, NULL)); + proxy_subscr_del(proxy, req->gsup.imsi); + return false; + } + +yes_we_are_proxying: + OSMO_ASSERT(proxy_subscr); + + /* If the remote HLR is already known, directly forward the GSUP message; otherwise, spool the GSUP message + * until the remote HLR will respond / until timeout aborts. */ + proxy_subscr_forward_to_remote_hlr(proxy, proxy_subscr, req); + return true; +} + +void dgsm_init(void *ctx) +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + dgsm_ctx = talloc_named_const(ctx, 0, "dgsm"); + INIT_LLIST_HEAD(&c->server.msc_configs); + + g_hlr->mslookup.server.max_age = 60 * 60; + + g_hlr->mslookup.client.result_timeout_milliseconds = 2000; + + g_hlr->gsup_unit_name.unit_name = "HLR"; + g_hlr->gsup_unit_name.serno = "unnamed-HLR"; + g_hlr->gsup_unit_name.swversion = PACKAGE_NAME "-" PACKAGE_VERSION; + + osmo_sockaddr_str_from_str(&c->server.mdns.bind_addr, + OSMO_MSLOOKUP_MDNS_IP4, OSMO_MSLOOKUP_MDNS_PORT); + osmo_sockaddr_str_from_str(&c->client.mdns.query_addr, + OSMO_MSLOOKUP_MDNS_IP4, OSMO_MSLOOKUP_MDNS_PORT); +} + +void dgsm_start(void *ctx) +{ + g_hlr->mslookup.client.client = osmo_mslookup_client_new(dgsm_ctx); + OSMO_ASSERT(g_hlr->mslookup.client.client); + g_hlr->mslookup.allow_startup = true; + dgsm_config_apply(&g_hlr->mslookup.vty); +} + +void dgsm_stop() +{ + struct dgsm_config disabled = {}; + dgsm_config_apply(&disabled); +} + +static void dgsm_mdns_server_config_apply(const struct dgsm_config *c) +{ + /* Check whether to start/stop/restart mDNS server */ + bool should_run; + bool should_stop; + if (!g_hlr->mslookup.allow_startup) + return; + + should_run = c->server.enable && c->server.mdns.enable; + should_stop = g_hlr->mslookup.server.mdns + && (!should_run + || osmo_sockaddr_str_cmp(&c->server.mdns.bind_addr, + &g_hlr->mslookup.server.mdns->bind_addr)); + + if (should_stop) { + osmo_mslookup_server_mdns_stop(g_hlr->mslookup.server.mdns); + g_hlr->mslookup.server.mdns = NULL; + LOGP(DDGSM, LOGL_NOTICE, "Stopped mslookup mDNS server\n"); + } + + if (should_run && !g_hlr->mslookup.server.mdns) { + g_hlr->mslookup.server.mdns = + osmo_mslookup_server_mdns_start(g_hlr, &c->server.mdns.bind_addr); + if (!g_hlr->mslookup.server.mdns) + LOGP(DDGSM, LOGL_ERROR, "Failed to start mslookup mDNS server on " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&g_hlr->mslookup.server.mdns->bind_addr)); + else + LOGP(DDGSM, LOGL_NOTICE, "Started mslookup mDNS server, receiving mDNS requests at multicast " + OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&g_hlr->mslookup.server.mdns->bind_addr)); + } +} + +static void dgsm_mdns_client_config_apply(const struct dgsm_config *c) +{ + if (!g_hlr->mslookup.allow_startup) + return; + + /* Check whether to start/stop/restart mDNS client */ + const struct osmo_sockaddr_str *current_bind_addr; + current_bind_addr = osmo_mslookup_client_method_mdns_get_bind_addr(g_hlr->mslookup.client.mdns); + + bool should_run = c->client.enable && c->client.mdns.enable; + bool should_stop = g_hlr->mslookup.client.mdns && + (!should_run + || osmo_sockaddr_str_cmp(&c->client.mdns.query_addr, + current_bind_addr)); + + if (should_stop) { + osmo_mslookup_client_method_del(g_hlr->mslookup.client.client, g_hlr->mslookup.client.mdns); + g_hlr->mslookup.client.mdns = NULL; + LOGP(DDGSM, LOGL_NOTICE, "Stopped mslookup mDNS client\n"); + } + + if (should_run && !g_hlr->mslookup.client.mdns) { + g_hlr->mslookup.client.mdns = + osmo_mslookup_client_add_mdns(g_hlr->mslookup.client.client, + c->client.mdns.query_addr.ip, + c->client.mdns.query_addr.port, + -1); + if (!g_hlr->mslookup.client.mdns) + LOGP(DDGSM, LOGL_ERROR, "Failed to start mslookup mDNS client with target " + OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&c->client.mdns.query_addr)); + else + LOGP(DDGSM, LOGL_NOTICE, "Started mslookup mDNS client, sending mDNS requests to multicast " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&c->client.mdns.query_addr)); + } + + if (c->client.enable && osmo_sockaddr_str_is_nonzero(&c->client.gateway_proxy)) + LOGP(DDGSM, LOGL_NOTICE, + "mslookup client: all GSUP requests for unknown IMSIs will be forwarded to" + " gateway-proxy " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&c->client.gateway_proxy)); +} + +void dgsm_config_apply(const struct dgsm_config *c) +{ + dgsm_mdns_server_config_apply(c); + dgsm_mdns_client_config_apply(c); +} diff --git a/src/dgsm_vty.c b/src/dgsm_vty.c new file mode 100644 index 0000000..83c31a2 --- /dev/null +++ b/src/dgsm_vty.c @@ -0,0 +1,515 @@ +#include +#include +#include +#include +#include +#include + +struct cmd_node mslookup_node = { + MSLOOKUP_NODE, + "%s(config-mslookup)# ", + 1, +}; + +DEFUN(cfg_mslookup, + cfg_mslookup_cmd, + "mslookup", + "Configure Distributed GSM mslookup") +{ + vty->node = MSLOOKUP_NODE; + return CMD_SUCCESS; +} + +static int mslookup_server_mdns_bind(struct vty *vty, int argc, const char **argv) +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + const char *ip_str = argc > 0? argv[0] : c->server.mdns.bind_addr.ip; + const char *port_str = argc > 1? argv[1] : NULL; + uint16_t port_nr = port_str ? atoi(port_str) : c->server.mdns.bind_addr.port; + struct osmo_sockaddr_str addr; + if (osmo_sockaddr_str_from_str(&addr, ip_str, port_nr) + || !osmo_sockaddr_str_is_nonzero(&addr)) { + vty_out(vty, "%% mslookup server: Invalid mDNS bind address: %s %u%s", + ip_str, port_nr, VTY_NEWLINE); + return CMD_WARNING; + } + + c->server.mdns.bind_addr = addr; + c->server.mdns.enable = true; + c->server.enable = true; + dgsm_config_apply(c); + return CMD_SUCCESS; +} + +static int mslookup_client_mdns_to(struct vty *vty, int argc, const char **argv) +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + const char *ip_str = argc > 0? argv[0] : c->client.mdns.query_addr.ip; + const char *port_str = argc > 1? argv[1] : NULL; + uint16_t port_nr = port_str ? atoi(port_str) : c->client.mdns.query_addr.port; + struct osmo_sockaddr_str addr; + if (osmo_sockaddr_str_from_str(&addr, ip_str, port_nr) + || !osmo_sockaddr_str_is_nonzero(&addr)) { + vty_out(vty, "%% mslookup client: Invalid mDNS target address: %s %u%s", + ip_str, port_nr, VTY_NEWLINE); + return CMD_WARNING; + } + + c->client.mdns.query_addr = addr; + c->client.mdns.enable = true; + c->client.enable = true; + dgsm_config_apply(c); + return CMD_SUCCESS; +} + +#define MDNS_IP46_STR "multicast IPv4 address like " OSMO_MSLOOKUP_MDNS_IP4 \ + " or IPv6 address like " OSMO_MSLOOKUP_MDNS_IP6 "\n" +#define MDNS_PORT_STR "mDNS UDP Port number\n" +#define IP46_STR "IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1\n" +#define PORT_STR "Service-specific port number\n" + +DEFUN(cfg_mslookup_mdns, + cfg_mslookup_mdns_cmd, + "mdns [IP] [<1-65535>]", + "Convenience shortcut: enable and configure both server and client for mDNS mslookup\n" + MDNS_IP46_STR MDNS_PORT_STR) +{ + int rc1 = mslookup_server_mdns_bind(vty, argc, argv); + int rc2 = mslookup_client_mdns_to(vty, argc, argv); + if (rc1 != CMD_SUCCESS) + return rc1; + return rc2; +} + +DEFUN(cfg_mslookup_no_mdns, + cfg_mslookup_no_mdns_cmd, + "no mdns", + NO_STR "Disable both server and client for mDNS mslookup\n") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + c->server.mdns.enable = false; + c->client.mdns.enable = false; + dgsm_config_apply(c); + return CMD_SUCCESS; +} + +struct cmd_node mslookup_server_node = { + MSLOOKUP_SERVER_NODE, + "%s(config-mslookup-server)# ", + 1, +}; + +DEFUN(cfg_mslookup_server, + cfg_mslookup_server_cmd, + "server", + "Enable and configure Distributed GSM mslookup server") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + vty->node = MSLOOKUP_SERVER_NODE; + c->server.enable = true; + dgsm_config_apply(c); + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_no_server, + cfg_mslookup_no_server_cmd, + "no server", + NO_STR "Disable Distributed GSM mslookup server") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + c->server.enable = false; + dgsm_config_apply(c); + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_server_mdns_bind, + cfg_mslookup_server_mdns_bind_cmd, + "mdns [IP] [<1-65535>]", + "Configure where the mDNS server listens for mslookup requests\n" + MDNS_IP46_STR MDNS_PORT_STR) +{ + return mslookup_server_mdns_bind(vty, argc, argv); +} + +DEFUN(cfg_mslookup_server_no_mdns, + cfg_mslookup_server_no_mdns_cmd, + "no mdns", + NO_STR "Disable server for mDNS mslookup (do not answer remote requests)\n") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + c->server.mdns.enable = false; + dgsm_config_apply(c); + return CMD_SUCCESS; +} + +struct cmd_node mslookup_server_msc_node = { + MSLOOKUP_SERVER_MSC_NODE, + "%s(config-mslookup-server-msc)# ", + 1, +}; + +DEFUN(cfg_mslookup_server_msc, + cfg_mslookup_server_msc_cmd, + "msc .UNIT_NAME", + "Configure services for individual local MSCs\n" + "IPA Unit Name of the local MSC to configure\n") +{ + struct osmo_gt msc_name; + struct dgsm_msc_config *msc; + osmo_gt_set_str(&msc_name, argv_concat(argv, argc, 0)); + + msc = dgsm_config_msc_get(&msc_name, true); + if (!msc) { + vty_out(vty, "%% Error creating MSC %s%s", osmo_gt_name(&msc_name), VTY_NEWLINE); + return CMD_WARNING; + } + vty->node = MSLOOKUP_SERVER_MSC_NODE; + vty->index = msc; + return CMD_SUCCESS; +} + +#define SERVICE_NAME_STR \ + "mslookup service name, e.g. " OSMO_MSLOOKUP_SERVICE_SIP " or " OSMO_MSLOOKUP_SERVICE_SMPP "\n" + +static struct dgsm_msc_config *msc_from_node(struct vty *vty) +{ + switch (vty->node) { + case MSLOOKUP_SERVER_NODE: + /* On the mslookup.server node, set services on the wildcard msc, without a particular name. */ + return dgsm_config_msc_get(&dgsm_config_msc_wildcard, true); + case MSLOOKUP_SERVER_MSC_NODE: + return vty->index; + default: + return NULL; + } +} + +DEFUN(cfg_mslookup_server_msc_service, + cfg_mslookup_server_msc_service_cmd, + "service NAME at IP <1-65535>", + "Configure addresses of local services, as sent in replies to remote mslookup requests.\n" + SERVICE_NAME_STR "at\n" IP46_STR PORT_STR) +{ + /* If this command is run on the 'server' node, it produces an empty unit name and serves as wildcard for all + * MSCs. If on a 'server' / 'msc' node, set services only for that MSC Unit Name. */ + struct dgsm_msc_config *msc = msc_from_node(vty); + const char *service = argv[0]; + const char *ip_str = argv[1]; + const char *port_str = argv[2]; + struct osmo_sockaddr_str addr; + + if (!msc) { + vty_out(vty, "%% Error: no MSC object on this node%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (osmo_sockaddr_str_from_str(&addr, ip_str, atoi(port_str)) + || !osmo_sockaddr_str_is_nonzero(&addr)) { + vty_out(vty, "%% mslookup server: Invalid address for service %s: %s %s%s", + service, ip_str, port_str, VTY_NEWLINE); + return CMD_WARNING; + } + + if (dgsm_config_msc_service_set(msc, service, &addr)) { + vty_out(vty, "%% mslookup server: Error setting service %s to %s %s%s", + service, ip_str, port_str, VTY_NEWLINE); + return CMD_WARNING; + } + return CMD_SUCCESS; +} + +#define NO_SERVICE_AND_NAME_STR NO_STR "Remove one or more service address entries\n" SERVICE_NAME_STR + +DEFUN(cfg_mslookup_server_msc_no_service, + cfg_mslookup_server_msc_no_service_cmd, + "no service NAME", + NO_SERVICE_AND_NAME_STR) +{ + /* If this command is run on the 'server' node, it produces an empty unit name and serves as wildcard for all + * MSCs. If on a 'server' / 'msc' node, set services only for that MSC Unit Name. */ + struct dgsm_msc_config *msc = msc_from_node(vty); + const char *service = argv[0]; + + if (!msc) { + vty_out(vty, "%% Error: no MSC object on this node%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (dgsm_config_msc_service_del(msc, service, NULL) < 1) { + vty_out(vty, "%% mslookup server: cannot remove service '%s'%s", + service, VTY_NEWLINE); + return CMD_WARNING; + } + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_server_msc_no_service_addr, + cfg_mslookup_server_msc_no_service_addr_cmd, + "no service NAME at IP <1-65535>", + NO_SERVICE_AND_NAME_STR "at\n" IP46_STR PORT_STR) +{ + /* If this command is run on the 'server' node, it produces an empty unit name and serves as wildcard for all + * MSCs. If on a 'server' / 'msc' node, set services only for that MSC Unit Name. */ + struct dgsm_msc_config *msc = msc_from_node(vty); + const char *service = argv[0]; + const char *ip_str = argv[1]; + const char *port_str = argv[2]; + struct osmo_sockaddr_str addr; + + if (!msc) { + vty_out(vty, "%% Error: no MSC object on this node%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (osmo_sockaddr_str_from_str(&addr, ip_str, atoi(port_str)) + || !osmo_sockaddr_str_is_nonzero(&addr)) { + vty_out(vty, "%% mslookup server: Invalid address for 'no service' %s: %s %s%s", + service, ip_str, port_str, VTY_NEWLINE); + return CMD_WARNING; + } + + if (dgsm_config_msc_service_del(msc, service, &addr) < 1) { + vty_out(vty, "%% mslookup server: cannot remove service '%s' to %s %s%s", + service, ip_str, port_str, VTY_NEWLINE); + return CMD_WARNING; + } + return CMD_SUCCESS; +} + +struct cmd_node mslookup_client_node = { + MSLOOKUP_CLIENT_NODE, + "%s(config-mslookup-client)# ", + 1, +}; + +DEFUN(cfg_mslookup_client, + cfg_mslookup_client_cmd, + "client", + "Enable and configure Distributed GSM mslookup client") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + vty->node = MSLOOKUP_CLIENT_NODE; + c->client.enable = true; + dgsm_config_apply(c); + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_no_client, + cfg_mslookup_no_client_cmd, + "no client", + NO_STR "Disable Distributed GSM mslookup client") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + c->client.enable = false; + dgsm_config_apply(c); + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_client_timeout, + cfg_mslookup_client_timeout_cmd, + "timeout <1-100000>", + "How long should the mslookup client wait for remote responses before evaluating received results\n" + "timeout in milliseconds\n") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + uint32_t val = atol(argv[0]); + c->client.timeout.tv_sec = val / 1000; + c->client.timeout.tv_usec = (val % 1000) * 1000; + return CMD_SUCCESS; +} + +#define EXIT_HINT() \ + if (vty->type != VTY_FILE) \ + vty_out(vty, "%% 'exit' this node to apply changes%s", VTY_NEWLINE) + + +DEFUN(cfg_mslookup_client_mdns, + cfg_mslookup_client_mdns_cmd, + "mdns [IP] [<1-65535>]", + "Enable mDNS client, and configure multicast address to send mDNS mslookup requests to\n" + MDNS_IP46_STR MDNS_PORT_STR) +{ + return mslookup_client_mdns_to(vty, argc, argv); +} + +DEFUN(cfg_mslookup_client_no_mdns, + cfg_mslookup_client_no_mdns_cmd, + "no mdns", + NO_STR "Disable mDNS client, do not query remote services by mDNS\n") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + c->client.mdns.enable = false; + dgsm_config_apply(c); + return CMD_SUCCESS; +} + +void config_write_msc_services(struct vty *vty, const char *indent, struct dgsm_msc_config *msc) +{ + struct dgsm_service_host *e; + + llist_for_each_entry(e, &msc->service_hosts, entry) { + if (osmo_sockaddr_str_is_nonzero(&e->host_v4)) + vty_out(vty, "%sservice %s at %s %u%s", indent, e->service, e->host_v4.ip, e->host_v4.port, + VTY_NEWLINE); + if (osmo_sockaddr_str_is_nonzero(&e->host_v6)) + vty_out(vty, "%sservice %s at %s %u%s", indent, e->service, e->host_v6.ip, e->host_v6.port, + VTY_NEWLINE); + } +} + +int config_write_mslookup(struct vty *vty) +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + + if (!c->server.enable && !c->client.enable + && llist_empty(&c->server.msc_configs)) + return CMD_SUCCESS; + + vty_out(vty, "mslookup%s", VTY_NEWLINE); + + if (c->server.enable || !llist_empty(&c->server.msc_configs)) { + struct dgsm_msc_config *msc; + + vty_out(vty, " server%s", VTY_NEWLINE); + + if (c->server.mdns.enable + && osmo_sockaddr_str_is_nonzero(&c->server.mdns.bind_addr)) + vty_out(vty, " mdns bind %s %u%s", + c->server.mdns.bind_addr.ip, + c->server.mdns.bind_addr.port, + VTY_NEWLINE); + + msc = dgsm_config_msc_get(&dgsm_config_msc_wildcard, false); + if (msc) + config_write_msc_services(vty, " ", msc); + + llist_for_each_entry(msc, &c->server.msc_configs, entry) { + if (!osmo_gt_cmp(&dgsm_config_msc_wildcard, &msc->name)) + continue; + vty_out(vty, " msc %s%s", osmo_gt_name(&msc->name), VTY_NEWLINE); + config_write_msc_services(vty, " ", msc); + } + + /* If the server is disabled, still output the above to not lose the service config. */ + if (!c->server.enable) + vty_out(vty, " no server%s", VTY_NEWLINE); + } + + if (c->client.enable) { + vty_out(vty, " client%s", VTY_NEWLINE); + + if (osmo_sockaddr_str_is_nonzero(&c->client.gateway_proxy)) + vty_out(vty, " gateway-proxy %s %u%s", + c->client.gateway_proxy.ip, + c->client.gateway_proxy.port, + VTY_NEWLINE); + + if (c->client.mdns.enable + && osmo_sockaddr_str_is_nonzero(&c->client.mdns.query_addr)) + vty_out(vty, " mdns to %s %u%s", + c->client.mdns.query_addr.ip, + c->client.mdns.query_addr.port, + VTY_NEWLINE); + } + + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_client_gateway_proxy, + cfg_mslookup_client_gateway_proxy_cmd, + "gateway-proxy IP [<1-65535>]", + "Configure a fixed IP address to send all GSUP requests for unknown IMSIs to, without invoking a lookup for IMSI\n" + "IP address of the remote HLR\n" "GSUP port number (omit for default " OSMO_STRINGIFY_VAL(OSMO_GSUP_PORT) ")\n") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + const char *ip_str = argv[0]; + const char *port_str = argc > 1 ? argv[1] : NULL; + struct osmo_sockaddr_str addr; + + if (osmo_sockaddr_str_from_str(&addr, ip_str, port_str ? atoi(port_str) : OSMO_GSUP_PORT) + || !osmo_sockaddr_str_is_nonzero(&addr)) { + vty_out(vty, "%% mslookup client: Invalid address for gateway-proxy: %s %s%s", + ip_str, port_str ? : "", VTY_NEWLINE); + return CMD_WARNING; + } + + c->client.gateway_proxy = addr; + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_client_no_gateway_proxy, + cfg_mslookup_client_no_gateway_proxy_cmd, + "no gateway-proxy", + NO_STR "Disable gateway proxy for GSUP with unknown IMSIs\n") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + c->client.gateway_proxy = (struct osmo_sockaddr_str){}; + return CMD_SUCCESS; +} + +DEFUN(do_mslookup_show_services, + do_mslookup_show_services_cmd, + "show mslookup services", + SHOW_STR "Distributed GSM / mslookup related information\n" + "List configured service addresses as sent to remote mslookup requests\n") +{ + struct dgsm_config *c = &g_hlr->mslookup.vty; + struct dgsm_msc_config *msc; + struct dgsm_service_host *local_hlr = mslookup_server_get_local_gsup_addr(); + + vty_out(vty, "Local GSUP HLR address returned in mslookup responses for local IMSIs:"); + if (osmo_sockaddr_str_is_nonzero(&local_hlr->host_v4)) + vty_out(vty, " " OSMO_SOCKADDR_STR_FMT, + OSMO_SOCKADDR_STR_FMT_ARGS(&local_hlr->host_v4)); + if (osmo_sockaddr_str_is_nonzero(&local_hlr->host_v6)) + vty_out(vty, " " OSMO_SOCKADDR_STR_FMT, + OSMO_SOCKADDR_STR_FMT_ARGS(&local_hlr->host_v6)); + vty_out(vty, "%s", VTY_NEWLINE); + + msc = dgsm_config_msc_get(&dgsm_config_msc_wildcard, false); + if (msc) + config_write_msc_services(vty, "", msc); + + llist_for_each_entry(msc, &c->server.msc_configs, entry) { + if (!osmo_gt_cmp(&dgsm_config_msc_wildcard, &msc->name)) + continue; + vty_out(vty, "msc %s%s", osmo_gt_name(&msc->name), VTY_NEWLINE); + config_write_msc_services(vty, " ", msc); + } + return CMD_SUCCESS; +} + +void dgsm_vty_init() +{ + install_element(CONFIG_NODE, &cfg_mslookup_cmd); + + install_node(&mslookup_node, config_write_mslookup); + install_element(MSLOOKUP_NODE, &cfg_mslookup_mdns_cmd); + install_element(MSLOOKUP_NODE, &cfg_mslookup_no_mdns_cmd); + install_element(MSLOOKUP_NODE, &cfg_mslookup_server_cmd); + install_element(MSLOOKUP_NODE, &cfg_mslookup_no_server_cmd); + + install_node(&mslookup_server_node, NULL); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_mdns_bind_cmd); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_no_mdns_cmd); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_msc_service_cmd); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_msc_no_service_cmd); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_msc_no_service_addr_cmd); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_msc_cmd); + + install_node(&mslookup_server_msc_node, NULL); + install_element(MSLOOKUP_SERVER_MSC_NODE, &cfg_mslookup_server_msc_service_cmd); + install_element(MSLOOKUP_SERVER_MSC_NODE, &cfg_mslookup_server_msc_no_service_cmd); + install_element(MSLOOKUP_SERVER_MSC_NODE, &cfg_mslookup_server_msc_no_service_addr_cmd); + + install_element(MSLOOKUP_NODE, &cfg_mslookup_client_cmd); + install_element(MSLOOKUP_NODE, &cfg_mslookup_no_client_cmd); + install_node(&mslookup_client_node, NULL); + install_element(MSLOOKUP_CLIENT_NODE, &cfg_mslookup_client_timeout_cmd); + install_element(MSLOOKUP_CLIENT_NODE, &cfg_mslookup_client_mdns_cmd); + install_element(MSLOOKUP_CLIENT_NODE, &cfg_mslookup_client_no_mdns_cmd); + install_element(MSLOOKUP_CLIENT_NODE, &cfg_mslookup_client_gateway_proxy_cmd); + install_element(MSLOOKUP_CLIENT_NODE, &cfg_mslookup_client_no_gateway_proxy_cmd); + + install_element_ve(&do_mslookup_show_services_cmd); +} diff --git a/src/gsup_server.c b/src/gsup_server.c index 83329a0..151a882 100644 --- a/src/gsup_server.c +++ b/src/gsup_server.c @@ -28,8 +28,10 @@ #include #include +#include #include #include +#include #define LOG_GSUP_CONN(conn, level, fmt, args...) \ LOGP(DLGSUP, level, "GSUP peer %s: " fmt, \ diff --git a/src/hlr.c b/src/hlr.c index d1647a0..536a240 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -47,6 +48,8 @@ #include #include #include +#include +#include #include struct hlr *g_hlr; @@ -489,6 +492,15 @@ } } + /* Distributed GSM: check whether to proxy for / lookup a remote HLR. + * It would require less database hits to do this only if a local-only operation fails with "unknown IMSI", but + * it becomes semantically easier if we do this once-off ahead of time. */ + if (osmo_mslookup_client_active(g_hlr->mslookup.client.client) + || osmo_sockaddr_str_is_nonzero(&g_hlr->mslookup.vty.client.gateway_proxy)) { + if (dgsm_check_forward_gsup_msg(req)) + return 0; + } + switch (req->gsup.message_type) { /* requests sent to us */ case OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: @@ -692,6 +704,9 @@ exit(1); } + /* Set up llists and objects, startup is happening from VTY commands. */ + dgsm_init(hlr_ctx); + osmo_stats_init(hlr_ctx); vty_init(&vty_info); ctrl_vty_init(hlr_ctx); @@ -746,10 +761,13 @@ LOGP(DMAIN, LOGL_FATAL, "Error starting GSUP server\n"); exit(1); } + proxy_init(g_hlr->gs); g_hlr->ctrl_bind_addr = ctrl_vty_get_bind_addr(); g_hlr->ctrl = hlr_controlif_setup(g_hlr); + dgsm_start(hlr_ctx); + osmo_init_ignore_signals(); signal(SIGINT, &signal_hdlr); signal(SIGTERM, &signal_hdlr); @@ -766,6 +784,7 @@ while (!quit) osmo_select_main_ctx(0); + dgsm_stop(); osmo_gsup_server_destroy(g_hlr->gs); db_close(g_hlr->dbc); diff --git a/src/hlr_vty.c b/src/hlr_vty.c index 6701cd9..e20d2bb 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -39,6 +39,7 @@ #include #include #include +#include struct cmd_node hlr_node = { HLR_NODE, @@ -146,6 +147,24 @@ return CMD_SUCCESS; } +DEFUN(cfg_hlr_gsup_ipa_name, + cfg_hlr_gsup_ipa_name_cmd, + "ipa-name NAME", + "Set the IPA name of this HLR, for proxying to remote HLRs\n" + "A globally unique name for this HLR. For example: PLMN + redundancy server number: HLR-901-70-0. " + "This name is used for GSUP routing and must be set if multiple HLRs interconnect (e.g. mslookup " + "for Distributed GSM).\n") +{ + if (vty->type != VTY_FILE) { + vty_out(vty, "gsup/ipa-name: The GSUP IPA name cannot be changed at run-time; " + "It can only be set in the configuraton file.%s", VTY_NEWLINE); + return CMD_WARNING; + } + + g_hlr->gsup_unit_name.serno = talloc_strdup(g_hlr, argv[0]); + return CMD_SUCCESS; +} + /*********************************************************************** * USSD Entity ***********************************************************************/ @@ -403,6 +422,17 @@ vty->index = NULL; vty->index_sub = NULL; break; + case MSLOOKUP_CLIENT_NODE: + case MSLOOKUP_SERVER_NODE: + vty->node = CONFIG_NODE; + vty->index = NULL; + vty->index_sub = NULL; + break; + case MSLOOKUP_SERVER_MSC_NODE: + vty->node = CONFIG_NODE; + vty->index = NULL; + vty->index_sub = NULL; + break; default: case HLR_NODE: vty->node = CONFIG_NODE; @@ -444,6 +474,7 @@ install_node(&gsup_node, config_write_hlr_gsup); install_element(GSUP_NODE, &cfg_hlr_gsup_bind_ip_cmd); + install_element(GSUP_NODE, &cfg_hlr_gsup_ipa_name_cmd); install_element(HLR_NODE, &cfg_database_cmd); @@ -462,4 +493,5 @@ install_element(HLR_NODE, &cfg_no_subscr_create_on_demand_cmd); hlr_vty_subscriber_init(); + dgsm_vty_init(); } diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index adbfcab..b8eba4d 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -30,6 +30,7 @@ #include #include +#include struct vty; diff --git a/src/logging.c b/src/logging.c index d123fcd..9d3cc62 100644 --- a/src/logging.c +++ b/src/logging.c @@ -31,6 +31,12 @@ .color = "\033[1;33m", .enabled = 1, .loglevel = LOGL_NOTICE, }, + [DDGSM] = { + .name = "DDGSM", + .description = "Distributed GSM: MS lookup and proxy", + .color = "\033[1;35m", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, }; diff --git a/src/mslookup_server.c b/src/mslookup_server.c new file mode 100644 index 0000000..af25e06 --- /dev/null +++ b/src/mslookup_server.c @@ -0,0 +1,302 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const struct osmo_mslookup_result not_found = { + .rc = OSMO_MSLOOKUP_RC_NOT_FOUND, + }; + +static void set_result(struct osmo_mslookup_result *result, + const struct dgsm_service_host *service_host, + uint32_t age) +{ + if (!osmo_sockaddr_str_is_nonzero(&service_host->host_v4) + && !osmo_sockaddr_str_is_nonzero(&service_host->host_v6)) { + *result = not_found; + return; + } + result->rc = OSMO_MSLOOKUP_RC_RESULT; + result->host_v4 = service_host->host_v4; + result->host_v6 = service_host->host_v6; + result->age = age; +} + +struct dgsm_service_host *mslookup_server_get_local_gsup_addr() +{ + static struct dgsm_service_host gsup_bind = {}; + struct dgsm_service_host *host; + + /* Find a HLR/GSUP service set for the server (no VLR unit name) */ + host = dgsm_config_service_get(&dgsm_config_msc_wildcard, OSMO_MSLOOKUP_SERVICE_HLR_GSUP); + if (host) + return host; + + /* Try to use the locally configured GSUP bind address */ + osmo_sockaddr_str_from_str(&gsup_bind.host_v4, g_hlr->gsup_bind_addr, OSMO_GSUP_PORT); + if (gsup_bind.host_v4.af == AF_INET6) { + gsup_bind.host_v6 = gsup_bind.host_v4; + gsup_bind.host_v4 = (struct osmo_sockaddr_str){}; + } + return &gsup_bind; +} + +/* A remote entity is asking us whether we are the home HLR of the given subscriber. */ +static void mslookup_server_rx_hlr_gsup(const struct osmo_mslookup_query *query, + struct osmo_mslookup_result *result) +{ + struct dgsm_service_host *host; + int rc; + switch (query->id.type) { + case OSMO_MSLOOKUP_ID_IMSI: + rc = db_subscr_exists_by_imsi(g_hlr->dbc, query->id.imsi); + break; + case OSMO_MSLOOKUP_ID_MSISDN: + rc = db_subscr_exists_by_msisdn(g_hlr->dbc, query->id.msisdn); + break; + default: + LOGP(DDGSM, LOGL_ERROR, "Unknown mslookup ID type: %d\n", query->id.type); + *result = not_found; + return; + } + + if (rc) { + LOGP(DDGSM, LOGL_DEBUG, "%s: does not exist in local HLR\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL)); + *result = not_found; + return; + } + + LOGP(DDGSM, LOGL_DEBUG, "%s: found in local HLR\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL)); + + host = mslookup_server_get_local_gsup_addr(); + + set_result(result, host, 0); + if (result->rc != OSMO_MSLOOKUP_RC_RESULT) { + LOGP(DDGSM, LOGL_ERROR, + "Subscriber found, but error in service '" OSMO_MSLOOKUP_SERVICE_HLR_GSUP "' config:" + " v4: " OSMO_SOCKADDR_STR_FMT " v6: " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&host->host_v4), + OSMO_SOCKADDR_STR_FMT_ARGS(&host->host_v6)); + } +} + +/* Look in the local HLR record: If the subscriber is "at home" in this HLR and is also currently located at a local + * VLR, we will find a valid location updating with vlr_number, and no vlr_via_proxy entry. */ +static bool subscriber_has_done_lu_here_hlr(const struct osmo_mslookup_query *query, + uint32_t *lu_age, + struct osmo_gt *local_msc_name) +{ + struct hlr_subscriber subscr; + int rc; + uint32_t age; + + switch (query->id.type) { + case OSMO_MSLOOKUP_ID_IMSI: + rc = db_subscr_get_by_imsi(g_hlr->dbc, query->id.imsi, &subscr); + break; + case OSMO_MSLOOKUP_ID_MSISDN: + rc = db_subscr_get_by_msisdn(g_hlr->dbc, query->id.msisdn, &subscr); + break; + default: + LOGP(DDGSM, LOGL_ERROR, "Unknown mslookup ID type: %d\n", query->id.type); + return false; + } + + if (rc) { + LOGP(DDGSM, LOGL_DEBUG, "%s: does not exist in local HLR\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL)); + return false; + } + + if (!subscr.vlr_number[0]) { + LOGP(DDGSM, LOGL_DEBUG, "%s: not attached (vlr_number unset)\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL)); + } + + if (subscr.vlr_via_proxy.len) { + /* The VLR is behind a proxy, the subscriber is not attached to a local VLR but a remote one. That + * remote proxy should instead respond to the service lookup request. */ + LOGP(DDGSM, LOGL_DEBUG, "%s: last attach is not at local VLR, but at VLR '%s' via proxy %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + subscr.vlr_number, + osmo_gt_name(&subscr.vlr_via_proxy)); + return false; + } + + if (!timestamp_age(&subscr.last_lu_seen, &age)) { + LOG_DGSM(subscr.imsi, LOGL_ERROR, "Invalid last_lu_seen timestamp for subscriber\n"); + return false; + } + if (age > g_hlr->mslookup.server.max_age) { + LOGP(DDGSM, LOGL_DEBUG, "%s: last attach was here, but too long ago: %us > %us\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + age, g_hlr->mslookup.server.max_age); + return false; + } + + *lu_age = age; + osmo_gt_set_str(local_msc_name, subscr.vlr_number); + LOGP(DDGSM, LOGL_DEBUG, "%s: attached %u seconds ago at local VLR %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + age, osmo_gt_name(local_msc_name)); + + return true; +} + + +/* Determine whether the subscriber with the given ID has routed a Location Updating via this HLR as first hop. Return + * true if it is attached at a local VLR, and we are serving as proxy for a remote home HLR. + */ +static bool subscriber_has_done_lu_here_proxy(const struct osmo_mslookup_query *query, + uint32_t *lu_age, + struct osmo_gt *local_msc_name) +{ + const struct proxy_subscr *proxy_subscr; + uint32_t age; + + /* See the local HLR record. If the subscriber is "at home" in this HLR and is also currently located here, we + * will find a valid location updating and no vlr_via_proxy entry. */ + switch (query->id.type) { + case OSMO_MSLOOKUP_ID_IMSI: + proxy_subscr = proxy_subscr_get_by_imsi(g_hlr->gs->proxy, query->id.imsi); + break; + case OSMO_MSLOOKUP_ID_MSISDN: + proxy_subscr = proxy_subscr_get_by_msisdn(g_hlr->gs->proxy, query->id.msisdn); + break; + default: + LOGP(DDGSM, LOGL_ERROR, "%s: unknown ID type\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL)); + return false; + } + + if (!proxy_subscr) { + LOGP(DDGSM, LOGL_DEBUG, "%s: does not exist in GSUP proxy\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL)); + return false; + } + + /* We only need to care about CS LU, since only CS services need D-GSM routing. */ + if (!timestamp_age(&proxy_subscr->cs.last_lu, &age) + || age > g_hlr->mslookup.server.max_age) { + LOGP(DDGSM, LOGL_ERROR, + "%s: last attach was at local VLR (proxying for remote HLR), but too long ago: %us > %us\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + age, g_hlr->mslookup.server.max_age); + return false; + } + + if (proxy_subscr->cs.vlr_via_proxy.len) { + LOGP(DDGSM, LOGL_DEBUG, "%s: last attach is not at local VLR, but at VLR '%s' via proxy '%s'\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + osmo_gt_name(&proxy_subscr->cs.vlr_name), + osmo_gt_name(&proxy_subscr->cs.vlr_via_proxy)); + return false; + } + + *lu_age = age; + *local_msc_name = proxy_subscr->cs.vlr_name; + LOGP(DDGSM, LOGL_DEBUG, "%s: attached %u seconds ago at local VLR %s; proxying for remote HLR " + OSMO_SOCKADDR_STR_FMT "\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + age, osmo_gt_name(local_msc_name), + OSMO_SOCKADDR_STR_FMT_ARGS(&proxy_subscr->remote_hlr_addr)); + + return true; +} + +static bool subscriber_has_done_lu_here(const struct osmo_mslookup_query *query, + uint32_t *lu_age_p, + struct osmo_gt *local_msc_name) +{ + bool attached_here; + uint32_t lu_age = 0; + struct osmo_gt msc_name = {}; + bool attached_here_proxy; + uint32_t proxy_lu_age = 0; + struct osmo_gt proxy_msc_name = {}; + + /* First ask the local HLR db, but if the local proxy record indicates a more recent LU, use that instead. + * For all usual cases, only one of these will reflect a LU, even if a subscriber had more than one home HLR: + * - if the subscriber is known here, we will never proxy. + * - if the subscriber is not known here, this local HLR db will never record a LU. + * However, if a subscriber was being proxied to a remote home HLR, and if then the subscriber was also added to + * the local HLR database, there might occur a situation where both reflect a LU. So, to be safe against all + * situations, compare the two entries. + */ + attached_here = subscriber_has_done_lu_here_hlr(query, &lu_age, &msc_name); + attached_here_proxy = subscriber_has_done_lu_here_proxy(query, &proxy_lu_age, &proxy_msc_name); + + /* If proxy has a younger lu, replace. */ + if (attached_here_proxy && (!attached_here || (proxy_lu_age < lu_age))) { + attached_here = true; + lu_age = proxy_lu_age; + msc_name = proxy_msc_name; + } + + if (attached_here && !msc_name.len) { + LOGP(DDGSM, LOGL_ERROR, "%s: attached here, but no VLR name known\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL)); + return false; + } + + if (!attached_here) { + /* Already logged "not attached" for both local-db and proxy attach */ + return false; + } + + LOGP(DDGSM, LOGL_INFO, "%s: attached here, at VLR %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + osmo_gt_name(&msc_name)); + *lu_age_p = lu_age; + *local_msc_name = msc_name; + return true; +} + +/* A remote entity is asking us whether we are providing the given service for the given subscriber. */ +void osmo_mslookup_server_rx(const struct osmo_mslookup_query *query, + struct osmo_mslookup_result *result) +{ + const struct dgsm_service_host *service_host; + uint32_t age; + struct osmo_gt msc_name; + + /* A request for a home HLR: answer exactly if this is the subscriber's home HLR, i.e. the IMSI is listed in the + * HLR database. */ + if (strcmp(query->service, OSMO_MSLOOKUP_SERVICE_HLR_GSUP) == 0) + return mslookup_server_rx_hlr_gsup(query, result); + + /* All other service types: answer when the subscriber has done a LU that is either listed in the local HLR or + * in the GSUP proxy database: i.e. if the subscriber has done a Location Updating at an VLR belonging to this + * HLR. Respond with whichever services are configured in the osmo-hlr.cfg. */ + if (!subscriber_has_done_lu_here(query, &age, &msc_name)) { + *result = not_found; + return; + } + + /* We've detected a LU here. The VLR where the LU happened is stored in msc_unit_name, and the LU age is stored + * in 'age'. Figure out the address configured for that VLR and service name. */ + service_host = dgsm_config_service_get(&msc_name, query->service); + + if (!service_host) { + /* Find such service set globally (no VLR unit name) */ + service_host = dgsm_config_service_get(&dgsm_config_msc_wildcard, query->service); + } + + if (!service_host) { + LOGP(DDGSM, LOGL_ERROR, + "%s: subscriber found, but no service %s configured, cannot service lookup request\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + osmo_quote_str_c(OTC_SELECT, query->service, -1)); + *result = not_found; + return; + } + + set_result(result, service_host, age); +} diff --git a/src/mslookup_server_mdns.c b/src/mslookup_server_mdns.c new file mode 100644 index 0000000..b758cb5 --- /dev/null +++ b/src/mslookup_server_mdns.c @@ -0,0 +1,100 @@ +#include +#include + +#include +#include +#include +#include +#include + +static void osmo_mslookup_server_mdns_tx(struct osmo_mslookup_server_mdns *server, + uint16_t packet_id, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + struct msgb *msg; + const char *errmsg = NULL; + void *ctx = talloc_named_const(server, 0, __func__); + + msg = osmo_mdns_result_encode(ctx, packet_id, query, result); + if (!msg) + errmsg = "Error encoding mDNS answer packet"; + else if (osmo_mdns_sock_send(server->sock, msg)) + errmsg = "Error sending mDNS answer"; + if (errmsg) + LOGP(DDGSM, LOGL_ERROR, "%s: mDNS: %s\n", osmo_mslookup_result_name_c(ctx, query, result), errmsg); + talloc_free(ctx); +} + +static void osmo_mslookup_server_mdns_handle_request(uint16_t packet_id, + struct osmo_mslookup_server_mdns *server, + const struct osmo_mslookup_query *query) +{ + struct osmo_mslookup_result result; + + osmo_mslookup_server_rx(query, &result); + /* Error logging already happens in osmo_mslookup_server_rx() */ + if (result.rc != OSMO_MSLOOKUP_RC_RESULT) + return; + + osmo_mslookup_server_mdns_tx(server, packet_id, query, &result); +} + +static int osmo_mslookup_server_mdns_rx(struct osmo_fd *osmo_fd, unsigned int what) +{ + struct osmo_mslookup_server_mdns *server = osmo_fd->data; + struct osmo_mslookup_query *query; + uint16_t packet_id; + int n; + uint8_t buffer[1024]; + void *ctx; + + /* Parse the message and print it */ + n = read(osmo_fd->fd, buffer, sizeof(buffer)); + if (n < 0) + return n; + + ctx = talloc_named_const(server, 0, __func__); + query = osmo_mdns_query_decode(ctx, buffer, n, &packet_id); + if (!query) { + talloc_free(ctx); + return -1; + } + + osmo_mslookup_id_name_buf((char *)buffer, sizeof(buffer), &query->id); + LOGP(DDGSM, LOGL_DEBUG, "mDNS rx request: %s.%s\n", query->service, buffer); + osmo_mslookup_server_mdns_handle_request(packet_id, server, query); + talloc_free(ctx); + return n; +} + +struct osmo_mslookup_server_mdns *osmo_mslookup_server_mdns_start(void *ctx, const struct osmo_sockaddr_str *bind_addr) +{ + struct osmo_mslookup_server_mdns *server = talloc_zero(ctx, struct osmo_mslookup_server_mdns); + OSMO_ASSERT(server); + *server = (struct osmo_mslookup_server_mdns){ + .bind_addr = *bind_addr, + }; + + server->sock = osmo_mdns_sock_init(server, + bind_addr->ip, bind_addr->port, + osmo_mslookup_server_mdns_rx, + server, 0); + if (!server->sock) { + LOGP(DDGSM, LOGL_ERROR, + "mslookup mDNS server: error initializing multicast bind on " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(bind_addr)); + talloc_free(server); + return NULL; + } + + return server; +} + +void osmo_mslookup_server_mdns_stop(struct osmo_mslookup_server_mdns *server) +{ + if (!server) + return; + osmo_mdns_sock_cleanup(server->sock); + talloc_free(server); +} diff --git a/src/proxy.c b/src/proxy.c new file mode 100644 index 0000000..7ccedbb --- /dev/null +++ b/src/proxy.c @@ -0,0 +1,557 @@ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#define LOG_PROXY_SUBSCR(proxy_subscr, level, fmt, args...) \ + LOGP(DDGSM, level, "(Proxy IMSI-%s MSISDN-%s HLR-" OSMO_SOCKADDR_STR_FMT ") " fmt, \ + ((proxy_subscr) && *(proxy_subscr)->imsi)? (proxy_subscr)->imsi : "?", \ + ((proxy_subscr) && *(proxy_subscr)->msisdn)? (proxy_subscr)->msisdn : "?", \ + OSMO_SOCKADDR_STR_FMT_ARGS((proxy_subscr)? &(proxy_subscr)->remote_hlr_addr : NULL), \ + ##args) + +#define LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup_msg, level, fmt, args...) \ + LOG_PROXY_SUBSCR(proxy_subscr, level, "%s: " fmt, \ + (gsup_msg) ? osmo_gsup_message_type_name((gsup_msg)->message_type) : "NULL", \ + ##args) + +/* Why have a separate struct to add an llist_head entry? + * This is to keep the option open to store the proxy data in the database instead, without any visible effect outside + * of proxy.c. */ +struct proxy_subscr_listentry { + struct llist_head entry; + timestamp_t last_update; + struct proxy_subscr data; +}; + +/* Central implementation to set a timestamp to the current time, in case we want to modify this in the future. */ +void timestamp_update(timestamp_t *timestamp) +{ + struct timeval tv; + time_t raw; + struct tm utc; + /* The simpler way would be just time(&raw), but by using osmo_gettimeofday() we can also use + * osmo_gettimeofday_override for unit tests independent from real time. */ + osmo_gettimeofday(&tv, NULL); + raw = tv.tv_sec; + gmtime_r(&raw, &utc); + *timestamp = mktime(&utc); +} + +/* Calculate seconds since a given timestamp was taken. Return true for a valid age returned in age_p, return false if + * the timestamp is either in the future or the age surpasses uint32_t range. When false is returned, *age_p is set to + * UINT32_MAX. */ +bool timestamp_age(const timestamp_t *timestamp, uint32_t *age_p) +{ + int64_t age64; + timestamp_t now; + timestamp_update(&now); + age64 = (int64_t)now - (int64_t)(*timestamp); + if (age64 < 0 || age64 > UINT32_MAX) { + *age_p = UINT32_MAX; + return false; + } + *age_p = (uint32_t)age64; + return true; +} + +/* Defer a GSUP message until we know a remote HLR to proxy to. + * Where to send this GSUP message is indicated by its IMSI: as soon as an MS lookup has yielded the IMSI's home HLR, + * that's where the message should go. */ +static void proxy_defer_gsup_req(struct proxy *proxy, struct osmo_gsup_req *req) +{ + struct proxy_pending_gsup_req *m; + + m = talloc_zero(proxy, struct proxy_pending_gsup_req); + OSMO_ASSERT(m); + m->req = req; + timestamp_update(&m->received_at); + llist_add_tail(&m->entry, &proxy->pending_gsup_reqs); +} + +/* Unable to resolve remote HLR for this IMSI, Answer with error back to the sender. */ +static void proxy_defer_gsup_message_err(struct proxy *proxy, struct proxy_pending_gsup_req *m) +{ + osmo_gsup_req_respond_err(m->req, GMM_CAUSE_IMSI_UNKNOWN, "could not reach home HLR"); + m->req = NULL; +} + +/* Forward spooled message for this IMSI to remote HLR. */ +static void proxy_defer_gsup_message_send(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct proxy_pending_gsup_req *m, struct remote_hlr *remote_hlr) +{ + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &m->req->gsup, LOGL_INFO, "Forwarding deferred message\n"); + proxy_subscr_forward_to_remote_hlr_resolved(proxy, proxy_subscr, remote_hlr, m->req); + m->req = NULL; +} + +/* Result of looking for remote HLR. If it failed, pass remote_hlr as NULL. On failure, the proxy_subscr and the + * remote_hlr may be passed NULL. The IMSI then reflects who the error was for. */ +static void proxy_defer_gsup_message_pop(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + const char *imsi, struct remote_hlr *remote_hlr) +{ + struct proxy_pending_gsup_req *m, *n; + if (!imsi && proxy_subscr) + imsi = proxy_subscr->imsi; + OSMO_ASSERT(imsi); + + if (!remote_hlr) + LOGP(DDGSM, LOGL_ERROR, "IMSI-%s: No remote HLR found, dropping spooled GSUP messages\n", imsi); + + llist_for_each_entry_safe(m, n, &proxy->pending_gsup_reqs, entry) { + if (strcmp(m->req->gsup.imsi, imsi)) + continue; + + if (!remote_hlr) + proxy_defer_gsup_message_err(proxy, m); + else + proxy_defer_gsup_message_send(proxy, proxy_subscr, m, remote_hlr); + + llist_del(&m->entry); + talloc_free(m); + } +} + + +static bool proxy_subscr_matches_imsi(const struct proxy_subscr *proxy_subscr, const char *imsi) +{ + if (!proxy_subscr || !imsi) + return false; + return strcmp(proxy_subscr->imsi, imsi) == 0; +} + +static bool proxy_subscr_matches_msisdn(const struct proxy_subscr *proxy_subscr, const char *msisdn) +{ + if (!proxy_subscr || !msisdn) + return false; + return strcmp(proxy_subscr->msisdn, msisdn) == 0; +} + +static struct proxy_subscr_listentry *_proxy_get_by_imsi(struct proxy *proxy, const char *imsi) +{ + struct proxy_subscr_listentry *e; + if (!proxy) + return NULL; + llist_for_each_entry(e, &proxy->subscr_list, entry) { + if (proxy_subscr_matches_imsi(&e->data, imsi)) + return e; + } + return NULL; +} + +static struct proxy_subscr_listentry *_proxy_get_by_msisdn(struct proxy *proxy, const char *msisdn) +{ + struct proxy_subscr_listentry *e; + if (!proxy) + return NULL; + llist_for_each_entry(e, &proxy->subscr_list, entry) { + if (proxy_subscr_matches_msisdn(&e->data, msisdn)) + return e; + } + return NULL; +} + +const struct proxy_subscr *proxy_subscr_get_by_imsi(struct proxy *proxy, const char *imsi) +{ + struct proxy_subscr_listentry *e = _proxy_get_by_imsi(proxy, imsi); + if (!e) + return NULL; + return &e->data; +} + +const struct proxy_subscr *proxy_subscr_get_by_msisdn(struct proxy *proxy, const char *msisdn) +{ + struct proxy_subscr_listentry *e = _proxy_get_by_msisdn(proxy, msisdn); + if (!e) + return NULL; + return &e->data; +} + +void proxy_subscrs_get_by_remote_hlr(struct proxy *proxy, const struct osmo_sockaddr_str *remote_hlr_addr, + bool (*yield)(struct proxy *proxy, const struct proxy_subscr *subscr, void *data), + void *data) +{ + struct proxy_subscr_listentry *e; + if (!proxy) + return; + llist_for_each_entry(e, &proxy->subscr_list, entry) { + if (!osmo_sockaddr_str_cmp(remote_hlr_addr, &e->data.remote_hlr_addr)) { + if (!yield(proxy, &e->data, data)) + return; + } + } +} + +int proxy_subscr_update(struct proxy *proxy, const struct proxy_subscr *proxy_subscr) +{ + struct proxy_subscr_listentry *e = _proxy_get_by_imsi(proxy, proxy_subscr->imsi); + if (!e) { + /* Does not exist yet */ + e = talloc_zero(proxy, struct proxy_subscr_listentry); + llist_add(&e->entry, &proxy->subscr_list); + } + e->data = *proxy_subscr; + timestamp_update(&e->last_update); + return 0; +} + +int _proxy_subscr_del(struct proxy_subscr_listentry *e) +{ + llist_del(&e->entry); + return 0; +} + +int proxy_subscr_del(struct proxy *proxy, const char *imsi) +{ + struct proxy_subscr_listentry *e; + proxy_defer_gsup_message_pop(proxy, NULL, imsi, NULL); + e = _proxy_get_by_imsi(proxy, imsi); + if (!e) + return -ENOENT; + return _proxy_subscr_del(e); +} + +/* Discard stale proxy entries. */ +static void proxy_cleanup(void *proxy_v) +{ + struct proxy *proxy = proxy_v; + struct proxy_subscr_listentry *e, *n; + uint32_t age; + llist_for_each_entry_safe(e, n, &proxy->subscr_list, entry) { + if (!timestamp_age(&e->last_update, &age)) + LOGP(DDGSM, LOGL_ERROR, "Invalid timestamp, deleting proxy entry\n"); + else if (age <= proxy->fresh_time) + continue; + LOG_PROXY_SUBSCR(&e->data, LOGL_INFO, "proxy entry timed out, deleting\n"); + _proxy_subscr_del(e); + } + if (proxy->gc_period) + osmo_timer_schedule(&proxy->gc_timer, proxy->gc_period, 0); + else + LOGP(DDGSM, LOGL_NOTICE, "Proxy cleanup is switched off (gc_period == 0)\n"); +} + +void proxy_set_gc_period(struct proxy *proxy, uint32_t gc_period) +{ + proxy->gc_period = gc_period; + proxy_cleanup(proxy); +} + +void proxy_init(struct osmo_gsup_server *gsup_server_to_vlr) +{ + OSMO_ASSERT(!gsup_server_to_vlr->proxy); + struct proxy *proxy = talloc_zero(gsup_server_to_vlr, struct proxy); + *proxy = (struct proxy){ + .gsup_server_to_vlr = gsup_server_to_vlr, + .fresh_time = 60*60, + .gc_period = 60, + }; + INIT_LLIST_HEAD(&proxy->subscr_list); + INIT_LLIST_HEAD(&proxy->pending_gsup_reqs); + + osmo_timer_setup(&proxy->gc_timer, proxy_cleanup, proxy); + /* Invoke to trigger the first timer schedule */ + proxy_set_gc_period(proxy, proxy->gc_period); + gsup_server_to_vlr->proxy = proxy; +} + +void proxy_del(struct proxy *proxy) +{ + osmo_timer_del(&proxy->gc_timer); + talloc_free(proxy); +} + +void proxy_subscr_remote_hlr_up(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr) +{ + proxy_defer_gsup_message_pop(proxy, proxy_subscr, proxy_subscr->imsi, remote_hlr); +} + +void proxy_subscr_remote_hlr_resolved(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr) +{ + struct proxy_subscr proxy_subscr_new; + + if (osmo_sockaddr_str_is_nonzero(&proxy_subscr->remote_hlr_addr)) { + if (!osmo_sockaddr_str_cmp(&remote_hlr->addr, &proxy_subscr->remote_hlr_addr)) { + /* Already have this remote address */ + return; + } else { + LOG_PROXY_SUBSCR(proxy_subscr, LOGL_NOTICE, + "Remote HLR address changes to " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&remote_hlr->addr)); + } + } + + /* Store the address. Make a copy to modify. */ + proxy_subscr_new = *proxy_subscr; + proxy_subscr = &proxy_subscr_new; + proxy_subscr_new.remote_hlr_addr = remote_hlr->addr; + + if (proxy_subscr_update(proxy, proxy_subscr)) { + LOG_PROXY_SUBSCR(proxy_subscr, LOGL_ERROR, "Failed to store proxy entry for remote HLR\n"); + /* If no remote HLR is known for the IMSI, the proxy entry is pointless. */ + proxy_subscr_del(proxy, proxy_subscr->imsi); + return; + } + LOG_PROXY_SUBSCR(proxy_subscr, LOGL_DEBUG, "Remote HLR resolved, stored address\n"); +} + +/* All GSUP messages sent to the remote HLR pass through this function, to modify the subscriber state or disallow + * sending the message. Return 0 to allow sending the message. */ +static int proxy_acknowledge_gsup_to_remote_hlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + const struct osmo_gsup_req *req) +{ + struct proxy_subscr proxy_subscr_new = *proxy_subscr; + bool ps; + bool cs; + int rc; + + switch (req->gsup.message_type) { + + case OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: + /* Store the CS and PS VLR name in vlr_name_preliminary to later update the right {cs,ps} LU timestamp + * when receiving an OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT. Store in vlr_name_preliminary so that in + * case the LU fails, we keep the vlr_name intact. */ + switch (req->gsup.cn_domain) { + case OSMO_GSUP_CN_DOMAIN_CS: + proxy_subscr_new.cs.vlr_name_preliminary = req->source_name; + break; + case OSMO_GSUP_CN_DOMAIN_PS: + proxy_subscr_new.ps.vlr_name_preliminary = req->source_name; + break; + default: + break; + } + + ps = cs = false; + if (osmo_gt_cmp(&proxy_subscr_new.cs.vlr_name_preliminary, &proxy_subscr->cs.vlr_name_preliminary)) + cs = true; + if (osmo_gt_cmp(&proxy_subscr_new.ps.vlr_name_preliminary, &proxy_subscr->ps.vlr_name_preliminary)) + ps = true; + + if (!(cs || ps)) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, LOGL_DEBUG, "VLR names remain unchanged\n"); + break; + } + + rc = proxy_subscr_update(proxy, &proxy_subscr_new); + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, rc ? LOGL_ERROR : LOGL_INFO, + "%s: preliminary VLR name for%s%s to %s\n", + rc ? "failed to update" : "updated", + cs ? " CS" : "", ps ? " PS" : "", + osmo_gt_name(&req->source_name)); + break; + /* TODO: delete proxy entry in case of a Purge Request? */ + default: + break; + } + return 0; +} + +/* All GSUP messages received from the remote HLR to be sent to a local MSC pass through this function, to modify the + * subscriber state or disallow sending the message. Return 0 to allow sending the message. + * The local MSC shall be indicated by gsup.destination_name. */ +static int proxy_acknowledge_gsup_from_remote_hlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + const struct osmo_gsup_message *gsup, + struct remote_hlr *from_remote_hlr, + const struct osmo_gt *destination, + const struct osmo_gt *via_peer) +{ + struct proxy_subscr proxy_subscr_new = *proxy_subscr; + bool ps; + bool cs; + bool vlr_name_changed_cs; + bool vlr_name_changed_ps; + int rc; + struct osmo_gt via_proxy = {}; + if (osmo_gt_cmp(via_peer, destination)) + via_proxy = *via_peer; + + switch (gsup->message_type) { + case OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: + /* Remember the MSISDN of the subscriber. This does not need to be a preliminary record, because when + * the HLR tells us about subscriber data, it is definitive info and there is no ambiguity (like there + * would be with failed LU attempts from various sources). */ + if (!gsup->msisdn_enc_len) + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_DEBUG, "No MSISDN in this Insert Data Request\n"); + else if (gsm48_decode_bcd_number2(proxy_subscr_new.msisdn, sizeof(proxy_subscr_new.msisdn), + gsup->msisdn_enc, gsup->msisdn_enc_len, 0)) + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, "Failed to decode MSISDN\n"); + else if (!osmo_msisdn_str_valid(proxy_subscr_new.msisdn)) + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, "invalid MSISDN: %s\n", + osmo_quote_str_c(OTC_SELECT, proxy_subscr_new.msisdn, -1)); + else if (!strcmp(proxy_subscr->msisdn, proxy_subscr_new.msisdn)) + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_DEBUG, "already have MSISDN = %s\n", + proxy_subscr_new.msisdn); + else if (proxy_subscr_update(proxy, &proxy_subscr_new)) + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, "failed to update MSISDN to %s\n", + proxy_subscr_new.msisdn); + else + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_INFO, "stored MSISDN=%s\n", + proxy_subscr_new.msisdn); + break; + + case OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: + /* Update the Location Updating timestamp */ + cs = ps = false; + if (!osmo_gt_cmp(destination, &proxy_subscr->cs.vlr_name_preliminary)) { + timestamp_update(&proxy_subscr_new.cs.last_lu); + proxy_subscr_new.cs.vlr_name_preliminary = (struct osmo_gt){}; + vlr_name_changed_cs = + osmo_gt_cmp(&proxy_subscr->cs.vlr_name, destination) + || osmo_gt_cmp(&proxy_subscr->cs.vlr_via_proxy, &via_proxy); + proxy_subscr_new.cs.vlr_name = *destination; + proxy_subscr_new.cs.vlr_via_proxy = via_proxy; + cs = true; + } + if (!osmo_gt_cmp(destination, &proxy_subscr->ps.vlr_name_preliminary)) { + timestamp_update(&proxy_subscr_new.ps.last_lu); + proxy_subscr_new.ps.vlr_name_preliminary = (struct osmo_gt){}; + proxy_subscr_new.ps.vlr_name = *destination; + vlr_name_changed_ps = + osmo_gt_cmp(&proxy_subscr->ps.vlr_name, destination) + || osmo_gt_cmp(&proxy_subscr->ps.vlr_via_proxy, &via_proxy); + proxy_subscr_new.ps.vlr_via_proxy = via_proxy; + ps = true; + } + if (!(cs || ps)) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, + "destination is neither CS nor PS VLR: %s\n", + osmo_gt_name(destination)); + return GMM_CAUSE_PROTO_ERR_UNSPEC; + } + rc = proxy_subscr_update(proxy, &proxy_subscr_new); + + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, rc ? LOGL_ERROR : LOGL_INFO, + "%s LU: timestamp for%s%s%s%s%s%s%s%s%s%s\n", + rc ? "failed to update" : "updated", + cs ? " CS" : "", ps ? " PS" : "", + vlr_name_changed_cs? ", CS VLR=" : "", + vlr_name_changed_cs? osmo_gt_name(&proxy_subscr_new.cs.vlr_name) : "", + proxy_subscr_new.cs.vlr_via_proxy.len ? " via proxy " : "", + proxy_subscr_new.cs.vlr_via_proxy.len ? + osmo_gt_name(&proxy_subscr_new.cs.vlr_via_proxy) : "", + vlr_name_changed_ps? ", PS VLR=" : "", + vlr_name_changed_ps? osmo_gt_name(&proxy_subscr_new.ps.vlr_name) : "", + proxy_subscr_new.ps.vlr_via_proxy.len ? " via proxy " : "", + proxy_subscr_new.ps.vlr_via_proxy.len ? + osmo_gt_name(&proxy_subscr_new.ps.vlr_via_proxy) : "" + ); + break; + + default: + break; + } + + return 0; +} + + +void proxy_subscr_forward_to_remote_hlr_resolved(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr, struct osmo_gsup_req *req) +{ + if (proxy_acknowledge_gsup_to_remote_hlr(proxy, proxy_subscr, req)) { + osmo_gsup_req_respond_err(req, GMM_CAUSE_PROTO_ERR_UNSPEC, "Proxy does not allow this message"); + return; + } + + remote_hlr_gsup_forward_to_remote_hlr(remote_hlr, req); +} + +void proxy_subscr_forward_to_remote_hlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, struct osmo_gsup_req *req) +{ + struct remote_hlr *remote_hlr; + + if (!osmo_sockaddr_str_is_nonzero(&proxy_subscr->remote_hlr_addr)) { + /* We don't know the remote target yet. Still waiting for an MS lookup response. */ + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, LOGL_DEBUG, "deferring until remote HLR is known\n"); + proxy_defer_gsup_req(proxy, req); + return; + } + + if (req->via_proxy.len) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, LOGL_INFO, "VLR->HLR: forwarding from %s via proxy %s\n", + osmo_gt_name(&req->source_name), + osmo_gt_name(&req->via_proxy)); + } else { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, LOGL_INFO, "VLR->HLR: forwarding from %s\n", + osmo_gt_name(&req->source_name)); + } + + remote_hlr = remote_hlr_get(&proxy_subscr->remote_hlr_addr, true); + if (!remote_hlr) { + osmo_gsup_req_respond_err(req, GMM_CAUSE_NET_FAIL, + "Proxy: Failed to establish connection to remote HLR " OSMO_SOCKADDR_STR_FMT, + OSMO_SOCKADDR_STR_FMT_ARGS(&proxy_subscr->remote_hlr_addr)); + return; + } + + if (!remote_hlr->gsupc || !remote_hlr->gsupc->is_connected) { + /* GSUP link is still busy establishing... */ + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, LOGL_DEBUG, + "deferring until link to remote HLR is up\n"); + proxy_defer_gsup_req(proxy, req); + return; + } + + proxy_subscr_forward_to_remote_hlr_resolved(proxy, proxy_subscr, remote_hlr, req); +} + +int proxy_subscr_forward_to_vlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + const struct osmo_gsup_message *gsup, struct remote_hlr *from_remote_hlr) +{ + struct osmo_gt destination; + struct osmo_gsup_conn *vlr_conn; + struct msgb *msg; + + if (osmo_gt_set(&destination, gsup->destination_name, gsup->destination_name_len)) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, + "no valid Destination Name IE, cannot route to VLR.\n"); + return GMM_CAUSE_INV_MAND_INFO; + } + + /* Route to MSC/SGSN that we're proxying for */ + vlr_conn = gsup_route_find_gt(proxy->gsup_server_to_vlr, &destination); + if (!vlr_conn) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, + "Destination VLR unreachable: %s\n", osmo_gt_name(&destination)); + return GMM_CAUSE_MSC_TEMP_NOTREACH; + } + + if (proxy_acknowledge_gsup_from_remote_hlr(proxy, proxy_subscr, gsup, from_remote_hlr, &destination, + &vlr_conn->peer_name)) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, + "Proxy does not allow forwarding this message\n"); + return GMM_CAUSE_PROTO_ERR_UNSPEC; + } + + msg = osmo_gsup_msgb_alloc("GSUP proxy to VLR"); + if (osmo_gsup_encode(msg, gsup)) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, + "Failed to re-encode GSUP message, cannot forward\n"); + return GMM_CAUSE_INV_MAND_INFO; + } + + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_INFO, "VLR<-HLR: forwarding to %s%s%s\n", + osmo_gt_name(&destination), + osmo_gt_cmp(&destination, &vlr_conn->peer_name) ? " via " : "", + osmo_gt_cmp(&destination, &vlr_conn->peer_name) ? + osmo_gt_name(&vlr_conn->peer_name) : ""); + return osmo_gsup_conn_send(vlr_conn, msg); +} diff --git a/src/remote_hlr.c b/src/remote_hlr.c new file mode 100644 index 0000000..78339d4 --- /dev/null +++ b/src/remote_hlr.c @@ -0,0 +1,181 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static LLIST_HEAD(remote_hlrs); + +static void remote_hlr_err_reply(struct remote_hlr *rh, const struct osmo_gsup_message *gsup_orig, + enum gsm48_gmm_cause cause) +{ + struct osmo_gsup_message gsup_reply; + + /* No need to answer if we couldn't parse an ERROR message type, only REQUESTs need an error reply. */ + if (!OSMO_GSUP_IS_MSGT_REQUEST(gsup_orig->message_type)) + return; + + gsup_reply = (struct osmo_gsup_message){ + .cause = cause, + .message_type = OSMO_GSUP_TO_MSGT_ERROR(gsup_orig->message_type), + .message_class = gsup_orig->message_class, + + /* RP-Message-Reference is mandatory for SM Service */ + .sm_rp_mr = gsup_orig->sm_rp_mr, + }; + + OSMO_STRLCPY_ARRAY(gsup_reply.imsi, gsup_orig->imsi); + + /* For SS/USSD, it's important to keep both session state and ID IEs */ + if (gsup_orig->session_state != OSMO_GSUP_SESSION_STATE_NONE) { + gsup_reply.session_state = OSMO_GSUP_SESSION_STATE_END; + gsup_reply.session_id = gsup_orig->session_id; + } + + if (osmo_gsup_client_enc_send(rh->gsupc, &gsup_reply)) + LOGP(DLGSUP, LOGL_ERROR, "Failed to send Error reply (imsi=%s)\n", + osmo_quote_str(gsup_orig->imsi, -1)); +} + +/* We are receiving a GSUP message from a remote HLR to go back to a local MSC. + * The local MSC shall be indicated by gsup.destination_name. */ +static int remote_hlr_rx(struct osmo_gsup_client *gsupc, struct msgb *msg) +{ + struct remote_hlr *rh = gsupc->data; + const struct proxy_subscr *proxy_subscr; + struct osmo_gsup_message gsup; + int rc; + + rc = osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup); + if (rc < 0) { + LOG_REMOTE_HLR(rh, LOGL_ERROR, "Failed to decode GSUP message: '%s' (%d) [ %s]\n", + get_value_string(gsm48_gmm_cause_names, -rc), + -rc, osmo_hexdump(msg->data, msg->len)); + return rc; + } + + if (!osmo_imsi_str_valid(gsup.imsi)) { + LOG_REMOTE_HLR_MSG(rh, &gsup, LOGL_ERROR, "Invalid IMSI\n"); + remote_hlr_err_reply(rh, &gsup, GMM_CAUSE_INV_MAND_INFO); + return -GMM_CAUSE_INV_MAND_INFO; + } + + proxy_subscr = proxy_subscr_get_by_imsi(g_hlr->gs->proxy, gsup.imsi); + if (!proxy_subscr) { + LOG_REMOTE_HLR_MSG(rh, &gsup, LOGL_ERROR, "No proxy entry for this IMSI\n"); + remote_hlr_err_reply(rh, &gsup, GMM_CAUSE_NET_FAIL); + return -GMM_CAUSE_NET_FAIL; + } + + rc = proxy_subscr_forward_to_vlr(g_hlr->gs->proxy, proxy_subscr, &gsup, rh); + if (rc) { + LOG_REMOTE_HLR_MSG(rh, &gsup, LOGL_ERROR, "Failed to forward GSUP message towards VLR\n"); + remote_hlr_err_reply(rh, &gsup, GMM_CAUSE_NET_FAIL); + return -GMM_CAUSE_NET_FAIL; + } + return 0; +} + +static bool remote_hlr_up_yield(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, void *data) +{ + struct remote_hlr *remote_hlr = data; + proxy_subscr_remote_hlr_up(proxy, proxy_subscr, remote_hlr); + return true; +} + +static bool remote_hlr_up_down(struct osmo_gsup_client *gsupc, bool up) +{ + struct remote_hlr *remote_hlr = gsupc->data; + if (!up) { + LOG_REMOTE_HLR(remote_hlr, LOGL_NOTICE, "link to remote HLR is down, removing GSUP client\n"); + remote_hlr_destroy(remote_hlr); + return false; + } + + LOG_REMOTE_HLR(remote_hlr, LOGL_NOTICE, "link up\n"); + proxy_subscrs_get_by_remote_hlr(g_hlr->gs->proxy, &remote_hlr->addr, remote_hlr_up_yield, remote_hlr); + return true; +} + +struct remote_hlr *remote_hlr_get(const struct osmo_sockaddr_str *addr, bool create) +{ + struct remote_hlr *rh; + + llist_for_each_entry(rh, &remote_hlrs, entry) { + if (!osmo_sockaddr_str_cmp(&rh->addr, addr)) + return rh; + } + + if (!create) + return NULL; + + /* Doesn't exist yet, create a GSUP client to remote HLR. */ + rh = talloc_zero(dgsm_ctx, struct remote_hlr); + OSMO_ASSERT(rh); + *rh = (struct remote_hlr){ + .addr = *addr, + .gsupc = osmo_gsup_client_create3(rh, &g_hlr->gsup_unit_name, + addr->ip, addr->port, + NULL, + remote_hlr_rx, + remote_hlr_up_down, + rh), + }; + if (!rh->gsupc) { + LOGP(DDGSM, LOGL_ERROR, + "Failed to establish connection to remote HLR " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(addr)); + talloc_free(rh); + return NULL; + } + rh->gsupc->data = rh; + llist_add(&rh->entry, &remote_hlrs); + return rh; +} + +void remote_hlr_destroy(struct remote_hlr *remote_hlr) +{ + osmo_gsup_client_destroy(remote_hlr->gsupc); + remote_hlr->gsupc = NULL; + llist_del(&remote_hlr->entry); + talloc_free(remote_hlr); +} + +/* This function takes ownership of the msg, do not free it after passing to this function. */ +int remote_hlr_msgb_send(struct remote_hlr *remote_hlr, struct msgb *msg) +{ + int rc = osmo_gsup_client_send(remote_hlr->gsupc, msg); + if (rc) { + LOGP(DDGSM, LOGL_ERROR, "Failed to send GSUP message to " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&remote_hlr->addr)); + } + return rc; +} + +/* A GSUP message was received from the MS/MSC side, forward it to the remote HLR. */ +void remote_hlr_gsup_forward_to_remote_hlr(struct remote_hlr *remote_hlr, struct osmo_gsup_req *req) +{ + int rc; + struct msgb *msg = osmo_gsup_msgb_alloc("GSUP proxy to remote HLR"); + /* To forward to a remote HLR, we need to indicate the source MSC's name in the Source Name IE to make sure the + * reply can be routed back. Store the sender MSC in gsup->source_name -- the remote HLR is required to return + * this as gsup->destination_name so that the reply gets routed to the original MSC. */ + struct osmo_gsup_message forward = req->gsup; + forward.source_name = req->source_name.val; + forward.source_name_len = req->source_name.len; + + rc = osmo_gsup_encode(msg, &forward); + if (rc) { + osmo_gsup_req_respond_err(req, GMM_CAUSE_NET_FAIL, "Failed to encode GSUP message for forwarding\n"); + return; + } + remote_hlr_msgb_send(remote_hlr, msg); + osmo_gsup_req_free(req); +} diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index dd8dbcf..ac9ff31 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -35,6 +35,7 @@ show gsup-connections subscriber (imsi|msisdn|id|imei) IDENT show show subscriber (imsi|msisdn|id|imei) IDENT + show mslookup services OsmoHLR> enable OsmoHLR# ? @@ -89,6 +90,7 @@ end ... hlr + mslookup OsmoHLR(config)# hlr OsmoHLR(config-hlr)# ? @@ -127,6 +129,7 @@ OsmoHLR(config-hlr-gsup)# list ... bind ip A.B.C.D + ipa-name NAME OsmoHLR(config-hlr-gsup)# exit OsmoHLR(config-hlr)# exit @@ -151,6 +154,7 @@ logging level auc notice logging level ss info logging level lu notice + logging level dgsm notice ... hlr store-imei @@ -160,3 +164,324 @@ ussd route prefix *#100# internal own-msisdn ussd route prefix *#101# internal own-imsi end + +OsmoHLR# configure terminal + +OsmoHLR(config)# mslookup +OsmoHLR(config-mslookup)# ? +... + mdns Convenience shortcut: enable and configure both server and client for mDNS mslookup + no Negate a command or set its defaults + server Enable and configure Distributed GSM mslookup server + client Enable and configure Distributed GSM mslookup client +OsmoHLR(config-mslookup)# list +... + mdns [IP] [<1-65535>] + no mdns + server + no server + client + no client + +OsmoHLR(config-mslookup)# ? +... + mdns Convenience shortcut: enable and configure both server and client for mDNS mslookup + no Negate a command or set its defaults + server Enable and configure Distributed GSM mslookup server + client Enable and configure Distributed GSM mslookup client +OsmoHLR(config-mslookup)# no? + no Negate a command or set its defaults +OsmoHLR(config-mslookup)# no ? + mdns Disable both server and client for mDNS mslookup + server Disable Distributed GSM mslookup server + client Disable Distributed GSM mslookup client +OsmoHLR(config-mslookup)# mdns ? + [IP] multicast IPv4 address like 239.192.23.42 or IPv6 address like ff08::23:42 +OsmoHLR(config-mslookup)# mdns 1.2.3.4 ? + [<1-65535>] mDNS UDP Port number + +OsmoHLR(config-mslookup)# server +OsmoHLR(config-mslookup-server)# ? +... + mdns Configure where the mDNS server listens for mslookup requests + no Negate a command or set its defaults + service Configure addresses of local services, as sent in replies to remote mslookup requests. + msc Configure services for individual local MSCs +OsmoHLR(config-mslookup-server)# list +... + mdns [IP] [<1-65535>] + no mdns + service NAME at IP <1-65535> + no service NAME + no service NAME at IP <1-65535> + msc .UNIT_NAME + +OsmoHLR(config-mslookup-server)# mdns? + mdns Configure where the mDNS server listens for mslookup requests +OsmoHLR(config-mslookup-server)# mdns ? + [IP] multicast IPv4 address like 239.192.23.42 or IPv6 address like ff08::23:42 +OsmoHLR(config-mslookup-server)# mdns bind ? + [<1-65535>] mDNS UDP Port number +OsmoHLR(config-mslookup-server)# mdns bind 1.2.3.4 ? +% There is no matched command. +OsmoHLR(config-mslookup-server)# mdns bind 1.2.3.4 ? +% There is no matched command. + +OsmoHLR(config-mslookup-server)# service? + service Configure addresses of local services, as sent in replies to remote mslookup requests. +OsmoHLR(config-mslookup-server)# service ? + NAME mslookup service name, e.g. sip.voice or smpp.sms +OsmoHLR(config-mslookup-server)# service foo ? + at at +OsmoHLR(config-mslookup-server)# service foo at ? + IP IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1 +OsmoHLR(config-mslookup-server)# service foo at 1.2.3.4 ? + <1-65535> Service-specific port number + +OsmoHLR(config-mslookup-server)# no ? + mdns Disable server for mDNS mslookup (do not answer remote requests) + service Remove one or more service address entries +OsmoHLR(config-mslookup-server)# no service ? + NAME mslookup service name, e.g. sip.voice or smpp.sms +OsmoHLR(config-mslookup-server)# no service foo ? + at at + +OsmoHLR(config-mslookup-server)# no service foo at ? + IP IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1 +OsmoHLR(config-mslookup-server)# no service foo at 1.2.3.4 ? + <1-65535> Service-specific port number + +OsmoHLR(config-mslookup-server)# msc? + msc Configure services for individual local MSCs +OsmoHLR(config-mslookup-server)# msc ? + UNIT_NAME IPA Unit Name of the local MSC to configure + +OsmoHLR(config-mslookup-server)# msc MSC-1 +OsmoHLR(config-mslookup-server-msc)# ? +... + service Configure addresses of local services, as sent in replies to remote mslookup requests. + no Negate a command or set its defaults +OsmoHLR(config-mslookup-server-msc)# list +... + service NAME at IP <1-65535> + no service NAME + no service NAME at IP <1-65535> + +OsmoHLR(config-mslookup-server-msc)# service? + service Configure addresses of local services, as sent in replies to remote mslookup requests. +OsmoHLR(config-mslookup-server-msc)# service ? + NAME mslookup service name, e.g. sip.voice or smpp.sms +OsmoHLR(config-mslookup-server-msc)# service foo ? + at at +OsmoHLR(config-mslookup-server-msc)# service foo at ? + IP IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1 +OsmoHLR(config-mslookup-server-msc)# service foo at 1.2.3.4 ? + <1-65535> Service-specific port number + +OsmoHLR(config-mslookup-server-msc)# no ? + service Remove one or more service address entries +OsmoHLR(config-mslookup-server-msc)# no service ? + NAME mslookup service name, e.g. sip.voice or smpp.sms +OsmoHLR(config-mslookup-server-msc)# no service foo ? + at at + +OsmoHLR(config-mslookup-server-msc)# no service foo at ? + IP IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1 +OsmoHLR(config-mslookup-server-msc)# no service foo at 1.2.3.4 ? + <1-65535> Service-specific port number + +OsmoHLR(config-mslookup-server-msc)# exit +OsmoHLR(config-mslookup-server)# exit +OsmoHLR(config-mslookup)# client +OsmoHLR(config-mslookup-client)# ? +... + timeout How long should the mslookup client wait for remote responses before evaluating received results + mdns Enable mDNS client, and configure multicast address to send mDNS mslookup requests to + no Negate a command or set its defaults + gateway-proxy Configure a fixed IP address to send all GSUP requests for unknown IMSIs to, without invoking a lookup for IMSI +OsmoHLR(config-mslookup-client)# list +... + timeout <1-100000> + mdns [IP] [<1-65535>] + no mdns + gateway-proxy IP [<1-65535>] + no gateway-proxy + +OsmoHLR(config-mslookup-client)# timeout? + timeout How long should the mslookup client wait for remote responses before evaluating received results +OsmoHLR(config-mslookup-client)# timeout ? + <1-100000> timeout in milliseconds + +OsmoHLR(config-mslookup-client)# mdns? + mdns Enable mDNS client, and configure multicast address to send mDNS mslookup requests to +OsmoHLR(config-mslookup-client)# mdns to ? + [<1-65535>] mDNS UDP Port number +OsmoHLR(config-mslookup-client)# mdns to 1.2.3.4 ? +% There is no matched command. + +OsmoHLR(config-mslookup-client)# gateway-proxy? + gateway-proxy Configure a fixed IP address to send all GSUP requests for unknown IMSIs to, without invoking a lookup for IMSI +OsmoHLR(config-mslookup-client)# gateway-proxy ? + IP IP address of the remote HLR +OsmoHLR(config-mslookup-client)# gateway-proxy 1.2.3.4 ? + [<1-65535>] GSUP port number (omit for default 4222) + +OsmoHLR(config-mslookup-client)# no? + no Negate a command or set its defaults +OsmoHLR(config-mslookup-client)# no ? + mdns Disable mDNS client, do not query remote services by mDNS + gateway-proxy Disable gateway proxy for GSUP with unknown IMSIs + +OsmoHLR(config-mslookup-client)# gateway-proxy ? + IP IP address of the remote HLR +OsmoHLR(config-mslookup-client)# gateway-proxy 1.2.3.4 ? + [<1-65535>] GSUP port number (omit for default 4222) + +OsmoHLR(config-mslookup-client)# do show mslookup? + mslookup Distributed GSM / mslookup related information +OsmoHLR(config-mslookup-client)# do show mslookup ? + services List configured service addresses as sent to remote mslookup requests + +OsmoHLR(config-mslookup-client)# gateway-proxy 1.2.3.4 + +OsmoHLR(config-mslookup-client)# exit + +OsmoHLR(config-mslookup)# mdns +OsmoHLR(config-mslookup)# server +OsmoHLR(config-mslookup-server)# service qwert at 123.45.67.89 qwert +% Unknown command. +OsmoHLR(config-mslookup-server)# service qwert at qwert 1234 +% mslookup server: Invalid address for service qwert: qwert 1234 +OsmoHLR(config-mslookup-server)# service foo.bar at 123.45.67.89 1011 +OsmoHLR(config-mslookup-server)# service baz.bar at 121.31.41.5 1617 +OsmoHLR(config-mslookup-server)# service baz.bar at a:b:c::d 1819 +OsmoHLR(config-mslookup-server)# msc msc-901-70-23 +OsmoHLR(config-mslookup-server-msc)# service foo.bar at 76.54.32.10 1234 +OsmoHLR(config-mslookup-server-msc)# service baz.bar at 12.11.10.98 7654 +OsmoHLR(config-mslookup-server-msc)# service baz.bar at 999:999:999::999 9999 +OsmoHLR(config-mslookup-server-msc)# service baz.bar at dd:cc:bb::a 3210 +OsmoHLR(config-mslookup-server-msc)# exit +OsmoHLR(config-mslookup-server)# msc msc-901-70-42 +OsmoHLR(config-mslookup-server-msc)# service foo.bar at 1.1.1.1 1111 +OsmoHLR(config-mslookup-server-msc)# service baz.bar at 2.2.2.2 2222 +OsmoHLR(config-mslookup-server-msc)# service baz.bar at 2222:2222:2222::2 2222 +OsmoHLR(config-mslookup-server-msc)# do show mslookup services +Local GSUP HLR address returned in mslookup responses for local IMSIs: 127.0.0.1:4222 +service foo.bar at 123.45.67.89 1011 +service baz.bar at 121.31.41.5 1617 +service baz.bar at a:b:c::d 1819 +msc MSC-1 +msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 + service baz.bar at dd:cc:bb::a 3210 +msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + service baz.bar at 2.2.2.2 2222 + service baz.bar at 2222:2222:2222::2 2222 + +OsmoHLR(config-mslookup-server-msc)# show running-config +... +mslookup + server + mdns bind 239.192.23.42 4266 + service foo.bar at 123.45.67.89 1011 + service baz.bar at 121.31.41.5 1617 + service baz.bar at a:b:c::d 1819 + msc MSC-1 + msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 + service baz.bar at dd:cc:bb::a 3210 + msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + service baz.bar at 2.2.2.2 2222 + service baz.bar at 2222:2222:2222::2 2222 + client + gateway-proxy 1.2.3.4 4222 + mdns to 239.192.23.42 4266 +... + +OsmoHLR(config-mslookup-server-msc)# no service baz.bar +OsmoHLR(config-mslookup-server-msc)# no service asdf +% mslookup server: cannot remove service 'asdf' +OsmoHLR(config-mslookup-server-msc)# exit +OsmoHLR(config-mslookup-server)# msc msc-901-70-23 +OsmoHLR(config-mslookup-server-msc)# no service baz.bar at dd:cc:bb::a 3210 +% mslookup server: cannot remove service 'baz.bar' to dd:cc:bb::a 3210 +OsmoHLR(config-mslookup-server-msc)# no service asdf at asdf asdf +% Unknown command. +OsmoHLR(config-mslookup-server-msc)# no service asdf at asdf 3210 +% mslookup server: Invalid address for 'no service' asdf: asdf 3210 +OsmoHLR(config-mslookup-server-msc)# no service asdf at dd:cc:bb::a 3210 +% mslookup server: cannot remove service 'asdf' to dd:cc:bb::a 3210 +OsmoHLR(config-mslookup-server-msc)# exit +OsmoHLR(config-mslookup-server)# no service baz.bar at 2.2.2.2 2222 +% mslookup server: cannot remove service 'baz.bar' to 2.2.2.2 2222 +OsmoHLR(config-mslookup-server)# no service baz.bar at a:b:c::d 1819 +% mslookup server: cannot remove service 'baz.bar' to a:b:c::d 1819 + +OsmoHLR(config-mslookup-server)# exit +OsmoHLR(config-mslookup)# client +OsmoHLR(config-mslookup-client)# no gateway-proxy + +OsmoHLR(config-mslookup-client)# do show mslookup services +Local GSUP HLR address returned in mslookup responses for local IMSIs: 127.0.0.1:4222 +service foo.bar at 123.45.67.89 1011 +service baz.bar at 121.31.41.5 1617 +msc MSC-1 +msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 +msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + +OsmoHLR(config-mslookup-client)# show running-config +... +mslookup + server + mdns bind 239.192.23.42 4266 + service foo.bar at 123.45.67.89 1011 + service baz.bar at 121.31.41.5 1617 + msc MSC-1 + msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 + msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + client + mdns to 239.192.23.42 4266 +... + +OsmoHLR(config-mslookup-client)# exit +OsmoHLR(config-mslookup)# server +OsmoHLR(config-mslookup-server)# service gsup.hlr at 23.42.17.11 4223 +OsmoHLR(config-mslookup-server)# do show mslookup services +Local GSUP HLR address returned in mslookup responses for local IMSIs: 23.42.17.11:4223 +service foo.bar at 123.45.67.89 1011 +service baz.bar at 121.31.41.5 1617 +service gsup.hlr at 23.42.17.11 4223 +msc MSC-1 +msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 +msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + +OsmoHLR(config-mslookup-server)# show running-config +... +mslookup + server + mdns bind 239.192.23.42 4266 + service foo.bar at 123.45.67.89 1011 + service baz.bar at 121.31.41.5 1617 + service gsup.hlr at 23.42.17.11 4223 + msc MSC-1 + msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 + msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + client + mdns to 239.192.23.42 4266 +... -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b Gerrit-Change-Number: 16209 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-CC: Jenkins Builder Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:06 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:06 +0000 Subject: Change in osmo-hlr[master]: add mslookup_manual_test References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16210 ) Change subject: add mslookup_manual_test ...................................................................... add mslookup_manual_test This can be used for manually testing proxy routing. It is not run as part of the testsuite. Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 --- M .gitignore M configure.ac M tests/Makefile.am A tests/mslookup_manual_test/Makefile.am A tests/mslookup_manual_test/fake_msc.c A tests/mslookup_manual_test/osmo-hlr-1.cfg A tests/mslookup_manual_test/osmo-hlr-2.cfg A tests/mslookup_manual_test/run.sh 8 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/10/16210/1 diff --git a/.gitignore b/.gitignore index 1dfa33b..4162ab9 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,7 @@ tests/gsup/gsup_test tests/db/db_test tests/hlr_vty_test.db* +tests/mslookup_manual_test/fake_msc # manuals doc/manuals/*.html diff --git a/configure.ac b/configure.ac index ae18286..bd74527 100644 --- a/configure.ac +++ b/configure.ac @@ -192,4 +192,5 @@ tests/db/Makefile tests/db_upgrade/Makefile tests/mslookup/Makefile + tests/mslookup_manual_test/Makefile ) diff --git a/tests/Makefile.am b/tests/Makefile.am index bc5fc87..396a731 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,6 +4,7 @@ db \ db_upgrade \ mslookup \ + mslookup_manual_test \ $(NULL) # The `:;' works around a Bash 3.2 bug when the output is not writeable. diff --git a/tests/mslookup_manual_test/Makefile.am b/tests/mslookup_manual_test/Makefile.am new file mode 100644 index 0000000..5a0331b --- /dev/null +++ b/tests/mslookup_manual_test/Makefile.am @@ -0,0 +1,41 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + -ggdb3 \ + -I$(top_srcdir)/include \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(NULL) + +AM_LDFLAGS = \ + -no-install \ + $(NULL) + +EXTRA_DIST = \ + run.sh \ + osmo-hlr-1.cfg \ + osmo-hlr-2.cfg \ + $(NULL) + +noinst_PROGRAMS = \ + fake_msc \ + $(NULL) + +fake_msc_SOURCES = \ + fake_msc.c \ + $(NULL) + +fake_msc_LDADD = \ + $(top_builddir)/src/gsupclient/libosmo-gsup-client.la \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOABIS_LIBS) \ + $(NULL) + +run: + $(srcdir)/run.sh $(srcdir) $(builddir) diff --git a/tests/mslookup_manual_test/fake_msc.c b/tests/mslookup_manual_test/fake_msc.c new file mode 100644 index 0000000..93439d2 --- /dev/null +++ b/tests/mslookup_manual_test/fake_msc.c @@ -0,0 +1,95 @@ +#include +#include +#include +#include + +void *ctx; + +int gsup_client_read_cb(struct osmo_gsup_client *gsupc, struct msgb *msg) +{ + struct osmo_gsup_message gsup; + if (osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup)) { + printf("fake_msc: GSUP rx, but failed to decode\n"); + return 0; + } + printf("fake_msc: GSUP rx %s %s (destination_name=%s)\n", + gsup.imsi, osmo_gsup_message_type_name(gsup.message_type), + osmo_quote_str((const char*)gsup.destination_name, gsup.destination_name_len)); + return 0; +} + +struct osmo_gsup_client *gsupc; +struct osmo_timer_list do_stuff_timer; + +static void gsup_send(const struct osmo_gsup_message *gsup) +{ + printf("fake_msc: GSUP tx %s %s\n", gsup->imsi, osmo_gsup_message_type_name(gsup->message_type)); + osmo_gsup_client_enc_send(gsupc, gsup); +} + +void do_stuff(void *data) +{ + static int i = 0; + int seq = 0; + if (i == seq++) { + struct osmo_gsup_message gsup = { + .message_type = OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, + .imsi = "901700000014701", + .cn_domain = OSMO_GSUP_CN_DOMAIN_CS, + }; + gsup_send(&gsup); + } + + seq += 3; + if (i == seq++) { + struct osmo_gsup_message gsup = { + .message_type = OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, + .imsi = "901700000014701", + .cn_domain = OSMO_GSUP_CN_DOMAIN_CS, + }; + gsup_send(&gsup); + } + + if (i == seq++) { + struct osmo_gsup_message gsup = { + .message_type = OSMO_GSUP_MSGT_INSERT_DATA_RESULT, + .imsi = "901700000014701", + .cn_domain = OSMO_GSUP_CN_DOMAIN_CS, + }; + gsup_send(&gsup); + } + + seq += 60; + if (i == seq++) { + exit(0); + } + + i++; + osmo_timer_schedule(&do_stuff_timer, 1, 0); +} + +int main() +{ + ctx = talloc_named_const(NULL, 0, "main"); + osmo_init_logging2(ctx, NULL); + + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_level(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 0); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + log_set_category_filter(osmo_stderr_target, DMSLOOKUP, true, LOGL_DEBUG); + + struct ipaccess_unit gsup_client_name = { + .unit_name = "fake-msc-1", + .serno = "fake-msc-1", + }; + gsupc = osmo_gsup_client_create2(ctx, &gsup_client_name, "127.0.0.42", OSMO_GSUP_PORT, gsup_client_read_cb, + NULL); + + osmo_timer_setup(&do_stuff_timer, do_stuff, NULL); + osmo_timer_schedule(&do_stuff_timer, 1, 0); + for (;;) { + osmo_select_main_ctx(0); + } +} diff --git a/tests/mslookup_manual_test/osmo-hlr-1.cfg b/tests/mslookup_manual_test/osmo-hlr-1.cfg new file mode 100644 index 0000000..2f33e3e --- /dev/null +++ b/tests/mslookup_manual_test/osmo-hlr-1.cfg @@ -0,0 +1,40 @@ +hlr + gsup + bind ip 127.0.0.1 + ipa-name testHLR-1 + ussd route prefix *0# internal own-msisdn + ussd route prefix *1# internal own-imsi + ussd route prefix *#100# internal own-msisdn + ussd route prefix *#101# internal own-imsi + store-imei + +line vty + bind 127.0.0.1 +ctrl + bind 127.0.0.1 + +mslookup + mdns + +log stderr + logging filter all 1 + logging color 1 + logging print level 1 + logging print category 1 + logging print category-hex 0 + logging print file basename last + logging print extended-timestamp 1 + logging level set-all debug + logging level linp error + +log gsmtap 127.0.0.1 + logging filter all 1 + logging color 1 + logging print level 1 + logging print category 1 + logging print category-hex 0 + logging print file basename last + logging print extended-timestamp 1 + logging level set-all debug + logging level linp error + diff --git a/tests/mslookup_manual_test/osmo-hlr-2.cfg b/tests/mslookup_manual_test/osmo-hlr-2.cfg new file mode 100644 index 0000000..06ddd4f --- /dev/null +++ b/tests/mslookup_manual_test/osmo-hlr-2.cfg @@ -0,0 +1,40 @@ +hlr + gsup + bind ip 127.0.0.2 + ipa-name testHLR-2 + ussd route prefix *0# internal own-msisdn + ussd route prefix *1# internal own-imsi + ussd route prefix *#100# internal own-msisdn + ussd route prefix *#101# internal own-imsi + store-imei + +line vty + bind 127.0.0.2 +ctrl + bind 127.0.0.2 + +mslookup + mdns + +log stderr + logging filter all 1 + logging color 1 + logging print level 1 + logging print category 1 + logging print category-hex 0 + logging print file basename last + logging timestamp 1 + logging level set-all debug + logging level linp error + +log gsmtap 127.0.0.1 + logging filter all 1 + logging color 1 + logging print level 1 + logging print category 1 + logging print category-hex 0 + logging print file basename last + logging print extended-timestamp 1 + logging level set-all debug + logging level linp error + diff --git a/tests/mslookup_manual_test/run.sh b/tests/mslookup_manual_test/run.sh new file mode 100755 index 0000000..ea4dabf --- /dev/null +++ b/tests/mslookup_manual_test/run.sh @@ -0,0 +1,22 @@ +#!/bin/sh +srcdir="${1:-.}" +builddir="${2:-.}" + +cd "$builddir" + +osmo-hlr -c "$srcdir/osmo-hlr-1.cfg" -l hlr1.db & +sleep 1 +osmo-hlr -c "$srcdir/osmo-hlr-2.cfg" -l hlr2.db & + +sleep 1 +osmo_interact_vty.py -H 127.0.0.1 -p 4258 -c 'enable; subscriber imsi 111111 create; subscriber imsi 111111 update msisdn 1' +osmo_interact_vty.py -H 127.0.0.2 -p 4258 -c 'enable; subscriber imsi 222222 create; subscriber imsi 222222 update msisdn 2' +sleep 1 + +./fake_msc & + +echo enter to exit +read enter_to_exit +kill %1 %2 %3 +killall osmo-hlr +killall fake_msc -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 Gerrit-Change-Number: 16210 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-CC: Jenkins Builder Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:06 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:06 +0000 Subject: Change in osmo-hlr[master]: doc: add D-GSM documentation References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16211 ) Change subject: doc: add D-GSM documentation ...................................................................... doc: add D-GSM documentation Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 --- A doc/manuals/chapters/dgsm.adoc M doc/manuals/osmohlr-usermanual.adoc 2 files changed, 483 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/11/16211/1 diff --git a/doc/manuals/chapters/dgsm.adoc b/doc/manuals/chapters/dgsm.adoc new file mode 100644 index 0000000..c0b474a --- /dev/null +++ b/doc/manuals/chapters/dgsm.adoc @@ -0,0 +1,481 @@ +== Distributed GSM / Multicast MS Lookup + +Distributed GSM (D-GSM) allows independent mobile core network stacks to provide voice, SMS and Roaming services to each +other, without the need for centralised entities or administration authority, and in a way that is resilient against +unstable network links between sites. + +D-GSM aims at communal networks, where several independent sites, let's call them villages, each have a full mobile core +network infrastructure. It elegantly provides ad-hoc service for subscribers moving across villages, and allows villages +to dynamically join or leave the cooperative network without the need for configuration changes at other sites. + +A challenge for linking separate sites is to find the current location of a subscriber. Typically, in mobile networks, a +centralized entity keeps track of where to Page for subscribers. Running several fully independent sites with unreliable +links between them makes it hard to provide such centralisation. + +D-GSM finds subscribers by mslookup, a service provided by OsmoHLR, typically using multicast DNS queries. This allows +routing Location Updating requests, calls, and SMS to the right site without administrative delay nor the need for a +reliable link to a central database. + +D-GSM is highly resilient against single sites or links becoming temporarily unavailable. Service between still +reachable sites simply continues; Service to a disconnected site resumes as soon as it becomes reachable again. + +This brings an entirely new paradigm to mobile core network infrastructure: as sites become reachable on the IP network +and join the common IP multicast group, services between them become available immediately. Basically, the only premise +is that IP routing and multicast works across sites, and that each site uses unique IPA names in the GSUP config. + +This chapter describes how D-GSM and mslookup work, and how to configure sites to use D-GSM, using Osmocom core network +infrastructure. + +=== Finding Subscribers: mslookup Clients + +There are two fundamentally distinct subscriber lookups provided by the mslookup service. + +==== Find the Current Location of an MSISDN + +[[fig_dgsm_connect]] +.mslookup for connecting subscribers: Alice is visiting village C; a phone call gets routed directly to her current location independently from her resident village infrastructure +[graphviz] +---- +digraph G { +rankdir=LR + +subgraph cluster_village_b { + label="Village B" + ms_bob [label="Bob\n(from village B)",shape=box] + pbx_b [label="SIP B"] +} + +subgraph cluster_village_c { + label="Village C" + ms_alice [label="Alice\n(from village A)",shape=box] + msc_c [label="MSC C"] + hlr_c [label="HLR C"] + sip_c [label="SIP C"] +} + +ms_alice -> msc_c [style=dashed,arrowhead=none] +msc_c -> hlr_c [label="attached",style=dashed,arrowhead=none] +ms_bob -> pbx_b [label="call Alice"] +pbx_b -> hlr_c [label="mslookup by MSISDN",style=dotted,dir=both] +pbx_b -> sip_c -> msc_c -> ms_alice [label="call"] +} +---- + +For example, if a subscriber is currently visiting another village, establish a phone call / send SMS towards that +village. + +- To deliver a phone call, a SIP agent integrates an mslookup client to request the SIP service of an MSISDN's current + location (example: <>). It receives an IP address and port to send the SIP Invite to. + +- To deliver an SMS, an ESME integrates an mslookup client to request the SMPP service of an MSISDN's current location + (example: <>). + +The current location of a subscriber may change at any time, and, when moving across locations, a subscriber may +suddenly lose reception to the previous location without explicitly detaching. Hence an mslookup request for the current +location of an MSISDN may get numerous responses. To find the currently valid location, mslookup includes the age of the +subscriber record, i.e. how long ago the subscriber was last reached. The one response with the youngest age reflects +the current location. + +In order to evaluate several responses, mslookup always waits for a fixed amount of time (1 second), and then evaluates +the available responses. + +Services are not limited to SIP and SMPP, arbitrarily named services can be added to the mslookup configuration. + +.Message sequence for locating an MSISDN to deliver a voice call +["mscgen"] +---- +msc { + hscale="2"; + moms[label="MS,BSS\nvillage A"],momsc[label="MSC,MGW\nvillage A"],mosipcon[label="osmo-sip-connector\nvillage A"],mopbx[label="PBX\nvillage A"],mthlr[label="OsmoHLR\nvillage B"],mtsipcon[label="osmo-sip-connector\nvillage B"],mtmsc[label="MGW,MSC\nvillage B"],mtms[label="RAN,MS\nvillage B"]; + + moms =>> momsc [label="CC Setup"]; + momsc =>> mosipcon [label="MNCC_SETUP_IND"]; + mosipcon =>> mopbx [label="SIP INVITE"]; + mopbx rbox mopbx [label="dialplan: launch mslookup by MSISDN"]; + --- [label="multicast-DNS query to all connected sites"]; + ...; + mopbx <<= mthlr [label="mDNS response\n(age)"]; + mopbx rbox mopbx [label="wait ~ 1s for more mDNS responses"]; + ...; + mopbx =>> mtsipcon [label="SIP INVITE (MT)"]; + mtmsc <<= mtsipcon [label="MNCC_SETUP_REQ"]; + mtms <<= mtmsc [label="Paging (CC)"]; + moms rbox mtms [label="voice call commences"]; + +} +---- + +==== Find the Home HLR for an IMSI + +[[fig_dgsm_roaming]] +.mslookup for Roaming: Alice visits village B; she can attach to the local mobile network, which proxies HLR administration to her home village. +[graphviz] +---- +digraph G { +rankdir=LR + +subgraph cluster_village_b { + label="Village B" + + ms_alice [label="Alice\n(from village A)",shape=box] + msc_b [label="MSC B"] + hlr_b [label="HLR B"] +} + +subgraph cluster_village_a { + label="Village A" + hlr_alice [label="Alice's home HLR"] +} + +ms_alice -> msc_b -> hlr_b [label="Location\nUpdating"] +hlr_b -> hlr_alice [label="mslookup by IMSI",style=dotted,dir=both] +hlr_b -> hlr_alice [label="GSUP proxy forwarding"] +} +---- + +For example, when attaching to a local network, a local resident gets serviced directly by the local village's HLR, +while a visitor from another village gets serviced by the remote village's HLR (Roaming). + +A home HLR typically stays the same for a given IMSI. If the home site is reachable, there should be exactly one +response to an mslookup request asking for it. The age of such a home-HLR response is always sent as zero. + +If a response's age is zero, mslookup does not wait for further responses and immediately uses the result. + +If there were more than one HLR accepting service for an IMSI, the one with the shortest response latency is used. + +=== mslookup Configuration + +OsmoHLR the main mslookup agent. It provides the responses for both current location services as well as for locating +the fixed home-HLR. But naturally, depending on the mslookup request's purpose, different OsmoHLR instances will respond +for a given subscriber. + +- When querying the home HLR, it is always the (typically single) home HLR instance that sends the mslookup response. As + soon as it finds the queried IMSI in the local HLR database, an OsmoHLR will respond to home-HLR requests. + In <>, Alice's home HLR responds to the Roaming request ("where is the home HLR?"). + +- When querying the location of an MSISDN, it is always the HLR proxy nearest to the servicing MSC that sends the + mslookup response. Even though the home HLR keeps the Location Updating record also for Roaming cases, it will only + respond to an mslookup service request if the subscriber has attached at a directly connected MSC. If attached at a + remote MSC, that MSC's remote HLR will be the GSUP proxy for the home HLR, and the remote HLR is responsible for + responding to service requests. + In <>, HLR B is the nearest proxy and will answer all service requests ("where is this MSISDN?"). + Alice's home HLR will not answer service requests, because it detects that the servicing MSC is connected via another + HLR proxy. + +[[dgsm_example_config]] +==== Example + +Here is an osmo-hlr.cfg mslookup configuration example for one site, which is explained in subsequent chapters. + + hlr + gsup + bind ip 10.9.8.7 + ipa-name hlr-23 + mslookup + mdns + server + service sip.voice at 10.9.8.7 5060 + service smpp.sms at 10.9.8.7 2775 + +OsmoHLR has both an mslookup server and a client. + +- The server responds to incoming service and home-HLR requests, when the local HLR is responsible. +- The client is used as GSUP proxy to a remote home HLR (found by mslookup upon a locally unknown IMSI). +- The client may also be used for forwarding SMS-over-GSUP. + +The mslookup service can be implemented by various methods. +At the time of writing, the only method implemented is mDNS. + +==== mDNS + +The stock mslookup method is mDNS, multicast DNS. It consists of standard DNS encoding according to <> and +<>, but sent and received on IP multicast. In the response, standard A and AAAA records return the +service's IP address, while additional TXT records provide the service's port number and the MS attach age. + +TIP: To watch D-GSM mDNS conversations in wireshark, select "udp.port == 4266" (the default mslookup mDNS port +number), right click on the packet to "Decode as...", and select "DNS". + +In OsmoHLR, the mDNS server and client are typically both enabled at the same time: + + mslookup + mdns + +Server and client can also be enabled/disabled individually: + + mslookup + server + mdns + client + mdns + +These examples use the default mslookup multicast IP address and port. It is possible to configure custom IP address and +port, but beware that the IP address must be from a multicast range, see <>: + + mslookup + mdns 239.192.23.42 4266 + +==== Server: Site Services + +The mslookup server requires a list of service addresses provided at the local site, in order to respond to service +requests matching locally attached subscribers. + + mslookup + server + service sip.voice at 10.9.8.7 5060 + service smpp.sms at 10.9.8.7 2775 + +In this example, "10.9.8.7 5060" would be the IP address and port on which the local site's PBX is bound to receive SIP +Invite requests; "10.9.8.7 2775" would be the local site's OsmoMSC SMPP bind address and port. + +Obviously, these IP addresses must be routable back to this site from all other sites. If, for example, the PBX is +configured to bind on "0.0.0.0", it won't work to enter the same as service address -- remote sites cannot route to +0.0.0.0. Instead, the mslookup service requires a public IP address of a local interface. For the same reasons, never +add link-local addresses like 127.0.0.1 as mslookup services. + +If a site has more than one MSC, services can also be configured for each MSC individually, keyed by the IPA unit name +that each MSC sends on the GSUP link: + + mslookup + server + msc msc-262-42-0 + service sip.voice at 10.11.12.13 5060 + service smpp.sms at 10.11.12.13 2775 + msc msc-901-70-0 + service sip.voice at 10.9.8.7 5060 + service smpp.sms at 10.9.8.7 2775 + +Here, "msc-262-42-0" is the IPA name of a local OsmoMSC instance. To configure an OsmoMSC's IPA name on the GSUP link, +see osmo-msc.cfg, setting `hlr` / `ipa-name`. + +For mslookup service responses, only Location Updatings in the Circuit Switched domain are relevant. OsmoHLR does manage +IMSIs attaching in the Packet Switched domain (via an SGSN) similarly to Circuit Switched (via an MSC), but mslookup +completely ignores the Packet Switched attach status. + +==== Server: Own GSUP Address + +When responding to home-HLR requests, OsmoHLR implicitly by default responds with its locally configured GSUP bind +address (setting `hlr` / `gsup` / `bind ip`). If required, an explicit local GSUP address and port can be configured, +for example: + + hlr + gsup + bind ip 0.0.0.0 + ipa-name hlr-23 + mslookup + server + # osmo-hlr's own GSUP address to send in mslookup responses: + service gsup.hlr at 10.9.8.7 4222 + +The gsup.hlr service can only be configured globally (because requests come from arbitrary mDNS clients, before a +Location Updating has associated the IMSI with the requesting MSC). + +==== Client IPA Naming + +For reliable GSUP proxy routing to a remote HLR (Roaming), it is important that each GSUP client, i.e. each HLR, MSC and +SGSN instance, has a unique IPA name. + +Example for configuring an OsmoHLR instance's IPA name: + + hlr + gsup + ipa-name hlr-23 + +Here, "hlr-23" is the unique identification of this OsmoHLR instance across all potentially connected D-GSM sites. + +Furthermore, each MSC and SGSN must have a uniquely distinct IPA name across all sites (here "msc-262-42-0" and +"msc-901-70-0" are used as example IPA names for local MSCs). + +When this OsmoHLR connects to a remote HLR, be it for GSUP proxying or SMS-over-GSUP, it communicates its own IPA name +(on GSUP link-up) as well as the IPA name of the requesting client MSC/SGSN (as Source Name in each message) to the +remote OsmoHLR GSUP server. These names are used to route GSUP responses back to the respective requesting peer. + +If two MSCs were accidentally configured with identical names, a problem will occur as soon as both MSCs attempt to +attach to the same OsmoHLR (either directly or via GSUP proxying). The MSC that shows up first will work normally, but +any duplicate that shows up later will be rejected, since a route for its name already exists. + +=== Queries + +In URL notation, typical mslookup queries look like: + + gsup.hlr.123456789.imsi + sip.voice.123.msisdn + smpp.sms.123.msisdn + +A query consists of + +- a service name ("gsup.hlr"), +- an id ("123456789"), +- the id type ("imsi"). + +The calling client also defines a timeout to wait for responses. + +The mslookup ID types are fixed, while service names can be chosen arbitrarily. + +.mslookup ID types, no other ID types are understood by mslookup +[options="header",width="100%",cols="20%,80%"] +|=== +|ID Type|Description +|imsi|An IMSI as existing in an OsmoHLR subscriber database +|msisdn|A phone number as configured in an OsmoHLR subscriber database +|=== + +.mslookup service name conventions, arbitrary service names can be added as required +[options="header",width="100%",cols="20%,20%,60%"] +|=== +|Service Name|Protocol|Description +|gsup.hlr | GSUP | Home HLR's GSUP server, to handle Location Updating related procedures +|sip.voice | SIP | SIP PBX or OsmoSIPConnector, to receive a SIP Invite (MT side of a call) +|smpp.sms | SMPP | Destination OsmoMSC (or other SMPP server) to deliver an SMS to the recipient +|gsup.sms | GSUP | GSUP peer to deliver an SMS to the recipient using SMS-over-GSUP +|=== + +Arbitrarily named services can be added to the mslookup configuration and queried by mslookup clients; as soon as a +service name is present in osmo-hlr.cfg, it can be queried from any mslookup client. + +Service names should consist of a protocol name (like "sip", "gsup", "english") and an intended action/entity (like +"voice", "hlr", "greeting"). + +=== Service Client Implementation + +In principle, arbitrary services could query target addresses via mslookup, leaving it up to any and all kinds of +clients to find their respective destination addresses. But of course, mslookup was designed with specific services in +mind, namely: + +- SIP call agents and +- SMS delivery (an ESME or SMSC) + +The following chapters describe examples of setting up a working distributed core network providing SIP voice calls and +SMS forwarding across sites. + +==== mslookup Library + +The OsmoHLR provides an mslookup client C library, libosmo-mslookup. Service lookups can be integrated directly +in client programs using this library. However, its mDNS implementation requires the libosmocore select() loop, which +can be challenging to integrate in practice. An alternative solution is the osmo-mslookup-client tool. + +[[dgsm_osmo_mslookup_client]] +==== osmo-mslookup-client + +The mslookup C library is available, but often, a simpler approach for client implementations is desirable: + +- When querying for a service address, the client is typically interested in the single final best result (youngest age + / first responding home HLR). +- Voice call and SMS clients typically would block until an mslookup result is known. For example, the FreeSwitch + dialplan integration expects a result synchronously, i.e. without waiting for mslookup responses via a select() loop. +- Integrating the libosmocore select() loop required for mDNS can break the already existing socket handling in the + client program. + +The osmo-mslookup-client cmdline tool provides a trivial way to synchronously acquire the single result for an mslookup +request. The service client can invoke an osmo-mslookup-client process per request and read the result from stdout. + +Each invocation obviously spawns a separate process and opens a multicast socket for mDNS. For better scalability, +osmo-mslookup-client can also be run as a daemon, providing results via a unix domain socket. Using synchronous write() +and recv() allows blocking until a result is received without interfering with the client program's select() setup. + +By itself, osmo-mslookup-client is also helpful as a diagnostic tool: + +---- +$ osmo-mslookup-client sip.voice.1001.msisdn +sip.voice.1001.msisdn ok 10.9.8.7 5060 + +$ osmo-mslookup-client gsup.hlr.901700000014701.imsi +gsup.hlr.901700000014701.imsi ok 10.9.8.7 4222 + +$ osmo-mslookup-client gsup.hlr.111111.imsi +gsup.hlr.111111.imsi not-found + +$ osmo-mslookup-client gsup.hlr.1001.msisdn sip.voice.1001.msisdn smpp.sms.1001.msisdn foo.1001.msisdn +gsup.hlr.1001.msisdn ok 10.9.8.7 4222 +foo.1001.msisdn not-found +smpp.sms.1001.msisdn ok 10.9.8.7 2775 +sip.voice.1001.msisdn ok 10.9.8.7 5060 + +$ osmo-mslookup-client --csv-headers gsup.hlr.901700000014701.imsi +QUERY RESULT V4_IP V4_PORT V6_IP V6_PORT +gsup.hlr.901700000014701.imsi ok 10.9.8.7 4222 + +$ osmo-mslookup-client -f json gsup.hlr.901700000014701.imsi +{"query": "gsup.hlr.901700000014701.imsi", "result": "ok", "v4": ["10.9.8.7", "4222"]} +---- + +For full help including example client invocations in Python, see the output of: + + osmo-mslookup-client -h + +==== SIP Service Client + +[[dgsm_conf_dialplan]] +===== FreeSwitch dialplan.py + +The FreeSWITCH PBX software <> offers a Python integration to determine a SIP call recipient by a custom +dialplan implementation. An example dialplan implementation for FreeSWITCH that uses D-GSM mslookup is provided in the +osmo-hlr source tree under `contrib`, called `freeswitch_dialplan_dgsm.py`. + +To integrate it with your FREESWITCH setup, add a new `extension` block to your `dialplan/public.xml`: +---- + + + + + + + + +---- + +Make sure that the dir containing `freeswitch_dialplan_dgsm.py` is in your `PYTHONPATH` environment variable, and start +the server: +---- +$ export PYTHONPATH="$PYTHONPATH:/home/user/code/osmo-hlr/contrib/dgsm" +$ freeswitch -nf -nonat -nonatmap -nocal -nort -c +---- + +==== SMS Service Client + +[[dgsm_conf_esme_smpp]] +===== SMS via SMPP Port + +An example ESME using D-GSM mslookup, `esme_dgsm.py`, is provided in the osmo-hlr source tree under `contrib`. It +attaches to OsmoMSC's SMPP port to send SMS to recipients determined by mslookup. + +OsmoMSC should be configured as "smpp-first", so that all SMS routing is determined by mslookup. If configured without +smpp-first, OsmoMSC may try to deliver an SMS locally, even though the recipient has recently moved to a different site. + +An example OsmoMSC configuration to work with esme_dgsm.py: + +---- +smpp + local-tcp-ip 127.0.0.1 2775 + system-id test-msc + policy closed + smpp-first + # outgoing to esme_dgsm.py + esme OSMPP + no alert-notifications + password foo + default-route + # incoming from esme_dgsm.py + esme ISMPP + no alert-notifications + password foo +---- + +Launch esme_dgsm.py alongside OsmoMSC: + +---- +./esme_dgsm.py --src-host 127.0.0.1 +---- + +esme_dgsm.py will be notified via SMPP for each SMS to be delivered, and will forward them either to a remote +recipient, or back to the same OsmoMSC, depending on the mslookup result. If the MSISDN is not reachable (or +esme_dgsm.py can't handle the message for other reasons), it returns the RSYSERR code back to OsmoMSC. + +Note that the esme_dgsm.py is a proof of concept and should not be used in production. It has several limitations, such +as not supporting multipart SMS messages. + +===== SMS-Over-GSUP + +The GSUP protocol defines SMS delivery messages. When OsmoMSC is configured to deliver SMS via GSUP, MO SMS are directly +forwarded to the HLR, which will determine where to forward the SMS-over-GSUP messages using its mslookup client. + +FIXME implement this diff --git a/doc/manuals/osmohlr-usermanual.adoc b/doc/manuals/osmohlr-usermanual.adoc index 7e709bd..68db1a7 100644 --- a/doc/manuals/osmohlr-usermanual.adoc +++ b/doc/manuals/osmohlr-usermanual.adoc @@ -24,6 +24,8 @@ include::./common/chapters/control_if.adoc[] +include::{srcdir}/chapters/dgsm.adoc[] + include::./common/chapters/gsup.adoc[] include::./common/chapters/port_numbers.adoc[] -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 Gerrit-Change-Number: 16211 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-CC: Jenkins Builder Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 04:46:06 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 04:46:06 +0000 Subject: Change in osmo-hlr[master]: drop error log for when a subscriber does not exist References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16212 ) Change subject: drop error log for when a subscriber does not exist ...................................................................... drop error log for when a subscriber does not exist Checking for existence of a subscriber and seeing that there is none is not inherently an error. However, osmo-hlr currently logs on all occasions: DAUC ERROR Cannot read subscriber from db: MSISDN='1001': No such subscriber This spams the ERROR log level. Particularly when a D-GSM setup does subscriber existence checks for every incoming mslookup request, that potentially creates constant ERROR logging. The "No such subscriber" part comes from db_sel(), which might also return an sqlite3_errmsg(). We still want those sqlite3_errmsg()es in the ERROR log. Hence print an ERROR log only if db_sel() returns an rc != -ENOENT. Change-Id: I5044e9b4519b948edc4e451cef0f7830d315619b --- M src/db_hlr.c M tests/db/db_test.err 2 files changed, 4 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/12/16212/1 diff --git a/src/db_hlr.c b/src/db_hlr.c index 3255dd9..2c2d830 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -568,7 +568,7 @@ return -EIO; rc = db_sel(dbc, stmt, subscr, &err); - if (rc) + if (rc && rc != -ENOENT) LOGP(DAUC, LOGL_ERROR, "Cannot read subscriber from db: IMSI='%s': %s\n", imsi, err); return rc; @@ -619,7 +619,7 @@ return -EIO; rc = db_sel(dbc, stmt, subscr, &err); - if (rc) + if (rc && rc != -ENOENT) LOGP(DAUC, LOGL_ERROR, "Cannot read subscriber from db: MSISDN='%s': %s\n", msisdn, err); return rc; @@ -643,7 +643,7 @@ return -EIO; rc = db_sel(dbc, stmt, subscr, &err); - if (rc) + if (rc && rc != -ENOENT) LOGP(DAUC, LOGL_ERROR, "Cannot read subscriber from db: ID=%" PRId64 ": %s\n", id, err); return rc; @@ -666,7 +666,7 @@ return -EIO; rc = db_sel(dbc, stmt, subscr, &err); - if (rc) + if (rc && rc != -ENOENT) LOGP(DAUC, LOGL_ERROR, "Cannot read subscriber from db: IMEI=%s: %s\n", imei, err); return rc; } diff --git a/tests/db/db_test.err b/tests/db/db_test.err index 87c7d0e..150400b 100644 --- a/tests/db/db_test.err +++ b/tests/db/db_test.err @@ -64,25 +64,21 @@ DAUC Cannot create subscriber: invalid IMSI: '123456789 000003' db_subscr_get_by_imsi(dbc, "123456789000003", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='123456789000003': No such subscriber db_subscr_create(dbc, "123456789000002123456", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EINVAL DAUC Cannot create subscriber: invalid IMSI: '123456789000002123456' db_subscr_get_by_imsi(dbc, "123456789000002123456", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='123456789000002123456': No such subscriber db_subscr_create(dbc, "foobar123", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EINVAL DAUC Cannot create subscriber: invalid IMSI: 'foobar123' db_subscr_get_by_imsi(dbc, "foobar123", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='foobar123': No such subscriber db_subscr_create(dbc, "123", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EINVAL DAUC Cannot create subscriber: invalid IMSI: '123' db_subscr_get_by_imsi(dbc, "123", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='123': No such subscriber db_subscr_create(dbc, short_imsi, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> 0 @@ -142,7 +138,6 @@ } db_subscr_get_by_msisdn(dbc, "54321012345678912345678", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: MSISDN='54321012345678912345678': No such subscriber db_subscr_update_msisdn_by_imsi(dbc, imsi0, "543 21") --> -EINVAL DAUC IMSI='123456789000000': Cannot update subscriber: invalid MSISDN: '543 21' @@ -155,7 +150,6 @@ } db_subscr_get_by_msisdn(dbc, "543 21", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: MSISDN='543 21': No such subscriber db_subscr_update_msisdn_by_imsi(dbc, imsi0, "foobar123") --> -EINVAL DAUC IMSI='123456789000000': Cannot update subscriber: invalid MSISDN: 'foobar123' @@ -168,7 +162,6 @@ } db_subscr_get_by_msisdn(dbc, "foobar123", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: MSISDN='foobar123': No such subscriber db_subscr_update_msisdn_by_imsi(dbc, imsi0, "5") --> 0 @@ -187,7 +180,6 @@ } db_subscr_get_by_msisdn(dbc, "54321", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: MSISDN='54321': No such subscriber db_subscr_update_msisdn_by_imsi(dbc, imsi0, "543210123456789") --> 0 @@ -216,7 +208,6 @@ } db_subscr_get_by_msisdn(dbc, "5432101234567891", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: MSISDN='5432101234567891': No such subscriber --- Check if subscriber exists (by MSISDN) @@ -232,13 +223,11 @@ DAUC Cannot update MSISDN: no such subscriber: IMSI='999999999' db_subscr_get_by_msisdn(dbc, "99", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: MSISDN='99': No such subscriber db_subscr_update_msisdn_by_imsi(dbc, "foobar", "99") --> -ENOENT DAUC Cannot update MSISDN: no such subscriber: IMSI='foobar' db_subscr_get_by_msisdn(dbc, "99", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: MSISDN='99': No such subscriber --- Set valid / invalid IMEI @@ -265,7 +254,6 @@ } db_subscr_get_by_imei(dbc, "123456789012345", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMEI=123456789012345: No such subscriber --- Set the same IMEI again @@ -286,7 +274,6 @@ db_subscr_update_imei_by_imsi(dbc, imsi0, NULL) --> 0 db_subscr_get_by_imei(dbc, "12345678901234", &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMEI=12345678901234: No such subscriber --- Set / unset nam_cs and nam_ps @@ -424,7 +411,6 @@ DAUC Cannot disable CS: no such subscriber: IMSI='999999999' db_subscr_get_by_imsi(dbc, unknown_imsi, &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='999999999': No such subscriber db_subscr_nam(dbc, "foobar", false, true) --> -ENOENT DAUC Cannot disable PS: no such subscriber: IMSI='foobar' @@ -567,7 +553,6 @@ DAUC Cannot update VLR number for subscriber ID=99999: no such subscriber db_subscr_get_by_id(dbc, 99999, &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: ID=99999: No such subscriber --- Purge and un-purge PS and CS @@ -698,13 +683,11 @@ DAUC Cannot purge PS: no such subscriber: IMSI='999999999' db_subscr_get_by_imsi(dbc, unknown_imsi, &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='999999999': No such subscriber db_subscr_purge(dbc, unknown_imsi, true, false) --> -ENOENT DAUC Cannot purge CS: no such subscriber: IMSI='999999999' db_subscr_get_by_imsi(dbc, unknown_imsi, &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='999999999': No such subscriber --- Delete non-existent / invalid IDs @@ -728,7 +711,6 @@ db_subscr_delete_by_id(dbc, id0) --> 0 db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='123456789000000': No such subscriber db_subscr_delete_by_id(dbc, id0) --> -ENOENT DAUC Cannot delete: no such subscriber: ID=1 @@ -742,7 +724,6 @@ db_subscr_delete_by_id(dbc, id1) --> 0 db_subscr_get_by_imsi(dbc, imsi1, &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='123456789000001': No such subscriber db_subscr_get_by_imsi(dbc, imsi2, &g_subscr) --> 0 struct hlr_subscriber { @@ -753,7 +734,6 @@ db_subscr_delete_by_id(dbc, id2) --> 0 db_subscr_get_by_imsi(dbc, imsi2, &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='123456789000002': No such subscriber db_subscr_get_by_imsi(dbc, short_imsi, &g_subscr) --> 0 struct hlr_subscriber { @@ -764,7 +744,6 @@ db_subscr_delete_by_id(dbc, id_short) --> 0 db_subscr_get_by_imsi(dbc, short_imsi, &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: IMSI='123456': No such subscriber --- Create and delete subscribers with non-default nam_cs and nam_ps @@ -1305,7 +1284,6 @@ 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 --- Re-add subscriber and verify auth data didn't come back @@ -1330,7 +1308,6 @@ 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 @@ -1431,13 +1408,11 @@ DAUC Cannot update SQN for subscriber ID=99: no auc_3g entry for such subscriber db_subscr_get_by_id(dbc, 99, &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: ID=99: No such subscriber db_update_sqn(dbc, 9999, 99) --> -ENOENT DAUC Cannot update SQN for subscriber ID=9999: no auc_3g entry for such subscriber db_subscr_get_by_id(dbc, 9999, &g_subscr) --> -ENOENT -DAUC Cannot read subscriber from db: ID=9999: No such subscriber --- Create subscriber @@ -1635,7 +1610,6 @@ 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 ===== test_subscr_sqn: SUCCESS -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5044e9b4519b948edc4e451cef0f7830d315619b Gerrit-Change-Number: 16212 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-CC: Jenkins Builder Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 05:43:15 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 25 Nov 2019 05:43:15 +0000 Subject: Change in osmo-hlr[master]: add osmo_gsup_msgb_alloc() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15915 ) Change subject: add osmo_gsup_msgb_alloc() ...................................................................... Patch Set 9: (5 comments) https://gerrit.osmocom.org/c/osmo-hlr/+/15915/9/src/hlr.c File src/hlr.c: https://gerrit.osmocom.org/c/osmo-hlr/+/15915/9/src/hlr.c at 470 PS9, Line 470: OSMO_ASSERT We don't need this assert() anymore. https://gerrit.osmocom.org/c/osmo-hlr/+/15915/9/src/hlr.c at 595 PS9, Line 595: OSMO_ASSERT same here https://gerrit.osmocom.org/c/osmo-hlr/+/15915/9/src/hlr_ussd.c File src/hlr_ussd.c: https://gerrit.osmocom.org/c/osmo-hlr/+/15915/9/src/hlr_ussd.c at 468 PS9, Line 468: OSMO_ASSERT same https://gerrit.osmocom.org/c/osmo-hlr/+/15915/9/src/hlr_ussd.c at 485 PS9, Line 485: OSMO_ASSERT same https://gerrit.osmocom.org/c/osmo-hlr/+/15915/9/src/luop.c File src/luop.c: https://gerrit.osmocom.org/c/osmo-hlr/+/15915/9/src/luop.c at 54 PS9, Line 54: OSMO_ASSERT same -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e Gerrit-Change-Number: 15915 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 25 Nov 2019 05:43:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:49:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:49:35 +0000 Subject: Change in simtrace2[master]: card_emu_tests: Cosmetic changes (re-order code; more comments) In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16190 ) Change subject: card_emu_tests: Cosmetic changes (re-order code; more comments) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16190 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I36aefc824187ee99d83a451d869b137c13334d91 Gerrit-Change-Number: 16190 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 10:49:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:49:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:49:40 +0000 Subject: Change in simtrace2[master]: fix typo: libisb -> libusb In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16191 ) Change subject: fix typo: libisb -> libusb ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I0a9505e3eeb7ae4ffda7081dcbb1ed63835600a5 Gerrit-Change-Number: 16191 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 10:49:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:49:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:49:49 +0000 Subject: Change in simtrace2[master]: simtrace2-remsim: Implement/Fix the 'skip_atr' option In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16192 ) Change subject: simtrace2-remsim: Implement/Fix the 'skip_atr' option ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Id8206738635af0dd55836bbbcbfbe7381c375e97 Gerrit-Change-Number: 16192 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 10:49:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:49:57 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:49:57 +0000 Subject: Change in simtrace2[master]: remove unused function process_do_error() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16193 ) Change subject: remove unused function process_do_error() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I02bc23a340b086b0de4e69affb6f965bff6bbc0b Gerrit-Change-Number: 16193 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 10:49:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:49:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:49:59 +0000 Subject: Change in simtrace2[master]: card_emu_tests: Cosmetic changes (re-order code; more comments) In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16190 ) Change subject: card_emu_tests: Cosmetic changes (re-order code; more comments) ...................................................................... card_emu_tests: Cosmetic changes (re-order code; more comments) Change-Id: I36aefc824187ee99d83a451d869b137c13334d91 --- M firmware/test/card_emu_tests.c 1 file changed, 20 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/firmware/test/card_emu_tests.c b/firmware/test/card_emu_tests.c index fe1739b..a5ba62e 100644 --- a/firmware/test/card_emu_tests.c +++ b/firmware/test/card_emu_tests.c @@ -13,7 +13,9 @@ #define PHONE_INT 2 #define PHONE_DATAOUT 3 -/* stub functions required by card_emu.c */ +/*********************************************************************** + * stub functions required by card_emu.c + ***********************************************************************/ void card_emu_uart_wait_tx_idle(uint8_t uart_chan) { @@ -30,6 +32,7 @@ static uint8_t tx_debug_buf[1024]; static unsigned int tx_debug_buf_idx; +/* the card emulator wants to send some data to the host [reader] */ int card_emu_uart_tx(uint8_t uart_chan, uint8_t byte) { printf("UART_TX(%02x)\n", byte); @@ -37,13 +40,6 @@ return 1; } -static void reader_check_and_clear(const uint8_t *data, unsigned int len) -{ - assert(len == tx_debug_buf_idx); - assert(!memcmp(tx_debug_buf, data, len)); - tx_debug_buf_idx = 0; -} - void card_emu_uart_enable(uint8_t uart_chan, uint8_t rxtx) { char *rts; @@ -95,7 +91,21 @@ printf("tc_etu_disable(tc_chan=%u)\n", chan_nr); } -const uint8_t atr[] = { 0x3b, 0x02, 0x14, 0x50 }; + + +/*********************************************************************** + * test helper functions + ***********************************************************************/ + + +static void reader_check_and_clear(const uint8_t *data, unsigned int len) +{ + assert(len == tx_debug_buf_idx); + assert(!memcmp(tx_debug_buf, data, len)); + tx_debug_buf_idx = 0; +} + +static const uint8_t atr[] = { 0x3b, 0x02, 0x14, 0x50 }; static int verify_atr(struct card_handle *ch) { @@ -130,6 +140,7 @@ verify_atr(ch); } +/* emulate the host/reader sending some bytes to the [emulated] card */ static void reader_send_bytes(struct card_handle *ch, const uint8_t *bytes, unsigned int len) { unsigned int i; -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16190 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I36aefc824187ee99d83a451d869b137c13334d91 Gerrit-Change-Number: 16190 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:49:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:49:59 +0000 Subject: Change in simtrace2[master]: fix typo: libisb -> libusb In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16191 ) Change subject: fix typo: libisb -> libusb ...................................................................... fix typo: libisb -> libusb Change-Id: I0a9505e3eeb7ae4ffda7081dcbb1ed63835600a5 --- M host/libusb_util.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/host/libusb_util.c b/host/libusb_util.c index 45e3f50..71fb488 100644 --- a/host/libusb_util.c +++ b/host/libusb_util.c @@ -1,4 +1,4 @@ -/* libisb utilities +/* libusb utilities * * (C) 2010-2016 by Harald Welte * -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I0a9505e3eeb7ae4ffda7081dcbb1ed63835600a5 Gerrit-Change-Number: 16191 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:50:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:50:00 +0000 Subject: Change in simtrace2[master]: simtrace2-remsim: Implement/Fix the 'skip_atr' option In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16192 ) Change subject: simtrace2-remsim: Implement/Fix the 'skip_atr' option ...................................................................... simtrace2-remsim: Implement/Fix the 'skip_atr' option Change-Id: Id8206738635af0dd55836bbbcbfbe7381c375e97 --- M host/simtrace2-remsim.c 1 file changed, 8 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/host/simtrace2-remsim.c b/host/simtrace2-remsim.c index 73a7272..101d425 100644 --- a/host/simtrace2-remsim.c +++ b/host/simtrace2-remsim.c @@ -746,12 +746,14 @@ /* select remote (forwarded) SIM */ st_modem_sim_select_remote(ci->slot); - /* set the ATR */ - uint8_t real_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, - 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, - 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 }; - atr_update_csum(real_atr, sizeof(real_atr)); - cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); + if (!skip_atr) { + /* set the ATR */ + uint8_t real_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, + 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, + 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 }; + atr_update_csum(real_atr, sizeof(real_atr)); + cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); + } /* select remote (forwarded) SIM */ st_modem_reset_pulse(ci->slot, 300); -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Id8206738635af0dd55836bbbcbfbe7381c375e97 Gerrit-Change-Number: 16192 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:50:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:50:01 +0000 Subject: Change in simtrace2[master]: remove unused function process_do_error() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16193 ) Change subject: remove unused function process_do_error() ...................................................................... remove unused function process_do_error() Change-Id: I02bc23a340b086b0de4e69affb6f965bff6bbc0b --- M host/simtrace2-remsim.c 1 file changed, 0 insertions(+), 19 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/host/simtrace2-remsim.c b/host/simtrace2-remsim.c index 101d425..918c9fd 100644 --- a/host/simtrace2-remsim.c +++ b/host/simtrace2-remsim.c @@ -385,19 +385,6 @@ return 0; } -/*! \brief Process a ERROR indication message from the SIMtrace2 */ -static int process_do_error(struct cardem_inst *ci, uint8_t *buf, int len) -{ - struct cardemu_usb_msg_error *err; - err = (struct cardemu_usb_msg_error *) buf; - - printf("=> ERROR: %u/%u/%u: %s\n", - err->severity, err->subsystem, err->code, - err->msg_len ? (char *)err->msg : ""); - - return 0; -} - /*! \brief Process a RX-DATA indication message from the SIMtrace2 */ static int process_do_rx_da(struct cardem_inst *ci, uint8_t *buf, int len) { @@ -447,12 +434,6 @@ return 0; } -#if 0 - case SIMTRACE_CMD_DO_ERROR - rc = process_do_error(ci, buf, len); - break; -#endif - /*! \brief Process an incoming message from the SIMtrace2 */ static int process_usb_msg(struct cardem_inst *ci, uint8_t *buf, int len) { -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I02bc23a340b086b0de4e69affb6f965bff6bbc0b Gerrit-Change-Number: 16193 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:52:50 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:52:50 +0000 Subject: Change in libosmocore[master]: vty_app_info.is_config_node: add OSMO_DEPRECATED In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16188 ) Change subject: vty_app_info.is_config_node: add OSMO_DEPRECATED ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16188 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I800507b27cb0d536c1a4c203d7f7b90eec05a69c Gerrit-Change-Number: 16188 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 10:52:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:53:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:53:07 +0000 Subject: Change in libosmocore[master]: add osmo_escape_cstr and osmo_quote_cstr In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16160 ) Change subject: add osmo_escape_cstr and osmo_quote_cstr ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3dfb892036e01000033dd8e7e4a6a0c32a3caa9b Gerrit-Change-Number: 16160 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 10:53:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:55:24 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 10:55:24 +0000 Subject: Change in osmo-hlr[master]: move headers to include/osmocom/hlr In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16197 ) Change subject: move headers to include/osmocom/hlr ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ic912fe27f545b85443c5fb713d8c3c8aac23c9ad Gerrit-Change-Number: 16197 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 25 Nov 2019 10:55:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:55:43 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:55:43 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16189 ) Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c File src/gsm/gsup.c: https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 985 PS3, Line 985: osmo_gsup_message_name_buf I think the naming is wrong. This function is not just putting the message name into a buffer (which is what we have value_str for anyway), but it's actually giving a stringified version of the message. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 10:55:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:56:06 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 10:56:06 +0000 Subject: Change in osmo-hlr[master]: fix upgrade test in presence of ~/.sqliterc In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16019 ) Change subject: fix upgrade test in presence of ~/.sqliterc ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I279a39984563594a4a3914b2ce3d803ad9468fe8 Gerrit-Change-Number: 16019 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 10:56:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:56:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:56:21 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: drop unneeded debug print() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16179 ) Change subject: trx_toolkit/clck_gen.py: drop unneeded debug print() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16179 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I372af77d5b0b24fa38e304b782ca5b3d0888211b Gerrit-Change-Number: 16179 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 10:56:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:56:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:56:51 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16177 ) Change subject: trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibe477eb0a1ee2193c1ff16452a407be7e858b2ef Gerrit-Change-Number: 16177 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 10:56:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 10:57:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 10:57:17 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: turn CLCKGen's thread into a daemon In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16178 ) Change subject: trx_toolkit/clck_gen.py: turn CLCKGen's thread into a daemon ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9d41c5baa25fa0a263758414a164c1bded25e04e Gerrit-Change-Number: 16178 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 10:57:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 11:15:48 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 11:15:48 +0000 Subject: Change in osmo-hlr[master]: add osmo_gsup_msgb_alloc() In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#10) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15915 ) Change subject: add osmo_gsup_msgb_alloc() ...................................................................... add osmo_gsup_msgb_alloc() Throughout osmo-hlr's code, the GSUP msgb allocation is duplicated as: msgb_alloc_headroom(1024+16, 16, "foo"); Instead, use one common function to keep the magic numbers in one place. Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e --- M include/osmocom/hlr/gsup_server.h M src/gsup_server.c M src/hlr.c M src/hlr_ussd.c M src/luop.c 5 files changed, 17 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/15915/10 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e Gerrit-Change-Number: 15915 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 11:15:48 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 11:15:48 +0000 Subject: Change in osmo-hlr[master]: add lu_fsm and osmo_gsup_req In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#2) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: add lu_fsm and osmo_gsup_req ...................................................................... add lu_fsm and osmo_gsup_req These are seemingly orthogonal changes in one patch, because they are in fact sufficiently intertwined that we are not willing to spend the time to separate them. They are also refactoring changes, unlikely to make sense on their own. ** lu_fsm: Attempting to make luop.c keep state about incoming GSUP requests made me find shortcomings in several places: - since it predates osmo_fsm, it is a state machine that does not strictly enforce the order of state transitions or the right sequence of incoming events. - several places OSMO_ASSERT() on data received from the network. - modifies the subscriber state before a LU is accepted. - dead code about canceling a subscriber in a previous VLR. That would be a good thing to actually do, which should also be trivial now that we record vlr_name and sgsn_name, but I decided to remove the dead code for now. To both step up the LU game *and* make it easier for me to integrate osmo_gsup_req handling, I decided to create a lu_fsm, drawing from my, by now, ample experience of writing osmo_fsms. ** osmo_gsup_req: Prepare for D-GSM, where osmo-hlr will do proxy routing for remote HLRs / communicate with remote MSCs via a proxy: a) It is important that a response that osmo-hlr generates and that is sent back to a requesting MSC contains all IEs that are needed to route it back to the requester. Particularly source_name must become destination_name in the response to be able to even reach the requesting MSC. Other fields are also necessary to match, which were so far taken care of in individual numerous code paths. b) For some operations, the response to a GSUP request is generated asynchronously (like Update Location Request -> Response, or taking the response from an EUSE, or the upcoming proxying to a remote HLR). To be able to feed a request message's information back into the response, we must thus keep the request data around. Since struct osmo_gsup_message references a lot of external data, usually with pointers directly into the received msgb, it is not so trivial to pass GSUP message data around asynchronously, on its own. osmo_gsup_req is the combined solution for both a and b: it keeps all data for a GSUP message by taking ownership of the incoming msgb, and it provides an explicit API "forcing" callers to respond with osmo_gsup_req_respond(), so that all code paths trivially are definitely responding with the correct IEs set to match the request's routing (by using osmo_gsup_make_response() recently added to libosmocore). Adjust all osmo-hlr code paths to use *only* osmo_gsup_req to respond to incoming requests received on the GSUP server (above LU code being one of them). In fact, the same should be done on the client side. Hence osmo_gsup_req is implemented in a server/client agnostic way, and is placed in libosmo-gsupclient. As soon as we see routing errors in complex GSUP setups, using osmo_gsup_req in the related GSUP client is likely to resolve those problems without much thinking required beyond making all code paths use it. libosmo-gsupclient is hence added to osmo-hlr binary's own library dependencies. It would have been added by the D-GSM proxy routing anyway, we are just doing it a little sooner. ** global_title.c / osmo_gt: We so far handle a Global Title a.k.a. an IPA unit name as pointer + size, or as just pointer with implicit talloc size. To ease working with GSUP peer identification data, I require: - a non-allocated storage of a Global Title. It brings the drawback of being size limited, but our current implementation is anyway only able to handle MSC and SGSN names of 31 characters (see struct hlr_subscriber). - a single-argument handle for Global Title, - easy to use utility functions like osmo_gt_name(), osmo_gt_cmp(), and copying by simple assignment, a = b. Hence this patch adds a osmo_gt in global_title.h and global_title.c. Heavily used in LU and osmo_gsup_req. Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 --- M include/Makefile.am A include/osmocom/gsupclient/global_title.h A include/osmocom/gsupclient/gsup_req.h M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/db.h M include/osmocom/hlr/gsup_router.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/lu_fsm.h D include/osmocom/hlr/luop.h M src/Makefile.am M src/db.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/gsupclient/Makefile.am A src/gsupclient/global_title.c M src/gsupclient/gsup_client.c A src/gsupclient/gsup_req.c M src/hlr.c M src/hlr_ussd.c M src/logging.c A src/lu_fsm.c D src/luop.c M src/mslookup/mdns_record.c M tests/db/Makefile.am M tests/db/db_test.c M tests/db/db_test.err M tests/gsup_server/Makefile.am M tests/test_nodes.vty 33 files changed, 1,227 insertions(+), 906 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/16205/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 11:17:05 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 11:17:05 +0000 Subject: Change in osmo-hlr[master]: add osmo_gsup_msgb_alloc() In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15915 ) Change subject: add osmo_gsup_msgb_alloc() ...................................................................... Patch Set 10: Code-Review+1 > We don't need this assert() anymore. Fixed that and rebased following patches. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e Gerrit-Change-Number: 15915 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 25 Nov 2019 11:17:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 11:18:28 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 11:18:28 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 25 Nov 2019 11:18:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 11:19:38 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 11:19:38 +0000 Subject: Change in osmo-hlr[master]: remove gsup_test In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16199 ) Change subject: remove gsup_test ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I42e1c72bf4cce8034f968cd4392773bf2b643c1b Gerrit-Change-Number: 16199 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 25 Nov 2019 11:19:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 11:23:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 11:23:12 +0000 Subject: Change in osmo-hlr[master]: test_nodes.vty: tweak: add some '?' checks In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16200 ) Change subject: test_nodes.vty: tweak: add some '?' checks ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16200/2/tests/test_nodes.vty File tests/test_nodes.vty: https://gerrit.osmocom.org/c/osmo-hlr/+/16200/2/tests/test_nodes.vty at 84 PS2, Line 84: mslookup Configure Distributed GSM mslookup This fails, because mslookup is added in later patches. I'll fix it. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I92a4245cae806270b00330403cc114017ab7af53 Gerrit-Change-Number: 16200 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 25 Nov 2019 11:23:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 11:46:36 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 11:46:36 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16201/2/src/hlr_vty_subscr.c File src/hlr_vty_subscr.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16201/2/src/hlr_vty_subscr.c at 57 PS2, Line 57: timestamp_age This is missing from this patchset. It will later be added to proxy.c in another patch. I'll move the "(invalid timestamp)" / "(NN ago)" logic to a different patch after when timestamp_age() exists, and just print a new line here. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 25 Nov 2019 11:46:36 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:08:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:08:53 +0000 Subject: Change in libosmocore[master]: vty/vty.c: log received commands from telnet interface In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14974 ) Change subject: vty/vty.c: log received commands from telnet interface ...................................................................... Patch Set 6: (1 comment) While I see some benefits from logging vty commands (for instance finding last command causing a crash or helping with debug, or change of behavior), I don't think that's the proper way of doing it. Specially I don't like abusing the log levels to enable/disable different things there. So if you want, I'm fine with enabling those with debug. Or add a new logging subsystem for those. Perhaps we can use that one for vty_out() being printed to log files too. https://gerrit.osmocom.org/c/libosmocore/+/14974/6/src/vty/vty.c File src/vty/vty.c: https://gerrit.osmocom.org/c/libosmocore/+/14974/6/src/vty/vty.c at 458 PS6, Line 458: LOGP(DLGLOBAL, vty_command_log_level, osmo_sock_get_name_bug + LOGP: looks like a new LOGSOCKP or alike wrapper may be useful here. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5f6639f6ebc3e8f8df50ef48538df94285b759fd Gerrit-Change-Number: 14974 Gerrit-PatchSet: 6 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Mon, 25 Nov 2019 12:08:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:10:22 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:10:22 +0000 Subject: Change in osmo-hlr[master]: change format of 'last LU seen' In-Reply-To: References: Message-ID: pespin has removed a vote from this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15359 ) Change subject: change format of 'last LU seen' ...................................................................... Removed Code-Review+1 by pespin -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15359 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I6731968f05050399f4dd43b241290186e0c59e1a Gerrit-Change-Number: 15359 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: deleteVote -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:13:42 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:13:42 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: turn CLCKGen's thread into a daemon In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16178 ) Change subject: trx_toolkit/clck_gen.py: turn CLCKGen's thread into a daemon ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9d41c5baa25fa0a263758414a164c1bded25e04e Gerrit-Change-Number: 16178 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:13:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:18:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:18:52 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16177 ) Change subject: trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmocom-bb/+/16177/1/src/target/trx_toolkit/clck_gen.py File src/target/trx_toolkit/clck_gen.py: https://gerrit.osmocom.org/c/osmocom-bb/+/16177/1/src/target/trx_toolkit/clck_gen.py at 90 PS1, Line 90: while not self._breaker.wait(self.ctr_interval): not needed in this thread, but may be useful getting time before and after self.send_clck_ind(), then wait(self.ctr_interval - delay) to avoid excessive clock skewing. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibe477eb0a1ee2193c1ff16452a407be7e858b2ef Gerrit-Change-Number: 16177 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:18:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:20:49 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:20:49 +0000 Subject: Change in osmo-e1-recorder[master]: e1_recorder: Skip storing data to disk if line is in ALARM state In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16185 ) Change subject: e1_recorder: Skip storing data to disk if line is in ALARM state ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: Ie4c671053d372bc700f506198d1916853da03b9e Gerrit-Change-Number: 16185 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:20:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:21:25 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:21:25 +0000 Subject: Change in osmo-e1-recorder[master]: make e1cap format portable In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16186 ) Change subject: make e1cap format portable ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I0d22ad8f772d173c2252c2f6c562faee2e578806 Gerrit-Change-Number: 16186 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:21:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:22:30 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:22:30 +0000 Subject: Change in osmo-e1-recorder[master]: e1cap_dump: fix superchannel without pcap output In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16187 ) Change subject: e1cap_dump: fix superchannel without pcap output ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16187 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I458c02b4619b6fb2c7d30b1ce3bbac86243a6977 Gerrit-Change-Number: 16187 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:22:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:23:20 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:23:20 +0000 Subject: Change in libosmocore[master]: vty: track parent nodes also for telnet sessions In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16162 ) Change subject: vty: track parent nodes also for telnet sessions ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 Gerrit-Change-Number: 16162 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:23:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:25:23 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:25:23 +0000 Subject: Change in osmo-mgw[master]: fix use-after-free: require new fsm deferred dealloc, check for term In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/15839 ) Change subject: fix use-after-free: require new fsm deferred dealloc, check for term ...................................................................... Patch Set 3: > Patch Set 3: Code-Review+2 > > combine 3x +1 That's a +3, not +2! ;) -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/15839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 Gerrit-Change-Number: 15839 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:25:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:28:22 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:28:22 +0000 Subject: Change in simtrace2[master]: host: use autotools and split shared code to libosmo-simtrace2 In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16194 ) Change subject: host: use autotools and split shared code to libosmo-simtrace2 ...................................................................... Patch Set 1: Code-Review+1 It'd be more desirable to have all those file moving around in a separate commit but fine. -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I57e77f927ee9e169cc794c5dc6b128a2d590201b Gerrit-Change-Number: 16194 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:28:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:29:31 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:29:31 +0000 Subject: Change in simtrace2[master]: use osmo_st2_ or osmo_ prefix for [shared] library symbols In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16195 ) Change subject: use osmo_st2_ or osmo_ prefix for [shared] library symbols ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie2686b30717b9541b1217802ca967cd0a4cbde9b Gerrit-Change-Number: 16195 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:29:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:30:17 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:30:17 +0000 Subject: Change in simtrace2[master]: merge simtrace2-discovery.[ch] to libusb_util.[ch] In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16196 ) Change subject: merge simtrace2-discovery.[ch] to libusb_util.[ch] ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I4defbec70986a90c1f0cfb7587393265b73c0163 Gerrit-Change-Number: 16196 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:30:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:35:24 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:35:24 +0000 Subject: Change in osmo-hlr[master]: move headers to include/osmocom/hlr In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16197 ) Change subject: move headers to include/osmocom/hlr ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ic912fe27f545b85443c5fb713d8c3c8aac23c9ad Gerrit-Change-Number: 16197 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:35:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:35:42 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:35:42 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: drop unneeded debug print() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16179 ) Change subject: trx_toolkit/clck_gen.py: drop unneeded debug print() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16179 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I372af77d5b0b24fa38e304b782ca5b3d0888211b Gerrit-Change-Number: 16179 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:35:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:36:57 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:36:57 +0000 Subject: Change in osmo-hlr[master]: add osmo_gsup_msgb_alloc() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15915 ) Change subject: add osmo_gsup_msgb_alloc() ...................................................................... Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e Gerrit-Change-Number: 15915 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:36:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:37:40 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:37:40 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:37:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:39:01 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:39:01 +0000 Subject: Change in osmo-hlr[master]: remove gsup_test In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16199 ) Change subject: remove gsup_test ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I42e1c72bf4cce8034f968cd4392773bf2b643c1b Gerrit-Change-Number: 16199 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:39:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:40:12 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:40:12 +0000 Subject: Change in libosmocore[master]: add osmo_escape_cstr and osmo_quote_cstr In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16160 ) Change subject: add osmo_escape_cstr and osmo_quote_cstr ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3dfb892036e01000033dd8e7e4a6a0c32a3caa9b Gerrit-Change-Number: 16160 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:40:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:41:31 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:41:31 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Makefile convenience: add VTY_TEST var to run only one test VTY transcript tests run all *.vty test scripts, and it is not so trivial to figure out the test-db creation and cmdline to run only one of them when debugging. Add VTY_TEST var, useful to pick one test on the cmdline: cd tests make vty-test VTY_TEST=test_nodes.vty Not all VTY tests leave files behind that match hlr_vty_test.db-*, so make sure that make does not fail it they can't be deleted (|| true). Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 --- M tests/Makefile.am 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/98/16198/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:41:31 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:41:31 +0000 Subject: Change in osmo-hlr[master]: test_nodes.vty: tweak: add some '?' checks In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16200 ) Change subject: test_nodes.vty: tweak: add some '?' checks ...................................................................... test_nodes.vty: tweak: add some '?' checks I added these "by accident" when implementing D-GSM related VTY tests, now submitting them separately. Change-Id: I92a4245cae806270b00330403cc114017ab7af53 --- M tests/test_nodes.vty 1 file changed, 48 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/00/16200/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I92a4245cae806270b00330403cc114017ab7af53 Gerrit-Change-Number: 16200 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:41:31 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:41:31 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... db v4: add column last_lu_seen_ps Location Updating procedures from both CS and PS overwrite the same last_lu_seen field of a subscriber. For upcoming D-GSM it will be important to distinguish those, because only CS attaches qualify for MSISDN lookup. Add column last_lu_seen_ps, and upon PS LU, do not overwrite last_lu_seen, so that last_lu_seen now only reflects CS LU. In the VTY, dump both LU dates distinctively. Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba --- M include/osmocom/hlr/db.h M sql/hlr.sql M src/db.c M src/db_hlr.c M src/hlr_vty_subscr.c M tests/db_upgrade/db_upgrade_test.ok 6 files changed, 77 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/01/16201/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:41:31 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:41:31 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... add libosmo-mslookup and mDNS implementation Create a library with generic functions for performing a distributed subscriber lookup, which allow querying IPs and ports of services by MSISDN/IMSI. The first implementation uses multicast DNS packets. I decided to write custom DNS functions instead of using libc-ares (which we use in OsmoSGSN already), because it is only a DNS client implementation and we need both client and server. The DNS code is abstracted from the mslookup specific code, so the DNS part could in theory be replaced with a third party library in the future. We decided to place the mslookup library in the OsmoHLR source tree (instead of libosmocore), because the way we have implemented the D-GSM network, OsmoHLR will be the only user of the library for now. In the future, OsmoMSC may need it, but it depends on OsmoHLR already. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A include/osmocom/mslookup/mslookup_client_mdns.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_msg.h A src/mslookup/mdns_record.c A src/mslookup/mdns_record.h A src/mslookup/mdns_rfc.c A src/mslookup/mdns_rfc.h A src/mslookup/mdns_sock.c A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c A src/mslookup/mslookup_client_mdns.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 39 files changed, 4,380 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:41:31 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:41:31 +0000 Subject: Change in osmo-hlr[master]: implement D-GSM in osmo-hlr In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16209 ) Change subject: implement D-GSM in osmo-hlr ...................................................................... implement D-GSM in osmo-hlr Implement the mslookup server to service remote mslookup requests: - VTY mslookup/server config with service names, - the mslookup_mdns_server listening for mslookup requests, - determine whether a subscriber is on a local MSC. Use the mslookup client to proxy GSUP to remote HLRs: - VTY mslookup/client config, - remote_hlr.c to connect GSUP clients to remote GSUP servers, - proxy.c as local GSUP proxy state, so far in-memory. This is kept an opaque API without a mutable struct, so that it can be easily moved to a persistent database implementation. dgsm.c orchestrates mslookup server, client, and MUXes GSUP messages to the right proxy peers. Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b --- M include/osmocom/hlr/Makefile.am A include/osmocom/hlr/dgsm.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_vty.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/mslookup_server_mdns.h A include/osmocom/hlr/proxy.h A include/osmocom/hlr/remote_hlr.h M src/Makefile.am A src/dgsm.c A src/dgsm_vty.c M src/gsup_server.c M src/hlr.c M src/hlr_vty.c M src/hlr_vty_subscr.c M src/logging.c A src/mslookup_server.c A src/mslookup_server_mdns.c A src/proxy.c A src/remote_hlr.c M tests/test_nodes.vty M tests/test_subscriber.vty 24 files changed, 2,701 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/09/16209/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b Gerrit-Change-Number: 16209 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:41:31 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:41:31 +0000 Subject: Change in osmo-hlr[master]: add mslookup_manual_test In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16210 ) Change subject: add mslookup_manual_test ...................................................................... add mslookup_manual_test This can be used for manually testing proxy routing. It is not run as part of the testsuite. Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 --- M .gitignore M configure.ac M tests/Makefile.am A tests/mslookup_manual_test/Makefile.am A tests/mslookup_manual_test/fake_msc.c A tests/mslookup_manual_test/osmo-hlr-1.cfg A tests/mslookup_manual_test/osmo-hlr-2.cfg A tests/mslookup_manual_test/run.sh 8 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/10/16210/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 Gerrit-Change-Number: 16210 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:41:33 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:41:33 +0000 Subject: Change in osmo-hlr[master]: gitignore: add tests/db_upgrade/*.dump References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16213 ) Change subject: gitignore: add tests/db_upgrade/*.dump ...................................................................... gitignore: add tests/db_upgrade/*.dump Change-Id: I0dca7a94883bbe69151d919ae204edfff12288ab --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/13/16213/1 diff --git a/.gitignore b/.gitignore index 93f65e9..8d4b450 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ tests/gsup/gsup_test tests/db/db_test tests/hlr_vty_test.db* +tests/db_upgrade/*.dump # manuals doc/manuals/*.html -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I0dca7a94883bbe69151d919ae204edfff12288ab Gerrit-Change-Number: 16213 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:41:33 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:41:33 +0000 Subject: Change in osmo-hlr[master]: hlr_vty_subscr: prettier output for last LU seen References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16214 ) Change subject: hlr_vty_subscr: prettier output for last LU seen ...................................................................... hlr_vty_subscr: prettier output for last LU seen Extend the "last LU seen on ..." line with the amount of seconds that passed since now, or "(invalid timestamp)". Patch split from Id7fc50567211a0870ac0524f6dee94d4513781ba, because it depends on timestamp_age which was just added in Ife4a61d71926d08f310a1aeed9d9f1974f64178b. Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 --- M src/hlr_vty_subscr.c 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/14/16214/1 diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 6eac989..b8eba4d 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -54,8 +54,11 @@ char datebuf[26]; /* for ctime_r(3) */ if (!last_lu_seen) return; - vty_out(vty, " last LU seen on %s: %s UTC%s", domain_label, get_datestr(&last_lu_seen, datebuf), - VTY_NEWLINE); + vty_out(vty, " last LU seen on %s: %s UTC", domain_label, get_datestr(&last_lu_seen, datebuf)); + if (!timestamp_age(&last_lu_seen, &age)) + vty_out(vty, " (invalid timestamp)%s", VTY_NEWLINE); + else + vty_out(vty, " (%us ago)%s", age, VTY_NEWLINE); } static void subscr_dump_full_vty(struct vty *vty, struct hlr_subscriber *subscr) -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 Gerrit-Change-Number: 16214 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:43:29 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:43:29 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Patch Set 3: Code-Review+1 While using this, I've noticed that make fails because it tries to delete leftovers that not all VTY tests are creating. I've added || true to that rm line. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:43:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:45:28 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:45:28 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16201/2/src/hlr_vty_subscr.c File src/hlr_vty_subscr.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16201/2/src/hlr_vty_subscr.c at 57 PS2, Line 57: timestamp_age > This is missing from this patchset. It will later be added to proxy.c in another patch. [?] => https://gerrit.osmocom.org/c/osmo-hlr/+/16214 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 25 Nov 2019 12:45:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: osmith Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:48:05 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:48:05 +0000 Subject: Change in osmo-hlr[master]: gitignore: add tests/db_upgrade/*.dump In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16213 ) Change subject: gitignore: add tests/db_upgrade/*.dump ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I0dca7a94883bbe69151d919ae204edfff12288ab Gerrit-Change-Number: 16213 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:48:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:49:24 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:49:24 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:49:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:50:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 12:50:09 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16198/3/tests/Makefile.am File tests/Makefile.am: https://gerrit.osmocom.org/c/osmo-hlr/+/16198/3/tests/Makefile.am at 69 PS3, Line 69: -rm $(VTY_TEST_DB)-* || true what about rm -f instead of || true? -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:50:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:53:35 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:53:35 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#4) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... db v4: add column last_lu_seen_ps Location Updating procedures from both CS and PS overwrite the same last_lu_seen field of a subscriber. For upcoming D-GSM it will be important to distinguish those, because only CS attaches qualify for MSISDN lookup. Add column last_lu_seen_ps, and upon PS LU, do not overwrite last_lu_seen, so that last_lu_seen now only reflects CS LU. In the VTY, dump both LU dates distinctively. Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba --- M include/osmocom/hlr/db.h M sql/hlr.sql M src/db.c M src/db_hlr.c M src/hlr_vty_subscr.c M tests/db_upgrade/db_upgrade_test.ok 6 files changed, 76 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/01/16201/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:53:35 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:53:35 +0000 Subject: Change in osmo-hlr[master]: hlr_vty_subscr: prettier output for last LU seen In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 to look at the new patch set (#2). Change subject: hlr_vty_subscr: prettier output for last LU seen ...................................................................... hlr_vty_subscr: prettier output for last LU seen Extend the "last LU seen on ..." line with the amount of seconds that passed since now, or "(invalid timestamp)". Patch split from Id7fc50567211a0870ac0524f6dee94d4513781ba, because it depends on timestamp_age which was just added in Ife4a61d71926d08f310a1aeed9d9f1974f64178b. Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 --- M src/hlr_vty_subscr.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/14/16214/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 Gerrit-Change-Number: 16214 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:53:35 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:53:35 +0000 Subject: Change in osmo-hlr[master]: add mslookup_manual_test In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#4) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16210 ) Change subject: add mslookup_manual_test ...................................................................... add mslookup_manual_test This can be used for manually testing proxy routing. It is not run as part of the testsuite. Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 --- M .gitignore M configure.ac M tests/Makefile.am A tests/mslookup_manual_test/Makefile.am A tests/mslookup_manual_test/fake_msc.c A tests/mslookup_manual_test/osmo-hlr-1.cfg A tests/mslookup_manual_test/osmo-hlr-2.cfg A tests/mslookup_manual_test/run.sh 8 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/10/16210/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 Gerrit-Change-Number: 16210 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:53:35 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:53:35 +0000 Subject: Change in osmo-hlr[master]: doc: add D-GSM documentation In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#4) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16211 ) Change subject: doc: add D-GSM documentation ...................................................................... doc: add D-GSM documentation Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 --- A doc/manuals/chapters/dgsm.adoc M doc/manuals/osmohlr-usermanual.adoc 2 files changed, 483 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/11/16211/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 Gerrit-Change-Number: 16211 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:53:35 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:53:35 +0000 Subject: Change in osmo-hlr[master]: drop error log for when a subscriber does not exist In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#4) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16212 ) Change subject: drop error log for when a subscriber does not exist ...................................................................... drop error log for when a subscriber does not exist Checking for existence of a subscriber and seeing that there is none is not inherently an error. However, osmo-hlr currently logs on all occasions: DAUC ERROR Cannot read subscriber from db: MSISDN='1001': No such subscriber This spams the ERROR log level. Particularly when a D-GSM setup does subscriber existence checks for every incoming mslookup request, that potentially creates constant ERROR logging. The "No such subscriber" part comes from db_sel(), which might also return an sqlite3_errmsg(). We still want those sqlite3_errmsg()es in the ERROR log. Hence print an ERROR log only if db_sel() returns an rc != -ENOENT. Change-Id: I5044e9b4519b948edc4e451cef0f7830d315619b --- M src/db_hlr.c M tests/db/db_test.err 2 files changed, 4 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/12/16212/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5044e9b4519b948edc4e451cef0f7830d315619b Gerrit-Change-Number: 16212 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:58:57 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:58:57 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#4) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Makefile convenience: add VTY_TEST var to run only one test VTY transcript tests run all *.vty test scripts, and it is not so trivial to figure out the test-db creation and cmdline to run only one of them when debugging. Add VTY_TEST var, useful to pick one test on the cmdline: cd tests make vty-test VTY_TEST=test_nodes.vty Not all VTY tests leave files behind that match hlr_vty_test.db-*, so make sure that make does not fail it they can't be deleted (rm -f). Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 --- M tests/Makefile.am 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/98/16198/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 12:59:10 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 12:59:10 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16198/3/tests/Makefile.am File tests/Makefile.am: https://gerrit.osmocom.org/c/osmo-hlr/+/16198/3/tests/Makefile.am at 69 PS3, Line 69: -rm $(VTY_TEST_DB)-* || true > what about rm -f instead of || true? Ack -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 12:59:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 13:00:27 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 13:00:27 +0000 Subject: Change in osmo-hlr[master]: move headers to include/osmocom/hlr In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16197 ) Change subject: move headers to include/osmocom/hlr ...................................................................... move headers to include/osmocom/hlr Apply the same headers structure that we keep in most Osmocom source trees: Keep noinst_HEADERS in include/osmocom/hlr and include them using #include The only header kept in src/ is db_bootstrap.h, because it is generated during build time. If it was built in include/osmocom/hlr, we would need db.o to depend on db_bootstrap.h in a different subdir, which automake can't do well. Change-Id: Ic912fe27f545b85443c5fb713d8c3c8aac23c9ad --- M configure.ac M include/Makefile.am A include/osmocom/Makefile.am A include/osmocom/hlr/Makefile.am R include/osmocom/hlr/auc.h R include/osmocom/hlr/ctrl.h R include/osmocom/hlr/db.h R include/osmocom/hlr/gsup_router.h R include/osmocom/hlr/gsup_server.h R include/osmocom/hlr/hlr.h R include/osmocom/hlr/hlr_ussd.h R include/osmocom/hlr/hlr_vty.h R include/osmocom/hlr/hlr_vty_subscr.h R include/osmocom/hlr/logging.h R include/osmocom/hlr/luop.h R include/osmocom/hlr/rand.h M src/Makefile.am M src/auc.c M src/ctrl.c M src/db.c M src/db_auc.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/hlr.c M src/hlr_db_tool.c M src/hlr_ussd.c M src/hlr_vty.c M src/hlr_vty_subscr.c M src/logging.c M src/luop.c M src/osmo-euse-demo.c M tests/auc/Makefile.am M tests/auc/auc_test.c M tests/auc/gen_ts_55_205_test_sets/main_template.c M tests/db/Makefile.am M tests/db/db_test.c M tests/gsup/Makefile.am M tests/gsup/gsup_test.c M tests/gsup_server/Makefile.am M tests/gsup_server/gsup_server_test.c 42 files changed, 99 insertions(+), 90 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/configure.ac b/configure.ac index ca78f38..f7714aa 100644 --- a/configure.ac +++ b/configure.ac @@ -175,6 +175,8 @@ src/Makefile src/gsupclient/Makefile include/Makefile + include/osmocom/Makefile + include/osmocom/hlr/Makefile libosmo-gsup-client.pc sql/Makefile doc/manuals/Makefile diff --git a/include/Makefile.am b/include/Makefile.am index dac7011..d8eb1ec 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,2 +1,3 @@ -nobase_include_HEADERS = osmocom/gsupclient/gsup_client.h +SUBDIRS = osmocom +nobase_include_HEADERS = osmocom/gsupclient/gsup_client.h diff --git a/include/osmocom/Makefile.am b/include/osmocom/Makefile.am new file mode 100644 index 0000000..dbc2344 --- /dev/null +++ b/include/osmocom/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = \ + hlr \ + $(NULL) diff --git a/include/osmocom/hlr/Makefile.am b/include/osmocom/hlr/Makefile.am new file mode 100644 index 0000000..77a8764 --- /dev/null +++ b/include/osmocom/hlr/Makefile.am @@ -0,0 +1,14 @@ +noinst_HEADERS = \ + auc.h \ + ctrl.h \ + db.h \ + gsup_router.h \ + gsup_server.h \ + hlr.h \ + hlr_ussd.h \ + hlr_vty.h \ + hlr_vty_subscr.h \ + logging.h \ + luop.h \ + rand.h \ + $(NULL) diff --git a/src/auc.h b/include/osmocom/hlr/auc.h similarity index 100% rename from src/auc.h rename to include/osmocom/hlr/auc.h diff --git a/src/ctrl.h b/include/osmocom/hlr/ctrl.h similarity index 100% rename from src/ctrl.h rename to include/osmocom/hlr/ctrl.h diff --git a/src/db.h b/include/osmocom/hlr/db.h similarity index 100% rename from src/db.h rename to include/osmocom/hlr/db.h diff --git a/src/gsup_router.h b/include/osmocom/hlr/gsup_router.h similarity index 94% rename from src/gsup_router.h rename to include/osmocom/hlr/gsup_router.h index bff484e..0fc10d0 100644 --- a/src/gsup_router.h +++ b/include/osmocom/hlr/gsup_router.h @@ -1,7 +1,7 @@ #pragma once #include -#include "gsup_server.h" +#include struct gsup_route { struct llist_head list; diff --git a/src/gsup_server.h b/include/osmocom/hlr/gsup_server.h similarity index 100% rename from src/gsup_server.h rename to include/osmocom/hlr/gsup_server.h diff --git a/src/hlr.h b/include/osmocom/hlr/hlr.h similarity index 100% rename from src/hlr.h rename to include/osmocom/hlr/hlr.h diff --git a/src/hlr_ussd.h b/include/osmocom/hlr/hlr_ussd.h similarity index 97% rename from src/hlr_ussd.h rename to include/osmocom/hlr/hlr_ussd.h index 393ca6c..08e810e 100644 --- a/src/hlr_ussd.h +++ b/include/osmocom/hlr/hlr_ussd.h @@ -5,7 +5,7 @@ #include #include -#include "gsup_server.h" +#include #define NCSS_GUARD_TIMEOUT_DEFAULT 30 diff --git a/src/hlr_vty.h b/include/osmocom/hlr/hlr_vty.h similarity index 97% rename from src/hlr_vty.h rename to include/osmocom/hlr/hlr_vty.h index 280b55a..acd6510 100644 --- a/src/hlr_vty.h +++ b/include/osmocom/hlr/hlr_vty.h @@ -25,7 +25,7 @@ #include #include #include -#include "hlr.h" +#include enum hlr_vty_node { HLR_NODE = _LAST_OSMOVTY_NODE + 1, diff --git a/src/hlr_vty_subscr.h b/include/osmocom/hlr/hlr_vty_subscr.h similarity index 100% rename from src/hlr_vty_subscr.h rename to include/osmocom/hlr/hlr_vty_subscr.h diff --git a/src/logging.h b/include/osmocom/hlr/logging.h similarity index 100% rename from src/logging.h rename to include/osmocom/hlr/logging.h diff --git a/src/luop.h b/include/osmocom/hlr/luop.h similarity index 96% rename from src/luop.h rename to include/osmocom/hlr/luop.h index f96593b..77a1dec 100644 --- a/src/luop.h +++ b/include/osmocom/hlr/luop.h @@ -27,8 +27,8 @@ #include #include -#include "db.h" -#include "gsup_server.h" +#include +#include #define CANCEL_TIMEOUT_SECS 30 #define ISD_TIMEOUT_SECS 30 diff --git a/src/rand.h b/include/osmocom/hlr/rand.h similarity index 100% rename from src/rand.h rename to include/osmocom/hlr/rand.h diff --git a/src/Makefile.am b/src/Makefile.am index a042e4e..a5b71cf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,6 +11,7 @@ $(NULL) AM_CPPFLAGS = -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ $(NULL) EXTRA_DIST = \ @@ -24,18 +25,6 @@ CLEANFILES = $(BUILT_SOURCES) noinst_HEADERS = \ - auc.h \ - db.h \ - hlr.h \ - luop.h \ - gsup_router.h \ - gsup_server.h \ - logging.h \ - rand.h \ - ctrl.h \ - hlr_vty.h \ - hlr_vty_subscr.h \ - hlr_ussd.h \ db_bootstrap.h \ $(NULL) diff --git a/src/auc.c b/src/auc.c index 79c3918..28c441f 100644 --- a/src/auc.c +++ b/src/auc.c @@ -23,8 +23,8 @@ #include #include -#include "logging.h" -#include "rand.h" +#include +#include #define hexb(buf) osmo_hexdump_nospc((void*)buf, sizeof(buf)) #define hex(buf,sz) osmo_hexdump_nospc((void*)buf, sz) diff --git a/src/ctrl.c b/src/ctrl.c index c610d92..b78be12 100644 --- a/src/ctrl.c +++ b/src/ctrl.c @@ -28,9 +28,9 @@ #include #include -#include "hlr.h" -#include "ctrl.h" -#include "db.h" +#include +#include +#include #define SEL_BY "by-" #define SEL_BY_IMSI SEL_BY "imsi-" diff --git a/src/db.c b/src/db.c index 75ca889..ed2e568 100644 --- a/src/db.c +++ b/src/db.c @@ -23,8 +23,8 @@ #include #include -#include "logging.h" -#include "db.h" +#include +#include #include "db_bootstrap.h" /* This constant is currently duplicated in sql/hlr.sql and must be kept in sync! */ diff --git a/src/db_auc.c b/src/db_auc.c index 2cf7143..e3a840e 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -26,10 +26,10 @@ #include -#include "logging.h" -#include "db.h" -#include "auc.h" -#include "rand.h" +#include +#include +#include +#include #define LOGAUC(imsi, level, fmt, args ...) LOGP(DAUC, level, "IMSI='%s': " fmt, imsi, ## args) diff --git a/src/db_hlr.c b/src/db_hlr.c index 694ac53..e52b5ed 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -33,11 +33,11 @@ #include -#include "logging.h" -#include "hlr.h" -#include "db.h" -#include "gsup_server.h" -#include "luop.h" +#include +#include +#include +#include +#include #define LOGHLR(imsi, level, fmt, args ...) LOGP(DAUC, level, "IMSI='%s': " fmt, imsi, ## args) diff --git a/src/gsup_router.c b/src/gsup_router.c index df978ba..adf3af7 100644 --- a/src/gsup_router.c +++ b/src/gsup_router.c @@ -23,9 +23,9 @@ #include #include -#include "logging.h" -#include "gsup_server.h" -#include "gsup_router.h" +#include +#include +#include /*! Find a route for the given address. * \param[in] gs gsup server diff --git a/src/gsup_send.c b/src/gsup_send.c index 247a7e7..29aeaa5 100644 --- a/src/gsup_send.c +++ b/src/gsup_send.c @@ -21,8 +21,8 @@ #include -#include "gsup_server.h" -#include "gsup_router.h" +#include +#include #include diff --git a/src/gsup_server.c b/src/gsup_server.c index e75bbd7..bee6aef 100644 --- a/src/gsup_server.c +++ b/src/gsup_server.c @@ -27,8 +27,8 @@ #include #include -#include "gsup_server.h" -#include "gsup_router.h" +#include +#include static void osmo_gsup_server_send(struct osmo_gsup_conn *conn, int proto_ext, struct msgb *msg_tx) diff --git a/src/hlr.c b/src/hlr.c index 6bfc141..0970bb1 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -37,16 +37,16 @@ #include #include -#include "db.h" -#include "hlr.h" -#include "ctrl.h" -#include "logging.h" -#include "gsup_server.h" -#include "gsup_router.h" -#include "rand.h" -#include "luop.h" -#include "hlr_vty.h" -#include "hlr_ussd.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include struct hlr *g_hlr; static void *hlr_ctx = NULL; diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c index fcef597..1212018 100644 --- a/src/hlr_db_tool.c +++ b/src/hlr_db_tool.c @@ -29,9 +29,9 @@ #include #include -#include "logging.h" -#include "db.h" -#include "rand.h" +#include +#include +#include struct hlr_db_tool_ctx { /* DB context */ diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c index 1568815..00023ba 100644 --- a/src/hlr_ussd.c +++ b/src/hlr_ussd.c @@ -29,12 +29,12 @@ #include #include -#include "hlr.h" -#include "hlr_ussd.h" -#include "gsup_server.h" -#include "gsup_router.h" -#include "logging.h" -#include "db.h" +#include +#include +#include +#include +#include +#include /*********************************************************************** * core data structures expressing config from VTY @@ -317,7 +317,7 @@ * Internal USSD Handlers ***********************************************************************/ -#include "db.h" +#include static int handle_ussd_own_msisdn(struct osmo_gsup_conn *conn, struct ss_session *ss, const struct osmo_gsup_message *gsup, const struct ss_request *req) diff --git a/src/hlr_vty.c b/src/hlr_vty.c index f7c5bc8..6701cd9 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -33,12 +33,12 @@ #include #include -#include "db.h" -#include "hlr.h" -#include "hlr_vty.h" -#include "hlr_vty_subscr.h" -#include "hlr_ussd.h" -#include "gsup_server.h" +#include +#include +#include +#include +#include +#include struct cmd_node hlr_node = { HLR_NODE, @@ -150,7 +150,7 @@ * USSD Entity ***********************************************************************/ -#include "hlr_ussd.h" +#include #define USSD_STR "USSD Configuration\n" #define UROUTE_STR "Routing Configuration\n" diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 73dfab6..d2c4c81 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -28,8 +28,8 @@ #include #include -#include "hlr.h" -#include "db.h" +#include +#include struct vty; diff --git a/src/logging.c b/src/logging.c index 3fa2a69..3713ab3 100644 --- a/src/logging.c +++ b/src/logging.c @@ -1,5 +1,5 @@ #include -#include "logging.h" +#include const struct log_info_cat hlr_log_info_cat[] = { [DMAIN] = { diff --git a/src/luop.c b/src/luop.c index aff4d81..652ce0d 100644 --- a/src/luop.c +++ b/src/luop.c @@ -28,10 +28,10 @@ #include #include -#include "gsup_server.h" -#include "gsup_router.h" -#include "logging.h" -#include "luop.h" +#include +#include +#include +#include const struct value_string lu_state_names[] = { { LU_S_NULL, "NULL" }, diff --git a/src/osmo-euse-demo.c b/src/osmo-euse-demo.c index 4e4ef78..e707a9c 100644 --- a/src/osmo-euse-demo.c +++ b/src/osmo-euse-demo.c @@ -44,7 +44,7 @@ #include -#include "logging.h" +#include static struct osmo_gsup_client *g_gc; diff --git a/tests/auc/Makefile.am b/tests/auc/Makefile.am index a3814b6..9b65d71 100644 --- a/tests/auc/Makefile.am +++ b/tests/auc/Makefile.am @@ -2,12 +2,12 @@ AM_CPPFLAGS = \ $(all_includes) \ - -I$(top_srcdir)/src \ $(NULL) AM_CFLAGS = \ -Wall \ -ggdb3 \ + -I$(top_srcdir)/include \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(NULL) diff --git a/tests/auc/auc_test.c b/tests/auc/auc_test.c index e23cc02..cdbd0b7 100644 --- a/tests/auc/auc_test.c +++ b/tests/auc/auc_test.c @@ -29,8 +29,8 @@ #include -#include "logging.h" -#include "auc.h" +#include +#include #define comment_start() fprintf(stderr, "\n===== %s\n", __func__); #define comment_end() fprintf(stderr, "===== %s: SUCCESS\n\n", __func__); diff --git a/tests/auc/gen_ts_55_205_test_sets/main_template.c b/tests/auc/gen_ts_55_205_test_sets/main_template.c index a78bddb..3fafdf5 100644 --- a/tests/auc/gen_ts_55_205_test_sets/main_template.c +++ b/tests/auc/gen_ts_55_205_test_sets/main_template.c @@ -33,8 +33,8 @@ #include -#include "logging.h" -#include "auc.h" +#include +#include #define comment_start() fprintf(stderr, "\n===== %s\n", __func__); #define comment_end() fprintf(stderr, "===== %s: SUCCESS\n\n", __func__); diff --git a/tests/db/Makefile.am b/tests/db/Makefile.am index 5730937..f13824d 100644 --- a/tests/db/Makefile.am +++ b/tests/db/Makefile.am @@ -1,7 +1,7 @@ AM_CFLAGS = \ $(all_includes) \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ -Wall \ -ggdb3 \ $(LIBOSMOCORE_CFLAGS) \ diff --git a/tests/db/db_test.c b/tests/db/db_test.c index 1da2752..d6060dd 100644 --- a/tests/db/db_test.c +++ b/tests/db/db_test.c @@ -27,8 +27,8 @@ #include #include -#include "db.h" -#include "logging.h" +#include +#include #define comment_start() fprintf(stderr, "\n===== %s\n", __func__); #define comment(fmt, args...) fprintf(stderr, "\n--- " fmt "\n\n", ## args); diff --git a/tests/gsup/Makefile.am b/tests/gsup/Makefile.am index 907aae8..2f56504 100644 --- a/tests/gsup/Makefile.am +++ b/tests/gsup/Makefile.am @@ -1,11 +1,11 @@ AM_CPPFLAGS = \ $(all_includes) \ - -I$(top_srcdir)/src \ $(NULL) AM_CFLAGS = \ -Wall \ -ggdb3 \ + -I$(top_srcdir)/include \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ diff --git a/tests/gsup/gsup_test.c b/tests/gsup/gsup_test.c index 41865d2..a41ba88 100644 --- a/tests/gsup/gsup_test.c +++ b/tests/gsup/gsup_test.c @@ -24,8 +24,8 @@ #include #include -#include "logging.h" -#include "luop.h" +#include +#include struct osmo_gsup_server; diff --git a/tests/gsup_server/Makefile.am b/tests/gsup_server/Makefile.am index 686ce37..e64ac4a 100644 --- a/tests/gsup_server/Makefile.am +++ b/tests/gsup_server/Makefile.am @@ -1,11 +1,11 @@ AM_CPPFLAGS = \ $(all_includes) \ - -I$(top_srcdir)/src \ $(NULL) AM_CFLAGS = \ -Wall \ -ggdb3 \ + -I$(top_srcdir)/include \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ $(LIBOSMOABIS_CFLAGS) \ diff --git a/tests/gsup_server/gsup_server_test.c b/tests/gsup_server/gsup_server_test.c index cc475be..4aec69b 100644 --- a/tests/gsup_server/gsup_server_test.c +++ b/tests/gsup_server/gsup_server_test.c @@ -20,7 +20,7 @@ #include #include -#include "gsup_server.h" +#include #define comment_start() printf("\n===== %s\n", __func__) #define comment_end() printf("===== %s: SUCCESS\n\n", __func__) -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ic912fe27f545b85443c5fb713d8c3c8aac23c9ad Gerrit-Change-Number: 16197 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 13:00:38 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 13:00:38 +0000 Subject: Change in osmo-hlr[master]: gitignore: add tests/db_upgrade/*.dump In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16213 ) Change subject: gitignore: add tests/db_upgrade/*.dump ...................................................................... gitignore: add tests/db_upgrade/*.dump Change-Id: I0dca7a94883bbe69151d919ae204edfff12288ab --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/.gitignore b/.gitignore index 93f65e9..8d4b450 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ tests/gsup/gsup_test tests/db/db_test tests/hlr_vty_test.db* +tests/db_upgrade/*.dump # manuals doc/manuals/*.html -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I0dca7a94883bbe69151d919ae204edfff12288ab Gerrit-Change-Number: 16213 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 13:00:56 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 13:00:56 +0000 Subject: Change in osmo-hlr[master]: fix upgrade test in presence of ~/.sqliterc In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16019 ) Change subject: fix upgrade test in presence of ~/.sqliterc ...................................................................... fix upgrade test in presence of ~/.sqliterc db_upgrade_test.sh: - If an ~/.sqliterc file exists, it causes output of '-- Loading resources from ~/.sqliterc'. Use -batch option to omit that. - To make sure that column headers are off when required, add -noheaders in some places. Change-Id: I279a39984563594a4a3914b2ce3d803ad9468fe8 --- M tests/db_upgrade/db_upgrade_test.sh 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/tests/db_upgrade/db_upgrade_test.sh b/tests/db_upgrade/db_upgrade_test.sh index bf56c56..8e2b498 100755 --- a/tests/db_upgrade/db_upgrade_test.sh +++ b/tests/db_upgrade/db_upgrade_test.sh @@ -11,21 +11,21 @@ dump_sorted_schema(){ db_file="$1" - tables="$(sqlite3 "$db_file" "SELECT name FROM sqlite_master WHERE type = 'table' order by name")" + tables="$(sqlite3 -batch -noheader "$db_file" "SELECT name FROM sqlite_master WHERE type = 'table' order by name")" for table in $tables; do echo echo "Table: $table" - sqlite3 -header "$db_file" "SELECT name,type,\"notnull\",dflt_value,pk FROM PRAGMA_TABLE_INFO('$table') order by name;" + sqlite3 -batch -header "$db_file" "SELECT name,type,\"notnull\",dflt_value,pk FROM PRAGMA_TABLE_INFO('$table') order by name;" echo echo "Table $table contents:" - columns="$(sqlite3 "$db_file" "SELECT name FROM PRAGMA_TABLE_INFO('$table') order by name;")" - sqlite3 -header "$db_file" "SELECT $(echo $columns | sed 's/ /,/g') from $table;" + columns="$(sqlite3 -batch -noheader "$db_file" "SELECT name FROM PRAGMA_TABLE_INFO('$table') order by name;")" + sqlite3 -batch -header "$db_file" "SELECT $(echo $columns | sed 's/ /,/g') from $table;" done } rm -f "$db" echo "Creating db in schema version 0" -sqlite3 "$db" < "$srcdir/hlr_db_v0.sql" +sqlite3 -batch "$db" < "$srcdir/hlr_db_v0.sql" echo echo "Version 0 db:" @@ -61,7 +61,7 @@ -n OsmoHLR -p 4258 \ -r "$osmo_hlr -c $cfg -l $mint_db" \ "$srcdir/create_subscribers.vty" - sqlite3 "$mint_db" < "$srcdir/create_subscribers_step2.sql" + sqlite3 -batch "$mint_db" < "$srcdir/create_subscribers_step2.sql" set +x test_dump="$builddir/test.dump" -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I279a39984563594a4a3914b2ce3d803ad9468fe8 Gerrit-Change-Number: 16019 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 13:01:30 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 13:01:30 +0000 Subject: Change in osmo-hlr[master]: db upgrade: remove some code dup In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15964 ) Change subject: db upgrade: remove some code dup ...................................................................... db upgrade: remove some code dup Instead of a switch() for each version number with identical switch cases except for the function name, use an array of function pointers and loop. Also print a success message after each individual version upgrade, instead of only one in the end (see change in db_upgrade_test.ok). Change-Id: I1736af3d9a3f02e29db836966ac15ce49f94737b --- M src/db.c M tests/db_upgrade/db_upgrade_test.ok 2 files changed, 17 insertions(+), 33 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/db.c b/src/db.c index ed2e568..992dbad 100644 --- a/src/db.c +++ b/src/db.c @@ -423,6 +423,13 @@ return rc; } +typedef int (*db_upgrade_func_t)(struct db_context *dbc); +static db_upgrade_func_t db_upgrade_path[] = { + db_upgrade_v1, + db_upgrade_v2, + db_upgrade_v3, +}; + static int db_get_user_version(struct db_context *dbc) { const char *user_version_sql = "PRAGMA user_version"; @@ -533,41 +540,16 @@ LOGP(DDB, LOGL_NOTICE, "Database '%s' has HLR DB schema version %d\n", dbc->fname, version); - if (version < CURRENT_SCHEMA_VERSION && allow_upgrade) { - switch (version) { - case 0: - rc = db_upgrade_v1(dbc); - if (rc != SQLITE_DONE) { - LOGP(DDB, LOGL_ERROR, "Failed to upgrade HLR DB schema to version 1: (rc=%d) %s\n", - rc, sqlite3_errmsg(dbc->db)); - goto out_free; - } - version = 1; - /* fall through */ - case 1: - rc = db_upgrade_v2(dbc); - if (rc != SQLITE_DONE) { - LOGP(DDB, LOGL_ERROR, "Failed to upgrade HLR DB schema to version 2: (rc=%d) %s\n", - rc, sqlite3_errmsg(dbc->db)); - goto out_free; - } - version = 2; - /* fall through */ - case 2: - rc = db_upgrade_v3(dbc); - if (rc != SQLITE_DONE) { - LOGP(DDB, LOGL_ERROR, "Failed to upgrade HLR DB schema to version 3: (rc=%d) %s\n", - rc, sqlite3_errmsg(dbc->db)); - goto out_free; - } - version = 3; - /* fall through */ - /* case N: ... */ - default: - break; + for (; allow_upgrade && (version < ARRAY_SIZE(db_upgrade_path)); version++) { + db_upgrade_func_t upgrade_func = db_upgrade_path[version]; + rc = upgrade_func(dbc); + if (rc != SQLITE_DONE) { + LOGP(DDB, LOGL_ERROR, "Failed to upgrade HLR DB schema to version %d: (rc=%d) %s\n", + version+1, rc, sqlite3_errmsg(dbc->db)); + goto out_free; } LOGP(DDB, LOGL_NOTICE, "Database '%s' has been upgraded to HLR DB schema version %d\n", - dbc->fname, version); + dbc->fname, version+1); } if (version != CURRENT_SCHEMA_VERSION) { diff --git a/tests/db_upgrade/db_upgrade_test.ok b/tests/db_upgrade/db_upgrade_test.ok index c1f0f9d..49e7151 100644 --- a/tests/db_upgrade/db_upgrade_test.ok +++ b/tests/db_upgrade/db_upgrade_test.ok @@ -80,6 +80,8 @@ DMAIN hlr starting DDB using database: test.db DDB Database test.db' has HLR DB schema version 0 +DDB Database test.db' has been upgraded to HLR DB schema version 1 +DDB Database test.db' has been upgraded to HLR DB schema version 2 DDB Database test.db' has been upgraded to HLR DB schema version 3 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15964 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I1736af3d9a3f02e29db836966ac15ce49f94737b Gerrit-Change-Number: 15964 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 13:02:02 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 13:02:02 +0000 Subject: Change in osmo-hlr[master]: add osmo_gsup_msgb_alloc() In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15915 ) Change subject: add osmo_gsup_msgb_alloc() ...................................................................... add osmo_gsup_msgb_alloc() Throughout osmo-hlr's code, the GSUP msgb allocation is duplicated as: msgb_alloc_headroom(1024+16, 16, "foo"); Instead, use one common function to keep the magic numbers in one place. Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e --- M include/osmocom/hlr/gsup_server.h M src/gsup_server.c M src/hlr.c M src/hlr_ussd.c M src/luop.c 5 files changed, 17 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/hlr/gsup_server.h b/include/osmocom/hlr/gsup_server.h index 9c4d483..14f5013 100644 --- a/include/osmocom/hlr/gsup_server.h +++ b/include/osmocom/hlr/gsup_server.h @@ -47,6 +47,7 @@ bool supports_ps; /* client supports OSMO_GSUP_CN_DOMAIN_PS */ }; +struct msgb *osmo_gsup_msgb_alloc(const char *label); int osmo_gsup_conn_send(struct osmo_gsup_conn *conn, struct msgb *msg); int osmo_gsup_conn_ccm_get(const struct osmo_gsup_conn *clnt, uint8_t **addr, diff --git a/src/gsup_server.c b/src/gsup_server.c index bee6aef..ed1b285 100644 --- a/src/gsup_server.c +++ b/src/gsup_server.c @@ -30,6 +30,13 @@ #include #include +struct msgb *osmo_gsup_msgb_alloc(const char *label) +{ + struct msgb *msg = msgb_alloc_headroom(1024+16, 16, label); + OSMO_ASSERT(msg); + return msg; +} + static void osmo_gsup_server_send(struct osmo_gsup_conn *conn, int proto_ext, struct msgb *msg_tx) { diff --git a/src/hlr.c b/src/hlr.c index 0970bb1..1638e67 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -128,7 +128,7 @@ } /* Send ISD to MSC/SGSN */ - msg_out = msgb_alloc_headroom(1024+16, 16, "GSUP ISD UPDATE"); + msg_out = osmo_gsup_msgb_alloc("GSUP ISD UPDATE"); if (msg_out == NULL) { LOGP(DLGSUP, LOGL_ERROR, "IMSI='%s': Cannot notify GSUP client; could not allocate msg buffer " @@ -271,7 +271,7 @@ gsup_out.num_auth_vectors = rc; } - msg_out = msgb_alloc_headroom(1024+16, 16, "GSUP AUC response"); + msg_out = osmo_gsup_msgb_alloc("GSUP AUC response"); osmo_gsup_encode(msg_out, &gsup_out); return osmo_gsup_conn_send(conn, msg_out); } @@ -451,7 +451,7 @@ gsup_reply.cause = GMM_CAUSE_NET_FAIL; } - msg_out = msgb_alloc_headroom(1024+16, 16, "GSUP AUC response"); + msg_out = osmo_gsup_msgb_alloc("GSUP AUC response"); osmo_gsup_encode(msg_out, &gsup_reply); return osmo_gsup_conn_send(conn, msg_out); } @@ -466,8 +466,7 @@ OSMO_STRLCPY_ARRAY(gsup_reply.imsi, imsi); gsup_reply.message_type = type_err; gsup_reply.cause = err_cause; - msg_out = msgb_alloc_headroom(1024+16, 16, "GSUP ERR response"); - OSMO_ASSERT(msg_out); + msg_out = osmo_gsup_msgb_alloc("GSUP ERR response"); osmo_gsup_encode(msg_out, &gsup_reply); LOGP(DMAIN, LOGL_NOTICE, "Tx %s\n", osmo_gsup_message_type_name(type_err)); return osmo_gsup_conn_send(conn, msg_out); @@ -525,7 +524,7 @@ /* Accept all IMEIs */ gsup_reply.imei_result = OSMO_GSUP_IMEI_RESULT_ACK; gsup_reply.message_type = OSMO_GSUP_MSGT_CHECK_IMEI_RESULT; - msg_out = msgb_alloc_headroom(1024+16, 16, "GSUP Check_IMEI response"); + msg_out = osmo_gsup_msgb_alloc("GSUP Check_IMEI response"); memcpy(gsup_reply.imsi, gsup->imsi, sizeof(gsup_reply.imsi)); osmo_gsup_encode(msg_out, &gsup_reply); return osmo_gsup_conn_send(conn, msg_out); @@ -591,8 +590,7 @@ end: /* Send error back to source */ if (ret) { - struct msgb *msg_err = msgb_alloc_headroom(1024+16, 16, "GSUP forward ERR response"); - OSMO_ASSERT(msg_err); + struct msgb *msg_err = osmo_gsup_msgb_alloc("GSUP forward ERR response"); gsup_err->message_type = OSMO_GSUP_MSGT_E_ROUTING_ERROR; osmo_gsup_encode(msg_err, gsup_err); LOGP_GSUP_FWD(gsup_err, LOGL_NOTICE, "Tx %s\n", osmo_gsup_message_type_name(gsup_err->message_type)); diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c index 00023ba..8cdc15c 100644 --- a/src/hlr_ussd.c +++ b/src/hlr_ussd.c @@ -464,8 +464,7 @@ } if (is_euse_originated) { - msg_out = msgb_alloc_headroom(1024+16, 16, "GSUP USSD FW"); - OSMO_ASSERT(msg_out); + msg_out = osmo_gsup_msgb_alloc("GSUP USSD FW"); /* Received from EUSE, Forward to VLR */ osmo_gsup_encode(msg_out, gsup); ss_gsup_send(ss, conn->server, msg_out); @@ -481,8 +480,7 @@ LOGPSS(ss, LOGL_ERROR, "Cannot find conn for EUSE %s\n", addr); ss_tx_error(ss, req->invoke_id, GSM0480_ERR_CODE_SYSTEM_FAILURE); } else { - msg_out = msgb_alloc_headroom(1024+16, 16, "GSUP USSD FW"); - OSMO_ASSERT(msg_out); + msg_out = osmo_gsup_msgb_alloc("GSUP USSD FW"); osmo_gsup_encode(msg_out, gsup); osmo_gsup_conn_send(conn, msg_out); } diff --git a/src/luop.c b/src/luop.c index 652ce0d..1a2f854 100644 --- a/src/luop.c +++ b/src/luop.c @@ -50,8 +50,7 @@ { struct msgb *msg_out; - msg_out = msgb_alloc_headroom(1024+16, 16, "GSUP LUOP"); - OSMO_ASSERT(msg_out); + msg_out = osmo_gsup_msgb_alloc("GSUP LUOP"); osmo_gsup_encode(msg_out, gsup); osmo_gsup_addr_send(luop->gsup_server, luop->peer, -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I40e99b5bc4fd8f750da7643c03b2119ac3bfd95e Gerrit-Change-Number: 15915 Gerrit-PatchSet: 11 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 13:18:18 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 25 Nov 2019 13:18:18 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16177 ) Change subject: trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread ...................................................................... trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread The previous approach was based on threading.Timer, so on each clock iteration one thread spawned another new thread. So far it worked well, but such frequent spawning involves an additional overhead. After this change, CLCKGen.start() allocates and starts a new thread, that periodically sends clock indications and sleep()s during the indication intervals. The CLCKGen.stop() in its turn terminates that thread and frees the memory. Change-Id: Ibe477eb0a1ee2193c1ff16452a407be7e858b2ef --- M src/target/trx_toolkit/clck_gen.py M src/target/trx_toolkit/transceiver.py 2 files changed, 41 insertions(+), 22 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py index c58d8bd..92ca217 100755 --- a/src/target/trx_toolkit/clck_gen.py +++ b/src/target/trx_toolkit/clck_gen.py @@ -4,7 +4,7 @@ # TRX Toolkit # Simple TDMA frame clock generator # -# (C) 2017-2018 by Vadim Yanitskiy +# (C) 2017-2019 by Vadim Yanitskiy # # All Rights Reserved # @@ -22,13 +22,14 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -APP_CR_HOLDERS = [("2017-2018", "Vadim Yanitskiy ")] +APP_CR_HOLDERS = [("2017-2019", "Vadim Yanitskiy ")] import logging as log +import threading import signal +import time from app_common import ApplicationBase -from threading import Timer from udp_link import UDPLink from gsm_shared import * @@ -40,32 +41,54 @@ # Average loop back delay LO_DELAY_US = 90.0 - # State variables - timer = None - def __init__(self, clck_links, clck_start = 0, ind_period = 102): + # This event is needed to control the thread + self._breaker = threading.Event() + self._thread = None + self.clck_links = clck_links self.ind_period = ind_period self.clck_start = clck_start - self.clck_src = clck_start # Calculate counter time self.ctr_interval = self.GSM_FRAME_US - self.LO_DELAY_US self.ctr_interval /= self.SEC_DELAY_US self.ctr_interval *= self.ind_period + @property + def running(self): + if self._thread is None: + return False + return self._thread.isAlive() + def start(self): - # Send the first indication - self.send_clck_ind() + # Make sure we won't start two threads + assert(self._thread is None) + + # (Re)set the clock counter + self.clck_src = self.clck_start + + # Initialize and start a new thread + self._thread = threading.Thread(target = self._worker) + self._thread.start() def stop(self): - # Stop pending timer - if self.timer is not None: - self.timer.cancel() - self.timer = None + # No thread, no problem ;) + if self._thread is None: + return - # Reset the clock source - self.clck_src = self.clck_start + # Stop the thread first + self._breaker.set() + self._thread.join() + + # Free memory, reset breaker + del self._thread + self._thread = None + self._breaker.clear() + + def _worker(self): + while not self._breaker.wait(self.ctr_interval): + self.send_clck_ind() def send_clck_ind(self): # Keep clock cycle @@ -87,10 +110,6 @@ # Increase frame count self.clck_src += self.ind_period - # Schedule a new indication - self.timer = Timer(self.ctr_interval, self.send_clck_ind) - self.timer.start() - # Just a wrapper for independent usage class Application(ApplicationBase): def __init__(self): @@ -102,7 +121,7 @@ # Configure logging log.basicConfig(level = log.DEBUG, - format = "[%(levelname)s] %(filename)s:%(lineno)d %(message)s") + format = "[%(levelname)s] TID#%(thread)s %(filename)s:%(lineno)d %(message)s") def run(self): self.link = UDPLink("127.0.0.1", 5800, "0.0.0.0", 5700) diff --git a/src/target/trx_toolkit/transceiver.py b/src/target/trx_toolkit/transceiver.py index 37680e7..b1a5c11 100644 --- a/src/target/trx_toolkit/transceiver.py +++ b/src/target/trx_toolkit/transceiver.py @@ -172,10 +172,10 @@ # Transceiver was started clck_links.append(self.clck_if) - if not self.clck_gen.timer and len(clck_links) > 0: + if not self.clck_gen.running and len(clck_links) > 0: log.info("Starting clock generator") self.clck_gen.start() - elif self.clck_gen.timer and not clck_links: + elif self.clck_gen.running and not clck_links: log.info("Stopping clock generator") self.clck_gen.stop() -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibe477eb0a1ee2193c1ff16452a407be7e858b2ef Gerrit-Change-Number: 16177 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 13:18:18 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 25 Nov 2019 13:18:18 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: turn CLCKGen's thread into a daemon In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16178 ) Change subject: trx_toolkit/clck_gen.py: turn CLCKGen's thread into a daemon ...................................................................... trx_toolkit/clck_gen.py: turn CLCKGen's thread into a daemon If the main thread crashes, the CLCKGen's thread would never stop. It would also happen if the main thread terminates without calling CLCKGen.stop(). Let's prevent this by creating a daemon thread. Change-Id: I9d41c5baa25fa0a263758414a164c1bded25e04e --- M src/target/trx_toolkit/clck_gen.py 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py index 92ca217..a50c985 100755 --- a/src/target/trx_toolkit/clck_gen.py +++ b/src/target/trx_toolkit/clck_gen.py @@ -70,6 +70,7 @@ # Initialize and start a new thread self._thread = threading.Thread(target = self._worker) + self._thread.setDaemon(True) self._thread.start() def stop(self): @@ -128,6 +129,9 @@ self.clck = CLCKGen([self.link], ind_period = 51) self.clck.start() + # Block unless we receive a signal + self.clck._thread.join() + def sig_handler(self, signum, frame): log.info("Signal %d received" % signum) if signum == signal.SIGINT: -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9d41c5baa25fa0a263758414a164c1bded25e04e Gerrit-Change-Number: 16178 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 13:18:19 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 25 Nov 2019 13:18:19 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: drop unneeded debug print() In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16179 ) Change subject: trx_toolkit/clck_gen.py: drop unneeded debug print() ...................................................................... trx_toolkit/clck_gen.py: drop unneeded debug print() Change-Id: I372af77d5b0b24fa38e304b782ca5b3d0888211b --- M src/target/trx_toolkit/clck_gen.py 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, approved diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py index a50c985..0219bb4 100755 --- a/src/target/trx_toolkit/clck_gen.py +++ b/src/target/trx_toolkit/clck_gen.py @@ -135,7 +135,6 @@ def sig_handler(self, signum, frame): log.info("Signal %d received" % signum) if signum == signal.SIGINT: - print("Stopping timer") self.clck.stop() if __name__ == '__main__': -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16179 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I372af77d5b0b24fa38e304b782ca5b3d0888211b Gerrit-Change-Number: 16179 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 13:26:12 2019 From: gerrit-no-reply at lists.osmocom.org (mqng2) Date: Mon, 25 Nov 2019 13:26:12 +0000 Subject: Change in osmo-bsc[master]: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed wh... In-Reply-To: References: Message-ID: mqng2 has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15909 ) Change subject: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed when the BTS configured with none combined CCCH mode. ...................................................................... Patch Set 1: > Patch Set 1: > > Should we abandon this change? Yes we should -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I33ea7808ac1bd064b88fd609bd7dfe0c8aa341f2 Gerrit-Change-Number: 15909 Gerrit-PatchSet: 1 Gerrit-Owner: mqng2 Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 13:26:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 14:00:03 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 14:00:03 +0000 Subject: Change in osmo-hlr[master]: test_nodes.vty: tweak: add some '?' checks In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16200 ) Change subject: test_nodes.vty: tweak: add some '?' checks ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I92a4245cae806270b00330403cc114017ab7af53 Gerrit-Change-Number: 16200 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 14:00:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 14:02:45 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 14:02:45 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... Patch Set 5: Why does it matter whether attachment is CS or PS? please explain better the rationale behind this change from user case / scenario point of view. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 14:02:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 14:03:42 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 14:03:42 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 14:03:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 14:05:05 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 14:05:05 +0000 Subject: Change in osmo-hlr[master]: Makefile convenience: add VTY_TEST var to run only one test In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16198 ) Change subject: Makefile convenience: add VTY_TEST var to run only one test ...................................................................... Makefile convenience: add VTY_TEST var to run only one test VTY transcript tests run all *.vty test scripts, and it is not so trivial to figure out the test-db creation and cmdline to run only one of them when debugging. Add VTY_TEST var, useful to pick one test on the cmdline: cd tests make vty-test VTY_TEST=test_nodes.vty Not all VTY tests leave files behind that match hlr_vty_test.db-*, so make sure that make does not fail it they can't be deleted (rm -f). Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 --- M tests/Makefile.am 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/tests/Makefile.am b/tests/Makefile.am index 357fbac..62001f6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -52,6 +52,7 @@ endif VTY_TEST_DB = hlr_vty_test.db +VTY_TEST ?= *.vty # To update the VTY script from current application behavior, # pass -u to vty_script_runner.py by doing: @@ -63,9 +64,8 @@ osmo_verify_transcript_vty.py -v \ -n OsmoHLR -p 4258 \ -r "$(top_builddir)/src/osmo-hlr -c $(top_srcdir)/doc/examples/osmo-hlr.cfg -l $(VTY_TEST_DB)" \ - $(U) $(srcdir)/*.vty - -rm -f $(VTY_TEST_DB) - -rm $(VTY_TEST_DB)-* + $(U) $(srcdir)/$(VTY_TEST) + -rm -f $(VTY_TEST_DB) $(VTY_TEST_DB)-* CTRL_TEST_DB = hlr_ctrl_test.db -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I4ad7ddb31b2bfb668b3540cfef658417dd442375 Gerrit-Change-Number: 16198 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 14:05:35 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 14:05:35 +0000 Subject: Change in osmo-hlr[master]: remove gsup_test In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16199 ) Change subject: remove gsup_test ...................................................................... remove gsup_test The test doesn't do much: it encodes an Insert Subscriber Data request for the sole purpose to ensure the msgb is allocated large enough. A bug like that is easily avoided statically. Also, the lu functions will get refactored soon, it doesn't make sense to me to drag this test along. Change-Id: I42e1c72bf4cce8034f968cd4392773bf2b643c1b --- M configure.ac M tests/Makefile.am D tests/gsup/Makefile.am D tests/gsup/gsup_test.c D tests/gsup/gsup_test.err D tests/gsup/gsup_test.ok M tests/testsuite.at 7 files changed, 0 insertions(+), 145 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/configure.ac b/configure.ac index f7714aa..d39edb2 100644 --- a/configure.ac +++ b/configure.ac @@ -186,7 +186,6 @@ tests/auc/Makefile tests/auc/gen_ts_55_205_test_sets/Makefile tests/gsup_server/Makefile - tests/gsup/Makefile tests/db/Makefile tests/db_upgrade/Makefile ) diff --git a/tests/Makefile.am b/tests/Makefile.am index 62001f6..f8591a5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,6 @@ auc \ gsup_server \ db \ - gsup \ db_upgrade \ $(NULL) diff --git a/tests/gsup/Makefile.am b/tests/gsup/Makefile.am deleted file mode 100644 index 2f56504..0000000 --- a/tests/gsup/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -AM_CPPFLAGS = \ - $(all_includes) \ - $(NULL) - -AM_CFLAGS = \ - -Wall \ - -ggdb3 \ - -I$(top_srcdir)/include \ - $(LIBOSMOCORE_CFLAGS) \ - $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOABIS_CFLAGS) \ - $(NULL) - -AM_LDFLAGS = \ - -no-install \ - $(NULL) - -EXTRA_DIST = \ - gsup_test.ok \ - gsup_test.err \ - $(NULL) - -noinst_PROGRAMS = \ - gsup_test \ - $(NULL) - -gsup_test_SOURCES = \ - gsup_test.c \ - $(NULL) - -gsup_test_LDADD = \ - $(top_srcdir)/src/luop.c \ - $(top_srcdir)/src/gsup_server.c \ - $(top_srcdir)/src/gsup_router.c \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOABIS_LIBS) \ - $(NULL) - -.PHONY: update_exp -update_exp: - $(builddir)/gsup_test >"$(srcdir)/gsup_test.ok" 2>"$(srcdir)/gsup_test.err" diff --git a/tests/gsup/gsup_test.c b/tests/gsup/gsup_test.c deleted file mode 100644 index a41ba88..0000000 --- a/tests/gsup/gsup_test.c +++ /dev/null @@ -1,91 +0,0 @@ -/* (C) 2018 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 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 - -struct osmo_gsup_server; - -/* override osmo_gsup_addr_send() to not actually send anything. */ -int osmo_gsup_addr_send(struct osmo_gsup_server *gs, - const uint8_t *addr, size_t addrlen, - struct msgb *msg) -{ - LOGP(DMAIN, LOGL_DEBUG, "%s\n", msgb_hexdump(msg)); - msgb_free(msg); - return 0; -} - -int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi, - struct hlr_subscriber *subscr) -{ - return 0; -} - -/* Verify that the internally allocated msgb is large enough */ -void test_gsup_tx_insert_subscr_data() -{ - struct lu_operation luop = { - .state = LU_S_LU_RECEIVED, - .subscr = { - .imsi = "123456789012345", - .msisdn = "987654321098765", - .nam_cs = true, - .nam_ps = true, - }, - .is_ps = true, - }; - - lu_op_tx_insert_subscr_data(&luop); -} - -const struct log_info_cat default_categories[] = { - [DMAIN] = { - .name = "DMAIN", - .description = "Main Program", - .enabled = 1, .loglevel = LOGL_DEBUG, - }, -}; - -static struct log_info info = { - .cat = default_categories, - .num_cat = ARRAY_SIZE(default_categories), -}; - -int main(int argc, char **argv) -{ - void *ctx = talloc_named_const(NULL, 0, "gsup_test"); - osmo_init_logging2(ctx, &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); - - test_gsup_tx_insert_subscr_data(); - - printf("Done.\n"); - return EXIT_SUCCESS; -} diff --git a/tests/gsup/gsup_test.err b/tests/gsup/gsup_test.err deleted file mode 100644 index 0aeae30..0000000 --- a/tests/gsup/gsup_test.err +++ /dev/null @@ -1,2 +0,0 @@ -DMAIN 10 01 08 21 43 65 87 09 21 43 f5 08 09 08 89 67 45 23 01 89 67 f5 05 07 10 01 01 12 02 01 2a 28 01 01 -DMAIN LU OP state change: LU RECEIVED -> ISD SENT diff --git a/tests/gsup/gsup_test.ok b/tests/gsup/gsup_test.ok deleted file mode 100644 index 619c561..0000000 --- a/tests/gsup/gsup_test.ok +++ /dev/null @@ -1 +0,0 @@ -Done. diff --git a/tests/testsuite.at b/tests/testsuite.at index bd758c9..58c197d 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -15,13 +15,6 @@ AT_CHECK([$abs_top_builddir/tests/auc/auc_ts_55_205_test_sets], [], [expout], [experr]) AT_CLEANUP -AT_SETUP([gsup]) -AT_KEYWORDS([gsup]) -cat $abs_srcdir/gsup/gsup_test.ok > expout -cat $abs_srcdir/gsup/gsup_test.err > experr -AT_CHECK([$abs_top_builddir/tests/gsup/gsup_test], [], [expout], [experr]) -AT_CLEANUP - AT_SETUP([gsup_server]) AT_KEYWORDS([gsup_server]) cat $abs_srcdir/gsup_server/gsup_server_test.ok > expout -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I42e1c72bf4cce8034f968cd4392773bf2b643c1b Gerrit-Change-Number: 16199 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 14:06:00 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 14:06:00 +0000 Subject: Change in osmo-hlr[master]: test_nodes.vty: tweak: add some '?' checks In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16200 ) Change subject: test_nodes.vty: tweak: add some '?' checks ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I92a4245cae806270b00330403cc114017ab7af53 Gerrit-Change-Number: 16200 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 14:06:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 14:06:04 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 14:06:04 +0000 Subject: Change in osmo-hlr[master]: test_nodes.vty: tweak: add some '?' checks In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16200 ) Change subject: test_nodes.vty: tweak: add some '?' checks ...................................................................... test_nodes.vty: tweak: add some '?' checks I added these "by accident" when implementing D-GSM related VTY tests, now submitting them separately. Change-Id: I92a4245cae806270b00330403cc114017ab7af53 --- M tests/test_nodes.vty 1 file changed, 48 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index 2be9617..a752c93 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -1,3 +1,15 @@ +OsmoHLR> ? + show Show running system information + list Print command list + exit Exit current mode and down to previous mode + help Description of the interactive help system + enable Turn on privileged mode command + terminal Set terminal line parameters + who Display who is on vty + logging Configure logging + no Negate a command or set its defaults + logp Print a message on all log outputs; useful for placing markers in test logs + subscriber Subscriber management commands OsmoHLR> list show version show online-help @@ -25,6 +37,21 @@ show subscriber (imsi|msisdn|id|imei) IDENT OsmoHLR> enable +OsmoHLR# ? + help Description of the interactive help system + list Print command list + write Write running configuration to memory, network, or terminal + show Show running system information + exit Exit current mode and down to previous mode + disable Turn off privileged mode command + configure Configuration from vty interface + copy Copy configuration + terminal Set terminal line parameters + who Display who is on vty + logging Configure logging + no Negate a command or set its defaults + logp Print a message on all log outputs; useful for placing markers in test logs + subscriber Subscriber management commands OsmoHLR# list help ... @@ -45,6 +72,15 @@ ... OsmoHLR# configure terminal +OsmoHLR(config)# ? +... + banner Set banner string + service Set up miscellaneous service + line Configure a terminal line + ctrl Configure the Control Interface + log Configure logging sub-system + stats Configure stats sub-system + hlr Configure the HLR OsmoHLR(config)# list help ... @@ -54,6 +90,14 @@ hlr OsmoHLR(config)# hlr +OsmoHLR(config-hlr)# ? +... + euse Configure a particular External USSD Entity + no Negate a command or set its defaults + ussd USSD Configuration + ncss-guard-timeout Set guard timer for NCSS (call independent SS) session activity + store-imei Save the IMEI in the database when receiving Check IMEI requests. Note that an MSC does not necessarily send Check IMEI requests (for OsmoMSC, you may want to set 'check-imei-rqd 1'). + subscriber-create-on-demand Make a new record when a subscriber is first seen. OsmoHLR(config-hlr)# list help ... @@ -75,11 +119,11 @@ no subscriber-create-on-demand OsmoHLR(config-hlr)# gsup -OsmoHLR(config-hlr-gsup)# list - help +OsmoHLR(config-hlr-gsup)# ? ... - exit - end + bind Listen/Bind related socket option +OsmoHLR(config-hlr-gsup)# list +... bind ip A.B.C.D OsmoHLR(config-hlr-gsup)# exit -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I92a4245cae806270b00330403cc114017ab7af53 Gerrit-Change-Number: 16200 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 14:14:10 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 14:14:10 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: cast ptrdiff value to fix printf format References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16215 ) Change subject: scheduler_trx.c: cast ptrdiff value to fix printf format ...................................................................... scheduler_trx.c: cast ptrdiff value to fix printf format On an ARM toolchain: scheduler_trx.c:294:3: warning: format '%ld' expects argument of type 'long int', but argument 10 has type 'int' Let's cast it to long int to make sure correct size is applied in all platforms. Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/15/16215/1 diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index b54c35b..dea3345 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -292,7 +292,7 @@ /* check validity of message */ if (rc < 0) { LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "Prim invalid length, please FIX! " - "(len=%ld)\n", msg->tail - msg->l2h); + "(len=%ld)\n", (long)msg->tail - msg->l2h); /* free message */ msgb_free(msg); goto no_msg; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 Gerrit-Change-Number: 16215 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 14:20:41 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 14:20:41 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: cast ptrdiff value to fix printf format In-Reply-To: References: Message-ID: pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-bts/+/16215 ) Change subject: scheduler_trx.c: cast ptrdiff value to fix printf format ...................................................................... scheduler_trx.c: cast ptrdiff value to fix printf format On an ARM toolchain: scheduler_trx.c:294:3: warning: format '%ld' expects argument of type 'long int', but argument 10 has type 'int' Let's cast it to long int to make sure correct size is applied in all platforms. Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/15/16215/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 Gerrit-Change-Number: 16215 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 14:52:00 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 14:52:00 +0000 Subject: Change in osmo-hlr[master]: [do not merge] build with V=1 References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16216 ) Change subject: [do not merge] build with V=1 ...................................................................... [do not merge] build with V=1 Can't reproduce this jenkins error locally, let's see what V=1 gives. Change-Id: Ia278c8639ff85d219240554dac84c510be568b77 --- M contrib/jenkins.sh 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/16/16216/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5914182..ac27533 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -50,9 +50,9 @@ cd "$base" autoreconf --install --force ./configure --enable-sanitize --enable-external-tests --enable-werror $CONFIG -$MAKE $PARALLEL_MAKE -$MAKE check || cat-testlogs.sh -DISTCHECK_CONFIGURE_FLAGS="$CONFIG" $MAKE distcheck || cat-testlogs.sh +$MAKE $PARALLEL_MAKE V=1 +$MAKE check V=1 || cat-testlogs.sh +DISTCHECK_CONFIGURE_FLAGS="$CONFIG" $MAKE distcheck V=1 || cat-testlogs.sh if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then make -C "$base/doc/manuals" publish -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ia278c8639ff85d219240554dac84c510be568b77 Gerrit-Change-Number: 16216 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:05:44 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:05:44 +0000 Subject: Change in osmo-hlr[master]: [do not merge] build with V=1 In-Reply-To: References: Message-ID: osmith has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16216 ) Change subject: [do not merge] build with V=1 ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ia278c8639ff85d219240554dac84c510be568b77 Gerrit-Change-Number: 16216 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:30:09 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:30:09 +0000 Subject: Change in osmo-hlr[master]: add lu_fsm and osmo_gsup_req In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: add lu_fsm and osmo_gsup_req ...................................................................... Patch Set 5: This depends on: https://gerrit.osmocom.org/c/libosmocore/+/16189 (I'll update the commit msg) -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 25 Nov 2019 15:30:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:30:46 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:30:46 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#6) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... add libosmo-mslookup and mDNS implementation Create a library with generic functions for performing a distributed subscriber lookup, which allow querying IPs and ports of services by MSISDN/IMSI. The first implementation uses multicast DNS packets. I decided to write custom DNS functions instead of using libc-ares (which we use in OsmoSGSN already), because it is only a DNS client implementation and we need both client and server. The DNS code is abstracted from the mslookup specific code, so the DNS part could in theory be replaced with a third party library in the future. We decided to place the mslookup library in the OsmoHLR source tree (instead of libosmocore), because the way we have implemented the D-GSM network, OsmoHLR will be the only user of the library for now. In the future, OsmoMSC may need it, but it depends on OsmoHLR already. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A include/osmocom/mslookup/mslookup_client_mdns.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_msg.h A src/mslookup/mdns_record.c A src/mslookup/mdns_record.h A src/mslookup/mdns_rfc.c A src/mslookup/mdns_rfc.h A src/mslookup/mdns_sock.c A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c A src/mslookup/mslookup_client_mdns.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 39 files changed, 4,380 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:30:46 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:30:46 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#6) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16203 ) Change subject: add osmo-mslookup-client program ...................................................................... add osmo-mslookup-client program Standalone program using libosmo-mslookup for manual testing, and for integration with all other components of the network that need to do mslookups to resolve SIP/SMPP servers etc. Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 --- M configure.ac M contrib/Makefile.am A contrib/dgsm/Makefile.am A contrib/dgsm/osmo-mslookup-pipe.py A contrib/dgsm/osmo-mslookup-socket.py M src/mslookup/Makefile.am A src/mslookup/osmo-mslookup-client.c 7 files changed, 938 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/03/16203/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:30:46 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:30:46 +0000 Subject: Change in osmo-hlr[master]: add lu_fsm and osmo_gsup_req In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#6) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: add lu_fsm and osmo_gsup_req ...................................................................... add lu_fsm and osmo_gsup_req These are seemingly orthogonal changes in one patch, because they are in fact sufficiently intertwined that we are not willing to spend the time to separate them. They are also refactoring changes, unlikely to make sense on their own. ** lu_fsm: Attempting to make luop.c keep state about incoming GSUP requests made me find shortcomings in several places: - since it predates osmo_fsm, it is a state machine that does not strictly enforce the order of state transitions or the right sequence of incoming events. - several places OSMO_ASSERT() on data received from the network. - modifies the subscriber state before a LU is accepted. - dead code about canceling a subscriber in a previous VLR. That would be a good thing to actually do, which should also be trivial now that we record vlr_name and sgsn_name, but I decided to remove the dead code for now. To both step up the LU game *and* make it easier for me to integrate osmo_gsup_req handling, I decided to create a lu_fsm, drawing from my, by now, ample experience of writing osmo_fsms. ** osmo_gsup_req: Prepare for D-GSM, where osmo-hlr will do proxy routing for remote HLRs / communicate with remote MSCs via a proxy: a) It is important that a response that osmo-hlr generates and that is sent back to a requesting MSC contains all IEs that are needed to route it back to the requester. Particularly source_name must become destination_name in the response to be able to even reach the requesting MSC. Other fields are also necessary to match, which were so far taken care of in individual numerous code paths. b) For some operations, the response to a GSUP request is generated asynchronously (like Update Location Request -> Response, or taking the response from an EUSE, or the upcoming proxying to a remote HLR). To be able to feed a request message's information back into the response, we must thus keep the request data around. Since struct osmo_gsup_message references a lot of external data, usually with pointers directly into the received msgb, it is not so trivial to pass GSUP message data around asynchronously, on its own. osmo_gsup_req is the combined solution for both a and b: it keeps all data for a GSUP message by taking ownership of the incoming msgb, and it provides an explicit API "forcing" callers to respond with osmo_gsup_req_respond(), so that all code paths trivially are definitely responding with the correct IEs set to match the request's routing (by using osmo_gsup_make_response() recently added to libosmocore). Adjust all osmo-hlr code paths to use *only* osmo_gsup_req to respond to incoming requests received on the GSUP server (above LU code being one of them). In fact, the same should be done on the client side. Hence osmo_gsup_req is implemented in a server/client agnostic way, and is placed in libosmo-gsupclient. As soon as we see routing errors in complex GSUP setups, using osmo_gsup_req in the related GSUP client is likely to resolve those problems without much thinking required beyond making all code paths use it. libosmo-gsupclient is hence added to osmo-hlr binary's own library dependencies. It would have been added by the D-GSM proxy routing anyway, we are just doing it a little sooner. ** global_title.c / osmo_gt: We so far handle a Global Title a.k.a. an IPA unit name as pointer + size, or as just pointer with implicit talloc size. To ease working with GSUP peer identification data, I require: - a non-allocated storage of a Global Title. It brings the drawback of being size limited, but our current implementation is anyway only able to handle MSC and SGSN names of 31 characters (see struct hlr_subscriber). - a single-argument handle for Global Title, - easy to use utility functions like osmo_gt_name(), osmo_gt_cmp(), and copying by simple assignment, a = b. Hence this patch adds a osmo_gt in global_title.h and global_title.c. Heavily used in LU and osmo_gsup_req. Depends: libosmocore Id9692880079ea0f219f52d81b1923a76fc640566 Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 --- M include/Makefile.am A include/osmocom/gsupclient/global_title.h A include/osmocom/gsupclient/gsup_req.h M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/db.h M include/osmocom/hlr/gsup_router.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/lu_fsm.h D include/osmocom/hlr/luop.h M src/Makefile.am M src/db.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/gsupclient/Makefile.am A src/gsupclient/global_title.c M src/gsupclient/gsup_client.c A src/gsupclient/gsup_req.c M src/hlr.c M src/hlr_ussd.c M src/logging.c A src/lu_fsm.c D src/luop.c M tests/db/Makefile.am M tests/db/db_test.c M tests/db/db_test.err M tests/gsup_server/Makefile.am M tests/test_nodes.vty 32 files changed, 1,225 insertions(+), 904 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/16205/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:03 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:03 +0000 Subject: Change in osmo-hlr[master]: add lu_fsm and osmo_gsup_req In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: add lu_fsm and osmo_gsup_req ...................................................................... Patch Set 6: > Patch Set 5: > > This depends on: https://gerrit.osmocom.org/c/libosmocore/+/16189 (I'll update the commit msg) actually, a much earlier patch in this series already depends on above patch: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 25 Nov 2019 15:37:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... add libosmo-mslookup and mDNS implementation Create a library with generic functions for performing a distributed subscriber lookup, which allow querying IPs and ports of services by MSISDN/IMSI. The first implementation uses multicast DNS packets. I decided to write custom DNS functions instead of using libc-ares (which we use in OsmoSGSN already), because it is only a DNS client implementation and we need both client and server. The DNS code is abstracted from the mslookup specific code, so the DNS part could in theory be replaced with a third party library in the future. We decided to place the mslookup library in the OsmoHLR source tree (instead of libosmocore), because the way we have implemented the D-GSM network, OsmoHLR will be the only user of the library for now. In the future, OsmoMSC may need it, but it depends on OsmoHLR already. Depends: libosmocore Id9692880079ea0f219f52d81b1923a76fc640566 Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A include/osmocom/mslookup/mslookup_client_mdns.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_msg.h A src/mslookup/mdns_record.c A src/mslookup/mdns_record.h A src/mslookup/mdns_rfc.c A src/mslookup/mdns_rfc.h A src/mslookup/mdns_sock.c A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c A src/mslookup/mslookup_client_mdns.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 39 files changed, 4,380 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16203 ) Change subject: add osmo-mslookup-client program ...................................................................... add osmo-mslookup-client program Standalone program using libosmo-mslookup for manual testing, and for integration with all other components of the network that need to do mslookups to resolve SIP/SMPP servers etc. Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 --- M configure.ac M contrib/Makefile.am A contrib/dgsm/Makefile.am A contrib/dgsm/osmo-mslookup-pipe.py A contrib/dgsm/osmo-mslookup-socket.py M src/mslookup/Makefile.am A src/mslookup/osmo-mslookup-client.c 7 files changed, 938 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/03/16203/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: contrib/dgsm/ add example esme and dialplan In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16204 ) Change subject: contrib/dgsm/ add example esme and dialplan ...................................................................... contrib/dgsm/ add example esme and dialplan Add example scripts for the distributed GSM network: esme_dgsm.py: connect to the SMPP port of OsmoMSC A and forward SMS to the SMPP port of OsmoMSC B. The IP and port of OsmoMSC B is retrieved by the receiver's MSISDN using osmo-mslookup-client. contrib/dgsm/freeswitch_dialplan_dgsm.py: resolve the destination SIP servers of calls with osmo-mslookup-client and bridge the calls accordingly. Related: OS#4254 Related: OS#4255 Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 --- M contrib/dgsm/Makefile.am A contrib/dgsm/esme_dgsm.py A contrib/dgsm/freeswitch_dialplan_dgsm.py 3 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/04/16204/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 Gerrit-Change-Number: 16204 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: add lu_fsm and osmo_gsup_req In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: add lu_fsm and osmo_gsup_req ...................................................................... add lu_fsm and osmo_gsup_req These are seemingly orthogonal changes in one patch, because they are in fact sufficiently intertwined that we are not willing to spend the time to separate them. They are also refactoring changes, unlikely to make sense on their own. ** lu_fsm: Attempting to make luop.c keep state about incoming GSUP requests made me find shortcomings in several places: - since it predates osmo_fsm, it is a state machine that does not strictly enforce the order of state transitions or the right sequence of incoming events. - several places OSMO_ASSERT() on data received from the network. - modifies the subscriber state before a LU is accepted. - dead code about canceling a subscriber in a previous VLR. That would be a good thing to actually do, which should also be trivial now that we record vlr_name and sgsn_name, but I decided to remove the dead code for now. To both step up the LU game *and* make it easier for me to integrate osmo_gsup_req handling, I decided to create a lu_fsm, drawing from my, by now, ample experience of writing osmo_fsms. ** osmo_gsup_req: Prepare for D-GSM, where osmo-hlr will do proxy routing for remote HLRs / communicate with remote MSCs via a proxy: a) It is important that a response that osmo-hlr generates and that is sent back to a requesting MSC contains all IEs that are needed to route it back to the requester. Particularly source_name must become destination_name in the response to be able to even reach the requesting MSC. Other fields are also necessary to match, which were so far taken care of in individual numerous code paths. b) For some operations, the response to a GSUP request is generated asynchronously (like Update Location Request -> Response, or taking the response from an EUSE, or the upcoming proxying to a remote HLR). To be able to feed a request message's information back into the response, we must thus keep the request data around. Since struct osmo_gsup_message references a lot of external data, usually with pointers directly into the received msgb, it is not so trivial to pass GSUP message data around asynchronously, on its own. osmo_gsup_req is the combined solution for both a and b: it keeps all data for a GSUP message by taking ownership of the incoming msgb, and it provides an explicit API "forcing" callers to respond with osmo_gsup_req_respond(), so that all code paths trivially are definitely responding with the correct IEs set to match the request's routing (by using osmo_gsup_make_response() recently added to libosmocore). Adjust all osmo-hlr code paths to use *only* osmo_gsup_req to respond to incoming requests received on the GSUP server (above LU code being one of them). In fact, the same should be done on the client side. Hence osmo_gsup_req is implemented in a server/client agnostic way, and is placed in libosmo-gsupclient. As soon as we see routing errors in complex GSUP setups, using osmo_gsup_req in the related GSUP client is likely to resolve those problems without much thinking required beyond making all code paths use it. libosmo-gsupclient is hence added to osmo-hlr binary's own library dependencies. It would have been added by the D-GSM proxy routing anyway, we are just doing it a little sooner. ** global_title.c / osmo_gt: We so far handle a Global Title a.k.a. an IPA unit name as pointer + size, or as just pointer with implicit talloc size. To ease working with GSUP peer identification data, I require: - a non-allocated storage of a Global Title. It brings the drawback of being size limited, but our current implementation is anyway only able to handle MSC and SGSN names of 31 characters (see struct hlr_subscriber). - a single-argument handle for Global Title, - easy to use utility functions like osmo_gt_name(), osmo_gt_cmp(), and copying by simple assignment, a = b. Hence this patch adds a osmo_gt in global_title.h and global_title.c. Heavily used in LU and osmo_gsup_req. Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 --- M include/Makefile.am A include/osmocom/gsupclient/global_title.h A include/osmocom/gsupclient/gsup_req.h M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/db.h M include/osmocom/hlr/gsup_router.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/lu_fsm.h D include/osmocom/hlr/luop.h M src/Makefile.am M src/db.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/gsupclient/Makefile.am A src/gsupclient/global_title.c M src/gsupclient/gsup_client.c A src/gsupclient/gsup_req.c M src/hlr.c M src/hlr_ussd.c M src/logging.c A src/lu_fsm.c D src/luop.c M tests/db/Makefile.am M tests/db/db_test.c M tests/db/db_test.err M tests/gsup_server/Makefile.am M tests/test_nodes.vty 32 files changed, 1,225 insertions(+), 904 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/16205/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: gsup client: add up_down_cb(), add osmo_gsup_client_create3() In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16206 ) Change subject: gsup client: add up_down_cb(), add osmo_gsup_client_create3() ...................................................................... gsup client: add up_down_cb(), add osmo_gsup_client_create3() For the GSUP clients in upcoming D-GSM enabled osmo-hlr, it will be necessary to trigger an event as soon as a GSUP client connection becomes ready for communication. Add the osmo_gsup_client->up_down_cb. Add osmo_gsup_client_create3() pass the up_down_cb in the arguments. Also add a cb data argument, and groupt the cb and data arguments after the oapc_config argument. (Usually, we have cb and data arguments last.) We need the callbacks and data pointer in the osmo_gsup_client_create() function right before startup, because this function immediately starts up the connection. Who knows whether callbacks might trigger right away. Change-Id: I6f181e42b678465bc9945f192559dc57d2083c6d --- M include/osmocom/gsupclient/gsup_client.h M src/gsupclient/gsup_client.c 2 files changed, 63 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/06/16206/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I6f181e42b678465bc9945f192559dc57d2083c6d Gerrit-Change-Number: 16206 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16207 ) Change subject: db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy ...................................................................... db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy D-GSM will store in the HLR DB whether a locally connected MSC has attached the subscriber (last_lu_seen[_ps]), or whether the attach happened via a GSUP proxy from a different site. Add columns for this separately in this patch. Change-Id: I98c7b3870559ede84adf56e4bf111f53c7487745 --- M include/osmocom/hlr/db.h M sql/hlr.sql M src/db.c M src/db_hlr.c M tests/db_upgrade/db_upgrade_test.ok 5 files changed, 75 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/07/16207/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I98c7b3870559ede84adf56e4bf111f53c7487745 Gerrit-Change-Number: 16207 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: enlarge the GSUP message headroom In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16208 ) Change subject: enlarge the GSUP message headroom ...................................................................... enlarge the GSUP message headroom Make room for (more) arbitrary IPA headers, like longer IPA names as configured by the user. Change-Id: I7d86f2dadcae29fe1550ea2c9773394ab31a837b --- M src/gsup_server.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/08/16208/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I7d86f2dadcae29fe1550ea2c9773394ab31a837b Gerrit-Change-Number: 16208 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: implement D-GSM in osmo-hlr In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16209 ) Change subject: implement D-GSM in osmo-hlr ...................................................................... implement D-GSM in osmo-hlr Implement the mslookup server to service remote mslookup requests: - VTY mslookup/server config with service names, - the mslookup_mdns_server listening for mslookup requests, - determine whether a subscriber is on a local MSC. Use the mslookup client to proxy GSUP to remote HLRs: - VTY mslookup/client config, - remote_hlr.c to connect GSUP clients to remote GSUP servers, - proxy.c as local GSUP proxy state, so far in-memory. This is kept an opaque API without a mutable struct, so that it can be easily moved to a persistent database implementation. dgsm.c orchestrates mslookup server, client, and MUXes GSUP messages to the right proxy peers. Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b --- M include/osmocom/hlr/Makefile.am A include/osmocom/hlr/dgsm.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_vty.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/mslookup_server_mdns.h A include/osmocom/hlr/proxy.h A include/osmocom/hlr/remote_hlr.h M src/Makefile.am A src/dgsm.c A src/dgsm_vty.c M src/gsup_server.c M src/hlr.c M src/hlr_vty.c M src/hlr_vty_subscr.c M src/logging.c A src/mslookup_server.c A src/mslookup_server_mdns.c A src/proxy.c A src/remote_hlr.c M tests/test_nodes.vty M tests/test_subscriber.vty 24 files changed, 2,701 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/09/16209/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b Gerrit-Change-Number: 16209 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: hlr_vty_subscr: prettier output for last LU seen In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 to look at the new patch set (#5). Change subject: hlr_vty_subscr: prettier output for last LU seen ...................................................................... hlr_vty_subscr: prettier output for last LU seen Extend the "last LU seen on ..." line with the amount of seconds that passed since now, or "(invalid timestamp)". Patch split from Id7fc50567211a0870ac0524f6dee94d4513781ba, because it depends on timestamp_age which was just added in Ife4a61d71926d08f310a1aeed9d9f1974f64178b. Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 --- M src/hlr_vty_subscr.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/14/16214/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 Gerrit-Change-Number: 16214 Gerrit-PatchSet: 5 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: add mslookup_manual_test In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16210 ) Change subject: add mslookup_manual_test ...................................................................... add mslookup_manual_test This can be used for manually testing proxy routing. It is not run as part of the testsuite. Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 --- M .gitignore M configure.ac M tests/Makefile.am A tests/mslookup_manual_test/Makefile.am A tests/mslookup_manual_test/fake_msc.c A tests/mslookup_manual_test/osmo-hlr-1.cfg A tests/mslookup_manual_test/osmo-hlr-2.cfg A tests/mslookup_manual_test/run.sh 8 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/10/16210/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 Gerrit-Change-Number: 16210 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: doc: add D-GSM documentation In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16211 ) Change subject: doc: add D-GSM documentation ...................................................................... doc: add D-GSM documentation Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 --- A doc/manuals/chapters/dgsm.adoc M doc/manuals/osmohlr-usermanual.adoc 2 files changed, 483 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/11/16211/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 Gerrit-Change-Number: 16211 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:37:50 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:37:50 +0000 Subject: Change in osmo-hlr[master]: drop error log for when a subscriber does not exist In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#7) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16212 ) Change subject: drop error log for when a subscriber does not exist ...................................................................... drop error log for when a subscriber does not exist Checking for existence of a subscriber and seeing that there is none is not inherently an error. However, osmo-hlr currently logs on all occasions: DAUC ERROR Cannot read subscriber from db: MSISDN='1001': No such subscriber This spams the ERROR log level. Particularly when a D-GSM setup does subscriber existence checks for every incoming mslookup request, that potentially creates constant ERROR logging. The "No such subscriber" part comes from db_sel(), which might also return an sqlite3_errmsg(). We still want those sqlite3_errmsg()es in the ERROR log. Hence print an ERROR log only if db_sel() returns an rc != -ENOENT. Change-Id: I5044e9b4519b948edc4e451cef0f7830d315619b --- M src/db_hlr.c M tests/db/db_test.err 2 files changed, 4 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/12/16212/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5044e9b4519b948edc4e451cef0f7830d315619b Gerrit-Change-Number: 16212 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... add libosmo-mslookup and mDNS implementation Create a library with generic functions for performing a distributed subscriber lookup, which allow querying IPs and ports of services by MSISDN/IMSI. The first implementation uses multicast DNS packets. I decided to write custom DNS functions instead of using libc-ares (which we use in OsmoSGSN already), because it is only a DNS client implementation and we need both client and server. The DNS code is abstracted from the mslookup specific code, so the DNS part could in theory be replaced with a third party library in the future. We decided to place the mslookup library in the OsmoHLR source tree (instead of libosmocore), because the way we have implemented the D-GSM network, OsmoHLR will be the only user of the library for now. In the future, OsmoMSC may need it, but it depends on OsmoHLR already. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A include/osmocom/mslookup/mslookup_client_mdns.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_msg.h A src/mslookup/mdns_record.c A src/mslookup/mdns_record.h A src/mslookup/mdns_rfc.c A src/mslookup/mdns_rfc.h A src/mslookup/mdns_sock.c A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c A src/mslookup/mslookup_client_mdns.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 39 files changed, 4,380 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16203 ) Change subject: add osmo-mslookup-client program ...................................................................... add osmo-mslookup-client program Standalone program using libosmo-mslookup for manual testing, and for integration with all other components of the network that need to do mslookups to resolve SIP/SMPP servers etc. Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 --- M configure.ac M contrib/Makefile.am A contrib/dgsm/Makefile.am A contrib/dgsm/osmo-mslookup-pipe.py A contrib/dgsm/osmo-mslookup-socket.py M src/mslookup/Makefile.am A src/mslookup/osmo-mslookup-client.c 7 files changed, 938 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/03/16203/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: contrib/dgsm/ add example esme and dialplan In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16204 ) Change subject: contrib/dgsm/ add example esme and dialplan ...................................................................... contrib/dgsm/ add example esme and dialplan Add example scripts for the distributed GSM network: esme_dgsm.py: connect to the SMPP port of OsmoMSC A and forward SMS to the SMPP port of OsmoMSC B. The IP and port of OsmoMSC B is retrieved by the receiver's MSISDN using osmo-mslookup-client. contrib/dgsm/freeswitch_dialplan_dgsm.py: resolve the destination SIP servers of calls with osmo-mslookup-client and bridge the calls accordingly. Related: OS#4254 Related: OS#4255 Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 --- M contrib/dgsm/Makefile.am A contrib/dgsm/esme_dgsm.py A contrib/dgsm/freeswitch_dialplan_dgsm.py 3 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/04/16204/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 Gerrit-Change-Number: 16204 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: add lu_fsm and osmo_gsup_req In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: add lu_fsm and osmo_gsup_req ...................................................................... add lu_fsm and osmo_gsup_req These are seemingly orthogonal changes in one patch, because they are in fact sufficiently intertwined that we are not willing to spend the time to separate them. They are also refactoring changes, unlikely to make sense on their own. ** lu_fsm: Attempting to make luop.c keep state about incoming GSUP requests made me find shortcomings in several places: - since it predates osmo_fsm, it is a state machine that does not strictly enforce the order of state transitions or the right sequence of incoming events. - several places OSMO_ASSERT() on data received from the network. - modifies the subscriber state before a LU is accepted. - dead code about canceling a subscriber in a previous VLR. That would be a good thing to actually do, which should also be trivial now that we record vlr_name and sgsn_name, but I decided to remove the dead code for now. To both step up the LU game *and* make it easier for me to integrate osmo_gsup_req handling, I decided to create a lu_fsm, drawing from my, by now, ample experience of writing osmo_fsms. ** osmo_gsup_req: Prepare for D-GSM, where osmo-hlr will do proxy routing for remote HLRs / communicate with remote MSCs via a proxy: a) It is important that a response that osmo-hlr generates and that is sent back to a requesting MSC contains all IEs that are needed to route it back to the requester. Particularly source_name must become destination_name in the response to be able to even reach the requesting MSC. Other fields are also necessary to match, which were so far taken care of in individual numerous code paths. b) For some operations, the response to a GSUP request is generated asynchronously (like Update Location Request -> Response, or taking the response from an EUSE, or the upcoming proxying to a remote HLR). To be able to feed a request message's information back into the response, we must thus keep the request data around. Since struct osmo_gsup_message references a lot of external data, usually with pointers directly into the received msgb, it is not so trivial to pass GSUP message data around asynchronously, on its own. osmo_gsup_req is the combined solution for both a and b: it keeps all data for a GSUP message by taking ownership of the incoming msgb, and it provides an explicit API "forcing" callers to respond with osmo_gsup_req_respond(), so that all code paths trivially are definitely responding with the correct IEs set to match the request's routing (by using osmo_gsup_make_response() recently added to libosmocore). Adjust all osmo-hlr code paths to use *only* osmo_gsup_req to respond to incoming requests received on the GSUP server (above LU code being one of them). In fact, the same should be done on the client side. Hence osmo_gsup_req is implemented in a server/client agnostic way, and is placed in libosmo-gsupclient. As soon as we see routing errors in complex GSUP setups, using osmo_gsup_req in the related GSUP client is likely to resolve those problems without much thinking required beyond making all code paths use it. libosmo-gsupclient is hence added to osmo-hlr binary's own library dependencies. It would have been added by the D-GSM proxy routing anyway, we are just doing it a little sooner. ** global_title.c / osmo_gt: We so far handle a Global Title a.k.a. an IPA unit name as pointer + size, or as just pointer with implicit talloc size. To ease working with GSUP peer identification data, I require: - a non-allocated storage of a Global Title. It brings the drawback of being size limited, but our current implementation is anyway only able to handle MSC and SGSN names of 31 characters (see struct hlr_subscriber). - a single-argument handle for Global Title, - easy to use utility functions like osmo_gt_name(), osmo_gt_cmp(), and copying by simple assignment, a = b. Hence this patch adds a osmo_gt in global_title.h and global_title.c. Heavily used in LU and osmo_gsup_req. Depends: libosmocore Id9692880079ea0f219f52d81b1923a76fc640566 Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 --- M include/Makefile.am A include/osmocom/gsupclient/global_title.h A include/osmocom/gsupclient/gsup_req.h M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/db.h M include/osmocom/hlr/gsup_router.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/lu_fsm.h D include/osmocom/hlr/luop.h M src/Makefile.am M src/db.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/gsupclient/Makefile.am A src/gsupclient/global_title.c M src/gsupclient/gsup_client.c A src/gsupclient/gsup_req.c M src/hlr.c M src/hlr_ussd.c M src/logging.c A src/lu_fsm.c D src/luop.c M tests/db/Makefile.am M tests/db/db_test.c M tests/db/db_test.err M tests/gsup_server/Makefile.am M tests/test_nodes.vty 32 files changed, 1,225 insertions(+), 904 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/16205/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: gsup client: add up_down_cb(), add osmo_gsup_client_create3() In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16206 ) Change subject: gsup client: add up_down_cb(), add osmo_gsup_client_create3() ...................................................................... gsup client: add up_down_cb(), add osmo_gsup_client_create3() For the GSUP clients in upcoming D-GSM enabled osmo-hlr, it will be necessary to trigger an event as soon as a GSUP client connection becomes ready for communication. Add the osmo_gsup_client->up_down_cb. Add osmo_gsup_client_create3() pass the up_down_cb in the arguments. Also add a cb data argument, and groupt the cb and data arguments after the oapc_config argument. (Usually, we have cb and data arguments last.) We need the callbacks and data pointer in the osmo_gsup_client_create() function right before startup, because this function immediately starts up the connection. Who knows whether callbacks might trigger right away. Change-Id: I6f181e42b678465bc9945f192559dc57d2083c6d --- M include/osmocom/gsupclient/gsup_client.h M src/gsupclient/gsup_client.c 2 files changed, 63 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/06/16206/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I6f181e42b678465bc9945f192559dc57d2083c6d Gerrit-Change-Number: 16206 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16207 ) Change subject: db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy ...................................................................... db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy D-GSM will store in the HLR DB whether a locally connected MSC has attached the subscriber (last_lu_seen[_ps]), or whether the attach happened via a GSUP proxy from a different site. Add columns for this separately in this patch. Change-Id: I98c7b3870559ede84adf56e4bf111f53c7487745 --- M include/osmocom/hlr/db.h M sql/hlr.sql M src/db.c M src/db_hlr.c M tests/db_upgrade/db_upgrade_test.ok 5 files changed, 75 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/07/16207/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I98c7b3870559ede84adf56e4bf111f53c7487745 Gerrit-Change-Number: 16207 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: enlarge the GSUP message headroom In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16208 ) Change subject: enlarge the GSUP message headroom ...................................................................... enlarge the GSUP message headroom Make room for (more) arbitrary IPA headers, like longer IPA names as configured by the user. Change-Id: I7d86f2dadcae29fe1550ea2c9773394ab31a837b --- M src/gsup_server.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/08/16208/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I7d86f2dadcae29fe1550ea2c9773394ab31a837b Gerrit-Change-Number: 16208 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: implement D-GSM in osmo-hlr In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16209 ) Change subject: implement D-GSM in osmo-hlr ...................................................................... implement D-GSM in osmo-hlr Implement the mslookup server to service remote mslookup requests: - VTY mslookup/server config with service names, - the mslookup_mdns_server listening for mslookup requests, - determine whether a subscriber is on a local MSC. Use the mslookup client to proxy GSUP to remote HLRs: - VTY mslookup/client config, - remote_hlr.c to connect GSUP clients to remote GSUP servers, - proxy.c as local GSUP proxy state, so far in-memory. This is kept an opaque API without a mutable struct, so that it can be easily moved to a persistent database implementation. dgsm.c orchestrates mslookup server, client, and MUXes GSUP messages to the right proxy peers. Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b --- M include/osmocom/hlr/Makefile.am A include/osmocom/hlr/dgsm.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_vty.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/mslookup_server_mdns.h A include/osmocom/hlr/proxy.h A include/osmocom/hlr/remote_hlr.h M src/Makefile.am A src/dgsm.c A src/dgsm_vty.c M src/gsup_server.c M src/hlr.c M src/hlr_vty.c M src/hlr_vty_subscr.c M src/logging.c A src/mslookup_server.c A src/mslookup_server_mdns.c A src/proxy.c A src/remote_hlr.c M tests/test_nodes.vty M tests/test_subscriber.vty 24 files changed, 2,701 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/09/16209/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b Gerrit-Change-Number: 16209 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: hlr_vty_subscr: prettier output for last LU seen In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 to look at the new patch set (#6). Change subject: hlr_vty_subscr: prettier output for last LU seen ...................................................................... hlr_vty_subscr: prettier output for last LU seen Extend the "last LU seen on ..." line with the amount of seconds that passed since now, or "(invalid timestamp)". Patch split from Id7fc50567211a0870ac0524f6dee94d4513781ba, because it depends on timestamp_age which was just added in Ife4a61d71926d08f310a1aeed9d9f1974f64178b. Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 --- M src/hlr_vty_subscr.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/14/16214/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 Gerrit-Change-Number: 16214 Gerrit-PatchSet: 6 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: add mslookup_manual_test In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16210 ) Change subject: add mslookup_manual_test ...................................................................... add mslookup_manual_test This can be used for manually testing proxy routing. It is not run as part of the testsuite. Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 --- M .gitignore M configure.ac M tests/Makefile.am A tests/mslookup_manual_test/Makefile.am A tests/mslookup_manual_test/fake_msc.c A tests/mslookup_manual_test/osmo-hlr-1.cfg A tests/mslookup_manual_test/osmo-hlr-2.cfg A tests/mslookup_manual_test/run.sh 8 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/10/16210/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 Gerrit-Change-Number: 16210 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: doc: add D-GSM documentation In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16211 ) Change subject: doc: add D-GSM documentation ...................................................................... doc: add D-GSM documentation Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 --- A doc/manuals/chapters/dgsm.adoc M doc/manuals/osmohlr-usermanual.adoc 2 files changed, 483 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/11/16211/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 Gerrit-Change-Number: 16211 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 15:40:40 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 15:40:40 +0000 Subject: Change in osmo-hlr[master]: drop error log for when a subscriber does not exist In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#8) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16212 ) Change subject: drop error log for when a subscriber does not exist ...................................................................... drop error log for when a subscriber does not exist Checking for existence of a subscriber and seeing that there is none is not inherently an error. However, osmo-hlr currently logs on all occasions: DAUC ERROR Cannot read subscriber from db: MSISDN='1001': No such subscriber This spams the ERROR log level. Particularly when a D-GSM setup does subscriber existence checks for every incoming mslookup request, that potentially creates constant ERROR logging. The "No such subscriber" part comes from db_sel(), which might also return an sqlite3_errmsg(). We still want those sqlite3_errmsg()es in the ERROR log. Hence print an ERROR log only if db_sel() returns an rc != -ENOENT. Change-Id: I5044e9b4519b948edc4e451cef0f7830d315619b --- M src/db_hlr.c M tests/db/db_test.err 2 files changed, 4 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/12/16212/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5044e9b4519b948edc4e451cef0f7830d315619b Gerrit-Change-Number: 16212 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 16:00:10 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 25 Nov 2019 16:00:10 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#9) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... add libosmo-mslookup and mDNS implementation Create a library with generic functions for performing a distributed subscriber lookup, which allow querying IPs and ports of services by MSISDN/IMSI. The first implementation uses multicast DNS packets. I decided to write custom DNS functions instead of using libc-ares (which we use in OsmoSGSN already), because it is only a DNS client implementation and we need both client and server. The DNS code is abstracted from the mslookup specific code, so the DNS part could in theory be replaced with a third party library in the future. We decided to place the mslookup library in the OsmoHLR source tree (instead of libosmocore), because the way we have implemented the D-GSM network, OsmoHLR will be the only user of the library for now. In the future, OsmoMSC may need it, but it depends on OsmoHLR already. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A include/osmocom/mslookup/mslookup_client_mdns.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_msg.h A src/mslookup/mdns_record.c A src/mslookup/mdns_record.h A src/mslookup/mdns_rfc.c A src/mslookup/mdns_rfc.h A src/mslookup/mdns_sock.c A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c A src/mslookup/mslookup_client_mdns.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 39 files changed, 4,380 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/9 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 16:07:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 16:07:19 +0000 Subject: Change in libosmocore[master]: vty: track parent nodes also for telnet sessions In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16162 ) Change subject: vty: track parent nodes also for telnet sessions ...................................................................... vty: track parent nodes also for telnet sessions Keep track of parent nodes and go back hierarchically, not only for .cfg file reading, but also for telnet VTY sessions. A long time ago cfg file parsing was made strictly hierarchical: node exits go back to parent nodes exactly as they were entered. However, live telnet VTY sessions still lacked this and depended on the go_parent_cb(). >From this commit on, implementing a go_parent_cb() is completely optional. The go_parent_cb() no longer has the task to determine the correct parent node, neither for cfg files (as already the case before this patch) nor for telnet VTY sessions (added by this patch). Instead, a go_parent_cb() implementation can merely take actions it requires on node exits, for example applying some config when leaving a specific node. The node value that is returned by the go_parent_cb() and the vty->node and vty->index values that might be set are completely ignored; instead the implicit parent node tracking determines the parent and node object. As a side effect, the is_config_node() callback is no longer needed, since the VTY now always implicitly knows when to exit back to the CONFIG_NODE. For example, osmo_ss7_is_config_node() could now be dropped, and the osmo_ss7_vty_go_parent() could be shortened by five switch cases, does no longer need to set vty->node nor vty->index and could thus be shortened to: int osmo_ss7_vty_go_parent(struct vty *vty) { struct osmo_ss7_asp *asp; struct osmo_xua_server *oxs; switch (vty->node) { case L_CS7_ASP_NODE: asp = vty->index; /* If no local addr was set */ if (!asp->cfg.local.host_cnt) { asp->cfg.local.host[0] = NULL; asp->cfg.local.host_cnt = 1; } osmo_ss7_asp_restart(asp); break; case L_CS7_XUA_NODE: oxs = vty->index; /* If no local addr was set, or erased after _create(): */ if (!oxs->cfg.local.host_cnt) osmo_ss7_xua_server_set_local_host(oxs, NULL); if (osmo_ss7_xua_server_bind(oxs) < 0) vty_out(vty, "%% Unable to bind xUA server to IP(s)%s", VTY_NEWLINE); break; } return 0; } Before parent tracking, every program was required to write a go_parent_cb() which has to return every node's parent node, basically a switch() statement that manually traces the way back out of child nodes. If the go_parent_cb() has errors, we may wildly jump around the node tree: a common error is to jump right out to the top config node with one exit, even though we were N levels deep. This kind of error has been eliminated for cfg files long ago, but still exists for telnet VTY sessions, which this patch fixes. This came up when I was adding multi-level config nodes to osmo-hlr to support Distributed GSM / remote MS lookup: the config file worked fine, while vty node tests failed to exit to the correct nodes. Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 --- M include/osmocom/vty/vty.h M src/vty/command.c M tests/vty/vty_test.c 3 files changed, 31 insertions(+), 48 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index 03a2924..9acaa7d 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -178,9 +178,14 @@ const char *copyright; /*! \ref talloc context */ void *tall_ctx; - /*! call-back for returning to parent n ode */ + /*! Call-back for taking actions upon exiting a node. + * The return value is ignored, and changes to vty->node and vty->index made in this callback are ignored. + * Implicit parent node tracking always sets the correct parent node and vty->index after this callback exits, + * so this callback can handle only those nodes that should take specific actions upon node exit, or can be left + * NULL entirely. */ int (*go_parent_cb)(struct vty *vty); - /*! call-back to determine if node is config node */ + /*! OBSOLETED: Implicit parent node tracking has replaced the use of this callback. This callback is no longer + * called, ever, and can be left NULL. */ int (*is_config_node)(struct vty *vty, int node); /*! Check if the config is consistent before write */ int (*config_is_consistent)(struct vty *vty); diff --git a/src/vty/command.c b/src/vty/command.c index 6a9d18a..daee5c5 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -200,18 +200,6 @@ return strcmp(a->cmd, b->cmd); } -static int is_config_child(struct vty *vty) -{ - if (vty->node <= CONFIG_NODE) - return 0; - else if (vty->node > CONFIG_NODE && vty->node < _LAST_OSMOVTY_NODE) - return 1; - else if (host.app_info->is_config_node) - return host.app_info->is_config_node(vty, vty->node); - else - return vty->node > CONFIG_NODE; -} - /*! Sort each node's command element according to command string. */ void sort_node(void) { @@ -2187,25 +2175,10 @@ vty_clear_parents(vty); break; - case CFG_LOG_NODE: - case VTY_NODE: - vty->node = CONFIG_NODE; - vty_clear_parents(vty); - break; - default: - if (host.app_info->go_parent_cb) { + if (host.app_info->go_parent_cb) host.app_info->go_parent_cb(vty); - vty_pop_parent(vty); - } - else if (is_config_child(vty)) { - vty->node = CONFIG_NODE; - vty_clear_parents(vty); - } - else { - vty->node = VIEW_NODE; - vty_clear_parents(vty); - } + vty_pop_parent(vty); break; } @@ -2365,9 +2338,30 @@ if (matched_element->daemon) rc = CMD_SUCCESS_DAEMON; - else /* Execute matched command. */ + else { + /* Execute matched command. */ + struct vty_parent_node this_node = { + .node = vty->node, + .priv = vty->priv, + .indent = vty->indent, + }; + struct vty_parent_node *parent = vty_parent(vty); rc = (*matched_element->func) (matched_element, vty, argc, argv); + /* If we have stepped down into a child node, push a parent frame. + * The causality is such: we don't expect every single node entry implementation to push + * a parent node entry onto vty->parent_nodes. Instead we expect vty_go_parent() to *pop* + * a parent node. Hence if the node changed without the parent node changing, we must + * have stepped into a child node. */ + if (vty->node != this_node.node && parent == vty_parent(vty) + && vty->node > CONFIG_NODE) { + /* Push the parent node. */ + parent = talloc_zero(vty, struct vty_parent_node); + *parent = this_node; + llist_add(&parent->entry, &vty->parent_nodes); + } + } + rc_free_deopt_ctx: /* Now after we called the command func, we can free temporary strings */ talloc_free(cmd_deopt_ctx); diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c index 1139638..9627b6d 100644 --- a/tests/vty/vty_test.c +++ b/tests/vty/vty_test.c @@ -482,27 +482,11 @@ destroy_test_vty(&test, vty); } -static int go_parent_cb(struct vty *vty) -{ - /* - * - For the interactive VTY tests above, it is expected to bounce back to - * the CONFIG_NODE. Hence do so in go_parent_cb(). - * - In the config file parsing tests, setting vty->node in go_parent_cb() has no - * effect, because we will subsequently pop a parent node from the parent stack - * and override to go to the node that was recorded as the actual parent. - */ - vty->node = CONFIG_NODE; - vty->index = NULL; - return 0; -} - int main(int argc, char **argv) { struct vty_app_info vty_info = { .name = "VtyTest", .version = 0, - .go_parent_cb = go_parent_cb, - .is_config_node = NULL, }; const struct log_info_cat default_categories[] = {}; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16162 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 Gerrit-Change-Number: 16162 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 16:07:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 16:07:22 +0000 Subject: Change in libosmocore[master]: vty_app_info.is_config_node: add OSMO_DEPRECATED In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16188 ) Change subject: vty_app_info.is_config_node: add OSMO_DEPRECATED ...................................................................... vty_app_info.is_config_node: add OSMO_DEPRECATED Although this OSMO_DEPRECATED doesn't seem to generate a warning when compiling code that sets .is_config_node = foo, it seems a good idea to add the deprecation tag. It is deprecated since commit "vty: track parent nodes also for telnet sessions" I2b32b4fe20732728db6e9cdac7e484d96ab86dc5 Change-Id: I800507b27cb0d536c1a4c203d7f7b90eec05a69c --- M include/osmocom/vty/vty.h 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index 9acaa7d..b63dc3b 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -5,6 +5,7 @@ #include #include +#include /*! \defgroup vty VTY (Virtual TTY) interface * @{ @@ -186,7 +187,9 @@ int (*go_parent_cb)(struct vty *vty); /*! OBSOLETED: Implicit parent node tracking has replaced the use of this callback. This callback is no longer * called, ever, and can be left NULL. */ - int (*is_config_node)(struct vty *vty, int node); + int (*is_config_node)(struct vty *vty, int node) + OSMO_DEPRECATED("Implicit parent node tracking has replaced the use of this callback. This callback is" + " no longer called, ever, and can be left NULL."); /*! Check if the config is consistent before write */ int (*config_is_consistent)(struct vty *vty); }; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16188 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I800507b27cb0d536c1a4c203d7f7b90eec05a69c Gerrit-Change-Number: 16188 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 16:07:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 16:07:25 +0000 Subject: Change in libosmocore[master]: add osmo_escape_cstr and osmo_quote_cstr In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16160 ) Change subject: add osmo_escape_cstr and osmo_quote_cstr ...................................................................... add osmo_escape_cstr and osmo_quote_cstr Provide string escaping that - returns the required buffer size, so it can be used with OSMO_STRBUF_APPEND(). - uses C compatible string constant escaping sequences. This is intended as a replacement for all previous osmo_escape_str* and osmo_quote_str* API. It pains me that I didn't get them right the first nor the second time: - The buffer functions do not return the chars needed, which is required for allocating sufficient memory in the *_c versions of the functions. - Because of that, these functions are accurately usable for OSMO_STRBUF_APPEND(), producing truncated strings, for example when dumping a GSUP message. - They do not use the C equivalent string constant escaping: for some reason I thought "\15" would be valid, but it should be "\x0f". If I could, I would completely drop those mislead implementations ... but backwards compat prohibits that. A previous patch already provided internal static functions that accurately return the required buffer size. Enhance these to also support C compatible string escaping, and use them as implementation of the new functions: osmo_escape_cstr_buf() osmo_escape_cstr_c() osmo_quote_cstr_buf() osmo_quote_cstr_c() In the tests for these, also test C string equivalence. Naming: from API versions, it would be kind of logical to call them osmo_escape_str_buf3() and osmo_escape_str_c2(). Since these anyway return a different escaping, it makes sense to me to have distinct names instead. Quasi missing are variants of the non-C-compatible weird legacy escaping that return the required buffer size, but I refrain from adding those, because we have enough API cruft as it is. Just always use these new cstr variants. Change-Id: I3dfb892036e01000033dd8e7e4a6a0c32a3caa9b --- M include/osmocom/core/utils.h M src/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 4 files changed, 301 insertions(+), 21 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 1abbe98..01c4de6 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -148,6 +148,11 @@ bool osmo_separated_identifiers_valid(const char *str, const char *sep_chars); void osmo_identifier_sanitize_buf(char *str, const char *sep_chars, char replace_with); +size_t osmo_escape_cstr_buf(char *buf, size_t bufsize, const char *str, int in_len); +char *osmo_escape_cstr_c(void *ctx, const char *str, int in_len); +size_t osmo_quote_cstr_buf(char *buf, size_t bufsize, const char *str, int in_len); +char *osmo_quote_cstr_c(void *ctx, const char *str, int in_len); + const char *osmo_escape_str(const char *str, int len); char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len); const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t bufsize); diff --git a/src/utils.c b/src/utils.c index c3e3efb..038288c 100644 --- a/src/utils.c +++ b/src/utils.c @@ -693,14 +693,18 @@ /*! Return the string with all non-printable characters escaped. * This internal function is the implementation for all osmo_escape_str* and osmo_quote_str* API versions. - * It provides a return value of characters-needed, to allow producing un-truncated strings in all cases. + * It provides both the legacy (non C compatible) escaping, as well as C compatible string constant syntax, + * and it provides a return value of characters-needed, to allow producing un-truncated strings in all cases. * \param[out] buf string buffer to write escaped characters to. * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \param[in] legacy_format If false, return C compatible string constants ("\x0f"), if true the legacy + * escaping format ("\15"). The legacy format also escapes as "\a\b\f\v", while + * the non-legacy format also escapes those as "\xNN" sequences. * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). */ -static size_t _osmo_escape_str_buf(char *buf, size_t bufsize, const char *str, int in_len) +static size_t _osmo_escape_str_buf(char *buf, size_t bufsize, const char *str, int in_len, bool legacy_format) { struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; int in_pos = 0; @@ -739,19 +743,28 @@ BACKSLASH_CASE('\r', 'r'); BACKSLASH_CASE('\t', 't'); BACKSLASH_CASE('\0', '0'); - BACKSLASH_CASE('\a', 'a'); - BACKSLASH_CASE('\b', 'b'); - BACKSLASH_CASE('\v', 'v'); - BACKSLASH_CASE('\f', 'f'); BACKSLASH_CASE('\\', '\\'); BACKSLASH_CASE('"', '"'); -#undef BACKSLASH_CASE default: - OSMO_STRBUF_PRINTF(sb, "\\%u", (unsigned char)str[in_pos]); + if (legacy_format) { + switch (str[next_unprintable]) { + BACKSLASH_CASE('\a', 'a'); + BACKSLASH_CASE('\b', 'b'); + BACKSLASH_CASE('\v', 'v'); + BACKSLASH_CASE('\f', 'f'); + default: + OSMO_STRBUF_PRINTF(sb, "\\%u", (unsigned char)str[in_pos]); + break; + } + break; + } + + OSMO_STRBUF_PRINTF(sb, "\\x%02x", (unsigned char)str[in_pos]); break; } in_pos ++; +#undef BACKSLASH_CASE } done: @@ -767,7 +780,7 @@ */ char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) { - _osmo_escape_str_buf(buf, bufsize, str, in_len); + _osmo_escape_str_buf(buf, bufsize, str, in_len, true); return buf; } @@ -791,26 +804,30 @@ { /* The string will be at least as long as in_len, but some characters might need escaping. * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ - OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_escape_str_buf, str, in_len); + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_escape_str_buf, str, in_len, true); } /*! Return a quoted and escaped representation of the string. * This internal function is the implementation for all osmo_quote_str* API versions. - * It provides a return value of characters-needed, to allow producing un-truncated strings in all cases. + * It provides both the legacy (non C compatible) escaping, as well as C compatible string constant syntax, + * and it provides a return value of characters-needed, to allow producing un-truncated strings in all cases. * \param[out] buf string buffer to write escaped characters to. * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \param[in] legacy_format If false, return C compatible string constants ("\x0f"), if true the legacy + * escaping format ("\15"). The legacy format also escapes as "\a\b\f\v", while + * the non-legacy format also escapes those as "\xNN" sequences. * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). */ -static size_t _osmo_quote_str_buf(char *buf, size_t bufsize, const char *str, int in_len) +static size_t _osmo_quote_str_buf(char *buf, size_t bufsize, const char *str, int in_len, bool legacy_format) { struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; if (!str) OSMO_STRBUF_PRINTF(sb, "NULL"); else { OSMO_STRBUF_PRINTF(sb, "\""); - OSMO_STRBUF_APPEND(sb, _osmo_escape_str_buf, str, in_len); + OSMO_STRBUF_APPEND(sb, _osmo_escape_str_buf, str, in_len, legacy_format); OSMO_STRBUF_PRINTF(sb, "\""); } return sb.chars_needed; @@ -827,7 +844,7 @@ */ char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) { - _osmo_quote_str_buf(buf, bufsize, str, in_len); + _osmo_quote_str_buf(buf, bufsize, str, in_len, true); return buf; } @@ -845,7 +862,7 @@ return "NULL"; if (!buf || !bufsize) return "(error)"; - _osmo_quote_str_buf(buf, bufsize, str, in_len); + _osmo_quote_str_buf(buf, bufsize, str, in_len, true); return buf; } @@ -857,7 +874,7 @@ */ const char *osmo_quote_str(const char *str, int in_len) { - _osmo_quote_str_buf(namebuf, sizeof(namebuf), str, in_len); + _osmo_quote_str_buf(namebuf, sizeof(namebuf), str, in_len, true); return namebuf; } @@ -870,7 +887,65 @@ { /* The string will be at least as long as in_len, but some characters might need escaping. * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ - OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_quote_str_buf, str, in_len); + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_quote_str_buf, str, in_len, true); +} + +/*! Return the string with all non-printable characters escaped. + * In contrast to osmo_escape_str_buf2(), this returns the needed buffer size suitable for OSMO_STRBUF_APPEND(), and + * this escapes characters in a way compatible with C string constant syntax. + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + */ +size_t osmo_escape_cstr_buf(char *buf, size_t bufsize, const char *str, int in_len) +{ + return _osmo_escape_str_buf(buf, bufsize, str, in_len, false); +} + +/*! Return the string with all non-printable characters escaped, in dynamically-allocated buffer. + * In contrast to osmo_escape_str_c(), this escapes characters in a way compatible with C string constant syntax, and + * allocates sufficient memory in all cases. + * \param[in] str A string that may contain any characters. + * \param[in] len Pass -1 to print until nul char, or >= 0 to force a length. + * \returns dynamically-allocated buffer, containing an escaped representation. + */ +char *osmo_escape_cstr_c(void *ctx, const char *str, int in_len) +{ + /* The string will be at least as long as in_len, but some characters might need escaping. + * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_escape_str_buf, str, in_len, false); +} + +/*! Like osmo_escape_str_buf2(), but returns double-quotes around a string, or "NULL" for a NULL string. + * This allows passing any char* value and get its C representation as string. + * The function signature is suitable for OSMO_STRBUF_APPEND_NOLEN(). + * In contrast to osmo_escape_str_buf2(), this returns the needed buffer size suitable for OSMO_STRBUF_APPEND(), and + * this escapes characters in a way compatible with C string constant syntax. + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length. + * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + */ +size_t osmo_quote_cstr_buf(char *buf, size_t bufsize, const char *str, int in_len) +{ + return _osmo_quote_str_buf(buf, bufsize, str, in_len, false); +} + +/*! Return the string quoted and with all non-printable characters escaped, in dynamically-allocated buffer. + * In contrast to osmo_quote_str_c(), this escapes characters in a way compatible with C string constant syntax, and + * allocates sufficient memory in all cases. + * \param[in] str A string that may contain any characters. + * \param[in] len Pass -1 to print until nul char, or >= 0 to force a length. + * \returns dynamically-allocated buffer, containing a quoted and escaped representation. + */ +char *osmo_quote_cstr_c(void *ctx, const char *str, int in_len) +{ + /* The string will be at least as long as in_len plus two quotes, but some characters might need escaping. + * These extra bytes should catch most usual escaping situations, avoiding a second run in OSMO_NAME_C_IMPL. */ + OSMO_NAME_C_IMPL(ctx, in_len + 16, "ERROR", _osmo_quote_str_buf, str, in_len, false); } /*! perform an integer square root operation on unsigned 32bit integer. diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index a79b8ed..e87cb22 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -531,7 +531,7 @@ const char *printable = "printable"; const char *res; - printf("\nTesting string escaping\n"); + printf("\nTesting string escaping: osmo_escape_str()\n"); printf("- all chars from 0 to 255 in batches of 16:\n"); in_buf[16] = '\0'; for (j = 0; j < 16; j++) { @@ -571,7 +571,7 @@ const char *printable = "printable"; const char *res; - printf("\nTesting string quoting\n"); + printf("\nTesting string quoting: osmo_quote_str()\n"); printf("- all chars from 0 to 255 in batches of 16:\n"); in_buf[16] = '\0'; for (j = 0; j < 16; j++) { @@ -616,6 +616,132 @@ printf("'%s'\n", osmo_quote_str_buf(NULL, -1, out_buf, 10)); } +static void str_escape3_test(void) +{ + int i; + int j; + uint8_t in_buf[32]; + char out_buf[11]; + const char *printable = "printable"; + const char *res; + void *ctx = talloc_named_const(NULL, 0, __func__); + + printf("\nTesting string escaping: osmo_escape_cstr_buf()\n"); + printf("- all chars from 0 to 255 in batches of 16:\n"); + in_buf[16] = '\0'; + for (j = 0; j < 16; j++) { + for (i = 0; i < 16; i++) + in_buf[i] = (j << 4) | i; + printf("\"%s\"\n", osmo_escape_cstr_c(ctx, (const char*)in_buf, 16)); + } + + printf("- nul terminated:\n"); + printf("\"%s\"\n", osmo_escape_cstr_c(ctx, "termi\nated", -1)); + + printf("- passthru:\n"); + res = osmo_escape_cstr_c(ctx, printable, -1); + if (strcmp(res, printable)) + printf("NOT passed through! \"%s\"\n", res); + else + printf("passed through unchanged \"%s\"\n", res); + + printf("- zero length:\n"); + printf("\"%s\"\n", osmo_escape_cstr_c(ctx, "omitted", 0)); + + printf("- truncation when too long:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[0] = '\a'; + in_buf[7] = 'E'; + memset(out_buf, 0x7f, sizeof(out_buf)); + osmo_escape_cstr_buf(out_buf, 10, (const char *)in_buf, sizeof(in_buf)); + printf("\"%s\"\n", out_buf); + OSMO_ASSERT(out_buf[10] == 0x7f); + + printf("- Test escaping an escaped string:\n"); + res = "\x02\x03\n"; + for (i = 0; i <= 3; i++) { + res = osmo_escape_cstr_c(ctx, res, -1); + printf("%d: '%s'\n", i, res); + } + + talloc_free(ctx); +} + +static void str_quote3_test(void) +{ + int i; + int j; + uint8_t in_buf[32]; + char out_buf[11]; + const char *printable = "printable"; + const char *res; + void *ctx = talloc_named_const(NULL, 0, __func__); + + printf("\nTesting string quoting: osmo_quote_cstr_buf()\n"); + printf("- all chars from 0 to 255 in batches of 16:\n"); + in_buf[16] = '\0'; + for (j = 0; j < 16; j++) { + for (i = 0; i < 16; i++) + in_buf[i] = (j << 4) | i; + printf("%s\n", osmo_quote_cstr_c(ctx, (const char*)in_buf, 16)); + } + + printf("- nul terminated:\n"); + printf("'%s'\n", osmo_quote_cstr_c(ctx, "termi\nated", -1)); + + printf("- never passthru:\n"); + res = osmo_quote_cstr_c(ctx, printable, -1); + if (strcmp(res, printable)) + printf("NOT passed through. '%s'\n", res); + else + printf("passed through unchanged '%s'\n", res); + + printf("- zero length:\n"); + printf("'%s'\n", osmo_quote_cstr_c(ctx, "omitted", 0)); + + printf("- truncation when too long:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[0] = '\a'; + in_buf[6] = 'E'; + memset(out_buf, 0x7f, sizeof(out_buf)); + osmo_quote_cstr_buf(out_buf, 10, (const char *)in_buf, sizeof(in_buf)); + printf("'%s'\n", out_buf); + OSMO_ASSERT(out_buf[10] == 0x7f); + + printf("- always truncation, even when no escaping needed:\n"); + memset(in_buf, 'x', sizeof(in_buf)); + in_buf[7] = 'E'; /* dst has 10, less 1 quote and nul, leaves 8, i.e. in[7] is last */ + in_buf[20] = '\0'; + memset(out_buf, 0x7f, sizeof(out_buf)); + osmo_quote_cstr_buf(out_buf, 10, (const char *)in_buf, -1); + printf("'%s'\n", out_buf); + OSMO_ASSERT(out_buf[0] == '"'); + OSMO_ASSERT(out_buf[10] == 0x7f); + + printf("- try to feed too little buf for quoting:\n"); + osmo_quote_cstr_buf(out_buf, 2, "", -1); + printf("'%s'\n", out_buf); + + printf("- Test quoting a quoted+escaped string:\n"); + res = "\x02\x03\n"; + for (i = 0; i <= 3; i++) { + res = osmo_quote_cstr_c(ctx, res, -1); + printf("%d: %s\n", i, res); + } + + printf("- Test C-string equivalence:\n"); +#define TEST_STR "\0\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" +#define EMPTY_STR "" + printf("strcmp(OSMO_STRINGIFY_VAL(TEST_STR), osmo_quote_cstr_c(ctx, TEST_STR, 256)) == %d\n", + strcmp(OSMO_STRINGIFY_VAL(TEST_STR), osmo_quote_cstr_c(ctx, TEST_STR, 256))); + printf("strcmp(OSMO_STRINGIFY_VAL(EMPTY_STR), osmo_quote_cstr_c(ctx, EMPTY_STR, -1)) == %d\n", + strcmp(OSMO_STRINGIFY_VAL(EMPTY_STR), osmo_quote_cstr_c(ctx, EMPTY_STR, -1))); + printf("strcmp(\"NULL\", osmo_quote_cstr_c(ctx, NULL, -1)) == %d\n", + strcmp("NULL", osmo_quote_cstr_c(ctx, NULL, -1))); + + talloc_free(ctx); +} + static void isqrt_test(void) { int i; @@ -1238,6 +1364,8 @@ bcd2str_test(); str_escape_test(); str_quote_test(); + str_escape3_test(); + str_quote3_test(); isqrt_test(); osmo_sockaddr_to_str_and_uint_test(); osmo_str_tolowupper_test(); diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index 89e0fed..baa708e 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -206,7 +206,7 @@ bcd2str(NULL, ...) -> -12 bcd2str(dst, 0, ...) -> -12 -Testing string escaping +Testing string escaping: osmo_escape_str() - all chars from 0 to 255 in batches of 16: "\0\1\2\3\4\5\6\a\b\t\n\v\f\r\14\15" "\16\17\18\19\20\21\22\23\24\25\26\27\28\29\30\31" @@ -233,7 +233,7 @@ - truncation when too long: "\axxxxxxE" -Testing string quoting +Testing string quoting: osmo_quote_str() - all chars from 0 to 255 in batches of 16: '"\0\1\2\3\4\5\6\a\b\t\n\v\f\r\14\15"' '"\16\17\18\19\20\21\22\23\24\25\26\27\28\29\30\31"' @@ -266,6 +266,78 @@ - NULL string becomes a "NULL" literal: 'NULL' +Testing string escaping: osmo_escape_cstr_buf() +- all chars from 0 to 255 in batches of 16: +"\0\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f" +"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" +" !\"#$%&'()*+,-./" +"0123456789:;<=>?" +"@ABCDEFGHIJKLMNO" +"PQRSTUVWXYZ[\\]^_" +"`abcdefghijklmno" +"pqrstuvwxyz{|}~\x7f" +"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" +"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" +"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf" +"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" +"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" +"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" +"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef" +"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" +- nul terminated: +"termi\nated" +- passthru: +passed through unchanged "printable" +- zero length: +"" +- truncation when too long: +"\x07xxxxx" +- Test escaping an escaped string: +0: '\x02\x03\n' +1: '\\x02\\x03\\n' +2: '\\\\x02\\\\x03\\\\n' +3: '\\\\\\\\x02\\\\\\\\x03\\\\\\\\n' + +Testing string quoting: osmo_quote_cstr_buf() +- all chars from 0 to 255 in batches of 16: +"\0\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f" +"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" +" !\"#$%&'()*+,-./" +"0123456789:;<=>?" +"@ABCDEFGHIJKLMNO" +"PQRSTUVWXYZ[\\]^_" +"`abcdefghijklmno" +"pqrstuvwxyz{|}~\x7f" +"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" +"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" +"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf" +"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" +"\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" +"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" +"\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef" +"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" +- nul terminated: +'"termi\nated"' +- never passthru: +NOT passed through. '"printable"' +- zero length: +'""' +- truncation when too long: +'"\x07xxxx' +- always truncation, even when no escaping needed: +'"xxxxxxxE' +- try to feed too little buf for quoting: +'"' +- Test quoting a quoted+escaped string: +0: "\x02\x03\n" +1: "\"\\x02\\x03\\n\"" +2: "\"\\\"\\\\x02\\\\x03\\\\n\\\"\"" +3: "\"\\\"\\\\\\\"\\\\\\\\x02\\\\\\\\x03\\\\\\\\n\\\\\\\"\\\"\"" +- Test C-string equivalence: +strcmp(OSMO_STRINGIFY_VAL(TEST_STR), osmo_quote_cstr_c(ctx, TEST_STR, 256)) == 0 +strcmp(OSMO_STRINGIFY_VAL(EMPTY_STR), osmo_quote_cstr_c(ctx, EMPTY_STR, -1)) == 0 +strcmp("NULL", osmo_quote_cstr_c(ctx, NULL, -1)) == 0 + Testing integer square-root osmo_sockaddr_to_str_and_uint_test -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3dfb892036e01000033dd8e7e4a6a0c32a3caa9b Gerrit-Change-Number: 16160 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 16:08:09 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 16:08:09 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: cast ptrdiff value to fix printf format In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16215 ) Change subject: scheduler_trx.c: cast ptrdiff value to fix printf format ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 Gerrit-Change-Number: 16215 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 16:08:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 16:09:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 16:09:22 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: cast ptrdiff value to fix printf format In-Reply-To: References: Message-ID: laforge has removed a vote from this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16215 ) Change subject: scheduler_trx.c: cast ptrdiff value to fix printf format ...................................................................... Removed Code-Review+1 by laforge -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 Gerrit-Change-Number: 16215 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: deleteVote -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 16:09:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 25 Nov 2019 16:09:35 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: cast ptrdiff value to fix printf format In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16215 ) Change subject: scheduler_trx.c: cast ptrdiff value to fix printf format ...................................................................... Patch Set 2: actually %t seems to be the format string for ptrdiff_t -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 Gerrit-Change-Number: 16215 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 16:09:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 18:32:38 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 18:32:38 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... Patch Set 9: (25 comments) I really got fed up of reviewing this commit, it's a monster. There's tons of new APIs, objects, and different layers. I could not find a good explanation on the relations so it's almost impossible not getting lost. IIUC there's several layers of objects using lower layers. Please provide separate commits with an introduction for each layer and how it will be used by other objects and which objects will it use. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/configure.ac File configure.ac: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/configure.ac at 182 PS9, Line 182: libosmo-mslookup.pc Does it make sense to make it a separate shared library if it's only used by osmo-hlr? are we sure it will be used by someone else (osmo-msc)? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/debian/control File debian/control: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/debian/control at 75 PS9, Line 75: Depends: ${shlibs:Depends}, ${shlibs:Depends} can be dropped I think. Maybe it needs to be ${misc:Depends} from looking at line 52. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/hlr/logging.h File include/osmocom/hlr/logging.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/hlr/logging.h at 11 PS9, Line 11: DMSLOOKUP, Guinness record of longest log category name. Please shrink it. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h File include/osmocom/mslookup/mdns_sock.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 1 PS9, Line 1: /* Copyright 2019 by sysmocom s.f.m.c. GmbH Looks like this file and mdns.h can be merged. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 26 PS9, Line 26: struct addrinfo *ai; header missing for struct addrinfo. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 30 PS9, Line 30: int (*cb)(struct osmo_fd *fd, unsigned int what), which kind of callback is this one? osmo_fd_cb? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 32 PS9, Line 32: int osmo_mdns_sock_send(const struct osmo_mdns_sock *mdns_sock, struct msgb *msg); const mdns_sock? strange since I'd expect send() returning error means socket must be closed and set to -1. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h File include/osmocom/mslookup/mslookup.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h at 29 PS9, Line 29: #define OSMO_MSLOOKUP_SERVICE_HLR_GSUP "gsup.hlr" We may want a str_value here instead https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h at 113 PS9, Line 113: int osmo_mslookup_query_from_domain_str(struct osmo_mslookup_query *q, const char *domain); iiuc that's initializing the struct and not finding it. In that case osmo_mslookup_query_init_from_domain_str seems more explicit. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup_client.h File include/osmocom/mslookup/mslookup_client.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup_client.h at 35 PS9, Line 35: /*! This part of a lookup request is not seen by the individual query method implementations. */ Is this internal stuff then? Are we sure we are not installing it with autotools then? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup_client.h at 95 PS9, Line 95: struct osmo_mslookup_client_method { There's no allocator/constructor for struct osmo_mslookup_client_method ? Looks like each implementation has its own constructor? Please document so here. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/libosmo-mslookup.pc.in File libosmo-mslookup.pc.in: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/libosmo-mslookup.pc.in at 9 PS9, Line 9: Libs: -L${libdir} @TALLOC_LIBS@ -losmogsm -losmo-mslookup -losmocore is -losmogsm really needed? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c File src/mslookup/mdns.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 76 PS9, Line 76: msgb_free(msg); missing "talloc_free(req.domain);" here? Better use goto for ordered cleanup. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 86 PS9, Line 86: * NULL on error. No need for new line. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 106 PS9, Line 106: if (req) this if is not needed. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 108 PS9, Line 108: if (query) this if is not needed. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 127 PS9, Line 127: osmo_sockaddr_str_from_32(sockaddr_str, *(uint32_t *)rec->data, 0); use osmo_loadbe or whatever here, you may incurr into unaligned access? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_msg.c File src/mslookup/mdns_msg.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_msg.c at 92 PS9, Line 92: * -EINVAL on error. new line not needed. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_msg.c at 114 PS9, Line 114: if (osmo_mdns_rfc_record_encode(ctx, msg, &rec) != 0) this looks like function should be called encode_append or alike. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c File src/mslookup/mdns_record.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c at 35 PS9, Line 35: ret->data = (uint8_t *)talloc_asprintf(ctx, "%c%s=%s", (char)len, key, value); are you sure "len" used here is correct? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c at 39 PS9, Line 39: ret->length = len + 1; and here. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c at 45 PS9, Line 45: * NULL on error. all around: new line not needed. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_rfc.c File src/mslookup/mdns_rfc.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_rfc.c at 122 PS9, Line 122: osmo_store16be(buf->id, &buf->id); wtf? is it really worth memcpying everything then changing tons of stuff in place? All this is a bit strange imho, you are using packed structs with host-endian values... https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_sock.c File src/mslookup/mdns_sock.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_sock.c at 40 PS9, Line 40: * will not only be called when someone else is sending data, but also for data that was sent from this osmo_mdns_sock. "was sent" or "is to be sent" / "can be sent"? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mslookup.c at 148 PS9, Line 148: if (result->host_v4.ip[0]) { what are you actually checking here? if First byte/octet in address is not zero? why? -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 18:32:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 18:43:29 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 18:43:29 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16203 ) Change subject: add osmo-mslookup-client program ...................................................................... Patch Set 9: (2 comments) https://gerrit.osmocom.org/c/osmo-hlr/+/16203/9/configure.ac File configure.ac: https://gerrit.osmocom.org/c/osmo-hlr/+/16203/9/configure.ac at 187 PS9, Line 187: contrib/dgsm/Makefile I don't think contrib is the right place for this. either util(s)/ or tests/ https://gerrit.osmocom.org/c/osmo-hlr/+/16203/9/src/mslookup/osmo-mslookup-client.c File src/mslookup/osmo-mslookup-client.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16203/9/src/mslookup/osmo-mslookup-client.c at 89 PS9, Line 89: "$ osmo-mslookup-client -s /tmp/mslookup -d\n" So the daemon is called client? and a client then connects to it? mindblowing. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 18:43:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 18:46:56 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 25 Nov 2019 18:46:56 +0000 Subject: Change in osmo-hlr[master]: contrib/dgsm/ add example esme and dialplan In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16204 ) Change subject: contrib/dgsm/ add example esme and dialplan ...................................................................... Patch Set 9: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16204/9//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-hlr/+/16204/9//COMMIT_MSG at 7 PS9, Line 7: contrib/dgsm/ add example esme and dialplan Again, util(s)/ or tests/ -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 Gerrit-Change-Number: 16204 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 18:46:56 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 20:07:51 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 20:07:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: stop on various failures In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020 ) Change subject: hlr: stop on various failures ...................................................................... Patch Set 1: Code-Review+2 (1 comment) combining +2 https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020/1/hlr/HLR_Tests.ttcn File hlr/HLR_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020/1/hlr/HLR_Tests.ttcn at 575 PS1, Line 575: "Unexpected GSUP" > Let's log received message. [?] I agree; AFAICT the GSUP message is logged just before this anyway, but adding it right here would be good. Let's do it in a follow up patch. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I804aca84d0ccf4767a5c097cf6c882ccbd87c4e1 Gerrit-Change-Number: 16020 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 20:07:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 20:08:02 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 20:08:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: stop on various failures In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020 ) Change subject: hlr: stop on various failures ...................................................................... hlr: stop on various failures I found some of the tests hard to analyse when geting failures, because they don't stop the test on failure. Spread some 'mtc.stop' so that the test stops at the failed message instead of carrying on. Change-Id: I804aca84d0ccf4767a5c097cf6c882ccbd87c4e1 --- M hlr/HLR_Tests.ttcn 1 file changed, 15 insertions(+), 1 deletion(-) Approvals: neels: Looks good to me, approved fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index f309575..f8d7483 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -425,15 +425,19 @@ } [exp_fail] GSUP.receive(tr_GSUP_UL_ERR(imsi, ?)) -> value ret { setverdict(fail, "Unexpected UL ERROR Cause"); + mtc.stop; } [exp_fail] GSUP.receive(tr_GSUP_UL_RES(imsi)) -> value ret { setverdict(fail, "Unexpected UL.res for unknown IMSI"); + mtc.stop; } [exp_fail] GSUP.receive(tr_GSUP_ISD_REQ(imsi)) -> value ret { setverdict(fail, "Unexpected ISD.req in error case"); + mtc.stop; } [not exp_fail] GSUP.receive(tr_GSUP_UL_ERR(imsi, ?)) -> value ret { setverdict(fail, "Unexpected UL ERROR"); + mtc.stop; } [not exp_fail and not isd_done] GSUP.receive(tr_GSUP_ISD_REQ(imsi, msisdn)) -> value ret { GSUP.send(ts_GSUP_ISD_RES(imsi)); @@ -540,12 +544,14 @@ alt { [] GSUP.receive(tr_GSUP_PROC_SS_ERR(imsi, sid, ?, ?)) -> value ret { setverdict(fail, "Unexpected PROC_SS ERROR Cause"); + mtc.stop; } [not exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, omit)) -> value ret { setverdict(pass); } [exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, omit)) -> value ret { setverdict(fail, "Unexpected PROC_SS.res without SS IE"); + mtc.stop; } /* [exp_ss] GSUP.receive(tr_GSUP_PROC_SS_RES(imsi, sid, state, decmatch facility)) -> value ret { @@ -562,9 +568,13 @@ setverdict(pass); } else { setverdict(fail, "Unexpected PROC_SS.res with non-matching facility IE"); + mtc.stop; } } - [] GSUP.receive { repeat; } + [] GSUP.receive { + setverdict(fail, "Unexpected GSUP"); + mtc.stop; + } [] T.timeout { setverdict(fail, "Timeout waiting for PROC_SS response"); self.stop; @@ -593,18 +603,22 @@ } [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, ?)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI ERROR Cause: ", pdu); + mtc.stop; } [exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, ?)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI RES instead of ERR"); + mtc.stop; } [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_ERR(imsi, ?)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI ERROR"); + mtc.stop; } [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, result)) -> value pdu { setverdict(pass); } [not exp_fail] GSUP.receive(tr_GSUP_CHECK_IMEI_RES(imsi, ?)) -> value pdu { setverdict(fail, "Unexpected CHECK IMEI RES"); + mtc.stop; } [] GSUP.receive { repeat; } [] T.timeout { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16020 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I804aca84d0ccf4767a5c097cf6c882ccbd87c4e1 Gerrit-Change-Number: 16020 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 20:19:07 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 20:19:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add tests for GSUP proxy routing In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 to look at the new patch set (#2). Change subject: hlr: add tests for GSUP proxy routing ...................................................................... hlr: add tests for GSUP proxy routing GSUP proxy routing, as it is implemented in an upcoming osmo-hlr patch, requires that osmo-hlr returns a received Source Name IE back as Destination Name IE. Add tests for these, for various situations. At the time of writing, these tests still fail on master, and will pass as soon as GSUP request handling with request->response association is introduced to osmo-hlr in an upcoming patch (I179ebb0385b5b355f4740e14d43be97bf93622e3). Implement this by adding a source_name to the g_pars, which should be sent out in ts_GSUP_* to osmo-hlr, and expected back as destination_name in returned messages. Add source_name and destination_name to various templates, with default := omit. Add f_gen_ts_ies() and f_gen_tr_ies() to compose expected IEs more generically. Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa --- M hlr/HLR_Tests.ttcn M library/GSUP_Types.ttcn 2 files changed, 234 insertions(+), 66 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/16021/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa Gerrit-Change-Number: 16021 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 20:23:24 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 20:23:24 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16189 ) Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c File src/gsm/gsup.c: https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 985 PS3, Line 985: osmo_gsup_message_name_buf > I think the naming is wrong. [?] Maybe you're thinking of osmo_gsup_message_type_name() which we have for the the message type? The intention is: with the pattern being osmo_foo_name to get a human readable representation of foo, here foo is gsup_message. So it's a string of the GSUP message, indeed. Should I choose another name? which one? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 20:23:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 20:25:54 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 20:25:54 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... Patch Set 5: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16201/2/src/hlr_vty_subscr.c File src/hlr_vty_subscr.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16201/2/src/hlr_vty_subscr.c at 57 PS2, Line 57: timestamp_age > => https://gerrit.osmocom. [?] ahh, *that's* why I was keeping that part in a separate patch. Befor submitting for review I thought like "wth is this doing here" and squashed it m( thanks oliver -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 20:25:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: osmith Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 20:33:13 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 20:33:13 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... Patch Set 9: > I really got fed up of reviewing this commit, it's a monster. It is a brand new set of features and certainly not something to review in a minute. IMHO it does not make much sense to break it into bits. Nevertheless: There should be explanations for each API as API doc comments, they may be missing in various places. In fact I didn't check closely for that before submitting, this shortcoming being one of the welcome feedback that we need on the patch. We've been working on this for the past several weeks and we're too close to it to spot obviously missing explanations, please bear with us on this one. > explanation on the relations We are preparing a news post and there is a new chapter in the osmo-hlr user manual here: https://gerrit.osmocom.org/c/osmo-hlr/+/16211 Thanks for numerous feedback so far, we'll be slowly working through this. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 20:33:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 21:46:22 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 21:46:22 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... Patch Set 9: (21 comments) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/configure.ac File configure.ac: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/configure.ac at 182 PS9, Line 182: libosmo-mslookup.pc > Does it make sense to make it a separate shared library if it's only used by osmo-hlr? are we sure i [?] Yes. We want to make mslookup integrate-able by any client programs. The osmo-mslookup-client utility is just one particular variant of it, and the python esme and dialplan are mere proof-of-concept examples. Any client written in C and already using the libosmocore select loop would obviously want to use the library directly. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/debian/control File debian/control: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/debian/control at 75 PS9, Line 75: Depends: ${shlibs:Depends}, > ${shlibs:Depends} can be dropped I think. [?] (@osmith? ... I have no idea about this) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/hlr/logging.h File include/osmocom/hlr/logging.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/hlr/logging.h at 11 PS9, Line 11: DMSLOOKUP, > Guinness record of longest log category name. Please shrink it. Using this name isn't really a problem, is it? Any abbreviation I can think of would make it hard to understand what it is about... any suggestions? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h File include/osmocom/mslookup/mdns_sock.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 1 PS9, Line 1: /* Copyright 2019 by sysmocom s.f.m.c. GmbH > Looks like this file and mdns.h can be merged. @osmith, I also think that there could/should be less files about the mDNS proto itself https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 26 PS9, Line 26: struct addrinfo *ai; > header missing for struct addrinfo. ah, you mean the #include https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 30 PS9, Line 30: int (*cb)(struct osmo_fd *fd, unsigned int what), > which kind of callback is this one? osmo_fd_cb? struct osmo_fd defines its cb this way, there is no separte osmo_fd_cb_t; the API doc in mdns_sock.c hints at it, but I'm adding a comment there. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 32 PS9, Line 32: int osmo_mdns_sock_send(const struct osmo_mdns_sock *mdns_sock, struct msgb *msg); > const mdns_sock? strange since I'd expect send() returning error means socket must be closed and set [?] (it doesn't close the socket implicitly. should it? @osmith?) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h File include/osmocom/mslookup/mslookup.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h at 29 PS9, Line 29: #define OSMO_MSLOOKUP_SERVICE_HLR_GSUP "gsup.hlr" > We may want a str_value here instead We could in fact also drop them, except for the "gsup.hlr" one, which is actually used in the osmo-hlr server. All the others are entirely up to the clients to use, and there isn't actually a C program using these names. Service names can be freely invented in osmo-hlr.cfg. So these are little more than suggestions / avoiding typos. I guess let's drop most of them from here. Service name conventions are listed in the D-GSM chapter of the osmo-hlr user manual. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h at 113 PS9, Line 113: int osmo_mslookup_query_from_domain_str(struct osmo_mslookup_query *q, const char *domain); > iiuc that's initializing the struct and not finding it. [?] ack https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup_client.h File include/osmocom/mslookup/mslookup_client.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup_client.h at 35 PS9, Line 35: /*! This part of a lookup request is not seen by the individual query method implementations. */ > Is this internal stuff then? Are we sure we are not installing it with autotools then? adjusting API doc.... https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup_client.h at 95 PS9, Line 95: struct osmo_mslookup_client_method { > There's no allocator/constructor for struct osmo_mslookup_client_method ? Looks like each implementa [?] ack https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/libosmo-mslookup.pc.in File libosmo-mslookup.pc.in: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/libosmo-mslookup.pc.in at 9 PS9, Line 9: Libs: -L${libdir} @TALLOC_LIBS@ -losmogsm -losmo-mslookup -losmocore > is -losmogsm really needed? hmm, checking... /usr/bin/ld: ./.libs/libosmo-mslookup.so: undefined reference to `osmo_msisdn_str_valid' /usr/bin/ld: ./.libs/libosmo-mslookup.so: undefined reference to `osmo_get_rand_id' /usr/bin/ld: ./.libs/libosmo-mslookup.so: undefined reference to `osmo_imsi_str_valid' Seems that it is in fact needed. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c File src/mslookup/mdns.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 1 PS9, Line 1: /* mslookup specific functions for encoding and decoding mslookup queries/results into mDNS packets, using the high (leaving this file for osmith) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 98 PS9, Line 98: query = talloc_zero(ctx, struct osmo_mslookup_query); should OSMO_ASSERT(query) here https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_msg.c File src/mslookup/mdns_msg.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_msg.c at 114 PS9, Line 114: if (osmo_mdns_rfc_record_encode(ctx, msg, &rec) != 0) > this looks like function should be called encode_append or alike. (it encodes a single record, makes sense to me) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c File src/mslookup/mdns_record.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c at 35 PS9, Line 35: ret->data = (uint8_t *)talloc_asprintf(ctx, "%c%s=%s", (char)len, key, value); > are you sure "len" used here is correct? I'm not sure about TXT records, but DNS query strings actually contain token lengths embedded as uint8_t in the URL string instead of dots: "\x03foo\x07example\x03com" @osmith, the same applies here, right? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_rfc.c File src/mslookup/mdns_rfc.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_rfc.c at 122 PS9, Line 122: osmo_store16be(buf->id, &buf->id); > wtf? is it really worth memcpying everything then changing tons of stuff in place? [?] @osmith, I think we talked about this once, maybe I wasn't clear enough... This should suffice: { struct osmo_mdns_rfc_header *buf = (struct osmo_mdns_rfc_header *) msgb_put(msg, sizeof(*hdr)); *buf = *hdr; } https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_rfc.c at 134 PS9, Line 134: here just *hdr = *(struct osmo_mdns_rfc_header*)data; return 0; We almost don't even need this function, then, but the length check is important, and I like it to be in this explicit function. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_sock.c File src/mslookup/mdns_sock.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_sock.c at 40 PS9, Line 40: * will not only be called when someone else is sending data, but also for data that was sent from this osmo_mdns_sock. > "was sent" or "is to be sent" / "can be sent"? the point is that a multicast socket receives everything, also what it sends itself, so as soon as you send(), you'll also get a recv() with your own data back. @osmith, clarify the doc str? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_sock.c at 44 PS9, Line 44: * \param[in] cb callback for incoming data (should read from osmo_fd->fd). maybe add "used as struct osmo_fd's cb" https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mslookup.c at 148 PS9, Line 148: if (result->host_v4.ip[0]) { > what are you actually checking here? if First byte/octet in address is not zero? why? host_v4.ip is a char[], it is checking for an empty string. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 21:46:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 21:53:21 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 21:53:21 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16203 ) Change subject: add osmo-mslookup-client program ...................................................................... Patch Set 9: (2 comments) https://gerrit.osmocom.org/c/osmo-hlr/+/16203/9/configure.ac File configure.ac: https://gerrit.osmocom.org/c/osmo-hlr/+/16203/9/configure.ac at 187 PS9, Line 187: contrib/dgsm/Makefile > I don't think contrib is the right place for this. [?] The osmo-mslookup-client utility is in src/mslookup. contrib/dgsm/ just has two python examples that use this osmo-mslookup-client utility program. https://gerrit.osmocom.org/c/osmo-hlr/+/16203/9/src/mslookup/osmo-mslookup-client.c File src/mslookup/osmo-mslookup-client.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16203/9/src/mslookup/osmo-mslookup-client.c at 89 PS9, Line 89: "$ osmo-mslookup-client -s /tmp/mslookup -d\n" > So the daemon is called client? and a client then connects to it? mindblowing. It is a client really, and it does indeed seem really odd. I thought about this from various angles, in mild disbelief of what weird program I had just written. But after all it does make sense as soon as you want to implement a blocking client. The simpler way is just a cmdline tool returning a string on stdout. The more complex socket way provides a sort of proxy: it returns only those results that match your own query, while allowing many different queries to be handled on the same multicast socket, and without spawning a new process for each and every request. I guess I should clarify the doc? -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 21:53:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 21:56:13 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 21:56:13 +0000 Subject: Change in osmo-hlr[master]: contrib/dgsm/ add example esme and dialplan In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16204 ) Change subject: contrib/dgsm/ add example esme and dialplan ...................................................................... Patch Set 9: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16204/9//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-hlr/+/16204/9//COMMIT_MSG at 7 PS9, Line 7: contrib/dgsm/ add example esme and dialplan > Again, util(s)/ or tests/ IMO contrib is exactly the right place for implementation examples that are unlikely to be used unchanged. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 Gerrit-Change-Number: 16204 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 21:56:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 21:57:28 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 25 Nov 2019 21:57:28 +0000 Subject: Change in osmo-bsc[master]: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed wh... In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15909 ) Change subject: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed when the BTS configured with none combined CCCH mode. ...................................................................... Patch Set 1: AFAIK, only the author can do this... -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I33ea7808ac1bd064b88fd609bd7dfe0c8aa341f2 Gerrit-Change-Number: 15909 Gerrit-PatchSet: 1 Gerrit-Owner: mqng2 Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 21:57:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 21:57:45 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 21:57:45 +0000 Subject: Change in osmo-hlr[master]: add osmo_gsup_conn_send_err_reply() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15916 ) Change subject: add osmo_gsup_conn_send_err_reply() ...................................................................... Patch Set 8: (3 comments) (submitting old comments I forgot to submit) https://gerrit.osmocom.org/c/osmo-hlr/+/15916/2/src/gsup_server.c File src/gsup_server.c: https://gerrit.osmocom.org/c/osmo-hlr/+/15916/2/src/gsup_server.c at 66 PS2, Line 66: only REQUESTs need an error reply > Probably, makes sense to print a warning then. so far calling code does this if(), maybe is more obvious to keep it that way? I don't think we need to send a warning if we don't need to answer. https://gerrit.osmocom.org/c/osmo-hlr/+/15916/2/src/gsup_server.c at 88 PS2, Line 88: OSMO_ASSERT > osmo_gsup_msgb_alloc() also assert()s the result of allocation, so this is redundant. thx https://gerrit.osmocom.org/c/osmo-hlr/+/15916/2/src/gsup_server.c at 89 PS2, Line 89: osmo_gsup_encode > Should we check if encoding failed? hmm, I think we could entirely drop the return code and all, because: if I am trying to send an error response, but sending the error response fails, then what can I do? Pretty much nothing at all, we're stuffed on top of an error anyway. But yes, would be good to log the error at least. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15916 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I792fd9993ab2a323af58782a357d71205c43b72a Gerrit-Change-Number: 15916 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: fixeria Gerrit-Comment-Date: Mon, 25 Nov 2019 21:57:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 21:57:56 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 21:57:56 +0000 Subject: Change in osmo-hlr[master]: add osmo_gsup_conn_send_err_reply() In-Reply-To: References: Message-ID: neels has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15916 ) Change subject: add osmo_gsup_conn_send_err_reply() ...................................................................... Abandoned absorbed in the osmo_gsup_req API -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15916 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I792fd9993ab2a323af58782a357d71205c43b72a Gerrit-Change-Number: 15916 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: fixeria Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 21:58:29 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 21:58:29 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15953 ) Change subject: add full SDP codec information to the MNCC socket ...................................................................... Patch Set 2: (2 comments) (submitting old comments that I forgot to submit) https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/include/osmocom/msc/transaction.h File include/osmocom/msc/transaction.h: https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/include/osmocom/msc/transaction.h at a90 PS1, Line 90: /* if true, TCH_RTP_CREATE is sent after the > indeed, thx ah, no, use of it is also removed here in this patch... https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/src/libmsc/gsm_04_08_cc.c File src/libmsc/gsm_04_08_cc.c: https://gerrit.osmocom.org/c/osmo-msc/+/15953/1/src/libmsc/gsm_04_08_cc.c at a1670 PS1, Line 1670: trans->tch_rtp_create = true; ...here -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 21:58:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 21:58:47 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 21:58:47 +0000 Subject: Change in libosmocore[master]: add osmo_sockaddr_str_cmp() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15961 ) Change subject: add osmo_sockaddr_str_cmp() ...................................................................... Patch Set 7: (1 comment) (submitting old comments that I forgot to submit) https://gerrit.osmocom.org/c/libosmocore/+/15961/6/src/sockaddr_str.c File src/sockaddr_str.c: https://gerrit.osmocom.org/c/libosmocore/+/15961/6/src/sockaddr_str.c at 117 PS6, Line 117: if (cmp) : return cmp; : return 0; > Why this instead of simply "return cmp"? (patch rework artifact, thx) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc1cf707098dcda75f8e07c1b936951f9f9501 Gerrit-Change-Number: 15961 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 21:58:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: osmith Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 21:59:03 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 21:59:03 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add tests for GSUP proxy routing In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 ) Change subject: hlr: add tests for GSUP proxy routing ...................................................................... Patch Set 2: (1 comment) (submitting old comments that I forgot to submit) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021/1/hlr/HLR_Tests.ttcn File hlr/HLR_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021/1/hlr/HLR_Tests.ttcn at 433 PS1, Line 433: GSUP.send(valueof(ts_GSUP_UL_REQ(imsi, source_name := source_name))); > Why not? IMSI is a mandatory argument, the second one is optional. I don't see any problems here. I also think it's fine -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa Gerrit-Change-Number: 16021 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 21:59:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:05:39 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:05:39 +0000 Subject: Change in osmo-msc[master]: Fix duplicate SMS when SMPP returns to same MSC References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16217 ) Change subject: Fix duplicate SMS when SMPP returns to same MSC ...................................................................... Fix duplicate SMS when SMPP returns to same MSC Change-Id: I8c9b61dc05bda6f2b09cbc1890de1f2702f7abc8 --- M include/osmocom/msc/gsm_data.h M src/libmsc/gsm_04_11.c 2 files changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/17/16217/1 diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h index bcee213..736d563 100644 --- a/include/osmocom/msc/gsm_data.h +++ b/include/osmocom/msc/gsm_data.h @@ -292,6 +292,7 @@ } gsm411; struct { + bool ongoing; struct osmo_esme *esme; uint32_t sequence_nr; int transaction_mode; diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 367cc6f..186144c 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -272,9 +272,12 @@ static int gsm340_rx_sms_submit(struct gsm_trans *trans, struct gsm_sms *gsms) { - if (db_sms_store(gsms) != 0) { - LOG_TRANS(trans, LOGL_ERROR, "Failed to store SMS in Database\n"); - return GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER; + if (!gsms->smpp.ongoing) { + LOG_TRANS(trans, LOGL_NOTICE, "SMS Store %llu\n", gsms->id); + if (db_sms_store(gsms) != 0) { + LOG_TRANS(trans, LOGL_ERROR, "Failed to store SMS in Database\n"); + return GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER; + } } /* dispatch a signal to tell higher level about it */ send_signal(S_SMS_SUBMITTED, NULL, gsms, 0); @@ -424,10 +427,17 @@ * delivery of the SMS. */ if (smpp_route_smpp_first()) { + /* In case the ESME returns the SMS to this MSC, another entry for this SMS will be created (as usual + * for incoming SMPP requests). However, this code path soon also adds a DB entry, which would create + * duplicate entries, which would send the SMS twice. Avoid that by marking as SMPP ongoing to skip db */ + gsms->smpp.ongoing = true; + rc = smpp_try_deliver(gsms, msc_a); - if (rc == GSM411_RP_CAUSE_MO_NUM_UNASSIGNED) + if (rc == GSM411_RP_CAUSE_MO_NUM_UNASSIGNED) { /* unknown subscriber, try local */ + gsms->smpp.ongoing = false; goto try_local; + } if (rc < 0) { LOG_TRANS(trans, LOGL_ERROR, "SMS delivery error: %d\n", rc); rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c9b61dc05bda6f2b09cbc1890de1f2702f7abc8 Gerrit-Change-Number: 16217 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:05:39 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:05:39 +0000 Subject: Change in osmo-msc[master]: sms db: when storing an SMS, retrieve the ID References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16218 ) Change subject: sms db: when storing an SMS, retrieve the ID ...................................................................... sms db: when storing an SMS, retrieve the ID seemed like a good idea, but not sure if we need it at all. Change-Id: I5fa55307a6abb8bbfe56619235d7b79fbbda6caf --- M src/libmsc/db.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/18/16218/1 diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 241bc86..a1683be 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -769,6 +769,9 @@ return -EIO; dbi_result_free(result); + + sms->id = dbi_conn_sequence_last(conn, "id"); + LOGP(DLSMS, LOGL_INFO, "Stored SMS id=%llu in DB\n", sms->id); return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5fa55307a6abb8bbfe56619235d7b79fbbda6caf Gerrit-Change-Number: 16218 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:05:40 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:05:40 +0000 Subject: Change in osmo-msc[master]: sms log tweak References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16219 ) Change subject: sms log tweak ...................................................................... sms log tweak Change-Id: I77e7a1501f74b9045f032c5b6c2322025a11fd59 --- M src/libmsc/sms_queue.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/19/16219/1 diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c index c00a8c6..6098a53 100644 --- a/src/libmsc/sms_queue.c +++ b/src/libmsc/sms_queue.c @@ -272,7 +272,7 @@ } rounds += 1; - LOGP(DLSMS, LOGL_DEBUG, "Sending SMS round %d\n", rounds); + LOGP(DLSMS, LOGL_DEBUG, "Checking whether to send SMS %llu\n", sms->id); /* * This code needs to detect a loop. It assumes that no SMS -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I77e7a1501f74b9045f032c5b6c2322025a11fd59 Gerrit-Change-Number: 16219 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:06:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:06:30 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 to look at the new patch set (#3). Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... add sdp_msg API: SDP parsing/composition Rationale: in order to add full SDP to the MNCC protocol (upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f), we need to parse and compose SDP messages. Obviously, libosmo-mgcp-client already contains similar code, but that is unfortunately heavily glued to the actual MGCP implementation. The simplest solution is to create this separate implementation, copy-pasting from the existing libosmo-mgcp-client code as is convenient. This API is added here to probe whether it works well. When it does, the intention is to "move it up" to osmo-mgw and overhaul the SDP parsing in our MGCP client and MGCP server APIs using this same API. Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 --- M configure.ac M include/osmocom/msc/Makefile.am A include/osmocom/msc/sdp_msg.h M src/libmsc/Makefile.am A src/libmsc/sdp_msg.c M tests/Makefile.am A tests/sdp_msg/Makefile.am A tests/sdp_msg/sdp_msg_test.c A tests/sdp_msg/sdp_msg_test.err A tests/sdp_msg/sdp_msg_test.ok M tests/testsuite.at 11 files changed, 1,846 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/47/15947/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:06:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:06:30 +0000 Subject: Change in osmo-msc[master]: MNCC: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 to look at the new patch set (#3). Change subject: MNCC: add optional SDP to the socket protocol ...................................................................... MNCC: add optional SDP to the socket protocol Add a char buffer of 1024 characters length as space for SDP to pass to / receive from MNCC. Actually support receiving MNCC without such an SDP tail. The main reason for this is to avoid the need to adjust the ttcn3 implementation of MNCC: it would stop working for older osmo-msc. Older or non-SIP MNCC peers could operate the previous MNCC protocol unchanged (save the protocol number bump) without having to implement SDP. The SDP part in the MNCC protocol will be used in upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f. Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 --- M configure.ac M include/osmocom/msc/mncc.h M src/libmsc/mncc.c M tests/Makefile.am A tests/mncc/Makefile.am A tests/mncc/mncc_test.c A tests/mncc/mncc_test.err A tests/mncc/mncc_test.ok M tests/testsuite.at 9 files changed, 188 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/48/15948/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:06:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:06:30 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 to look at the new patch set (#3). Change subject: add full SDP codec information to the MNCC socket ...................................................................... add full SDP codec information to the MNCC socket This way osmo-msc can benefit from the complete codec information received via SIP, which was so far terminated at osmo-sip-connector. osmo-sip-connector could/should have translated the received SDP to MNCC bearer_cap, but this was never implemented properly. Since osmo-msc already handles SDP towards the MGW, it makes most sense to pass SDP to osmo-msc transparently. To be able to send a valid RTP IP:port in the SDP upon the first MNCC_SETUP_IND going out, move the CN side CRCX to the very start of establishing a voice call. As a result, first create MGW conns for both RAN and CN before starting. The voice_call_full.msc chart shows the change in message sequence for MO and MT voice calls. Implement cc_sdp.c, which accumulates codec information from various sources (MS, BSS, Assignment, remote call leg) and provides filtering to get the available set of codecs at any point in time. Implement codec_sdp_cc_t9n.c, to translate between SDP and the various libosmo-mgcp-client, CC and BSSMAP representations of codecs: - Speech Version, - Permitted Speech, - Speech Codec Type, - default Payload Type numbers, - enum mgcp_codecs, - FR/HR compatibility - SDP audio codec names, - various AMR configurations. A codec_map lists these relations in one large data record. Various functions provide conversions by traversing this map. Add trans->cc.mnccc_release_sent: so far, avoiding to send an MNCC release during trans_free() was done by setting the callref = 0. But that also skips CC Release. On codec mismatch, we send a specific MNCC error code but still want a normal CC Release: hence send the MNCC message, set mnccc_release_sent = true and do normal CC Release in trans_free(). (A better way to do this would be to adopt the mncc_call FSM from inter-MSC handover also for local voice calls, but that is out of scope for now. I want to try that soon, as time permits.) Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f --- M doc/sequence_charts/voice_call_full.msc M include/osmocom/msc/Makefile.am M include/osmocom/msc/call_leg.h A include/osmocom/msc/cc_sdp.h A include/osmocom/msc/codec_sdp_cc_t9n.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/msc_a.h M include/osmocom/msc/msc_ho.h M include/osmocom/msc/rtp_stream.h M include/osmocom/msc/sdp_msg.h M include/osmocom/msc/transaction.h M src/libmsc/Makefile.am M src/libmsc/call_leg.c A src/libmsc/cc_sdp.c A src/libmsc/codec_sdp_cc_t9n.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/mncc_call.c M src/libmsc/msc_a.c M src/libmsc/msc_ho.c M src/libmsc/msc_t.c M src/libmsc/rtp_stream.c M src/libmsc/sdp_msg.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sdp_msg/sdp_msg_test.ok 27 files changed, 5,489 insertions(+), 445 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/53/15953/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:14:39 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 25 Nov 2019 22:14:39 +0000 Subject: Change in osmocom-bb[master]: trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/16177 ) Change subject: trx_toolkit/clck_gen.py: refactor CLCKGen to use a single thread ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmocom-bb/+/16177/1/src/target/trx_toolkit/clck_gen.py File src/target/trx_toolkit/clck_gen.py: https://gerrit.osmocom.org/c/osmocom-bb/+/16177/1/src/target/trx_toolkit/clck_gen.py at 90 PS1, Line 90: while not self._breaker.wait(self.ctr_interval): > not needed in this thread, but may be useful getting time before and after self. [?] Hmm, do you think composing and sending a UDP packet takes a lot? As far as I can see from the logs of osmo-bts-trx, CLCKGen is even ~2 frames faster: DTRX INFO trx_if.c:122 phy0.0: Clock indication: fn=39474 Nov 24 02:29:12 DELL osmo-bts-trx[114476]: DL1C NOTICE scheduler_trx.c:1845 We were 1 FN slower than TRX, compensated Nov 24 02:29:12 DELL osmo-bts-trx[114476]: DTRX INFO trx_if.c:122 phy0.0: Clock indication: fn=39372 Nov 24 02:29:12 DELL osmo-bts-trx[114476]: DL1C NOTICE scheduler_trx.c:1845 We were 2 FN slower than TRX, compensated Nov 24 02:29:12 DELL osmo-bts-trx[114476]: DTRX INFO trx_if.c:122 phy0.0: Clock indication: fn=39270 Nov 24 02:29:11 DELL osmo-bts-trx[114476]: DL1C NOTICE scheduler_trx.c:1845 We were 2 FN slower than TRX, compensated Nov 24 02:29:11 DELL osmo-bts-trx[114476]: DTRX INFO trx_if.c:122 phy0.0: Clock indication: fn=39168 Nov 24 02:29:11 DELL osmo-bts-trx[114476]: DL1C NOTICE scheduler_trx.c:1845 We were 2 FN slower than TRX, compensated Nov 24 02:29:11 DELL osmo-bts-trx[114476]: DTRX INFO trx_if.c:122 phy0.0: Clock indication: fn=39066 But that could be the result of LO_DELAY_US compensation... -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/16177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibe477eb0a1ee2193c1ff16452a407be7e858b2ef Gerrit-Change-Number: 16177 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 22:14:39 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:56:07 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:56:07 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 to look at the new patch set (#10). Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... add libosmo-mslookup and mDNS implementation Create a library with generic functions for performing a distributed subscriber lookup, which allow querying IPs and ports of services by MSISDN/IMSI. For a detailed overview of this and upcoming patches, please see the elaborate comment at the top of mslookup.c. The first implementation uses multicast DNS packets. I decided to write custom DNS functions instead of using libc-ares (which we use in OsmoSGSN already), because it is only a DNS client implementation and we need both client and server. The DNS code is abstracted from the mslookup specific code, so the DNS part could in theory be replaced with a third party library in the future. We decided to place the mslookup library in the OsmoHLR source tree (instead of libosmocore), because the way we have implemented the D-GSM network, OsmoHLR will be the only user of the library for now. In the future, OsmoMSC may need it, but it depends on OsmoHLR already. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A include/osmocom/mslookup/mslookup_client_mdns.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_msg.h A src/mslookup/mdns_record.c A src/mslookup/mdns_record.h A src/mslookup/mdns_rfc.c A src/mslookup/mdns_rfc.h A src/mslookup/mdns_sock.c A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c A src/mslookup/mslookup_client_mdns.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 39 files changed, 4,452 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/10 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:56:07 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:56:07 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 to look at the new patch set (#10). Change subject: add osmo-mslookup-client program ...................................................................... add osmo-mslookup-client program Standalone program using libosmo-mslookup for manual testing, and for integration with all other components of the network that need to do mslookups to resolve SIP/SMPP servers etc. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 --- M configure.ac M contrib/Makefile.am A contrib/dgsm/Makefile.am A contrib/dgsm/osmo-mslookup-pipe.py A contrib/dgsm/osmo-mslookup-socket.py M src/mslookup/Makefile.am A src/mslookup/osmo-mslookup-client.c 7 files changed, 938 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/03/16203/10 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:56:07 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:56:07 +0000 Subject: Change in osmo-hlr[master]: contrib/dgsm/ add example esme and dialplan In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16204 to look at the new patch set (#10). Change subject: contrib/dgsm/ add example esme and dialplan ...................................................................... contrib/dgsm/ add example esme and dialplan Add example scripts for the distributed GSM network: esme_dgsm.py: connect to the SMPP port of OsmoMSC A and forward SMS to the SMPP port of OsmoMSC B. The IP and port of OsmoMSC B is retrieved by the receiver's MSISDN using osmo-mslookup-client. contrib/dgsm/freeswitch_dialplan_dgsm.py: resolve the destination SIP servers of calls with osmo-mslookup-client and bridge the calls accordingly. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Related: OS#4254 Related: OS#4255 Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 --- M contrib/dgsm/Makefile.am A contrib/dgsm/esme_dgsm.py A contrib/dgsm/freeswitch_dialplan_dgsm.py 3 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/04/16204/10 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 Gerrit-Change-Number: 16204 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:56:07 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:56:07 +0000 Subject: Change in osmo-hlr[master]: implement D-GSM in osmo-hlr In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 to look at the new patch set (#10). Change subject: implement D-GSM in osmo-hlr ...................................................................... implement D-GSM in osmo-hlr Implement the mslookup server to service remote mslookup requests: - VTY mslookup/server config with service names, - the mslookup_mdns_server listening for mslookup requests, - determine whether a subscriber is on a local MSC. Use the mslookup client to proxy GSUP to remote HLRs: - VTY mslookup/client config, - remote_hlr.c to connect GSUP clients to remote GSUP servers, - proxy.c as local GSUP proxy state, so far in-memory. This is kept an opaque API without a mutable struct, so that it can be easily moved to a persistent database implementation. dgsm.c orchestrates mslookup server, client, and MUXes GSUP messages to the right proxy peers. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b --- M include/osmocom/hlr/Makefile.am A include/osmocom/hlr/dgsm.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_vty.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/mslookup_server_mdns.h A include/osmocom/hlr/proxy.h A include/osmocom/hlr/remote_hlr.h M src/Makefile.am A src/dgsm.c A src/dgsm_vty.c M src/gsup_server.c M src/hlr.c M src/hlr_vty.c M src/hlr_vty_subscr.c M src/logging.c A src/mslookup_server.c A src/mslookup_server_mdns.c A src/proxy.c A src/remote_hlr.c M tests/test_nodes.vty M tests/test_subscriber.vty 24 files changed, 2,704 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/09/16209/10 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b Gerrit-Change-Number: 16209 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 22:57:18 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 22:57:18 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... Patch Set 10: (1 comment) @pespin, I have added a hopefully helpful overview ... https://gerrit.osmocom.org/c/osmo-hlr/+/16202/10/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/10/src/mslookup/mslookup.c at 27 PS10, Line 27: * Distributed GSM: finding subscribers ...here -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 22:57:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:09:33 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:09:33 +0000 Subject: Change in osmo-msc[master]: MNCC: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 to look at the new patch set (#4). Change subject: MNCC: add optional SDP to the socket protocol ...................................................................... MNCC: add optional SDP to the socket protocol Add a char buffer of 1024 characters length as space for SDP to pass to / receive from MNCC. Actually support receiving MNCC without such an SDP tail. The main reason for this is to avoid the need to adjust the ttcn3 implementation of MNCC: it would stop working for older osmo-msc. Older or non-SIP MNCC peers could operate the previous MNCC protocol unchanged (save the protocol number bump) without having to implement SDP. The SDP part in the MNCC protocol will be used in upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f. Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 --- M configure.ac M include/osmocom/msc/mncc.h M src/libmsc/mncc.c M tests/Makefile.am A tests/mncc/Makefile.am A tests/mncc/mncc_test.c A tests/mncc/mncc_test.err A tests/mncc/mncc_test.ok M tests/testsuite.at 9 files changed, 189 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/48/15948/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:14:56 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:14:56 +0000 Subject: Change in osmo-msc[master]: MNCC: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC: add optional SDP to the socket protocol ...................................................................... Patch Set 4: Code-Review-2 REMINDER: We must merge this at the same time as the matching osmo-sip-connector change (bumping MNCC protocol version) I'm giving it a -2 to make sure I don't accidentally merge this before the other patch is ready. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 23:14:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:18:53 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:18:53 +0000 Subject: Change in osmo-sip-connector[master]: logging from sofia: add missing newline References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 ) Change subject: logging from sofia: add missing newline ...................................................................... logging from sofia: add missing newline Sometimes, lgging from sofia lacks the final newline character, messing up log output. First snprintf() to a buffer, add '\n' if necessary and then log. Change-Id: Ia26c0b57a0166cf7de87c49471ce6f528a366dd5 --- M src/sip.c 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/20/16220/1 diff --git a/src/sip.c b/src/sip.c index 2b28b4e..5eaa94b 100644 --- a/src/sip.c +++ b/src/sip.c @@ -666,7 +666,16 @@ * the log handler call-back function, so we have no clue what log level the * currently logged message was sent for :( As a result, we can only use one * hard-coded LOGL_NOTICE here */ - osmo_vlogp(DSIP, LOGL_NOTICE, "", 0, 0, fmt, ap); + if (!log_check_level(DSIP, LOGL_NOTICE)) + return; + /* The sofia-sip log line *sometimes* lacks a terminating '\n'. Add it. */ + char log_line[256]; + if (vsnprintf(log_line, sizeof(log_line), fmt, ap) > 0) { + char *end = log_line + OSMO_MIN(strlen(log_line), sizeof(log_line) - 2); + osmo_strlcpy(end, "\n", 2); + LOGP(DSIP, LOGL_NOTICE, "%s", log_line); + } else + LOGP(DSIP, LOGL_NOTICE, "unknown logging from sip\n"); } void sip_agent_init(struct sip_agent *agent, struct app_config *app) -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Ia26c0b57a0166cf7de87c49471ce6f528a366dd5 Gerrit-Change-Number: 16220 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:18:54 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:18:54 +0000 Subject: Change in osmo-sip-connector[master]: MNCC v6: add SDP field (but don't use it) References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 ) Change subject: MNCC v6: add SDP field (but don't use it) ...................................................................... MNCC v6: add SDP field (but don't use it) Add the new SDP section to the MNCC socket protocol, but do not yet implement forwarding SDP from SIP. Implementing SDP forwarding follows in a subsequent patch. It is still possible to establish a call with empty SDP: the new osmo-msc on the MT side, receiving an MNCC_SETUP_REQ, will hit an error log: "Got no information of remote audio codecs: neither SDP nor Bearer Capability. Trying anyway." and then hold thumbs to hit a codec match, analogous to previous behavior. Note that osmo-sip-connector should actually always have encoded a Bearer Capability in the MNCC protocol in the MT MNCC_SETUP_REQ message, but never has. Now we are ready to leapfrog from zero codec info to full SDP. Change-Id: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 --- M src/call.h M src/mncc_protocol.h 2 files changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/21/16221/1 diff --git a/src/call.h b/src/call.h index bc772a4..7f67066 100644 --- a/src/call.h +++ b/src/call.h @@ -54,6 +54,11 @@ uint32_t payload_type; uint32_t payload_msg_type; + /* SDP as received for this call leg. If this is an MNCC call leg, contains the SDP most recently received in an + * MNCC message; if this is a SIP call leg, contains the SDP most recently received in a SIP message. If no SDP + * was received yet, this string is empty. Otherwise a nul terminated string. */ + char sdp[1024]; + /** * Remote started to ring/alert */ diff --git a/src/mncc_protocol.h b/src/mncc_protocol.h index 4950a77..b6f6635 100644 --- a/src/mncc_protocol.h +++ b/src/mncc_protocol.h @@ -158,6 +158,9 @@ unsigned char lchan_type; unsigned char lchan_mode; + + /* A buffer to contain SDP ('\0' terminated) */ + char sdp[1024]; }; struct gsm_data_frame { @@ -166,7 +169,7 @@ unsigned char data[0]; }; -#define MNCC_SOCK_VERSION 5 +#define MNCC_SOCK_VERSION 6 struct gsm_mncc_hello { uint32_t msg_type; uint32_t version; @@ -189,6 +192,7 @@ uint16_t port; uint32_t payload_type; uint32_t payload_msg_type; + char sdp[1024]; }; struct gsm_mncc_bridge { -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 Gerrit-Change-Number: 16221 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:18:54 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:18:54 +0000 Subject: Change in osmo-sip-connector[master]: forward full SDP between MNCC and SIP References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16222 ) Change subject: forward full SDP between MNCC and SIP ...................................................................... forward full SDP between MNCC and SIP Populate the new 'sdp' field added in MNCC v6, to enable full SDP codec negotiation between osmo-msc and SIP. Remove obsoleted code, since osmo-sip-connector now is fully out of the loop of handling audio codecs in any way. The only reason to parse or modify SDP is the recently added SIP re-INVITE handling, which needs to set the send/recv modes via 'a=sendrecv', a='sendonly', ... attributes. Change-Id: I3df5d06f38ee2d122706a9ebffde7db4f2bd6bae --- M src/call.c M src/call.h M src/mncc.c M src/sip.c M src/vty.c 5 files changed, 62 insertions(+), 68 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/22/16222/1 diff --git a/src/call.c b/src/call.c index 9f593ea..487be56 100644 --- a/src/call.c +++ b/src/call.c @@ -172,3 +172,13 @@ return "Unknown call type"; } } + +void call_leg_update_sdp(struct call_leg *leg, const char *sdp) +{ + /* If no SDP was received, keep whatever SDP was previously seen. */ + if (!sdp || !*sdp) + return; + OSMO_STRLCPY_ARRAY(leg->sdp, sdp); + LOGP(DAPP, LOGL_NOTICE, "call(%u) leg(0x%p) received SDP: %s\n", + leg->call->id, leg, leg->sdp); +} diff --git a/src/call.h b/src/call.h index 7f67066..d19c9eb 100644 --- a/src/call.h +++ b/src/call.h @@ -118,12 +118,6 @@ struct nua_handle_s *nua_handle; enum sip_cc_state state; enum sip_dir dir; - - /* mo field */ - const char *wanted_codec; - - /* mt field */ - const char *sdp_payload; }; enum mncc_cc_state { @@ -162,6 +156,8 @@ struct call_leg *call_leg_other(struct call_leg *leg); +void call_leg_update_sdp(struct call_leg *cl, const char *sdp); + void call_leg_release(struct call_leg *leg); diff --git a/src/mncc.c b/src/mncc.c index f2e2579..d74ed44 100644 --- a/src/mncc.c +++ b/src/mncc.c @@ -184,11 +184,13 @@ mncc.callref = leg->callref; mncc.ip = ntohl(other->ip); mncc.port = other->port; + + /* Send payload_type as legacy compatibility, in addition full SDP. */ mncc.payload_type = other->payload_type; - /* - * FIXME: mncc.payload_msg_type should already be compatible.. but - * payload_type should be different.. - */ + + /* Send full SDP info forwarded from SIP, since MNCC protocol version 6: */ + OSMO_STRLCPY_ARRAY(mncc.sdp, other->sdp); + struct in_addr net = { .s_addr = other->ip }; inet_ntop(AF_INET, &net, ip_addr, sizeof(ip_addr)); LOGP(DMNCC, LOGL_DEBUG, "SEND rtp_connect: IP=(%s) PORT=(%u)\n", ip_addr, mncc.port); @@ -396,6 +398,8 @@ return mncc_send(conn, MNCC_REJ_REQ, rtp->callref); } + call_leg_update_sdp(&leg->base, rtp->sdp); + /* extract information about where the RTP is */ if (rtp->ip != 0 || rtp->port != 0 || rtp->payload_type != 0) return; @@ -433,6 +437,8 @@ leg->base.payload_type = rtp->payload_type; leg->base.payload_msg_type = rtp->payload_msg_type; + call_leg_update_sdp(&leg->base, rtp->sdp); + /* TODO.. now we can continue with the call */ struct in_addr net = { .s_addr = leg->base.ip }; inet_ntop(AF_INET, &net, ip_addr, sizeof(ip_addr)); @@ -501,7 +507,6 @@ return mncc_send(conn, MNCC_REJ_REQ, data->callref); } - /* TODO.. bearer caps and better audio handling */ if (!continue_setup(conn, data)) { LOGP(DMNCC, LOGL_ERROR, "MNCC screening parameters failed leg(%u)\n", data->callref); @@ -529,6 +534,9 @@ memcpy(&leg->calling, &data->calling, sizeof(leg->calling)); memcpy(&leg->imsi, data->imsi, sizeof(leg->imsi)); + /* forward full SDP description of audio codecs */ + call_leg_update_sdp(&leg->base, data->sdp); + LOGP(DMNCC, LOGL_INFO, "Created call(%u) with MNCC leg(%u) IMSI(%.16s)\n", call->id, leg->callref, data->imsi); @@ -638,6 +646,8 @@ if (!leg) return; + call_leg_update_sdp(&leg->base, data->sdp); + LOGP(DMNCC, LOGL_INFO, "leg(%u) is now connected.\n", leg->callref); stop_cmd_timer(leg, MNCC_SETUP_COMPL_IND); leg->state = MNCC_CC_CONNECTED; @@ -672,6 +682,8 @@ if (!leg) return; + call_leg_update_sdp(&leg->base, data->sdp); + LOGP(DMNCC, LOGL_DEBUG, "leg(%u) confirmed. creating RTP socket.\n", leg->callref); @@ -690,6 +702,8 @@ if (!leg) return; + call_leg_update_sdp(&leg->base, data->sdp); + LOGP(DMNCC, LOGL_DEBUG, "leg(%u) is alerting.\n", leg->callref); @@ -768,6 +782,8 @@ if (!leg) return; + call_leg_update_sdp(&leg->base, data->sdp); + LOGP(DMNCC, LOGL_DEBUG, "leg(%u) setup completed\n", leg->callref); other_leg = call_leg_other(&leg->base); @@ -797,6 +813,8 @@ if (!leg) return; + call_leg_update_sdp(&leg->base, data->sdp); + LOGP(DMNCC, LOGL_DEBUG, "leg(%u) DTMF key=%c\n", leg->callref, data->keypad); other_leg = call_leg_other(&leg->base); @@ -819,6 +837,8 @@ if (!leg) return; + call_leg_update_sdp(&leg->base, data->sdp); + LOGP(DMNCC, LOGL_DEBUG, "leg(%u) DTMF key=%c\n", leg->callref, data->keypad); mncc_fill_header(&out_mncc, MNCC_STOP_DTMF_RSP, leg->callref); @@ -898,12 +918,12 @@ OSMO_STRLCPY_ARRAY(mncc.called.number, call->dest); } - /* - * TODO/FIXME: - * - Determine/request channel based on offered audio codecs - * - Screening, redirect? - * - Synth. the bearer caps based on codecs? - */ + /* The call->initial leg is a SIP call leg that starts an MT call. There was SDP received in the SIP INVITE that + * started this call. This here will be the call->remote, always forwarding the SDP that came in on + * call->initial. */ + if (call->initial) + OSMO_STRLCPY_ARRAY(mncc.sdp, call->initial->sdp); + rc = write(conn->fd.fd, &mncc, sizeof(mncc)); if (rc != sizeof(mncc)) { LOGP(DMNCC, LOGL_ERROR, "Failed to send message leg(%u)\n", diff --git a/src/sip.c b/src/sip.c index 5eaa94b..70551c5 100644 --- a/src/sip.c +++ b/src/sip.c @@ -43,6 +43,12 @@ static void sip_hold_call(struct call_leg *_leg); static void sip_retrieve_call(struct call_leg *_leg); +static const char *sip_get_sdp(const sip_t *sip) +{ + if (!sip || !sip->sip_payload) + return NULL; + return sip->sip_payload->pl_data; +} /* Find a SIP Call leg by given nua_handle */ static struct sip_call_leg *sip_find_leg(nua_handle_t *nh) @@ -72,17 +78,12 @@ if (!other) return; - /* Extract SDP for session in progress with matching codec */ - if (status == 183) - sdp_extract_sdp(leg, sip, false); - LOGP(DSIP, LOGL_INFO, "leg(%p) is now progressing.\n", leg); other->ring_call(other); } static void call_connect(struct sip_call_leg *leg, const sip_t *sip) { - /* extract SDP file and if compatible continue */ struct call_leg *other = call_leg_other(&leg->base); if (!other) { @@ -91,13 +92,6 @@ return; } - if (!sdp_extract_sdp(leg, sip, false)) { - LOGP(DSIP, LOGL_ERROR, "leg(%p) incompatible audio, releasing\n", leg); - nua_cancel(leg->nua_handle, TAG_END()); - other->release_call(other); - return; - } - LOGP(DSIP, LOGL_INFO, "leg(%p) is now connected(%s).\n", leg, sip->sip_call_id->i_id); leg->state = SIP_CC_CONNECTED; other->connect_call(other); @@ -114,20 +108,8 @@ LOGP(DSIP, LOGL_INFO, "Incoming call(%s) handle(%p)\n", sip->sip_call_id->i_id, nh); - if (!sdp_screen_sdp(sip)) { - LOGP(DSIP, LOGL_ERROR, "No supported codec.\n"); - nua_respond(nh, SIP_406_NOT_ACCEPTABLE, TAG_END()); - nua_handle_destroy(nh); - return; - } - call = call_sip_create(); - if (!call) { - LOGP(DSIP, LOGL_ERROR, "No supported codec.\n"); - nua_respond(nh, SIP_500_INTERNAL_SERVER_ERROR, TAG_END()); - nua_handle_destroy(nh); - return; - } + OSMO_ASSERT(call); if (sip->sip_to) to = sip->sip_to->a_url->url_user; @@ -145,27 +127,6 @@ leg->state = SIP_CC_DLG_CNFD; leg->dir = SIP_DIR_MO; - /* - * FIXME/TODO.. we need to select the codec at some point. But it is - * not this place. It starts with the TCH/F vs. TCH/H selection based - * on the offered codecs, and then RTP_CREATE should have it. So both - * are GSM related... and do not belong here. Just pick the first codec - * so the IP address, port and payload type is set. - */ - if (!sdp_extract_sdp(leg, sip, true)) { - LOGP(DSIP, LOGL_ERROR, "leg(%p) no audio, releasing\n", leg); - nua_respond(nh, SIP_406_NOT_ACCEPTABLE, TAG_END()); - nua_handle_destroy(nh); - call_leg_release(&leg->base); - return; - } - struct in_addr net = { .s_addr = leg->base.ip }; - inet_ntop(AF_INET, &net, ip_addr, sizeof(ip_addr)); - LOGP(DSIP, LOGL_INFO, "SDP Extracted: IP=(%s) PORT=(%u) PAYLOAD=(%u).\n", - ip_addr, - leg->base.port, - leg->base.payload_type); - leg->base.release_call = sip_release_call; leg->base.ring_call = sip_ring_call; leg->base.connect_call = sip_connect_call; @@ -175,7 +136,8 @@ leg->agent = agent; leg->nua_handle = nh; nua_handle_bind(nh, leg); - leg->sdp_payload = talloc_strdup(leg, sip->sip_payload->pl_data); + + call_leg_update_sdp(&leg->base, sip_get_sdp(sip)); app_route_call(call, talloc_strdup(leg, from), @@ -218,6 +180,8 @@ inet_ntop(AF_INET, &net, ip_addr, sizeof(ip_addr)); LOGP(DSIP, LOGL_DEBUG, "pre re-INVITE have IP:port (%s:%u)\n", ip_addr, leg->base.port); + call_leg_update_sdp(&leg->base, sip_get_sdp(sip)); + if (mode == sdp_sendonly) { /* SIP side places call on HOLD */ sdp = sdp_create_file(leg, other, sdp_recvonly); @@ -330,6 +294,8 @@ struct sip_call_leg *leg; leg = (struct sip_call_leg *) hmagic; + call_leg_update_sdp(&leg->base, sip_get_sdp(sip)); + /* MT call is moving forward */ /* The dialogue is now confirmed */ @@ -366,8 +332,10 @@ * respond to the re-INVITE query. */ if (sip->sip_payload && sip->sip_payload->pl_data) { struct sip_call_leg *leg = sip_find_leg(nh); - if (leg) + if (leg) { + call_leg_update_sdp(&leg->base, sip_get_sdp(sip)); sip_handle_reinvite(leg, nh, sip); + } } } else if (event == nua_r_bye || event == nua_r_cancel) { /* our bye or hang up is answered */ @@ -393,9 +361,10 @@ if (status == 100) { struct sip_call_leg *leg = sip_find_leg(nh); - if (leg) + if (leg) { + call_leg_update_sdp(&leg->base, sip_get_sdp(sip)); sip_handle_reinvite(leg, nh, sip); - else + } else new_call((struct sip_agent *) magic, nh, sip); } } else if (event == nua_i_cancel) { diff --git a/src/vty.c b/src/vty.c index ea76d46..863f9c1 100644 --- a/src/vty.c +++ b/src/vty.c @@ -211,7 +211,6 @@ get_value_string(sip_state_vals, sip->state), VTY_NEWLINE); vty_out(vty, " SIP dir(%s)%s", get_value_string(sip_dir_vals, sip->dir), VTY_NEWLINE); - vty_out(vty, " SIP wanted_codec(%s)%s", sip->wanted_codec, VTY_NEWLINE); break; case CALL_TYPE_MNCC: mncc = (struct mncc_call_leg *) leg; -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: I3df5d06f38ee2d122706a9ebffde7db4f2bd6bae Gerrit-Change-Number: 16222 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:19:34 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:19:34 +0000 Subject: Change in osmo-sip-connector[master]: forward full SDP between MNCC and SIP In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16222 ) Change subject: forward full SDP between MNCC and SIP ...................................................................... Patch Set 1: this is still lacking the call-hold features recently added, which need to be overlayed onto the SDP -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: I3df5d06f38ee2d122706a9ebffde7db4f2bd6bae Gerrit-Change-Number: 16222 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: neels Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Mon, 25 Nov 2019 23:19:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:22:27 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:22:27 +0000 Subject: Change in osmo-sip-connector[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 ) Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... MNCC v6: add optional SDP to the socket protocol Add the new SDP section to the MNCC socket protocol, but do not yet implement forwarding SDP from SIP. Implementing SDP forwarding follows in a subsequent patch. It is still possible to establish a call with empty SDP: the new osmo-msc on the MT side, receiving an MNCC_SETUP_REQ, will hit an error log: "Got no information of remote audio codecs: neither SDP nor Bearer Capability. Trying anyway." and then hold thumbs to hit a codec match, analogous to previous behavior. Note that osmo-sip-connector should actually always have encoded a Bearer Capability in the MNCC protocol in the MT MNCC_SETUP_REQ message, but never has. Now we are ready to leapfrog from zero codec info to full SDP. This patch must be merged at the same time as osmo-msc patch Ie16f0804c4d99760cd4a0c544d0889b6313eebb7, so that both sides have a matching MNCC protocol version number. Change-Id: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 --- M src/call.h M src/mncc_protocol.h 2 files changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/21/16221/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 Gerrit-Change-Number: 16221 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:23:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:23:04 +0000 Subject: Change in osmo-msc[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 to look at the new patch set (#5). Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... MNCC v6: add optional SDP to the socket protocol Add a char buffer of 1024 characters length as space for SDP to pass to / receive from MNCC. Actually support receiving MNCC without such an SDP tail. The main reason for this is to avoid the need to adjust the ttcn3 implementation of MNCC: it would stop working for older osmo-msc. Older or non-SIP MNCC peers could operate the previous MNCC protocol unchanged (save the protocol number bump) without having to implement SDP. The SDP part in the MNCC protocol will be used in upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f. This patch must be merged at the same time as osmo-sip-connector patch Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925, so that both sides have a matching MNCC protocol version number. Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 --- M configure.ac M include/osmocom/msc/mncc.h M src/libmsc/mncc.c M tests/Makefile.am A tests/mncc/Makefile.am A tests/mncc/mncc_test.c A tests/mncc/mncc_test.err A tests/mncc/mncc_test.ok M tests/testsuite.at 9 files changed, 189 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/48/15948/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:23:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:23:04 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: better err logging for dtap msgs In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15949 to look at the new patch set (#5). Change subject: msc_vlr_tests: better err logging for dtap msgs ...................................................................... msc_vlr_tests: better err logging for dtap msgs Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/49/15949/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 Gerrit-Change-Number: 15949 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:23:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:23:04 +0000 Subject: Change in osmo-msc[master]: msc_vlr_test_call.c: add MNCC logging In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15950 to look at the new patch set (#5). Change subject: msc_vlr_test_call.c: add MNCC logging ...................................................................... msc_vlr_test_call.c: add MNCC logging Change-Id: I03b25c134553c620d3fa9d23a67ad39414546861 --- M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err 2 files changed, 41 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/50/15950/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I03b25c134553c620d3fa9d23a67ad39414546861 Gerrit-Change-Number: 15950 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:23:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:23:04 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: log descriptions in color with -v In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15951 to look at the new patch set (#5). Change subject: msc_vlr_tests: log descriptions in color with -v ...................................................................... msc_vlr_tests: log descriptions in color with -v Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d --- M tests/msc_vlr/msc_vlr_tests.h 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/51/15951/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d Gerrit-Change-Number: 15951 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:23:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:23:04 +0000 Subject: Change in osmo-msc[master]: msc_vlr_test_call: rename lu_utran_tmsi In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15952 to look at the new patch set (#5). Change subject: msc_vlr_test_call: rename lu_utran_tmsi ...................................................................... msc_vlr_test_call: rename lu_utran_tmsi Change-Id: I46a41321e6d1be3672a56a6e3cc36f013fdcd396 --- M tests/msc_vlr/msc_vlr_test_call.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/52/15952/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15952 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I46a41321e6d1be3672a56a6e3cc36f013fdcd396 Gerrit-Change-Number: 15952 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:23:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:23:04 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 to look at the new patch set (#5). Change subject: add full SDP codec information to the MNCC socket ...................................................................... add full SDP codec information to the MNCC socket This way osmo-msc can benefit from the complete codec information received via SIP, which was so far terminated at osmo-sip-connector. osmo-sip-connector could/should have translated the received SDP to MNCC bearer_cap, but this was never implemented properly. Since osmo-msc already handles SDP towards the MGW, it makes most sense to pass SDP to osmo-msc transparently. To be able to send a valid RTP IP:port in the SDP upon the first MNCC_SETUP_IND going out, move the CN side CRCX to the very start of establishing a voice call. As a result, first create MGW conns for both RAN and CN before starting. The voice_call_full.msc chart shows the change in message sequence for MO and MT voice calls. Implement cc_sdp.c, which accumulates codec information from various sources (MS, BSS, Assignment, remote call leg) and provides filtering to get the available set of codecs at any point in time. Implement codec_sdp_cc_t9n.c, to translate between SDP and the various libosmo-mgcp-client, CC and BSSMAP representations of codecs: - Speech Version, - Permitted Speech, - Speech Codec Type, - default Payload Type numbers, - enum mgcp_codecs, - FR/HR compatibility - SDP audio codec names, - various AMR configurations. A codec_map lists these relations in one large data record. Various functions provide conversions by traversing this map. Add trans->cc.mnccc_release_sent: so far, avoiding to send an MNCC release during trans_free() was done by setting the callref = 0. But that also skips CC Release. On codec mismatch, we send a specific MNCC error code but still want a normal CC Release: hence send the MNCC message, set mnccc_release_sent = true and do normal CC Release in trans_free(). (A better way to do this would be to adopt the mncc_call FSM from inter-MSC handover also for local voice calls, but that is out of scope for now. I want to try that soon, as time permits.) Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f --- M doc/sequence_charts/voice_call_full.msc M include/osmocom/msc/Makefile.am M include/osmocom/msc/call_leg.h A include/osmocom/msc/cc_sdp.h A include/osmocom/msc/codec_sdp_cc_t9n.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/msc_a.h M include/osmocom/msc/msc_ho.h M include/osmocom/msc/rtp_stream.h M include/osmocom/msc/sdp_msg.h M include/osmocom/msc/transaction.h M src/libmsc/Makefile.am M src/libmsc/call_leg.c A src/libmsc/cc_sdp.c A src/libmsc/codec_sdp_cc_t9n.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/mncc_call.c M src/libmsc/msc_a.c M src/libmsc/msc_ho.c M src/libmsc/msc_t.c M src/libmsc/rtp_stream.c M src/libmsc/sdp_msg.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sdp_msg/sdp_msg_test.ok 27 files changed, 5,489 insertions(+), 445 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/53/15953/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:24:21 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:24:21 +0000 Subject: Change in osmo-msc[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... Patch Set 5: -Code-Review oh well, it's already ready at https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 25 Nov 2019 23:24:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Nov 25 23:26:26 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 25 Nov 2019 23:26:26 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16189 ) Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... Patch Set 3: It would be nice to get this patch applied, then all of the dgsm patches in osmo-hlr.git would be able to build. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 25 Nov 2019 23:26:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 03:07:49 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 26 Nov 2019 03:07:49 +0000 Subject: Change in libosmocore[master]: vty/vty.c: log received commands from telnet interface In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14974 ) Change subject: vty/vty.c: log received commands from telnet interface ...................................................................... Patch Set 6: (1 comment) why not just add the LOGP() on a fixed category and log level? Does it really need to be configurable at all? Was there a particular reason to make it this complex? If logging vty commands is considered harmful for some reason, we could also add another logging category for it, so it is independently switch-on/off-able. We have a DLCTRL, why not add a DLVTY. https://gerrit.osmocom.org/c/libosmocore/+/14974/6/src/vty/vty.c File src/vty/vty.c: https://gerrit.osmocom.org/c/libosmocore/+/14974/6/src/vty/vty.c at 1766 PS6, Line 1766: /* Work around "[level (A|B|C)]" parsing bug */ you can't make multiple arguments optional in a single square brace. Instead try [level] [(A|B|C)] -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5f6639f6ebc3e8f8df50ef48538df94285b759fd Gerrit-Change-Number: 14974 Gerrit-PatchSet: 6 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Tue, 26 Nov 2019 03:07:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 03:18:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 26 Nov 2019 03:18:05 +0000 Subject: Change in libosmocore[master]: gsup: Introduce OSMO_GSUP_NUM_VECTORS_REQ_IE In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15321 ) Change subject: gsup: Introduce OSMO_GSUP_NUM_VECTORS_REQ_IE ...................................................................... Patch Set 4: is there an accompanying update of the asciidoc manual, which says more about what the IE means? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15321 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaecc47280f8ce54f3e3a888c1cfc160735483d0f Gerrit-Change-Number: 15321 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: neels Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 03:18:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 03:23:31 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 26 Nov 2019 03:23:31 +0000 Subject: Change in libosmocore[master]: gsup: Introduce OSMO_GSUP_NUM_VECTORS_REQ_IE In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15321 ) Change subject: gsup: Introduce OSMO_GSUP_NUM_VECTORS_REQ_IE ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/15321/4//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/15321/4//COMMIT_MSG at 9 PS4, Line 9: This is a bit of a hack, as we want to maintain binary compatibility maintain binary compatibility: you mean as in the struct osmo_gsup_message size? We did add more elements to the struct on various occasions before this. Is this case different? We should maybe add a "more" bool indicator to the end to allow future extensions, like http://git.osmocom.org/libosmocore/tree/include/osmocom/gsm/gsm0808.h#n143 ? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15321 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaecc47280f8ce54f3e3a888c1cfc160735483d0f Gerrit-Change-Number: 15321 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: neels Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 03:23:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 03:28:12 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 26 Nov 2019 03:28:12 +0000 Subject: Change in libosmocore[master]: libosmovty: simplify condition checking vty->fd in vty_close() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16149 ) Change subject: libosmovty: simplify condition checking vty->fd in vty_close() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16149/1/src/vty/vty.c File src/vty/vty.c: https://gerrit.osmocom.org/c/libosmocore/+/16149/1/src/vty/vty.c at 235 PS1, Line 235: if (vty->fd > 2) { I kind of prefer the explicit mention of 'stderr', it makes abundantly clear what the condition is doing. If we need stdin and stdout as well, I'd rather add 'vty->fd != fileno(stdout)' as well. But in fact, we will never have an fd on stdout because there is no 'log stdout' VTY command. And for obious reasons no vty fd will ever be == fileno(stdin). So I see what this is about, but my bikeshed is: just keep the previous version :P -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 Gerrit-Change-Number: 16149 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Tue, 26 Nov 2019 03:28:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 03:40:50 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Tue, 26 Nov 2019 03:40:50 +0000 Subject: Change in osmo-sip-connector[master]: Transmit Bearer Caps to MNCC with SETUP_REQ In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/15019 ) Change subject: Transmit Bearer Caps to MNCC with SETUP_REQ ...................................................................... Patch Set 1: Code-Review-1 (2 comments) this is interesting, because it would finally add codec information to the MNCC socket. Given the period of inactivity on this patch, I guess you know this already, but for completeness' sake: This is only implementing two codec types, and it is not this trivial to derive the Speech Version just from the payload type number. Doing this right would need to correlate the SDP codec names instead. (the SDP in SIP could assign any payload type numbers to any codec) Instead, we have another approach for this, i.e. adding complete SDP to the MNCC socket, https://gerrit.osmocom.org/q/topic:%22codecs%22+(project:%22osmo-msc%22%20OR%20project:%22osmo-sip-connector%22) -- those patches are in review and I'm actively working on getting them merged. https://gerrit.osmocom.org/c/osmo-sip-connector/+/15019/1/src/mncc.c File src/mncc.c: https://gerrit.osmocom.org/c/osmo-sip-connector/+/15019/1/src/mncc.c at 824 PS1, Line 824: struct gsm_mncc_bearer_cap bearer_cap > Right, I started thinking to set a default bearer cap in a temporary variable that would apply for a [?] FYI, the syntax would have been mncc.bearer_cap = (struct gsm_mncc_bearer_cap){ .transfer = ..., .mode = ... }; https://gerrit.osmocom.org/c/osmo-sip-connector/+/15019/1/src/mncc.c at 829 PS1, Line 829: .speech_ver = { GSM48_BCAP_SV_FR, the most impact is made by these speech_ver entries. -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/15019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: I55cdc4b7c52730d7e998a1d692c7552fd07403ee Gerrit-Change-Number: 15019 Gerrit-PatchSet: 1 Gerrit-Owner: keith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: keith Gerrit-Reviewer: neels Gerrit-CC: fixeria Gerrit-Comment-Date: Tue, 26 Nov 2019 03:40:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria Comment-In-Reply-To: keith Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 06:45:32 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 26 Nov 2019 06:45:32 +0000 Subject: Change in libosmocore[master]: libosmovty: simplify condition checking vty->fd in vty_close() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16149 ) Change subject: libosmovty: simplify condition checking vty->fd in vty_close() ...................................................................... Patch Set 1: > And for obious reasons no vty fd will ever be == fileno(stdin). Well, until now it was possible: https://git.osmocom.org/libosmocore/commit/?id=b639b4d4f7f3d51c50dd687a38690c57ba20dced ;) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 Gerrit-Change-Number: 16149 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Tue, 26 Nov 2019 06:45:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 06:51:56 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 26 Nov 2019 06:51:56 +0000 Subject: Change in libosmocore[master]: libosmovty: simplify condition checking vty->fd in vty_close() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16149 ) Change subject: libosmovty: simplify condition checking vty->fd in vty_close() ...................................................................... Patch Set 1: > So I see what this is about, but my bikeshed is: just keep the previous version :P We can add a comment to make it cleaner, but I will not insist on merging this change. Even Pau is not 100% (CR+1) sure despite he suggested this ;) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 Gerrit-Change-Number: 16149 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Tue, 26 Nov 2019 06:51:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 08:53:24 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Tue, 26 Nov 2019 08:53:24 +0000 Subject: Change in simtrace2[master]: host: use autotools and split shared code to libosmo-simtrace2 In-Reply-To: References: Message-ID: tsaitgaist has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16194 ) Change subject: host: use autotools and split shared code to libosmo-simtrace2 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I57e77f927ee9e169cc794c5dc6b128a2d590201b Gerrit-Change-Number: 16194 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Reviewer: tsaitgaist Gerrit-Comment-Date: Tue, 26 Nov 2019 08:53:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 08:57:01 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Tue, 26 Nov 2019 08:57:01 +0000 Subject: Change in simtrace2[master]: use osmo_st2_ or osmo_ prefix for [shared] library symbols In-Reply-To: References: Message-ID: tsaitgaist has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16195 ) Change subject: use osmo_st2_ or osmo_ prefix for [shared] library symbols ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie2686b30717b9541b1217802ca967cd0a4cbde9b Gerrit-Change-Number: 16195 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Reviewer: tsaitgaist Gerrit-Comment-Date: Tue, 26 Nov 2019 08:57:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 08:58:12 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Tue, 26 Nov 2019 08:58:12 +0000 Subject: Change in simtrace2[master]: merge simtrace2-discovery.[ch] to libusb_util.[ch] In-Reply-To: References: Message-ID: tsaitgaist has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16196 ) Change subject: merge simtrace2-discovery.[ch] to libusb_util.[ch] ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I4defbec70986a90c1f0cfb7587393265b73c0163 Gerrit-Change-Number: 16196 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Reviewer: tsaitgaist Gerrit-Comment-Date: Tue, 26 Nov 2019 08:58:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 08:58:17 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Tue, 26 Nov 2019 08:58:17 +0000 Subject: Change in simtrace2[master]: host: use autotools and split shared code to libosmo-simtrace2 In-Reply-To: References: Message-ID: tsaitgaist has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16194 ) Change subject: host: use autotools and split shared code to libosmo-simtrace2 ...................................................................... host: use autotools and split shared code to libosmo-simtrace2 Change-Id: I57e77f927ee9e169cc794c5dc6b128a2d590201b --- M contrib/jenkins.sh A host/.gitignore A host/Makefile.am R host/Makefile.old A host/configure.ac R host/contrib/99-simtrace2.rules A host/contrib/Makefile.am A host/git-version-gen A host/include/Makefile.am R host/include/osmocom/simtrace2/apdu_dispatch.h A host/include/osmocom/simtrace2/gsmtap.h R host/include/osmocom/simtrace2/libusb_util.h A host/include/osmocom/simtrace2/simtrace2_api.h A host/include/osmocom/simtrace2/simtrace_prot.h A host/include/osmocom/simtrace2/simtrace_usb.h A host/lib/Makefile.am R host/lib/apdu_dispatch.c A host/lib/gsmtap.c R host/lib/libusb_util.c A host/lib/simtrace2_api.c A host/libosmo-simtrace2.pc.in D host/simtrace.h D host/simtrace2-remsim.c D host/simtrace_prot.h D host/simtrace_usb.h A host/src/Makefile.am R host/src/simtrace2-discovery.c R host/src/simtrace2-discovery.h A host/src/simtrace2-remsim.c R host/src/simtrace2-sniff.c R host/src/simtrace2_usb.c R host/src/usb2udp.c 32 files changed, 1,245 insertions(+), 836 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve tsaitgaist: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index b85e4b3..a8426bd 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -50,9 +50,15 @@ echo echo "=============== HOST START ==============" cd $TOPDIR/host -make clean -make -make clean +autoreconf --install --force +./configure --enable-sanitize --enable-werror +$MAKE $PARALLEL_MAKE +#$MAKE distcheck || cat-testlogs.sh +make dist + +#if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then +# make -C "$base/doc/manuals" publish +#fi if [ "x$publish" = "x--publish" ]; then echo @@ -69,6 +75,10 @@ fi echo +echo "=============== HOST CLEAN ==============" +$MAKE maintainer-clean + +echo echo "=============== FIRMWARE CLEAN ==============" cd $TOPDIR/firmware/ for build in $BUILDS; do diff --git a/host/.gitignore b/host/.gitignore new file mode 100644 index 0000000..44ca2a0 --- /dev/null +++ b/host/.gitignore @@ -0,0 +1,32 @@ +.o +*.a +*.lo +*.la +.deps +Makefile +Makefile.in + +#configure +aclocal.m4 +autom4te.cache/ +compile +config.guess +config.log +config.status +config.sub +configure +configure.lineno +depcomp +install-sh +missing +stamp-h1 + +#libtool +ltmain.sh +libtool +.libs + +.tarball-version +.version + +*.pc diff --git a/host/Makefile.am b/host/Makefile.am new file mode 100644 index 0000000..d1b3b31 --- /dev/null +++ b/host/Makefile.am @@ -0,0 +1,14 @@ +AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6 + +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include +SUBDIRS = include lib src contrib #tests examples doc + +EXTRA_DIST = .version git-version-gen + + at RELMAKE@ + +BUILT_SOURCES = $(top_srcdir)/.version +$(top_srcdir)/.version: + echo $(VERSION) > $@-t && mv $@-t $@ +dist-hook: + echo $(VERSION) > $(distdir)/.tarball-version diff --git a/host/Makefile b/host/Makefile.old similarity index 94% rename from host/Makefile rename to host/Makefile.old index aee399c..ab767cd 100644 --- a/host/Makefile +++ b/host/Makefile.old @@ -5,7 +5,7 @@ all: $(APPS) -simtrace2-remsim: simtrace2-remsim.o apdu_dispatch.o simtrace2-discovery.o libusb_util.o +simtrace2-remsim: simtrace2-remsim.o apdu_dispatch.o simtrace2-discovery.o simtrace2_api.o libusb_util.o $(CC) -o $@ $^ $(LDFLAGS) `pkg-config --libs libosmosim libpcsclite` simtrace2-remsim-usb2udp: usb2udp.o simtrace2-discovery.o diff --git a/host/configure.ac b/host/configure.ac new file mode 100644 index 0000000..7929884 --- /dev/null +++ b/host/configure.ac @@ -0,0 +1,102 @@ +AC_INIT([simtrace2], + m4_esyscmd([./git-version-gen .tarball-version]), + [simtrace at lists.osmocom.org]) + +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + +AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip 1.6 subdir-objects]) +AC_CONFIG_TESTDIR(tests) + +dnl kernel style compile messages +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +dnl include release helper +RELMAKE='-include osmo-release.mk' +AC_SUBST([RELMAKE]) + +dnl checks for programs +AC_PROG_MAKE_SET +AC_PROG_CC +AC_PROG_INSTALL +LT_INIT([pic-only]) + +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + +AC_CONFIG_MACRO_DIR([m4]) + +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 " +AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])], + [ AC_MSG_RESULT([yes]) + SYMBOL_VISIBILITY="-fvisibility=hidden"], + AC_MSG_RESULT([no])) +CFLAGS="$saved_CFLAGS" +AC_SUBST(SYMBOL_VISIBILITY) + +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.0.0) +PKG_CHECK_MODULES(LIBOSMOSIM, libosmosim >= 1.0.0) +PKG_CHECK_MODULES(LIBUSB, libusb-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 + +AC_ARG_ENABLE(werror, + [AS_HELP_STRING( + [--enable-werror], + [Turn all compiler warnings into errors, with exceptions: + a) deprecation (allow upstream to mark deprecation without breaking builds); + b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds) + ] + )], + [werror=$enableval], [werror="no"]) +if test x"$werror" = x"yes" +then + WERROR_FLAGS="-Werror" + WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations" + WERROR_FLAGS+=" -Wno-error=cpp" # "#warning" + CFLAGS="$CFLAGS $WERROR_FLAGS" + CPPFLAGS="$CPPFLAGS $WERROR_FLAGS" +fi + +AC_MSG_RESULT([CFLAGS="$CFLAGS"]) +AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) + +AC_OUTPUT( + libosmo-simtrace2.pc + include/Makefile + src/Makefile + lib/Makefile + contrib/Makefile + Makefile) diff --git a/host/99-simtrace2.rules b/host/contrib/99-simtrace2.rules similarity index 100% rename from host/99-simtrace2.rules rename to host/contrib/99-simtrace2.rules diff --git a/host/contrib/Makefile.am b/host/contrib/Makefile.am new file mode 100644 index 0000000..4f11962 --- /dev/null +++ b/host/contrib/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = 99-simtrace2.rules diff --git a/host/git-version-gen b/host/git-version-gen new file mode 100755 index 0000000..42cf3d2 --- /dev/null +++ b/host/git-version-gen @@ -0,0 +1,151 @@ +#!/bin/sh +# Print a version string. +scriptversion=2010-01-28.01 + +# Copyright (C) 2007-2010 Free Software Foundation, Inc. +# +# This program is free software: you can 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 . + +# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. +# It may be run two ways: +# - from a git repository in which the "git describe" command below +# produces useful output (thus requiring at least one signed tag) +# - from a non-git-repo directory containing a .tarball-version file, which +# presumes this script is invoked like "./git-version-gen .tarball-version". + +# In order to use intra-version strings in your project, you will need two +# separate generated version string files: +# +# .tarball-version - present only in a distribution tarball, and not in +# a checked-out repository. Created with contents that were learned at +# the last time autoconf was run, and used by git-version-gen. Must not +# be present in either $(srcdir) or $(builddir) for git-version-gen to +# give accurate answers during normal development with a checked out tree, +# but must be present in a tarball when there is no version control system. +# Therefore, it cannot be used in any dependencies. GNUmakefile has +# hooks to force a reconfigure at distribution time to get the value +# correct, without penalizing normal development with extra reconfigures. +# +# .version - present in a checked-out repository and in a distribution +# tarball. Usable in dependencies, particularly for files that don't +# want to depend on config.h but do want to track version changes. +# Delete this file prior to any autoconf run where you want to rebuild +# files to pick up a version string change; and leave it stale to +# minimize rebuild time after unrelated changes to configure sources. +# +# It is probably wise to add these two files to .gitignore, so that you +# don't accidentally commit either generated file. +# +# Use the following line in your configure.ac, so that $(VERSION) will +# automatically be up-to-date each time configure is run (and note that +# since configure.ac no longer includes a version string, Makefile rules +# should not depend on configure.ac for version updates). +# +# AC_INIT([GNU project], +# m4_esyscmd([build-aux/git-version-gen .tarball-version]), +# [bug-project at example]) +# +# Then use the following lines in your Makefile.am, so that .version +# will be present for dependencies, and so that .tarball-version will +# exist in distribution tarballs. +# +# BUILT_SOURCES = $(top_srcdir)/.version +# $(top_srcdir)/.version: +# echo $(VERSION) > $@-t && mv $@-t $@ +# dist-hook: +# echo $(VERSION) > $(distdir)/.tarball-version + +case $# in + 1) ;; + *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version"; exit 1;; +esac + +tarball_version_file=$1 +nl=' +' + +# First see if there is a tarball-only version file. +# then try "git describe", then default. +if test -f $tarball_version_file +then + v=`cat $tarball_version_file` || exit 1 + case $v in + *$nl*) v= ;; # reject multi-line output + [0-9]*) ;; + *) v= ;; + esac + test -z "$v" \ + && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2 +fi + +if test -n "$v" +then + : # use $v +elif + v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \ + || git describe --abbrev=4 HEAD 2>/dev/null` \ + && case $v in + [0-9]*) ;; + v[0-9]*) ;; + *) (exit 1) ;; + esac +then + # Is this a new git that lists number of commits since the last + # tag or the previous older version that did not? + # Newer: v6.10-77-g0f8faeb + # Older: v6.10-g0f8faeb + case $v in + *-*-*) : git describe is okay three part flavor ;; + *-*) + : git describe is older two part flavor + # Recreate the number of commits and rewrite such that the + # result is the same as if we were using the newer version + # of git describe. + vtag=`echo "$v" | sed 's/-.*//'` + numcommits=`git rev-list "$vtag"..HEAD | wc -l` + v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; + ;; + esac + + # Change the first '-' to a '.', so version-comparing tools work properly. + # Remove the "g" in git describe's output string, to save a byte. + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; +else + v=UNKNOWN +fi + +v=`echo "$v" |sed 's/^v//'` + +# Don't declare a version "dirty" merely because a time stamp has changed. +git status > /dev/null 2>&1 + +dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= +case "$dirty" in + '') ;; + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; + *) v="$v-dirty" ;; + esac ;; +esac + +# Omit the trailing newline, so that m4_esyscmd can use the result directly. +echo "$v" | tr -d '\012' + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/host/include/Makefile.am b/host/include/Makefile.am new file mode 100644 index 0000000..4222484 --- /dev/null +++ b/host/include/Makefile.am @@ -0,0 +1,7 @@ +nobase_include_HEADERS = \ + osmocom/simtrace2/apdu_dispatch.h \ + osmocom/simtrace2/libusb_util.h \ + osmocom/simtrace2/simtrace2_api.h \ + osmocom/simtrace2/simtrace_usb.h \ + osmocom/simtrace2/simtrace_prot.h \ + osmocom/simtrace2/gsmtap.h diff --git a/host/apdu_dispatch.h b/host/include/osmocom/simtrace2/apdu_dispatch.h similarity index 100% rename from host/apdu_dispatch.h rename to host/include/osmocom/simtrace2/apdu_dispatch.h diff --git a/host/include/osmocom/simtrace2/gsmtap.h b/host/include/osmocom/simtrace2/gsmtap.h new file mode 100644 index 0000000..d7184dc --- /dev/null +++ b/host/include/osmocom/simtrace2/gsmtap.h @@ -0,0 +1,6 @@ +#pragma once +#include +#include + +int osmo_st2_gsmtap_init(const char *gsmtap_host); +int osmo_st2_gsmtap_send_apdu(uint8_t sub_type, const uint8_t *apdu, unsigned int len); diff --git a/host/libusb_util.h b/host/include/osmocom/simtrace2/libusb_util.h similarity index 100% rename from host/libusb_util.h rename to host/include/osmocom/simtrace2/libusb_util.h diff --git a/host/include/osmocom/simtrace2/simtrace2_api.h b/host/include/osmocom/simtrace2/simtrace2_api.h new file mode 100644 index 0000000..5a9f4a3 --- /dev/null +++ b/host/include/osmocom/simtrace2/simtrace2_api.h @@ -0,0 +1,52 @@ +#pragma once + +#include +#include + +/* transport to a SIMtrace device */ +struct st_transport { + /* USB */ + struct libusb_device_handle *usb_devh; + struct { + uint8_t in; + uint8_t out; + uint8_t irq_in; + } usb_ep; + + /* UDP */ + int udp_fd; +}; + +/* a SIMtrace slot; communicates over a transport */ +struct st_slot { + /* transport through which the slot can be reached */ + struct st_transport *transp; + /* number of the slot within the transport */ + uint8_t slot_nr; +}; + +/* One istance of card emulation */ +struct cardem_inst { + /* slot on which this card emulation instance runs */ + struct st_slot *slot; + /* libosmosim SIM card profile */ + const struct osim_cla_ins_card_profile *card_prof; + /* libosmosim SIM card channel */ + struct osim_chan_hdl *chan; +}; + + +int cardem_request_card_insert(struct cardem_inst *ci, bool inserted); +int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t le); +int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, + const uint8_t *data, uint16_t data_len_in); +int cardem_request_sw_tx(struct cardem_inst *ci, const uint8_t *sw); +int cardem_request_set_atr(struct cardem_inst *ci, const uint8_t *atr, unsigned int atr_len); + + +int st_modem_reset_pulse(struct st_slot *slot, uint16_t duration_ms); +int st_modem_reset_active(struct st_slot *slot); +int st_modem_reset_inactive(struct st_slot *slot); +int st_modem_sim_select_local(struct st_slot *slot); +int st_modem_sim_select_remote(struct st_slot *slot); +int st_modem_get_status(struct st_slot *slot); diff --git a/host/include/osmocom/simtrace2/simtrace_prot.h b/host/include/osmocom/simtrace2/simtrace_prot.h new file mode 120000 index 0000000..cf485f3 --- /dev/null +++ b/host/include/osmocom/simtrace2/simtrace_prot.h @@ -0,0 +1 @@ +../../../../firmware/libcommon/include/simtrace_prot.h \ No newline at end of file diff --git a/host/include/osmocom/simtrace2/simtrace_usb.h b/host/include/osmocom/simtrace2/simtrace_usb.h new file mode 120000 index 0000000..ec0c021 --- /dev/null +++ b/host/include/osmocom/simtrace2/simtrace_usb.h @@ -0,0 +1 @@ +../../../../firmware/libcommon/include/simtrace_usb.h \ No newline at end of file diff --git a/host/lib/Makefile.am b/host/lib/Makefile.am new file mode 100644 index 0000000..8416923 --- /dev/null +++ b/host/lib/Makefile.am @@ -0,0 +1,19 @@ +# This is _NOT_ the library release version, it's an API version. +# Please read chapter "Library interface versions" of the libtool documentation +# before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html +ST2_LIBVERSION=0:0:0 + +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) +AM_CFLAGS= -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOSIM_CFLAGS) $(LIBUSB_CFLAGS) $(COVERAGE_CFLAGS) +AM_LDFLAGS = $(COVERAGE_LDFLAGS) +COMMONLIBS = $(LIBOSMOCORE_LIBS) $(LIBOSMOSIM_LIBS) $(LIBUSB_LIBS) + +lib_LTLIBRARIES = libosmo-simtrace2.la + +libosmo_simtrace2_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(ST2_LIBVERSION) +libosmo_simtrace2_la_LIBADD = $(COMMONLIBS) +libosmo_simtrace2_la_SOURCES = \ + apdu_dispatch.c \ + gsmtap.c \ + libusb_util.c \ + simtrace2_api.c diff --git a/host/apdu_dispatch.c b/host/lib/apdu_dispatch.c similarity index 98% rename from host/apdu_dispatch.c rename to host/lib/apdu_dispatch.c index 7c7ed01..ae892eb 100644 --- a/host/apdu_dispatch.c +++ b/host/lib/apdu_dispatch.c @@ -27,7 +27,7 @@ #include #include -#include "apdu_dispatch.h" +#include /*! \brief Has the command-data phase been completed yet? */ static inline bool is_dc_complete(struct apdu_context *ac) diff --git a/host/lib/gsmtap.c b/host/lib/gsmtap.c new file mode 100644 index 0000000..d5575e0 --- /dev/null +++ b/host/lib/gsmtap.c @@ -0,0 +1,57 @@ +#include + +#include +#include + +#include +#include +#include +#include + +/* global GSMTAP instance */ +static struct gsmtap_inst *g_gti; + +int osmo_st2_gsmtap_init(const char *gsmtap_host) +{ + if (g_gti) + return -EEXIST; + + g_gti = gsmtap_source_init(gsmtap_host, GSMTAP_UDP_PORT, 0); + if (!g_gti) { + perror("unable to open GSMTAP"); + return -EIO; + } + gsmtap_source_add_sink(g_gti); + + return 0; +} + +int osmo_st2_gsmtap_send_apdu(uint8_t sub_type, const uint8_t *apdu, unsigned int len) +{ + struct gsmtap_hdr *gh; + unsigned int gross_len = len + sizeof(*gh); + uint8_t *buf = malloc(gross_len); + int rc; + + if (!buf) + return -ENOMEM; + + memset(buf, 0, sizeof(*gh)); + gh = (struct gsmtap_hdr *) buf; + gh->version = GSMTAP_VERSION; + gh->hdr_len = sizeof(*gh)/4; + gh->type = GSMTAP_TYPE_SIM; + gh->sub_type = sub_type; + + memcpy(buf + sizeof(*gh), apdu, len); + + rc = write(gsmtap_inst_fd(g_gti), buf, gross_len); + if (rc < 0) { + perror("write gsmtap"); + free(buf); + return rc; + } + + free(buf); + return 0; +} diff --git a/host/libusb_util.c b/host/lib/libusb_util.c similarity index 98% rename from host/libusb_util.c rename to host/lib/libusb_util.c index 71fb488..d88b043 100644 --- a/host/libusb_util.c +++ b/host/lib/libusb_util.c @@ -1,6 +1,6 @@ /* libusb utilities * - * (C) 2010-2016 by Harald Welte + * (C) 2010-2019 by Harald Welte * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -25,7 +25,7 @@ #include -#include "libusb_util.h" +#include static char path_buf[USB_MAX_PATH_LEN]; diff --git a/host/lib/simtrace2_api.c b/host/lib/simtrace2_api.c new file mode 100644 index 0000000..0d48b8e --- /dev/null +++ b/host/lib/simtrace2_api.c @@ -0,0 +1,281 @@ + +/* simtrace2-protocol - USB protocol library code for SIMtrace2 + * + * (C) 2016-2019 by Harald Welte + * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * This program is free software; you can redistribute it and/or + * modify 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 +#include +#include +#define _GNU_SOURCE +#include + +#include +#include +#include +#include +#include + +#include + +//#include +#include +#include +//#include "apdu_dispatch.h" +//#include "simtrace2-discovery.h" + +#include +#include +#include +#include +#include + +/*********************************************************************** + * SIMTRACE core protocol + ***********************************************************************/ + +/*! \brief allocate a message buffer for simtrace use */ +static struct msgb *st_msgb_alloc(void) +{ + return msgb_alloc_headroom(1024+32, 32, "SIMtrace"); +} + +#if 0 +static void apdu_out_cb(uint8_t *buf, unsigned int len, void *user_data) +{ + printf("APDU: %s\n", osmo_hexdump(buf, len)); + gsmtap_send_sim(buf, len); +} +#endif + +/*! \brief Transmit a given command to the SIMtrace2 device */ +int st_transp_tx_msg(struct st_transport *transp, struct msgb *msg) +{ + int rc; + + printf("<- %s\n", msgb_hexdump(msg)); + + if (transp->udp_fd < 0) { + int xfer_len; + + rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.out, + msgb_data(msg), msgb_length(msg), + &xfer_len, 100000); + } else { + rc = write(transp->udp_fd, msgb_data(msg), msgb_length(msg)); + } + + msgb_free(msg); + return rc; +} + +static struct simtrace_msg_hdr *st_push_hdr(struct msgb *msg, uint8_t msg_class, uint8_t msg_type, + uint8_t slot_nr) +{ + struct simtrace_msg_hdr *sh; + + sh = (struct simtrace_msg_hdr *) msgb_push(msg, sizeof(*sh)); + memset(sh, 0, sizeof(*sh)); + sh->msg_class = msg_class; + sh->msg_type = msg_type; + sh->slot_nr = slot_nr; + sh->msg_len = msgb_length(msg); + + return sh; +} + +/* transmit a given message to a specified slot. Expects all headers + * present before calling the function */ +int st_slot_tx_msg(struct st_slot *slot, struct msgb *msg, + uint8_t msg_class, uint8_t msg_type) +{ + st_push_hdr(msg, msg_class, msg_type, slot->slot_nr); + + return st_transp_tx_msg(slot->transp, msg); +} + +/*********************************************************************** + * Card Emulation protocol + ***********************************************************************/ + + +/*! \brief Request the SIMtrace2 to generate a card-insert signal */ +int cardem_request_card_insert(struct cardem_inst *ci, bool inserted) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_cardinsert *cins; + + cins = (struct cardemu_usb_msg_cardinsert *) msgb_put(msg, sizeof(*cins)); + memset(cins, 0, sizeof(*cins)); + if (inserted) + cins->card_insert = 1; + + return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_CARDINSERT); +} + +/*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Rx */ +int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t le) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_tx_data *txd; + txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); + + printf("<= %s(%02x, %d)\n", __func__, pb, le); + + memset(txd, 0, sizeof(*txd)); + txd->data_len = 1; + txd->flags = CEMU_DATA_F_PB_AND_RX; + /* one data byte */ + msgb_put_u8(msg, pb); + + return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); +} + +/*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Tx */ +int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, + const uint8_t *data, uint16_t data_len_in) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_tx_data *txd; + uint8_t *cur; + + txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); + + printf("<= %s(%02x, %s, %d)\n", __func__, pb, + osmo_hexdump(data, data_len_in), data_len_in); + + memset(txd, 0, sizeof(*txd)); + txd->data_len = 1 + data_len_in; + txd->flags = CEMU_DATA_F_PB_AND_TX; + /* procedure byte */ + msgb_put_u8(msg, pb); + /* data */ + cur = msgb_put(msg, data_len_in); + memcpy(cur, data, data_len_in); + + return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); +} + +/*! \brief Request the SIMtrace2 to send a Status Word */ +int cardem_request_sw_tx(struct cardem_inst *ci, const uint8_t *sw) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_tx_data *txd; + uint8_t *cur; + + txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); + + printf("<= %s(%02x %02x)\n", __func__, sw[0], sw[1]); + + memset(txd, 0, sizeof(*txd)); + txd->data_len = 2; + txd->flags = CEMU_DATA_F_PB_AND_TX | CEMU_DATA_F_FINAL; + cur = msgb_put(msg, 2); + cur[0] = sw[0]; + cur[1] = sw[1]; + + return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); +} + +int cardem_request_set_atr(struct cardem_inst *ci, const uint8_t *atr, unsigned int atr_len) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_set_atr *satr; + uint8_t *cur; + + satr = (struct cardemu_usb_msg_set_atr *) msgb_put(msg, sizeof(*satr)); + + printf("<= %s(%s)\n", __func__, osmo_hexdump(atr, atr_len)); + + memset(satr, 0, sizeof(*satr)); + satr->atr_len = atr_len; + cur = msgb_put(msg, atr_len); + memcpy(cur, atr, atr_len); + + return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); +} + +/*********************************************************************** + * Modem Control protocol + ***********************************************************************/ + +static int _modem_reset(struct st_slot *slot, uint8_t asserted, uint16_t pulse_ms) +{ + struct msgb *msg = st_msgb_alloc(); + struct st_modem_reset *sr ; + + sr = (struct st_modem_reset *) msgb_put(msg, sizeof(*sr)); + sr->asserted = asserted; + sr->pulse_duration_msec = pulse_ms; + + return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_RESET); +} + +/*! \brief pulse the RESET line of the modem for \a duration_ms milli-seconds*/ +int st_modem_reset_pulse(struct st_slot *slot, uint16_t duration_ms) +{ + return _modem_reset(slot, 2, duration_ms); +} + +/*! \brief assert the RESET line of the modem */ +int st_modem_reset_active(struct st_slot *slot) +{ + return _modem_reset(slot, 1, 0); +} + +/*! \brief de-assert the RESET line of the modem */ +int st_modem_reset_inactive(struct st_slot *slot) +{ + return _modem_reset(slot, 0, 0); +} + +static int _modem_sim_select(struct st_slot *slot, uint8_t remote_sim) +{ + struct msgb *msg = st_msgb_alloc(); + struct st_modem_sim_select *ss; + + ss = (struct st_modem_sim_select *) msgb_put(msg, sizeof(*ss)); + ss->remote_sim = remote_sim; + + return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_SIM_SELECT); +} + +/*! \brief select local (physical) SIM for given slot */ +int st_modem_sim_select_local(struct st_slot *slot) +{ + return _modem_sim_select(slot, 0); +} + +/*! \brief select remote (emulated/forwarded) SIM for given slot */ +int st_modem_sim_select_remote(struct st_slot *slot) +{ + return _modem_sim_select(slot, 1); +} + +/*! \brief Request slot to send us status information about the modem */ +int st_modem_get_status(struct st_slot *slot) +{ + struct msgb *msg = st_msgb_alloc(); + + return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_BD_MODEM_STATUS); +} diff --git a/host/libosmo-simtrace2.pc.in b/host/libosmo-simtrace2.pc.in new file mode 100644 index 0000000..6e9f6f2 --- /dev/null +++ b/host/libosmo-simtrace2.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Osmocom SIMtrace2 library +Description: Library for SIM Card / Smart Card tracing + emulation +Version: @VERSION@ +Libs: -L${libdir} -losmo-simtrace2 +Cflags: -I${includedir}/ diff --git a/host/simtrace.h b/host/simtrace.h deleted file mode 100644 index c4a20da..0000000 --- a/host/simtrace.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _SIMTRACE_H -#define _SIMTRACE_H - -#define SIMTRACE_USB_VENDOR 0x1d50 -#define SIMTRACE_USB_PRODUCT 0x60e3 - -#endif diff --git a/host/simtrace2-remsim.c b/host/simtrace2-remsim.c deleted file mode 100644 index 918c9fd..0000000 --- a/host/simtrace2-remsim.c +++ /dev/null @@ -1,758 +0,0 @@ -/* simtrace2-remsim - main program for the host PC to provide a remote SIM - * using the SIMtrace 2 firmware in card emulation mode - * - * (C) 2016-2017 by Harald Welte - * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon - * - * This program is free software; you can redistribute it and/or - * modify 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 -#include -#include -#define _GNU_SOURCE -#include - -#include -#include -#include -#include -#include - -#include - -#include "libusb_util.h" -#include "simtrace.h" -#include "simtrace_prot.h" -#include "apdu_dispatch.h" -#include "simtrace2-discovery.h" - -#include -#include -#include -#include -#include -#include -#include - -/* transport to a SIMtrace device */ -struct st_transport { - /* USB */ - struct libusb_device_handle *usb_devh; - struct { - uint8_t in; - uint8_t out; - uint8_t irq_in; - } usb_ep; - - /* UDP */ - int udp_fd; -}; - -/* a SIMtrace slot; communicates over a transport */ -struct st_slot { - /* transport through which the slot can be reached */ - struct st_transport *transp; - /* number of the slot within the transport */ - uint8_t slot_nr; -}; - -/* One istance of card emulation */ -struct cardem_inst { - /* slot on which this card emulation instance runs */ - struct st_slot *slot; - /* libosmosim SIM card profile */ - const struct osim_cla_ins_card_profile *card_prof; - /* libosmosim SIM card channel */ - struct osim_chan_hdl *chan; -}; - -/* global GSMTAP instance */ -static struct gsmtap_inst *g_gti; - -static int gsmtap_send_sim(const uint8_t *apdu, unsigned int len) -{ - struct gsmtap_hdr *gh; - unsigned int gross_len = len + sizeof(*gh); - uint8_t *buf = malloc(gross_len); - int rc; - - if (!buf) - return -ENOMEM; - - memset(buf, 0, sizeof(*gh)); - gh = (struct gsmtap_hdr *) buf; - gh->version = GSMTAP_VERSION; - gh->hdr_len = sizeof(*gh)/4; - gh->type = GSMTAP_TYPE_SIM; - - memcpy(buf + sizeof(*gh), apdu, len); - - rc = write(gsmtap_inst_fd(g_gti), buf, gross_len); - if (rc < 0) { - perror("write gsmtap"); - free(buf); - return rc; - } - - free(buf); - return 0; -} - -/*********************************************************************** - * SIMTRACE pcore protocol - ***********************************************************************/ - -/*! \brief allocate a message buffer for simtrace use */ -static struct msgb *st_msgb_alloc(void) -{ - return msgb_alloc_headroom(1024+32, 32, "SIMtrace"); -} - -#if 0 -static void apdu_out_cb(uint8_t *buf, unsigned int len, void *user_data) -{ - printf("APDU: %s\n", osmo_hexdump(buf, len)); - gsmtap_send_sim(buf, len); -} -#endif - -/*! \brief Transmit a given command to the SIMtrace2 device */ -int st_transp_tx_msg(struct st_transport *transp, struct msgb *msg) -{ - int rc; - - printf("<- %s\n", msgb_hexdump(msg)); - - if (transp->udp_fd < 0) { - int xfer_len; - - rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.out, - msgb_data(msg), msgb_length(msg), - &xfer_len, 100000); - } else { - rc = write(transp->udp_fd, msgb_data(msg), msgb_length(msg)); - } - - msgb_free(msg); - return rc; -} - -static struct simtrace_msg_hdr *st_push_hdr(struct msgb *msg, uint8_t msg_class, uint8_t msg_type, - uint8_t slot_nr) -{ - struct simtrace_msg_hdr *sh; - - sh = (struct simtrace_msg_hdr *) msgb_push(msg, sizeof(*sh)); - memset(sh, 0, sizeof(*sh)); - sh->msg_class = msg_class; - sh->msg_type = msg_type; - sh->slot_nr = slot_nr; - sh->msg_len = msgb_length(msg); - - return sh; -} - -/* transmit a given message to a specified slot. Expects all headers - * present before calling the function */ -int st_slot_tx_msg(struct st_slot *slot, struct msgb *msg, - uint8_t msg_class, uint8_t msg_type) -{ - st_push_hdr(msg, msg_class, msg_type, slot->slot_nr); - - return st_transp_tx_msg(slot->transp, msg); -} - -/*********************************************************************** - * Card Emulation protocol - ***********************************************************************/ - - -/*! \brief Request the SIMtrace2 to generate a card-insert signal */ -static int cardem_request_card_insert(struct cardem_inst *ci, bool inserted) -{ - struct msgb *msg = st_msgb_alloc(); - struct cardemu_usb_msg_cardinsert *cins; - - cins = (struct cardemu_usb_msg_cardinsert *) msgb_put(msg, sizeof(*cins)); - memset(cins, 0, sizeof(*cins)); - if (inserted) - cins->card_insert = 1; - - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_CARDINSERT); -} - -/*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Rx */ -static int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t le) -{ - struct msgb *msg = st_msgb_alloc(); - struct cardemu_usb_msg_tx_data *txd; - txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); - - printf("<= %s(%02x, %d)\n", __func__, pb, le); - - memset(txd, 0, sizeof(*txd)); - txd->data_len = 1; - txd->flags = CEMU_DATA_F_PB_AND_RX; - /* one data byte */ - msgb_put_u8(msg, pb); - - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); -} - -/*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Tx */ -static int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, - const uint8_t *data, uint16_t data_len_in) -{ - struct msgb *msg = st_msgb_alloc(); - struct cardemu_usb_msg_tx_data *txd; - uint8_t *cur; - - txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); - - printf("<= %s(%02x, %s, %d)\n", __func__, pb, - osmo_hexdump(data, data_len_in), data_len_in); - - memset(txd, 0, sizeof(*txd)); - txd->data_len = 1 + data_len_in; - txd->flags = CEMU_DATA_F_PB_AND_TX; - /* procedure byte */ - msgb_put_u8(msg, pb); - /* data */ - cur = msgb_put(msg, data_len_in); - memcpy(cur, data, data_len_in); - - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); -} - -/*! \brief Request the SIMtrace2 to send a Status Word */ -static int cardem_request_sw_tx(struct cardem_inst *ci, const uint8_t *sw) -{ - struct msgb *msg = st_msgb_alloc(); - struct cardemu_usb_msg_tx_data *txd; - uint8_t *cur; - - txd = (struct cardemu_usb_msg_tx_data *) msgb_put(msg, sizeof(*txd)); - - printf("<= %s(%02x %02x)\n", __func__, sw[0], sw[1]); - - memset(txd, 0, sizeof(*txd)); - txd->data_len = 2; - txd->flags = CEMU_DATA_F_PB_AND_TX | CEMU_DATA_F_FINAL; - cur = msgb_put(msg, 2); - cur[0] = sw[0]; - cur[1] = sw[1]; - - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); -} - -static void atr_update_csum(uint8_t *atr, unsigned int atr_len) -{ - uint8_t csum = 0; - int i; - - for (i = 1; i < atr_len - 1; i++) - csum = csum ^ atr[i]; - - atr[atr_len-1] = csum; -} - -static int cardem_request_set_atr(struct cardem_inst *ci, const uint8_t *atr, unsigned int atr_len) -{ - struct msgb *msg = st_msgb_alloc(); - struct cardemu_usb_msg_set_atr *satr; - uint8_t *cur; - - satr = (struct cardemu_usb_msg_set_atr *) msgb_put(msg, sizeof(*satr)); - - printf("<= %s(%s)\n", __func__, osmo_hexdump(atr, atr_len)); - - memset(satr, 0, sizeof(*satr)); - satr->atr_len = atr_len; - cur = msgb_put(msg, atr_len); - memcpy(cur, atr, atr_len); - - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); -} - -/*********************************************************************** - * Modem Control protocol - ***********************************************************************/ - -static int _modem_reset(struct st_slot *slot, uint8_t asserted, uint16_t pulse_ms) -{ - struct msgb *msg = st_msgb_alloc(); - struct st_modem_reset *sr ; - - sr = (struct st_modem_reset *) msgb_put(msg, sizeof(*sr)); - sr->asserted = asserted; - sr->pulse_duration_msec = pulse_ms; - - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_RESET); -} - -/*! \brief pulse the RESET line of the modem for \a duration_ms milli-seconds*/ -int st_modem_reset_pulse(struct st_slot *slot, uint16_t duration_ms) -{ - return _modem_reset(slot, 2, duration_ms); -} - -/*! \brief assert the RESET line of the modem */ -int st_modem_reset_active(struct st_slot *slot) -{ - return _modem_reset(slot, 1, 0); -} - -/*! \brief de-assert the RESET line of the modem */ -int st_modem_reset_inactive(struct st_slot *slot) -{ - return _modem_reset(slot, 0, 0); -} - -static int _modem_sim_select(struct st_slot *slot, uint8_t remote_sim) -{ - struct msgb *msg = st_msgb_alloc(); - struct st_modem_sim_select *ss; - - ss = (struct st_modem_sim_select *) msgb_put(msg, sizeof(*ss)); - ss->remote_sim = remote_sim; - - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_SIM_SELECT); -} - -/*! \brief select local (physical) SIM for given slot */ -int st_modem_sim_select_local(struct st_slot *slot) -{ - return _modem_sim_select(slot, 0); -} - -/*! \brief select remote (emulated/forwarded) SIM for given slot */ -int st_modem_sim_select_remote(struct st_slot *slot) -{ - return _modem_sim_select(slot, 1); -} - -/*! \brief Request slot to send us status information about the modem */ -int st_modem_get_status(struct st_slot *slot) -{ - struct msgb *msg = st_msgb_alloc(); - - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_BD_MODEM_STATUS); -} - - -/*********************************************************************** - * Incoming Messages - ***********************************************************************/ - -/*! \brief Process a STATUS message from the SIMtrace2 */ -static int process_do_status(struct cardem_inst *ci, uint8_t *buf, int len) -{ - struct cardemu_usb_msg_status *status; - status = (struct cardemu_usb_msg_status *) buf; - - printf("=> STATUS: flags=0x%x, fi=%u, di=%u, wi=%u wtime=%u\n", - status->flags, status->fi, status->di, status->wi, - status->waiting_time); - - return 0; -} - -/*! \brief Process a PTS indication message from the SIMtrace2 */ -static int process_do_pts(struct cardem_inst *ci, uint8_t *buf, int len) -{ - struct cardemu_usb_msg_pts_info *pts; - pts = (struct cardemu_usb_msg_pts_info *) buf; - - printf("=> PTS req: %s\n", osmo_hexdump(pts->req, sizeof(pts->req))); - - return 0; -} - -/*! \brief Process a RX-DATA indication message from the SIMtrace2 */ -static int process_do_rx_da(struct cardem_inst *ci, uint8_t *buf, int len) -{ - static struct apdu_context ac; - struct cardemu_usb_msg_rx_data *data; - int rc; - - data = (struct cardemu_usb_msg_rx_data *) buf; - - printf("=> DATA: flags=%x, %s: ", data->flags, - osmo_hexdump(data->data, data->data_len)); - - rc = apdu_segment_in(&ac, data->data, data->data_len, - data->flags & CEMU_DATA_F_TPDU_HDR); - - if (rc & APDU_ACT_TX_CAPDU_TO_CARD) { - struct msgb *tmsg = msgb_alloc(1024, "TPDU"); - struct osim_reader_hdl *rh = ci->chan->card->reader; - uint8_t *cur; - - /* Copy TPDU header */ - cur = msgb_put(tmsg, sizeof(ac.hdr)); - memcpy(cur, &ac.hdr, sizeof(ac.hdr)); - /* Copy D(c), if any */ - if (ac.lc.tot) { - cur = msgb_put(tmsg, ac.lc.tot); - memcpy(cur, ac.dc, ac.lc.tot); - } - /* send to actual card */ - tmsg->l3h = tmsg->tail; - rc = rh->ops->transceive(rh, tmsg); - if (rc < 0) { - fprintf(stderr, "error during transceive: %d\n", rc); - msgb_free(tmsg); - return rc; - } - msgb_apdu_sw(tmsg) = msgb_get_u16(tmsg); - ac.sw[0] = msgb_apdu_sw(tmsg) >> 8; - ac.sw[1] = msgb_apdu_sw(tmsg) & 0xff; - printf("SW=0x%04x, len_rx=%d\n", msgb_apdu_sw(tmsg), msgb_l3len(tmsg)); - if (msgb_l3len(tmsg)) - cardem_request_pb_and_tx(ci, ac.hdr.ins, tmsg->l3h, msgb_l3len(tmsg)); - cardem_request_sw_tx(ci, ac.sw); - } else if (ac.lc.tot > ac.lc.cur) { - cardem_request_pb_and_rx(ci, ac.hdr.ins, ac.lc.tot - ac.lc.cur); - } - return 0; -} - -/*! \brief Process an incoming message from the SIMtrace2 */ -static int process_usb_msg(struct cardem_inst *ci, uint8_t *buf, int len) -{ - struct simtrace_msg_hdr *sh = (struct simtrace_msg_hdr *)buf; - int rc; - - printf("-> %s\n", osmo_hexdump(buf, len)); - - buf += sizeof(*sh); - - switch (sh->msg_type) { - case SIMTRACE_MSGT_BD_CEMU_STATUS: - rc = process_do_status(ci, buf, len); - break; - case SIMTRACE_MSGT_DO_CEMU_PTS: - rc = process_do_pts(ci, buf, len); - break; - case SIMTRACE_MSGT_DO_CEMU_RX_DATA: - rc = process_do_rx_da(ci, buf, len); - break; - default: - printf("unknown simtrace msg type 0x%02x\n", sh->msg_type); - rc = -1; - break; - } - - return rc; -} - -static void print_welcome(void) -{ - printf("simtrace2-remsim - Remote SIM card forwarding\n" - "(C) 2010-2017, Harald Welte \n" - "(C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon \n\n"); -} - -static void print_help(void) -{ - printf( "\t-r\t--remote-udp-host HOST\n" - "\t-p\t--remote-udp-port PORT\n" - "\t-h\t--help\n" - "\t-i\t--gsmtap-ip\tA.B.C.D\n" - "\t-a\t--skip-atr\n" - "\t-k\t--keep-running\n" - "\t-V\t--usb-vendor\tVENDOR_ID\n" - "\t-P\t--usb-product\tPRODUCT_ID\n" - "\t-C\t--usb-config\tCONFIG_ID\n" - "\t-I\t--usb-interface\tINTERFACE_ID\n" - "\t-S\t--usb-altsetting ALTSETTING_ID\n" - "\t-A\t--usb-address\tADDRESS\n" - "\t-H\t--usb-path\tPATH\n" - "\n" - ); -} - -static const struct option opts[] = { - { "remote-udp-host", 1, 0, 'r' }, - { "remote-udp-port", 1, 0, 'p' }, - { "gsmtap-ip", 1, 0, 'i' }, - { "skip-atr", 0, 0, 'a' }, - { "help", 0, 0, 'h' }, - { "keep-running", 0, 0, 'k' }, - { "usb-vendor", 1, 0, 'V' }, - { "usb-product", 1, 0, 'P' }, - { "usb-config", 1, 0, 'C' }, - { "usb-interface", 1, 0, 'I' }, - { "usb-altsetting", 1, 0, 'S' }, - { "usb-address", 1, 0, 'A' }, - { "usb-path", 1, 0, 'H' }, - { NULL, 0, 0, 0 } -}; - -static void run_mainloop(struct cardem_inst *ci) -{ - struct st_transport *transp = ci->slot->transp; - unsigned int msg_count, byte_count = 0; - uint8_t buf[16*265]; - int xfer_len; - int rc; - - printf("Entering main loop\n"); - - while (1) { - /* read data from SIMtrace2 device (local or via USB) */ - if (transp->udp_fd < 0) { - rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.in, - buf, sizeof(buf), &xfer_len, 100); - if (rc < 0 && rc != LIBUSB_ERROR_TIMEOUT && - rc != LIBUSB_ERROR_INTERRUPTED && - rc != LIBUSB_ERROR_IO) { - fprintf(stderr, "BULK IN transfer error; rc=%d\n", rc); - return; - } - } else { - rc = read(transp->udp_fd, buf, sizeof(buf)); - if (rc <= 0) { - fprintf(stderr, "shor read from UDP\n"); - return; - } - xfer_len = rc; - } - /* dispatch any incoming data */ - if (xfer_len > 0) { - printf("URB: %s\n", osmo_hexdump(buf, xfer_len)); - process_usb_msg(ci, buf, xfer_len); - msg_count++; - byte_count += xfer_len; - } - } -} - -static struct st_transport _transp; - -static struct st_slot _slot = { - .transp = &_transp, - .slot_nr = 0, -}; - -struct cardem_inst _ci = { - .slot = &_slot, -}; - -struct cardem_inst *ci = &_ci; - -static void signal_handler(int signal) -{ - switch (signal) { - case SIGINT: - cardem_request_card_insert(ci, false); - exit(0); - break; - default: - break; - } -} - -int main(int argc, char **argv) -{ - struct st_transport *transp = ci->slot->transp; - char *gsmtap_host = "127.0.0.1"; - int rc; - int c, ret = 1; - int skip_atr = 0; - int keep_running = 0; - int remote_udp_port = 52342; - int if_num = 0, vendor_id = -1, product_id = -1; - int config_id = -1, altsetting = 0, addr = -1; - char *remote_udp_host = NULL; - char *path = NULL; - struct osim_reader_hdl *reader; - struct osim_card_hdl *card; - - print_welcome(); - - while (1) { - int option_index = 0; - - c = getopt_long(argc, argv, "r:p:hi:V:P:C:I:S:A:H:ak", opts, &option_index); - if (c == -1) - break; - switch (c) { - case 'r': - remote_udp_host = optarg; - break; - case 'p': - remote_udp_port = atoi(optarg); - break; - case 'h': - print_help(); - exit(0); - break; - case 'i': - gsmtap_host = optarg; - break; - case 'a': - skip_atr = 1; - break; - case 'k': - keep_running = 1; - break; - case 'V': - vendor_id = strtol(optarg, NULL, 16); - break; - case 'P': - product_id = strtol(optarg, NULL, 16); - break; - case 'C': - config_id = atoi(optarg); - break; - case 'I': - if_num = atoi(optarg); - break; - case 'S': - altsetting = atoi(optarg); - break; - case 'A': - addr = atoi(optarg); - break; - case 'H': - path = optarg; - break; - } - } - - if (!remote_udp_host && (vendor_id < 0 || product_id < 0)) { - fprintf(stderr, "You have to specify the vendor and product ID\n"); - goto do_exit; - } - - transp->udp_fd = -1; - - ci->card_prof = &osim_uicc_sim_cic_profile; - - if (!remote_udp_host) { - rc = libusb_init(NULL); - if (rc < 0) { - fprintf(stderr, "libusb initialization failed\n"); - goto do_exit; - } - } else { - transp->udp_fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, - remote_udp_host, remote_udp_port+if_num, - OSMO_SOCK_F_CONNECT); - if (transp->udp_fd < 0) { - fprintf(stderr, "error binding UDP port\n"); - goto do_exit; - } - } - - g_gti = gsmtap_source_init(gsmtap_host, GSMTAP_UDP_PORT, 0); - if (!g_gti) { - perror("unable to open GSMTAP"); - goto close_exit; - } - gsmtap_source_add_sink(g_gti); - - reader = osim_reader_open(OSIM_READER_DRV_PCSC, 0, "", NULL); - if (!reader) { - perror("unable to open PC/SC reader"); - goto close_exit; - } - - card = osim_card_open(reader, OSIM_PROTO_T0); - if (!card) { - perror("unable to open SIM card"); - goto close_exit; - } - - ci->chan = llist_entry(card->channels.next, struct osim_chan_hdl, list); - if (!ci->chan) { - perror("SIM card has no channel?!?"); - goto close_exit; - } - - signal(SIGINT, &signal_handler); - - do { - if (transp->udp_fd < 0) { - struct usb_interface_match _ifm, *ifm = &_ifm; - ifm->vendor = vendor_id; - ifm->product = product_id; - ifm->configuration = config_id; - ifm->interface = if_num; - ifm->altsetting = altsetting; - ifm->addr = addr; - if (path) - osmo_strlcpy(ifm->path, path, sizeof(ifm->path)); - transp->usb_devh = usb_open_claim_interface(NULL, ifm); - if (!transp->usb_devh) { - fprintf(stderr, "can't open USB device\n"); - goto close_exit; - } - - rc = libusb_claim_interface(transp->usb_devh, if_num); - if (rc < 0) { - fprintf(stderr, "can't claim interface %d; rc=%d\n", if_num, rc); - goto close_exit; - } - - rc = get_usb_ep_addrs(transp->usb_devh, if_num, &transp->usb_ep.out, - &transp->usb_ep.in, &transp->usb_ep.irq_in); - if (rc < 0) { - fprintf(stderr, "can't obtain EP addrs; rc=%d\n", rc); - goto close_exit; - } - } - - /* simulate card-insert to modem (owhw, not qmod) */ - cardem_request_card_insert(ci, true); - - /* select remote (forwarded) SIM */ - st_modem_sim_select_remote(ci->slot); - - if (!skip_atr) { - /* set the ATR */ - uint8_t real_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, - 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, - 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 }; - atr_update_csum(real_atr, sizeof(real_atr)); - cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); - } - - /* select remote (forwarded) SIM */ - st_modem_reset_pulse(ci->slot, 300); - - run_mainloop(ci); - ret = 0; - - if (transp->udp_fd < 0) - libusb_release_interface(transp->usb_devh, 0); -close_exit: - if (transp->usb_devh) - libusb_close(transp->usb_devh); - if (keep_running) - sleep(1); - } while (keep_running); - - if (transp->udp_fd < 0) - libusb_exit(NULL); -do_exit: - return ret; -} diff --git a/host/simtrace_prot.h b/host/simtrace_prot.h deleted file mode 120000 index a9fffe1..0000000 --- a/host/simtrace_prot.h +++ /dev/null @@ -1 +0,0 @@ -../firmware/libcommon/include/simtrace_prot.h \ No newline at end of file diff --git a/host/simtrace_usb.h b/host/simtrace_usb.h deleted file mode 120000 index f1e0982..0000000 --- a/host/simtrace_usb.h +++ /dev/null @@ -1 +0,0 @@ -../firmware/libcommon/include/simtrace_usb.h \ No newline at end of file diff --git a/host/src/Makefile.am b/host/src/Makefile.am new file mode 100644 index 0000000..b0f1f91 --- /dev/null +++ b/host/src/Makefile.am @@ -0,0 +1,18 @@ +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include +AM_CFLAGS=-Wall -g $(LIBOSMOCORE_CFLAGS) $(LIBOSMOSIM_CFLAGS) $(LIBUSB_CFLAGS) $(COVERAGE_FLAGS) +AM_LDFLAGS=$(COVERAGE_LDFLAGS) + +LDADD= $(top_builddir)/lib/libosmo-simtrace2.la \ + $(LIBOSMOCORE_LIBS) $(LIBOSMOSIM_LIBS) $(LIBUSB_LIBS) + +noinst_HEADERS = simtrace2-discovery.h + +bin_PROGRAMS = simtrace2-remsim simtrace2-remsim-usb2udp simtrace2-list simtrace2-sniff + +simtrace2_remsim_SOURCES = simtrace2-remsim.c simtrace2-discovery.c + +simtrace2_remsim_usb2udp_SOURCES = usb2udp.c simtrace2-discovery.c + +simtrace2_list_SOURCES = simtrace2_usb.c + +simtrace2_sniff_SOURCES = simtrace2-sniff.c simtrace2-discovery.c diff --git a/host/simtrace2-discovery.c b/host/src/simtrace2-discovery.c similarity index 100% rename from host/simtrace2-discovery.c rename to host/src/simtrace2-discovery.c diff --git a/host/simtrace2-discovery.h b/host/src/simtrace2-discovery.h similarity index 100% rename from host/simtrace2-discovery.h rename to host/src/simtrace2-discovery.h diff --git a/host/src/simtrace2-remsim.c b/host/src/simtrace2-remsim.c new file mode 100644 index 0000000..c76e587 --- /dev/null +++ b/host/src/simtrace2-remsim.c @@ -0,0 +1,463 @@ +/* simtrace2-remsim - main program for the host PC to provide a remote SIM + * using the SIMtrace 2 firmware in card emulation mode + * + * (C) 2016-2017 by Harald Welte + * (C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * This program is free software; you can redistribute it and/or + * modify 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 +#include +#include +#define _GNU_SOURCE +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include "simtrace2-discovery.h" + +#include +#include +#include +#include +#include + +static void atr_update_csum(uint8_t *atr, unsigned int atr_len) +{ + uint8_t csum = 0; + int i; + + for (i = 1; i < atr_len - 1; i++) + csum = csum ^ atr[i]; + + atr[atr_len-1] = csum; +} + +/*********************************************************************** + * Incoming Messages + ***********************************************************************/ + +/*! \brief Process a STATUS message from the SIMtrace2 */ +static int process_do_status(struct cardem_inst *ci, uint8_t *buf, int len) +{ + struct cardemu_usb_msg_status *status; + status = (struct cardemu_usb_msg_status *) buf; + + printf("=> STATUS: flags=0x%x, fi=%u, di=%u, wi=%u wtime=%u\n", + status->flags, status->fi, status->di, status->wi, + status->waiting_time); + + return 0; +} + +/*! \brief Process a PTS indication message from the SIMtrace2 */ +static int process_do_pts(struct cardem_inst *ci, uint8_t *buf, int len) +{ + struct cardemu_usb_msg_pts_info *pts; + pts = (struct cardemu_usb_msg_pts_info *) buf; + + printf("=> PTS req: %s\n", osmo_hexdump(pts->req, sizeof(pts->req))); + + return 0; +} + +/*! \brief Process a RX-DATA indication message from the SIMtrace2 */ +static int process_do_rx_da(struct cardem_inst *ci, uint8_t *buf, int len) +{ + static struct apdu_context ac; + struct cardemu_usb_msg_rx_data *data; + int rc; + + data = (struct cardemu_usb_msg_rx_data *) buf; + + printf("=> DATA: flags=%x, %s: ", data->flags, + osmo_hexdump(data->data, data->data_len)); + + rc = apdu_segment_in(&ac, data->data, data->data_len, + data->flags & CEMU_DATA_F_TPDU_HDR); + + if (rc & APDU_ACT_TX_CAPDU_TO_CARD) { + struct msgb *tmsg = msgb_alloc(1024, "TPDU"); + struct osim_reader_hdl *rh = ci->chan->card->reader; + uint8_t *cur; + + /* Copy TPDU header */ + cur = msgb_put(tmsg, sizeof(ac.hdr)); + memcpy(cur, &ac.hdr, sizeof(ac.hdr)); + /* Copy D(c), if any */ + if (ac.lc.tot) { + cur = msgb_put(tmsg, ac.lc.tot); + memcpy(cur, ac.dc, ac.lc.tot); + } + /* send to actual card */ + tmsg->l3h = tmsg->tail; + rc = rh->ops->transceive(rh, tmsg); + if (rc < 0) { + fprintf(stderr, "error during transceive: %d\n", rc); + msgb_free(tmsg); + return rc; + } + msgb_apdu_sw(tmsg) = msgb_get_u16(tmsg); + ac.sw[0] = msgb_apdu_sw(tmsg) >> 8; + ac.sw[1] = msgb_apdu_sw(tmsg) & 0xff; + printf("SW=0x%04x, len_rx=%d\n", msgb_apdu_sw(tmsg), msgb_l3len(tmsg)); + if (msgb_l3len(tmsg)) + cardem_request_pb_and_tx(ci, ac.hdr.ins, tmsg->l3h, msgb_l3len(tmsg)); + cardem_request_sw_tx(ci, ac.sw); + } else if (ac.lc.tot > ac.lc.cur) { + cardem_request_pb_and_rx(ci, ac.hdr.ins, ac.lc.tot - ac.lc.cur); + } + return 0; +} + +/*! \brief Process an incoming message from the SIMtrace2 */ +static int process_usb_msg(struct cardem_inst *ci, uint8_t *buf, int len) +{ + struct simtrace_msg_hdr *sh = (struct simtrace_msg_hdr *)buf; + int rc; + + printf("-> %s\n", osmo_hexdump(buf, len)); + + buf += sizeof(*sh); + + switch (sh->msg_type) { + case SIMTRACE_MSGT_BD_CEMU_STATUS: + rc = process_do_status(ci, buf, len); + break; + case SIMTRACE_MSGT_DO_CEMU_PTS: + rc = process_do_pts(ci, buf, len); + break; + case SIMTRACE_MSGT_DO_CEMU_RX_DATA: + rc = process_do_rx_da(ci, buf, len); + break; + default: + printf("unknown simtrace msg type 0x%02x\n", sh->msg_type); + rc = -1; + break; + } + + return rc; +} + +static void print_welcome(void) +{ + printf("simtrace2-remsim - Remote SIM card forwarding\n" + "(C) 2010-2017, Harald Welte \n" + "(C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon \n\n"); +} + +static void print_help(void) +{ + printf( "\t-r\t--remote-udp-host HOST\n" + "\t-p\t--remote-udp-port PORT\n" + "\t-h\t--help\n" + "\t-i\t--gsmtap-ip\tA.B.C.D\n" + "\t-a\t--skip-atr\n" + "\t-k\t--keep-running\n" + "\t-V\t--usb-vendor\tVENDOR_ID\n" + "\t-P\t--usb-product\tPRODUCT_ID\n" + "\t-C\t--usb-config\tCONFIG_ID\n" + "\t-I\t--usb-interface\tINTERFACE_ID\n" + "\t-S\t--usb-altsetting ALTSETTING_ID\n" + "\t-A\t--usb-address\tADDRESS\n" + "\t-H\t--usb-path\tPATH\n" + "\n" + ); +} + +static const struct option opts[] = { + { "remote-udp-host", 1, 0, 'r' }, + { "remote-udp-port", 1, 0, 'p' }, + { "gsmtap-ip", 1, 0, 'i' }, + { "skip-atr", 0, 0, 'a' }, + { "help", 0, 0, 'h' }, + { "keep-running", 0, 0, 'k' }, + { "usb-vendor", 1, 0, 'V' }, + { "usb-product", 1, 0, 'P' }, + { "usb-config", 1, 0, 'C' }, + { "usb-interface", 1, 0, 'I' }, + { "usb-altsetting", 1, 0, 'S' }, + { "usb-address", 1, 0, 'A' }, + { "usb-path", 1, 0, 'H' }, + { NULL, 0, 0, 0 } +}; + +static void run_mainloop(struct cardem_inst *ci) +{ + struct st_transport *transp = ci->slot->transp; + unsigned int msg_count, byte_count = 0; + uint8_t buf[16*265]; + int xfer_len; + int rc; + + printf("Entering main loop\n"); + + while (1) { + /* read data from SIMtrace2 device (local or via USB) */ + if (transp->udp_fd < 0) { + rc = libusb_bulk_transfer(transp->usb_devh, transp->usb_ep.in, + buf, sizeof(buf), &xfer_len, 100); + if (rc < 0 && rc != LIBUSB_ERROR_TIMEOUT && + rc != LIBUSB_ERROR_INTERRUPTED && + rc != LIBUSB_ERROR_IO) { + fprintf(stderr, "BULK IN transfer error; rc=%d\n", rc); + return; + } + } else { + rc = read(transp->udp_fd, buf, sizeof(buf)); + if (rc <= 0) { + fprintf(stderr, "shor read from UDP\n"); + return; + } + xfer_len = rc; + } + /* dispatch any incoming data */ + if (xfer_len > 0) { + printf("URB: %s\n", osmo_hexdump(buf, xfer_len)); + process_usb_msg(ci, buf, xfer_len); + msg_count++; + byte_count += xfer_len; + } + } +} + +static struct st_transport _transp; + +static struct st_slot _slot = { + .transp = &_transp, + .slot_nr = 0, +}; + +struct cardem_inst _ci = { + .slot = &_slot, +}; + +struct cardem_inst *ci = &_ci; + +static void signal_handler(int signal) +{ + switch (signal) { + case SIGINT: + cardem_request_card_insert(ci, false); + exit(0); + break; + default: + break; + } +} + +int main(int argc, char **argv) +{ + struct st_transport *transp = ci->slot->transp; + char *gsmtap_host = "127.0.0.1"; + int rc; + int c, ret = 1; + int skip_atr = 0; + int keep_running = 0; + int remote_udp_port = 52342; + int if_num = 0, vendor_id = -1, product_id = -1; + int config_id = -1, altsetting = 0, addr = -1; + char *remote_udp_host = NULL; + char *path = NULL; + struct osim_reader_hdl *reader; + struct osim_card_hdl *card; + + print_welcome(); + + while (1) { + int option_index = 0; + + c = getopt_long(argc, argv, "r:p:hi:V:P:C:I:S:A:H:ak", opts, &option_index); + if (c == -1) + break; + switch (c) { + case 'r': + remote_udp_host = optarg; + break; + case 'p': + remote_udp_port = atoi(optarg); + break; + case 'h': + print_help(); + exit(0); + break; + case 'i': + gsmtap_host = optarg; + break; + case 'a': + skip_atr = 1; + break; + case 'k': + keep_running = 1; + break; + case 'V': + vendor_id = strtol(optarg, NULL, 16); + break; + case 'P': + product_id = strtol(optarg, NULL, 16); + break; + case 'C': + config_id = atoi(optarg); + break; + case 'I': + if_num = atoi(optarg); + break; + case 'S': + altsetting = atoi(optarg); + break; + case 'A': + addr = atoi(optarg); + break; + case 'H': + path = optarg; + break; + } + } + + if (!remote_udp_host && (vendor_id < 0 || product_id < 0)) { + fprintf(stderr, "You have to specify the vendor and product ID\n"); + goto do_exit; + } + + transp->udp_fd = -1; + + ci->card_prof = &osim_uicc_sim_cic_profile; + + if (!remote_udp_host) { + rc = libusb_init(NULL); + if (rc < 0) { + fprintf(stderr, "libusb initialization failed\n"); + goto do_exit; + } + } else { + transp->udp_fd = osmo_sock_init(AF_INET, SOCK_DGRAM, IPPROTO_UDP, + remote_udp_host, remote_udp_port+if_num, + OSMO_SOCK_F_CONNECT); + if (transp->udp_fd < 0) { + fprintf(stderr, "error binding UDP port\n"); + goto do_exit; + } + } + + rc = osmo_st2_gsmtap_init(gsmtap_host); + if (rc < 0) { + perror("unable to open GSMTAP"); + goto close_exit; + } + + reader = osim_reader_open(OSIM_READER_DRV_PCSC, 0, "", NULL); + if (!reader) { + perror("unable to open PC/SC reader"); + goto close_exit; + } + + card = osim_card_open(reader, OSIM_PROTO_T0); + if (!card) { + perror("unable to open SIM card"); + goto close_exit; + } + + ci->chan = llist_entry(card->channels.next, struct osim_chan_hdl, list); + if (!ci->chan) { + perror("SIM card has no channel?!?"); + goto close_exit; + } + + signal(SIGINT, &signal_handler); + + do { + if (transp->udp_fd < 0) { + struct usb_interface_match _ifm, *ifm = &_ifm; + ifm->vendor = vendor_id; + ifm->product = product_id; + ifm->configuration = config_id; + ifm->interface = if_num; + ifm->altsetting = altsetting; + ifm->addr = addr; + if (path) + osmo_strlcpy(ifm->path, path, sizeof(ifm->path)); + transp->usb_devh = usb_open_claim_interface(NULL, ifm); + if (!transp->usb_devh) { + fprintf(stderr, "can't open USB device\n"); + goto close_exit; + } + + rc = libusb_claim_interface(transp->usb_devh, if_num); + if (rc < 0) { + fprintf(stderr, "can't claim interface %d; rc=%d\n", if_num, rc); + goto close_exit; + } + + rc = get_usb_ep_addrs(transp->usb_devh, if_num, &transp->usb_ep.out, + &transp->usb_ep.in, &transp->usb_ep.irq_in); + if (rc < 0) { + fprintf(stderr, "can't obtain EP addrs; rc=%d\n", rc); + goto close_exit; + } + } + + /* simulate card-insert to modem (owhw, not qmod) */ + cardem_request_card_insert(ci, true); + + /* select remote (forwarded) SIM */ + st_modem_sim_select_remote(ci->slot); + + if (!skip_atr) { + /* set the ATR */ + uint8_t real_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, + 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, + 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 }; + atr_update_csum(real_atr, sizeof(real_atr)); + cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); + } + + /* select remote (forwarded) SIM */ + st_modem_reset_pulse(ci->slot, 300); + + run_mainloop(ci); + ret = 0; + + if (transp->udp_fd < 0) + libusb_release_interface(transp->usb_devh, 0); +close_exit: + if (transp->usb_devh) + libusb_close(transp->usb_devh); + if (keep_running) + sleep(1); + } while (keep_running); + + if (transp->udp_fd < 0) + libusb_exit(NULL); +do_exit: + return ret; +} diff --git a/host/simtrace2-sniff.c b/host/src/simtrace2-sniff.c similarity index 88% rename from host/simtrace2-sniff.c rename to host/src/simtrace2-sniff.c index dddf5cf..f3c37dc 100644 --- a/host/simtrace2-sniff.c +++ b/host/src/simtrace2-sniff.c @@ -37,33 +37,19 @@ #include -#include "libusb_util.h" -#include "simtrace.h" -#include "simtrace_usb.h" -#include "simtrace_prot.h" +#include +#include +#include #include "simtrace2-discovery.h" -#include -#include +#include + #include #include #include #include #include -/* as of August 26, 2018 we don't have any released libosmocore version which includes those - * definitions yet. Let's ensure some backwards compatibility: */ -#ifndef GSMTAP_SIM_APDU -#define GSMTAP_SIM_APDU 0x00 /* APDU data (complete APDU) */ -#define GSMTAP_SIM_ATR 0x01 /* card ATR data */ -#define GSMTAP_SIM_PPS_REQ 0x02 /* PPS request data */ -#define GSMTAP_SIM_PPS_RSP 0x03 /* PPS response data */ -#define GSMTAP_SIM_TPDU_HDR 0x04 /* TPDU command header */ -#define GSMTAP_SIM_TPDU_CMD 0x05 /* TPDU command body */ -#define GSMTAP_SIM_TPDU_RSP 0x06 /* TPDU response body */ -#define GSMTAP_SIM_TPDU_SW 0x07 /* TPDU response trailer */ -#endif - /* transport to a SIMtrace device */ struct st_transport { /* USB */ @@ -75,39 +61,6 @@ } usb_ep; }; -/* global GSMTAP instance */ -static struct gsmtap_inst *g_gti; - -static int gsmtap_send_sim(uint8_t sub_type, const uint8_t *data, unsigned int len) -{ - struct gsmtap_hdr *gh; - unsigned int gross_len = len + sizeof(*gh); - uint8_t *buf = malloc(gross_len); - int rc; - - if (!buf) - return -ENOMEM; - - memset(buf, 0, sizeof(*gh)); - gh = (struct gsmtap_hdr *) buf; - gh->version = GSMTAP_VERSION; - gh->hdr_len = sizeof(*gh)/4; - gh->type = GSMTAP_TYPE_SIM; - gh->sub_type = sub_type; - - memcpy(buf + sizeof(*gh), data, len); - - rc = write(gsmtap_inst_fd(g_gti), buf, gross_len); - if (rc < 0) { - perror("write gsmtap"); - free(buf); - return rc; - } - - free(buf); - return 0; -} - const struct value_string change_flags[] = { { .value = SNIFF_CHANGE_FLAG_CARD_INSERT, @@ -252,11 +205,11 @@ /* Send message as GSNTAP */ switch (type) { case SIMTRACE_MSGT_SNIFF_ATR: - gsmtap_send_sim(GSMTAP_SIM_ATR, data->data, data->length); + osmo_st2_gsmtap_send_apdu(GSMTAP_SIM_ATR, data->data, data->length); break; case SIMTRACE_MSGT_SNIFF_TPDU: /* TPDU is now considered as APDU since SIMtrace sends complete TPDU */ - gsmtap_send_sim(GSMTAP_SIM_APDU, data->data, data->length); + osmo_st2_gsmtap_send_apdu(GSMTAP_SIM_APDU, data->data, data->length); break; default: break; @@ -542,12 +495,11 @@ } printf("(%s)\n", strbuf); - g_gti = gsmtap_source_init(gsmtap_host, GSMTAP_UDP_PORT, 0); - if (!g_gti) { + rc = osmo_st2_gsmtap_init(gsmtap_host); + if (rc < 0) { perror("unable to open GSMTAP"); goto close_exit; } - gsmtap_source_add_sink(g_gti); signal(SIGINT, &signal_handler); diff --git a/host/simtrace2_usb.c b/host/src/simtrace2_usb.c similarity index 96% rename from host/simtrace2_usb.c rename to host/src/simtrace2_usb.c index 1e3104a..d31ff29 100644 --- a/host/simtrace2_usb.c +++ b/host/src/simtrace2_usb.c @@ -23,8 +23,8 @@ #include -#include "libusb_util.h" -#include "simtrace_usb.h" +#include +#include static const struct dev_id compatible_dev_ids[] = { { USB_VENDOR_OPENMOKO, USB_PRODUCT_OWHW_SAM3 }, diff --git a/host/usb2udp.c b/host/src/usb2udp.c similarity index 98% rename from host/usb2udp.c rename to host/src/usb2udp.c index 97ffad0..9927594 100644 --- a/host/usb2udp.c +++ b/host/src/usb2udp.c @@ -35,9 +35,8 @@ #include -#include "simtrace_usb.h" -#include "simtrace_prot.h" -#include "apdu_dispatch.h" +#include +#include #include "simtrace2-discovery.h" #include -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I57e77f927ee9e169cc794c5dc6b128a2d590201b Gerrit-Change-Number: 16194 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Reviewer: tsaitgaist Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 08:58:18 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Tue, 26 Nov 2019 08:58:18 +0000 Subject: Change in simtrace2[master]: use osmo_st2_ or osmo_ prefix for [shared] library symbols In-Reply-To: References: Message-ID: tsaitgaist has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16195 ) Change subject: use osmo_st2_ or osmo_ prefix for [shared] library symbols ...................................................................... use osmo_st2_ or osmo_ prefix for [shared] library symbols Change-Id: Ie2686b30717b9541b1217802ca967cd0a4cbde9b --- M host/include/osmocom/simtrace2/apdu_dispatch.h M host/include/osmocom/simtrace2/simtrace2_api.h M host/lib/apdu_dispatch.c M host/lib/gsmtap.c M host/lib/simtrace2_api.c M host/src/simtrace2-remsim.c 6 files changed, 87 insertions(+), 75 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve tsaitgaist: Looks good to me, approved diff --git a/host/include/osmocom/simtrace2/apdu_dispatch.h b/host/include/osmocom/simtrace2/apdu_dispatch.h index 2c99858..af9c989 100644 --- a/host/include/osmocom/simtrace2/apdu_dispatch.h +++ b/host/include/osmocom/simtrace2/apdu_dispatch.h @@ -23,7 +23,7 @@ #include -struct apdu_context { +struct osmo_apdu_context { struct osim_apdu_cmd_hdr hdr; uint8_t dc[256]; uint8_t de[256]; @@ -39,11 +39,11 @@ } le; }; -enum apdu_action { +enum osmo_apdu_action { APDU_ACT_TX_CAPDU_TO_CARD = 0x0001, APDU_ACT_RX_MORE_CAPDU_FROM_READER = 0x0002, }; -int apdu_segment_in(struct apdu_context *ac, const uint8_t *apdu_buf, - unsigned int apdu_len, bool new_apdu); +int osmo_apdu_segment_in(struct osmo_apdu_context *ac, const uint8_t *apdu_buf, + unsigned int apdu_len, bool new_apdu); diff --git a/host/include/osmocom/simtrace2/simtrace2_api.h b/host/include/osmocom/simtrace2/simtrace2_api.h index 5a9f4a3..d31fb85 100644 --- a/host/include/osmocom/simtrace2/simtrace2_api.h +++ b/host/include/osmocom/simtrace2/simtrace2_api.h @@ -4,7 +4,7 @@ #include /* transport to a SIMtrace device */ -struct st_transport { +struct osmo_st2_transport { /* USB */ struct libusb_device_handle *usb_devh; struct { @@ -18,35 +18,41 @@ }; /* a SIMtrace slot; communicates over a transport */ -struct st_slot { +struct osmo_st2_slot { /* transport through which the slot can be reached */ - struct st_transport *transp; + struct osmo_st2_transport *transp; /* number of the slot within the transport */ uint8_t slot_nr; }; /* One istance of card emulation */ -struct cardem_inst { +struct osmo_st2_cardem_inst { /* slot on which this card emulation instance runs */ - struct st_slot *slot; + struct osmo_st2_slot *slot; /* libosmosim SIM card profile */ const struct osim_cla_ins_card_profile *card_prof; /* libosmosim SIM card channel */ struct osim_chan_hdl *chan; }; +int osmo_st2_transp_tx_msg(struct osmo_st2_transport *transp, struct msgb *msg); -int cardem_request_card_insert(struct cardem_inst *ci, bool inserted); -int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t le); -int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, - const uint8_t *data, uint16_t data_len_in); -int cardem_request_sw_tx(struct cardem_inst *ci, const uint8_t *sw); -int cardem_request_set_atr(struct cardem_inst *ci, const uint8_t *atr, unsigned int atr_len); +int osmo_st2_slot_tx_msg(struct osmo_st2_slot *slot, struct msgb *msg, + uint8_t msg_class, uint8_t msg_type); -int st_modem_reset_pulse(struct st_slot *slot, uint16_t duration_ms); -int st_modem_reset_active(struct st_slot *slot); -int st_modem_reset_inactive(struct st_slot *slot); -int st_modem_sim_select_local(struct st_slot *slot); -int st_modem_sim_select_remote(struct st_slot *slot); -int st_modem_get_status(struct st_slot *slot); +int osmo_st2_cardem_request_card_insert(struct osmo_st2_cardem_inst *ci, bool inserted); +int osmo_st2_cardem_request_pb_and_rx(struct osmo_st2_cardem_inst *ci, uint8_t pb, uint8_t le); +int osmo_st2_cardem_request_pb_and_tx(struct osmo_st2_cardem_inst *ci, uint8_t pb, + const uint8_t *data, uint16_t data_len_in); +int osmo_st2_cardem_request_sw_tx(struct osmo_st2_cardem_inst *ci, const uint8_t *sw); +int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8_t *atr, + unsigned int atr_len); + + +int osmo_st2_modem_reset_pulse(struct osmo_st2_slot *slot, uint16_t duration_ms); +int osmo_st2_modem_reset_active(struct osmo_st2_slot *slot); +int osmo_st2_modem_reset_inactive(struct osmo_st2_slot *slot); +int osmo_st2_modem_sim_select_local(struct osmo_st2_slot *slot); +int osmo_st2_modem_sim_select_remote(struct osmo_st2_slot *slot); +int osmo_st2_modem_get_status(struct osmo_st2_slot *slot); diff --git a/host/lib/apdu_dispatch.c b/host/lib/apdu_dispatch.c index ae892eb..62a75aa 100644 --- a/host/lib/apdu_dispatch.c +++ b/host/lib/apdu_dispatch.c @@ -30,13 +30,13 @@ #include /*! \brief Has the command-data phase been completed yet? */ -static inline bool is_dc_complete(struct apdu_context *ac) +static inline bool is_dc_complete(struct osmo_apdu_context *ac) { return (ac->lc.tot == ac->lc.cur); } /*! \brief Has the expected-data phase been completed yet? */ -static inline bool is_de_complete(struct apdu_context *ac) +static inline bool is_de_complete(struct osmo_apdu_context *ac) { return (ac->le.tot == ac->le.cur); } @@ -50,7 +50,7 @@ return buf; } -static void dump_apdu_ctx(const struct apdu_context *ac) +static void dump_apdu_ctx(const struct osmo_apdu_context *ac) { printf("%s; case=%d, lc=%d(%d), le=%d(%d)\n", dump_apdu_hdr(&ac->hdr), ac->apdu_case, @@ -71,8 +71,8 @@ * The function retunrs APDU_ACT_RX_MORE_CAPDU_FROM_READER when there * is more data to be received from the card reader (GSM Phone). */ -int apdu_segment_in(struct apdu_context *ac, const uint8_t *apdu_buf, - unsigned int apdu_len, bool new_apdu) +int osmo_apdu_segment_in(struct osmo_apdu_context *ac, const uint8_t *apdu_buf, + unsigned int apdu_len, bool new_apdu) { int rc = 0; diff --git a/host/lib/gsmtap.c b/host/lib/gsmtap.c index d5575e0..103f2fc 100644 --- a/host/lib/gsmtap.c +++ b/host/lib/gsmtap.c @@ -8,9 +8,10 @@ #include #include -/* global GSMTAP instance */ +/*! global GSMTAP instance */ static struct gsmtap_inst *g_gti; +/*! initialize the global GSMTAP instance for SIM traces */ int osmo_st2_gsmtap_init(const char *gsmtap_host) { if (g_gti) @@ -26,6 +27,11 @@ return 0; } +/*! log one APDU via the global GSMTAP instance. + * \param[in] sub_type GSMTAP sub-type (GSMTAP_SIM_* constant) + * \param[in] apdu User-provided buffer with APDU to log + * \param[in] len Length of apdu in bytes + */ int osmo_st2_gsmtap_send_apdu(uint8_t sub_type, const uint8_t *apdu, unsigned int len) { struct gsmtap_hdr *gh; diff --git a/host/lib/simtrace2_api.c b/host/lib/simtrace2_api.c index 0d48b8e..7a0289d 100644 --- a/host/lib/simtrace2_api.c +++ b/host/lib/simtrace2_api.c @@ -69,7 +69,7 @@ #endif /*! \brief Transmit a given command to the SIMtrace2 device */ -int st_transp_tx_msg(struct st_transport *transp, struct msgb *msg) +int osmo_st2_transp_tx_msg(struct osmo_st2_transport *transp, struct msgb *msg) { int rc; @@ -106,12 +106,12 @@ /* transmit a given message to a specified slot. Expects all headers * present before calling the function */ -int st_slot_tx_msg(struct st_slot *slot, struct msgb *msg, - uint8_t msg_class, uint8_t msg_type) +int osmo_st2_slot_tx_msg(struct osmo_st2_slot *slot, struct msgb *msg, + uint8_t msg_class, uint8_t msg_type) { st_push_hdr(msg, msg_class, msg_type, slot->slot_nr); - return st_transp_tx_msg(slot->transp, msg); + return osmo_st2_transp_tx_msg(slot->transp, msg); } /*********************************************************************** @@ -120,7 +120,7 @@ /*! \brief Request the SIMtrace2 to generate a card-insert signal */ -int cardem_request_card_insert(struct cardem_inst *ci, bool inserted) +int osmo_st2_cardem_request_card_insert(struct osmo_st2_cardem_inst *ci, bool inserted) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_cardinsert *cins; @@ -130,11 +130,11 @@ if (inserted) cins->card_insert = 1; - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_CARDINSERT); + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_CARDINSERT); } /*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Rx */ -int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t le) +int osmo_st2_cardem_request_pb_and_rx(struct osmo_st2_cardem_inst *ci, uint8_t pb, uint8_t le) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_tx_data *txd; @@ -148,12 +148,12 @@ /* one data byte */ msgb_put_u8(msg, pb); - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); } /*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Tx */ -int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, - const uint8_t *data, uint16_t data_len_in) +int osmo_st2_cardem_request_pb_and_tx(struct osmo_st2_cardem_inst *ci, uint8_t pb, + const uint8_t *data, uint16_t data_len_in) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_tx_data *txd; @@ -173,11 +173,11 @@ cur = msgb_put(msg, data_len_in); memcpy(cur, data, data_len_in); - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); } /*! \brief Request the SIMtrace2 to send a Status Word */ -int cardem_request_sw_tx(struct cardem_inst *ci, const uint8_t *sw) +int osmo_st2_cardem_request_sw_tx(struct osmo_st2_cardem_inst *ci, const uint8_t *sw) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_tx_data *txd; @@ -194,10 +194,10 @@ cur[0] = sw[0]; cur[1] = sw[1]; - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_TX_DATA); } -int cardem_request_set_atr(struct cardem_inst *ci, const uint8_t *atr, unsigned int atr_len) +int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8_t *atr, unsigned int atr_len) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_set_atr *satr; @@ -212,14 +212,14 @@ cur = msgb_put(msg, atr_len); memcpy(cur, atr, atr_len); - return st_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); } /*********************************************************************** * Modem Control protocol ***********************************************************************/ -static int _modem_reset(struct st_slot *slot, uint8_t asserted, uint16_t pulse_ms) +static int _modem_reset(struct osmo_st2_slot *slot, uint8_t asserted, uint16_t pulse_ms) { struct msgb *msg = st_msgb_alloc(); struct st_modem_reset *sr ; @@ -228,28 +228,28 @@ sr->asserted = asserted; sr->pulse_duration_msec = pulse_ms; - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_RESET); + return osmo_st2_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_RESET); } /*! \brief pulse the RESET line of the modem for \a duration_ms milli-seconds*/ -int st_modem_reset_pulse(struct st_slot *slot, uint16_t duration_ms) +int osmo_st2_modem_reset_pulse(struct osmo_st2_slot *slot, uint16_t duration_ms) { return _modem_reset(slot, 2, duration_ms); } /*! \brief assert the RESET line of the modem */ -int st_modem_reset_active(struct st_slot *slot) +int osmo_st2_modem_reset_active(struct osmo_st2_slot *slot) { return _modem_reset(slot, 1, 0); } /*! \brief de-assert the RESET line of the modem */ -int st_modem_reset_inactive(struct st_slot *slot) +int osmo_st2_modem_reset_inactive(struct osmo_st2_slot *slot) { return _modem_reset(slot, 0, 0); } -static int _modem_sim_select(struct st_slot *slot, uint8_t remote_sim) +static int _modem_sim_select(struct osmo_st2_slot *slot, uint8_t remote_sim) { struct msgb *msg = st_msgb_alloc(); struct st_modem_sim_select *ss; @@ -257,25 +257,25 @@ ss = (struct st_modem_sim_select *) msgb_put(msg, sizeof(*ss)); ss->remote_sim = remote_sim; - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_SIM_SELECT); + return osmo_st2_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_DT_MODEM_SIM_SELECT); } /*! \brief select local (physical) SIM for given slot */ -int st_modem_sim_select_local(struct st_slot *slot) +int osmo_st2_modem_sim_select_local(struct osmo_st2_slot *slot) { return _modem_sim_select(slot, 0); } /*! \brief select remote (emulated/forwarded) SIM for given slot */ -int st_modem_sim_select_remote(struct st_slot *slot) +int osmo_st2_modem_sim_select_remote(struct osmo_st2_slot *slot) { return _modem_sim_select(slot, 1); } /*! \brief Request slot to send us status information about the modem */ -int st_modem_get_status(struct st_slot *slot) +int osmo_st2_modem_get_status(struct osmo_st2_slot *slot) { struct msgb *msg = st_msgb_alloc(); - return st_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_BD_MODEM_STATUS); + return osmo_st2_slot_tx_msg(slot, msg, SIMTRACE_MSGC_MODEM, SIMTRACE_MSGT_BD_MODEM_STATUS); } diff --git a/host/src/simtrace2-remsim.c b/host/src/simtrace2-remsim.c index c76e587..5362733 100644 --- a/host/src/simtrace2-remsim.c +++ b/host/src/simtrace2-remsim.c @@ -68,7 +68,7 @@ ***********************************************************************/ /*! \brief Process a STATUS message from the SIMtrace2 */ -static int process_do_status(struct cardem_inst *ci, uint8_t *buf, int len) +static int process_do_status(struct osmo_st2_cardem_inst *ci, uint8_t *buf, int len) { struct cardemu_usb_msg_status *status; status = (struct cardemu_usb_msg_status *) buf; @@ -81,7 +81,7 @@ } /*! \brief Process a PTS indication message from the SIMtrace2 */ -static int process_do_pts(struct cardem_inst *ci, uint8_t *buf, int len) +static int process_do_pts(struct osmo_st2_cardem_inst *ci, uint8_t *buf, int len) { struct cardemu_usb_msg_pts_info *pts; pts = (struct cardemu_usb_msg_pts_info *) buf; @@ -92,9 +92,9 @@ } /*! \brief Process a RX-DATA indication message from the SIMtrace2 */ -static int process_do_rx_da(struct cardem_inst *ci, uint8_t *buf, int len) +static int process_do_rx_da(struct osmo_st2_cardem_inst *ci, uint8_t *buf, int len) { - static struct apdu_context ac; + static struct osmo_apdu_context ac; struct cardemu_usb_msg_rx_data *data; int rc; @@ -103,8 +103,8 @@ printf("=> DATA: flags=%x, %s: ", data->flags, osmo_hexdump(data->data, data->data_len)); - rc = apdu_segment_in(&ac, data->data, data->data_len, - data->flags & CEMU_DATA_F_TPDU_HDR); + rc = osmo_apdu_segment_in(&ac, data->data, data->data_len, + data->flags & CEMU_DATA_F_TPDU_HDR); if (rc & APDU_ACT_TX_CAPDU_TO_CARD) { struct msgb *tmsg = msgb_alloc(1024, "TPDU"); @@ -132,16 +132,16 @@ ac.sw[1] = msgb_apdu_sw(tmsg) & 0xff; printf("SW=0x%04x, len_rx=%d\n", msgb_apdu_sw(tmsg), msgb_l3len(tmsg)); if (msgb_l3len(tmsg)) - cardem_request_pb_and_tx(ci, ac.hdr.ins, tmsg->l3h, msgb_l3len(tmsg)); - cardem_request_sw_tx(ci, ac.sw); + osmo_st2_cardem_request_pb_and_tx(ci, ac.hdr.ins, tmsg->l3h, msgb_l3len(tmsg)); + osmo_st2_cardem_request_sw_tx(ci, ac.sw); } else if (ac.lc.tot > ac.lc.cur) { - cardem_request_pb_and_rx(ci, ac.hdr.ins, ac.lc.tot - ac.lc.cur); + osmo_st2_cardem_request_pb_and_rx(ci, ac.hdr.ins, ac.lc.tot - ac.lc.cur); } return 0; } /*! \brief Process an incoming message from the SIMtrace2 */ -static int process_usb_msg(struct cardem_inst *ci, uint8_t *buf, int len) +static int process_usb_msg(struct osmo_st2_cardem_inst *ci, uint8_t *buf, int len) { struct simtrace_msg_hdr *sh = (struct simtrace_msg_hdr *)buf; int rc; @@ -212,9 +212,9 @@ { NULL, 0, 0, 0 } }; -static void run_mainloop(struct cardem_inst *ci) +static void run_mainloop(struct osmo_st2_cardem_inst *ci) { - struct st_transport *transp = ci->slot->transp; + struct osmo_st2_transport *transp = ci->slot->transp; unsigned int msg_count, byte_count = 0; uint8_t buf[16*265]; int xfer_len; @@ -251,24 +251,24 @@ } } -static struct st_transport _transp; +static struct osmo_st2_transport _transp; -static struct st_slot _slot = { +static struct osmo_st2_slot _slot = { .transp = &_transp, .slot_nr = 0, }; -struct cardem_inst _ci = { +struct osmo_st2_cardem_inst _ci = { .slot = &_slot, }; -struct cardem_inst *ci = &_ci; +struct osmo_st2_cardem_inst *ci = &_ci; static void signal_handler(int signal) { switch (signal) { case SIGINT: - cardem_request_card_insert(ci, false); + osmo_st2_cardem_request_card_insert(ci, false); exit(0); break; default: @@ -278,7 +278,7 @@ int main(int argc, char **argv) { - struct st_transport *transp = ci->slot->transp; + struct osmo_st2_transport *transp = ci->slot->transp; char *gsmtap_host = "127.0.0.1"; int rc; int c, ret = 1; @@ -427,10 +427,10 @@ } /* simulate card-insert to modem (owhw, not qmod) */ - cardem_request_card_insert(ci, true); + osmo_st2_cardem_request_card_insert(ci, true); /* select remote (forwarded) SIM */ - st_modem_sim_select_remote(ci->slot); + osmo_st2_modem_sim_select_remote(ci->slot); if (!skip_atr) { /* set the ATR */ @@ -438,11 +438,11 @@ 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, 0x07, 0x18, 0x00, 0x00, 0x01, 0xA5 }; atr_update_csum(real_atr, sizeof(real_atr)); - cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); + osmo_st2_cardem_request_set_atr(ci, real_atr, sizeof(real_atr)); } /* select remote (forwarded) SIM */ - st_modem_reset_pulse(ci->slot, 300); + osmo_st2_modem_reset_pulse(ci->slot, 300); run_mainloop(ci); ret = 0; -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie2686b30717b9541b1217802ca967cd0a4cbde9b Gerrit-Change-Number: 16195 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Reviewer: tsaitgaist Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 08:58:18 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Tue, 26 Nov 2019 08:58:18 +0000 Subject: Change in simtrace2[master]: merge simtrace2-discovery.[ch] to libusb_util.[ch] In-Reply-To: References: Message-ID: tsaitgaist has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16196 ) Change subject: merge simtrace2-discovery.[ch] to libusb_util.[ch] ...................................................................... merge simtrace2-discovery.[ch] to libusb_util.[ch] Change-Id: I4defbec70986a90c1f0cfb7587393265b73c0163 --- M host/include/osmocom/simtrace2/libusb_util.h M host/lib/libusb_util.c M host/src/Makefile.am D host/src/simtrace2-discovery.c D host/src/simtrace2-discovery.h M host/src/simtrace2-remsim.c M host/src/simtrace2-sniff.c M host/src/usb2udp.c 8 files changed, 48 insertions(+), 129 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve tsaitgaist: Looks good to me, approved diff --git a/host/include/osmocom/simtrace2/libusb_util.h b/host/include/osmocom/simtrace2/libusb_util.h index 2b2d92e..3280b27 100644 --- a/host/include/osmocom/simtrace2/libusb_util.h +++ b/host/include/osmocom/simtrace2/libusb_util.h @@ -68,3 +68,6 @@ libusb_device_handle *usb_open_claim_interface(libusb_context *ctx, const struct usb_interface_match *ifm); + +int get_usb_ep_addrs(libusb_device_handle *devh, unsigned int if_num, + uint8_t *out, uint8_t *in, uint8_t *irq); diff --git a/host/lib/libusb_util.c b/host/lib/libusb_util.c index d88b043..50cd087 100644 --- a/host/lib/libusb_util.c +++ b/host/lib/libusb_util.c @@ -295,3 +295,44 @@ return usb_devh; } + +/*! \brief obtain the endpoint addresses for a given USB interface */ +int get_usb_ep_addrs(libusb_device_handle *devh, unsigned int if_num, + uint8_t *out, uint8_t *in, uint8_t *irq) +{ + libusb_device *dev = libusb_get_device(devh); + struct libusb_config_descriptor *cdesc; + const struct libusb_interface_descriptor *idesc; + const struct libusb_interface *iface; + int rc, l; + + rc = libusb_get_active_config_descriptor(dev, &cdesc); + if (rc < 0) + return rc; + + iface = &cdesc->interface[if_num]; + /* FIXME: we assume there's no altsetting */ + idesc = &iface->altsetting[0]; + + for (l = 0; l < idesc->bNumEndpoints; l++) { + const struct libusb_endpoint_descriptor *edesc = &idesc->endpoint[l]; + switch (edesc->bmAttributes & 3) { + case LIBUSB_TRANSFER_TYPE_BULK: + if (edesc->bEndpointAddress & 0x80) { + if (in) + *in = edesc->bEndpointAddress; + } else { + if (out) + *out = edesc->bEndpointAddress; + } + break; + case LIBUSB_TRANSFER_TYPE_INTERRUPT: + if (irq) + *irq = edesc->bEndpointAddress; + break; + default: + break; + } + } + return 0; +} diff --git a/host/src/Makefile.am b/host/src/Makefile.am index b0f1f91..29f2405 100644 --- a/host/src/Makefile.am +++ b/host/src/Makefile.am @@ -5,14 +5,12 @@ LDADD= $(top_builddir)/lib/libosmo-simtrace2.la \ $(LIBOSMOCORE_LIBS) $(LIBOSMOSIM_LIBS) $(LIBUSB_LIBS) -noinst_HEADERS = simtrace2-discovery.h - bin_PROGRAMS = simtrace2-remsim simtrace2-remsim-usb2udp simtrace2-list simtrace2-sniff -simtrace2_remsim_SOURCES = simtrace2-remsim.c simtrace2-discovery.c +simtrace2_remsim_SOURCES = simtrace2-remsim.c -simtrace2_remsim_usb2udp_SOURCES = usb2udp.c simtrace2-discovery.c +simtrace2_remsim_usb2udp_SOURCES = usb2udp.c simtrace2_list_SOURCES = simtrace2_usb.c -simtrace2_sniff_SOURCES = simtrace2-sniff.c simtrace2-discovery.c +simtrace2_sniff_SOURCES = simtrace2-sniff.c diff --git a/host/src/simtrace2-discovery.c b/host/src/simtrace2-discovery.c deleted file mode 100644 index a7306ce..0000000 --- a/host/src/simtrace2-discovery.c +++ /dev/null @@ -1,94 +0,0 @@ -/* simtrace2-discovery - host PC library to scan for matching USB - * devices - * - * (C) 2016 by Harald Welte - * - * This program is free software; you can redistribute it and/or - * modify 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 - -/*! \brief obtain the endpoint addresses for a given USB interface */ -int get_usb_ep_addrs(libusb_device_handle *devh, unsigned int if_num, - uint8_t *out, uint8_t *in, uint8_t *irq) -{ - libusb_device *dev = libusb_get_device(devh); - struct libusb_config_descriptor *cdesc; - const struct libusb_interface_descriptor *idesc; - const struct libusb_interface *iface; - int rc, l; - - rc = libusb_get_active_config_descriptor(dev, &cdesc); - if (rc < 0) - return rc; - - iface = &cdesc->interface[if_num]; - /* FIXME: we assume there's no altsetting */ - idesc = &iface->altsetting[0]; - - for (l = 0; l < idesc->bNumEndpoints; l++) { - const struct libusb_endpoint_descriptor *edesc = &idesc->endpoint[l]; - switch (edesc->bmAttributes & 3) { - case LIBUSB_TRANSFER_TYPE_BULK: - if (edesc->bEndpointAddress & 0x80) { - if (in) - *in = edesc->bEndpointAddress; - } else { - if (out) - *out = edesc->bEndpointAddress; - } - break; - case LIBUSB_TRANSFER_TYPE_INTERRUPT: - if (irq) - *irq = edesc->bEndpointAddress; - break; - default: - break; - } - } - return 0; -} - -#if 0 - struct libusb_device_descriptor ddesc; - int rc, i, j, k; - - rc = libusb_get_device_descriptor(devh, &ddesc); - if (rc < 0) - return; - - for (i = 0; i < ddesc.bNumConfigurations; i++) { - struct libusb_config_descriptor *cdesc; - rc = libusb_get_config_descriptor(devh, i, &cdesc); - if (rc < 0) - return; - - for (j = 0; j < cdesc->bNumInterfaces; j++) { - const struct libusb_interface *iface = cdesc->interface[j]; - for (k = 0; k < iface->num_altsetting; k++) { - const struct libusb_interface_descriptor *idesc = iface->altsetting[k]; - /* make sure this is the interface we're looking for */ - if (idesc->bInterfaceClass != 0xFF || - idesc->bInterfaceSubClass != if_class || - idsec->bInterfaceProtocol != if_proto) - continue; - /* FIXME */ - } - } - - libusb_free_config_descriptor(cdesc); - } -#endif diff --git a/host/src/simtrace2-discovery.h b/host/src/simtrace2-discovery.h deleted file mode 100644 index cfba956..0000000 --- a/host/src/simtrace2-discovery.h +++ /dev/null @@ -1,26 +0,0 @@ -/* simtrace2-discovery - host PC library to scan for matching USB - * devices - * - * (C) 2016 by Harald Welte - * - * This program is free software; you can redistribute it and/or - * modify 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. - */ -#pragma once - -#include -#include - -int get_usb_ep_addrs(libusb_device_handle *devh, unsigned int if_num, - uint8_t *out, uint8_t *in, uint8_t *irq); diff --git a/host/src/simtrace2-remsim.c b/host/src/simtrace2-remsim.c index 5362733..03d11df 100644 --- a/host/src/simtrace2-remsim.c +++ b/host/src/simtrace2-remsim.c @@ -44,8 +44,6 @@ #include #include -#include "simtrace2-discovery.h" - #include #include #include diff --git a/host/src/simtrace2-sniff.c b/host/src/simtrace2-sniff.c index f3c37dc..7e8e5eb 100644 --- a/host/src/simtrace2-sniff.c +++ b/host/src/simtrace2-sniff.c @@ -40,7 +40,6 @@ #include #include #include -#include "simtrace2-discovery.h" #include diff --git a/host/src/usb2udp.c b/host/src/usb2udp.c index 9927594..23800fd 100644 --- a/host/src/usb2udp.c +++ b/host/src/usb2udp.c @@ -37,7 +37,7 @@ #include #include -#include "simtrace2-discovery.h" +#include #include #include -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I4defbec70986a90c1f0cfb7587393265b73c0163 Gerrit-Change-Number: 16196 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Reviewer: tsaitgaist Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 09:52:11 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 09:52:11 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: cast ptrdiff value to fix printf format In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16215 ) Change subject: scheduler_trx.c: cast ptrdiff value to fix printf format ...................................................................... Patch Set 2: > Patch Set 2: > > actually %t seems to be the format string for ptrdiff_t Yes %td, but I preferred simply casting because I was unsure old compilers would support it (quick reading looked like available only in fairly new std C). explicit cast should work also for really old compilers (which we use in some cross toolchains). -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 Gerrit-Change-Number: 16215 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 09:52:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 09:53:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 09:53:53 +0000 Subject: Change in osmo-hlr[master]: enlarge the GSUP message headroom In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16208 ) Change subject: enlarge the GSUP message headroom ...................................................................... Patch Set 10: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16208/10/src/gsup_server.c File src/gsup_server.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16208/10/src/gsup_server.c at 40 PS10, Line 40: struct msgb *msg = msgb_alloc_headroom(1024+512, 512, label); That looks like a big increase imho, 128 or 256 looks more realistic for longer names. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I7d86f2dadcae29fe1550ea2c9773394ab31a837b Gerrit-Change-Number: 16208 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 09:53:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 09:57:20 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Tue, 26 Nov 2019 09:57:20 +0000 Subject: Change in simtrace2[master]: free USB buffer when allocation failed In-Reply-To: References: Message-ID: tsaitgaist has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16097 ) Change subject: free USB buffer when allocation failed ...................................................................... Patch Set 1: Code-Review+2 > Patch Set 1: > > (1 comment) the message is dequeued before it is provided to USB, thus it can't be deleted when transfer is ongoing. -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie9ebdd2ff966f67c9afd1ed760f106558f0091ad Gerrit-Change-Number: 16097 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tsaitgaist Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 09:57:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 09:57:28 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Tue, 26 Nov 2019 09:57:28 +0000 Subject: Change in simtrace2[master]: free USB buffer when allocation failed In-Reply-To: References: Message-ID: tsaitgaist has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16097 ) Change subject: free USB buffer when allocation failed ...................................................................... free USB buffer when allocation failed when the reader sends APDU headers (e.g. after multiple reset), messages are queued for USB transmission. but if no host software is connected to SIMtrace in card emulation mode, the USB message queue is not emptied, leading to the memory getting full and preventing allocation for newer messages (e.g. more recent APDU). in this case the oldest queued message is now dropped to free some memory. Change-Id: Ie9ebdd2ff966f67c9afd1ed760f106558f0091ad --- M firmware/libcommon/source/card_emu.c 1 file changed, 27 insertions(+), 4 deletions(-) Approvals: tsaitgaist: Looks good to me, approved Jenkins Builder: Verified diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index 5298ffc..497b963 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -254,12 +254,35 @@ /* Allocate USB buffer and push + initialize simtrace_msg_hdr */ struct msgb *usb_buf_alloc_st(uint8_t ep, uint8_t msg_class, uint8_t msg_type) { - struct msgb *msg; + struct msgb *msg = NULL; struct simtrace_msg_hdr *sh; - msg = usb_buf_alloc(ep); - if (!msg) - return NULL; + while (!msg) { + msg = usb_buf_alloc(ep); // try to allocate some memory + if (!msg) { // allocation failed, we might be out of memory + struct llist_head *queue = usb_get_queue(ep); + if (!queue) { + TRACE_ERROR("ep %u: %s queue does not exist\n\r", + ep, __func__); + return NULL; + } + if (llist_empty(queue)) { + TRACE_ERROR("ep %u: %s EOMEM (queue already empty)\n\r", + ep, __func__); + return NULL; + } + msg = msgb_dequeue(queue); + if (!msg) { + TRACE_ERROR("ep %u: %s no msg in non-empty queue\n\r", + ep, __func__); + return NULL; + } + usb_buf_free(msg); + msg = NULL; + TRACE_DEBUG("ep %u: %s queue msg dropped\n\r", + ep, __func__); + } + } msg->l1h = msgb_put(msg, sizeof(*sh)); sh = (struct simtrace_msg_hdr *) msg->l1h; -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ie9ebdd2ff966f67c9afd1ed760f106558f0091ad Gerrit-Change-Number: 16097 Gerrit-PatchSet: 2 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tsaitgaist Gerrit-CC: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 09:58:16 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 09:58:16 +0000 Subject: Change in osmo-msc[master]: Fix duplicate SMS when SMPP returns to same MSC In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16217 ) Change subject: Fix duplicate SMS when SMPP returns to same MSC ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/16217/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-msc/+/16217/1//COMMIT_MSG at 7 PS1, Line 7: Fix duplicate SMS when SMPP returns to same MSC Please improve description, I don't understand what this means. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c9b61dc05bda6f2b09cbc1890de1f2702f7abc8 Gerrit-Change-Number: 16217 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 09:58:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 09:59:26 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 09:59:26 +0000 Subject: Change in osmo-msc[master]: sms db: when storing an SMS, retrieve the ID In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16218 ) Change subject: sms db: when storing an SMS, retrieve the ID ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/16218/1/src/libmsc/db.c File src/libmsc/db.c: https://gerrit.osmocom.org/c/osmo-msc/+/16218/1/src/libmsc/db.c at 773 PS1, Line 773: sms->id = dbi_conn_sequence_last(conn, "id"); So we had an id which was always 0 until now? -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5fa55307a6abb8bbfe56619235d7b79fbbda6caf Gerrit-Change-Number: 16218 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 09:59:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:00:20 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 10:00:20 +0000 Subject: Change in osmo-msc[master]: sms log tweak In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16219 ) Change subject: sms log tweak ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I77e7a1501f74b9045f032c5b6c2322025a11fd59 Gerrit-Change-Number: 16219 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 10:00:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:00:33 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 26 Nov 2019 10:00:33 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16203 ) Change subject: add osmo-mslookup-client program ...................................................................... Patch Set 10: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16203/9/src/mslookup/osmo-mslookup-client.c File src/mslookup/osmo-mslookup-client.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16203/9/src/mslookup/osmo-mslookup-client.c at 89 PS9, Line 89: "$ osmo-mslookup-client -s /tmp/mslookup -d\n" > It is a client really, and it does indeed seem really odd. [?] It's like dhcpcd - DHCP client daemon :) -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 10:00:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:10:00 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 10:10:00 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15947 ) Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/15947/3/src/libmsc/sdp_msg.c File src/libmsc/sdp_msg.c: https://gerrit.osmocom.org/c/osmo-msc/+/15947/3/src/libmsc/sdp_msg.c at 511 PS3, Line 511: if (codec->fmtp[0]) is this a check against != '\0' ? -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 10:10:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:13:49 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 10:13:49 +0000 Subject: Change in osmo-msc[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 10:13:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:14:37 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 10:14:37 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: better err logging for dtap msgs In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15949 ) Change subject: msc_vlr_tests: better err logging for dtap msgs ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 Gerrit-Change-Number: 15949 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 10:14:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:15:21 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 26 Nov 2019 10:15:21 +0000 Subject: Change in osmo-bts[master]: common/vty.c: fix: properly assert() the result of get_string_value() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16223 ) Change subject: common/vty.c: fix: properly assert() the result of get_string_value() ...................................................................... common/vty.c: fix: properly assert() the result of get_string_value() Change-Id: I6ecd46371e601ad0fb629f9756b36c9c4758a958 Fixes: CID#205067, CID#205068 --- M src/common/vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/23/16223/1 diff --git a/src/common/vty.c b/src/common/vty.c index 2558ba8..8b947a7 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -1613,7 +1613,7 @@ struct log_target *tgt = osmo_log_vty2tgt(vty); uint16_t **sapi_mask; - OSMO_ASSERT(sapi < 0); + OSMO_ASSERT(sapi >= 0); if (!tgt) return CMD_WARNING; @@ -1635,7 +1635,7 @@ struct log_target *tgt = osmo_log_vty2tgt(vty); uint16_t *sapi_mask; - OSMO_ASSERT(sapi < 0); + OSMO_ASSERT(sapi >= 0); if (!tgt) return CMD_WARNING; if (!tgt->filter_data[LOG_FLT_L1_SAPI]) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6ecd46371e601ad0fb629f9756b36c9c4758a958 Gerrit-Change-Number: 16223 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:20:22 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 10:20:22 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15953 ) Change subject: add full SDP codec information to the MNCC socket ...................................................................... Patch Set 5: (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/15953/5//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-msc/+/15953/5//COMMIT_MSG at 7 PS5, Line 7: add full SDP codec information to the MNCC socket So there's 2 main topics here which seem would be in different commits, splitting this huge commit: * Moving all existing logic to set up the CN CRCX to the very start of voice call establishment. * Adding SDP codec information. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 10:20:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:21:41 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 10:21:41 +0000 Subject: Change in osmo-bts[master]: common/vty.c: fix: properly assert() the result of get_string_value() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16223 ) Change subject: common/vty.c: fix: properly assert() the result of get_string_value() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6ecd46371e601ad0fb629f9756b36c9c4758a958 Gerrit-Change-Number: 16223 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 26 Nov 2019 10:21:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:22:26 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 26 Nov 2019 10:22:26 +0000 Subject: Change in osmo-bts[master]: common/vty.c: fix: properly assert() the result of get_string_value() In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16223 ) Change subject: common/vty.c: fix: properly assert() the result of get_string_value() ...................................................................... common/vty.c: fix: properly assert() the result of get_string_value() Change-Id: I6ecd46371e601ad0fb629f9756b36c9c4758a958 Fixes: CID#205067, CID#205068 --- M src/common/vty.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/vty.c b/src/common/vty.c index 2558ba8..8b947a7 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -1613,7 +1613,7 @@ struct log_target *tgt = osmo_log_vty2tgt(vty); uint16_t **sapi_mask; - OSMO_ASSERT(sapi < 0); + OSMO_ASSERT(sapi >= 0); if (!tgt) return CMD_WARNING; @@ -1635,7 +1635,7 @@ struct log_target *tgt = osmo_log_vty2tgt(vty); uint16_t *sapi_mask; - OSMO_ASSERT(sapi < 0); + OSMO_ASSERT(sapi >= 0); if (!tgt) return CMD_WARNING; if (!tgt->filter_data[LOG_FLT_L1_SAPI]) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6ecd46371e601ad0fb629f9756b36c9c4758a958 Gerrit-Change-Number: 16223 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:24:28 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 10:24:28 +0000 Subject: Change in libosmocore[master]: libosmovty: simplify condition checking vty->fd in vty_close() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16149 ) Change subject: libosmovty: simplify condition checking vty->fd in vty_close() ...................................................................... Patch Set 1: > We can add a comment to make it cleaner, but I will not insist on merging this change. Even Pau is not 100% (CR+1) sure despite he suggested this ;) I'm sure about it, just giving the chance to other people to comment on it ;) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 Gerrit-Change-Number: 16149 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Tue, 26 Nov 2019 10:24:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:24:34 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 26 Nov 2019 10:24:34 +0000 Subject: Change in osmo-bts[master]: common/vty.c: fix: properly assert() the result of get_string_value() In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16223 ) Change subject: common/vty.c: fix: properly assert() the result of get_string_value() ...................................................................... Patch Set 1: Code-Review+2 Thanks, fixeria! -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6ecd46371e601ad0fb629f9756b36c9c4758a958 Gerrit-Change-Number: 16223 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 10:24:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 10:27:01 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 10:27:01 +0000 Subject: Change in libosmocore[master]: vty/vty.c: log received commands from telnet interface In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14974 ) Change subject: vty/vty.c: log received commands from telnet interface ...................................................................... Patch Set 6: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/14974/6/src/vty/vty.c File src/vty/vty.c: https://gerrit.osmocom.org/c/libosmocore/+/14974/6/src/vty/vty.c at 1766 PS6, Line 1766: /* Work around "[level (A|B|C)]" parsing bug */ > you can't make multiple arguments optional in a single square brace. Instead try [?] Yes that should work fine (what suggestd by neels), then check argc and argv[X] is "level" and argv[x+1]. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5f6639f6ebc3e8f8df50ef48538df94285b759fd Gerrit-Change-Number: 14974 Gerrit-PatchSet: 6 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Tue, 26 Nov 2019 10:27:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 12:32:14 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 12:32:14 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester-prod: Set DNS server to a working service References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16224 ) Change subject: ansible: gsm-tester-prod: Set DNS server to a working service ...................................................................... ansible: gsm-tester-prod: Set DNS server to a working service 10.42.42.2 is simply one of the IP addresses assigned to osmo-gsm-tester main unit on its own internal network (the one used between itself and the connected BTS or helper hosts). There's no DNS server running there. The main unit already runs lots of services, and there's really no need for a DNS server running there, so simply point it to a working DNS server. Change-Id: I443cc560553c07635763a13bc73ead4835e6a009 --- M ansible/setup-gsm-tester.yml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/24/16224/1 diff --git a/ansible/setup-gsm-tester.yml b/ansible/setup-gsm-tester.yml index 99cc3e4..43ef753 100644 --- a/ansible/setup-gsm-tester.yml +++ b/ansible/setup-gsm-tester.yml @@ -51,6 +51,6 @@ udhcpd_range_start: 10.42.42.230 udhcpd_range_end: 10.42.42.235 udhcpd_subnet: 255.255.255.0 - udhcpd_dns: 10.42.42.2 + udhcpd_dns: 8.8.8.8 udhcpd_interface: enp2s0 # udhcpd_static_leases is set via host_vars/* -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I443cc560553c07635763a13bc73ead4835e6a009 Gerrit-Change-Number: 16224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 12:53:58 2019 From: gerrit-no-reply at lists.osmocom.org (tsaitgaist) Date: Tue, 26 Nov 2019 12:53:58 +0000 Subject: Change in simtrace2[master]: qmod: lower VCC threshold to 2.5V References: Message-ID: tsaitgaist has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16225 ) Change subject: qmod: lower VCC threshold to 2.5V ...................................................................... qmod: lower VCC threshold to 2.5V on the QMOD board the VCC signal from the modem is measured using an ADC (SIMtrace board just use card detect). the threshold to consider VCC as activated was set to 2.8V, which gives a bit of margin for the expected 3.0V. still, we had one board where the voltage was 2.8V. to be resilient against lower than expected voltages from modems (or boards), we lowered the threshold to 2.5V. this is still save for the SAM3S to correctly identify high/low levels. Change-Id: Iac2778903690045e4e63fef29f812205d00c28ed --- M firmware/libcommon/source/mode_cardemu.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/25/16225/1 diff --git a/firmware/libcommon/source/mode_cardemu.c b/firmware/libcommon/source/mode_cardemu.c index 2d1a687..704e6ba 100644 --- a/firmware/libcommon/source/mode_cardemu.c +++ b/firmware/libcommon/source/mode_cardemu.c @@ -309,7 +309,7 @@ } #define VCC_UV_THRESH_1V8 1500000 -#define VCC_UV_THRESH_3V 2800000 +#define VCC_UV_THRESH_3V 2500000 static void process_vcc_adc(struct cardem_inst *ci) { -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16225 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Iac2778903690045e4e63fef29f812205d00c28ed Gerrit-Change-Number: 16225 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:05:00 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 26 Nov 2019 13:05:00 +0000 Subject: Change in osmo-bts[master]: logging: remame category DSUM to DBTS, update description In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16145 ) Change subject: logging: remame category DSUM to DBTS, update description ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16145/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/16145/1//COMMIT_MSG at 7 PS1, Line 7: remame (rename) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia9db783bc92b23ba87b4fdf1e4ed07d59ea6bbce Gerrit-Change-Number: 16145 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 13:05:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:05:41 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 26 Nov 2019 13:05:41 +0000 Subject: Change in osmo-bts[master]: logging: use generic DBTS category where applicable In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16146 ) Change subject: logging: use generic DBTS category where applicable ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I15023436e81d5bdb51930912b221a23c69437847 Gerrit-Change-Number: 16146 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 13:05:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:06:51 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 26 Nov 2019 13:06:51 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester-prod: Set DNS server to a working service In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16224 ) Change subject: ansible: gsm-tester-prod: Set DNS server to a working service ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I443cc560553c07635763a13bc73ead4835e6a009 Gerrit-Change-Number: 16224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 26 Nov 2019 13:06:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:08:17 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 13:08:17 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... ansible: gsm-tester: Enable ip forwarding and masquerading on boot Some nodes in the internal network, such as LimeNetMicro, will need Internet access to upgrade osmo-trx-lms from OBS repos. It also makes it easier to update manually other nodes inside the internal network. Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 --- M ansible/roles/gsm-tester-network/README.md M ansible/roles/gsm-tester-network/defaults/main.yml M ansible/roles/gsm-tester-network/tasks/main.yml A ansible/roles/gsm-tester-network/templates/etc/iptables-ogt 4 files changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/26/16226/1 diff --git a/ansible/roles/gsm-tester-network/README.md b/ansible/roles/gsm-tester-network/README.md index e324929..f99b8d7 100644 --- a/ansible/roles/gsm-tester-network/README.md +++ b/ansible/roles/gsm-tester-network/README.md @@ -5,3 +5,4 @@ # variables - `bts_interface` (eth1): on which network interface the bts is configured. +- `gw_interface` (eth1): on which network interface the traffic is routed towards default gateway. diff --git a/ansible/roles/gsm-tester-network/defaults/main.yml b/ansible/roles/gsm-tester-network/defaults/main.yml index 3e506da..5bfdf63 100644 --- a/ansible/roles/gsm-tester-network/defaults/main.yml +++ b/ansible/roles/gsm-tester-network/defaults/main.yml @@ -1,3 +1,4 @@ --- -bts_interface: eth1 +bts_interface: enp2s0 +gw_interface: enp1s0 diff --git a/ansible/roles/gsm-tester-network/tasks/main.yml b/ansible/roles/gsm-tester-network/tasks/main.yml index 210bf1e..e0d4d25 100644 --- a/ansible/roles/gsm-tester-network/tasks/main.yml +++ b/ansible/roles/gsm-tester-network/tasks/main.yml @@ -9,3 +9,8 @@ - name: start all network interface command: ifup -a when: gsm_tester_network_interface is changed + +- name: allowing ip forwarding and masquerading traffic from internal network + template: + src: etc/iptables-ogt + dest: /etc/network/if-up.d/iptables-ogt diff --git a/ansible/roles/gsm-tester-network/templates/etc/iptables-ogt b/ansible/roles/gsm-tester-network/templates/etc/iptables-ogt new file mode 100644 index 0000000..e59a02f --- /dev/null +++ b/ansible/roles/gsm-tester-network/templates/etc/iptables-ogt @@ -0,0 +1,8 @@ +#!/bin/sh +IPT="/sbin/iptables" + +if [ "$IFACE" = "{{ gw_interface }}" ]; then + $IPT -t nat -A POSTROUTING -o {{ gw_interface }} -j MASQUERADE + $IPT -t filter -A FORWARD -j ACCEPT + echo "osmo-gsm-tester iptables rules loaded." +fi -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:08:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 13:08:52 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... Patch Set 1: I think there's one bit missing here: The script needs to have execute permission. I need to check how to tell ansible to give it when copying it. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 13:08:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:31:16 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 26 Nov 2019 13:31:16 +0000 Subject: Change in osmo-bts[master]: rsl: ensure measurement reports are sent In-Reply-To: References: Message-ID: Hello pespin, fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/16170 to look at the new patch set (#2). Change subject: rsl: ensure measurement reports are sent ...................................................................... rsl: ensure measurement reports are sent osmo-bts currently does not generate a measurement report in case the SACCH of the related traffic channel is lost. This is a problem because the moment when reception gets bad measurmenet reporting is crucial to carry out handover decisions effectively. The presence of a SACCH block controls the conclusion of the measurement interval and the sending of the RSL measurement report. The latter one not only requires a measurmenet indication, it also requires a fully intact SACCH block. Lets use the NOPE / IDLE indications from V1 of the TRXD protocol to ensure a SACCH block is always reported up to l1sap.c. In cases where the SACCH is bad, trigger the sending of the RSL measurement report manually without attaching the measurmenet data from the MS (which we do not have in this case) Related: OS#2975 Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2 --- M include/osmo-bts/rsl.h M src/common/l1sap.c M src/common/rsl.c M src/common/scheduler.c M src/osmo-bts-trx/scheduler_trx.c 5 files changed, 30 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/16170/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2 Gerrit-Change-Number: 16170 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Tue Nov 26 13:32:41 2019 From: admin at opensuse.org (OBS Notification) Date: Tue, 26 Nov 2019 13:32:41 +0000 Subject: Build failure of network:osmocom:nightly/osmo-bts in Debian_Testing/x86_64 In-Reply-To: References: Message-ID: <5ddd2997e102d_277a2ab39c4ac5fc482233@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-bts/Debian_Testing/x86_64 Package network:osmocom:nightly/osmo-bts failed to build in Debian_Testing/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-bts Last lines of build log: [ 54s] [199/398] installing libxml2-2.9.4+dfsg1-8 [ 54s] Processing triggers for libc-bin (2.29-3) ... [ 54s] [200/398] installing gpgv-2.2.17-3 [ 54s] [201/398] installing pinentry-curses-1.1.0-3 [ 54s] [202/398] installing teckit-2.5.8+ds2-5 [ 54s] [203/398] installing binutils-x86-64-linux-gnu-2.33.1-4 [ 55s] [204/398] installing libsemanage1-2.9-3+b1 [ 55s] Processing triggers for libc-bin (2.29-3) ... [ 55s] [205/398] installing e2fsprogs-1.45.4-1 [ 55s] [206/398] installing libgnutls30-3.6.10-5 [ 55s] dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt [ 55s] tar: This does not look like a tar archive [ 55s] tar: Exiting with failure status due to previous errors [ 55s] dpkg-deb: error: tar subprocess returned error exit status 2 [ 55s] dpkg: error processing archive .init_b_cache/libgnutls30.deb (--install): [ 55s] dpkg-deb --control subprocess returned error exit status 2 [ 55s] Errors were encountered while processing: [ 55s] .init_b_cache/libgnutls30.deb [ 55s] exit ... [ 55s] [ 55s] lamb51 failed "build osmo-bts_1.1.0.81.a070.dsc" at Tue Nov 26 13:32:33 UTC 2019. [ 55s] [ 55s] ### VM INTERACTION START ### [ 59s] [ 40.775657] sysrq: SysRq : Power Off [ 59s] [ 40.783314] reboot: Power down [ 59s] ### VM INTERACTION END ### [ 59s] [ 59s] lamb51 failed "build osmo-bts_1.1.0.81.a070.dsc" at Tue Nov 26 13:32:37 UTC 2019. [ 59s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:47:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 13:47:52 +0000 Subject: Change in osmo-gsm-tester[master]: resources.conf: Mark osmo-bts-trx as supporting a5/3 References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16227 ) Change subject: resources.conf: Mark osmo-bts-trx as supporting a5/3 ...................................................................... resources.conf: Mark osmo-bts-trx as supporting a5/3 Change-Id: I478e0719589a8055e7b16536e679d2801efc5caf --- M example/resources.conf.prod M example/resources.conf.rnd 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/27/16227/1 diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 0bf9f45..5b4185b 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -25,7 +25,7 @@ ipa_unit_id: 6 addr: 10.42.42.50 band: GSM-1800 - ciphers: [a5_0, a5_1] + ciphers: [a5_0, a5_1, a5_3] osmo_trx: type: uhd launch_trx: true @@ -40,7 +40,7 @@ ipa_unit_id: 12 addr: 10.42.42.54 band: GSM-1800 - ciphers: [a5_0, a5_1] + ciphers: [a5_0, a5_1, a5_3] osmo_trx: type: uhd launch_trx: true @@ -54,7 +54,7 @@ ipa_unit_id: 11 addr: 10.42.42.53 band: GSM-1800 - ciphers: [a5_0, a5_1] + ciphers: [a5_0, a5_1, a5_3] osmo_trx: type: lms launch_trx: true @@ -68,7 +68,7 @@ ipa_unit_id: 7 addr: 10.42.42.51 band: GSM-1800 - ciphers: [a5_0, a5_1] + ciphers: [a5_0, a5_1, a5_3] trx_list: - power_supply: type: 'intellinet' diff --git a/example/resources.conf.rnd b/example/resources.conf.rnd index 0fad50f..5358a61 100644 --- a/example/resources.conf.rnd +++ b/example/resources.conf.rnd @@ -33,7 +33,7 @@ remote_user: jenkins trx_ip: 127.0.0.1 dev_args: "type=b200,serial=30A9FFB" - ciphers: [a5_0, a5_1] + ciphers: [a5_0, a5_1, a5_3] - label: NanoBTS-ONW-1900 type: nanobts -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16227 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I478e0719589a8055e7b16536e679d2801efc5caf Gerrit-Change-Number: 16227 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:47:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 13:47:52 +0000 Subject: Change in osmo-gsm-tester[master]: bts_osmotrx: Allow Setting Rx/TX paths through resources.conf References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16228 ) Change subject: bts_osmotrx: Allow Setting Rx/TX paths through resources.conf ...................................................................... bts_osmotrx: Allow Setting Rx/TX paths through resources.conf Change-Id: Iddb0f20366c3242098bdf869f39fc3e2244c13e7 --- M example/resources.conf.prod M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/resource.py 3 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/28/16228/1 diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 5b4185b..e5911f1 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -62,6 +62,8 @@ trx_ip: 10.42.42.117 clock_reference: external dev_args: "LimeSDR-USB,serial=00090706024F0A22" + channels: + - rx_path: "LNAW" - label: sysmoCell 5000 type: osmo-bts-trx diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 554a236..f1fbdd1 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -344,7 +344,6 @@ def __init__(self, suite_run, conf): super().__init__(suite_run, conf) - self.conf['osmo_trx']['channels'][0]['rx_path'] = 'LNAW' def binary_name(self): return OsmoTrxLMS.BIN_TRX diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 1b18076..992734d 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -76,6 +76,8 @@ 'bts[].osmo_trx.dev_args': schema.STR, 'bts[].osmo_trx.multi_arfcn': schema.BOOL_STR, 'bts[].osmo_trx.max_trxd_version': schema.UINT, + 'bts[].osmo_trx.channels[].rx_path': schema.STR, + 'bts[].osmo_trx.channels[].tx_path': schema.STR, 'arfcn[].arfcn': schema.INT, 'arfcn[].band': schema.BAND, 'modem[].type': schema.STR, -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iddb0f20366c3242098bdf869f39fc3e2244c13e7 Gerrit-Change-Number: 16228 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:47:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 13:47:52 +0000 Subject: Change in osmo-gsm-tester[master]: process: Return proc in function helpers References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16229 ) Change subject: process: Return proc in function helpers ...................................................................... process: Return proc in function helpers Caller may want to access the proc object after running the process, for instance to check return code or inspect its stdout/stderr logs. Change-Id: I60a18dcf699ebeaced951f7d5ff188f573772282 --- M src/osmo_gsm_tester/process.py 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/29/16229/1 diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index b73673f..ef6bca1 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -399,16 +399,19 @@ run_dir =run_dir.new_dir(name) proc = Process(name, run_dir, popen_args) proc.launch_sync() + return proc def run_local_netns_sync(run_dir, name, netns, popen_args): run_dir =run_dir.new_dir(name) proc = NetNSProcess(name, run_dir, netns, popen_args) proc.launch_sync() + return proc def run_remote_sync(run_dir, remote_user, remote_addr, name, popen_args, remote_cwd=None): run_dir = run_dir.new_dir(name) proc = RemoteProcess(name, run_dir, remote_user, remote_addr, remote_cwd, popen_args) proc.launch_sync() + return proc def scp(run_dir, remote_user, remote_addr, name, local_path, remote_path): run_local_sync(run_dir, name, ('scp', '-r', local_path, '%s@%s:%s' % (remote_user, remote_addr, remote_path))) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I60a18dcf699ebeaced951f7d5ff188f573772282 Gerrit-Change-Number: 16229 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:47:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 13:47:52 +0000 Subject: Change in osmo-gsm-tester[master]: process: Allow passing no local inst to copy_inst_ssh References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16230 ) Change subject: process: Allow passing no local inst to copy_inst_ssh ...................................................................... process: Allow passing no local inst to copy_inst_ssh This will be useful in the event a user wants to run a binary already available in the target which needs no copying, but still requires the non-binary related items to be copied and set up, such as config files, directory structure, etc. This option will be used to run osmo-trx-lms in LimeNetMicro already installed from an OBS repo, since cross-compiling all related dependencies would require a lot of work to do now. Change-Id: I6b0f2a19e493c7ac911c5db0ea08f5c0ab936d74 --- M src/osmo_gsm_tester/process.py 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/30/16230/1 diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index ef6bca1..06da3bf 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -416,12 +416,16 @@ def scp(run_dir, remote_user, remote_addr, name, local_path, remote_path): run_local_sync(run_dir, name, ('scp', '-r', local_path, '%s@%s:%s' % (remote_user, remote_addr, remote_path))) +# If no inst binaries copying is required (eg. because binary+libs is already available in distro), inst can be None. def copy_inst_ssh(run_dir, inst, remote_dir, remote_user, remote_addr, remote_rundir_append, cfg_file_name): - remote_inst = Dir(remote_dir.child(os.path.basename(str(inst)))) remote_dir_str = str(remote_dir) run_remote_sync(run_dir, remote_user, remote_addr, 'rm-remote-dir', ('test', '!', '-d', remote_dir_str, '||', 'rm', '-rf', remote_dir_str)) run_remote_sync(run_dir, remote_user, remote_addr, 'mk-remote-dir', ('mkdir', '-p', remote_dir_str)) - scp(run_dir, remote_user, remote_addr, 'scp-inst-to-remote', str(inst), remote_dir_str) + if inst is not None: + remote_inst = Dir(remote_dir.child(os.path.basename(str(inst)))) + scp(run_dir, remote_user, remote_addr, 'scp-inst-to-remote', str(inst), remote_dir_str) + else: + remote_inst = None remote_run_dir = remote_dir.child(remote_rundir_append) run_remote_sync(run_dir, remote_user, remote_addr, 'mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16230 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I6b0f2a19e493c7ac911c5db0ea08f5c0ab936d74 Gerrit-Change-Number: 16230 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:47:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 13:47:53 +0000 Subject: Change in osmo-gsm-tester[master]: bts_osmotrx: Add support to run osmo-trx on LimeNet-micro References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16231 ) Change subject: bts_osmotrx: Add support to run osmo-trx on LimeNet-micro ...................................................................... bts_osmotrx: Add support to run osmo-trx on LimeNet-micro bts_osmotrx will check if target host can run the inst, and otherwise run osmo-trx-lms already present in the system (installed by other means). This way same class can be used both ways, since the only real difference between the 2 scenarios is: * copying inst vs not copying it. * Running binary from inst vs running it from PATH. This commit does not provide a mechanism to make sure the osmo-trx or its dependencies are up-to-date in the target system. A solution for that will be provided separately. Related: SYS#4663 Change-Id: I6bd76f6d7e0cb2b6f7bdde971b6515846048a341 --- M example/resources.conf.prod A example/scenarios/trx-lms-limenet-micro.conf M src/osmo_gsm_tester/bts_osmotrx.py 3 files changed, 61 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/31/16231/1 diff --git a/example/resources.conf.prod b/example/resources.conf.prod index e5911f1..6de4e2e 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -65,6 +65,20 @@ channels: - rx_path: "LNAW" +- label: LimeNET-Micro + type: osmo-bts-trx + ipa_unit_id: 15 + addr: 10.42.42.53 + band: GSM-1800 + ciphers: [a5_0, a5_1] + osmo_trx: + type: lms + launch_trx: true + remote_user: pi + trx_ip: 10.42.42.123 + clock_reference: external + dev_args: "LimeNET-Micro,serial=005839AF25B352" + - label: sysmoCell 5000 type: osmo-bts-trx ipa_unit_id: 7 diff --git a/example/scenarios/trx-lms-limenet-micro.conf b/example/scenarios/trx-lms-limenet-micro.conf new file mode 100644 index 0000000..2e2c1cc --- /dev/null +++ b/example/scenarios/trx-lms-limenet-micro.conf @@ -0,0 +1,4 @@ +resources: + bts: + - label: LimeNET-Micro + type: osmo-bts-trx diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index f1fbdd1..9110d8a 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -295,35 +295,55 @@ os.chmod(wrapper_script, st.st_mode | stat.S_IEXEC) return wrapper_script + def inst_compatible_for_remote(self): + proc = process.run_remote_sync(self.run_dir, self.remote_user, self.listen_ip, 'uname-m', ('uname', '-m')) + if "x86_64" in (proc.get_stdout() or ''): + return True + return False + + def start_remotely(self, keepalive): + # Run remotely through ssh. We need to run osmo-trx under a wrapper + # script since osmo-trx ignores SIGHUP and will keep running after + # we close local ssh session. The wrapper script catches SIGHUP and + # sends SIGINT to it. + remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR) + remote_config_file = remote_run_dir.child(OsmoTrx.CONF_OSMO_TRX) + + have_inst = self.inst_compatible_for_remote() + if have_inst: + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx'))) + + # if self.inst is None, we still want to copy config file, create remote run dir, etc. + self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, remote_run_dir, self.remote_user, + self.listen_ip, self.binary_name(), self.config_file) + + wrapper_script = self.generate_wrapper_script() + remote_wrapper_script = remote_run_dir.child(OsmoTrx.WRAPPER_SCRIPT) + process.scp(self.run_dir, self.remote_user, self.listen_ip, 'scp-wrapper-to-remote', wrapper_script, remote_wrapper_script) + + if have_inst: + remote_lib = self.remote_inst.child('lib') + remote_binary = self.remote_inst.child('bin', self.binary_name()) + args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_wrapper_script, remote_binary, '-C', remote_config_file) + else: # Use whatever is available i nremote system PATH: + args = (remote_wrapper_script, self.binary_name(), '-C', remote_config_file) + + self.proc_trx = self.launch_process_remote(self.binary_name(), args, remote_cwd=remote_run_dir, keepalive=keepalive) + ############## # PUBLIC (test API included) ############## def start(self, keepalive=False): self.configure() + if self.remote_user: + self.start_remotely(keepalive) + return + # Run locally if ssh user is not set self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx'))) - if not self.remote_user: - # Run locally if ssh user is not set - lib = self.inst.child('lib') - self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } - self.proc_trx = self.launch_process_local(keepalive, self.binary_name(), - '-C', os.path.abspath(self.config_file)) - else: - # Run remotely through ssh. We need to run osmo-trx under a wrapper - # script since osmo-trx ignores SIGHUP and will keep running after - # we close local ssh session. The wrapper script catches SIGHUP and - # sends SIGINT to it. - wrapper_script = self.generate_wrapper_script() - remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR) - self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, remote_run_dir, self.remote_user, - self.listen_ip, self.binary_name(), self.config_file) - remote_wrapper_script = remote_run_dir.child(OsmoTrx.WRAPPER_SCRIPT) - remote_config_file = remote_run_dir.child(OsmoTrx.CONF_OSMO_TRX) - remote_lib = self.remote_inst.child('lib') - remote_binary = self.remote_inst.child('bin', self.binary_name()) - process.scp(self.run_dir, self.remote_user, self.listen_ip, 'scp-wrapper-to-remote', wrapper_script, remote_wrapper_script) - - args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_wrapper_script, remote_binary, '-C', remote_config_file) - self.proc_trx = self.launch_process_remote(self.binary_name(), args, remote_cwd=remote_run_dir, keepalive=keepalive) + lib = self.inst.child('lib') + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + self.proc_trx = self.launch_process_local(keepalive, self.binary_name(), + '-C', os.path.abspath(self.config_file)) def trx_ready(self): if not self.proc_trx or not self.proc_trx.is_running: -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16231 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I6bd76f6d7e0cb2b6f7bdde971b6515846048a341 Gerrit-Change-Number: 16231 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 13:47:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 13:47:53 +0000 Subject: Change in osmo-gsm-tester[master]: default-suites.confg: Add suites to test LimeNet-micro References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16232 ) Change subject: default-suites.confg: Add suites to test LimeNet-micro ...................................................................... default-suites.confg: Add suites to test LimeNet-micro Change-Id: I7f774e7bf6539c5afd1d3e35da765ba8d702fdb7 --- M example/default-suites.conf 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/32/16232/1 diff --git a/example/default-suites.conf b/example/default-suites.conf index 05967d6..a0dabdd 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -111,6 +111,24 @@ - dynts:trx-lms+mod-bts0-dynts67-ipa+cfg-codec-fr-any - dynts:trx-lms+mod-bts0-dynts67-osmo +- nitb_sms:trx-lms-limenet-micro +- sms:trx-lms-limenet-micro +- nitb_ussd:trx-lms-limenet-micro +- ussd:trx-lms-limenet-micro +- voice:trx-lms-limenet-micro+mod-bts0-ts-tchf+cfg-codec-fr1 +- voice:trx-lms-limenet-micro+mod-bts0-ts-tchf+cfg-codec-fr2 +- voice:trx-lms-limenet-micro+mod-bts0-ts-tchf+cfg-codec-fr3 +- voice:trx-lms-limenet-micro+mod-bts0-ts-tchh+cfg-codec-hr1 +- voice:trx-lms-limenet-micro+mod-bts0-ts-tchh+cfg-codec-hr3 +- voice:trx-lms-limenet-micro+mod-bts0-dynts-ipa+cfg-codec-fr-any +- voice:trx-lms-limenet-micro+mod-bts0-dynts-osmo +- gprs:trx-lms-limenet-micro +- gprs:trx-lms-limenet-micro+mod-bts0-egprs +- gprs:trx-lms-limenet-micro+mod-bts0-dynts-ipa +- gprs:trx-lms-limenet-micro+mod-bts0-dynts-osmo +- dynts:trx-lms-limenet-micro+mod-bts0-dynts67-ipa+cfg-codec-fr-any +- dynts:trx-lms-limenet-micro+mod-bts0-dynts67-osmo + - nitb_sms:nanobts - sms:nanobts+band-1900 - nitb_ussd:nanobts+band-1900 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16232 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I7f774e7bf6539c5afd1d3e35da765ba8d702fdb7 Gerrit-Change-Number: 16232 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 14:45:25 2019 From: gerrit-no-reply at lists.osmocom.org (mqng2) Date: Tue, 26 Nov 2019 14:45:25 +0000 Subject: Change in osmo-bsc[master]: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed wh... In-Reply-To: References: Message-ID: mqng2 has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15909 ) Change subject: RSL: Wrong CCCH_CONFIG in SI3 causes a lot of MO call setup failed when the BTS configured with none combined CCCH mode. ...................................................................... Abandoned Improved version of the fix has been submitted in master branch. Abandon this one for now. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15909 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I33ea7808ac1bd064b88fd609bd7dfe0c8aa341f2 Gerrit-Change-Number: 15909 Gerrit-PatchSet: 1 Gerrit-Owner: mqng2 Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: mqng2 Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 15:33:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 15:33:29 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester-prod: Set DNS server to a working service In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16224 ) Change subject: ansible: gsm-tester-prod: Set DNS server to a working service ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I443cc560553c07635763a13bc73ead4835e6a009 Gerrit-Change-Number: 16224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 26 Nov 2019 15:33:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 15:34:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 15:34:37 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... Patch Set 1: as nothing ever deletes or fluses the rules, you are adding two new rules on every ifup event. Maybe not quite what's intended? -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 15:34:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 15:37:33 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 15:37:33 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... Patch Set 1: > Patch Set 1: > > as nothing ever deletes or fluses the rules, you are adding two new rules on every ifup event. Maybe not quite what's intended? ewww yeah, I should check if the rule is alreay in there, I guess with iptables -L, or add a command with -D before the one with -A. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 15:37:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 15:38:32 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 26 Nov 2019 15:38:32 +0000 Subject: Change in osmo-bts[master]: l1sap.c: ensure ms power control loop is running References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16233 ) Change subject: l1sap.c: ensure ms power control loop is running ...................................................................... l1sap.c: ensure ms power control loop is running When a bad SACCH frame is received the processing of the frame is ended early and lchan_ms_pwr_ctrl() is not called. This means that the power control loop does not get informed about a situation where the signal level is very weak and increasing the ms power would make sense. In order to ensure that the power control keeps working on lost SAACH frames, lets call lchan_ms_pwr_ctrl() with dummy values. Related: OS#4281 Change-Id: I4fb85754b1a69376b02da7f4b175c6e8ec9cc35c --- M src/common/l1sap.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/33/16233/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index ad7ec83..cb188cc 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1249,6 +1249,8 @@ radio_link_timeout(lchan, 1); } + + lchan_ms_pwr_ctrl(lchan, lchan->ms_power_ctrl.current, 110); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16233 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4fb85754b1a69376b02da7f4b175c6e8ec9cc35c Gerrit-Change-Number: 16233 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 15:40:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 15:40:45 +0000 Subject: Change in libosmocore[master]: l1sap: add measurement related struct members In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15888 ) Change subject: l1sap: add measurement related struct members ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/c/libosmocore/+/15888/2/include/osmocom/gsm/l1sap.h File include/osmocom/gsm/l1sap.h: https://gerrit.osmocom.org/c/libosmocore/+/15888/2/include/osmocom/gsm/l1sap.h at 87 PS2, Line 87: flags > What is the purpose of these flags? And why only one bit? the flag determines whether a given measurement is part of the "RXLEV/RXQUAL-SUB", and not just -FULL. The SUB are contained of all SACCH blocks in uplink, plus some other blocks. Which blocks depends on the codec. FR/EFR/HR have some static block numbers (IIRC) while in AMR it's actually dynamically decided whcih block is part of SUB and which not. https://gerrit.osmocom.org/c/libosmocore/+/15888/2/include/osmocom/gsm/l1sap.h at 99 PS2, Line 99: ta_offs_qbits > The measurement processing makes use of this field, so its needed. [?] Indeed it's unclear why this is part of libosmocore. Maybe jolly wanted to also use it in other software outside of osmo-bts? In any case I'm not aware of such software. Maybe ask him directly, or on the mailing list. In any case, I think it's not a good idea to merge changes here if you don't fully understand what they do, sorry. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15888 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2c34b02d329f9df190c5035c396403ca0a4f9c42 Gerrit-Change-Number: 15888 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 15:40:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 15:41:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 15:41:00 +0000 Subject: Change in osmo-gsm-tester[master]: resources.conf: Mark osmo-bts-trx as supporting a5/3 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16227 ) Change subject: resources.conf: Mark osmo-bts-trx as supporting a5/3 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16227 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I478e0719589a8055e7b16536e679d2801efc5caf Gerrit-Change-Number: 16227 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 15:41:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 15:41:10 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 15:41:10 +0000 Subject: Change in osmo-gsm-tester[master]: bts_osmotrx: Allow Setting Rx/TX paths through resources.conf In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16228 ) Change subject: bts_osmotrx: Allow Setting Rx/TX paths through resources.conf ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iddb0f20366c3242098bdf869f39fc3e2244c13e7 Gerrit-Change-Number: 16228 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 15:41:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 15:49:44 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Tue, 26 Nov 2019 15:49:44 +0000 Subject: Change in osmo-bts[master]: l1sap.c: ensure ms power control loop is running In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/16233 to look at the new patch set (#2). Change subject: l1sap.c: ensure ms power control loop is running ...................................................................... l1sap.c: ensure ms power control loop is running When a bad SACCH frame is received the processing of the frame is ended early and lchan_ms_pwr_ctrl() is not called. This means that the power control loop does not get informed about a situation where the signal level is very weak and increasing the ms power would make sense. In order to ensure that the power control keeps working on lost SAACH frames, lets call lchan_ms_pwr_ctrl() with dummy values. Related: OS#4281 Change-Id: I4fb85754b1a69376b02da7f4b175c6e8ec9cc35c --- M src/common/l1sap.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/33/16233/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16233 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4fb85754b1a69376b02da7f4b175c6e8ec9cc35c Gerrit-Change-Number: 16233 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 16:03:15 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 26 Nov 2019 16:03:15 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#11) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... add libosmo-mslookup and mDNS implementation Create a library with generic functions for performing a distributed subscriber lookup, which allow querying IPs and ports of services by MSISDN/IMSI. For a detailed overview of this and upcoming patches, please see the elaborate comment at the top of mslookup.c. The first implementation uses multicast DNS packets. I decided to write custom DNS functions instead of using libc-ares (which we use in OsmoSGSN already), because it is only a DNS client implementation and we need both client and server. The DNS code is abstracted from the mslookup specific code, so the DNS part could in theory be replaced with a third party library in the future. We decided to place the mslookup library in the OsmoHLR source tree (instead of libosmocore), because the way we have implemented the D-GSM network, OsmoHLR will be the only user of the library for now. In the future, OsmoMSC may need it, but it depends on OsmoHLR already. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A include/osmocom/mslookup/mslookup_client_mdns.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_msg.h A src/mslookup/mdns_record.c A src/mslookup/mdns_record.h A src/mslookup/mdns_rfc.c A src/mslookup/mdns_rfc.h A src/mslookup/mdns_sock.c A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c A src/mslookup/mslookup_client_mdns.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 39 files changed, 4,449 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/11 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 11 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 16:03:15 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 26 Nov 2019 16:03:15 +0000 Subject: Change in osmo-hlr[master]: add lu_fsm and osmo_gsup_req In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#11) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: add lu_fsm and osmo_gsup_req ...................................................................... add lu_fsm and osmo_gsup_req These are seemingly orthogonal changes in one patch, because they are in fact sufficiently intertwined that we are not willing to spend the time to separate them. They are also refactoring changes, unlikely to make sense on their own. ** lu_fsm: Attempting to make luop.c keep state about incoming GSUP requests made me find shortcomings in several places: - since it predates osmo_fsm, it is a state machine that does not strictly enforce the order of state transitions or the right sequence of incoming events. - several places OSMO_ASSERT() on data received from the network. - modifies the subscriber state before a LU is accepted. - dead code about canceling a subscriber in a previous VLR. That would be a good thing to actually do, which should also be trivial now that we record vlr_name and sgsn_name, but I decided to remove the dead code for now. To both step up the LU game *and* make it easier for me to integrate osmo_gsup_req handling, I decided to create a lu_fsm, drawing from my, by now, ample experience of writing osmo_fsms. ** osmo_gsup_req: Prepare for D-GSM, where osmo-hlr will do proxy routing for remote HLRs / communicate with remote MSCs via a proxy: a) It is important that a response that osmo-hlr generates and that is sent back to a requesting MSC contains all IEs that are needed to route it back to the requester. Particularly source_name must become destination_name in the response to be able to even reach the requesting MSC. Other fields are also necessary to match, which were so far taken care of in individual numerous code paths. b) For some operations, the response to a GSUP request is generated asynchronously (like Update Location Request -> Response, or taking the response from an EUSE, or the upcoming proxying to a remote HLR). To be able to feed a request message's information back into the response, we must thus keep the request data around. Since struct osmo_gsup_message references a lot of external data, usually with pointers directly into the received msgb, it is not so trivial to pass GSUP message data around asynchronously, on its own. osmo_gsup_req is the combined solution for both a and b: it keeps all data for a GSUP message by taking ownership of the incoming msgb, and it provides an explicit API "forcing" callers to respond with osmo_gsup_req_respond(), so that all code paths trivially are definitely responding with the correct IEs set to match the request's routing (by using osmo_gsup_make_response() recently added to libosmocore). Adjust all osmo-hlr code paths to use *only* osmo_gsup_req to respond to incoming requests received on the GSUP server (above LU code being one of them). In fact, the same should be done on the client side. Hence osmo_gsup_req is implemented in a server/client agnostic way, and is placed in libosmo-gsupclient. As soon as we see routing errors in complex GSUP setups, using osmo_gsup_req in the related GSUP client is likely to resolve those problems without much thinking required beyond making all code paths use it. libosmo-gsupclient is hence added to osmo-hlr binary's own library dependencies. It would have been added by the D-GSM proxy routing anyway, we are just doing it a little sooner. ** global_title.c / osmo_gt: We so far handle a Global Title a.k.a. an IPA unit name as pointer + size, or as just pointer with implicit talloc size. To ease working with GSUP peer identification data, I require: - a non-allocated storage of a Global Title. It brings the drawback of being size limited, but our current implementation is anyway only able to handle MSC and SGSN names of 31 characters (see struct hlr_subscriber). - a single-argument handle for Global Title, - easy to use utility functions like osmo_gt_name(), osmo_gt_cmp(), and copying by simple assignment, a = b. Hence this patch adds a osmo_gt in global_title.h and global_title.c. Heavily used in LU and osmo_gsup_req. Depends: libosmocore Id9692880079ea0f219f52d81b1923a76fc640566 Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 --- M include/Makefile.am A include/osmocom/gsupclient/global_title.h A include/osmocom/gsupclient/gsup_req.h M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/db.h M include/osmocom/hlr/gsup_router.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/lu_fsm.h D include/osmocom/hlr/luop.h M src/Makefile.am M src/db.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/gsupclient/Makefile.am A src/gsupclient/global_title.c M src/gsupclient/gsup_client.c A src/gsupclient/gsup_req.c M src/hlr.c M src/hlr_ussd.c M src/logging.c A src/lu_fsm.c D src/luop.c M tests/db/Makefile.am M tests/db/db_test.c M tests/db/db_test.err M tests/gsup_server/Makefile.am M tests/test_nodes.vty 32 files changed, 1,225 insertions(+), 904 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/16205/11 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 11 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 16:03:15 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 26 Nov 2019 16:03:15 +0000 Subject: Change in osmo-hlr[master]: add mslookup_manual_test In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#11) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16210 ) Change subject: add mslookup_manual_test ...................................................................... add mslookup_manual_test This can be used for manually testing proxy routing. It is not run as part of the testsuite. Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 --- M .gitignore M configure.ac M tests/Makefile.am A tests/mslookup_manual_test/Makefile.am A tests/mslookup_manual_test/fake_msc.c A tests/mslookup_manual_test/osmo-hlr-1.cfg A tests/mslookup_manual_test/osmo-hlr-2.cfg A tests/mslookup_manual_test/run.sh 8 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/10/16210/11 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 Gerrit-Change-Number: 16210 Gerrit-PatchSet: 11 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 16:03:28 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 26 Nov 2019 16:03:28 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... Patch Set 10: (29 comments) Thanks for the reviews! I've pushed an update to address everything, except for splitting this up in multiple patches. > Please provide separate commits with an introduction for each layer and how it will be used by other objects and which objects will it use. I'll do that tomorrow. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/configure.ac File configure.ac: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/configure.ac at 182 PS9, Line 182: libosmo-mslookup.pc > Yes. We want to make mslookup integrate-able by any client programs. [?] In particular, it would make sense for OsmoMSC in combination with SMS over GSUP. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/debian/control File debian/control: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/debian/control at 75 PS9, Line 75: Depends: ${shlibs:Depends}, > (@osmith? ... [?] Ack https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/hlr/logging.h File include/osmocom/hlr/logging.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/hlr/logging.h at 11 PS9, Line 11: DMSLOOKUP, > Using this name isn't really a problem, is it? Any abbreviation I can think of would make it hard to [?] Changed to DMSLKP. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h File include/osmocom/mslookup/mdns_sock.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 1 PS9, Line 1: /* Copyright 2019 by sysmocom s.f.m.c. GmbH > Looks like this file and mdns.h can be merged. mdns_sock is just about the socket related functions, while mdns.h is part of the stack that builds the mdns packets (therefore I'd rather not merge the two files): * mdns.h: encoding and decoding mslookup query/result * mdns_msg.h/mdns_record.h: encoding and decoding whole dns packets (request/answer); answer consists of multiple records * mdns_rfc.h: encoding and decoding sections of dns packets (header, question/record) and qname mdns_msg.h and mdns_record.h will be merged, as discussed with Neels. I'll split this patch up, to introduce one layer at a time. Then this hopefully makes more sense, and it also makes reviewing easier. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 26 PS9, Line 26: struct addrinfo *ai; > ah, you mean the #include Added #include . https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 30 PS9, Line 30: int (*cb)(struct osmo_fd *fd, unsigned int what), > the API doc in mdns_sock.c hints at it, but I'm adding a comment there. Couldn't find your update (maybe not committed?), but I've updated the apidoc comment to: * \param[in] cb callback for incoming data that will be passed to osmo_fd_setup (should read from osmo_fd->fd). https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 32 PS9, Line 32: int osmo_mdns_sock_send(const struct osmo_mdns_sock *mdns_sock, struct msgb *msg); > (it doesn't close the socket implicitly. [?] Looking at sendto being used in libosmocore, we don't implicitly close the socket. Instead we return sendto's return code. But the callers never close the socket on error from what I can find: * https://git.osmocom.org/libosmocore/tree/src/gb/gprs_ns.c?id=8a7eed50dbd7fc05a1c3bbf302ef8e42a5698a98#n2012 * https://git.osmocom.org/libosmocore/tree/src/gb/gprs_ns_frgre.c?id=8a7eed50dbd7fc05a1c3bbf302ef8e42a5698a98#n142 * https://git.osmocom.org/libosmocore/tree/src/gb/gprs_ns_frgre.c?id=8a7eed50dbd7fc05a1c3bbf302ef8e42a5698a98#n306 * https://git.osmocom.org/libosmocore/tree/src/stats.c?id=8a7eed50dbd7fc05a1c3bbf302ef8e42a5698a98#n459 This means, not doing it implicitly would follow what we are doing already. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h File include/osmocom/mslookup/mslookup.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h at 29 PS9, Line 29: #define OSMO_MSLOOKUP_SERVICE_HLR_GSUP "gsup.hlr" > We could in fact also drop them, except for the "gsup. [?] Done (Neels removed them) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h at 113 PS9, Line 113: int osmo_mslookup_query_from_domain_str(struct osmo_mslookup_query *q, const char *domain); > ack Done (Neels renamed it, just replying so I can mark this as "resolved" in gerrit. Same with following "Done" comments, if Neels already replied with "ack" etc., he fixed them and I'm just marking it as resolved here so I know what is still open.) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup_client.h File include/osmocom/mslookup/mslookup_client.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup_client.h at 35 PS9, Line 35: /*! This part of a lookup request is not seen by the individual query method implementations. */ > adjusting API doc.... Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup_client.h at 95 PS9, Line 95: struct osmo_mslookup_client_method { > ack Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/libosmo-mslookup.pc.in File libosmo-mslookup.pc.in: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/libosmo-mslookup.pc.in at 9 PS9, Line 9: Libs: -L${libdir} @TALLOC_LIBS@ -losmogsm -losmo-mslookup -losmocore > hmm, checking... [?] Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c File src/mslookup/mdns.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 1 PS9, Line 1: /* mslookup specific functions for encoding and decoding mslookup queries/results into mDNS packets, using the high > (leaving this file for osmith) Ack https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 76 PS9, Line 76: msgb_free(msg); > missing "talloc_free(req.domain);" here? [?] Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 86 PS9, Line 86: * NULL on error. > No need for new line. Removed this new line and similar ones from all the \returns apidocs added in this patch. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 98 PS9, Line 98: query = talloc_zero(ctx, struct osmo_mslookup_query); > should OSMO_ASSERT(query) here Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 106 PS9, Line 106: if (req) > this if is not needed. Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 108 PS9, Line 108: if (query) > this if is not needed. Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 127 PS9, Line 127: osmo_sockaddr_str_from_32(sockaddr_str, *(uint32_t *)rec->data, 0); > use osmo_loadbe or whatever here, you may incurr into unaligned access? osmo_sockaddr_str_from_32 expects the input to be network-byte-order. https://git.osmocom.org/libosmocore/tree/src/sockaddr_str.c?id=8a7eed50dbd7fc05a1c3bbf302ef8e42a5698a98#n258 https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_msg.c File src/mslookup/mdns_msg.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_msg.c at 92 PS9, Line 92: * -EINVAL on error. > new line not needed. Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_msg.c at 114 PS9, Line 114: if (osmo_mdns_rfc_record_encode(ctx, msg, &rec) != 0) I'm a bit undecided about this, since all osmo_mdns_rfc_*_encode functions with a msgb argument are appending to the msgb. Should I call all of them _encode_append then? I found some existing functions in libosmocore too, which are appending to a msgb, but are also just called _encode(), not _encode_append(): * gsup.c: encode_pdp_info, encode_auth_info, osmo_gsup_encode_an_apdu * gsm48_ie.c: gsm48_encode_bearer_cap, gsm48_encode_cccap, gsm48_encode_called, ... So with these findings, I'm leaning more towards keeping the encode() name (as it is more consistent) unless there is a good reason to change it. I'll update the apidocs of these osmo_mdns_rfc_*_encode functions to make clear, that they are appending to msgb. > (it encodes a single record, makes sense to me) What makes sense to you, what Pau proposed or how it was in the patch? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c File src/mslookup/mdns_record.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c at 35 PS9, Line 35: ret->data = (uint8_t *)talloc_asprintf(ctx, "%c%s=%s", (char)len, key, value); Yes, I'm sure that this is correct. https://tools.ietf.org/html/rfc1035#section-3.3.14 > 3.3.14. TXT RDATA format +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / TXT-DATA / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ > > where: > > TXT-DATA One or more s. and https://tools.ietf.org/html/rfc1035#section-3.3 > is a single length octet followed by that number of characters. is treated as binary information, and can be up to 256 characters in length (including the length octet). (Which makes the length information redundant, because the resource record already has a defined length... not sure what they were thinking. -- https://tools.ietf.org/html/rfc1035#section-4.1.3 ) I had this wrong at first, because I did not look up the definition of and thought it was just a regular string, without the length byte in front. But it became obvious in wireshark, and there it also displays correctly after I've implemented properly. I'll add a more descriptive comment, and a max length check. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c at 39 PS9, Line 39: ret->length = len + 1; > and here. Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c at 45 PS9, Line 45: * NULL on error. > all around: new line not needed. Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_rfc.c File src/mslookup/mdns_rfc.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_rfc.c at 122 PS9, Line 122: osmo_store16be(buf->id, &buf->id); > wtf? is it really worth memcpying everything then changing tons of stuff in place? The struct osmo_mdns_rfc_header has bitfields and uint16: struct osmo_mdns_rfc_header { #if OSMO_IS_LITTLE_ENDIAN uint16_t id; uint8_t rd:1, tc:1, aa:1, opcode:4, qr:1; /* QR (0: query, 1: response) */ uint8_t rcode:4, z:3, ra:1; uint16_t qdcount; /* Number of questions */ uint16_t ancount; /* Number of answers */ uint16_t nscount; /* Number of authority records */ uint16_t arcount; /* Number of additional records */ #elif OSMO_IS_BIG_ENDIAN ... #endif } __attribute__ ((packed)); I'm doing the memcpy to fill out the bitfields correctly, and osmo_store16be to fix up the uint16_ts. > This should suffice: This does not work, because then the bytes in uint16_t (id, qdcount, ...) are swapped. Wireshark shows 256 questions (question sections) instead of one. diff --git a/tests/mslookup/mdns_test.err b/tests/mslookup/mdns_test.err index 51e5afe6..3cb1ddcb 100644 --- a/tests/mslookup/mdns_test.err +++ b/tests/mslookup/mdns_test.err @@ -95,7 +95,7 @@ header in: .ancount = 0 .nscount = 0 .arcount = 0 -encoded: 05 39 00 00 00 01 00 00 00 00 00 00 +encoded: 39 05 00 00 01 00 00 00 00 00 00 00 header out: .id = 1337 .qr = 0 @@ -128,7 +128,7 @@ header in: .ancount = 1111 .nscount = 2222 .arcount = 3333 -encoded: 00 2a 97 a3 04 d2 04 57 08 ae 0d 05 +encoded: 2a 00 97 a3 d2 04 57 04 ae 08 05 0d header out: .id = 42 .qr = 1 https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_rfc.c at 134 PS9, Line 134: > here just [?] Does not work, see above. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_sock.c File src/mslookup/mdns_sock.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_sock.c at 40 PS9, Line 40: * will not only be called when someone else is sending data, but also for data that was sent from this osmo_mdns_sock. > the point is that a multicast socket receives everything, also what it sends itself, so as soon as y [?] Done https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_sock.c at 44 PS9, Line 44: * \param[in] cb callback for incoming data (should read from osmo_fd->fd). I have this now, which should make it obvious that it becomes "struct osmo_fd"'s callback: > * \param[in] cb callback for incoming data that will be passed to osmo_fd_setup (should read from osmo_fd->fd). https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mslookup.c at 148 PS9, Line 148: if (result->host_v4.ip[0]) { > host_v4.ip is a char[], it is checking for an empty string. Ack -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 16:03:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 16:04:17 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 16:04:17 +0000 Subject: Change in osmo-bts[master]: rsl: ensure measurement reports are sent In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16170 ) Change subject: rsl: ensure measurement reports are sent ...................................................................... Patch Set 3: Code-Review+1 Leaving final review for @fixeria -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2 Gerrit-Change-Number: 16170 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 16:04:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 16:04:32 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Tue, 26 Nov 2019 16:04:32 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... Patch Set 11: (1 comment) (marking all comments as resolved) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/10/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/10/src/mslookup/mslookup.c at 27 PS10, Line 27: * Distributed GSM: finding subscribers > ... [?] Ack -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 11 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 16:04:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 16:06:46 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 16:06:46 +0000 Subject: Change in osmo-bts[master]: l1sap.c: ensure ms power control loop is running In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16233 ) Change subject: l1sap.c: ensure ms power control loop is running ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/c/osmo-bts/+/16233/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/16233/2//COMMIT_MSG at 13 PS2, Line 13: order to ensure that the power control keeps working on lost SAACH SACCH https://gerrit.osmocom.org/c/osmo-bts/+/16233/2//COMMIT_MSG at 14 PS2, Line 14: frames, lets call lchan_ms_pwr_ctrl() with dummy values. "dummy MS power value." And actually the value is not dummy, rather called "estimated". "lets call lchan_ms_pwr_ctrl() with estimated MS power value (the one requested). -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16233 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4fb85754b1a69376b02da7f4b175c6e8ec9cc35c Gerrit-Change-Number: 16233 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 16:06:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 16:14:01 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 16:14:01 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... Patch Set 11: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mslookup.c at 148 PS9, Line 148: if (result->host_v4.ip[0]) { > Ack I personally welcome checking against NULL character using the related character '\0' then. Let's better not use notation usually used by pointers or integers, it's more clear when reading the code without knowing the details. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 11 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 16:14:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Comment-In-Reply-To: osmith Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 17:01:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 17:01:59 +0000 Subject: Change in simtrace2[master]: qmod: lower VCC threshold to 2.5V In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16225 ) Change subject: qmod: lower VCC threshold to 2.5V ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16225 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Iac2778903690045e4e63fef29f812205d00c28ed Gerrit-Change-Number: 16225 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 17:01:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 17:02:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 17:02:00 +0000 Subject: Change in simtrace2[master]: qmod: lower VCC threshold to 2.5V In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16225 ) Change subject: qmod: lower VCC threshold to 2.5V ...................................................................... qmod: lower VCC threshold to 2.5V on the QMOD board the VCC signal from the modem is measured using an ADC (SIMtrace board just use card detect). the threshold to consider VCC as activated was set to 2.8V, which gives a bit of margin for the expected 3.0V. still, we had one board where the voltage was 2.8V. to be resilient against lower than expected voltages from modems (or boards), we lowered the threshold to 2.5V. this is still save for the SAM3S to correctly identify high/low levels. Change-Id: Iac2778903690045e4e63fef29f812205d00c28ed --- M firmware/libcommon/source/mode_cardemu.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/firmware/libcommon/source/mode_cardemu.c b/firmware/libcommon/source/mode_cardemu.c index 2d1a687..704e6ba 100644 --- a/firmware/libcommon/source/mode_cardemu.c +++ b/firmware/libcommon/source/mode_cardemu.c @@ -309,7 +309,7 @@ } #define VCC_UV_THRESH_1V8 1500000 -#define VCC_UV_THRESH_3V 2800000 +#define VCC_UV_THRESH_3V 2500000 static void process_vcc_adc(struct cardem_inst *ci) { -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16225 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Iac2778903690045e4e63fef29f812205d00c28ed Gerrit-Change-Number: 16225 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 17:20:54 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 17:20:54 +0000 Subject: Change in osmo-gsm-tester[master]: process: Return proc in function helpers In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16229 ) Change subject: process: Return proc in function helpers ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I60a18dcf699ebeaced951f7d5ff188f573772282 Gerrit-Change-Number: 16229 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 17:20:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 17:28:58 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 17:28:58 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... ansible: gsm-tester: Enable ip forwarding and masquerading on boot Some nodes in the internal network, such as LimeNetMicro, will need Internet access to upgrade osmo-trx-lms from OBS repos. It also makes it easier to update manually other nodes inside the internal network. Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 --- M ansible/roles/gsm-tester-network/README.md M ansible/roles/gsm-tester-network/defaults/main.yml M ansible/roles/gsm-tester-network/tasks/main.yml A ansible/roles/gsm-tester-network/templates/etc/iptables-ogt 4 files changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/26/16226/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 17:28:59 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 17:28:59 +0000 Subject: Change in osmo-ci[master]: ansible: Fix several file permission mask format References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16234 ) Change subject: ansible: Fix several file permission mask format ...................................................................... ansible: Fix several file permission mask format >From ansible documentation [1]: """ For those used to /usr/bin/chmod remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like 0644 or 01777) or quote it (like '644' or '1777') so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. """ [1] https://docs.ansible.com/ansible/latest/modules/template_module.html?highlight=template Change-Id: I91008927c50016a837420c4249b5f69b9153572e --- M ansible/roles/gsm-tester/tasks/main.yml M ansible/roles/install-coverity/tasks/main.yml M ansible/roles/install-poky-sdk/tasks/main.yml 3 files changed, 7 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/34/16234/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 34846a5..d880127 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -191,7 +191,7 @@ file: path: /usr/sbin/tcpdump group: osmo-gsm-tester - mode: 750 + mode: 0750 - name: create a symlink for tcpdump file: @@ -219,7 +219,7 @@ copy: src: osmo-gsm-tester_setcap_net_raw.sh dest: /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh - mode: 755 + mode: 0755 - name: allow osmo-gsm-tester sudo osmo-gsm-tester_setcap_net_raw.sh copy: @@ -232,7 +232,7 @@ copy: src: osmo-gsm-tester_setcap_net_admin.sh dest: /usr/local/bin/osmo-gsm-tester_setcap_net_admin.sh - mode: 755 + mode: 0755 - name: allow osmo-gsm-tester sudo osmo-gsm-tester_setcap_net_admin.sh copy: @@ -245,7 +245,7 @@ copy: src: osmo-gsm-tester_netns_exec.sh dest: /usr/local/bin/osmo-gsm-tester_netns_exec.sh - mode: 755 + mode: 0755 - name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_exec.sh copy: @@ -258,7 +258,7 @@ copy: src: osmo-gsm-tester_netns_setup.sh dest: /usr/local/bin/osmo-gsm-tester_netns_setup.sh - mode: 755 + mode: 0755 - name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_setup.sh copy: diff --git a/ansible/roles/install-coverity/tasks/main.yml b/ansible/roles/install-coverity/tasks/main.yml index 200a349..886dda2 100644 --- a/ansible/roles/install-coverity/tasks/main.yml +++ b/ansible/roles/install-coverity/tasks/main.yml @@ -3,7 +3,7 @@ copy: src: "{{ coverity_installer_file }}" dest: "/tmp/{{ coverity_installer_file }}" - mode: 750 + mode: 0750 register: coverity_copy ignore_errors: yes tags: [coverity] @@ -36,4 +36,3 @@ msg: "Ansible can not find {{ coverity_installer_file }}" when: coverity_copy.failed tags: [coverity] - diff --git a/ansible/roles/install-poky-sdk/tasks/main.yml b/ansible/roles/install-poky-sdk/tasks/main.yml index 85b310a..7f95dce 100644 --- a/ansible/roles/install-poky-sdk/tasks/main.yml +++ b/ansible/roles/install-poky-sdk/tasks/main.yml @@ -12,7 +12,7 @@ copy: src: "{{ poky_installer_file }}" dest: "/tmp/{{ poky_installer_file }}" - mode: 750 + mode: 0750 register: poky_copy ignore_errors: yes tags: [poky] @@ -45,4 +45,3 @@ msg: "Ansible can not find or copy {{ poky_installer_file }}" when: poky_copy.failed tags: [poky] - -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I91008927c50016a837420c4249b5f69b9153572e Gerrit-Change-Number: 16234 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:10:07 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 18:10:07 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester-prod: Set DNS server to a working service In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16224 ) Change subject: ansible: gsm-tester-prod: Set DNS server to a working service ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I443cc560553c07635763a13bc73ead4835e6a009 Gerrit-Change-Number: 16224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 18:10:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:10:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 18:10:09 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester-prod: Set DNS server to a working service In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16224 ) Change subject: ansible: gsm-tester-prod: Set DNS server to a working service ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I443cc560553c07635763a13bc73ead4835e6a009 Gerrit-Change-Number: 16224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 18:10:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:10:12 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 18:10:12 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester-prod: Set DNS server to a working service In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16224 ) Change subject: ansible: gsm-tester-prod: Set DNS server to a working service ...................................................................... ansible: gsm-tester-prod: Set DNS server to a working service 10.42.42.2 is simply one of the IP addresses assigned to osmo-gsm-tester main unit on its own internal network (the one used between itself and the connected BTS or helper hosts). There's no DNS server running there. The main unit already runs lots of services, and there's really no need for a DNS server running there, so simply point it to a working DNS server. Change-Id: I443cc560553c07635763a13bc73ead4835e6a009 --- M ansible/setup-gsm-tester.yml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: osmith: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved; Verified diff --git a/ansible/setup-gsm-tester.yml b/ansible/setup-gsm-tester.yml index 99cc3e4..43ef753 100644 --- a/ansible/setup-gsm-tester.yml +++ b/ansible/setup-gsm-tester.yml @@ -51,6 +51,6 @@ udhcpd_range_start: 10.42.42.230 udhcpd_range_end: 10.42.42.235 udhcpd_subnet: 255.255.255.0 - udhcpd_dns: 10.42.42.2 + udhcpd_dns: 8.8.8.8 udhcpd_interface: enp2s0 # udhcpd_static_leases is set via host_vars/* -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I443cc560553c07635763a13bc73ead4835e6a009 Gerrit-Change-Number: 16224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:10:27 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 18:10:27 +0000 Subject: Change in osmo-gsm-tester[master]: resources.conf: Mark osmo-bts-trx as supporting a5/3 In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16227 ) Change subject: resources.conf: Mark osmo-bts-trx as supporting a5/3 ...................................................................... resources.conf: Mark osmo-bts-trx as supporting a5/3 Change-Id: I478e0719589a8055e7b16536e679d2801efc5caf --- M example/resources.conf.prod M example/resources.conf.rnd 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 0bf9f45..5b4185b 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -25,7 +25,7 @@ ipa_unit_id: 6 addr: 10.42.42.50 band: GSM-1800 - ciphers: [a5_0, a5_1] + ciphers: [a5_0, a5_1, a5_3] osmo_trx: type: uhd launch_trx: true @@ -40,7 +40,7 @@ ipa_unit_id: 12 addr: 10.42.42.54 band: GSM-1800 - ciphers: [a5_0, a5_1] + ciphers: [a5_0, a5_1, a5_3] osmo_trx: type: uhd launch_trx: true @@ -54,7 +54,7 @@ ipa_unit_id: 11 addr: 10.42.42.53 band: GSM-1800 - ciphers: [a5_0, a5_1] + ciphers: [a5_0, a5_1, a5_3] osmo_trx: type: lms launch_trx: true @@ -68,7 +68,7 @@ ipa_unit_id: 7 addr: 10.42.42.51 band: GSM-1800 - ciphers: [a5_0, a5_1] + ciphers: [a5_0, a5_1, a5_3] trx_list: - power_supply: type: 'intellinet' diff --git a/example/resources.conf.rnd b/example/resources.conf.rnd index 0fad50f..5358a61 100644 --- a/example/resources.conf.rnd +++ b/example/resources.conf.rnd @@ -33,7 +33,7 @@ remote_user: jenkins trx_ip: 127.0.0.1 dev_args: "type=b200,serial=30A9FFB" - ciphers: [a5_0, a5_1] + ciphers: [a5_0, a5_1, a5_3] - label: NanoBTS-ONW-1900 type: nanobts -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16227 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I478e0719589a8055e7b16536e679d2801efc5caf Gerrit-Change-Number: 16227 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:21:54 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 26 Nov 2019 18:21:54 +0000 Subject: Change in osmo-ci[master]: ansible: Fix several file permission mask format In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16234 ) Change subject: ansible: Fix several file permission mask format ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I91008927c50016a837420c4249b5f69b9153572e Gerrit-Change-Number: 16234 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 26 Nov 2019 18:21:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:25:15 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 26 Nov 2019 18:25:15 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... Patch Set 2: Code-Review-1 where do you set /proc/sys/net/ip_forward = 1 ? -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 18:25:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:26:33 2019 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 26 Nov 2019 18:26:33 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ci/+/16226/2/ansible/roles/gsm-tester-network/defaults/main.yml File ansible/roles/gsm-tester-network/defaults/main.yml: https://gerrit.osmocom.org/c/osmo-ci/+/16226/2/ansible/roles/gsm-tester-network/defaults/main.yml at 3 PS2, Line 3: bts_interface: enp2s0 : gw_interface: enp1s0 both should be eth1 as the docs sad. The value in parenthesis should be the default -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 18:26:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:09 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:09 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: Add card_uart driver for ASF4 USART In-Reply-To: References: Message-ID: Hoernchen has uploaded a new patch set (#6) to the change originally created by laforge. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15723 ) Change subject: WIP: Add card_uart driver for ASF4 USART ...................................................................... WIP: Add card_uart driver for ASF4 USART Change-Id: I9a141e9d2125fbfc992ad51aa4b11a39ee186607 --- M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.h A sysmoOCTSIM/cuart_driver_asf4_usart_async.c 3 files changed, 255 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/23/15723/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15723 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9a141e9d2125fbfc992ad51aa4b11a39ee186607 Gerrit-Change-Number: 15723 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Assignee: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:10 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:10 +0000 Subject: Change in osmo-ccid-firmware[master]: make it work, async uart (mode 0x1/0x7 does not matter), requires delay References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235 ) Change subject: make it work, async uart (mode 0x1/0x7 does not matter), requires delay ...................................................................... make it work, async uart (mode 0x1/0x7 does not matter), requires delay Change-Id: Ia9d3b099181c24feabdb6a5fddb8db6c44efb72d --- M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M sysmoOCTSIM/config/hpl_sercom_config.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c M sysmoOCTSIM/talloc.c M sysmoOCTSIM/usb/class/ccid/device/ccid_df.c M sysmoOCTSIM/usb_descriptors.c A sysmoOCTSIM/usb_descriptors.h 12 files changed, 1,055 insertions(+), 762 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/35/16235/1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 621bef7..870cf35 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -80,9 +80,10 @@ osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_POWER_UP_IND, NULL); cs->icc_powered = true; card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK, true); - usleep(10000); - card_uart_ctrl(ss->cuart, CUART_CTL_RST, false); + delay_us(10000); + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_RESET_REL_IND, NULL); + card_uart_ctrl(ss->cuart, CUART_CTL_RST, false); msgb_free(msg); /* continues in iso_fsm_clot_user_cb once ATR is received */ @@ -151,8 +152,10 @@ if (enable) { card_uart_ctrl(ss->cuart, CUART_CTL_POWER, true); + cs->icc_powered = true; } else { card_uart_ctrl(ss->cuart, CUART_CTL_POWER, false); + cs->icc_powered = false; } } @@ -185,31 +188,35 @@ return 0; } - +extern void *g_tall_ctx; static int iso_fsm_slot_init(struct ccid_slot *cs) { - void *ctx = NULL; /* FIXME */ + void *ctx = g_tall_ctx; /* FIXME */ struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct card_uart *cuart = talloc_zero(ctx, struct card_uart); - char id_buf[16]; - char *devname = NULL; + char id_buf[16] = "SIM0"; + char devname[] = "foobar"; int rc; LOGPCS(cs, LOGL_DEBUG, "%s\n", __func__); /* HACK: make this in some way configurable so it works both in the firmware * and on the host (functionfs) */ - if (cs->slot_nr == 0) { - cs->icc_present = true; - devname = "/dev/ttyUSB5"; - } +// if (cs->slot_nr == 0) { +// cs->icc_present = true; +// devname = "/dev/ttyUSB5"; +// } + devname[0] = cs->slot_nr +0x30; + devname[1] = 0; + //sprintf(devname, "%d", cs->slot_nr); if (!cuart) return -ENOMEM; - snprintf(id_buf, sizeof(id_buf), "SIM%d", cs->slot_nr); + //snprintf(id_buf, sizeof(id_buf), "SIM%d", cs->slot_nr); + id_buf[3] = cs->slot_nr +0x30; if (devname) { - rc = card_uart_open(cuart, "tty", devname); + rc = card_uart_open(cuart, "asf4", devname); if (rc < 0) { LOGPCS(cs, LOGL_ERROR, "Cannot open UART %s: %d\n", devname, rc); talloc_free(cuart); diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 21378e0..beda7ab 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -633,6 +633,10 @@ osmo_fsm_inst_state_chg_ms(fi, ATR_S_WAIT_TCK, guard_time_ms, T_GUARD); break; + } else { + /* no TCK present, ATR complete; notify parent */ + osmo_fsm_inst_state_chg(fi, ATR_S_DONE, 0, 0); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_ATR_DONE_IND, atp->atr); } } else { break; diff --git a/sysmoOCTSIM/config/hpl_sercom_config.h b/sysmoOCTSIM/config/hpl_sercom_config.h index beac040..4526665 100644 --- a/sysmoOCTSIM/config/hpl_sercom_config.h +++ b/sysmoOCTSIM/config/hpl_sercom_config.h @@ -52,7 +52,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_0_USART_SBMODE -#define CONF_SERCOM_0_USART_SBMODE 0 +#define CONF_SERCOM_0_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -70,7 +70,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_0_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_0_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_0_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index 3be0d65..f9856f3 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -47,6 +47,16 @@ card_uart_notification(cuart, CUART_E_TX_COMPLETE, io_descr->tx_buffer); } +#include +#include + + +static void _SIM_error_cb(const struct usart_async_descriptor *const descr){ + volatile uint32_t status = hri_sercomusart_read_STATUS_reg(descr->device.hw); + volatile uint32_t data = hri_sercomusart_read_DATA_reg(descr->device.hw); + volatile uint32_t errrs = hri_sercomusart_read_RXERRCNT_reg(descr->device.hw); + OSMO_ASSERT(0 == 1) +} /* the below ugli-ness is required as the usart_async_descriptor doesn't have * some kind of 'private' member that could provide the call-back anty kind of @@ -124,6 +134,139 @@ SIM4_tx_cb, SIM5_tx_cb, SIM6_tx_cb, SIM7_tx_cb, }; +#include +#include "atmel_start.h" +#include "atmel_start_pins.h" +#include "config/hpl_gclk_config.h" +#include "iso7816_3.h" + +/** possible clock sources for the SERCOM peripheral + * warning: the definition must match the GCLK configuration + */ +static const uint8_t sercom_glck_sources[] = {GCLK_PCHCTRL_GEN_GCLK2_Val, GCLK_PCHCTRL_GEN_GCLK4_Val, GCLK_PCHCTRL_GEN_GCLK6_Val}; + + /** possible clock frequencies in MHz for the SERCOM peripheral + * warning: the definition must match the GCLK configuration + */ +static const double sercom_glck_freqs[] = {100E6 / CONF_GCLK_GEN_2_DIV, 100E6 / CONF_GCLK_GEN_4_DIV, 120E6 / CONF_GCLK_GEN_6_DIV}; + +/** the GCLK ID for the SERCOM SIM peripherals + * @note: used as index for PCHCTRL + */ +static const uint8_t SIM_peripheral_GCLK_ID[] = {SERCOM0_GCLK_ID_CORE, SERCOM1_GCLK_ID_CORE, SERCOM2_GCLK_ID_CORE, SERCOM3_GCLK_ID_CORE, SERCOM4_GCLK_ID_CORE, SERCOM5_GCLK_ID_CORE, SERCOM6_GCLK_ID_CORE, SERCOM7_GCLK_ID_CORE}; + + +/** change baud rate of card slot + * @param[in] slotnr slot number for which the baud rate should be set + * @param[in] baudrate baud rate in bps to set + * @return if the baud rate has been set, else a parameter is out of range + */ +static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) +{ + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + + // calculate the error corresponding to the clock sources + uint16_t bauds[ARRAY_SIZE(sercom_glck_freqs)]; + double errors[ARRAY_SIZE(sercom_glck_freqs)]; + for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { + double freq = sercom_glck_freqs[i]; // remember possible SERCOM frequency + uint32_t min = freq/16. * (1. - 65535. / 65536.); // calculate the minimum baud rate for this frequency + uint32_t max = freq/16. * (1. - 1. / 65536.); // calculate the maximum baud rate for this frequency + if (baudrate < min || baudrate > max) { // baud rate it out of supported range + errors[i] = NAN; + } else { + uint16_t baud = round(65536. * (1. - 16. * (baudrate/freq))); + bauds[i] = baud; + double actual = freq/16. * (1. - baud / 65536.); + errors[i] = fabs(1.0 - (actual / baudrate)); + } + } + + // find the smallest error + uint8_t best = ARRAY_SIZE(sercom_glck_freqs); + for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { + if (isnan(errors[i])) { + continue; + } + if (best >= ARRAY_SIZE(sercom_glck_freqs)) { + best = i; + } else if (errors[i] < errors[best]) { + best = i; + } + } + if (best >= ARRAY_SIZE(sercom_glck_freqs)) { // found no clock supporting this baud rate + return false; + } + + // set clock and baud rate + struct usart_async_descriptor* slot = SIM_peripheral_descriptors[slotnr]; // get slot + if (NULL == slot) { + return false; + } + printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); + while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) + usart_async_disable(slot); // disable SERCOM peripheral + hri_gclk_clear_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos)); // disable clock for this peripheral + while (hri_gclk_get_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos))); // wait until clock is really disabled + // it does not seem we need to completely disable the peripheral using hri_mclk_clear_APBDMASK_SERCOMn_bit + hri_gclk_write_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], sercom_glck_sources[best] | (1 << GCLK_PCHCTRL_CHEN_Pos)); // set peripheral core clock and re-enable it + usart_async_set_baud_rate(slot, bauds[best]); // set the new baud rate + usart_async_enable(slot); // re-enable SERCOM peripheral + + return true; +} + +/** change ISO baud rate of card slot + * @param[in] slotnr slot number for which the baud rate should be set + * @param[in] clkdiv can clock divider + * @param[in] f clock rate conversion integer F + * @param[in] d baud rate adjustment factor D + * @return if the baud rate has been set, else a parameter is out of range + */ +static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { + return false; + } + if (!iso7816_3_valid_f(f)) { + return false; + } + if (!iso7816_3_valid_d(d)) { + return false; + } + + // set clockdiv + struct ncn8025_settings settings; + ncn8025_get(slotnr, &settings); + if (settings.clkdiv != clkdiv) { + settings.clkdiv = clkdiv; + ncn8025_set(slotnr, &settings); + } + + // calculate desired frequency + uint32_t freq = 20000000UL; // maximum frequency + switch (clkdiv) { + case SIM_CLKDIV_1: + freq /= 1; + break; + case SIM_CLKDIV_2: + freq /= 2; + break; + case SIM_CLKDIV_4: + freq /= 4; + break; + case SIM_CLKDIV_8: + freq /= 8; + break; + } + + // set baud rate + uint32_t baudrate = (freq * d) / f; // calculate actual baud rate + return slot_set_baudrate(slotnr, baudrate); // set baud rate +} + /*********************************************************************** * Interface with card_uart (cuart) core ***********************************************************************/ @@ -146,10 +289,15 @@ cuart->u.asf4.usa_pd = usa_pd; cuart->u.asf4.slot_nr = slot_nr; + usart_async_register_callback(usa_pd, USART_ASYNC_RXC_CB, SIM_rx_cb[slot_nr]); usart_async_register_callback(usa_pd, USART_ASYNC_TXC_CB, SIM_tx_cb[slot_nr]); + usart_async_register_callback(usa_pd, USART_ASYNC_ERROR_CB, _SIM_error_cb); usart_async_enable(usa_pd); + // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + return 0; } @@ -197,19 +345,31 @@ switch (ctl) { case CUART_CTL_RX: - if (arg) + if (arg){ sercom->USART.CTRLB.bit.RXEN = 1; - else + sercom->USART.CTRLB.bit.TXEN = 0; + } else { + delay_us(100); sercom->USART.CTRLB.bit.RXEN = 0; + sercom->USART.CTRLB.bit.TXEN = 1; + } break; case CUART_CTL_RST: ncn8025_get(cuart->u.asf4.slot_nr, &settings); settings.rstin = arg ? true : false; ncn8025_set(cuart->u.asf4.slot_nr, &settings); + usart_async_flush_rx_buffer(cuart->u.asf4.usa_pd); break; case CUART_CTL_POWER: ncn8025_get(cuart->u.asf4.slot_nr, &settings); settings.cmdvcc = arg ? true : false; + settings.led = arg ? true : false; + settings.vsel = SIM_VOLT_5V0; + + // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + if(arg) + slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + ncn8025_set(cuart->u.asf4.slot_nr, &settings); break; case CUART_CTL_WTIME: diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index 620ed6c..c373dc2 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -12,25 +12,25 @@ #include /*! The buffer size for USART */ -#define SIM0_BUFFER_SIZE 16 +#define SIM0_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM1_BUFFER_SIZE 16 +#define SIM1_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM2_BUFFER_SIZE 16 +#define SIM2_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM3_BUFFER_SIZE 16 +#define SIM3_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM4_BUFFER_SIZE 16 +#define SIM4_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM5_BUFFER_SIZE 16 +#define SIM5_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM6_BUFFER_SIZE 16 +#define SIM6_BUFFER_SIZE 512 /*! The buffer size for USART */ #define UART_DEBUG_BUFFER_SIZE 256 diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 4840fea..9873159 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -8,7 +8,7 @@ CROSS_COMPILE= arm-none-eabi- CFLAGS_CPU=-D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -CFLAGS=-x c -mthumb -DDEBUG -Os -ffunction-sections -fdata-sections -mlong-calls \ +CFLAGS=-x c -mthumb -DDEBUG -O0 -ffunction-sections -fdata-sections -mlong-calls \ -g3 -Wall -c -std=gnu99 $(CFLAGS_CPU) CC = $(CROSS_COMPILE)gcc diff --git a/sysmoOCTSIM/libosmo_emb.c b/sysmoOCTSIM/libosmo_emb.c index 1914568..5209e20 100644 --- a/sysmoOCTSIM/libosmo_emb.c +++ b/sysmoOCTSIM/libosmo_emb.c @@ -157,8 +157,8 @@ /* logging */ log_init(&log_info, g_tall_ctx); stderr_target = log_target_create_stderr_raw(); - log_add_target(stderr_target); - log_set_all_filter(stderr_target, 1); + //log_add_target(stderr_target); + //log_set_all_filter(stderr_target, 1); /* timer */ SysTick_Config(SystemCoreClock / 1000); diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 15e2004..e27e3dd 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -40,46 +40,51 @@ #include "command.h" -// TODO put declaration in more global file -// TODO for now SIM7 is not present because used for debug -static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; +#include "ccid_device.h" +#include "usb_descriptors.h" +extern struct ccid_slot_ops iso_fsm_slot_ops; +static struct ccid_instance g_ci; -/** number of bytes transmitted on the SIM peripheral */ -static volatile bool SIM_tx_count[8]; +//// TODO put declaration in more global file +//// TODO for now SIM7 is not present because used for debug +//static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; +// +///** number of bytes transmitted on the SIM peripheral */ +//static volatile bool SIM_tx_count[8]; +// +//static void SIM_rx_cb(const struct usart_async_descriptor *const io_descr) +//{ +//} +// +///** called when the transmission is complete +// * e.g. this is when the byte has been sent and there is no data to transmit anymore +// */ +//static void SIM_tx_cb(const struct usart_async_descriptor *const io_descr) +//{ +// // find slotnr for corresponding USART +// uint8_t slotnr; +// for (slotnr = 0; slotnr < ARRAY_SIZE(SIM_peripheral_descriptors) && SIM_peripheral_descriptors[slotnr] != io_descr; slotnr++); +// +// // set flag +// if (slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)) { +// SIM_tx_count[slotnr] = true; +// } +//} -static void SIM_rx_cb(const struct usart_async_descriptor *const io_descr) -{ -} - -/** called when the transmission is complete - * e.g. this is when the byte has been sent and there is no data to transmit anymore - */ -static void SIM_tx_cb(const struct usart_async_descriptor *const io_descr) -{ - // find slotnr for corresponding USART - uint8_t slotnr; - for (slotnr = 0; slotnr < ARRAY_SIZE(SIM_peripheral_descriptors) && SIM_peripheral_descriptors[slotnr] != io_descr; slotnr++); - - // set flag - if (slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)) { - SIM_tx_count[slotnr] = true; - } -} - -/** possible clock sources for the SERCOM peripheral - * warning: the definition must match the GCLK configuration - */ -static const uint8_t sercom_glck_sources[] = {GCLK_PCHCTRL_GEN_GCLK2_Val, GCLK_PCHCTRL_GEN_GCLK4_Val, GCLK_PCHCTRL_GEN_GCLK6_Val}; - -/** possible clock frequencies in MHz for the SERCOM peripheral - * warning: the definition must match the GCLK configuration - */ -static const double sercom_glck_freqs[] = {100E6 / CONF_GCLK_GEN_2_DIV, 100E6 / CONF_GCLK_GEN_4_DIV, 120E6 / CONF_GCLK_GEN_6_DIV}; - -/** the GCLK ID for the SERCOM SIM peripherals - * @note: used as index for PCHCTRL - */ -static const uint8_t SIM_peripheral_GCLK_ID[] = {SERCOM0_GCLK_ID_CORE, SERCOM1_GCLK_ID_CORE, SERCOM2_GCLK_ID_CORE, SERCOM3_GCLK_ID_CORE, SERCOM4_GCLK_ID_CORE, SERCOM5_GCLK_ID_CORE, SERCOM6_GCLK_ID_CORE, SERCOM7_GCLK_ID_CORE}; +///** possible clock sources for the SERCOM peripheral +// * warning: the definition must match the GCLK configuration +// */ +//static const uint8_t sercom_glck_sources[] = {GCLK_PCHCTRL_GEN_GCLK2_Val, GCLK_PCHCTRL_GEN_GCLK4_Val, GCLK_PCHCTRL_GEN_GCLK6_Val}; +// +///** possible clock frequencies in MHz for the SERCOM peripheral +// * warning: the definition must match the GCLK configuration +// */ +//static const double sercom_glck_freqs[] = {100E6 / CONF_GCLK_GEN_2_DIV, 100E6 / CONF_GCLK_GEN_4_DIV, 120E6 / CONF_GCLK_GEN_6_DIV}; +// +///** the GCLK ID for the SERCOM SIM peripherals +// * @note: used as index for PCHCTRL +// */ +//static const uint8_t SIM_peripheral_GCLK_ID[] = {SERCOM0_GCLK_ID_CORE, SERCOM1_GCLK_ID_CORE, SERCOM2_GCLK_ID_CORE, SERCOM3_GCLK_ID_CORE, SERCOM4_GCLK_ID_CORE, SERCOM5_GCLK_ID_CORE, SERCOM6_GCLK_ID_CORE, SERCOM7_GCLK_ID_CORE}; static void ccid_app_init(void); @@ -101,15 +106,15 @@ * (there are 8 inputs + traces to drive!) */ hri_port_set_PINCFG_DRVSTR_bit(PORT, 0, 11); - // enable SIM interfaces - for (uint8_t i = 0; i < ARRAY_SIZE(SIM_peripheral_descriptors); i++) { - if (NULL == SIM_peripheral_descriptors[i]) { - continue; - } - usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_RXC_CB, SIM_rx_cb); // required for RX to work, even if the callback does nothing - usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_TXC_CB, SIM_tx_cb); // to count the number of bytes transmitted since we are using it asynchronously - usart_async_enable(SIM_peripheral_descriptors[i]); - } +// // enable SIM interfaces +// for (uint8_t i = 0; i < ARRAY_SIZE(SIM_peripheral_descriptors); i++) { +// if (NULL == SIM_peripheral_descriptors[i]) { +// continue; +// } +// usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_RXC_CB, SIM_rx_cb); // required for RX to work, even if the callback does nothing +// usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_TXC_CB, SIM_tx_cb); // to count the number of bytes transmitted since we are using it asynchronously +// usart_async_enable(SIM_peripheral_descriptors[i]); +// } ccid_app_init(); } @@ -199,7 +204,9 @@ struct msgb *msg; int rc; - OSMO_ASSERT(!ep_q->in_progress); + if (ep_q->in_progress) + return 0; + msg = msgb_dequeue_irqsafe(&ep_q->list); if (!msg) return 0; @@ -248,6 +255,7 @@ msg = msgb_dequeue_irqsafe(&g_ccid_s.free_q); if (!msg) return -1; + msgb_reset(msg); ep_q->in_progress = msg; rc = ccid_df_read_out(msgb_data(msg), msgb_tailroom(msg)); @@ -270,6 +278,7 @@ msgb_put(msg, transferred); /* append to list of pending-to-be-handed messages */ llist_add_tail_at(&msg->list, &g_ccid_s.out_ep.list); + g_ccid_s.out_ep.in_progress = NULL; /* submit another [free] msgb to receive the next transfer */ submit_next_out(); @@ -341,8 +350,11 @@ struct msgb *msg; unsigned int i; - for (i = 0; i < 8; i++) - new_mask |= ncn8025_interrupt_level(i) << i; + for (i = 0; i < 8; i++){ + bool level = ncn8025_interrupt_level(i); + new_mask |= level << i; + g_ci.slot[i].icc_present = level; + } /* notify the user/host about any changes */ if (g_ccid_s.card_insert_mask != new_mask) { @@ -375,614 +387,614 @@ } return slotnr; } +// +///** change baud rate of card slot +// * @param[in] slotnr slot number for which the baud rate should be set +// * @param[in] baudrate baud rate in bps to set +// * @return if the baud rate has been set, else a parameter is out of range +// */ +//static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) +//{ +// ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); +// +// // calculate the error corresponding to the clock sources +// uint16_t bauds[ARRAY_SIZE(sercom_glck_freqs)]; +// double errors[ARRAY_SIZE(sercom_glck_freqs)]; +// for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { +// double freq = sercom_glck_freqs[i]; // remember possible SERCOM frequency +// uint32_t min = freq / (2 * (255 + 1)); // calculate the minimum baud rate for this frequency +// uint32_t max = freq / (2 * (0 + 1)); // calculate the maximum baud rate for this frequency +// if (baudrate < min || baudrate > max) { // baud rate it out of supported range +// errors[i] = NAN; +// } else { +// uint16_t baud = round(freq / (2 * baudrate) - 1); +// bauds[i] = baud; +// double actual = freq / (2 * (baud + 1)); +// errors[i] = fabs(1.0 - (actual / baudrate)); +// } +// } +// +// // find the smallest error +// uint8_t best = ARRAY_SIZE(sercom_glck_freqs); +// for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { +// if (isnan(errors[i])) { +// continue; +// } +// if (best >= ARRAY_SIZE(sercom_glck_freqs)) { +// best = i; +// } else if (errors[i] < errors[best]) { +// best = i; +// } +// } +// if (best >= ARRAY_SIZE(sercom_glck_freqs)) { // found no clock supporting this baud rate +// return false; +// } +// +// // set clock and baud rate +// struct usart_async_descriptor* slot = SIM_peripheral_descriptors[slotnr]; // get slot +// if (NULL == slot) { +// return false; +// } +// printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); +// while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) +// usart_async_disable(slot); // disable SERCOM peripheral +// hri_gclk_clear_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos)); // disable clock for this peripheral +// while (hri_gclk_get_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos))); // wait until clock is really disabled +// // it does not seem we need to completely disable the peripheral using hri_mclk_clear_APBDMASK_SERCOMn_bit +// hri_gclk_write_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], sercom_glck_sources[best] | (1 << GCLK_PCHCTRL_CHEN_Pos)); // set peripheral core clock and re-enable it +// usart_async_set_baud_rate(slot, bauds[best]); // set the new baud rate +// usart_async_enable(slot); // re-enable SERCOM peripheral +// +// return true; +//} +// +///** change ISO baud rate of card slot +// * @param[in] slotnr slot number for which the baud rate should be set +// * @param[in] clkdiv can clock divider +// * @param[in] f clock rate conversion integer F +// * @param[in] d baud rate adjustment factor D +// * @return if the baud rate has been set, else a parameter is out of range +// */ +//static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) +//{ +// // input checks +// ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); +// if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { +// return false; +// } +// if (!iso7816_3_valid_f(f)) { +// return false; +// } +// if (!iso7816_3_valid_d(d)) { +// return false; +// } +// +// // set clockdiv +// struct ncn8025_settings settings; +// ncn8025_get(slotnr, &settings); +// if (settings.clkdiv != clkdiv) { +// settings.clkdiv = clkdiv; +// ncn8025_set(slotnr, &settings); +// } +// +// // calculate desired frequency +// uint32_t freq = 20000000UL; // maximum frequency +// switch (clkdiv) { +// case SIM_CLKDIV_1: +// freq /= 1; +// break; +// case SIM_CLKDIV_2: +// freq /= 2; +// break; +// case SIM_CLKDIV_4: +// freq /= 4; +// break; +// case SIM_CLKDIV_8: +// freq /= 8; +// break; +// } +// +// // set baud rate +// uint32_t baudrate = (freq * d) / f; // calculate actual baud rate +// return slot_set_baudrate(slotnr, baudrate); // set baud rate +//} +// +///** write data to card +// * @param[in] slotnr slot number on which to send data +// * @param[in] data data to be transmitted +// * @param[in] length length of data to be transmitted +// * @return error code +// */ +//static int slot_card_write(uint8_t slotnr, const uint8_t* data, uint16_t length) +//{ +// // input checks +// ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); +// if (0 == length || NULL == data) { +// return ERR_INVALID_ARG; +// } +// +// struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; +// ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; // disable receive (to avoid the echo back) +// SIM_tx_count[slotnr] = false; // reset TX complete +// for (uint16_t i = 0; i < length; i++) { // transmit data +// while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING blocking) +// if (1 != io_write(&sim->io, &data[i], 1)) { // put but in transmit buffer +// return ERR_IO; +// } +// } +// while (!SIM_tx_count[slotnr]); // wait until transmission is complete (WARNING blocking) +// ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // enable receive again +// +// return ERR_NONE; +//} +// +///** read data from card +// * @param[in] slotnr slot number on which to send data +// * @param[out] data buffer for read data to be stored +// * @param[in] length length of data to be read +// * @param[in] wt Waiting Time in ETU +// * @return error code +// * TODO fix WT/ETU duration +// */ +//static int slot_card_read(uint8_t slotnr, uint8_t* data, uint16_t length, uint32_t wt) +//{ +// // input checks +// ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); +// if (0 == length || NULL == data) { +// return ERR_INVALID_ARG; +// } +// +// struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; +// +// ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // ensure RX is enabled +// uint32_t timeout = wt; // reset waiting time +// for (uint16_t i = 0; i < length; i++) { // read all data +// while (timeout && !usart_async_is_rx_not_empty(sim)) { // verify if data is present +// delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) +// timeout--; +// } +// if (0 == timeout) { // timeout reached +// return ERR_TIMEOUT; +// } +// timeout = wt; // reset waiting time +// if (1 != io_read(&sim->io, &data[i], 1)) { // read one byte +// return ERR_IO; +// } +// } +// +// return ERR_NONE; +//} +// +///** transfer TPDU +// * @param[in] slotnr slot number on which to transfer the TPDU +// * @param[in] header TPDU header to send +// * @param[io] data TPDU data to transfer +// * @param[in] data_length length of TPDU data to transfer +// * @param[in] write if the data should be written (true) or read (false) +// * TODO fix WT +// * TODO the data length can be deduce from the header +// */ +//static int slot_tpdu_xfer(uint8_t slotnr, const uint8_t* header, uint8_t* data, uint16_t data_length, bool write) +//{ +// // input checks +// ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); +// if (NULL == header || (data_length > 0 && NULL == data)) { +// return ERR_INVALID_ARG; +// } +// +// int rc; +// struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; // get USART peripheral +// usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch +// +// // send command header +// printf("(%d) TPDU: ", slotnr); +// for (uint8_t i = 0; i < 5; i++) { +// printf("%02x ", header[i]); +// } +// rc = slot_card_write(slotnr, header, 5); // transmit header +// if (ERR_NONE != rc) { +// printf("error in command header transmit (errno = %d)\r\n", rc); +// return rc; +// } +// +// // read procedure byte, and handle data +// uint8_t pb = 0x60; // wait more procedure byte +// uint16_t data_i = 0; // progress in the data transfer +// while (0x60 == pb) { // wait for SW +// rc = slot_card_read(slotnr, &pb, 1, ISO7816_3_DEFAULT_WT); +// if (ERR_NONE != rc) { +// printf("error while receiving PB/SW1 (errno = %d)\r\n", rc); +// return rc; +// } +// printf("%02x ", pb); +// if (0x60 == pb) { // NULL byte +// // just wait more time +// } else if ((0x60 == (pb & 0xf0)) || (0x90 == (pb & 0xf0))) { // SW1 byte +// // left the rest of the code handle it +// } else if (header[1] == pb) { // ACK byte +// // transfer rest of the data +// if (data_i >= data_length) { +// printf("error no more data to transfer\r\n"); +// return ERR_INVALID_DATA; +// } +// if (write) { // transmit remaining command data +// rc = slot_card_write(slotnr, &data[data_i], data_length - data_i); // transmit command data +// if (ERR_NONE != rc) { +// printf("error in command data transmit (errno = %d)\r\n", rc); +// return rc; +// } +// } else { // receive remaining command data +// rc = slot_card_read(slotnr, &data[data_i], data_length - data_i, ISO7816_3_DEFAULT_WT); +// if (ERR_NONE != rc) { +// printf("error in command data receive (errno = %d)\r\n", rc); +// return rc; +// } +// } +// for (uint16_t i = data_i; i < data_length; i++) { +// printf("%02x ", data[i]); +// } +// data_i = data_length; // remember we transferred the data +// pb = 0x60; // wait for SW1 +// } else if (header[1] == (pb ^ 0xff)) { // ACK byte +// // transfer only one byte +// if (data_i >= data_length) { +// printf("error no more data to transfer\r\n"); +// return ERR_INVALID_DATA; +// } +// if (write) { // transmit command data byte +// rc = slot_card_write(slotnr, &data[data_i], 1); // transmit command data +// if (ERR_NONE != rc) { +// printf("error in command data transmit (errno = %d)\r\n", rc); +// return rc; +// } +// } else { // receive command data byte +// rc = slot_card_read(slotnr, &data[data_i], 1, ISO7816_3_DEFAULT_WT); +// if (ERR_NONE != rc) { +// printf("error in command data receive (errno = %d)\r\n", rc); +// return rc; +// } +// } +// printf("%02x ", data[data_i]); +// data_i += 1; // remember we transferred one data byte +// pb = 0x60; // wait for SW1 +// } else { // invalid byte +// return ERR_INVALID_DATA; +// } +// } +// +// // read SW2 +// uint8_t sw2; +// rc = slot_card_read(slotnr, &sw2, 1, ISO7816_3_DEFAULT_WT); +// if (ERR_NONE != rc) { +// printf("error in receiving SW2 (errno = %d)\r\n", rc); +// return rc; +// } +// printf("%02x", sw2); +// +// printf("\r\n"); +// return ERR_NONE; +//} +// +//DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") +//{ +// struct ncn8025_settings settings; +// int slotnr = validate_slotnr(argc, argv, 1); +// if (slotnr < 0) +// return; +// ncn8025_get(slotnr, &settings); +// printf("SIM%d: ", slotnr); +// ncn8025_dump(&settings); +// printf("\r\n"); +//} +// +//DEFUN(sim_power, cmd_sim_power, "sim-power", "Enable/disable SIM card power") +//{ +// struct ncn8025_settings settings; +// int slotnr = validate_slotnr(argc, argv, 1); +// int enable; +// +// if (slotnr < 0) +// return; +// +// if (argc < 3) { +// printf("You have to specify 0=disable or 1=enable\r\n"); +// return; +// } +// enable = atoi(argv[2]); +// ncn8025_get(slotnr, &settings); +// if (enable) +// settings.cmdvcc = true; +// else +// settings.cmdvcc = false; +// ncn8025_set(slotnr, &settings); +//} +// +//DEFUN(sim_reset, cmd_sim_reset, "sim-reset", "Enable/disable SIM reset") +//{ +// struct ncn8025_settings settings; +// int slotnr = validate_slotnr(argc, argv, 1); +// int enable; +// +// if (slotnr < 0) +// return; +// +// if (argc < 3) { +// printf("You have to specify 0=disable or 1=enable\r\n"); +// return; +// } +// enable = atoi(argv[2]); +// ncn8025_get(slotnr, &settings); +// if (enable) +// settings.rstin = true; +// else +// settings.rstin = false; +// ncn8025_set(slotnr, &settings); +//} +// +//DEFUN(sim_clkdiv, cmd_sim_clkdiv, "sim-clkdiv", "Set SIM clock divider (1,2,4,8)") +//{ +// struct ncn8025_settings settings; +// int slotnr = validate_slotnr(argc, argv, 1); +// int clkdiv; +// +// if (slotnr < 0) +// return; +// +// if (argc < 3) { +// printf("You have to specify a valid divider (1,2,4,8)\r\n"); +// return; +// } +// clkdiv = atoi(argv[2]); +// if (clkdiv != 1 && clkdiv != 2 && clkdiv != 4 && clkdiv != 8) { +// printf("You have to specify a valid divider (1,2,4,8)\r\n"); +// return; +// } +// ncn8025_get(slotnr, &settings); +// switch (clkdiv) { +// case 1: +// settings.clkdiv = SIM_CLKDIV_1; +// break; +// case 2: +// settings.clkdiv = SIM_CLKDIV_2; +// break; +// case 4: +// settings.clkdiv = SIM_CLKDIV_4; +// break; +// case 8: +// settings.clkdiv = SIM_CLKDIV_8; +// break; +// } +// ncn8025_set(slotnr, &settings); +//} +// +//DEFUN(sim_voltage, cmd_sim_voltage, "sim-voltage", "Set SIM voltage (5/3/1.8)") +//{ +// struct ncn8025_settings settings; +// int slotnr = validate_slotnr(argc, argv, 1); +// +// if (slotnr < 0) +// return; +// +// if (argc < 3) { +// printf("You have to specify a valid voltage (5/3/1.8)\r\n"); +// return; +// } +// ncn8025_get(slotnr, &settings); +// if (!strcmp(argv[2], "5")) +// settings.vsel = SIM_VOLT_5V0; +// else if (!strcmp(argv[2], "3")) +// settings.vsel = SIM_VOLT_3V0; +// else if (!strcmp(argv[2], "1.8")) +// settings.vsel = SIM_VOLT_1V8; +// else { +// printf("You have to specify a valid voltage (5/3/1.8)\r\n"); +// return; +// } +// ncn8025_set(slotnr, &settings); +//} +// +//DEFUN(sim_led, cmd_sim_led, "sim-led", "Set SIM LED (1=on, 0=off)") +//{ +// struct ncn8025_settings settings; +// int slotnr = validate_slotnr(argc, argv, 1); +// +// if (slotnr < 0) +// return; +// +// if (argc < 3) { +// printf("You have to specify 0=disable or 1=enable\r\n"); +// return; +// } +// ncn8025_get(slotnr, &settings); +// if (atoi(argv[2])) +// settings.led = true; +// else +// settings.led = false; +// ncn8025_set(slotnr, &settings); +//} +// +//DEFUN(sim_atr, cmd_sim_atr, "sim-atr", "Read ATR from SIM card") +//{ +// struct ncn8025_settings settings; +// int slotnr = validate_slotnr(argc, argv, 1); +// +// if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { +// return; +// } +// +// // check if card is present (and read current settings) +// ncn8025_get(slotnr, &settings); +// if (!settings.simpres) { +// printf("(%d) error: no card present\r\n", slotnr); +// return; +// } +// +// // switch card off (assert reset and disable power) +// // note: ISO/IEC 7816-3:2006 section 6.4 provides the deactivation sequence, but not the minimum corresponding times +// settings.rstin = true; +// settings.cmdvcc = false; +// settings.led = true; +// ncn8025_set(slotnr, &settings); +// +// // TODO wait some time for card to be completely deactivated +// usart_async_flush_rx_buffer(SIM_peripheral_descriptors[slotnr]); // flush RX buffer to start from scratch +// +// +// // set clock to lowest frequency (20 MHz / 8 = 2.5 MHz) +// // note: according to ISO/IEC 7816-3:2006 section 5.2.3 the minimum value is 1 MHz, and maximum is 5 MHz during activation +// settings.clkdiv = SIM_CLKDIV_8; +// // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) +// slot_set_isorate(slotnr, settings.clkdiv, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); +// // set card voltage to 3.0 V (the most supported) +// // note: according to ISO/IEC 7816-3:2006 no voltage should damage the card, and you should cycle from low to high +// settings.vsel = SIM_VOLT_3V0; +// // provide power (the NCN8025 should perform the activation according to spec) +// // note: activation sequence is documented in ISO/IEC 7816-3:2006 section 6.2 +// settings.cmdvcc = true; +// ncn8025_set(slotnr, &settings); +// +// // wait for Tb=400 cycles before re-asserting reset +// delay_us(400 * 10000 / 2500); // 400 cycles * 1000 for us, 2.5 MHz / 1000 for us +// +// // de-assert reset to switch card back on +// settings.rstin = false; +// ncn8025_set(slotnr, &settings); +// +// // wait for Tc=40000 cycles for transmission to start +// uint32_t cycles = 40000; +// while (cycles && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { +// delay_us(10); +// cycles -= 25; // 10 us = 25 cycles at 2.5 MHz +// } +// if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { +// delay_us(12 * 372 / 1 / 2); // wait more than one byte (approximate freq down to 2 MHz) +// } +// // verify if one byte has been received +// if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { +// printf("(%d) error: card not responsive\r\n", slotnr); +// return; +// } +// +// // read ATR (just do it until there is no traffic anymore) +// // TODO the ATR should be parsed to read the right number of bytes, instead we just wait until to end of WT +// printf("(%d) ATR: ", slotnr); +// uint8_t atr_byte; +// while (usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { +// if (1 == io_read(&SIM_peripheral_descriptors[slotnr]->io, &atr_byte, 1)) { +// printf("%02x ", atr_byte); +// } +// uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU +// while (wt && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { +// delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) +// wt--; +// } +// } +// printf("\r\n"); +// +// /* disable LED */ +// settings.led = false; +// ncn8025_set(slotnr, &settings); +//} +// +//DEFUN(sim_iccid, cmd_sim_iccid, "sim-iccid", "Read ICCID from SIM card") +//{ +// struct ncn8025_settings settings; +// int slotnr = validate_slotnr(argc, argv, 1); +// +// if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { +// return; +// } +// +// // read current settings and check if card is present and powered +// ncn8025_get(slotnr, &settings); +// if (!settings.simpres) { +// printf("(%d) error: no card present\r\n", slotnr); +// return; +// } +// if (!settings.cmdvcc) { +// printf("(%d) error: card not powered\r\n", slotnr); +// return; +// } +// if (settings.rstin) { +// printf("(%d) error: card under reset\r\n", slotnr); +// return; +// } +// +// // enable LED +// if (!settings.led) { +// settings.led = true; +// ncn8025_set(slotnr, &settings); +// } +// +// // select MF +// printf("(%d) SELECT MF\r\n", slotnr); +// const uint8_t select_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; // see TS 102.221 sec. 11.1.1 +// const uint8_t select_data_mf[] = {0x3f, 0x00}; // see TS 102.221 sec. 13.1 +// int rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_mf, ARRAY_SIZE(select_data_mf), true); // transfer TPDU +// if (ERR_NONE != rc) { +// printf("error while SELECT MF (errno = %d)\r\n", rc); +// } +// // ignore response data +// +// // select EF_ICCID +// printf("(%d) SELECT EF_ICCID\r\n", slotnr); +// const uint8_t select_data_ef_iccid[] = {0x2f, 0xe2}; // see TS 102.221 sec. 13.2 +// rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_ef_iccid, ARRAY_SIZE(select_data_ef_iccid), true); // transfer TPDU +// if (ERR_NONE != rc) { +// printf("error while SELECT EF_ICCID (errno = %d)\r\n", rc); +// } +// // ignore response data +// +// // read EF_ICCID +// printf("(%d) READ EF_ICCID\r\n", slotnr); +// uint8_t iccid[10]; +// uint8_t read_binary[] = {0xa0, 0xb0, 0x00, 0x00, ARRAY_SIZE(iccid)}; // see TS 102.221 sec. 11.1.3 +// rc = slot_tpdu_xfer(slotnr, read_binary, iccid, ARRAY_SIZE(iccid), false); // transfer TPDU +// if (ERR_NONE != rc) { +// printf("error while READ ICCID (errno = %d)\r\n", rc); +// } +// // ignore response data +// +// printf("(%d) ICCID: ", slotnr); +// for (uint8_t i = 0; i < ARRAY_SIZE(iccid); i++) { +// uint8_t nibble = iccid[i] & 0xf; +// if (0xf == nibble) { +// break; +// } +// printf("%x", nibble); +// nibble = iccid[i] >> 4; +// if (0xf == nibble) { +// break; +// } +// printf("%x", nibble); +// } +// printf("\r\n"); +// +// // disable LED +// settings.led = false; +// ncn8025_set(slotnr, &settings); +//} +// +//DEFUN(get_time, cmd_get_time, "get-time", "Read Time from RTC") +//{ +// struct calendar_date_time dt; +// calendar_get_date_time(&CALENDAR_0, &dt); +// printf("%04u-%02u-%02u %02u:%02u:%02u\r\n", dt.date.year, dt.date.month, dt.date.day, +// dt.time.hour, dt.time.min, dt.time.sec); +//} -/** change baud rate of card slot - * @param[in] slotnr slot number for which the baud rate should be set - * @param[in] baudrate baud rate in bps to set - * @return if the baud rate has been set, else a parameter is out of range - */ -static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) -{ - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - - // calculate the error corresponding to the clock sources - uint16_t bauds[ARRAY_SIZE(sercom_glck_freqs)]; - double errors[ARRAY_SIZE(sercom_glck_freqs)]; - for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { - double freq = sercom_glck_freqs[i]; // remember possible SERCOM frequency - uint32_t min = freq / (2 * (255 + 1)); // calculate the minimum baud rate for this frequency - uint32_t max = freq / (2 * (0 + 1)); // calculate the maximum baud rate for this frequency - if (baudrate < min || baudrate > max) { // baud rate it out of supported range - errors[i] = NAN; - } else { - uint16_t baud = round(freq / (2 * baudrate) - 1); - bauds[i] = baud; - double actual = freq / (2 * (baud + 1)); - errors[i] = fabs(1.0 - (actual / baudrate)); - } - } - - // find the smallest error - uint8_t best = ARRAY_SIZE(sercom_glck_freqs); - for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { - if (isnan(errors[i])) { - continue; - } - if (best >= ARRAY_SIZE(sercom_glck_freqs)) { - best = i; - } else if (errors[i] < errors[best]) { - best = i; - } - } - if (best >= ARRAY_SIZE(sercom_glck_freqs)) { // found no clock supporting this baud rate - return false; - } - - // set clock and baud rate - struct usart_async_descriptor* slot = SIM_peripheral_descriptors[slotnr]; // get slot - if (NULL == slot) { - return false; - } - printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); - while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) - usart_async_disable(slot); // disable SERCOM peripheral - hri_gclk_clear_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos)); // disable clock for this peripheral - while (hri_gclk_get_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos))); // wait until clock is really disabled - // it does not seem we need to completely disable the peripheral using hri_mclk_clear_APBDMASK_SERCOMn_bit - hri_gclk_write_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], sercom_glck_sources[best] | (1 << GCLK_PCHCTRL_CHEN_Pos)); // set peripheral core clock and re-enable it - usart_async_set_baud_rate(slot, bauds[best]); // set the new baud rate - usart_async_enable(slot); // re-enable SERCOM peripheral - - return true; -} - -/** change ISO baud rate of card slot - * @param[in] slotnr slot number for which the baud rate should be set - * @param[in] clkdiv can clock divider - * @param[in] f clock rate conversion integer F - * @param[in] d baud rate adjustment factor D - * @return if the baud rate has been set, else a parameter is out of range - */ -static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { - return false; - } - if (!iso7816_3_valid_f(f)) { - return false; - } - if (!iso7816_3_valid_d(d)) { - return false; - } - - // set clockdiv - struct ncn8025_settings settings; - ncn8025_get(slotnr, &settings); - if (settings.clkdiv != clkdiv) { - settings.clkdiv = clkdiv; - ncn8025_set(slotnr, &settings); - } - - // calculate desired frequency - uint32_t freq = 20000000UL; // maximum frequency - switch (clkdiv) { - case SIM_CLKDIV_1: - freq /= 1; - break; - case SIM_CLKDIV_2: - freq /= 2; - break; - case SIM_CLKDIV_4: - freq /= 4; - break; - case SIM_CLKDIV_8: - freq /= 8; - break; - } - - // set baud rate - uint32_t baudrate = (freq * d) / f; // calculate actual baud rate - return slot_set_baudrate(slotnr, baudrate); // set baud rate -} - -/** write data to card - * @param[in] slotnr slot number on which to send data - * @param[in] data data to be transmitted - * @param[in] length length of data to be transmitted - * @return error code - */ -static int slot_card_write(uint8_t slotnr, const uint8_t* data, uint16_t length) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (0 == length || NULL == data) { - return ERR_INVALID_ARG; - } - - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; // disable receive (to avoid the echo back) - SIM_tx_count[slotnr] = false; // reset TX complete - for (uint16_t i = 0; i < length; i++) { // transmit data - while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING blocking) - if (1 != io_write(&sim->io, &data[i], 1)) { // put but in transmit buffer - return ERR_IO; - } - } - while (!SIM_tx_count[slotnr]); // wait until transmission is complete (WARNING blocking) - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // enable receive again - - return ERR_NONE; -} - -/** read data from card - * @param[in] slotnr slot number on which to send data - * @param[out] data buffer for read data to be stored - * @param[in] length length of data to be read - * @param[in] wt Waiting Time in ETU - * @return error code - * TODO fix WT/ETU duration - */ -static int slot_card_read(uint8_t slotnr, uint8_t* data, uint16_t length, uint32_t wt) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (0 == length || NULL == data) { - return ERR_INVALID_ARG; - } - - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; - - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // ensure RX is enabled - uint32_t timeout = wt; // reset waiting time - for (uint16_t i = 0; i < length; i++) { // read all data - while (timeout && !usart_async_is_rx_not_empty(sim)) { // verify if data is present - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - timeout--; - } - if (0 == timeout) { // timeout reached - return ERR_TIMEOUT; - } - timeout = wt; // reset waiting time - if (1 != io_read(&sim->io, &data[i], 1)) { // read one byte - return ERR_IO; - } - } - - return ERR_NONE; -} - -/** transfer TPDU - * @param[in] slotnr slot number on which to transfer the TPDU - * @param[in] header TPDU header to send - * @param[io] data TPDU data to transfer - * @param[in] data_length length of TPDU data to transfer - * @param[in] write if the data should be written (true) or read (false) - * TODO fix WT - * TODO the data length can be deduce from the header - */ -static int slot_tpdu_xfer(uint8_t slotnr, const uint8_t* header, uint8_t* data, uint16_t data_length, bool write) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (NULL == header || (data_length > 0 && NULL == data)) { - return ERR_INVALID_ARG; - } - - int rc; - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; // get USART peripheral - usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch - - // send command header - printf("(%d) TPDU: ", slotnr); - for (uint8_t i = 0; i < 5; i++) { - printf("%02x ", header[i]); - } - rc = slot_card_write(slotnr, header, 5); // transmit header - if (ERR_NONE != rc) { - printf("error in command header transmit (errno = %d)\r\n", rc); - return rc; - } - - // read procedure byte, and handle data - uint8_t pb = 0x60; // wait more procedure byte - uint16_t data_i = 0; // progress in the data transfer - while (0x60 == pb) { // wait for SW - rc = slot_card_read(slotnr, &pb, 1, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error while receiving PB/SW1 (errno = %d)\r\n", rc); - return rc; - } - printf("%02x ", pb); - if (0x60 == pb) { // NULL byte - // just wait more time - } else if ((0x60 == (pb & 0xf0)) || (0x90 == (pb & 0xf0))) { // SW1 byte - // left the rest of the code handle it - } else if (header[1] == pb) { // ACK byte - // transfer rest of the data - if (data_i >= data_length) { - printf("error no more data to transfer\r\n"); - return ERR_INVALID_DATA; - } - if (write) { // transmit remaining command data - rc = slot_card_write(slotnr, &data[data_i], data_length - data_i); // transmit command data - if (ERR_NONE != rc) { - printf("error in command data transmit (errno = %d)\r\n", rc); - return rc; - } - } else { // receive remaining command data - rc = slot_card_read(slotnr, &data[data_i], data_length - data_i, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error in command data receive (errno = %d)\r\n", rc); - return rc; - } - } - for (uint16_t i = data_i; i < data_length; i++) { - printf("%02x ", data[i]); - } - data_i = data_length; // remember we transferred the data - pb = 0x60; // wait for SW1 - } else if (header[1] == (pb ^ 0xff)) { // ACK byte - // transfer only one byte - if (data_i >= data_length) { - printf("error no more data to transfer\r\n"); - return ERR_INVALID_DATA; - } - if (write) { // transmit command data byte - rc = slot_card_write(slotnr, &data[data_i], 1); // transmit command data - if (ERR_NONE != rc) { - printf("error in command data transmit (errno = %d)\r\n", rc); - return rc; - } - } else { // receive command data byte - rc = slot_card_read(slotnr, &data[data_i], 1, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error in command data receive (errno = %d)\r\n", rc); - return rc; - } - } - printf("%02x ", data[data_i]); - data_i += 1; // remember we transferred one data byte - pb = 0x60; // wait for SW1 - } else { // invalid byte - return ERR_INVALID_DATA; - } - } - - // read SW2 - uint8_t sw2; - rc = slot_card_read(slotnr, &sw2, 1, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error in receiving SW2 (errno = %d)\r\n", rc); - return rc; - } - printf("%02x", sw2); - - printf("\r\n"); - return ERR_NONE; -} - -DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - if (slotnr < 0) - return; - ncn8025_get(slotnr, &settings); - printf("SIM%d: ", slotnr); - ncn8025_dump(&settings); - printf("\r\n"); -} - -DEFUN(sim_power, cmd_sim_power, "sim-power", "Enable/disable SIM card power") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - int enable; - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify 0=disable or 1=enable\r\n"); - return; - } - enable = atoi(argv[2]); - ncn8025_get(slotnr, &settings); - if (enable) - settings.cmdvcc = true; - else - settings.cmdvcc = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_reset, cmd_sim_reset, "sim-reset", "Enable/disable SIM reset") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - int enable; - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify 0=disable or 1=enable\r\n"); - return; - } - enable = atoi(argv[2]); - ncn8025_get(slotnr, &settings); - if (enable) - settings.rstin = true; - else - settings.rstin = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_clkdiv, cmd_sim_clkdiv, "sim-clkdiv", "Set SIM clock divider (1,2,4,8)") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - int clkdiv; - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify a valid divider (1,2,4,8)\r\n"); - return; - } - clkdiv = atoi(argv[2]); - if (clkdiv != 1 && clkdiv != 2 && clkdiv != 4 && clkdiv != 8) { - printf("You have to specify a valid divider (1,2,4,8)\r\n"); - return; - } - ncn8025_get(slotnr, &settings); - switch (clkdiv) { - case 1: - settings.clkdiv = SIM_CLKDIV_1; - break; - case 2: - settings.clkdiv = SIM_CLKDIV_2; - break; - case 4: - settings.clkdiv = SIM_CLKDIV_4; - break; - case 8: - settings.clkdiv = SIM_CLKDIV_8; - break; - } - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_voltage, cmd_sim_voltage, "sim-voltage", "Set SIM voltage (5/3/1.8)") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify a valid voltage (5/3/1.8)\r\n"); - return; - } - ncn8025_get(slotnr, &settings); - if (!strcmp(argv[2], "5")) - settings.vsel = SIM_VOLT_5V0; - else if (!strcmp(argv[2], "3")) - settings.vsel = SIM_VOLT_3V0; - else if (!strcmp(argv[2], "1.8")) - settings.vsel = SIM_VOLT_1V8; - else { - printf("You have to specify a valid voltage (5/3/1.8)\r\n"); - return; - } - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_led, cmd_sim_led, "sim-led", "Set SIM LED (1=on, 0=off)") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify 0=disable or 1=enable\r\n"); - return; - } - ncn8025_get(slotnr, &settings); - if (atoi(argv[2])) - settings.led = true; - else - settings.led = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_atr, cmd_sim_atr, "sim-atr", "Read ATR from SIM card") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { - return; - } - - // check if card is present (and read current settings) - ncn8025_get(slotnr, &settings); - if (!settings.simpres) { - printf("(%d) error: no card present\r\n", slotnr); - return; - } - - // switch card off (assert reset and disable power) - // note: ISO/IEC 7816-3:2006 section 6.4 provides the deactivation sequence, but not the minimum corresponding times - settings.rstin = true; - settings.cmdvcc = false; - settings.led = true; - ncn8025_set(slotnr, &settings); - - // TODO wait some time for card to be completely deactivated - usart_async_flush_rx_buffer(SIM_peripheral_descriptors[slotnr]); // flush RX buffer to start from scratch - - - // set clock to lowest frequency (20 MHz / 8 = 2.5 MHz) - // note: according to ISO/IEC 7816-3:2006 section 5.2.3 the minimum value is 1 MHz, and maximum is 5 MHz during activation - settings.clkdiv = SIM_CLKDIV_8; - // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) - slot_set_isorate(slotnr, settings.clkdiv, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); - // set card voltage to 3.0 V (the most supported) - // note: according to ISO/IEC 7816-3:2006 no voltage should damage the card, and you should cycle from low to high - settings.vsel = SIM_VOLT_3V0; - // provide power (the NCN8025 should perform the activation according to spec) - // note: activation sequence is documented in ISO/IEC 7816-3:2006 section 6.2 - settings.cmdvcc = true; - ncn8025_set(slotnr, &settings); - - // wait for Tb=400 cycles before re-asserting reset - delay_us(400 * 10000 / 2500); // 400 cycles * 1000 for us, 2.5 MHz / 1000 for us - - // de-assert reset to switch card back on - settings.rstin = false; - ncn8025_set(slotnr, &settings); - - // wait for Tc=40000 cycles for transmission to start - uint32_t cycles = 40000; - while (cycles && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - delay_us(10); - cycles -= 25; // 10 us = 25 cycles at 2.5 MHz - } - if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - delay_us(12 * 372 / 1 / 2); // wait more than one byte (approximate freq down to 2 MHz) - } - // verify if one byte has been received - if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - printf("(%d) error: card not responsive\r\n", slotnr); - return; - } - - // read ATR (just do it until there is no traffic anymore) - // TODO the ATR should be parsed to read the right number of bytes, instead we just wait until to end of WT - printf("(%d) ATR: ", slotnr); - uint8_t atr_byte; - while (usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - if (1 == io_read(&SIM_peripheral_descriptors[slotnr]->io, &atr_byte, 1)) { - printf("%02x ", atr_byte); - } - uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU - while (wt && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - } - printf("\r\n"); - - /* disable LED */ - settings.led = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_iccid, cmd_sim_iccid, "sim-iccid", "Read ICCID from SIM card") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { - return; - } - - // read current settings and check if card is present and powered - ncn8025_get(slotnr, &settings); - if (!settings.simpres) { - printf("(%d) error: no card present\r\n", slotnr); - return; - } - if (!settings.cmdvcc) { - printf("(%d) error: card not powered\r\n", slotnr); - return; - } - if (settings.rstin) { - printf("(%d) error: card under reset\r\n", slotnr); - return; - } - - // enable LED - if (!settings.led) { - settings.led = true; - ncn8025_set(slotnr, &settings); - } - - // select MF - printf("(%d) SELECT MF\r\n", slotnr); - const uint8_t select_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; // see TS 102.221 sec. 11.1.1 - const uint8_t select_data_mf[] = {0x3f, 0x00}; // see TS 102.221 sec. 13.1 - int rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_mf, ARRAY_SIZE(select_data_mf), true); // transfer TPDU - if (ERR_NONE != rc) { - printf("error while SELECT MF (errno = %d)\r\n", rc); - } - // ignore response data - - // select EF_ICCID - printf("(%d) SELECT EF_ICCID\r\n", slotnr); - const uint8_t select_data_ef_iccid[] = {0x2f, 0xe2}; // see TS 102.221 sec. 13.2 - rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_ef_iccid, ARRAY_SIZE(select_data_ef_iccid), true); // transfer TPDU - if (ERR_NONE != rc) { - printf("error while SELECT EF_ICCID (errno = %d)\r\n", rc); - } - // ignore response data - - // read EF_ICCID - printf("(%d) READ EF_ICCID\r\n", slotnr); - uint8_t iccid[10]; - uint8_t read_binary[] = {0xa0, 0xb0, 0x00, 0x00, ARRAY_SIZE(iccid)}; // see TS 102.221 sec. 11.1.3 - rc = slot_tpdu_xfer(slotnr, read_binary, iccid, ARRAY_SIZE(iccid), false); // transfer TPDU - if (ERR_NONE != rc) { - printf("error while READ ICCID (errno = %d)\r\n", rc); - } - // ignore response data - - printf("(%d) ICCID: ", slotnr); - for (uint8_t i = 0; i < ARRAY_SIZE(iccid); i++) { - uint8_t nibble = iccid[i] & 0xf; - if (0xf == nibble) { - break; - } - printf("%x", nibble); - nibble = iccid[i] >> 4; - if (0xf == nibble) { - break; - } - printf("%x", nibble); - } - printf("\r\n"); - - // disable LED - settings.led = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(get_time, cmd_get_time, "get-time", "Read Time from RTC") -{ - struct calendar_date_time dt; - calendar_get_date_time(&CALENDAR_0, &dt); - printf("%04u-%02u-%02u %02u:%02u:%02u\r\n", dt.date.year, dt.date.month, dt.date.day, - dt.time.hour, dt.time.min, dt.time.sec); -} - -#include -static struct osmo_timer_list t; -static void tmr_cb(void *data) -{ - printf("timer fired!\r\n"); -} -DEFUN(test_timer, cmd_test_timer, "test-timer", "Test osmo_timer") -{ - printf("Setting up timer for 3s...\n\r"); - osmo_timer_setup(&t, &tmr_cb, NULL); - osmo_timer_schedule(&t, 3, 0); -} +//#include +//static struct osmo_timer_list t; +//static void tmr_cb(void *data) +//{ +// printf("timer fired!\r\n"); +//} +//DEFUN(test_timer, cmd_test_timer, "test-timer", "Test osmo_timer") +//{ +// printf("Setting up timer for 3s...\n\r"); +// osmo_timer_setup(&t, &tmr_cb, NULL); +// osmo_timer_schedule(&t, 3, 0); +//} extern void testmode_init(void); @@ -991,25 +1003,25 @@ #include "talloc.h" #include "logging.h" -#include +//#include void *g_tall_ctx; -DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc report") -{ - talloc_report_full(g_tall_ctx, stdout); -} - -DEFUN(talloc_test, cmd_talloc_test, "talloc-test", "Test the talloc allocator") -{ - for (int i = 0; i < 10; i++) - talloc_named_const(g_tall_ctx, 10, "sibling"); -} - -DEFUN(v_talloc_free, cmd_talloc_free, "talloc-free", "Release all memory") -{ - talloc_free(g_tall_ctx); - g_tall_ctx = NULL; -} +//DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc report") +//{ +// talloc_report_full(g_tall_ctx, stdout); +//} +// +//DEFUN(talloc_test, cmd_talloc_test, "talloc-test", "Test the talloc allocator") +//{ +// for (int i = 0; i < 10; i++) +// talloc_named_const(g_tall_ctx, 10, "sibling"); +//} +// +//DEFUN(v_talloc_free, cmd_talloc_free, "talloc-free", "Release all memory") +//{ +// talloc_free(g_tall_ctx); +// g_tall_ctx = NULL; +//} /* Section 9.6 of SAMD5x/E5x Family Data Sheet */ static int get_chip_unique_serial(uint8_t *out, size_t len) @@ -1065,6 +1077,55 @@ strcat(out, "BACKUP "); } +//####################### + + + +static uint32_t clock_freqs[] = { + 2500000 +}; + +static uint32_t data_rates[] = { + 9600 +}; +extern struct usb_desc_collection usb_fs_descs; + + + +static int feed_ccid(void) +{ + struct usb_ep_q *ep_q = &g_ccid_s.out_ep; + struct msgb *msg; + int rc; + + msg = msgb_dequeue_irqsafe(&g_ccid_s.out_ep.list); + if (!msg) + return -1; + + ccid_handle_out(&g_ci, msg); + return 1; +} + +static int ccid_ops_send_in(struct ccid_instance *ci, struct msgb *msg) +{ + /* add just-received msg to tail of endpoint queue */ + OSMO_ASSERT(msg); + + /* append to list of pending-to-be-handed messages */ + llist_add_tail_at(&msg->list, &g_ccid_s.in_ep.list); + submit_next_in(); + return 0; +} + +static const struct ccid_ops c_ops = { + .send_in = ccid_ops_send_in, + .send_int = 0, +}; + +//####################### + +#define NUM_OUT_BUF 7 + int main(void) { char sernr_buf[16*2+1]; @@ -1077,21 +1138,21 @@ usb_start(); board_init(); - command_init("sysmoOCTSIM> "); - command_register(&cmd_sim_status); - command_register(&cmd_sim_power); - command_register(&cmd_sim_reset); - command_register(&cmd_sim_clkdiv); - command_register(&cmd_sim_voltage); - command_register(&cmd_sim_led); - command_register(&cmd_sim_atr); - command_register(&cmd_sim_iccid); - testmode_init(); - command_register(&cmd_talloc_test); - command_register(&cmd_talloc_report); - command_register(&cmd_talloc_free); - command_register(&cmd_get_time); - command_register(&cmd_test_timer); +// command_init("sysmoOCTSIM> "); +// command_register(&cmd_sim_status); +// command_register(&cmd_sim_power); +// command_register(&cmd_sim_reset); +// command_register(&cmd_sim_clkdiv); +// command_register(&cmd_sim_voltage); +// command_register(&cmd_sim_led); +// command_register(&cmd_sim_atr); +// command_register(&cmd_sim_iccid); +// testmode_init(); +// command_register(&cmd_talloc_test); +// command_register(&cmd_talloc_report); +// command_register(&cmd_talloc_free); +// command_register(&cmd_get_time); +// command_register(&cmd_test_timer); printf("\r\n\r\n" "=============================================================================\n\r" @@ -1109,11 +1170,42 @@ LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); - command_print_prompt(); + //FIXME osmo_emb has a pool? + msgb_set_talloc_ctx(g_tall_ctx); + + ccid_instance_init(&g_ci, &c_ops, &iso_fsm_slot_ops, &usb_fs_descs.ccid.class, + data_rates, clock_freqs, "", 0); + + for(int i =0; i < NUM_OUT_BUF; i++){ + struct msgb *msg = msgb_alloc(300, "ccid"); + OSMO_ASSERT(msg); + /* return the message back to the queue of free message buffers */ + llist_add_tail_at(&msg->list, &g_ccid_s.free_q); + } + submit_next_out(); + +// command_print_prompt(); while (true) { // main loop command_try_recv(); poll_card_detect(); submit_next_irq(); + feed_ccid(); osmo_timers_update(); + int qs = llist_count_at(&g_ccid_s.free_q); + if(qs > NUM_OUT_BUF) + for (int i= 0; i < qs-NUM_OUT_BUF; i++){ + struct msgb *msg = msgb_dequeue_irqsafe(&g_ccid_s.free_q); + if (msg) + msgb_free(msg); + } + if(qs < NUM_OUT_BUF) + for (int i= 0; i < qs-NUM_OUT_BUF; i++){ + struct msgb *msg = msgb_alloc(300,"ccid"); + OSMO_ASSERT(msg); + /* return the message back to the queue of free message buffers */ + llist_add_tail_at(&msg->list, &g_ccid_s.free_q); + } + + } } diff --git a/sysmoOCTSIM/talloc.c b/sysmoOCTSIM/talloc.c index c5c9062..790f657 100644 --- a/sysmoOCTSIM/talloc.c +++ b/sysmoOCTSIM/talloc.c @@ -30,6 +30,10 @@ inspired by http://swapped.cc/halloc/ */ +#include +#include +#include + #include "replace.h" #include "talloc.h" @@ -727,6 +731,9 @@ size_t total_len = TC_HDR_SIZE + size + prefix_len; struct talloc_chunk *parent = NULL; + // do not allocate while handling interrupts! + OSMO_ASSERT( !(SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) ) + if (unlikely(context == NULL)) { context = null_context; } diff --git a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c index 65d3499..665f0fc 100644 --- a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c +++ b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c @@ -24,6 +24,9 @@ #include "ccid_proto.h" #include "usb_includes.h" +#include "cdcdf_acm_desc.h" +#include "usb_descriptors.h" + #ifndef USB_CLASS_CCID #define USB_CLASS_CCID 11 #endif @@ -40,9 +43,11 @@ static struct usbdf_driver _ccid_df; static struct ccid_df_func_data _ccid_df_funcd; +extern const struct usb_desc_collection usb_fs_descs; + /* FIXME: make those configurable, ensure they're sized according to * bNumClockSupported / bNumDataRatesSupported */ -static uint32_t ccid_clock_frequencies[] = { LE32(20000) }; +static uint32_t ccid_clock_frequencies[CCID_NUM_CLK_SUPPORTED] = { LE32(2500),LE32(5000),LE32(10000),LE32(20000) }; static uint32_t ccid_baud_rates[] = { LE32(9600) }; static int32_t ccid_df_enable(struct usbdf_driver *drv, struct usbd_descriptors *desc) diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index 944e43b..f0d1a5c 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -4,51 +4,11 @@ #include "usb_protocol_cdc.h" #include "ccid_proto.h" #include "cdcdf_acm_desc.h" +#include "usb_descriptors.h" -/* aggregate descriptors for the combined CDC-ACM + CCID device that we expose - * from sysmoQMOD */ -enum str_desc_num { - STR_DESC_MANUF = 1, - STR_DESC_PRODUCT, - STR_DESC_CONFIG, - STR_DESC_INTF_ACM_COMM, - STR_DESC_INTF_ACM_DATA, - STR_DESC_INTF_CCID, - STR_DESC_SERIAL, -}; -/* a struct of structs representing the concatenated collection of USB descriptors */ -struct usb_desc_collection { - struct usb_dev_desc dev; - struct usb_config_desc cfg; - - /* CDC-ACM: Two interfaces, one with IRQ EP and one with BULK IN + OUT */ - struct { - struct { - struct usb_iface_desc iface; - struct usb_cdc_hdr_desc cdc_hdr; - struct usb_cdc_call_mgmt_desc cdc_call_mgmt; - struct usb_cdc_acm_desc cdc_acm; - struct usb_cdc_union_desc cdc_union; - struct usb_ep_desc ep[1]; - } comm; - struct { - struct usb_iface_desc iface; - struct usb_ep_desc ep[2]; - } data; - } cdc; - - /* CCID: One interface with CCID class descriptor and three endpoints */ - struct { - struct usb_iface_desc iface; - struct usb_ccid_class_descriptor class; - struct usb_ep_desc ep[3]; - } ccid; - uint8_t str[116]; -} __attribute__((packed)); - -static const struct usb_desc_collection usb_fs_descs = { +const struct usb_desc_collection usb_fs_descs = { .dev = { .bLength = sizeof(struct usb_dev_desc), .bDescriptorType = USB_DT_DEVICE, @@ -176,17 +136,19 @@ .bcdCCID = LE16(0x0110), .bMaxSlotIndex = 7, .bVoltageSupport = 0x07, /* 5/3/1.8V */ - .dwProtocols = 0x03, +// .dwProtocols = 0x03, + .dwProtocols = 0x01, .dwDefaultClock = LE32(2500), .dwMaximumClock = LE32(20000), - .bNumClockSupported = 4, + .bNumClockSupported = CCID_NUM_CLK_SUPPORTED, .dwDataRate = LE32(9600), .dwMaxDataRate = LE32(921600), .bNumDataRatesSupported = 0, .dwMaxIFSD = LE32(0), .dwSynchProtocols = LE32(0), .dwMechanical = LE32(0), - .dwFeatures = LE32(0x10 | 0x00010000), + .dwFeatures = LE32(0x10 | 0x00010080), +// .dwFeatures = LE32(0x2 | 0x40), .dwMaxCCIDMessageLength = 272, .bClassGetResponse = 0xff, .bClassEnvelope = 0xff, diff --git a/sysmoOCTSIM/usb_descriptors.h b/sysmoOCTSIM/usb_descriptors.h new file mode 100644 index 0000000..75b9e01 --- /dev/null +++ b/sysmoOCTSIM/usb_descriptors.h @@ -0,0 +1,56 @@ +/* + * usb_descriptors.h + * + * Created on: Oct 11, 2019 + * Author: phi + */ + +#ifndef USB_DESCRIPTORS_H_ +#define USB_DESCRIPTORS_H_ + +#define CCID_NUM_CLK_SUPPORTED 4 + +/* aggregate descriptors for the combined CDC-ACM + CCID device that we expose + * from sysmoQMOD */ + +enum str_desc_num { + STR_DESC_MANUF = 1, + STR_DESC_PRODUCT, + STR_DESC_CONFIG, + STR_DESC_INTF_ACM_COMM, + STR_DESC_INTF_ACM_DATA, + STR_DESC_INTF_CCID, + STR_DESC_SERIAL, +}; + +/* a struct of structs representing the concatenated collection of USB descriptors */ +struct usb_desc_collection { + struct usb_dev_desc dev; + struct usb_config_desc cfg; + + /* CDC-ACM: Two interfaces, one with IRQ EP and one with BULK IN + OUT */ + struct { + struct { + struct usb_iface_desc iface; + struct usb_cdc_hdr_desc cdc_hdr; + struct usb_cdc_call_mgmt_desc cdc_call_mgmt; + struct usb_cdc_acm_desc cdc_acm; + struct usb_cdc_union_desc cdc_union; + struct usb_ep_desc ep[1]; + } comm; + struct { + struct usb_iface_desc iface; + struct usb_ep_desc ep[2]; + } data; + } cdc; + + /* CCID: One interface with CCID class descriptor and three endpoints */ + struct { + struct usb_iface_desc iface; + struct usb_ccid_class_descriptor class; + struct usb_ep_desc ep[3]; + } ccid; + uint8_t str[116]; +} __attribute__((packed)); + +#endif /* USB_DESCRIPTORS_H_ */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia9d3b099181c24feabdb6a5fddb8db6c44efb72d Gerrit-Change-Number: 16235 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:11 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:11 +0000 Subject: Change in osmo-ccid-firmware[master]: prevent uart interrupts before having proper structs References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16236 ) Change subject: prevent uart interrupts before having proper structs ...................................................................... prevent uart interrupts before having proper structs Change-Id: I177b182e5c693da34183e9066351e6930c61e4a6 --- M sysmoOCTSIM/main.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/36/16236/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index e27e3dd..1949aa8 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -1173,6 +1173,8 @@ //FIXME osmo_emb has a pool? msgb_set_talloc_ctx(g_tall_ctx); + //prevent spurious interrupts before our driver structs are ready + CRITICAL_SECTION_ENTER() ccid_instance_init(&g_ci, &c_ops, &iso_fsm_slot_ops, &usb_fs_descs.ccid.class, data_rates, clock_freqs, "", 0); @@ -1183,6 +1185,7 @@ llist_add_tail_at(&msg->list, &g_ccid_s.free_q); } submit_next_out(); + CRITICAL_SECTION_LEAVE() // command_print_prompt(); while (true) { // main loop -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I177b182e5c693da34183e9066351e6930c61e4a6 Gerrit-Change-Number: 16236 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:11 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:11 +0000 Subject: Change in osmo-ccid-firmware[master]: setparameters/PPS works References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237 ) Change subject: setparameters/PPS works ...................................................................... setparameters/PPS works Change-Id: I2e226b0033f8a147fad60a33a63cc45ee9adc756 --- M ccid_common/ccid_device.c M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.h R ccid_common/iso7816_3.c R ccid_common/iso7816_3.h M ccid_common/iso7816_fsm.c M ccid_common/iso7816_fsm.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/ncn8025.c M sysmoOCTSIM/ncn8025.h 12 files changed, 370 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/37/16237/1 diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index 8183b16..ba36988 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -24,8 +24,10 @@ static int decode_ccid_pars_t0(struct ccid_pars_decoded *out, const struct ccid_proto_data_t0 *in) { /* input validation: only 0x00 and 0x02 permitted for bmTCCKST0 */ - if (in->bmTCCKST0 & 0xFD) - return -11; +// if (in->bmTCCKST0 & 0xFD) +// return -11; +// 6.1.7 says: "Note: the CCID ignores this bit", placeholder for GETparameters + /* input validation: only 0x00 to 0x03 permitted for bClockSTop */ if (in->bClockStop & 0xFC) return -14; @@ -254,7 +256,7 @@ } return msg; } -static struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, +struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err) { return ccid_gen_parameters_t0_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, &cs->pars); @@ -276,7 +278,7 @@ } return msg; } -static struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, +struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err) { return ccid_gen_parameters_t1_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, &cs->pars); @@ -465,7 +467,7 @@ /* copy default parameters from somewhere */ /* FIXME: T=1 */ - cs->ci->slot_ops->set_params(cs, CCID_PROTOCOL_NUM_T0, cs->default_pars); + cs->ci->slot_ops->set_params(cs, seq, CCID_PROTOCOL_NUM_T0, cs->default_pars); cs->pars = *cs->default_pars; resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); @@ -502,14 +504,16 @@ goto out; } + cs->proposed_pars = pars_dec; + /* validate parameters; abort if they are not supported */ - rc = cs->ci->slot_ops->set_params(cs, spar->bProtocolNum, &pars_dec); + rc = cs->ci->slot_ops->set_params(cs, seq, spar->bProtocolNum, &pars_dec); if (rc < 0) { resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); - } else { - cs->pars = pars_dec; - resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); + goto out; } + /* busy, tdpu like callback */ + return 1; out: return ccid_slot_send_unbusy(cs, resp); } diff --git a/ccid_common/ccid_device.h b/ccid_common/ccid_device.h index ae3ab5b..8390783 100644 --- a/ccid_common/ccid_device.h +++ b/ccid_common/ccid_device.h @@ -53,6 +53,8 @@ bool cmd_busy; /* decided CCID parameters */ struct ccid_pars_decoded pars; + /* proposed CCID parameters */ + struct ccid_pars_decoded proposed_pars; /* default parameters; applied on ResetParameters */ const struct ccid_pars_decoded *default_pars; }; @@ -80,7 +82,7 @@ const struct ccid_pc_to_rdr_xfr_block *xfb); void (*set_power)(struct ccid_slot *cs, bool enable); void (*set_clock)(struct ccid_slot *cs, enum ccid_clock_command cmd); - int (*set_params)(struct ccid_slot *cs, enum ccid_protocol_num proto, + int (*set_params)(struct ccid_slot *cs, uint8_t seq, enum ccid_protocol_num proto, const struct ccid_pars_decoded *pars_dec); int (*set_rate_and_clock)(struct ccid_slot *cs, uint32_t freq_hz, uint32_t rate_bps); }; @@ -118,6 +120,10 @@ const uint32_t *data_rates, const uint32_t *clock_freqs, const char *name, void *priv); int ccid_handle_out(struct ccid_instance *ci, struct msgb *msg); +struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err); +struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err); /* Invalid request received: Please return STALL */ #define CCID_CTRL_RET_INVALID -1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 870cf35..8bdcfd5 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -13,6 +13,7 @@ #include "ccid_device.h" #include "cuart.h" #include "iso7816_fsm.h" +#include "iso7816_3.h" struct iso_fsm_slot { /* CCID slot above us */ @@ -112,6 +113,33 @@ ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); break; + case ISO7816_E_PPS_DONE_IND: + tpdu = data; + /* pps was successful, so we know these values are fine */ + uint16_t F = iso7816_3_fi_table[cs->proposed_pars.fi]; + uint8_t D = iso7816_3_di_table[cs->proposed_pars.di]; + uint32_t fmax = iso7816_3_fmax_table[cs->proposed_pars.fi]; + + card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK_FREQ, fmax); + card_uart_ctrl(ss->cuart, CUART_CTL_FD, F/D); + card_uart_ctrl(ss->cuart, CUART_CTL_WTIME, cs->proposed_pars.t0.waiting_integer); + + cs->pars = cs->proposed_pars; + resp = ccid_gen_parameters_t0(cs, ss->seq, CCID_CMD_STATUS_OK, 0); + + ccid_slot_send_unbusy(cs, resp); + + /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ + msgb_free(tpdu); + break; + case ISO7816_E_PPS_FAILED_IND: + tpdu = data; + /* failed fi/di */ + resp = ccid_gen_parameters_t0(cs, ss->seq, CCID_CMD_STATUS_FAILED, 10); + ccid_slot_send_unbusy(cs, resp); + /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ + msgb_free(tpdu); + break; default: LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, cause=%d, data=%p) unhandled\n", __func__, event, cause, data); @@ -175,10 +203,36 @@ } } -static int iso_fsm_slot_set_params(struct ccid_slot *cs, enum ccid_protocol_num proto, +static int iso_fsm_slot_set_params(struct ccid_slot *cs, uint8_t seq, enum ccid_protocol_num proto, const struct ccid_pars_decoded *pars_dec) { - /* we always acknowledge all parameters */ + struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); + struct msgb *tpdu; + + /* see 6.1.7 for error offsets */ + if(proto != CCID_PROTOCOL_NUM_T0) + return -7; + + if(pars_dec->t0.guard_time_etu != 0) + return -12; + + if(pars_dec->clock_stop != CCID_CLOCK_STOP_NOTALLOWED) + return -14; + + ss->seq = seq; + + /* Hardware does not support SPU, so no PPS2, and PPS3 is reserved anyway */ + tpdu = msgb_alloc(6, "PPSRQ"); + OSMO_ASSERT(tpdu); + msgb_put_u8(tpdu, 0xff); + msgb_put_u8(tpdu, (1 << 4)); /* only PPS1, T=0 */ + msgb_put_u8(tpdu, (pars_dec->fi << 4 | pars_dec->di)); + msgb_put_u8(tpdu, 0xff ^ (1 << 4) ^ (pars_dec->fi << 4 | pars_dec->di)); + + + LOGPCS(cs, LOGL_DEBUG, "scheduling PPS transfer: %s\n", msgb_hexdump(tpdu)); + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_PPS_CMD, tpdu); + /* continues in iso_fsm_clot_user_cb once response/error/timeout is received */ return 0; } diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 5e397ab..9c93b7e 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -25,8 +25,10 @@ CUART_CTL_RX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ + CUART_CTL_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ CUART_CTL_RST, /* enable/disable ICC reset */ CUART_CTL_WTIME, /* set the waiting time (in etu) */ + CUART_CTL_FD, }; struct card_uart; @@ -74,6 +76,7 @@ uint32_t wtime_etu; struct osmo_timer_list wtime_tmr; + /* driver-specific private data */ union { struct { @@ -95,6 +98,8 @@ struct { struct usart_async_descriptor *usa_pd; uint8_t slot_nr; + /* in us, required, no delay breaks _rx_ */ + uint32_t extrawait_after_rx; } asf4; } u; }; diff --git a/sysmoOCTSIM/iso7816_3.c b/ccid_common/iso7816_3.c similarity index 100% rename from sysmoOCTSIM/iso7816_3.c rename to ccid_common/iso7816_3.c diff --git a/sysmoOCTSIM/iso7816_3.h b/ccid_common/iso7816_3.h similarity index 100% rename from sysmoOCTSIM/iso7816_3.h rename to ccid_common/iso7816_3.h diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index beda7ab..c675ece 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -69,6 +69,7 @@ * @note defined in ISO/IEC 7816-3:2006(E) section 9 */ enum pps_state { + PPS_S_TX_PPS_REQ, /*!< tx pps request */ PPS_S_WAIT_PPSS, /*!< initial byte */ PPS_S_WAIT_PPS0, /*!< format byte */ PPS_S_WAIT_PPS1, /*!< first parameter byte */ @@ -221,7 +222,7 @@ /* go back to initial state in child FSMs */ osmo_fsm_inst_state_chg(ip->atr_fi, ATR_S_WAIT_TS, 0, 0); - //osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_WAIT_PPSS, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); osmo_fsm_inst_state_chg(ip->tpdu_fi, TPDU_S_INIT, 0, 0); } @@ -311,6 +312,12 @@ /* pass on to sub-fsm */ osmo_fsm_inst_dispatch(ip->tpdu_fi, event, data); break; + case ISO7816_E_XCEIVE_PPS_CMD: +// osmo_fsm_inst_state_chg(fi, ISO7816_S_IN_PPS_REQ, 0, 0); + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); + osmo_fsm_inst_dispatch(ip->pps_fi, event, data); + break; default: OSMO_ASSERT(0); } @@ -369,6 +376,65 @@ } } +static void iso7816_3_in_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct iso7816_3_priv *tfp = get_iso7816_3_priv(fi); +// struct osmo_fsm_inst *parent_fi = fi->proc.parent; +// struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + switch (event) { + case ISO7816_E_XCEIVE_PPS_CMD: + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); +// card_uart_tx(tfp->uart, msgb_data(data), msgb_length(data), true); + break; + default: + OSMO_ASSERT(0); + } +} + + +static void iso7816_3_s_wait_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + switch (event) { + case ISO7816_E_TX_COMPL: + /* Rx of single byte is already enabled by previous card_uart_tx() call */ + osmo_fsm_inst_state_chg(fi, ISO7816_S_IN_PPS_RSP, 0, 0); + break; + default: + OSMO_ASSERT(0); + } +} + +static void iso7816_3_s_ins_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); + struct msgb *ppsrsp; + OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + + switch (event) { + case ISO7816_E_RX_SINGLE: + case ISO7816_E_WTIME_EXP: + /* simply pass this through to the child FSM for the ATR */ + osmo_fsm_inst_dispatch(ip->pps_fi, event, data); + break; + case ISO7816_E_PPS_DONE_IND: + case ISO7816_E_PPS_FAILED_IND: + ppsrsp = data; + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_TPDU, 0, 0); + /* notify user about PPS result */ + ip->user_cb(fi, event, 0, ppsrsp); + break; + case ISO7816_E_RX_ERR_IND: + ppsrsp = data; + osmo_fsm_inst_state_chg(fi, ISO7816_S_RESET, 0, 0); + ip->user_cb(fi, event, 0, ppsrsp); + break; + default: + OSMO_ASSERT(0); + } +} + static const struct osmo_fsm_state iso7816_3_states[] = { [ISO7816_S_RESET] = { .name = "RESET", @@ -400,11 +466,13 @@ }, [ISO7816_S_WAIT_TPDU] = { .name = "WAIT_TPDU", - .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD), + .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD) | + S(ISO7816_E_XCEIVE_PPS_CMD), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_TPDU) | - S(ISO7816_S_IN_PPS_REQ), + S(ISO7816_S_IN_PPS_REQ) | + S(ISO7816_S_WAIT_PPS_RSP), .action = iso7816_3_wait_tpdu_action, .onenter = iso7816_3_wait_tpdu_onenter, }, @@ -424,26 +492,36 @@ }, [ISO7816_S_IN_PPS_REQ] = { .name = "IN_PPS_REQ", - .in_event_mask = 0, /* FIXME */ + .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_PPS_REQ) | S(ISO7816_S_WAIT_PPS_RSP), + .action = iso7816_3_in_pps_req_action, }, [ISO7816_S_WAIT_PPS_RSP] = { .name = "WAIT_PPS_RESP", - .in_event_mask = 0, /* FIXME */ + .in_event_mask = S(ISO7816_E_TX_COMPL) | + S(ISO7816_E_TX_ERR_IND) | + S(ISO7816_E_WTIME_EXP), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_WAIT_PPS_RSP) | S(ISO7816_S_IN_PPS_RSP), + .action = iso7816_3_s_wait_pps_rsp_action, }, [ISO7816_S_IN_PPS_RSP] = { .name = "IN_PPS_RESP", - .in_event_mask = 0, /* FIXME */ + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_RX_COMPL) | + S(ISO7816_E_RX_ERR_IND) | + S(ISO7816_E_PPS_DONE_IND) | + S(ISO7816_E_PPS_FAILED_IND) | + S(ISO7816_E_WTIME_EXP), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_PPS_RSP), + .action = iso7816_3_s_ins_pps_rsp_action, }, }; static struct osmo_fsm iso7816_3_fsm = { @@ -796,28 +874,188 @@ /*********************************************************************** * PPS FSM ***********************************************************************/ +struct pps_fsm_priv { + struct msgb* tx_cmd; + struct msgb* rx_cmd; + uint8_t pps0_recv; +}; + +static void pps_s_wait_ppss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct pps_fsm_priv *atp = fi->priv; + + if (!atp->rx_cmd) + atp->rx_cmd = msgb_alloc_c(fi, 6, "ATR"); /* TS + 32 chars */ + else + msgb_reset(atp->rx_cmd); +} + +static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct pps_fsm_priv *atp = fi->priv; + atp->tx_cmd = data; + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + switch (event) { + case ISO7816_E_XCEIVE_PPS_CMD: + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSS, 0, 0); + card_uart_tx(ip->uart, msgb_data(data), msgb_length(data), true); + break; + default: + OSMO_ASSERT(0); + } +} + +static void pps_wait_pX_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct pps_fsm_priv *atp = fi->priv; +// uint32_t guard_time_ms = atr_fi_gt_ms(fi); + uint8_t byte; + + switch (event) { + case ISO7816_E_RX_SINGLE: + byte = get_rx_byte_evt(fi->proc.parent, data); + LOGPFSML(fi, LOGL_DEBUG, "RX byte '%02x'\n", byte); + msgb_put_u8(atp->rx_cmd, byte); + switch (fi->state) { + case PPS_S_WAIT_PPSS: + if (byte == 0xff) + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS0, 0, 0); + break; + case PPS_S_WAIT_PPS0: + atp->pps0_recv = byte; + if(atp->pps0_recv & (1 << 4)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS1, 0, 0); + break; + } else if (atp->pps0_recv & (1 << 5)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS2, 0, 0); + break; + } else if (atp->pps0_recv & (1 << 6)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS3, 0, 0); + break; + } + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PPS1: + if (atp->pps0_recv & (1 << 5)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS2, 0, 0); + break; + } else if (atp->pps0_recv & (1 << 6)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS3, 0, 0); + break; + } + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PPS2: + if (atp->pps0_recv & (1 << 6)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS3, 0, 0); + break; + } + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PPS3: + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PCK: + /* verify checksum if present */ + if (fi->state == PPS_S_WAIT_PCK) { + uint8_t *pps_received = msgb_data(atp->rx_cmd); + uint8_t *pps_sent = msgb_data(atp->tx_cmd); + + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_END, 0, 0); + + /* pps was successful if response equals request + * rx buffer stays with the fsm, tx buffer gets handed back and freed + * by the cb */ + if (msgb_length(atp->rx_cmd) == msgb_length(atp->tx_cmd) && + !memcmp(pps_received, pps_sent, msgb_length(atp->rx_cmd))) { + osmo_fsm_inst_dispatch(fi->proc.parent, + ISO7816_E_PPS_DONE_IND, atp->tx_cmd); + } else { + osmo_fsm_inst_dispatch(fi->proc.parent, + ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); + } + } + break; + default: + OSMO_ASSERT(0); + } + break; + case ISO7816_E_WTIME_EXP: + /* FIXME: timeout handling if no pps supported ? */ + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_RX_ERR_IND, NULL); + break; + default: + OSMO_ASSERT(0); + } +} + static const struct osmo_fsm_state pps_states[] = { + [PPS_S_TX_PPS_REQ] = { + .name = "TX_PPS_REQ", + .in_event_mask = S(ISO7816_E_XCEIVE_PPS_CMD) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_TX_PPS_REQ) | + S(PPS_S_WAIT_PPSS), + .action = pps_s_tx_pps_req_action, + .onenter = pps_s_wait_ppss_onenter, + }, [PPS_S_WAIT_PPSS] = { .name = "WAIT_PPSS", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS0) | + S(PPS_S_WAIT_PPSS), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS0] = { .name = "WAIT_PPS0", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS1) | + S(PPS_S_WAIT_PPS2) | + S(PPS_S_WAIT_PPS3) | + S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS1] = { .name = "WAIT_PPS1", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS2) | + S(PPS_S_WAIT_PPS3) | + S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS2] = { .name = "WAIT_PPS2", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS3) | + S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS3] = { .name = "WAIT_PPS3", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PCK] = { .name = "WAIT_PCK", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_END), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_END] = { .name = "WAIT_END", + .in_event_mask = 0, + .out_state_mask = S(PPS_S_TX_PPS_REQ) | + S(PPS_S_WAIT_PPSS), }, }; @@ -1223,7 +1461,7 @@ if (!ip->tpdu_fi->priv) goto out_tpdu; -#if 0 +#if 1 ip->pps_fi = osmo_fsm_inst_alloc_child(&pps_fsm, fi, ISO7816_E_SW_ERR_IND); if (!ip->pps_fi) goto out_tpdu; @@ -1237,7 +1475,7 @@ return fi; -#if 0 +#if 1 out_pps: osmo_fsm_inst_free(ip->pps_fi); #endif diff --git a/ccid_common/iso7816_fsm.h b/ccid_common/iso7816_fsm.h index f2c7483..f512709 100644 --- a/ccid_common/iso7816_fsm.h +++ b/ccid_common/iso7816_fsm.h @@ -21,6 +21,9 @@ ISO7816_E_RESET_ACT_IND, /*!< Reset activated */ ISO7816_E_ABORT_REQ, /*!< Abort request (e.g. from CCID) */ /* TODO: PPS request */ + ISO7816_E_XCEIVE_PPS_CMD, + ISO7816_E_PPS_DONE_IND, + ISO7816_E_PPS_FAILED_IND, /* TODO: Clock stop request */ /* TODO: Rx FIFO overrun */ /* TODO: Rx buffer overrun */ diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index f9856f3..a8f8044 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -289,6 +289,8 @@ cuart->u.asf4.usa_pd = usa_pd; cuart->u.asf4.slot_nr = slot_nr; + /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ + cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); usart_async_register_callback(usa_pd, USART_ASYNC_RXC_CB, SIM_rx_cb[slot_nr]); usart_async_register_callback(usa_pd, USART_ASYNC_TXC_CB, SIM_tx_cb[slot_nr]); @@ -338,6 +340,8 @@ return io_read(&usa_pd->io, data, len); } +#include "ccid_device.h" +#include "iso7816_3.h" static int asf4_usart_ctrl(struct card_uart *cuart, enum card_uart_ctl ctl, int arg) { struct ncn8025_settings settings; @@ -349,7 +353,7 @@ sercom->USART.CTRLB.bit.RXEN = 1; sercom->USART.CTRLB.bit.TXEN = 0; } else { - delay_us(100); + delay_us(cuart->u.asf4.extrawait_after_rx); sercom->USART.CTRLB.bit.RXEN = 0; sercom->USART.CTRLB.bit.TXEN = 1; } @@ -361,22 +365,47 @@ usart_async_flush_rx_buffer(cuart->u.asf4.usa_pd); break; case CUART_CTL_POWER: - ncn8025_get(cuart->u.asf4.slot_nr, &settings); - settings.cmdvcc = arg ? true : false; - settings.led = arg ? true : false; - settings.vsel = SIM_VOLT_5V0; + /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ + cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) if(arg) slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + settings.cmdvcc = arg ? true : false; + settings.led = arg ? true : false; + settings.vsel = SIM_VOLT_5V0; ncn8025_set(cuart->u.asf4.slot_nr, &settings); + break; case CUART_CTL_WTIME: /* no driver-specific handling of this */ break; case CUART_CTL_CLOCK: - /* FIXME */ + /* no clock stop support */ + break; + case CUART_CTL_CLOCK_FREQ: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + + /* 2,5/5/10/20 supported by dividers */ + enum ncn8025_sim_clkdiv clkdiv = SIM_CLKDIV_1; + if(arg < 20000000) + clkdiv = SIM_CLKDIV_2; + if(arg < 10000000) + clkdiv = SIM_CLKDIV_4; + if(arg < 5000000) + clkdiv = SIM_CLKDIV_8; + settings.clkdiv = clkdiv; + ncn8025_set(cuart->u.asf4.slot_nr, &settings); + break; + case CUART_CTL_FD: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + uint8_t divider = ncn8025_div_val[settings.clkdiv]; + uint32_t baudrate = (20e6/divider)/arg; + cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; + slot_set_baudrate(cuart->u.asf4.slot_nr, baudrate); + break; default: return -EINVAL; } diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 9873159..41f5d10 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -84,6 +84,7 @@ ccid_common/ccid_proto.o \ ccid_common/ccid_device.o \ ccid_common/iso7816_fsm.o \ + ccid_common/iso7816_3.o \ ccid_common/cuart.o \ ccid_common/ccid_slot_fsm.o \ cuart_driver_asf4_usart_async.o \ @@ -123,7 +124,6 @@ hpl/sercom/hpl_sercom.o \ hpl/usb/hpl_usb.o \ i2c_bitbang.o \ - iso7816_3.o \ libosmo_emb.o \ main.o \ manual_test.o \ diff --git a/sysmoOCTSIM/ncn8025.c b/sysmoOCTSIM/ncn8025.c index 540b166..74d3b39 100644 --- a/sysmoOCTSIM/ncn8025.c +++ b/sysmoOCTSIM/ncn8025.c @@ -159,7 +159,7 @@ [SIM_VOLT_1V8] = "1.8", }; -static const unsigned int div_val[] = { +const unsigned int ncn8025_div_val[] = { [SIM_CLKDIV_1] = 1, [SIM_CLKDIV_2] = 2, [SIM_CLKDIV_4] = 4, @@ -168,7 +168,7 @@ void ncn8025_dump(const struct ncn8025_settings *set) { - printf("VOLT=%s, CLKDIV=%u", volt_str[set->vsel], div_val[set->clkdiv]); + printf("VOLT=%s, CLKDIV=%u", volt_str[set->vsel], ncn8025_div_val[set->clkdiv]); if (set->rstin) printf(", RST"); if (set->cmdvcc) diff --git a/sysmoOCTSIM/ncn8025.h b/sysmoOCTSIM/ncn8025.h index 2e774a7..01ddc97 100644 --- a/sysmoOCTSIM/ncn8025.h +++ b/sysmoOCTSIM/ncn8025.h @@ -14,6 +14,8 @@ SIM_CLKDIV_8 = 0, }; +extern const unsigned int ncn8025_div_val[]; + struct ncn8025_settings { bool rstin; /* Reset signal (true: asserted low) */ bool cmdvcc; /* Command VCC pin. Activation sequence Enable (true: active low) */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I2e226b0033f8a147fad60a33a63cc45ee9adc756 Gerrit-Change-Number: 16237 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:11 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:11 +0000 Subject: Change in osmo-ccid-firmware[master]: attempt at handling card insertion/removal References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16238 ) Change subject: attempt at handling card insertion/removal ...................................................................... attempt at handling card insertion/removal Change-Id: Ib1a9a9c5cfb8c22cc3b885bc30a349e0f0145630 --- M ccid_common/ccid_device.c M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M ccid_common/iso7816_fsm.h M sysmoOCTSIM/main.c 6 files changed, 89 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/38/16238/1 diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index ba36988..84bd09a 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -438,9 +438,20 @@ { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); const struct ccid_header *ch = (const struct ccid_header *) u; + struct msgb *resp; + int rc; /* handle this asynchronously */ - cs->ci->slot_ops->xfr_block_async(cs, msg, &u->xfr_block); + rc = cs->ci->slot_ops->xfr_block_async(cs, msg, &u->xfr_block); + if (rc < 0) { + msgb_trim(msg, sizeof(struct ccid_rdr_to_pc_data_block)); + resp = ccid_gen_data_block(cs, u->xfr_block.hdr.bSeq, CCID_CMD_STATUS_FAILED, -rc, 0, 0); + goto out; + } + /* busy */ + return 1; +out: + ccid_slot_send_unbusy(cs, resp); return 1; } diff --git a/ccid_common/ccid_device.h b/ccid_common/ccid_device.h index 8390783..38a71db 100644 --- a/ccid_common/ccid_device.h +++ b/ccid_common/ccid_device.h @@ -78,13 +78,14 @@ void (*icc_power_on_async)(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_icc_power_on *ipo); - void (*xfr_block_async)(struct ccid_slot *cs, struct msgb *msg, + int (*xfr_block_async)(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_xfr_block *xfb); void (*set_power)(struct ccid_slot *cs, bool enable); void (*set_clock)(struct ccid_slot *cs, enum ccid_clock_command cmd); int (*set_params)(struct ccid_slot *cs, uint8_t seq, enum ccid_protocol_num proto, const struct ccid_pars_decoded *pars_dec); int (*set_rate_and_clock)(struct ccid_slot *cs, uint32_t freq_hz, uint32_t rate_bps); + void (*icc_set_insertion_status)(struct ccid_slot *cs, bool present); }; /* An instance of CCID (i.e. a card reader device) */ diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 8bdcfd5..8d38f29 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -66,6 +66,23 @@ /* do nothing; real hardware would update the slot related state here */ } +static void iso_fsm_slot_icc_set_insertion_status(struct ccid_slot *cs, bool present) { + struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); + + if(present == cs->icc_present) + return; + + cs->icc_present = present; + + if (!present) { + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_CARD_REMOVAL, NULL); + card_uart_ctrl(ss->cuart, CUART_CTL_RST, true); + card_uart_ctrl(ss->cuart, CUART_CTL_POWER, false); + cs->icc_powered = false; + cs->cmd_busy = false; + } +} + static void iso_fsm_slot_icc_power_on_async(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_icc_power_on *ipo) { @@ -113,6 +130,15 @@ ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); break; + case ISO7816_E_TPDU_FAILED_IND: + tpdu = data; + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + msgb_hexdump(tpdu)); + /* FIXME: other error causes than card removal?*/ + resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_FAILED, CCID_ERR_ICC_MUTE, msgb_l2(tpdu), 0); + ccid_slot_send_unbusy(cs, resp); + msgb_free(tpdu); + break; case ISO7816_E_PPS_DONE_IND: tpdu = data; /* pps was successful, so we know these values are fine */ @@ -147,12 +173,15 @@ } } -static void iso_fsm_slot_xfr_block_async(struct ccid_slot *cs, struct msgb *msg, +static int iso_fsm_slot_xfr_block_async(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_xfr_block *xfb) { struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct msgb *tpdu; + if(!cs->icc_present) + return -CCID_ERR_ICC_MUTE; + ss->seq = xfb->hdr.bSeq; /* must be '0' for TPDU level exchanges or for short APDU */ @@ -171,6 +200,7 @@ LOGPCS(cs, LOGL_DEBUG, "scheduling TPDU transfer: %s\n", msgb_hexdump(tpdu)); osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_TPDU_CMD, tpdu); /* continues in iso_fsm_clot_user_cb once response/error/timeout is received */ + return 0; } @@ -296,6 +326,7 @@ .init = iso_fsm_slot_init, .pre_proc_cb = iso_fsm_slot_pre_proc_cb, .icc_power_on_async = iso_fsm_slot_icc_power_on_async, + .icc_set_insertion_status = iso_fsm_slot_icc_set_insertion_status, .xfr_block_async = iso_fsm_slot_xfr_block_async, .set_power = iso_fsm_slot_set_power, .set_clock = iso_fsm_slot_set_clock, diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index c675ece..3d09a84 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -45,7 +45,6 @@ ISO7816_S_IN_ATR, /*!< while we are receiving the ATR */ ISO7816_S_WAIT_TPDU, /*!< waiting for start of new TPDU */ ISO7816_S_IN_TPDU, /*!< inside a single TPDU */ - ISO7816_S_IN_PPS_REQ, /*!< while we are inside the PPS request */ ISO7816_S_WAIT_PPS_RSP, /*!< waiting for start of the PPS response */ ISO7816_S_IN_PPS_RSP, /*!< while we are inside the PPS request */ }; @@ -230,6 +229,7 @@ { struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + struct msgb *msg; switch (event) { case ISO7816_E_RESET_REL_IND: @@ -238,6 +238,16 @@ osmo_fsm_inst_state_chg_ms(fi, ISO7816_S_WAIT_ATR, fi_cycles2ms(fi, 40000), T_WAIT_ATR); break; + case ISO7816_E_PPS_FAILED_IND: + msg = data; + /* notify user about PPS result */ + ip->user_cb(fi, event, 0, msg); + break; + case ISO7816_E_TPDU_FAILED_IND: + msg = data; + /* hand finished TPDU to user */ + ip->user_cb(fi, event, 0, msg); + break; default: OSMO_ASSERT(0); } @@ -376,22 +386,6 @@ } } -static void iso7816_3_in_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) -{ - struct iso7816_3_priv *tfp = get_iso7816_3_priv(fi); -// struct osmo_fsm_inst *parent_fi = fi->proc.parent; -// struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); - - switch (event) { - case ISO7816_E_XCEIVE_PPS_CMD: - osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); -// card_uart_tx(tfp->uart, msgb_data(data), msgb_length(data), true); - break; - default: - OSMO_ASSERT(0); - } -} - static void iso7816_3_s_wait_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { @@ -438,7 +432,9 @@ static const struct osmo_fsm_state iso7816_3_states[] = { [ISO7816_S_RESET] = { .name = "RESET", - .in_event_mask = S(ISO7816_E_RESET_REL_IND), + .in_event_mask = S(ISO7816_E_RESET_REL_IND) | + S(ISO7816_E_PPS_FAILED_IND)| + S(ISO7816_E_TPDU_FAILED_IND), .out_state_mask = S(ISO7816_S_WAIT_ATR) | S(ISO7816_S_RESET), .action = iso7816_3_reset_action, @@ -471,7 +467,6 @@ .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_TPDU) | - S(ISO7816_S_IN_PPS_REQ) | S(ISO7816_S_WAIT_PPS_RSP), .action = iso7816_3_wait_tpdu_action, .onenter = iso7816_3_wait_tpdu_onenter, @@ -490,15 +485,6 @@ S(ISO7816_S_IN_TPDU), .action = iso7816_3_in_tpdu_action, }, - [ISO7816_S_IN_PPS_REQ] = { - .name = "IN_PPS_REQ", - .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD), - .out_state_mask = S(ISO7816_S_RESET) | - S(ISO7816_S_WAIT_TPDU) | - S(ISO7816_S_IN_PPS_REQ) | - S(ISO7816_S_WAIT_PPS_RSP), - .action = iso7816_3_in_pps_req_action, - }, [ISO7816_S_WAIT_PPS_RSP] = { .name = "WAIT_PPS_RESP", .in_event_mask = S(ISO7816_E_TX_COMPL) | @@ -885,18 +871,27 @@ struct pps_fsm_priv *atp = fi->priv; if (!atp->rx_cmd) - atp->rx_cmd = msgb_alloc_c(fi, 6, "ATR"); /* TS + 32 chars */ + atp->rx_cmd = msgb_alloc_c(fi, 6, "PPSRSP"); /* at most 6 */ else msgb_reset(atp->rx_cmd); + + /* notify in case card got pulled out */ + if (atp->tx_cmd){ + osmo_fsm_inst_dispatch(fi->proc.parent, + ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); + atp->tx_cmd = 0; + } } static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct pps_fsm_priv *atp = fi->priv; - atp->tx_cmd = data; struct osmo_fsm_inst *parent_fi = fi->proc.parent; struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + /* keep the buffer to compare it with the received response */ + atp->tx_cmd = data; + switch (event) { case ISO7816_E_XCEIVE_PPS_CMD: osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSS, 0, 0); @@ -976,6 +971,8 @@ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); } + /* ownership transfer */ + atp->tx_cmd = 0; } break; default: @@ -1097,6 +1094,16 @@ return (struct tpdu_fsm_priv *) fi->priv; } +static void tpdu_s_init_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); + + /* notify in case card got pulled out */ + if (tfp->tpdu){ + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, tfp->tpdu); + tfp->tpdu = 0; + } +} static void tpdu_s_init_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { @@ -1315,6 +1322,9 @@ osmo_fsm_inst_state_chg(fi, TPDU_S_DONE, 0, 0); /* Notify parent FSM */ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_DONE_IND, tfp->tpdu); + + /* ownership transfer */ + tfp->tpdu = 0; break; default: OSMO_ASSERT(0); @@ -1346,6 +1356,7 @@ .out_state_mask = S(TPDU_S_INIT) | S(TPDU_S_TX_HDR), .action = tpdu_s_init_action, + .onenter = tpdu_s_init_onenter, }, [TPDU_S_TX_HDR] = { .name = "TX_HDR", diff --git a/ccid_common/iso7816_fsm.h b/ccid_common/iso7816_fsm.h index f512709..d4aee59 100644 --- a/ccid_common/iso7816_fsm.h +++ b/ccid_common/iso7816_fsm.h @@ -32,6 +32,7 @@ ISO7816_E_ATR_DONE_IND, /*!< ATR Done indication from ATR child FSM */ ISO7816_E_ATR_ERR_IND, /*!< ATR Error indication from ATR child FSM */ ISO7816_E_TPDU_DONE_IND, /*!< TPDU Done indication from TPDU child FSM */ + ISO7816_E_TPDU_FAILED_IND, /*!< TPDU Failed indication from TPDU child FSM */ ISO7816_E_TPDU_CLEAR_REQ, /*!< Return TPDU FSM to TPDU_S_INIT */ }; diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 1949aa8..92091cd 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -353,7 +353,7 @@ for (i = 0; i < 8; i++){ bool level = ncn8025_interrupt_level(i); new_mask |= level << i; - g_ci.slot[i].icc_present = level; + g_ci.slot_ops->icc_set_insertion_status(&g_ci.slot[i], level); } /* notify the user/host about any changes */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16238 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib1a9a9c5cfb8c22cc3b885bc30a349e0f0145630 Gerrit-Change-Number: 16238 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:11 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:11 +0000 Subject: Change in osmo-ccid-firmware[master]: additional descriptor fixes References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16239 ) Change subject: additional descriptor fixes ...................................................................... additional descriptor fixes Change-Id: I5ebe907b3c35107e5a50cbc65835aca75e617c41 --- M sysmoOCTSIM/main.c M sysmoOCTSIM/usb_descriptors.c 2 files changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/39/16239/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 92091cd..6815b18 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -1086,7 +1086,7 @@ }; static uint32_t data_rates[] = { - 9600 + 6720 }; extern struct usb_desc_collection usb_fs_descs; diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index f0d1a5c..5ea11ec 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -136,18 +136,17 @@ .bcdCCID = LE16(0x0110), .bMaxSlotIndex = 7, .bVoltageSupport = 0x07, /* 5/3/1.8V */ -// .dwProtocols = 0x03, .dwProtocols = 0x01, .dwDefaultClock = LE32(2500), .dwMaximumClock = LE32(20000), .bNumClockSupported = CCID_NUM_CLK_SUPPORTED, - .dwDataRate = LE32(9600), + .dwDataRate = LE32(6720), // default clock 2.5M/372 .dwMaxDataRate = LE32(921600), .bNumDataRatesSupported = 0, .dwMaxIFSD = LE32(0), .dwSynchProtocols = LE32(0), .dwMechanical = LE32(0), - .dwFeatures = LE32(0x10 | 0x00010080), + .dwFeatures = LE32(0x10 | 0x20 | 0x80 | 0x00010000), // .dwFeatures = LE32(0x2 | 0x40), .dwMaxCCIDMessageLength = 272, .bClassGetResponse = 0xff, -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16239 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I5ebe907b3c35107e5a50cbc65835aca75e617c41 Gerrit-Change-Number: 16239 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:12 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:12 +0000 Subject: Change in osmo-ccid-firmware[master]: proper sercom config for the other 6 slots References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16240 ) Change subject: proper sercom config for the other 6 slots ...................................................................... proper sercom config for the other 6 slots Change-Id: I266014e4d3ff09be9c5cdd5a686d6d2f5668145a --- M sysmoOCTSIM/config/hpl_sercom_config.h 1 file changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/40/16240/1 diff --git a/sysmoOCTSIM/config/hpl_sercom_config.h b/sysmoOCTSIM/config/hpl_sercom_config.h index 4526665..bb2bbff 100644 --- a/sysmoOCTSIM/config/hpl_sercom_config.h +++ b/sysmoOCTSIM/config/hpl_sercom_config.h @@ -324,7 +324,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_1_USART_SBMODE -#define CONF_SERCOM_1_USART_SBMODE 0 +#define CONF_SERCOM_1_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -342,7 +342,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_1_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_1_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_1_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -596,7 +596,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_2_USART_SBMODE -#define CONF_SERCOM_2_USART_SBMODE 0 +#define CONF_SERCOM_2_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -614,7 +614,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_2_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_2_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_2_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -868,7 +868,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_3_USART_SBMODE -#define CONF_SERCOM_3_USART_SBMODE 0 +#define CONF_SERCOM_3_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -886,7 +886,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_3_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_3_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_3_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -1140,7 +1140,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_4_USART_SBMODE -#define CONF_SERCOM_4_USART_SBMODE 0 +#define CONF_SERCOM_4_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -1158,7 +1158,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_4_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_4_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_4_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -1412,7 +1412,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_5_USART_SBMODE -#define CONF_SERCOM_5_USART_SBMODE 0 +#define CONF_SERCOM_5_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -1430,7 +1430,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_5_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_5_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_5_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -1684,7 +1684,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_6_USART_SBMODE -#define CONF_SERCOM_6_USART_SBMODE 0 +#define CONF_SERCOM_6_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -1702,7 +1702,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_6_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_6_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_6_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I266014e4d3ff09be9c5cdd5a686d6d2f5668145a Gerrit-Change-Number: 16240 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:12 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:12 +0000 Subject: Change in osmo-ccid-firmware[master]: assert on free in interrupt, too References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16241 ) Change subject: assert on free in interrupt, too ...................................................................... assert on free in interrupt, too Change-Id: I825496c81c2259f4af7f80089a0b047c5600a211 --- M sysmoOCTSIM/talloc.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/41/16241/1 diff --git a/sysmoOCTSIM/talloc.c b/sysmoOCTSIM/talloc.c index 790f657..918cf42 100644 --- a/sysmoOCTSIM/talloc.c +++ b/sysmoOCTSIM/talloc.c @@ -1747,6 +1747,9 @@ { struct talloc_chunk *tc; + // do not deallocate while handling interrupts! + OSMO_ASSERT( !(SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) ) + if (unlikely(ptr == NULL)) { return -1; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I825496c81c2259f4af7f80089a0b047c5600a211 Gerrit-Change-Number: 16241 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:12 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:12 +0000 Subject: Change in osmo-ccid-firmware[master]: disable talloc_memlimit() and use existing msgb_context (pool) References: Message-ID: Hello laforge, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16242 to review the following change. Change subject: disable talloc_memlimit() and use existing msgb_context (pool) ...................................................................... disable talloc_memlimit() and use existing msgb_context (pool) Change-Id: I7d3a00ea4581b4f01e72294ac4e810e54c410e24 --- M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/42/16242/1 diff --git a/sysmoOCTSIM/libosmo_emb.c b/sysmoOCTSIM/libosmo_emb.c index 5209e20..09555f3 100644 --- a/sysmoOCTSIM/libosmo_emb.c +++ b/sysmoOCTSIM/libosmo_emb.c @@ -151,7 +151,7 @@ /* msgb */ g_msgb_ctx = talloc_pool(g_tall_ctx, 20480); - talloc_set_memlimit(g_msgb_ctx, 20480); + //talloc_set_memlimit(g_msgb_ctx, 20480); msgb_talloc_ctx_init(g_msgb_ctx, 0); /* logging */ diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 6815b18..d81f189 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -1171,7 +1171,7 @@ LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); //FIXME osmo_emb has a pool? - msgb_set_talloc_ctx(g_tall_ctx); + //msgb_set_talloc_ctx(g_tall_ctx); //prevent spurious interrupts before our driver structs are ready CRITICAL_SECTION_ENTER() -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I7d3a00ea4581b4f01e72294ac4e810e54c410e24 Gerrit-Change-Number: 16242 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:13 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:13 +0000 Subject: Change in osmo-ccid-firmware[master]: dbg References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16243 ) Change subject: dbg ...................................................................... dbg Change-Id: I4340cb53f0f903842eb1c4d60a36d44ac9e5cbde --- M ccid_common/cuart.h M ccid_common/iso7816_fsm.c M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/hpl/sercom/hpl_sercom.c M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c 9 files changed, 124 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/43/16243/1 diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 9c93b7e..efd70f0 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -23,6 +23,7 @@ enum card_uart_ctl { CUART_CTL_RX, /* enable/disable receiver */ + CUART_CTL_NO_RXTX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ CUART_CTL_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 3d09a84..585d25d 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -305,7 +305,7 @@ { struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); - card_uart_ctrl(ip->uart, CUART_CTL_RX, false); + card_uart_ctrl(ip->uart, CUART_CTL_NO_RXTX, true); /* reset the TPDU state machine */ osmo_fsm_inst_dispatch(ip->tpdu_fi, ISO7816_E_TPDU_CLEAR_REQ, NULL); } @@ -1135,11 +1135,14 @@ } } +#include static void tpdu_s_tx_hdr_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { OSMO_ASSERT(fi->fsm == &tpdu_fsm); switch (event) { case ISO7816_E_TX_COMPL: + + /* Rx of single byte is already enabled by previous card_uart_tx() call */ osmo_fsm_inst_state_chg(fi, TPDU_S_PROCEDURE, 0, 0); break; @@ -1174,6 +1177,12 @@ } else if (byte == tpduh->ins) { if (tfp->is_command) { /* transmit all remaining bytes */ +#if 0 +// rx -> tx delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif card_uart_tx(ip->uart, msgb_l2(tfp->tpdu), msgb_l2len(tfp->tpdu), true); osmo_fsm_inst_state_chg(fi, TPDU_S_TX_REMAINING, 0, 0); } else { diff --git a/sysmoOCTSIM/atmel_start.c b/sysmoOCTSIM/atmel_start.c index bee1ed2..6670364 100644 --- a/sysmoOCTSIM/atmel_start.c +++ b/sysmoOCTSIM/atmel_start.c @@ -14,6 +14,6 @@ system_init(); dma_memory_init(); dma_memory_register_callback(DMA_MEMORY_COMPLETE_CB, M2M_DMA_complete_cb); - stdio_redirect_init(); +// stdio_redirect_init(); usb_init(); } diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index a8f8044..14fe491 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -348,14 +348,39 @@ Sercom *sercom = cuart->u.asf4.usa_pd->device.hw; switch (ctl) { + case CUART_CTL_NO_RXTX: +// if (arg){ +// uint32_t ctrlb = ((Sercom *)sercom)->USART.CTRLB.reg; +// ctrlb &= ~(SERCOM_USART_CTRLB_TXEN | SERCOM_USART_CTRLB_RXEN); +// ((Sercom *)sercom)->USART.CTRLB.reg = ctrlb; +// hri_sercomusart_wait_for_sync(sercom, SERCOM_USART_SYNCBUSY_MASK); +// } else { +// uint32_t ctrlb = ((Sercom *)sercom)->USART.CTRLB.reg; +// ctrlb |= (SERCOM_USART_CTRLB_TXEN | SERCOM_USART_CTRLB_RXEN); +// ((Sercom *)sercom)->USART.CTRLB.reg = ctrlb; +// hri_sercomusart_wait_for_sync(sercom, SERCOM_USART_SYNCBUSY_MASK); +// } + break; case CUART_CTL_RX: if (arg){ - sercom->USART.CTRLB.bit.RXEN = 1; - sercom->USART.CTRLB.bit.TXEN = 0; +//// delay_us(cuart->u.asf4.extrawait_after_rx); +// uint32_t ctrlb = ((Sercom *)sercom)->USART.CTRLB.reg; +// ctrlb &= ~SERCOM_USART_CTRLB_TXEN; +// ctrlb |= SERCOM_USART_CTRLB_RXEN; +// ((Sercom *)sercom)->USART.CTRLB.reg = ctrlb; +// hri_sercomusart_wait_for_sync(sercom, SERCOM_USART_SYNCBUSY_MASK); +// +//// sercom->USART.CTRLB.bit.TXEN = 0; +//// sercom->USART.CTRLB.bit.RXEN = 1; } else { delay_us(cuart->u.asf4.extrawait_after_rx); - sercom->USART.CTRLB.bit.RXEN = 0; - sercom->USART.CTRLB.bit.TXEN = 1; +//// sercom->USART.CTRLB.bit.RXEN = 0; +//// sercom->USART.CTRLB.bit.TXEN = 1; +// uint32_t ctrlb = ((Sercom *)sercom)->USART.CTRLB.reg; +// ctrlb &= ~SERCOM_USART_CTRLB_RXEN; +// ctrlb |= SERCOM_USART_CTRLB_TXEN; +// ((Sercom *)sercom)->USART.CTRLB.reg = ctrlb; +// hri_sercomusart_wait_for_sync(sercom, SERCOM_USART_SYNCBUSY_MASK); } break; case CUART_CTL_RST: diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index c373dc2..7071ea5 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -33,7 +33,7 @@ #define SIM6_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define UART_DEBUG_BUFFER_SIZE 256 +#define UART_DEBUG_BUFFER_SIZE 4096 struct usart_async_descriptor SIM0; struct usart_async_descriptor SIM1; diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 41f5d10..95a582f 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -8,7 +8,7 @@ CROSS_COMPILE= arm-none-eabi- CFLAGS_CPU=-D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -CFLAGS=-x c -mthumb -DDEBUG -O0 -ffunction-sections -fdata-sections -mlong-calls \ +CFLAGS=-x c -mthumb -DDEBUG -Os -ffunction-sections -fdata-sections -mlong-calls \ -g3 -Wall -c -std=gnu99 $(CFLAGS_CPU) CC = $(CROSS_COMPILE)gcc diff --git a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c index f235115..272fb07 100644 --- a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c +++ b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c @@ -577,7 +577,7 @@ hri_sercomusart_write_INTEN_ERROR_bit(device->hw, state); } } - +#include /** * \internal Sercom interrupt handler * @@ -591,6 +591,12 @@ hri_sercomusart_clear_INTEN_DRE_bit(hw); device->usart_cb.tx_byte_sent(device); } else if (hri_sercomusart_get_interrupt_TXC_bit(hw) && hri_sercomusart_get_INTEN_TXC_bit(hw)) { +#if 0 +// tx byte last edge <-> txc irq delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif hri_sercomusart_clear_INTEN_TXC_bit(hw); device->usart_cb.tx_done_cb(device); } else if (hri_sercomusart_get_interrupt_RXC_bit(hw)) { @@ -600,8 +606,20 @@ hri_sercomusart_clear_STATUS_reg(hw, SERCOM_USART_STATUS_MASK); return; } +#if 0 +// rx byte last edge <-> rxc irq delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif device->usart_cb.rx_done_cb(device, hri_sercomusart_read_DATA_reg(hw)); +#if 0 +// rx byte last edge <-> rxc irq end delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif } else if (hri_sercomusart_get_interrupt_ERROR_bit(hw)) { uint32_t status; diff --git a/sysmoOCTSIM/libosmo_emb.c b/sysmoOCTSIM/libosmo_emb.c index 09555f3..e550b07 100644 --- a/sysmoOCTSIM/libosmo_emb.c +++ b/sysmoOCTSIM/libosmo_emb.c @@ -41,43 +41,43 @@ [DUSB] = { .name = "USB", .description = "USB Transport", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_NOTICE, }, [DCCID] = { .name = "CCID", .description = "USB-CCID Protocol", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DISO7816] = { .name = "ISO7816", .description = "ISO7816-3 State machines", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DATR] = { .name = "ATR", .description = "ATR (Answer To Reset) FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DTPDU] = { .name = "TPDU", .description = "TPDU FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DPPS] = { .name = "PPS", .description = "PPS (Protocol and Parameter Selection) FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DCARD] = { .name = "CARD", .description = "Card FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, }; @@ -150,13 +150,13 @@ struct log_target *stderr_target; /* msgb */ - g_msgb_ctx = talloc_pool(g_tall_ctx, 20480); +// g_msgb_ctx = talloc_pool(g_tall_ctx, 20480); //talloc_set_memlimit(g_msgb_ctx, 20480); - msgb_talloc_ctx_init(g_msgb_ctx, 0); +// msgb_talloc_ctx_init(g_msgb_ctx, 0); /* logging */ log_init(&log_info, g_tall_ctx); - stderr_target = log_target_create_stderr_raw(); +// stderr_target = log_target_create_stderr_raw(); //log_add_target(stderr_target); //log_set_all_filter(stderr_target, 1); diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index d81f189..189d764 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -151,7 +151,7 @@ /* bit-mask of card-insert status, as determined from NCN8025 IRQ output */ uint8_t card_insert_mask; }; -static struct ccid_state g_ccid_s; +static volatile struct ccid_state g_ccid_s; static void ccid_out_read_compl(const uint8_t ep, enum usb_xfer_code code, uint32_t transferred); static void ccid_in_write_compl(const uint8_t ep, enum usb_xfer_code code, uint32_t transferred); @@ -1131,6 +1131,38 @@ char sernr_buf[16*2+1]; char rstcause_buf[RSTCAUSE_STR_SIZE]; +#if 0 +CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk ; //| /* tracing*/ +////CoreDebug_DEMCR_MON_EN_Msk; /* mon interupt catcher */ + + +DWT->COMP0 = 0x40003028; /* sercom 0 data */ +//DWT->COMP0 = 0x40003428; /* sercom 1 data */ +DWT->MASK0 = 0; /* 0 */ +DWT->FUNCTION0 = 0; /* has to be 0 for linked address */ + +DWT->COMP1 = 0xa5; /* value */ +DWT->MASK1 = 0; /* match all bits */ +DWT->FUNCTION1 = (0b10 << DWT_FUNCTION_DATAVSIZE_Pos) | /* DATAVSIZE 10 - dword */ +#if 1 +(0 << DWT_FUNCTION_DATAVADDR0_Pos) | /* Data Match linked addr pointer in COMP0 */ +#else +(1 << DWT_FUNCTION_DATAVADDR0_Pos) | /* Data Match on any addr -> own number */ +#endif +(1 << DWT_FUNCTION_DATAVMATCH_Pos) | /* DATAVMATCH Enable data comparation */ +(0b0111 << DWT_FUNCTION_FUNCTION_Pos); /* generate a watchpoint event on rw */ + +#endif + +#if 0 + dwt_init(); + //geht + // int a = request_dwt_watchpoint(0x40003428, 0, WDE_DATA_RW, 0, false); + int a = request_dwt_watchpoint(0x40003428, 0, WDE_DATA_RW, 0, false); +// int b = request_dwt_watchpoint(0, 0, WDE_DATA_RW, a, true); + enable_dwt_comp(a); +// enable_dwt_comp(b); +#endif atmel_start_init(); get_chip_unique_serial_str(sernr_buf, sizeof(sernr_buf)); get_rstcause_str(rstcause_buf); @@ -1154,6 +1186,9 @@ // command_register(&cmd_get_time); // command_register(&cmd_test_timer); + + + printf("\r\n\r\n" "=============================================================================\n\r" "sysmoOCTSIM firmware " GIT_VERSION "\n\r" @@ -1166,12 +1201,14 @@ g_tall_ctx = talloc_named_const(NULL, 0, "global"); printf("g_tall_ctx=%p\r\n", g_tall_ctx); + //FIXME osmo_emb has a pool? + msgb_talloc_ctx_init(g_tall_ctx, 0); + libosmo_emb_init(); LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); - //FIXME osmo_emb has a pool? - //msgb_set_talloc_ctx(g_tall_ctx); + //prevent spurious interrupts before our driver structs are ready CRITICAL_SECTION_ENTER() @@ -1186,11 +1223,22 @@ } submit_next_out(); CRITICAL_SECTION_LEAVE() +#if 0 + /* CAN_RX */ + gpio_set_pin_function(PIN_PB12, GPIO_PIN_FUNCTION_OFF); + gpio_set_pin_direction(PIN_PB12, GPIO_DIRECTION_OUT); + gpio_set_pin_level(PIN_PB12, false); + /* CAN_TX */ + gpio_set_pin_function(PIN_PB13, GPIO_PIN_FUNCTION_OFF); + gpio_set_pin_direction(PIN_PB13, GPIO_DIRECTION_OUT); + gpio_set_pin_level(PIN_PB13, false); +#endif + poll_card_detect(); // command_print_prompt(); while (true) { // main loop command_try_recv(); - poll_card_detect(); +// poll_card_detect(); submit_next_irq(); feed_ccid(); osmo_timers_update(); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I4340cb53f0f903842eb1c4d60a36d44ac9e5cbde Gerrit-Change-Number: 16243 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:13 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:13 +0000 Subject: Change in osmo-ccid-firmware[master]: better error handling References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16244 ) Change subject: better error handling ...................................................................... better error handling Change-Id: I9983c2f58c7f420a0132d186f344ace1de616ba1 --- M ccid_common/ccid_device.c M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c 3 files changed, 30 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/44/16244/1 diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index 84bd09a..4444480 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -475,14 +475,25 @@ const struct ccid_header *ch = (const struct ccid_header *) u; uint8_t seq = u->reset_parameters.hdr.bSeq; struct msgb *resp; + int rc; /* copy default parameters from somewhere */ /* FIXME: T=1 */ - cs->ci->slot_ops->set_params(cs, seq, CCID_PROTOCOL_NUM_T0, cs->default_pars); - cs->pars = *cs->default_pars; - resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); - return ccid_slot_send_unbusy(cs, resp); + /* validate parameters; abort if they are not supported */ + rc = cs->ci->slot_ops->set_params(cs, seq, CCID_PROTOCOL_NUM_T0, cs->default_pars); + if (rc < 0) { + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + goto out; + } + + msgb_free(msg); + /* busy, tdpu like callback */ + return 1; +out: + msgb_free(msg); + ccid_slot_send_unbusy(cs, resp); + return 1; } /* Section 6.1.7 */ @@ -523,10 +534,14 @@ resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); goto out; } + + msgb_free(msg); /* busy, tdpu like callback */ return 1; out: - return ccid_slot_send_unbusy(cs, resp); + msgb_free(msg); + ccid_slot_send_unbusy(cs, resp); + return 1; } /* Section 6.1.8 */ @@ -682,6 +697,15 @@ return ccid_send(ci, resp); } + if(!cs->icc_present) { + LOGPCS(cs, LOGL_ERROR, "No icc present, but another cmd received\n"); + /* FIXME: ABORT logic as per section 5.3.1 of CCID Spec v1.1 */ + resp = gen_err_resp(ch->bMessageType, ch->bSlot, get_icc_status(cs), ch->bSeq, + CCID_ERR_ICC_MUTE); + msgb_free(msg); + return ccid_send(ci, resp); + } + LOGPCS(cs, LOGL_DEBUG, "Rx CCID(OUT) %s %s\n", get_value_string(ccid_msg_type_vals, ch->bMessageType), msgb_hexdump(msg)); diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 8d38f29..d2aec26 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -179,9 +179,6 @@ struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct msgb *tpdu; - if(!cs->icc_present) - return -CCID_ERR_ICC_MUTE; - ss->seq = xfb->hdr.bSeq; /* must be '0' for TPDU level exchanges or for short APDU */ diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 585d25d..034a7ac 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -293,6 +293,7 @@ ip->user_cb(fi, event, 0, atr); break; case ISO7816_E_ATR_ERR_IND: + atr = data; osmo_fsm_inst_state_chg(fi, ISO7816_S_RESET, 0, 0); ip->user_cb(fi, event, 0, atr); break; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9983c2f58c7f420a0132d186f344ace1de616ba1 Gerrit-Change-Number: 16244 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:13 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:13 +0000 Subject: Change in osmo-ccid-firmware[master]: fix power descriptor value References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16245 ) Change subject: fix power descriptor value ...................................................................... fix power descriptor value The previous value would allow using the device without external power, i.e. on a hub, which leads to silent failures trying to power up the slots (nothing happens, no atr will be received) Change-Id: Id7231c2315b141d2f6e88a0ddd4eca3b9384ecc8 --- M sysmoOCTSIM/usb_descriptors.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/45/16245/1 diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index 5ea11ec..06308f2 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -34,7 +34,7 @@ .bConfigurationValue = CONF_USB_CDCD_ACM_BCONFIGVAL, .iConfiguration = STR_DESC_CONFIG, .bmAttributes = CONF_USB_CDCD_ACM_BMATTRI, - .bMaxPower = CONF_USB_CDCD_ACM_BMAXPOWER, + .bMaxPower = 250, /* request 500mA */ }, .cdc = { .comm = { -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id7231c2315b141d2f6e88a0ddd4eca3b9384ecc8 Gerrit-Change-Number: 16245 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:14 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:14 +0000 Subject: Change in osmo-ccid-firmware[master]: fsm completion event handling from main loop References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16246 ) Change subject: fsm completion event handling from main loop ...................................................................... fsm completion event handling from main loop Change-Id: If71a37dcaa5162c18d83e4b2a0cdae69574b92d9 --- M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M sysmoOCTSIM/main.c 4 files changed, 68 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/46/16246/1 diff --git a/ccid_common/ccid_device.h b/ccid_common/ccid_device.h index 38a71db..f364f72 100644 --- a/ccid_common/ccid_device.h +++ b/ccid_common/ccid_device.h @@ -57,6 +57,8 @@ struct ccid_pars_decoded proposed_pars; /* default parameters; applied on ResetParameters */ const struct ccid_pars_decoded *default_pars; + volatile uint32_t event; + volatile void* event_data; }; /* CCID operations provided by USB transport layer */ @@ -86,6 +88,7 @@ const struct ccid_pars_decoded *pars_dec); int (*set_rate_and_clock)(struct ccid_slot *cs, uint32_t freq_hz, uint32_t rate_bps); void (*icc_set_insertion_status)(struct ccid_slot *cs, bool present); + int (*handle_fsm_events)(struct ccid_slot *cs, bool enable); }; /* An instance of CCID (i.e. a card reader device) */ diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index d2aec26..9be31d6 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -110,34 +110,76 @@ { struct iso_fsm_slot *ss = iso7816_fsm_get_user_priv(fi); struct ccid_slot *cs = ss->cs; + + switch (event) { + case ISO7816_E_ATR_DONE_IND: + case ISO7816_E_ATR_ERR_IND: + case ISO7816_E_TPDU_DONE_IND: + case ISO7816_E_TPDU_FAILED_IND: + case ISO7816_E_PPS_DONE_IND: + case ISO7816_E_PPS_FAILED_IND: + cs->event_data = data; + asm volatile("dmb st": : :"memory"); + cs->event = event; + break; + default: + LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, cause=%d, data=%p) unhandled\n", + __func__, event, cause, data); + break; + } +} + +static int iso_handle_fsm_events(struct ccid_slot *cs, bool enable){ + struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct msgb *tpdu, *resp; + volatile uint32_t event = cs->event; + volatile void * volatile data = cs->event_data; + + if(!event) + return 0; + if(event && !data) + return 0; switch (event) { case ISO7816_E_ATR_DONE_IND: tpdu = data; - LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, msgb_hexdump(tpdu)); resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_OK, 0, msgb_data(tpdu), msgb_length(tpdu)); ccid_slot_send_unbusy(cs, resp); /* Don't free "TPDU" here, as the ATR should survive */ + cs->event = 0; + break; + case ISO7816_E_ATR_ERR_IND: + tpdu = data; + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, + msgb_hexdump(tpdu)); + resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_FAILED, CCID_ERR_ICC_MUTE, + msgb_data(tpdu), msgb_length(tpdu)); + ccid_slot_send_unbusy(cs, resp); + /* Don't free "TPDU" here, as the ATR should survive */ + cs->event = 0; + break; break; case ISO7816_E_TPDU_DONE_IND: tpdu = data; - LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, msgb_hexdump(tpdu)); resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_OK, 0, msgb_l2(tpdu), msgb_l2len(tpdu)); ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); + cs->event = 0; break; case ISO7816_E_TPDU_FAILED_IND: tpdu = data; - LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, msgb_hexdump(tpdu)); /* FIXME: other error causes than card removal?*/ resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_FAILED, CCID_ERR_ICC_MUTE, msgb_l2(tpdu), 0); ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); + cs->event = 0; break; case ISO7816_E_PPS_DONE_IND: tpdu = data; @@ -157,6 +199,7 @@ /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ msgb_free(tpdu); + cs->event = 0; break; case ISO7816_E_PPS_FAILED_IND: tpdu = data; @@ -165,10 +208,13 @@ ccid_slot_send_unbusy(cs, resp); /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ msgb_free(tpdu); + cs->event = 0; + break; + case 0: break; default: - LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, cause=%d, data=%p) unhandled\n", - __func__, event, cause, data); + LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, data=%p) unhandled\n", + __func__, event, data); break; } } @@ -177,7 +223,7 @@ const struct ccid_pc_to_rdr_xfr_block *xfb) { struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); - struct msgb *tpdu; + ss->seq = xfb->hdr.bSeq; @@ -185,17 +231,10 @@ OSMO_ASSERT(xfb->wLevelParameter == 0x0000); OSMO_ASSERT(msgb_length(msg) > xfb->hdr.dwLength); - /* 'msg' contains the raw CCID message as received from USB. We could create - * a new message buffer for the ISO7816 side here or we could 'strip the CCID - * header off the start of the message. Let's KISS and do a copy here */ - tpdu = msgb_alloc(512, "TPDU"); - OSMO_ASSERT(tpdu); - memcpy(msgb_data(tpdu), xfb->abData, xfb->hdr.dwLength); - msgb_put(tpdu, xfb->hdr.dwLength); - msgb_free(msg); + msgb_pull(msg, 10); - LOGPCS(cs, LOGL_DEBUG, "scheduling TPDU transfer: %s\n", msgb_hexdump(tpdu)); - osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_TPDU_CMD, tpdu); + LOGPCS(cs, LOGL_DEBUG, "scheduling TPDU transfer: %s\n", msgb_hexdump(msg)); + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_TPDU_CMD, msg); /* continues in iso_fsm_clot_user_cb once response/error/timeout is received */ return 0; } @@ -329,4 +368,5 @@ .set_clock = iso_fsm_slot_set_clock, .set_params = iso_fsm_slot_set_params, .set_rate_and_clock = iso_fsm_slot_set_rate_and_clock, + .handle_fsm_events = iso_handle_fsm_events, }; diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 034a7ac..a659fe4 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -238,6 +238,8 @@ osmo_fsm_inst_state_chg_ms(fi, ISO7816_S_WAIT_ATR, fi_cycles2ms(fi, 40000), T_WAIT_ATR); break; + case ISO7816_E_POWER_UP_IND: + break; case ISO7816_E_PPS_FAILED_IND: msg = data; /* notify user about PPS result */ @@ -877,7 +879,7 @@ msgb_reset(atp->rx_cmd); /* notify in case card got pulled out */ - if (atp->tx_cmd){ + if (atp->tx_cmd && old_state != PPS_S_DONE){ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); atp->tx_cmd = 0; @@ -1100,7 +1102,7 @@ struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); /* notify in case card got pulled out */ - if (tfp->tpdu){ + if (tfp->tpdu && old_state != TPDU_S_DONE){ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, tfp->tpdu); tfp->tpdu = 0; } diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 189d764..7ff9302 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -317,7 +317,7 @@ { uint8_t statusbytes[2] = {0}; //struct msgb *msg = ccid_msgb_alloc(); - struct msgb *msg = msgb_alloc(64, "IRQ"); + struct msgb *msg = msgb_alloc(300,"IRQ"); struct ccid_rdr_to_pc_notify_slot_change *nsc = msgb_put(msg, sizeof(*nsc) + sizeof(statusbytes)); nsc->bMessageType = RDR_to_PC_NotifySlotChange; @@ -1240,6 +1240,9 @@ command_try_recv(); // poll_card_detect(); submit_next_irq(); + for (int i = 0; i < usb_fs_descs.ccid.class.bMaxSlotIndex; i++){ + g_ci.slot_ops->handle_fsm_events(&g_ci.slot[i], true); + } feed_ccid(); osmo_timers_update(); int qs = llist_count_at(&g_ccid_s.free_q); @@ -1250,13 +1253,12 @@ msgb_free(msg); } if(qs < NUM_OUT_BUF) - for (int i= 0; i < qs-NUM_OUT_BUF; i++){ + for (int i= 0; i < NUM_OUT_BUF-qs; i++){ struct msgb *msg = msgb_alloc(300,"ccid"); OSMO_ASSERT(msg); /* return the message back to the queue of free message buffers */ llist_add_tail_at(&msg->list, &g_ccid_s.free_q); } - } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: If71a37dcaa5162c18d83e4b2a0cdae69574b92d9 Gerrit-Change-Number: 16246 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:14 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:14 +0000 Subject: Change in osmo-ccid-firmware[master]: add a note for D=64 pecularities References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16247 ) Change subject: add a note for D=64 pecularities ...................................................................... add a note for D=64 pecularities Change-Id: I3da1f0172737c8208325a6ec5aff72fa68355963 --- M ccid_common/ccid_slot_fsm.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/47/16247/1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 9be31d6..d7740fe 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -287,6 +287,14 @@ ss->seq = seq; + /* FIXME: + When using D=64, the interface device shall ensure a delay + of at least 16 etu between the leading edge of the last + received character and the leading edge of the character transmitted + for initiating a command. + -> we can't really do 4 stop bits?! + */ + /* Hardware does not support SPU, so no PPS2, and PPS3 is reserved anyway */ tpdu = msgb_alloc(6, "PPSRQ"); OSMO_ASSERT(tpdu); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3da1f0172737c8208325a6ec5aff72fa68355963 Gerrit-Change-Number: 16247 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:14 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:14 +0000 Subject: Change in osmo-ccid-firmware[master]: pps warning References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16248 ) Change subject: pps warning ...................................................................... pps warning Change-Id: Ie0cbca9c901643268adddc69c08be494432a3235 --- M ccid_common/ccid_slot_fsm.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/48/16248/1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index d7740fe..fef1515 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -188,6 +188,13 @@ uint8_t D = iso7816_3_di_table[cs->proposed_pars.di]; uint32_t fmax = iso7816_3_fmax_table[cs->proposed_pars.fi]; + /* 7816-3 5.2.3 + * No information shall be exchanged when switching the + * frequency value. Two different times are recommended + * for switching the frequency value, either + * - after ATR while card is idle + * - after PPS while card is idle + */ card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK_FREQ, fmax); card_uart_ctrl(ss->cuart, CUART_CTL_FD, F/D); card_uart_ctrl(ss->cuart, CUART_CTL_WTIME, cs->proposed_pars.t0.waiting_integer); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie0cbca9c901643268adddc69c08be494432a3235 Gerrit-Change-Number: 16248 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:15 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:15 +0000 Subject: Change in osmo-ccid-firmware[master]: boost the uart interrupt priority References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16249 ) Change subject: boost the uart interrupt priority ...................................................................... boost the uart interrupt priority Change-Id: Ic1873922c042c45335320bdb669cf2a9346eaa81 --- M sysmoOCTSIM/main.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/49/16249/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 7ff9302..af1b192 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -1187,7 +1187,10 @@ // command_register(&cmd_test_timer); - +for(int i = 0; i <= 136; i++) + NVIC_SetPriority(i, 2); +for(int i = 46; i <= 77; i++) + NVIC_SetPriority(i, 1); printf("\r\n\r\n" "=============================================================================\n\r" -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic1873922c042c45335320bdb669cf2a9346eaa81 Gerrit-Change-Number: 16249 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:15 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:15 +0000 Subject: Change in osmo-ccid-firmware[master]: the magic sauce that makes it work References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16250 ) Change subject: the magic sauce that makes it work ...................................................................... the magic sauce that makes it work 1mio concurrent select mf transfers, 5mhz, fi/di 512/32 Change-Id: I25ba236b5a3a2c876ace4ca4398061889b4a9bff --- M sysmoOCTSIM/hpl/sercom/hpl_sercom.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/50/16250/1 diff --git a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c index 272fb07..7373962 100644 --- a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c +++ b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c @@ -589,6 +589,8 @@ if (hri_sercomusart_get_interrupt_DRE_bit(hw) && hri_sercomusart_get_INTEN_DRE_bit(hw)) { hri_sercomusart_clear_INTEN_DRE_bit(hw); + hri_sercomusart_read_DATA_reg(hw); + hri_sercomusart_clear_INTFLAG_RXC_bit(hw); device->usart_cb.tx_byte_sent(device); } else if (hri_sercomusart_get_interrupt_TXC_bit(hw) && hri_sercomusart_get_INTEN_TXC_bit(hw)) { #if 0 @@ -598,6 +600,8 @@ gpio_set_pin_level(PIN_PB12, false); #endif hri_sercomusart_clear_INTEN_TXC_bit(hw); + hri_sercomusart_read_DATA_reg(hw); + hri_sercomusart_clear_INTFLAG_RXC_bit(hw); device->usart_cb.tx_done_cb(device); } else if (hri_sercomusart_get_interrupt_RXC_bit(hw)) { if (hri_sercomusart_read_STATUS_reg(hw) -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I25ba236b5a3a2c876ace4ca4398061889b4a9bff Gerrit-Change-Number: 16250 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:16 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:16 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart cleanup References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16251 ) Change subject: cuart cleanup ...................................................................... cuart cleanup Change-Id: Ia5b66a86f0f53e5123139c3c5047f70582d1bf6e --- M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.c M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 4 files changed, 40 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/51/16251/1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index fef1515..3a591d7 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -195,8 +195,8 @@ * - after ATR while card is idle * - after PPS while card is idle */ - card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK_FREQ, fmax); - card_uart_ctrl(ss->cuart, CUART_CTL_FD, F/D); + card_uart_ctrl(ss->cuart, CUART_CTL_SET_CLOCK_FREQ, fmax); + card_uart_ctrl(ss->cuart, CUART_CTL_SET_FD, F/D); card_uart_ctrl(ss->cuart, CUART_CTL_WTIME, cs->proposed_pars.t0.waiting_integer); cs->pars = cs->proposed_pars; diff --git a/ccid_common/cuart.c b/ccid_common/cuart.c index 9a68167..1ae50c6 100644 --- a/ccid_common/cuart.c +++ b/ccid_common/cuart.c @@ -29,8 +29,12 @@ /* obtain the current ETU in us */ static int get_etu_in_us(struct card_uart *cuart) { - /* FIXME: actually implement this based on the real baud rate */ - return (1000000/9600); + OSMO_ASSERT(cuart); + OSMO_ASSERT(cuart->driver); + OSMO_ASSERT(cuart->driver->ops); + OSMO_ASSERT(cuart->driver->ops->ctrl); + + return 1e6 / cuart->driver->ops->ctrl(cuart, CUART_CTL_GET_BAUDRATE, 0); } /* software waiting-time timer has expired */ diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index efd70f0..40a4aa8 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -26,10 +26,12 @@ CUART_CTL_NO_RXTX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ - CUART_CTL_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ + CUART_CTL_SET_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ CUART_CTL_RST, /* enable/disable ICC reset */ CUART_CTL_WTIME, /* set the waiting time (in etu) */ - CUART_CTL_FD, + CUART_CTL_SET_FD, + CUART_CTL_GET_BAUDRATE, + CUART_CTL_GET_CLOCK_FREQ, }; struct card_uart; @@ -101,6 +103,7 @@ uint8_t slot_nr; /* in us, required, no delay breaks _rx_ */ uint32_t extrawait_after_rx; + uint32_t current_baudrate; } asf4; } u; }; diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index 14fe491..c7d29eb 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -161,8 +161,10 @@ * @param[in] baudrate baud rate in bps to set * @return if the baud rate has been set, else a parameter is out of range */ -static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) +static bool slot_set_baudrate(struct card_uart *cuart, uint32_t baudrate) { + uint8_t slotnr = cuart->u.asf4.slot_nr; + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); // calculate the error corresponding to the clock sources @@ -203,6 +205,11 @@ if (NULL == slot) { return false; } + + // update cached values + cuart->u.asf4.current_baudrate = baudrate; + cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; + printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) usart_async_disable(slot); // disable SERCOM peripheral @@ -223,8 +230,10 @@ * @param[in] d baud rate adjustment factor D * @return if the baud rate has been set, else a parameter is out of range */ -static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) +static bool slot_set_isorate(struct card_uart *cuart, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) { + uint8_t slotnr = cuart->u.asf4.slot_nr; + // input checks ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { @@ -264,7 +273,7 @@ // set baud rate uint32_t baudrate = (freq * d) / f; // calculate actual baud rate - return slot_set_baudrate(slotnr, baudrate); // set baud rate + return slot_set_baudrate(cuart, baudrate); // set baud rate } /*********************************************************************** @@ -289,16 +298,13 @@ cuart->u.asf4.usa_pd = usa_pd; cuart->u.asf4.slot_nr = slot_nr; - /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ - cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); - usart_async_register_callback(usa_pd, USART_ASYNC_RXC_CB, SIM_rx_cb[slot_nr]); usart_async_register_callback(usa_pd, USART_ASYNC_TXC_CB, SIM_tx_cb[slot_nr]); usart_async_register_callback(usa_pd, USART_ASYNC_ERROR_CB, _SIM_error_cb); usart_async_enable(usa_pd); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) - slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + slot_set_isorate(cuart, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); return 0; } @@ -349,38 +355,13 @@ switch (ctl) { case CUART_CTL_NO_RXTX: -// if (arg){ -// uint32_t ctrlb = ((Sercom *)sercom)->USART.CTRLB.reg; -// ctrlb &= ~(SERCOM_USART_CTRLB_TXEN | SERCOM_USART_CTRLB_RXEN); -// ((Sercom *)sercom)->USART.CTRLB.reg = ctrlb; -// hri_sercomusart_wait_for_sync(sercom, SERCOM_USART_SYNCBUSY_MASK); -// } else { -// uint32_t ctrlb = ((Sercom *)sercom)->USART.CTRLB.reg; -// ctrlb |= (SERCOM_USART_CTRLB_TXEN | SERCOM_USART_CTRLB_RXEN); -// ((Sercom *)sercom)->USART.CTRLB.reg = ctrlb; -// hri_sercomusart_wait_for_sync(sercom, SERCOM_USART_SYNCBUSY_MASK); -// } + /* no op */ break; case CUART_CTL_RX: if (arg){ -//// delay_us(cuart->u.asf4.extrawait_after_rx); -// uint32_t ctrlb = ((Sercom *)sercom)->USART.CTRLB.reg; -// ctrlb &= ~SERCOM_USART_CTRLB_TXEN; -// ctrlb |= SERCOM_USART_CTRLB_RXEN; -// ((Sercom *)sercom)->USART.CTRLB.reg = ctrlb; -// hri_sercomusart_wait_for_sync(sercom, SERCOM_USART_SYNCBUSY_MASK); -// -//// sercom->USART.CTRLB.bit.TXEN = 0; -//// sercom->USART.CTRLB.bit.RXEN = 1; + /* no op */ } else { delay_us(cuart->u.asf4.extrawait_after_rx); -//// sercom->USART.CTRLB.bit.RXEN = 0; -//// sercom->USART.CTRLB.bit.TXEN = 1; -// uint32_t ctrlb = ((Sercom *)sercom)->USART.CTRLB.reg; -// ctrlb &= ~SERCOM_USART_CTRLB_RXEN; -// ctrlb |= SERCOM_USART_CTRLB_TXEN; -// ((Sercom *)sercom)->USART.CTRLB.reg = ctrlb; -// hri_sercomusart_wait_for_sync(sercom, SERCOM_USART_SYNCBUSY_MASK); } break; case CUART_CTL_RST: @@ -390,12 +371,8 @@ usart_async_flush_rx_buffer(cuart->u.asf4.usa_pd); break; case CUART_CTL_POWER: - /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ - cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); - - // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) - if(arg) - slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + /* reset everything */ + slot_set_isorate(cuart, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); ncn8025_get(cuart->u.asf4.slot_nr, &settings); settings.cmdvcc = arg ? true : false; @@ -410,7 +387,7 @@ case CUART_CTL_CLOCK: /* no clock stop support */ break; - case CUART_CTL_CLOCK_FREQ: + case CUART_CTL_SET_CLOCK_FREQ: ncn8025_get(cuart->u.asf4.slot_nr, &settings); /* 2,5/5/10/20 supported by dividers */ @@ -424,12 +401,18 @@ settings.clkdiv = clkdiv; ncn8025_set(cuart->u.asf4.slot_nr, &settings); break; - case CUART_CTL_FD: + case CUART_CTL_SET_FD: ncn8025_get(cuart->u.asf4.slot_nr, &settings); uint8_t divider = ncn8025_div_val[settings.clkdiv]; uint32_t baudrate = (20e6/divider)/arg; - cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; - slot_set_baudrate(cuart->u.asf4.slot_nr, baudrate); + slot_set_baudrate(cuart, baudrate); + break; + case CUART_CTL_GET_BAUDRATE: + return cuart->u.asf4.current_baudrate; + break; + case CUART_CTL_GET_CLOCK_FREQ: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + return 20e6 / ncn8025_div_val[settings.clkdiv]; break; default: return -EINVAL; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia5b66a86f0f53e5123139c3c5047f70582d1bf6e Gerrit-Change-Number: 16251 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:16 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:16 +0000 Subject: Change in osmo-ccid-firmware[master]: remove old uart commands References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16252 ) Change subject: remove old uart commands ...................................................................... remove old uart commands Change-Id: I91fff5d8c296661bcef8576244079f3a5fc8800b --- M sysmoOCTSIM/main.c 1 file changed, 5 insertions(+), 708 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/52/16252/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index af1b192..eb5faf1 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -45,47 +45,6 @@ extern struct ccid_slot_ops iso_fsm_slot_ops; static struct ccid_instance g_ci; -//// TODO put declaration in more global file -//// TODO for now SIM7 is not present because used for debug -//static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; -// -///** number of bytes transmitted on the SIM peripheral */ -//static volatile bool SIM_tx_count[8]; -// -//static void SIM_rx_cb(const struct usart_async_descriptor *const io_descr) -//{ -//} -// -///** called when the transmission is complete -// * e.g. this is when the byte has been sent and there is no data to transmit anymore -// */ -//static void SIM_tx_cb(const struct usart_async_descriptor *const io_descr) -//{ -// // find slotnr for corresponding USART -// uint8_t slotnr; -// for (slotnr = 0; slotnr < ARRAY_SIZE(SIM_peripheral_descriptors) && SIM_peripheral_descriptors[slotnr] != io_descr; slotnr++); -// -// // set flag -// if (slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)) { -// SIM_tx_count[slotnr] = true; -// } -//} - -///** possible clock sources for the SERCOM peripheral -// * warning: the definition must match the GCLK configuration -// */ -//static const uint8_t sercom_glck_sources[] = {GCLK_PCHCTRL_GEN_GCLK2_Val, GCLK_PCHCTRL_GEN_GCLK4_Val, GCLK_PCHCTRL_GEN_GCLK6_Val}; -// -///** possible clock frequencies in MHz for the SERCOM peripheral -// * warning: the definition must match the GCLK configuration -// */ -//static const double sercom_glck_freqs[] = {100E6 / CONF_GCLK_GEN_2_DIV, 100E6 / CONF_GCLK_GEN_4_DIV, 120E6 / CONF_GCLK_GEN_6_DIV}; -// -///** the GCLK ID for the SERCOM SIM peripherals -// * @note: used as index for PCHCTRL -// */ -//static const uint8_t SIM_peripheral_GCLK_ID[] = {SERCOM0_GCLK_ID_CORE, SERCOM1_GCLK_ID_CORE, SERCOM2_GCLK_ID_CORE, SERCOM3_GCLK_ID_CORE, SERCOM4_GCLK_ID_CORE, SERCOM5_GCLK_ID_CORE, SERCOM6_GCLK_ID_CORE, SERCOM7_GCLK_ID_CORE}; - static void ccid_app_init(void); static void board_init() @@ -106,16 +65,6 @@ * (there are 8 inputs + traces to drive!) */ hri_port_set_PINCFG_DRVSTR_bit(PORT, 0, 11); -// // enable SIM interfaces -// for (uint8_t i = 0; i < ARRAY_SIZE(SIM_peripheral_descriptors); i++) { -// if (NULL == SIM_peripheral_descriptors[i]) { -// continue; -// } -// usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_RXC_CB, SIM_rx_cb); // required for RX to work, even if the callback does nothing -// usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_TXC_CB, SIM_tx_cb); // to count the number of bytes transmitted since we are using it asynchronously -// usart_async_enable(SIM_peripheral_descriptors[i]); -// } - ccid_app_init(); } @@ -373,629 +322,6 @@ * Command Line interface ***********************************************************************/ -static int validate_slotnr(int argc, char **argv, int idx) -{ - int slotnr; - if (argc < idx+1) { - printf("You have to specify the slot number (0..7)\r\n"); - return -1; - } - slotnr = atoi(argv[idx]); - if (slotnr < 0 || slotnr > 7) { - printf("You have to specify the slot number (0..7)\r\n"); - return -1; - } - return slotnr; -} -// -///** change baud rate of card slot -// * @param[in] slotnr slot number for which the baud rate should be set -// * @param[in] baudrate baud rate in bps to set -// * @return if the baud rate has been set, else a parameter is out of range -// */ -//static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) -//{ -// ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); -// -// // calculate the error corresponding to the clock sources -// uint16_t bauds[ARRAY_SIZE(sercom_glck_freqs)]; -// double errors[ARRAY_SIZE(sercom_glck_freqs)]; -// for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { -// double freq = sercom_glck_freqs[i]; // remember possible SERCOM frequency -// uint32_t min = freq / (2 * (255 + 1)); // calculate the minimum baud rate for this frequency -// uint32_t max = freq / (2 * (0 + 1)); // calculate the maximum baud rate for this frequency -// if (baudrate < min || baudrate > max) { // baud rate it out of supported range -// errors[i] = NAN; -// } else { -// uint16_t baud = round(freq / (2 * baudrate) - 1); -// bauds[i] = baud; -// double actual = freq / (2 * (baud + 1)); -// errors[i] = fabs(1.0 - (actual / baudrate)); -// } -// } -// -// // find the smallest error -// uint8_t best = ARRAY_SIZE(sercom_glck_freqs); -// for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { -// if (isnan(errors[i])) { -// continue; -// } -// if (best >= ARRAY_SIZE(sercom_glck_freqs)) { -// best = i; -// } else if (errors[i] < errors[best]) { -// best = i; -// } -// } -// if (best >= ARRAY_SIZE(sercom_glck_freqs)) { // found no clock supporting this baud rate -// return false; -// } -// -// // set clock and baud rate -// struct usart_async_descriptor* slot = SIM_peripheral_descriptors[slotnr]; // get slot -// if (NULL == slot) { -// return false; -// } -// printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); -// while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) -// usart_async_disable(slot); // disable SERCOM peripheral -// hri_gclk_clear_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos)); // disable clock for this peripheral -// while (hri_gclk_get_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos))); // wait until clock is really disabled -// // it does not seem we need to completely disable the peripheral using hri_mclk_clear_APBDMASK_SERCOMn_bit -// hri_gclk_write_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], sercom_glck_sources[best] | (1 << GCLK_PCHCTRL_CHEN_Pos)); // set peripheral core clock and re-enable it -// usart_async_set_baud_rate(slot, bauds[best]); // set the new baud rate -// usart_async_enable(slot); // re-enable SERCOM peripheral -// -// return true; -//} -// -///** change ISO baud rate of card slot -// * @param[in] slotnr slot number for which the baud rate should be set -// * @param[in] clkdiv can clock divider -// * @param[in] f clock rate conversion integer F -// * @param[in] d baud rate adjustment factor D -// * @return if the baud rate has been set, else a parameter is out of range -// */ -//static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) -//{ -// // input checks -// ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); -// if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { -// return false; -// } -// if (!iso7816_3_valid_f(f)) { -// return false; -// } -// if (!iso7816_3_valid_d(d)) { -// return false; -// } -// -// // set clockdiv -// struct ncn8025_settings settings; -// ncn8025_get(slotnr, &settings); -// if (settings.clkdiv != clkdiv) { -// settings.clkdiv = clkdiv; -// ncn8025_set(slotnr, &settings); -// } -// -// // calculate desired frequency -// uint32_t freq = 20000000UL; // maximum frequency -// switch (clkdiv) { -// case SIM_CLKDIV_1: -// freq /= 1; -// break; -// case SIM_CLKDIV_2: -// freq /= 2; -// break; -// case SIM_CLKDIV_4: -// freq /= 4; -// break; -// case SIM_CLKDIV_8: -// freq /= 8; -// break; -// } -// -// // set baud rate -// uint32_t baudrate = (freq * d) / f; // calculate actual baud rate -// return slot_set_baudrate(slotnr, baudrate); // set baud rate -//} -// -///** write data to card -// * @param[in] slotnr slot number on which to send data -// * @param[in] data data to be transmitted -// * @param[in] length length of data to be transmitted -// * @return error code -// */ -//static int slot_card_write(uint8_t slotnr, const uint8_t* data, uint16_t length) -//{ -// // input checks -// ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); -// if (0 == length || NULL == data) { -// return ERR_INVALID_ARG; -// } -// -// struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; -// ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; // disable receive (to avoid the echo back) -// SIM_tx_count[slotnr] = false; // reset TX complete -// for (uint16_t i = 0; i < length; i++) { // transmit data -// while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING blocking) -// if (1 != io_write(&sim->io, &data[i], 1)) { // put but in transmit buffer -// return ERR_IO; -// } -// } -// while (!SIM_tx_count[slotnr]); // wait until transmission is complete (WARNING blocking) -// ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // enable receive again -// -// return ERR_NONE; -//} -// -///** read data from card -// * @param[in] slotnr slot number on which to send data -// * @param[out] data buffer for read data to be stored -// * @param[in] length length of data to be read -// * @param[in] wt Waiting Time in ETU -// * @return error code -// * TODO fix WT/ETU duration -// */ -//static int slot_card_read(uint8_t slotnr, uint8_t* data, uint16_t length, uint32_t wt) -//{ -// // input checks -// ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); -// if (0 == length || NULL == data) { -// return ERR_INVALID_ARG; -// } -// -// struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; -// -// ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // ensure RX is enabled -// uint32_t timeout = wt; // reset waiting time -// for (uint16_t i = 0; i < length; i++) { // read all data -// while (timeout && !usart_async_is_rx_not_empty(sim)) { // verify if data is present -// delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) -// timeout--; -// } -// if (0 == timeout) { // timeout reached -// return ERR_TIMEOUT; -// } -// timeout = wt; // reset waiting time -// if (1 != io_read(&sim->io, &data[i], 1)) { // read one byte -// return ERR_IO; -// } -// } -// -// return ERR_NONE; -//} -// -///** transfer TPDU -// * @param[in] slotnr slot number on which to transfer the TPDU -// * @param[in] header TPDU header to send -// * @param[io] data TPDU data to transfer -// * @param[in] data_length length of TPDU data to transfer -// * @param[in] write if the data should be written (true) or read (false) -// * TODO fix WT -// * TODO the data length can be deduce from the header -// */ -//static int slot_tpdu_xfer(uint8_t slotnr, const uint8_t* header, uint8_t* data, uint16_t data_length, bool write) -//{ -// // input checks -// ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); -// if (NULL == header || (data_length > 0 && NULL == data)) { -// return ERR_INVALID_ARG; -// } -// -// int rc; -// struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; // get USART peripheral -// usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch -// -// // send command header -// printf("(%d) TPDU: ", slotnr); -// for (uint8_t i = 0; i < 5; i++) { -// printf("%02x ", header[i]); -// } -// rc = slot_card_write(slotnr, header, 5); // transmit header -// if (ERR_NONE != rc) { -// printf("error in command header transmit (errno = %d)\r\n", rc); -// return rc; -// } -// -// // read procedure byte, and handle data -// uint8_t pb = 0x60; // wait more procedure byte -// uint16_t data_i = 0; // progress in the data transfer -// while (0x60 == pb) { // wait for SW -// rc = slot_card_read(slotnr, &pb, 1, ISO7816_3_DEFAULT_WT); -// if (ERR_NONE != rc) { -// printf("error while receiving PB/SW1 (errno = %d)\r\n", rc); -// return rc; -// } -// printf("%02x ", pb); -// if (0x60 == pb) { // NULL byte -// // just wait more time -// } else if ((0x60 == (pb & 0xf0)) || (0x90 == (pb & 0xf0))) { // SW1 byte -// // left the rest of the code handle it -// } else if (header[1] == pb) { // ACK byte -// // transfer rest of the data -// if (data_i >= data_length) { -// printf("error no more data to transfer\r\n"); -// return ERR_INVALID_DATA; -// } -// if (write) { // transmit remaining command data -// rc = slot_card_write(slotnr, &data[data_i], data_length - data_i); // transmit command data -// if (ERR_NONE != rc) { -// printf("error in command data transmit (errno = %d)\r\n", rc); -// return rc; -// } -// } else { // receive remaining command data -// rc = slot_card_read(slotnr, &data[data_i], data_length - data_i, ISO7816_3_DEFAULT_WT); -// if (ERR_NONE != rc) { -// printf("error in command data receive (errno = %d)\r\n", rc); -// return rc; -// } -// } -// for (uint16_t i = data_i; i < data_length; i++) { -// printf("%02x ", data[i]); -// } -// data_i = data_length; // remember we transferred the data -// pb = 0x60; // wait for SW1 -// } else if (header[1] == (pb ^ 0xff)) { // ACK byte -// // transfer only one byte -// if (data_i >= data_length) { -// printf("error no more data to transfer\r\n"); -// return ERR_INVALID_DATA; -// } -// if (write) { // transmit command data byte -// rc = slot_card_write(slotnr, &data[data_i], 1); // transmit command data -// if (ERR_NONE != rc) { -// printf("error in command data transmit (errno = %d)\r\n", rc); -// return rc; -// } -// } else { // receive command data byte -// rc = slot_card_read(slotnr, &data[data_i], 1, ISO7816_3_DEFAULT_WT); -// if (ERR_NONE != rc) { -// printf("error in command data receive (errno = %d)\r\n", rc); -// return rc; -// } -// } -// printf("%02x ", data[data_i]); -// data_i += 1; // remember we transferred one data byte -// pb = 0x60; // wait for SW1 -// } else { // invalid byte -// return ERR_INVALID_DATA; -// } -// } -// -// // read SW2 -// uint8_t sw2; -// rc = slot_card_read(slotnr, &sw2, 1, ISO7816_3_DEFAULT_WT); -// if (ERR_NONE != rc) { -// printf("error in receiving SW2 (errno = %d)\r\n", rc); -// return rc; -// } -// printf("%02x", sw2); -// -// printf("\r\n"); -// return ERR_NONE; -//} -// -//DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") -//{ -// struct ncn8025_settings settings; -// int slotnr = validate_slotnr(argc, argv, 1); -// if (slotnr < 0) -// return; -// ncn8025_get(slotnr, &settings); -// printf("SIM%d: ", slotnr); -// ncn8025_dump(&settings); -// printf("\r\n"); -//} -// -//DEFUN(sim_power, cmd_sim_power, "sim-power", "Enable/disable SIM card power") -//{ -// struct ncn8025_settings settings; -// int slotnr = validate_slotnr(argc, argv, 1); -// int enable; -// -// if (slotnr < 0) -// return; -// -// if (argc < 3) { -// printf("You have to specify 0=disable or 1=enable\r\n"); -// return; -// } -// enable = atoi(argv[2]); -// ncn8025_get(slotnr, &settings); -// if (enable) -// settings.cmdvcc = true; -// else -// settings.cmdvcc = false; -// ncn8025_set(slotnr, &settings); -//} -// -//DEFUN(sim_reset, cmd_sim_reset, "sim-reset", "Enable/disable SIM reset") -//{ -// struct ncn8025_settings settings; -// int slotnr = validate_slotnr(argc, argv, 1); -// int enable; -// -// if (slotnr < 0) -// return; -// -// if (argc < 3) { -// printf("You have to specify 0=disable or 1=enable\r\n"); -// return; -// } -// enable = atoi(argv[2]); -// ncn8025_get(slotnr, &settings); -// if (enable) -// settings.rstin = true; -// else -// settings.rstin = false; -// ncn8025_set(slotnr, &settings); -//} -// -//DEFUN(sim_clkdiv, cmd_sim_clkdiv, "sim-clkdiv", "Set SIM clock divider (1,2,4,8)") -//{ -// struct ncn8025_settings settings; -// int slotnr = validate_slotnr(argc, argv, 1); -// int clkdiv; -// -// if (slotnr < 0) -// return; -// -// if (argc < 3) { -// printf("You have to specify a valid divider (1,2,4,8)\r\n"); -// return; -// } -// clkdiv = atoi(argv[2]); -// if (clkdiv != 1 && clkdiv != 2 && clkdiv != 4 && clkdiv != 8) { -// printf("You have to specify a valid divider (1,2,4,8)\r\n"); -// return; -// } -// ncn8025_get(slotnr, &settings); -// switch (clkdiv) { -// case 1: -// settings.clkdiv = SIM_CLKDIV_1; -// break; -// case 2: -// settings.clkdiv = SIM_CLKDIV_2; -// break; -// case 4: -// settings.clkdiv = SIM_CLKDIV_4; -// break; -// case 8: -// settings.clkdiv = SIM_CLKDIV_8; -// break; -// } -// ncn8025_set(slotnr, &settings); -//} -// -//DEFUN(sim_voltage, cmd_sim_voltage, "sim-voltage", "Set SIM voltage (5/3/1.8)") -//{ -// struct ncn8025_settings settings; -// int slotnr = validate_slotnr(argc, argv, 1); -// -// if (slotnr < 0) -// return; -// -// if (argc < 3) { -// printf("You have to specify a valid voltage (5/3/1.8)\r\n"); -// return; -// } -// ncn8025_get(slotnr, &settings); -// if (!strcmp(argv[2], "5")) -// settings.vsel = SIM_VOLT_5V0; -// else if (!strcmp(argv[2], "3")) -// settings.vsel = SIM_VOLT_3V0; -// else if (!strcmp(argv[2], "1.8")) -// settings.vsel = SIM_VOLT_1V8; -// else { -// printf("You have to specify a valid voltage (5/3/1.8)\r\n"); -// return; -// } -// ncn8025_set(slotnr, &settings); -//} -// -//DEFUN(sim_led, cmd_sim_led, "sim-led", "Set SIM LED (1=on, 0=off)") -//{ -// struct ncn8025_settings settings; -// int slotnr = validate_slotnr(argc, argv, 1); -// -// if (slotnr < 0) -// return; -// -// if (argc < 3) { -// printf("You have to specify 0=disable or 1=enable\r\n"); -// return; -// } -// ncn8025_get(slotnr, &settings); -// if (atoi(argv[2])) -// settings.led = true; -// else -// settings.led = false; -// ncn8025_set(slotnr, &settings); -//} -// -//DEFUN(sim_atr, cmd_sim_atr, "sim-atr", "Read ATR from SIM card") -//{ -// struct ncn8025_settings settings; -// int slotnr = validate_slotnr(argc, argv, 1); -// -// if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { -// return; -// } -// -// // check if card is present (and read current settings) -// ncn8025_get(slotnr, &settings); -// if (!settings.simpres) { -// printf("(%d) error: no card present\r\n", slotnr); -// return; -// } -// -// // switch card off (assert reset and disable power) -// // note: ISO/IEC 7816-3:2006 section 6.4 provides the deactivation sequence, but not the minimum corresponding times -// settings.rstin = true; -// settings.cmdvcc = false; -// settings.led = true; -// ncn8025_set(slotnr, &settings); -// -// // TODO wait some time for card to be completely deactivated -// usart_async_flush_rx_buffer(SIM_peripheral_descriptors[slotnr]); // flush RX buffer to start from scratch -// -// -// // set clock to lowest frequency (20 MHz / 8 = 2.5 MHz) -// // note: according to ISO/IEC 7816-3:2006 section 5.2.3 the minimum value is 1 MHz, and maximum is 5 MHz during activation -// settings.clkdiv = SIM_CLKDIV_8; -// // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) -// slot_set_isorate(slotnr, settings.clkdiv, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); -// // set card voltage to 3.0 V (the most supported) -// // note: according to ISO/IEC 7816-3:2006 no voltage should damage the card, and you should cycle from low to high -// settings.vsel = SIM_VOLT_3V0; -// // provide power (the NCN8025 should perform the activation according to spec) -// // note: activation sequence is documented in ISO/IEC 7816-3:2006 section 6.2 -// settings.cmdvcc = true; -// ncn8025_set(slotnr, &settings); -// -// // wait for Tb=400 cycles before re-asserting reset -// delay_us(400 * 10000 / 2500); // 400 cycles * 1000 for us, 2.5 MHz / 1000 for us -// -// // de-assert reset to switch card back on -// settings.rstin = false; -// ncn8025_set(slotnr, &settings); -// -// // wait for Tc=40000 cycles for transmission to start -// uint32_t cycles = 40000; -// while (cycles && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { -// delay_us(10); -// cycles -= 25; // 10 us = 25 cycles at 2.5 MHz -// } -// if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { -// delay_us(12 * 372 / 1 / 2); // wait more than one byte (approximate freq down to 2 MHz) -// } -// // verify if one byte has been received -// if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { -// printf("(%d) error: card not responsive\r\n", slotnr); -// return; -// } -// -// // read ATR (just do it until there is no traffic anymore) -// // TODO the ATR should be parsed to read the right number of bytes, instead we just wait until to end of WT -// printf("(%d) ATR: ", slotnr); -// uint8_t atr_byte; -// while (usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { -// if (1 == io_read(&SIM_peripheral_descriptors[slotnr]->io, &atr_byte, 1)) { -// printf("%02x ", atr_byte); -// } -// uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU -// while (wt && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { -// delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) -// wt--; -// } -// } -// printf("\r\n"); -// -// /* disable LED */ -// settings.led = false; -// ncn8025_set(slotnr, &settings); -//} -// -//DEFUN(sim_iccid, cmd_sim_iccid, "sim-iccid", "Read ICCID from SIM card") -//{ -// struct ncn8025_settings settings; -// int slotnr = validate_slotnr(argc, argv, 1); -// -// if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { -// return; -// } -// -// // read current settings and check if card is present and powered -// ncn8025_get(slotnr, &settings); -// if (!settings.simpres) { -// printf("(%d) error: no card present\r\n", slotnr); -// return; -// } -// if (!settings.cmdvcc) { -// printf("(%d) error: card not powered\r\n", slotnr); -// return; -// } -// if (settings.rstin) { -// printf("(%d) error: card under reset\r\n", slotnr); -// return; -// } -// -// // enable LED -// if (!settings.led) { -// settings.led = true; -// ncn8025_set(slotnr, &settings); -// } -// -// // select MF -// printf("(%d) SELECT MF\r\n", slotnr); -// const uint8_t select_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; // see TS 102.221 sec. 11.1.1 -// const uint8_t select_data_mf[] = {0x3f, 0x00}; // see TS 102.221 sec. 13.1 -// int rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_mf, ARRAY_SIZE(select_data_mf), true); // transfer TPDU -// if (ERR_NONE != rc) { -// printf("error while SELECT MF (errno = %d)\r\n", rc); -// } -// // ignore response data -// -// // select EF_ICCID -// printf("(%d) SELECT EF_ICCID\r\n", slotnr); -// const uint8_t select_data_ef_iccid[] = {0x2f, 0xe2}; // see TS 102.221 sec. 13.2 -// rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_ef_iccid, ARRAY_SIZE(select_data_ef_iccid), true); // transfer TPDU -// if (ERR_NONE != rc) { -// printf("error while SELECT EF_ICCID (errno = %d)\r\n", rc); -// } -// // ignore response data -// -// // read EF_ICCID -// printf("(%d) READ EF_ICCID\r\n", slotnr); -// uint8_t iccid[10]; -// uint8_t read_binary[] = {0xa0, 0xb0, 0x00, 0x00, ARRAY_SIZE(iccid)}; // see TS 102.221 sec. 11.1.3 -// rc = slot_tpdu_xfer(slotnr, read_binary, iccid, ARRAY_SIZE(iccid), false); // transfer TPDU -// if (ERR_NONE != rc) { -// printf("error while READ ICCID (errno = %d)\r\n", rc); -// } -// // ignore response data -// -// printf("(%d) ICCID: ", slotnr); -// for (uint8_t i = 0; i < ARRAY_SIZE(iccid); i++) { -// uint8_t nibble = iccid[i] & 0xf; -// if (0xf == nibble) { -// break; -// } -// printf("%x", nibble); -// nibble = iccid[i] >> 4; -// if (0xf == nibble) { -// break; -// } -// printf("%x", nibble); -// } -// printf("\r\n"); -// -// // disable LED -// settings.led = false; -// ncn8025_set(slotnr, &settings); -//} -// -//DEFUN(get_time, cmd_get_time, "get-time", "Read Time from RTC") -//{ -// struct calendar_date_time dt; -// calendar_get_date_time(&CALENDAR_0, &dt); -// printf("%04u-%02u-%02u %02u:%02u:%02u\r\n", dt.date.year, dt.date.month, dt.date.day, -// dt.time.hour, dt.time.min, dt.time.sec); -//} - -//#include -//static struct osmo_timer_list t; -//static void tmr_cb(void *data) -//{ -// printf("timer fired!\r\n"); -//} -//DEFUN(test_timer, cmd_test_timer, "test-timer", "Test osmo_timer") -//{ -// printf("Setting up timer for 3s...\n\r"); -// osmo_timer_setup(&t, &tmr_cb, NULL); -// osmo_timer_schedule(&t, 3, 0); -//} - extern void testmode_init(void); extern void libosmo_emb_init(void); @@ -1003,25 +329,9 @@ #include "talloc.h" #include "logging.h" -//#include + void *g_tall_ctx; -//DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc report") -//{ -// talloc_report_full(g_tall_ctx, stdout); -//} -// -//DEFUN(talloc_test, cmd_talloc_test, "talloc-test", "Test the talloc allocator") -//{ -// for (int i = 0; i < 10; i++) -// talloc_named_const(g_tall_ctx, 10, "sibling"); -//} -// -//DEFUN(v_talloc_free, cmd_talloc_free, "talloc-free", "Release all memory") -//{ -// talloc_free(g_tall_ctx); -// g_tall_ctx = NULL; -//} /* Section 9.6 of SAMD5x/E5x Family Data Sheet */ static int get_chip_unique_serial(uint8_t *out, size_t len) @@ -1170,21 +480,8 @@ usb_start(); board_init(); -// command_init("sysmoOCTSIM> "); -// command_register(&cmd_sim_status); -// command_register(&cmd_sim_power); -// command_register(&cmd_sim_reset); -// command_register(&cmd_sim_clkdiv); -// command_register(&cmd_sim_voltage); -// command_register(&cmd_sim_led); -// command_register(&cmd_sim_atr); -// command_register(&cmd_sim_iccid); -// testmode_init(); -// command_register(&cmd_talloc_test); -// command_register(&cmd_talloc_report); -// command_register(&cmd_talloc_free); -// command_register(&cmd_get_time); -// command_register(&cmd_test_timer); + command_init("sysmoOCTSIM> "); + for(int i = 0; i <= 136; i++) @@ -1237,11 +534,11 @@ gpio_set_pin_direction(PIN_PB13, GPIO_DIRECTION_OUT); gpio_set_pin_level(PIN_PB13, false); #endif - poll_card_detect(); + // command_print_prompt(); while (true) { // main loop command_try_recv(); -// poll_card_detect(); + poll_card_detect(); submit_next_irq(); for (int i = 0; i < usb_fs_descs.ccid.class.bMaxSlotIndex; i++){ g_ci.slot_ops->handle_fsm_events(&g_ci.slot[i], true); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16252 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I91fff5d8c296661bcef8576244079f3a5fc8800b Gerrit-Change-Number: 16252 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:17 +0000 Subject: Change in osmo-ccid-firmware[master]: first attempt at timeout handling References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16253 ) Change subject: first attempt at timeout handling ...................................................................... first attempt at timeout handling Change-Id: I96315fed5696ccd75318ebd88cb7725ed7568c07 --- M ccid_common/cuart.c M ccid_common/cuart.h M ccid_common/iso7816_fsm.c 3 files changed, 142 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/53/16253/1 diff --git a/ccid_common/cuart.c b/ccid_common/cuart.c index 1ae50c6..1d777f9 100644 --- a/ccid_common/cuart.c +++ b/ccid_common/cuart.c @@ -49,7 +49,12 @@ { int secs, usecs; - usecs = get_etu_in_us(cuart) * cuart->wtime_etu; + if(!cuart->current_wtime_byte) + return; + + /* timemout is wtime * ETU + expected number of bytes * (12ETU+1 slack)ETU */ + usecs = get_etu_in_us(cuart) * cuart->wtime_etu + + get_etu_in_us(cuart) * cuart->current_wtime_byte * (12+1); if (usecs > 1000000) { secs = usecs / 1000000; usecs = usecs % 1000000; @@ -108,6 +113,15 @@ cuart->rx_enabled = arg ? true : false; if (!cuart->rx_enabled) osmo_timer_del(&cuart->wtime_tmr); +// else +// card_uart_wtime_restart(cuart); + break; + case CUART_CTL_RX_TIMER_HINT: + cuart->current_wtime_byte = arg; + if(arg) + card_uart_wtime_restart(cuart); + else + osmo_timer_del(&cuart->wtime_tmr); break; default: break; @@ -158,6 +172,12 @@ if (cuart->rx_after_tx_compl) card_uart_ctrl(cuart, CUART_CTL_RX, true); break; +// case CUART_E_RX_COMPLETE: +// osmo_timer_del(&cuart->wtime_tmr); +// break; +// case CUART_E_RX_SINGLE: +// card_uart_wtime_restart(cuart); +// break; default: break; } diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 40a4aa8..a16e0db 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -23,6 +23,7 @@ enum card_uart_ctl { CUART_CTL_RX, /* enable/disable receiver */ + CUART_CTL_RX_TIMER_HINT, /* tell cuart approximate number of rx bytes */ CUART_CTL_NO_RXTX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ @@ -78,6 +79,8 @@ uint32_t wtime_etu; struct osmo_timer_list wtime_tmr; + /* expected number of bytes, for timeout */ + uint32_t current_wtime_byte; /* driver-specific private data */ diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index a659fe4..4d2db15 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -68,14 +68,14 @@ * @note defined in ISO/IEC 7816-3:2006(E) section 9 */ enum pps_state { - PPS_S_TX_PPS_REQ, /*!< tx pps request */ - PPS_S_WAIT_PPSS, /*!< initial byte */ + PPS_S_PPS_REQ_INIT, /*!< tx pps request */ + PPS_S_TX_PPS_REQ, + PPS_S_WAIT_PPSX, /*!< initial byte */ PPS_S_WAIT_PPS0, /*!< format byte */ PPS_S_WAIT_PPS1, /*!< first parameter byte */ PPS_S_WAIT_PPS2, /*!< second parameter byte */ PPS_S_WAIT_PPS3, /*!< third parameter byte */ PPS_S_WAIT_PCK, /*!< check byte */ - PPS_S_WAIT_END, /*!< all done */ PPS_S_DONE }; @@ -219,9 +219,11 @@ struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); + /* go back to initial state in child FSMs */ osmo_fsm_inst_state_chg(ip->atr_fi, ATR_S_WAIT_TS, 0, 0); - osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_PPS_REQ_INIT, 0, 0); osmo_fsm_inst_state_chg(ip->tpdu_fi, TPDU_S_INIT, 0, 0); } @@ -235,8 +237,13 @@ case ISO7816_E_RESET_REL_IND: /* TOOD: this should happen before reset is released */ card_uart_ctrl(ip->uart, CUART_CTL_RX, true); - osmo_fsm_inst_state_chg_ms(fi, ISO7816_S_WAIT_ATR, - fi_cycles2ms(fi, 40000), T_WAIT_ATR); + + /* let's be reasonable here: the 40k cycle delay to ATR start is + * ~1.4ms @ 2.5Mhz/6720 baud, 1ETU = 372 cycles -> 40k/372=107/12ETU ~ 9 byte + * default timeout for rx is 9600 ETU, ATR might be missing the TCK + * so it might time out, so just add this delay */ + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 32+9); + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_ATR, 0, 0); break; case ISO7816_E_POWER_UP_IND: break; @@ -308,6 +315,7 @@ { struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); card_uart_ctrl(ip->uart, CUART_CTL_NO_RXTX, true); /* reset the TPDU state machine */ osmo_fsm_inst_dispatch(ip->tpdu_fi, ISO7816_E_TPDU_CLEAR_REQ, NULL); @@ -328,7 +336,7 @@ case ISO7816_E_XCEIVE_PPS_CMD: // osmo_fsm_inst_state_chg(fi, ISO7816_S_IN_PPS_REQ, 0, 0); osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); - osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_PPS_REQ_INIT, 0, 0); osmo_fsm_inst_dispatch(ip->pps_fi, event, data); break; default: @@ -392,11 +400,13 @@ static void iso7816_3_s_wait_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); switch (event) { case ISO7816_E_TX_COMPL: /* Rx of single byte is already enabled by previous card_uart_tx() call */ osmo_fsm_inst_state_chg(fi, ISO7816_S_IN_PPS_RSP, 0, 0); + osmo_fsm_inst_dispatch(ip->pps_fi, event, data); break; default: OSMO_ASSERT(0); @@ -436,6 +446,7 @@ [ISO7816_S_RESET] = { .name = "RESET", .in_event_mask = S(ISO7816_E_RESET_REL_IND) | + S(ISO7816_E_POWER_UP_IND) | S(ISO7816_E_PPS_FAILED_IND)| S(ISO7816_E_TPDU_FAILED_IND), .out_state_mask = S(ISO7816_S_WAIT_ATR) | @@ -752,6 +763,14 @@ } } +static void atr_done_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); +} + static const struct osmo_fsm_state atr_states[] = { [ATR_S_WAIT_TS] = { .name = "WAIT_TS", @@ -848,7 +867,7 @@ .name = "DONE", .in_event_mask = 0, .out_state_mask = S(ATR_S_WAIT_TS), - //.action = atr_done_action, + .onenter = atr_done_onenter }, }; @@ -869,7 +888,7 @@ uint8_t pps0_recv; }; -static void pps_s_wait_ppss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +static void pps_s_pps_req_init_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) { struct pps_fsm_priv *atp = fi->priv; @@ -886,7 +905,7 @@ } } -static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +static void pps_s_pps_req_init_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct pps_fsm_priv *atp = fi->priv; struct osmo_fsm_inst *parent_fi = fi->proc.parent; @@ -897,7 +916,8 @@ switch (event) { case ISO7816_E_XCEIVE_PPS_CMD: - osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSS, 0, 0); + osmo_fsm_inst_state_chg(fi, PPS_S_TX_PPS_REQ, 0, 0); + card_uart_set_rx_threshold(ip->uart, 1); card_uart_tx(ip->uart, msgb_data(data), msgb_length(data), true); break; default: @@ -905,10 +925,29 @@ } } +static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + switch (event) { + case ISO7816_E_TX_COMPL: + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 6); + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSX, 0, 0); + break; + default: + OSMO_ASSERT(0); + } +} + + + + static void pps_wait_pX_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct pps_fsm_priv *atp = fi->priv; -// uint32_t guard_time_ms = atr_fi_gt_ms(fi); + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); uint8_t byte; switch (event) { @@ -917,7 +956,7 @@ LOGPFSML(fi, LOGL_DEBUG, "RX byte '%02x'\n", byte); msgb_put_u8(atp->rx_cmd, byte); switch (fi->state) { - case PPS_S_WAIT_PPSS: + case PPS_S_WAIT_PPSX: if (byte == 0xff) osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS0, 0, 0); break; @@ -961,7 +1000,7 @@ uint8_t *pps_received = msgb_data(atp->rx_cmd); uint8_t *pps_sent = msgb_data(atp->tx_cmd); - osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_END, 0, 0); + osmo_fsm_inst_state_chg(fi, PPS_S_DONE, 0, 0); /* pps was successful if response equals request * rx buffer stays with the fsm, tx buffer gets handed back and freed @@ -983,6 +1022,7 @@ } break; case ISO7816_E_WTIME_EXP: + osmo_fsm_inst_state_chg(fi, PPS_S_DONE, 0, 0); /* FIXME: timeout handling if no pps supported ? */ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_RX_ERR_IND, NULL); break; @@ -992,22 +1032,37 @@ } +static void pps_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); +} + + static const struct osmo_fsm_state pps_states[] = { - [PPS_S_TX_PPS_REQ] = { - .name = "TX_PPS_REQ", + [PPS_S_PPS_REQ_INIT] = { + .name = "INIT", .in_event_mask = S(ISO7816_E_XCEIVE_PPS_CMD) | S(ISO7816_E_WTIME_EXP), - .out_state_mask = S(PPS_S_TX_PPS_REQ) | - S(PPS_S_WAIT_PPSS), - .action = pps_s_tx_pps_req_action, - .onenter = pps_s_wait_ppss_onenter, + .out_state_mask = S(PPS_S_PPS_REQ_INIT) | + S(PPS_S_TX_PPS_REQ), + .action = pps_s_pps_req_init_action, + .onenter = pps_s_pps_req_init_onenter, }, - [PPS_S_WAIT_PPSS] = { + [PPS_S_TX_PPS_REQ] = { + .name = "TX_PPS_REQ", + .in_event_mask = S(ISO7816_E_TX_COMPL), + .out_state_mask = S(PPS_S_WAIT_PPSX), + .action = pps_s_tx_pps_req_action, + }, + [PPS_S_WAIT_PPSX] = { .name = "WAIT_PPSS", .in_event_mask = S(ISO7816_E_RX_SINGLE) | S(ISO7816_E_WTIME_EXP), .out_state_mask = S(PPS_S_WAIT_PPS0) | - S(PPS_S_WAIT_PPSS), + S(PPS_S_WAIT_PPSX), .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS0] = { @@ -1048,14 +1103,15 @@ .name = "WAIT_PCK", .in_event_mask = S(ISO7816_E_RX_SINGLE) | S(ISO7816_E_WTIME_EXP), - .out_state_mask = S(PPS_S_WAIT_END), + .out_state_mask = S(PPS_S_DONE), .action = pps_wait_pX_action, }, - [PPS_S_WAIT_END] = { - .name = "WAIT_END", + [PPS_S_DONE] = { + .name = "DONE", .in_event_mask = 0, - .out_state_mask = S(PPS_S_TX_PPS_REQ) | - S(PPS_S_WAIT_PPSS), + .out_state_mask = S(PPS_S_PPS_REQ_INIT), + .action = NULL, + .onenter = pps_s_done_onenter, }, }; @@ -1141,11 +1197,14 @@ #include static void tpdu_s_tx_hdr_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); OSMO_ASSERT(fi->fsm == &tpdu_fsm); switch (event) { case ISO7816_E_TX_COMPL: - + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); /* Rx of single byte is already enabled by previous card_uart_tx() call */ osmo_fsm_inst_state_chg(fi, TPDU_S_PROCEDURE, 0, 0); break; @@ -1170,11 +1229,15 @@ LOGPFSML(fi, LOGL_DEBUG, "Received 0x%02x from UART\n", byte); if (byte == 0x60) { /* NULL: wait for another procedure byte */ + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_PROCEDURE, 0, 0); } else if ((byte >= 0x60 && byte <= 0x6f) || (byte >= 0x90 && byte <= 0x9f)) { //msgb_apdu_sw(tfp->apdu) = byte << 8; msgb_put(tfp->tpdu, byte); /* receive second SW byte (SW2) */ + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW2, 0, 0); break; } else if (byte == tpduh->ins) { @@ -1190,6 +1253,7 @@ osmo_fsm_inst_state_chg(fi, TPDU_S_TX_REMAINING, 0, 0); } else { card_uart_set_rx_threshold(ip->uart, tpduh->p3); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, tpduh->p3); osmo_fsm_inst_state_chg(fi, TPDU_S_RX_REMAINING, 0, 0); } } else if (byte == (tpduh->ins ^ 0xFF)) { @@ -1200,6 +1264,8 @@ card_uart_tx(ip->uart, msgb_l3(tfp->tpdu), 1, false); osmo_fsm_inst_state_chg(fi, TPDU_S_TX_SINGLE, 0, 0); } else { + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_RX_SINGLE, 0, 0); } } else @@ -1219,6 +1285,7 @@ switch (event) { case ISO7816_E_TX_COMPL: card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW1, 0, 0); break; default: @@ -1230,10 +1297,14 @@ static void tpdu_s_tx_single_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); switch (event) { case ISO7816_E_TX_COMPL: tfp->tpdu->l3h += 1; + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); if (msgb_l3len(tfp->tpdu)) osmo_fsm_inst_state_chg(fi, TPDU_S_PROCEDURE, 0, 0); else @@ -1264,6 +1335,7 @@ msgb_l2len(tfp->tpdu)); } card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW1, 0, 0); break; default: @@ -1276,6 +1348,8 @@ { struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); struct osim_apdu_cmd_hdr *tpduh = msgb_tpdu_hdr(tfp->tpdu); + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); uint8_t byte; switch (event) { @@ -1283,6 +1357,10 @@ byte = get_rx_byte_evt(fi->proc.parent, data); LOGPFSML(fi, LOGL_DEBUG, "Received 0x%02x from UART\n", byte); msgb_put_u8(tfp->tpdu, byte); + + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); + /* determine if number of expected bytes received */ if (msgb_l2len(tfp->tpdu) == tpduh->p3) osmo_fsm_inst_state_chg(fi, TPDU_S_SW1, 0, 0); @@ -1309,6 +1387,7 @@ //msgb_apdu_sw(tfp->apdu) = byte << 8; msgb_put_u8(tfp->tpdu, byte); card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW2, 0, 0); break; default: @@ -1352,7 +1431,7 @@ case ISO7816_E_TX_ERR_IND: /* FIXME: handle this in some different way */ osmo_fsm_inst_state_chg(fi, TPDU_S_DONE, 0, 0); - osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_DONE_IND, NULL); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, NULL); break; case ISO7816_E_TPDU_CLEAR_REQ: osmo_fsm_inst_state_chg(fi, TPDU_S_INIT, 0, 0); @@ -1360,6 +1439,15 @@ } } + +static void tpdu_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); +} + static const struct osmo_fsm_state tpdu_states[] = { [TPDU_S_INIT] = { .name = "INIT", @@ -1436,6 +1524,7 @@ .in_event_mask = 0, .out_state_mask = S(TPDU_S_INIT), .action = NULL, + .onenter = tpdu_s_done_onenter, }, }; static struct osmo_fsm tpdu_fsm = { -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I96315fed5696ccd75318ebd88cb7725ed7568c07 Gerrit-Change-Number: 16253 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:17 +0000 Subject: Change in osmo-ccid-firmware[master]: enable the final slot References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16254 ) Change subject: enable the final slot ...................................................................... enable the final slot Change-Id: I1c18459d7e43e6fbd1022fabb52138904f2bf480 --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/atmel_start_pins.h M sysmoOCTSIM/command.c M sysmoOCTSIM/config/hpl_sercom_config.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/driver_init.h M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c D sysmoOCTSIM/manual_test.c M sysmoOCTSIM/stdio_start.c 12 files changed, 357 insertions(+), 267 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/54/16254/1 diff --git a/sysmoOCTSIM/atmel_start.c b/sysmoOCTSIM/atmel_start.c index 6670364..931a09a 100644 --- a/sysmoOCTSIM/atmel_start.c +++ b/sysmoOCTSIM/atmel_start.c @@ -14,6 +14,8 @@ system_init(); dma_memory_init(); dma_memory_register_callback(DMA_MEMORY_COMPLETE_CB, M2M_DMA_complete_cb); -// stdio_redirect_init(); +#ifdef ENABLE_DBG_UART7 + stdio_redirect_init(); +#endif usb_init(); } diff --git a/sysmoOCTSIM/atmel_start_pins.h b/sysmoOCTSIM/atmel_start_pins.h index 7cbaed5..0c33536 100644 --- a/sysmoOCTSIM/atmel_start_pins.h +++ b/sysmoOCTSIM/atmel_start_pins.h @@ -60,6 +60,7 @@ #define SWITCH GPIO(GPIO_PORTC, 14) #define MUX_STAT GPIO(GPIO_PORTC, 15) #define SIM6_IO GPIO(GPIO_PORTC, 16) +#define SIM7_IO GPIO(GPIO_PORTB, 21) #define USER_LED GPIO(GPIO_PORTC, 26) #define SCL4 GPIO(GPIO_PORTC, 27) #define SDA4 GPIO(GPIO_PORTC, 28) diff --git a/sysmoOCTSIM/command.c b/sysmoOCTSIM/command.c index 454cd2f..48d8c11 100644 --- a/sysmoOCTSIM/command.c +++ b/sysmoOCTSIM/command.c @@ -78,6 +78,7 @@ void command_try_recv(void) { +#ifdef ENABLE_DBG_UART7 unsigned int i = 0; /* yield CPU after maximum of 10 received characters */ @@ -101,6 +102,7 @@ i++; } +#endif } void command_init(const char *prompt) diff --git a/sysmoOCTSIM/config/hpl_sercom_config.h b/sysmoOCTSIM/config/hpl_sercom_config.h index bb2bbff..86b4c0a 100644 --- a/sysmoOCTSIM/config/hpl_sercom_config.h +++ b/sysmoOCTSIM/config/hpl_sercom_config.h @@ -1910,6 +1910,8 @@ #include +#ifdef ENABLE_DBG_UART7 + #ifndef CONF_SERCOM_7_USART_ENABLE #define CONF_SERCOM_7_USART_ENABLE 1 #endif @@ -2176,7 +2178,281 @@ #define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 #endif #endif +#else +#include + +#ifndef CONF_SERCOM_7_USART_ENABLE +#define CONF_SERCOM_7_USART_ENABLE 1 +#endif + +// Basic Configuration + +// Receive buffer enable +// Enable input buffer in SERCOM module +// usart_rx_enable +#ifndef CONF_SERCOM_7_USART_RXEN +#define CONF_SERCOM_7_USART_RXEN 1 +#endif + +// Transmitt buffer enable +// Enable output buffer in SERCOM module +// usart_tx_enable +#ifndef CONF_SERCOM_7_USART_TXEN +#define CONF_SERCOM_7_USART_TXEN 1 +#endif + +// Frame parity +// <0x1=>Even parity +// Parity bit mode for USART frame +// usart_parity +#ifndef CONF_SERCOM_7_USART_PARITY +#define CONF_SERCOM_7_USART_PARITY 1 +#endif + +// Character Size +// <0x0=>8 bits +// <0x1=>9 bits +// <0x5=>5 bits +// <0x6=>6 bits +// <0x7=>7 bits +// Data character size in USART frame +// usart_character_size +#ifndef CONF_SERCOM_7_USART_CHSIZE +#define CONF_SERCOM_7_USART_CHSIZE 0x0 +#endif + +// Stop Bit +// <0=>One stop bit +// <1=>Two stop bits +// Number of stop bits in USART frame +// usart_stop_bit +#ifndef CONF_SERCOM_7_USART_SBMODE +#define CONF_SERCOM_7_USART_SBMODE 1 +#endif + +// Baud rate <1-3000000> +// USART baud rate setting +// usart_baud_rate +#ifndef CONF_SERCOM_7_USART_BAUD +#define CONF_SERCOM_7_USART_BAUD 6720 +#endif +// + +// ISO7816 configuration +// ISO7816 Protocol Type +// <0x1=> T=0 +// <0x0=> T=1 +// Define ISO7816 protocol type as 0. +// usart_iso7816_type +#ifndef CONF_SERCOM_7_USART_ISO7816_PROTOCOL_T +#define CONF_SERCOM_7_USART_ISO7816_PROTOCOL_T 0x0 +#endif + +// ISO7816 Inhibit Not Acknowledge +// <0x0=> NACK is transmitted when a parity error is received. +// <0x1=> NACK is not transmitted when a parity error is received. +// Define whether a NACK is transmitted when a parity error is received. +// usart_inack +#ifndef CONF_SERCOM_7_USART_INACK +#define CONF_SERCOM_7_USART_INACK 0x0 +#endif + +// ISO7816 Disable Successive Not Acknowledge +// <0x0=> The successive receive NACK is disable. +// <0x1=> The successive receive NACK is enable. +// Define whether NACK will be sent on parity error reception. +// usart_dsnack +#ifndef CONF_SERCOM_7_USART_DSNACK +#define CONF_SERCOM_7_USART_DSNACK 0x0 +#endif + +// ISO7816 Maximum Iterations<0-7> +// Define the maximum number of retransmit iterations. +// usart_maxiter +#ifndef CONF_SERCOM_7_USART_MAXITER +#define CONF_SERCOM_7_USART_MAXITER 0x7 +#endif + +// ISO7816 Guard Time +// <0x2=> 2-bit times +// <0x3=> 3-bit times +// <0x4=> 4-bit times +// <0x5=> 5-bit times +// <0x6=> 6-bit times +// <0x7=> 7-bit times +// Define the guard time. +// usart_gtime +#ifndef CONF_SERCOM_7_USART_GTIME +#define CONF_SERCOM_7_USART_GTIME 0x2 +#endif + +// Inverse transmission and reception enabled +// Define inverse transmission and reception enabled. +// usart_inverse_enabled +#ifndef CONF_SERCOM_7_USART_INVERSE_ENABLED +#define CONF_SERCOM_7_USART_INVERSE_ENABLED 0x0 +#endif + +#if (CONF_SERCOM_7_USART_INVERSE_ENABLED == 1) +#define CONF_SERCOM_7_USART_RXINV 0x1 +#define CONF_SERCOM_7_USART_TXINV 0x1 +#else +#define CONF_SERCOM_7_USART_RXINV 0x0 +#define CONF_SERCOM_7_USART_TXINV 0x0 +#endif + +// + +// Advanced configuration +// usart_advanced +#ifndef CONF_SERCOM_7_USART_ADVANCED_CONFIG +#define CONF_SERCOM_7_USART_ADVANCED_CONFIG 0 +#endif + +// Run in stand-by +// Keep the module running in standby sleep mode +// usart_arch_runstdby +#ifndef CONF_SERCOM_7_USART_RUNSTDBY +#define CONF_SERCOM_7_USART_RUNSTDBY 0 +#endif + +// Immediate Buffer Overflow Notification +// Controls when the BUFOVF status bit is asserted +// usart_arch_ibon +#ifndef CONF_SERCOM_7_USART_IBON +#define CONF_SERCOM_7_USART_IBON 0 +#endif + +// Start of Frame Detection Enable +// Will wake the device from any sleep mode if usart_init and usart_enable was run priort to going to sleep. (receive buffer must be enabled) +// usart_arch_sfde +#ifndef CONF_SERCOM_7_USART_SFDE +#define CONF_SERCOM_7_USART_SFDE 0 +#endif + +// Collision Detection Enable +// Collision detection enable +// usart_arch_cloden +#ifndef CONF_SERCOM_7_USART_CLODEN +#define CONF_SERCOM_7_USART_CLODEN 0 +#endif + +// Operating Mode +// <0x1=>USART with internal clock +// Drive the shift register by an internal clock generated by the baud rate generator. +// usart_arch_clock_mode +#ifndef CONF_SERCOM_7_USART_MODE +#define CONF_SERCOM_7_USART_MODE 0x1 +#endif + +// Data Order +// <0=>MSB is transmitted first +// <1=>LSB is transmitted first +// Data order of the data bits in the frame +// usart_arch_dord +#ifndef CONF_SERCOM_7_USART_DORD +#define CONF_SERCOM_7_USART_DORD 1 +#endif + +// Debug Stop Mode +// Behavior of the baud-rate generator when CPU is halted by external debugger. +// <0=>Keep running +// <1=>Halt +// usart_arch_dbgstop +#ifndef CONF_SERCOM_7_USART_DEBUG_STOP_MODE +#define CONF_SERCOM_7_USART_DEBUG_STOP_MODE 0 +#endif + +// Does not do anything in USRT mode +#define CONF_SERCOM_7_USART_SAMPR 0x0 +#define CONF_SERCOM_7_USART_SAMPA 0x0 +#define CONF_SERCOM_7_USART_FRACTIONAL 0x0 + +// Does not do anything in UART mode +#define CONF_SERCOM_7_USART_CPOL 0 + +// Does not do anything in USRT mode +#define CONF_SERCOM_7_USART_ENC 0 + +// + +#ifndef CONF_SERCOM_7_USART_CMODE +#define CONF_SERCOM_7_USART_CMODE CONF_SERCOM_7_USART_ISO7816_PROTOCOL_T +#endif + +/* RX is on PIN_PC16 */ +#ifndef CONF_SERCOM_7_USART_RXPO +#define CONF_SERCOM_7_USART_RXPO 0 +#endif + +/* TX uses the same pin with RX */ +#ifndef CONF_SERCOM_7_USART_TXPO +#define CONF_SERCOM_7_USART_TXPO 2 +#endif + +/* Set iso7816 mode */ +#define CONF_SERCOM_7_USART_PMODE (CONF_SERCOM_7_USART_PARITY - 1) +#define CONF_SERCOM_7_USART_FORM 7 + +#if CONF_SERCOM_7_USART_CMODE == 0 +// Calculate BAUD register value in UART mode +#if CONF_SERCOM_7_USART_SAMPR == 0 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + 65536 - ((65536 * 16.0f * CONF_SERCOM_7_USART_BAUD) / CONF_GCLK_SERCOM7_CORE_FREQUENCY) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 1 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + ((CONF_GCLK_SERCOM7_CORE_FREQUENCY) / (CONF_SERCOM_7_USART_BAUD * 16)) - (CONF_SERCOM_7_USART_FRACTIONAL / 8) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 2 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + 65536 - ((65536 * 8.0f * CONF_SERCOM_7_USART_BAUD) / CONF_GCLK_SERCOM7_CORE_FREQUENCY) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 3 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + ((CONF_GCLK_SERCOM7_CORE_FREQUENCY) / (CONF_SERCOM_7_USART_BAUD * 8)) - (CONF_SERCOM_7_USART_FRACTIONAL / 8) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 4 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + 65536 - ((65536 * 3.0f * CONF_SERCOM_7_USART_BAUD) / CONF_GCLK_SERCOM7_CORE_FREQUENCY) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#endif + +#elif CONF_SERCOM_7_USART_CMODE == 1 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +// Calculate BAUD register value in USRT mode +#define CONF_SERCOM_7_USART_BAUD_RATE (CONF_GCLK_SERCOM7_CORE_FREQUENCY) / (2 * CONF_SERCOM_7_USART_BAUD) - 1 +#endif + +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#else +#error CMODE value for SERCOM 7 in USART mode not known +#endif + +#endif // <<< end of configuration section >>> #endif // HPL_SERCOM_CONFIG_H diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index c7d29eb..87f5123 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -13,7 +13,11 @@ #include "cuart.h" +#ifndef ENABLE_DBG_UART7 +static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, &SIM7}; +#else static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; +#endif extern struct card_uart *cuart4slot_nr(uint8_t slot_nr); diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index 7071ea5..1cfd8cf 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -33,7 +33,11 @@ #define SIM6_BUFFER_SIZE 512 /*! The buffer size for USART */ +#ifdef ENABLE_DBG_UART7 #define UART_DEBUG_BUFFER_SIZE 4096 +#else +#define SIM7_BUFFER_SIZE 512 +#endif struct usart_async_descriptor SIM0; struct usart_async_descriptor SIM1; @@ -42,6 +46,9 @@ struct usart_async_descriptor SIM4; struct usart_async_descriptor SIM5; struct usart_async_descriptor SIM6; +#ifndef ENABLE_DBG_UART7 +struct usart_async_descriptor SIM7; +#endif static uint8_t SIM0_buffer[SIM0_BUFFER_SIZE]; static uint8_t SIM1_buffer[SIM1_BUFFER_SIZE]; @@ -50,12 +57,14 @@ static uint8_t SIM4_buffer[SIM4_BUFFER_SIZE]; static uint8_t SIM5_buffer[SIM5_BUFFER_SIZE]; static uint8_t SIM6_buffer[SIM6_BUFFER_SIZE]; - +#ifndef ENABLE_DBG_UART7 +static uint8_t SIM7_buffer[SIM7_BUFFER_SIZE]; +#else struct usart_async_rings_descriptor UART_debug; -struct calendar_descriptor CALENDAR_0; - static uint8_t UART_DEBUG_buffer_rx[UART_DEBUG_BUFFER_SIZE]; static uint8_t UART_DEBUG_buffer_tx[UART_DEBUG_BUFFER_SIZE]; +#endif +struct calendar_descriptor CALENDAR_0; void CALENDAR_0_CLOCK_init(void) { @@ -327,6 +336,7 @@ SIM6_PORT_init(); } +#ifdef ENABLE_DBG_UART7 /** * \brief USART Clock initialization function * @@ -365,7 +375,44 @@ usart_async_rings_init(&UART_debug, SERCOM7, UART_DEBUG_buffer_rx, UART_DEBUG_BUFFER_SIZE, UART_DEBUG_buffer_tx, UART_DEBUG_BUFFER_SIZE, (void *)NULL); UART_debug_PORT_init(); } +#else +/** + * \brief USART Clock initialization function + * + * Enables register interface and peripheral clock + */ +void SIM7_CLOCK_init() +{ + hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM7_GCLK_ID_CORE, CONF_GCLK_SERCOM7_CORE_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); + hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM7_GCLK_ID_SLOW, CONF_GCLK_SERCOM7_SLOW_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); + + hri_mclk_set_APBDMASK_SERCOM7_bit(MCLK); +} + +/** + * \brief USART pinmux initialization function + * + * Set each required pin to USART functionality + */ +void SIM7_PORT_init() +{ + + gpio_set_pin_function(SIM7_IO, PINMUX_PB21D_SERCOM7_PAD0); +} + +/** + * \brief USART initialization function + * + * Enables USART peripheral, clocks and initializes USART driver + */ +void SIM7_init(void) +{ + SIM7_CLOCK_init(); + usart_async_init(&SIM7, SERCOM7, SIM7_buffer, SIM7_BUFFER_SIZE, (void *)NULL); + SIM7_PORT_init(); +} +#endif void USB_DEVICE_INSTANCE_PORT_init(void) { @@ -923,8 +970,11 @@ SIM4_init(); SIM5_init(); SIM6_init(); - +#ifndef ENABLE_DBG_UART7 + SIM7_init(); +#else UART_debug_init(); +#endif USB_DEVICE_INSTANCE_init(); } diff --git a/sysmoOCTSIM/driver_init.h b/sysmoOCTSIM/driver_init.h index de5e441..f9d23b7 100644 --- a/sysmoOCTSIM/driver_init.h +++ b/sysmoOCTSIM/driver_init.h @@ -36,7 +36,11 @@ extern struct usart_async_descriptor SIM4; extern struct usart_async_descriptor SIM5; extern struct usart_async_descriptor SIM6; +#ifdef ENABLE_DBG_UART7 extern struct usart_async_rings_descriptor UART_debug; +#else +extern struct usart_async_descriptor SIM7; +#endif void CALENDAR_0_CLOCK_init(void); void CALENDAR_0_init(void); @@ -69,6 +73,10 @@ void SIM6_CLOCK_init(void); void SIM6_init(void); +void SIM7_PORT_init(void); +void SIM7_CLOCK_init(void); +void SIM7_init(void); + void UART_debug_PORT_init(void); void UART_debug_CLOCK_init(void); void UART_debug_init(void); diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 95a582f..7a37036 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -126,7 +126,6 @@ i2c_bitbang.o \ libosmo_emb.o \ main.o \ - manual_test.o \ ncn8025.o \ octsim_i2c.o \ stdio_redirect/gcc/read.o \ diff --git a/sysmoOCTSIM/libosmo_emb.c b/sysmoOCTSIM/libosmo_emb.c index e550b07..8f363b4 100644 --- a/sysmoOCTSIM/libosmo_emb.c +++ b/sysmoOCTSIM/libosmo_emb.c @@ -156,10 +156,11 @@ /* logging */ log_init(&log_info, g_tall_ctx); -// stderr_target = log_target_create_stderr_raw(); - //log_add_target(stderr_target); - //log_set_all_filter(stderr_target, 1); - +#ifdef ENABLE_DBG_UART7 + stderr_target = log_target_create_stderr_raw(); + log_add_target(stderr_target); + log_set_all_filter(stderr_target, 1); +#endif /* timer */ SysTick_Config(SystemCoreClock / 1000); } diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index eb5faf1..5c06526 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -434,7 +434,7 @@ //####################### -#define NUM_OUT_BUF 7 +#define NUM_OUT_BUF 16 int main(void) { @@ -540,7 +540,7 @@ command_try_recv(); poll_card_detect(); submit_next_irq(); - for (int i = 0; i < usb_fs_descs.ccid.class.bMaxSlotIndex; i++){ + for (int i = 0; i <= usb_fs_descs.ccid.class.bMaxSlotIndex; i++){ g_ci.slot_ops->handle_fsm_events(&g_ci.slot[i], true); } feed_ccid(); diff --git a/sysmoOCTSIM/manual_test.c b/sysmoOCTSIM/manual_test.c deleted file mode 100644 index d6852bc..0000000 --- a/sysmoOCTSIM/manual_test.c +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright (C) 2019 Harald Welte - * - * This program is free software; you can redistribute it and/or - * modify 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 "atmel_start.h" -#include "atmel_start_pins.h" - -#include "i2c_bitbang.h" -#include "octsim_i2c.h" -#include "ncn8025.h" - -#include "command.h" - -enum testmode_test { - TEST_USER_LED, - /* test the per-slot LED by blinking it shortly */ - TEST_LED, - /* test the voltages of the SIMVCC */ - TEST_VOLTAGE, - /* test the clock rates of the SIMCLK pin */ - TEST_CLOCK, - /* test the RST line by asserting it low and then back high */ - TEST_RST, - /* test the RST line by asserting it low and then back high */ - TEST_IO, - _NUM_TESTS -}; -static const char *test_names[_NUM_TESTS] = { - [TEST_USER_LED] = "USER_LED", - [TEST_LED] = "LED", - [TEST_VOLTAGE] = "VOLTAGE", - [TEST_CLOCK] = "CLOCK", - [TEST_RST] = "RST", - [TEST_IO] = "IO", -}; - -struct testmode_state { - uint8_t slot; - enum testmode_test test_nr; - int test_int; - struct ncn8025_settings ncn; -}; -static struct testmode_state g_tms; - -#define BLINK_MS 500 - -static void set_slot(uint8_t slot) -{ - printf("changing slot to %u\r\n", slot); - g_tms.slot = slot; - g_tms.ncn = (struct ncn8025_settings) { - .rstin = false, - .cmdvcc = false, - .led = false, - .clkdiv = SIM_CLKDIV_8, - .vsel = SIM_VOLT_3V0, - }; - ncn8025_set(g_tms.slot, &g_tms.ncn); - ncn8025_get(g_tms.slot, &g_tms.ncn); -} - -static void next_test(void) -{ - g_tms.test_nr = (g_tms.test_nr + 1) % _NUM_TESTS; - g_tms.test_int = 0; - printf("changing test to %s\r\n", test_names[g_tms.test_nr]); -} - -static void test_user_led(void) -{ - printf("blinking User LED\r\n"); - - gpio_set_pin_function(PIN_PC26, GPIO_PIN_FUNCTION_OFF); - gpio_set_pin_direction(PIN_PC26, GPIO_DIRECTION_OUT); - gpio_set_pin_level(PIN_PC26, true); - delay_ms(BLINK_MS); - gpio_set_pin_level(PIN_PC26, false); -} - -static void test_led(void) -{ - printf("blinking Slot LED\r\n"); - - g_tms.ncn.led = true; - ncn8025_set(g_tms.slot, &g_tms.ncn); - delay_ms(BLINK_MS); - g_tms.ncn.led = false; - ncn8025_set(g_tms.slot, &g_tms.ncn); -} - -static enum ncn8025_sim_voltage voltage[3] = { SIM_VOLT_1V8, SIM_VOLT_3V0, SIM_VOLT_5V0 }; -static const char *voltage_name[3] = { "1.8", "3.0", "5.0" }; - -static void ncn_change_voltage(enum ncn8025_sim_voltage vsel) -{ - /* first disable the output; VSEL changes require output to be disabled */ - g_tms.ncn.cmdvcc = false; - ncn8025_set(g_tms.slot, &g_tms.ncn); - - /* then re-enable it with the new voltage setting */ - g_tms.ncn.vsel = vsel; - g_tms.ncn.cmdvcc = true; - ncn8025_set(g_tms.slot, &g_tms.ncn); -} - -static void test_voltage(void) -{ - printf("Testing Voltage %s\r\n", voltage_name[g_tms.test_int]); - - ncn_change_voltage(voltage[g_tms.test_int]); - g_tms.test_int = (g_tms.test_int+1) % 3; -} - -static enum ncn8025_sim_clkdiv clk_div[4] = { SIM_CLKDIV_8, SIM_CLKDIV_4, SIM_CLKDIV_2, SIM_CLKDIV_1 }; -static const uint8_t clk_div_val[4] = { 8, 4, 2, 1 }; - -static void test_clock(void) -{ - printf("Testing Clock Divider %u\r\n", clk_div_val[g_tms.test_int]); - g_tms.ncn.cmdvcc = true; - g_tms.ncn.clkdiv = clk_div[g_tms.test_int]; - ncn8025_set(g_tms.slot, &g_tms.ncn); - g_tms.test_int = (g_tms.test_int+1) % 4; -} - -static void test_rst(void) -{ - printf("blinking RST\r\n"); - - /* well-defined voltage for LED brightness */ - ncn_change_voltage(SIM_VOLT_3V0); - - g_tms.ncn.cmdvcc = true; - g_tms.ncn.rstin = true; - ncn8025_set(g_tms.slot, &g_tms.ncn); - - delay_ms(BLINK_MS); - - g_tms.ncn.rstin = false; - ncn8025_set(g_tms.slot, &g_tms.ncn); -} - -#ifndef SIM7_IO -#define SIM7_IO PIN_PB21 -#endif -static const enum gpio_port sim_io_gpio[] = { SIM0_IO, SIM1_IO, SIM2_IO, SIM3_IO, - SIM4_IO, SIM5_IO, SIM6_IO, SIM7_IO }; - -static void test_io(void) -{ - enum gpio_port gpio = sim_io_gpio[g_tms.slot]; - printf("blinking I/O\r\n"); - - /* well-defined voltage for LED brightness */ - ncn_change_voltage(SIM_VOLT_3V0); - - gpio_set_pin_function(gpio, GPIO_PIN_FUNCTION_OFF); - gpio_set_pin_direction(gpio, GPIO_DIRECTION_OUT); - gpio_set_pin_level(gpio, false); - delay_ms(BLINK_MS); - gpio_set_pin_level(gpio, true); - - /* FIXME: restore tack to original function! */ - //gpio_set_pin_function(sim_io_gpio[g_tms.slot], GPIO_PIN_FUNCTION_OFF); -} - -typedef void (*test_fn)(void); -static const test_fn test_functions[_NUM_TESTS] = { - [TEST_USER_LED] = test_user_led, - [TEST_LED] = test_led, - [TEST_VOLTAGE] = test_voltage, - [TEST_CLOCK] = test_clock, - [TEST_RST] = test_rst, - [TEST_IO] = test_io, -}; - -static void execute_test(void) -{ - printf("(%u) %-10s: ", g_tms.slot, test_names[g_tms.test_nr]); - test_functions[g_tms.test_nr](); -} - -static int wait_for_key_and_process(void) -{ - int c; - - do { - } while (!usart_async_rings_is_rx_not_empty(&UART_debug)); - - c = getchar(); - if (c < 0) - return -1; - - switch (c) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - set_slot(c - '0'); - execute_test(); - break; - case 'n': - case 'N': - next_test(); - execute_test(); - break; - case 'Q': - case 'q': - printf("Leaving Test Mode\r\n"); - return -1; - case ' ': - execute_test(); - break; - } - return 0; -} - -DEFUN(testmode_fn, cmd_testmode, - "testmode", "Enter board testing mode (Use `Q` to exit)") -{ - printf("Manual test mode. 'Q': exit, 'N': next test, SPACE: re-run, '0'-'7': slot\r\n"); - - printf("SPACE will start the current test (%s)\r\n", test_names[g_tms.test_nr]); - while (1) { - if (wait_for_key_and_process() < 0) - break; - } -} - -void testmode_init(void) -{ - command_register(&cmd_testmode); -} diff --git a/sysmoOCTSIM/stdio_start.c b/sysmoOCTSIM/stdio_start.c index 8a15c88..63e125d 100644 --- a/sysmoOCTSIM/stdio_start.c +++ b/sysmoOCTSIM/stdio_start.c @@ -9,6 +9,7 @@ #include "atmel_start.h" #include "stdio_start.h" +#ifdef ENABLE_DBG_UART7 static void UART_debug_rx_cb(const struct usart_async_rings_descriptor *const io_descr) { } @@ -19,3 +20,4 @@ usart_async_rings_enable(&UART_debug); stdio_io_init(&UART_debug.io); } +#endif -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I1c18459d7e43e6fbd1022fabb52138904f2bf480 Gerrit-Change-Number: 16254 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:39:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 26 Nov 2019 18:39:17 +0000 Subject: Change in osmo-ccid-firmware[master]: prettier slot bitmask code References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16255 ) Change subject: prettier slot bitmask code ...................................................................... prettier slot bitmask code Change-Id: Iaeb97a12f04c6f07ab59b290bad5519b45300916 --- M sysmoOCTSIM/main.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/55/16255/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 5c06526..2603360 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -272,8 +272,8 @@ for(int i = 0; i <8; i++) { uint8_t byteidx = i >> 2; - uint8_t old_bit = old_bm & (1 << i); - uint8_t new_bit = new_bm & (1 << i); + uint8_t old_bit = (old_bm >> i) & 1; + uint8_t new_bit = (new_bm >> i) & 1; uint8_t bv; if (old_bit == new_bit && new_bit == 0) bv = 0x00; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16255 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iaeb97a12f04c6f07ab59b290bad5519b45300916 Gerrit-Change-Number: 16255 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 18:52:48 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 26 Nov 2019 18:52:48 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... Patch Set 2: (1 comment) I'm not setting /proc/sys/net/ip_forward because apparently it is already set somehow to 1 and I didn't require doing it. Maybe we have some file manually in there already enabled, I'll check. Or maybe it's enabled by default in debian because anyway iptables default forward policy to drop makes the trick. https://gerrit.osmocom.org/c/osmo-ci/+/16226/2/ansible/roles/gsm-tester-network/defaults/main.yml File ansible/roles/gsm-tester-network/defaults/main.yml: https://gerrit.osmocom.org/c/osmo-ci/+/16226/2/ansible/roles/gsm-tester-network/defaults/main.yml at 3 PS2, Line 3: bts_interface: enp2s0 : gw_interface: enp1s0 > both should be eth1 as the docs sad. [?] In that case I should update the docs, because this matches better current debian stable. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 18:52:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: lynxis lazus Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:10:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:10:56 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: Add card_uart driver for ASF4 USART In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15723 ) Change subject: WIP: Add card_uart driver for ASF4 USART ...................................................................... Patch Set 6: normally we would now merge all (most of) the later bits for the cuart_driver_asf4_usart_async.c into this patch and remove the WIP. Not sure if this is feasible here. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15723 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9a141e9d2125fbfc992ad51aa4b11a39ee186607 Gerrit-Change-Number: 15723 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Assignee: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:10:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:11:46 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:11:46 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: attempt to use iso7816_fsm + Cuart from firmware In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15724 ) Change subject: WIP: attempt to use iso7816_fsm + Cuart from firmware ...................................................................... Patch Set 6: same here. Ideally there's one commit that contains everything in terms of iso7816_fsm + cuart integration into the firmware, at least up to some kind of initial / intermediate working stage? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15724 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I1d7c9371406ecfadc565fdf047dd935eceeee48f Gerrit-Change-Number: 15724 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Assignee: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:11:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:12:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:12:22 +0000 Subject: Change in osmo-ccid-firmware[master]: prevent uart interrupts before having proper structs In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16236 ) Change subject: prevent uart interrupts before having proper structs ...................................................................... Patch Set 1: Code-Review+2 that's a nice, "atomic" one-feature commit. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I177b182e5c693da34183e9066351e6930c61e4a6 Gerrit-Change-Number: 16236 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:12:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:14:10 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:14:10 +0000 Subject: Change in osmo-ccid-firmware[master]: setparameters/PPS works In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237 ) Change subject: setparameters/PPS works ...................................................................... Patch Set 1: (3 comments) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237/1/ccid_common/ccid_device.c File ccid_common/ccid_device.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237/1/ccid_common/ccid_device.c at 27 PS1, Line 27: // if (in->bmTCCKST0 & 0xFD) : // return -11; : // 6.1.7 say Osmocom uses mainly kernel coding style and hence /* style comments. https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237/1/ccid_common/iso7816_fsm.c File ccid_common/iso7816_fsm.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237/1/ccid_common/iso7816_fsm.c at 383 PS1, Line 383: // struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); remove? https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237/1/ccid_common/iso7816_fsm.c at 389 PS1, Line 389: break; remove? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I2e226b0033f8a147fad60a33a63cc45ee9adc756 Gerrit-Change-Number: 16237 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:14:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:18:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:18:31 +0000 Subject: Change in osmo-ccid-firmware[master]: make it work, async uart (mode 0x1/0x7 does not matter), requires delay In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235 ) Change subject: make it work, async uart (mode 0x1/0x7 does not matter), requires delay ...................................................................... Patch Set 1: (6 comments) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/ccid_common/ccid_slot_fsm.c File ccid_common/ccid_slot_fsm.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/ccid_common/ccid_slot_fsm.c at 205 PS1, Line 205: / if (cs->slot_nr == 0) { : // cs->icc_present = true; : // devname = "/dev/ttyUSB5"; : // } that's what we have revision control for, so typically we don't want to merge commits that add commented-out parts of the original code.. Also, it will likely break the operation on the host side? In that case a more generic solution must be found. https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/sysmoOCTSIM/cuart_driver_asf4_usart_async.c File sysmoOCTSIM/cuart_driver_asf4_usart_async.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/sysmoOCTSIM/cuart_driver_asf4_usart_async.c at 167 PS1, Line 167: let's please use /* comments all over the code, thanks. https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/sysmoOCTSIM/gcc/Makefile File sysmoOCTSIM/gcc/Makefile: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/sysmoOCTSIM/gcc/Makefile at 12 PS1, Line 12: -g3 -Wall -c -std=gnu99 $(CFLAGS_CPU) maybe a separate commit with rationale? https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/sysmoOCTSIM/libosmo_emb.c File sysmoOCTSIM/libosmo_emb.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/sysmoOCTSIM/libosmo_emb.c at 163 PS1, Line 163: /* timer */ might also be a separate commit? or some kind of #define that you can enable at compile time to decide if logging shall be used or not? https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/sysmoOCTSIM/main.c File sysmoOCTSIM/main.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/sysmoOCTSIM/main.c at 109 PS1, Line 109: see other comment about not commenting out parts of the original code https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/sysmoOCTSIM/usb_descriptors.c File sysmoOCTSIM/usb_descriptors.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235/1/sysmoOCTSIM/usb_descriptors.c at a182 PS1, Line 182: , maybe do the descriptor related changes as separate commit (or even multiple), stating the rationale for the respective change? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia9d3b099181c24feabdb6a5fddb8db6c44efb72d Gerrit-Change-Number: 16235 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:18:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:19:04 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:19:04 +0000 Subject: Change in osmo-ccid-firmware[master]: attempt at handling card insertion/removal In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16238 ) Change subject: attempt at handling card insertion/removal ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16238 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib1a9a9c5cfb8c22cc3b885bc30a349e0f0145630 Gerrit-Change-Number: 16238 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:19:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:19:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:19:29 +0000 Subject: Change in osmo-ccid-firmware[master]: additional descriptor fixes In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16239 ) Change subject: additional descriptor fixes ...................................................................... Patch Set 1: what kind of fixes specifically? commitlog --verbose please, thanks! -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16239 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I5ebe907b3c35107e5a50cbc65835aca75e617c41 Gerrit-Change-Number: 16239 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:19:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:19:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:19:59 +0000 Subject: Change in osmo-ccid-firmware[master]: proper sercom config for the other 6 slots In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16240 ) Change subject: proper sercom config for the other 6 slots ...................................................................... Patch Set 1: what is "proper"? Not a rherthorical question. I'd like to be able to read that kind of information from the commitlog. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I266014e4d3ff09be9c5cdd5a686d6d2f5668145a Gerrit-Change-Number: 16240 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:19:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:20:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:20:07 +0000 Subject: Change in osmo-ccid-firmware[master]: assert on free in interrupt, too In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16241 ) Change subject: assert on free in interrupt, too ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I825496c81c2259f4af7f80089a0b047c5600a211 Gerrit-Change-Number: 16241 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:20:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:20:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:20:11 +0000 Subject: Change in osmo-ccid-firmware[master]: disable talloc_memlimit() and use existing msgb_context (pool) In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16242 ) Change subject: disable talloc_memlimit() and use existing msgb_context (pool) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I7d3a00ea4581b4f01e72294ac4e810e54c410e24 Gerrit-Change-Number: 16242 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:20:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:20:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:20:41 +0000 Subject: Change in osmo-ccid-firmware[master]: dbg In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16243 ) Change subject: dbg ...................................................................... Patch Set 1: Code-Review-1 can we please have a proper commitlog describing what it does? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I4340cb53f0f903842eb1c4d60a36d44ac9e5cbde Gerrit-Change-Number: 16243 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:20:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:21:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:21:39 +0000 Subject: Change in osmo-ccid-firmware[master]: better error handling In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16244 ) Change subject: better error handling ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16244/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16244/1//COMMIT_MSG at 7 PS1, Line 7: better error handling in which part of the code? Looks like it's primarily about CCID OUT parsing, then let's state at least that here. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9983c2f58c7f420a0132d186f344ace1de616ba1 Gerrit-Change-Number: 16244 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:21:39 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:22:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:22:31 +0000 Subject: Change in osmo-ccid-firmware[master]: fix power descriptor value In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16245 ) Change subject: fix power descriptor value ...................................................................... Patch Set 1: might be worth to add a TODO/FIXME to commitlog and/or code about the USB spec requiring us to offer at least one configuration (possibly with 0 interfaces) that uses <= 100mA. The device must not do anything but enumerate in that configuration. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id7231c2315b141d2f6e88a0ddd4eca3b9384ecc8 Gerrit-Change-Number: 16245 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:22:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:23:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:23:13 +0000 Subject: Change in osmo-ccid-firmware[master]: fsm completion event handling from main loop In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16246 ) Change subject: fsm completion event handling from main loop ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16246/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16246/1//COMMIT_MSG at 7 PS1, Line 7: fsm completion event handling from main loop Given our talks in recent weeks I know what you mean by this ,but it could deserve a bit more verbosity in the commitlog for everyone elase who was not part of that discussion. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: If71a37dcaa5162c18d83e4b2a0cdae69574b92d9 Gerrit-Change-Number: 16246 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:23:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:23:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:23:24 +0000 Subject: Change in osmo-ccid-firmware[master]: add a note for D=64 pecularities In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16247 ) Change subject: add a note for D=64 pecularities ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3da1f0172737c8208325a6ec5aff72fa68355963 Gerrit-Change-Number: 16247 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:23:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:23:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:23:37 +0000 Subject: Change in osmo-ccid-firmware[master]: pps warning In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16248 ) Change subject: pps warning ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie0cbca9c901643268adddc69c08be494432a3235 Gerrit-Change-Number: 16248 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:23:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:24:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:24:24 +0000 Subject: Change in osmo-ccid-firmware[master]: boost the uart interrupt priority In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16249 ) Change subject: boost the uart interrupt priority ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16249/1/sysmoOCTSIM/main.c File sysmoOCTSIM/main.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16249/1/sysmoOCTSIM/main.c at 1190 PS1, Line 1190: for(int i = 0; i <= 136; i++) : NVIC_SetPriority(i, 2); : for(int i = 46; i <= 77; i++) : NVIC_SetPriority(i, 1); let's do this with proper indenting as well as not using magic nubmers but the respective #defines for the interrupt nubmrs? Possibly also factoring in the NR_UARTS or the like? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic1873922c042c45335320bdb669cf2a9346eaa81 Gerrit-Change-Number: 16249 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:24:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:24:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:24:39 +0000 Subject: Change in osmo-ccid-firmware[master]: the magic sauce that makes it work In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16250 ) Change subject: the magic sauce that makes it work ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I25ba236b5a3a2c876ace4ca4398061889b4a9bff Gerrit-Change-Number: 16250 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:24:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:26:28 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:26:28 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart cleanup In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16251 ) Change subject: cuart cleanup ...................................................................... Patch Set 1: (1 comment) commit log too short. I also think it's not just a cleanup, but actually mixes code cleanup with addition of orthogonal new features. Should be separate. https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16251/1/ccid_common/cuart.h File ccid_common/cuart.h: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16251/1/ccid_common/cuart.h at 29 PS1, Line 29: CUART_CTL_SET_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ that pure renaming of existinv values (CLOCK_FREQ->SET_CLOCK_FREQ, CTL_FD->CTL_SET_FD) could be a separate patch that precedes the another which adds new functionality like get_baudrate and get_clock_Freq -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia5b66a86f0f53e5123139c3c5047f70582d1bf6e Gerrit-Change-Number: 16251 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:26:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:27:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:27:03 +0000 Subject: Change in osmo-ccid-firmware[master]: remove old uart commands In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16252 ) Change subject: remove old uart commands ...................................................................... Patch Set 1: best to remove them (as a separate "remove" commit like here) at the point where it was commented out with // before. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16252 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I91fff5d8c296661bcef8576244079f3a5fc8800b Gerrit-Change-Number: 16252 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:27:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:27:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:27:30 +0000 Subject: Change in osmo-ccid-firmware[master]: first attempt at timeout handling In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16253 ) Change subject: first attempt at timeout handling ...................................................................... Patch Set 1: might be relevant to state which timeout where in the commitlog -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I96315fed5696ccd75318ebd88cb7725ed7568c07 Gerrit-Change-Number: 16253 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:27:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:28:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:28:13 +0000 Subject: Change in osmo-ccid-firmware[master]: enable the final slot In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16254 ) Change subject: enable the final slot ...................................................................... Patch Set 1: commitlog could also be more verbose, stating that SERCOM7 is shared between two functions, and that there's now a #define (with which name), ... -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I1c18459d7e43e6fbd1022fabb52138904f2bf480 Gerrit-Change-Number: 16254 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:28:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Nov 26 23:28:26 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 26 Nov 2019 23:28:26 +0000 Subject: Change in osmo-ccid-firmware[master]: prettier slot bitmask code In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16255 ) Change subject: prettier slot bitmask code ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16255 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iaeb97a12f04c6f07ab59b290bad5519b45300916 Gerrit-Change-Number: 16255 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 26 Nov 2019 23:28:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 00:17:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 00:17:25 +0000 Subject: Change in osmo-e1-recorder[master]: make e1cap format portable In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16186 ) Change subject: make e1cap format portable ...................................................................... Patch Set 4: ideally it would of course be nice to auto-detect the format based on some heuristics, sicne we already have some old traces in both 32bit and 64bit timeval versions... But I'm not sure if it's worth spending time on it. -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I0d22ad8f772d173c2252c2f6c562faee2e578806 Gerrit-Change-Number: 16186 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Reviewer: tnt Gerrit-Comment-Date: Wed, 27 Nov 2019 00:17:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 00:17:43 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 00:17:43 +0000 Subject: Change in osmo-e1-recorder[master]: e1cap_dump: fix superchannel without pcap output In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16187 ) Change subject: e1cap_dump: fix superchannel without pcap output ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16187 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I458c02b4619b6fb2c7d30b1ce3bbac86243a6977 Gerrit-Change-Number: 16187 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 00:17:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 00:17:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 00:17:44 +0000 Subject: Change in osmo-e1-recorder[master]: e1cap_dump: fix superchannel without pcap output In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16187 ) Change subject: e1cap_dump: fix superchannel without pcap output ...................................................................... e1cap_dump: fix superchannel without pcap output We have to check if g_pcap_fd is >= 0,as we initialize it to -1. Change-Id: I458c02b4619b6fb2c7d30b1ce3bbac86243a6977 --- M src/e1cap_dump.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved laforge: Verified diff --git a/src/e1cap_dump.c b/src/e1cap_dump.c index 027aa82..c172b55 100644 --- a/src/e1cap_dump.c +++ b/src/e1cap_dump.c @@ -78,7 +78,7 @@ static void handle_hdlc_frame_content(const uint8_t *data, unsigned int len, void *priv) { - if (g_pcap_fd && len >= 4) { + if (g_pcap_fd >= 0 && len >= 4) { uint8_t *cur = msgb_put(g_pcap_msg, len-2); memcpy(cur, data, len-2); printf("==> %s\n", msgb_hexdump(g_pcap_msg)); -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16187 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I458c02b4619b6fb2c7d30b1ce3bbac86243a6977 Gerrit-Change-Number: 16187 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 00:18:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 00:18:21 +0000 Subject: Change in osmo-ci[master]: ansible: Fix several file permission mask format In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16234 ) Change subject: ansible: Fix several file permission mask format ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I91008927c50016a837420c4249b5f69b9153572e Gerrit-Change-Number: 16234 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 00:18:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 00:19:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 00:19:08 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... Patch Set 2: > maybe it's enabled by default in debian because anyway iptables > default forward policy to drop makes the trick. for sure that is not the case. Debian always shipped and ships with forwarding disabled by default. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 00:19:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 00:19:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 00:19:29 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: cast ptrdiff value to fix printf format In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16215 ) Change subject: scheduler_trx.c: cast ptrdiff value to fix printf format ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 Gerrit-Change-Number: 16215 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 00:19:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 00:19:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 00:19:30 +0000 Subject: Change in osmo-bts[master]: scheduler_trx.c: cast ptrdiff value to fix printf format In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16215 ) Change subject: scheduler_trx.c: cast ptrdiff value to fix printf format ...................................................................... scheduler_trx.c: cast ptrdiff value to fix printf format On an ARM toolchain: scheduler_trx.c:294:3: warning: format '%ld' expects argument of type 'long int', but argument 10 has type 'int' Let's cast it to long int to make sure correct size is applied in all platforms. Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: 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 b54c35b..07ee9da 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -292,7 +292,7 @@ /* check validity of message */ if (rc < 0) { LOGL1S(DL1P, LOGL_FATAL, l1t, tn, chan, fn, "Prim invalid length, please FIX! " - "(len=%ld)\n", msg->tail - msg->l2h); + "(len=%ld)\n", (long)(msg->tail - msg->l2h)); /* free message */ msgb_free(msg); goto no_msg; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I701b3dbc4e84db21cf02305d374b0df731e70313 Gerrit-Change-Number: 16215 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 01:12:01 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 01:12:01 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... Patch Set 11: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/11/include/osmocom/hlr/logging.h File include/osmocom/hlr/logging.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/11/include/osmocom/hlr/logging.h at 11 PS11, Line 11: DMSLKP, I don't like this name. It reads like "Measle Key Performance" or "M-Slick-P" or "MS Lock-up". There is no problem with having a long log category name. We have DLGLOBAL, and even if DMSLOOKUP is one letter more, I prefer having a readable log category than saving three vocals. I'm all for 's book of longest category name. If reviewers insist on a shorter name, then let's rather do DLOOKUP or DMSLOOK. I don't see a reason why we need to, though. Let's not be too eager to apply every review bike shed to the patches immediately, let's rather focus on the design of the system. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 11 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 01:12:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 02:17:00 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 02:17:00 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup and mDNS implementation In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup and mDNS implementation ...................................................................... Patch Set 11: (7 comments) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h File include/osmocom/mslookup/mdns_sock.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 30 PS9, Line 30: int (*cb)(struct osmo_fd *fd, unsigned int what), > > the API doc in mdns_sock.c hints at it, but I'm adding a comment there. [?] (sorry for confusion, I meant a gerrit review comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mdns_sock.h at 32 PS9, Line 32: int osmo_mdns_sock_send(const struct osmo_mdns_sock *mdns_sock, struct msgb *msg); > Looking at sendto being used in libosmocore, we don't implicitly close the socket. [?] does feel slightly weird to get a const of something used to send a message, but it is in fact appropriate here. +1 https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h File include/osmocom/mslookup/mslookup.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/include/osmocom/mslookup/mslookup.h at 113 PS9, Line 113: int osmo_mslookup_query_from_domain_str(struct osmo_mslookup_query *q, const char *domain); > Done (Neels renamed it, just replying so I can mark this as "resolved" in gerrit. [?] (btw, I never bother with those "Resolved" tick marks in gerrit at all... they sometimes get set automatically, apparently, but I feel like we don't need to pay attention to them) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c File src/mslookup/mdns.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 127 PS9, Line 127: osmo_sockaddr_str_from_32(sockaddr_str, *(uint32_t *)rec->data, 0); > osmo_sockaddr_str_from_32 expects the input to be network-byte-order. [?] pespin's point here is that the beginning of the uint32_t may be at a memory address that doesn't match a word aligned position. So the CPU expects a uint32_t to start at an address that is a multiple of 4, which is why we need to first copy the four bytes to a local variable before feeding to osmo_sockaddr_str_from_32(). Might even qualify for an osmo_sockaddr_str_from_32p() as in a pointer which takes care of aligning? I guess _from_32() should have taken a pointer as argument from the start :/ For a moment there I thought passing as a uint32_t argument to a func should imply copying; checking: #include #include uint8_t bytes[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; void uint32_func(uint32_t val) { printf("%04x\n", val); } int main() { int i; for (i = 0; i < 4; i++) uint32_func(*(uint32_t*)(&bytes[i])); return 0; } gcc -o x -fsanitize=address -fsanitize=undefined x.c ./x 4030201 x.c:15:17: runtime error: load of misaligned address 0x5609c31d00a1 for type 'uint32_t', which requires 4 byte alignment 0x5609c31d00a1: note: pointer points here 00 00 00 01 02 03 04 05 06 07 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ 5040302 6050403 7060504 So we need to align. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_msg.c File src/mslookup/mdns_msg.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_msg.c at 114 PS9, Line 114: if (osmo_mdns_rfc_record_encode(ctx, msg, &rec) != 0) > I'm a bit undecided about this, since all osmo_mdns_rfc_*_encode functions with a msgb argument are [?] Let's keep the name "_encode", not add "_append". For exactly those examples that you show; no other function encoding to the end of a msgb has "append" in its name. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c File src/mslookup/mdns_record.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns_record.c at 35 PS9, Line 35: ret->data = (uint8_t *)talloc_asprintf(ctx, "%c%s=%s", (char)len, key, value); > Yes, I'm sure that this is correct. [?] maybe they were writing the DNS PoC in Turbo Pascal or something. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mslookup.c at 148 PS9, Line 148: if (result->host_v4.ip[0]) { > NULL character You mean the nul character :) We won't get around pointer or array arithmetic, after all it is a pointer to a char array. I've gotten "what's this?" review before for if (*str) and that's why I used if (str[0]) Would you prefer an osmo_str_is_empty(str) macro? IMHO we don't need that and C string logic is common enough that we can do either *str or str[0] or *str != '\0' by author's preference. IMHO this code is obviously printing a v4 addr when it is set, I'm leaving it like it is... -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 11 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 02:17:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Comment-In-Reply-To: osmith Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 06:13:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 06:13:30 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 to look at the new patch set (#6). Change subject: db v4: add column last_lu_seen_ps ...................................................................... db v4: add column last_lu_seen_ps Location Updating procedures from both CS and PS overwrite the same last_lu_seen field of a subscriber. For upcoming D-GSM it will be important to distinguish those, because only CS attaches qualify for MSISDN lookup. Add column last_lu_seen_ps, and upon PS LU, do not overwrite last_lu_seen, so that last_lu_seen now only reflects CS LU. In the VTY, dump both LU dates distinctively. Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba --- M include/osmocom/hlr/db.h M sql/hlr.sql M src/db.c M src/db_hlr.c M src/hlr_vty_subscr.c M tests/db_upgrade/db_upgrade_test.ok 6 files changed, 76 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/01/16201/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 06:13:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 06:13:30 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup abstract client In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 to look at the new patch set (#12). Change subject: add libosmo-mslookup abstract client ...................................................................... add libosmo-mslookup abstract client mslookup is a key concept in Distributed GSM, which allows querying the current location of a subscriber in a number of cooperating but independent core network sites, by arbitrary service names and by MSISDN/IMSI. Add the abstract mslookup client library. An actual lookup method (besides mslookup_client_fake.c) is added in a subsequent patch. For a detailed overview of this and upcoming patches, please see the elaborate comment at the top of mslookup.c. Add as separate library, libosmo-mslookup, to allow adding D-GSM capability to arbitrary client programs. osmo-hlr will be the mslookup server, added in a subsequent patch. osmo-hlr itself will also use this library and act as an mslookup client, when requesting the home HLR for locally unknown IMSIs. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 23 files changed, 1,620 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/12 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 12 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 06:13:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 06:13:30 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 to look at the new patch set (#12). Change subject: add osmo-mslookup-client program ...................................................................... add osmo-mslookup-client program Standalone program using libosmo-mslookup to easily integrate with programs that want to connect services (SIP, SMS,...) to the current location of a subscriber. Also useful for manual testing. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 --- M .gitignore M configure.ac M contrib/Makefile.am A contrib/dgsm/Makefile.am A contrib/dgsm/osmo-mslookup-pipe.py A contrib/dgsm/osmo-mslookup-socket.py M src/mslookup/Makefile.am A src/mslookup/osmo-mslookup-client.c 8 files changed, 950 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/03/16203/12 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 12 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 06:13:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 06:13:30 +0000 Subject: Change in osmo-hlr[master]: refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 to look at the new patch set (#12). Change subject: refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt ...................................................................... refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt These are seemingly orthogonal changes in one patch, because they are in fact sufficiently intertwined that we are not willing to spend the time to separate them. They are also refactoring changes, unlikely to make sense on their own. ** lu_fsm: Attempting to make luop.c keep state about incoming GSUP requests made me find shortcomings in several places: - since it predates osmo_fsm, it is a state machine that does not strictly enforce the order of state transitions or the right sequence of incoming events. - several places OSMO_ASSERT() on data received from the network. - modifies the subscriber state before a LU is accepted. - dead code about canceling a subscriber in a previous VLR. That would be a good thing to actually do, which should also be trivial now that we record vlr_name and sgsn_name, but I decided to remove the dead code for now. To both step up the LU game *and* make it easier for me to integrate osmo_gsup_req handling, I decided to create a lu_fsm, drawing from my, by now, ample experience of writing osmo_fsms. ** osmo_gsup_req: Prepare for D-GSM, where osmo-hlr will do proxy routing for remote HLRs / communicate with remote MSCs via a proxy: a) It is important that a response that osmo-hlr generates and that is sent back to a requesting MSC contains all IEs that are needed to route it back to the requester. Particularly source_name must become destination_name in the response to be able to even reach the requesting MSC. Other fields are also necessary to match, which were so far taken care of in individual numerous code paths. b) For some operations, the response to a GSUP request is generated asynchronously (like Update Location Request -> Response, or taking the response from an EUSE, or the upcoming proxying to a remote HLR). To be able to feed a request message's information back into the response, we must thus keep the request data around. Since struct osmo_gsup_message references a lot of external data, usually with pointers directly into the received msgb, it is not so trivial to pass GSUP message data around asynchronously, on its own. osmo_gsup_req is the combined solution for both a and b: it keeps all data for a GSUP message by taking ownership of the incoming msgb, and it provides an explicit API "forcing" callers to respond with osmo_gsup_req_respond(), so that all code paths trivially are definitely responding with the correct IEs set to match the request's routing (by using osmo_gsup_make_response() recently added to libosmocore). Adjust all osmo-hlr code paths to use *only* osmo_gsup_req to respond to incoming requests received on the GSUP server (above LU code being one of them). In fact, the same should be done on the client side. Hence osmo_gsup_req is implemented in a server/client agnostic way, and is placed in libosmo-gsupclient. As soon as we see routing errors in complex GSUP setups, using osmo_gsup_req in the related GSUP client is likely to resolve those problems without much thinking required beyond making all code paths use it. libosmo-gsupclient is hence added to osmo-hlr binary's own library dependencies. It would have been added by the D-GSM proxy routing anyway, we are just doing it a little sooner. ** global_title.c / osmo_gt: We so far handle a Global Title a.k.a. an IPA unit name as pointer + size, or as just pointer with implicit talloc size. To ease working with GSUP peer identification data, I require: - a non-allocated storage of a Global Title. It brings the drawback of being size limited, but our current implementation is anyway only able to handle MSC and SGSN names of 31 characters (see struct hlr_subscriber). - a single-argument handle for Global Title, - easy to use utility functions like osmo_gt_name(), osmo_gt_cmp(), and copying by simple assignment, a = b. Hence this patch adds a osmo_gt in global_title.h and global_title.c. Heavily used in LU and osmo_gsup_req. Depends: libosmocore Id9692880079ea0f219f52d81b1923a76fc640566 Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 --- M include/Makefile.am A include/osmocom/gsupclient/global_title.h A include/osmocom/gsupclient/gsup_req.h M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/db.h M include/osmocom/hlr/gsup_router.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/lu_fsm.h D include/osmocom/hlr/luop.h M src/Makefile.am M src/db.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/gsupclient/Makefile.am A src/gsupclient/global_title.c M src/gsupclient/gsup_client.c A src/gsupclient/gsup_req.c M src/hlr.c M src/hlr_ussd.c M src/logging.c A src/lu_fsm.c D src/luop.c M tests/db/Makefile.am M tests/db/db_test.c M tests/db/db_test.err M tests/gsup_server/Makefile.am M tests/test_nodes.vty 32 files changed, 1,225 insertions(+), 904 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/16205/12 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 12 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 06:13:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 06:13:30 +0000 Subject: Change in osmo-hlr[master]: D-GSM 1/n: add mslookup server in osmo-hlr In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 to look at the new patch set (#12). Change subject: D-GSM 1/n: add mslookup server in osmo-hlr ...................................................................... D-GSM 1/n: add mslookup server in osmo-hlr Implement the mslookup server to service remote mslookup requests. This patch merely adds the logic to answer incoming mslookup requests, an actual method to receive requests (mDNS) follows in a subsequent patch. - API to configure service names and addresses for the local site (per MSC). - determine whether a subscriber is on a local MSC (checking the local proxy will be added in subsequent patch that adds proxy capability). - VTY config follows in a subsequent patch. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b --- M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/hlr.h A include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/timestamp.h M src/Makefile.am M src/hlr.c A src/mslookup_server.c A src/timestamp.c 8 files changed, 458 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/09/16209/12 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b Gerrit-Change-Number: 16209 Gerrit-PatchSet: 12 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 06:13:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 06:13:30 +0000 Subject: Change in osmo-hlr[master]: add mslookup_manual_test In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 to look at the new patch set (#12). Change subject: add mslookup_manual_test ...................................................................... add mslookup_manual_test This can be used for manually testing proxy routing. It is not run as part of the testsuite. Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 --- M .gitignore M configure.ac M tests/Makefile.am A tests/mslookup_manual_test/Makefile.am A tests/mslookup_manual_test/fake_msc.c A tests/mslookup_manual_test/osmo-hlr-1.cfg A tests/mslookup_manual_test/osmo-hlr-2.cfg A tests/mslookup_manual_test/run.sh 8 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/10/16210/12 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 Gerrit-Change-Number: 16210 Gerrit-PatchSet: 12 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 06:13:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 06:13:30 +0000 Subject: Change in osmo-hlr[master]: adoc: add D-GSM chapter to osmohlr-usermanual In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16211 to look at the new patch set (#12). Change subject: adoc: add D-GSM chapter to osmohlr-usermanual ...................................................................... adoc: add D-GSM chapter to osmohlr-usermanual Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 --- A doc/manuals/chapters/dgsm.adoc M doc/manuals/osmohlr-usermanual.adoc 2 files changed, 483 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/11/16211/12 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 Gerrit-Change-Number: 16211 Gerrit-PatchSet: 12 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 06:13:34 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 06:13:34 +0000 Subject: Change in osmo-hlr[master]: add mDNS lookup method to libosmo-mslookup References: Message-ID: Hello osmith, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16256 to review the following change. Change subject: add mDNS lookup method to libosmo-mslookup ...................................................................... add mDNS lookup method to libosmo-mslookup Add the first actually useful lookup method to the mslookup library: multicast DNS. The server side is added in a subsequent commit, when the mslookup server is implemented for the osmo-hlr program. Use custom DNS encoding instead of libc-ares (which we use in OsmoSGSN already), because libc-ares is only a DNS client implementation and we will need both client and server. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 --- M .gitignore M include/Makefile.am A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup_client_mdns.h M src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_msg.h A src/mslookup/mdns_record.c A src/mslookup/mdns_record.h A src/mslookup/mdns_rfc.c A src/mslookup/mdns_rfc.h A src/mslookup/mdns_sock.c A src/mslookup/mslookup_client_mdns.c M tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err M tests/testsuite.at 21 files changed, 2,828 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/56/16256/1 diff --git a/.gitignore b/.gitignore index acfea84..eec364a 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,8 @@ tests/db/db_test tests/hlr_vty_test.db* tests/db_upgrade/*.dump +tests/mslookup/mdns_test +tests/mslookup/mslookup_client_mdns_test tests/mslookup/mslookup_client_test tests/mslookup/mslookup_test diff --git a/include/Makefile.am b/include/Makefile.am index 25ed14e..9827950 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,8 +2,10 @@ nobase_include_HEADERS = \ osmocom/gsupclient/gsup_client.h \ + osmocom/mslookup/mdns.h \ + osmocom/mslookup/mdns_sock.h \ osmocom/mslookup/mslookup_client_fake.h \ osmocom/mslookup/mslookup_client.h \ + osmocom/mslookup/mslookup_client_mdns.h \ osmocom/mslookup/mslookup.h \ $(NULL) -nobase_include_HEADERS = osmocom/gsupclient/gsup_client.h diff --git a/include/osmocom/mslookup/mdns.h b/include/osmocom/mslookup/mdns.h new file mode 100644 index 0000000..137a1f0 --- /dev/null +++ b/include/osmocom/mslookup/mdns.h @@ -0,0 +1,36 @@ +/* Copyright 2019 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 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 . + * + */ + +/*! \file mdns.h */ + +#pragma once + +#include +#include + +struct msgb *osmo_mdns_query_encode(void *ctx, uint16_t packet_id, const struct osmo_mslookup_query *query); + +struct osmo_mslookup_query *osmo_mdns_query_decode(void *ctx, const uint8_t *data, size_t data_len, + uint16_t *packet_id); + +struct msgb *osmo_mdns_result_encode(void *ctx, uint16_t packet_id, const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result); + +int osmo_mdns_result_decode(void *ctx, const uint8_t *data, size_t data_len, uint16_t *packet_id, + struct osmo_mslookup_query *query, struct osmo_mslookup_result *result); diff --git a/include/osmocom/mslookup/mdns_sock.h b/include/osmocom/mslookup/mdns_sock.h new file mode 100644 index 0000000..57ea3da --- /dev/null +++ b/include/osmocom/mslookup/mdns_sock.h @@ -0,0 +1,34 @@ +/* Copyright 2019 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 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 +#include + +struct osmo_mdns_sock { + struct osmo_fd osmo_fd; + struct addrinfo *ai; +}; + +struct osmo_mdns_sock *osmo_mdns_sock_init(void *ctx, const char *ip, unsigned int port, + int (*cb)(struct osmo_fd *fd, unsigned int what), + void *data, unsigned int priv_nr); +int osmo_mdns_sock_send(const struct osmo_mdns_sock *mdns_sock, struct msgb *msg); +void osmo_mdns_sock_cleanup(struct osmo_mdns_sock *mdns_sock); diff --git a/include/osmocom/mslookup/mslookup_client_mdns.h b/include/osmocom/mslookup/mslookup_client_mdns.h new file mode 100644 index 0000000..bdefc13 --- /dev/null +++ b/include/osmocom/mslookup/mslookup_client_mdns.h @@ -0,0 +1,36 @@ +/* Copyright 2019 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 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 + +struct osmo_mslookup_client; +struct osmo_mslookup_client_method; + +/*! MS Lookup mDNS server bind default IP. Taken from the Administratevly Scoped block, particularly the Organizational + * Scoped range, https://tools.ietf.org/html/rfc2365 . */ +#define OSMO_MSLOOKUP_MDNS_IP4 "239.192.23.42" +#define OSMO_MSLOOKUP_MDNS_IP6 "ff08::23:42" // <-- TODO: sane? +#define OSMO_MSLOOKUP_MDNS_PORT 4266 + +struct osmo_mslookup_client_method *osmo_mslookup_client_add_mdns(struct osmo_mslookup_client *client, const char *ip, + uint16_t port, int initial_packet_id); + +const struct osmo_sockaddr_str *osmo_mslookup_client_method_mdns_get_bind_addr(struct osmo_mslookup_client_method *dns_method); diff --git a/src/mslookup/Makefile.am b/src/mslookup/Makefile.am index 01be401..63d2d53 100644 --- a/src/mslookup/Makefile.am +++ b/src/mslookup/Makefile.am @@ -7,12 +7,24 @@ AM_CFLAGS = -fPIC -Wall $(PCSC_CFLAGS) $(TALLOC_CFLAGS) $(LIBOSMOCORE_CFLAGS) AM_LDFLAGS = $(COVERAGE_LDFLAGS) +noinst_HEADERS = \ + mdns_msg.h \ + mdns_record.h \ + mdns_rfc.h \ + $(NULL) + lib_LTLIBRARIES = libosmo-mslookup.la libosmo_mslookup_la_SOURCES = \ + mdns.c \ + mdns_msg.c \ + mdns_record.c \ + mdns_rfc.c \ + mdns_sock.c \ mslookup.c \ mslookup_client.c \ mslookup_client_fake.c \ + mslookup_client_mdns.c \ $(NULL) libosmo_mslookup_la_LDFLAGS = -version-info $(LIBVERSION) diff --git a/src/mslookup/mdns.c b/src/mslookup/mdns.c new file mode 100644 index 0000000..05d1283 --- /dev/null +++ b/src/mslookup/mdns.c @@ -0,0 +1,388 @@ +/* mslookup specific functions for encoding and decoding mslookup queries/results into mDNS packets, using the high + * level functions from mdns_msg.c and mdns_record.c to build the request/answer messages. */ + +/* Copyright 2019 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 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 "mdns_msg.h" +#include "mdns_record.h" + +static struct msgb *osmo_mdns_msgb_alloc(const char *label) +{ + return msgb_alloc(1024, label); +} + +/*! Combine the mslookup query service, ID and ID type into a domain string. + * \returns allocated buffer with the resulting domain (i.e. "sip.voice.123.msisdn") on success, NULL on failure. + */ +static char *domain_from_query(void *ctx, const struct osmo_mslookup_query *query) +{ + const char *id; + + /* Get id from query */ + switch (query->id.type) { + case OSMO_MSLOOKUP_ID_IMSI: + id = query->id.imsi; + break; + case OSMO_MSLOOKUP_ID_MSISDN: + id = query->id.msisdn; + break; + default: + LOGP(DMSLOOKUP, LOGL_ERROR, "can't encode mslookup query id type %i", query->id.type); + return NULL; + } + + return talloc_asprintf(ctx, "%s.%s.%s", query->service, id, osmo_mslookup_id_type_name(query->id.type)); +} + +/*! Encode a mslookup query into a mDNS packet. + * \returns msgb, or NULL on error. + */ +struct msgb *osmo_mdns_query_encode(void *ctx, uint16_t packet_id, const struct osmo_mslookup_query *query) +{ + struct osmo_mdns_msg_request req = {0}; + struct msgb *msg = osmo_mdns_msgb_alloc(__func__); + + req.id = packet_id; + req.type = OSMO_MDNS_RFC_RECORD_TYPE_ALL; + req.domain = domain_from_query(ctx, query); + if (!req.domain) + goto error; + if (osmo_mdns_msg_request_encode(ctx, msg, &req)) + goto error; + talloc_free(req.domain); + return msg; +error: + msgb_free(msg); + talloc_free(req.domain); + return NULL; +} + +/*! Decode a mDNS request packet into a mslookup query. + * \param[out] packet_id the result must be sent with the same packet_id. + * \returns allocated mslookup query on success, NULL on error. + */ +struct osmo_mslookup_query *osmo_mdns_query_decode(void *ctx, const uint8_t *data, size_t data_len, + uint16_t *packet_id) +{ + struct osmo_mdns_msg_request *req = NULL; + struct osmo_mslookup_query *query = NULL; + + req = osmo_mdns_msg_request_decode(ctx, data, data_len); + if (!req) + return NULL; + + query = talloc_zero(ctx, struct osmo_mslookup_query); + OSMO_ASSERT(query); + if (osmo_mslookup_query_init_from_domain_str(query, req->domain) < 0) + goto error; + + *packet_id = req->id; + talloc_free(req); + return query; +error: + talloc_free(req); + talloc_free(query); + return NULL; +} + +/*! Parse sockaddr_str from mDNS record, so the mslookup result can be filled with it. + * \param[out] sockaddr_str resulting IPv4 or IPv6 sockaddr_str. + * \param[in] rec single record of the abstracted list of mDNS records + * \returns 0 on success, -EINVAL on error. + */ +static int sockaddr_str_from_mdns_record(struct osmo_sockaddr_str *sockaddr_str, struct osmo_mdns_record *rec) +{ + switch (rec->type) { + case OSMO_MDNS_RFC_RECORD_TYPE_A: + if (rec->length != 4) { + LOGP(DMSLOOKUP, LOGL_ERROR, "unexpected length of A record\n"); + return -EINVAL; + } + osmo_sockaddr_str_from_32(sockaddr_str, *(uint32_t *)rec->data, 0); + break; + case OSMO_MDNS_RFC_RECORD_TYPE_AAAA: + if (rec->length != 16) { + LOGP(DMSLOOKUP, LOGL_ERROR, "unexpected length of AAAA record\n"); + return -EINVAL; + } + osmo_sockaddr_str_from_in6_addr(sockaddr_str, (struct in6_addr*)rec->data, 0); + break; + default: + LOGP(DMSLOOKUP, LOGL_ERROR, "unexpected record type\n"); + return -EINVAL; + } + return 0; +} + +/*! Encode a successful mslookup result, along with the original query and packet_id into one mDNS answer packet. + * + * The records in the packet are ordered as follows: + * 1) "age", ip_v4/v6, "port" (only IPv4 or IPv6 present) or + * 2) "age", ip_v4, "port", ip_v6, "port" (both IPv4 and v6 present). + * "age" and "port" are TXT records, ip_v4 is an A record, ip_v6 is an AAAA record. + * + * \param[in] packet_id as received in osmo_mdns_query_decode(). + * \param[in] query the original query, so we can send the domain back in the answer (i.e. "sip.voice.1234.msisdn"). + * \param[in] result holds the age, IPs and ports of the queried service. + * \returns msg on success, NULL on error. + */ +struct msgb *osmo_mdns_result_encode(void *ctx, uint16_t packet_id, const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + struct osmo_mdns_msg_answer ans = {}; + struct osmo_mdns_record *rec_age = NULL; + struct osmo_mdns_record rec_ip_v4 = {0}; + struct osmo_mdns_record rec_ip_v6 = {0}; + struct osmo_mdns_record *rec_ip_v4_port = NULL; + struct osmo_mdns_record *rec_ip_v6_port = NULL; + struct in_addr rec_ip_v4_in; + struct in6_addr rec_ip_v6_in; + struct msgb *msg = osmo_mdns_msgb_alloc(__func__); + char buf[256]; + + ctx = talloc_named(ctx, 0, "osmo_mdns_result_encode"); + + /* Prepare answer (ans) */ + ans.domain = domain_from_query(ctx, query); + if (!ans.domain) + goto error; + ans.id = packet_id; + INIT_LLIST_HEAD(&ans.records); + + /* Record for age */ + rec_age = osmo_mdns_record_txt_keyval_encode(ctx, "age", "%"PRIu32, result->age); + OSMO_ASSERT(rec_age); + llist_add_tail(&rec_age->list, &ans.records); + + /* Records for IPv4 */ + if (osmo_sockaddr_str_is_set(&result->host_v4)) { + if (osmo_sockaddr_str_to_in_addr(&result->host_v4, &rec_ip_v4_in) < 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "failed to encode ipv4: %s\n", + osmo_mslookup_result_name_b(buf, sizeof(buf), query, result)); + goto error; + } + rec_ip_v4.type = OSMO_MDNS_RFC_RECORD_TYPE_A; + rec_ip_v4.data = (uint8_t *)&rec_ip_v4_in; + rec_ip_v4.length = sizeof(rec_ip_v4_in); + llist_add_tail(&rec_ip_v4.list, &ans.records); + + rec_ip_v4_port = osmo_mdns_record_txt_keyval_encode(ctx, "port", "%"PRIu16, result->host_v4.port); + OSMO_ASSERT(rec_ip_v4_port); + llist_add_tail(&rec_ip_v4_port->list, &ans.records); + } + + /* Records for IPv6 */ + if (osmo_sockaddr_str_is_set(&result->host_v6)) { + if (osmo_sockaddr_str_to_in6_addr(&result->host_v6, &rec_ip_v6_in) < 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "failed to encode ipv6: %s\n", + osmo_mslookup_result_name_b(buf, sizeof(buf), query, result)); + goto error; + } + rec_ip_v6.type = OSMO_MDNS_RFC_RECORD_TYPE_AAAA; + rec_ip_v6.data = (uint8_t *)&rec_ip_v6_in; + rec_ip_v6.length = sizeof(rec_ip_v6_in); + llist_add_tail(&rec_ip_v6.list, &ans.records); + + rec_ip_v6_port = osmo_mdns_record_txt_keyval_encode(ctx, "port", "%"PRIu16, result->host_v6.port); + OSMO_ASSERT(rec_ip_v6_port); + llist_add_tail(&rec_ip_v6_port->list, &ans.records); + } + + if (osmo_mdns_msg_answer_encode(ctx, msg, &ans)) { + LOGP(DMSLOOKUP, LOGL_ERROR, "failed to encode mDNS answer: %s\n", + osmo_mslookup_result_name_b(buf, sizeof(buf), query, result)); + goto error; + } + talloc_free(ctx); + return msg; +error: + msgb_free(msg); + talloc_free(ctx); + return NULL; +} + +static int decode_uint32_t(const char *str, uint32_t *val) +{ + long long int lld; + char *endptr = NULL; + *val = 0; + errno = 0; + lld = strtoll(str, &endptr, 10); + if (errno || !endptr || *endptr) + return -EINVAL; + if (lld < 0 || lld > UINT32_MAX) + return -EINVAL; + *val = lld; + return 0; +} + +static int decode_port(const char *str, uint16_t *port) +{ + uint32_t val; + if (decode_uint32_t(str, &val)) + return -EINVAL; + if (val > 65535) + return -EINVAL; + *port = val; + return 0; +} + +/*! Read expected mDNS records into mslookup result. + * + * The records in the packet must be ordered as follows: + * 1) "age", ip_v4/v6, "port" (only IPv4 or IPv6 present) or + * 2) "age", ip_v4, "port", ip_v6, "port" (both IPv4 and v6 present). + * "age" and "port" are TXT records, ip_v4 is an A record, ip_v6 is an AAAA record. + * + * \param[out] result holds the age, IPs and ports of the queried service. + * \param[in] ans abstracted mDNS answer with a list of resource records. + * \returns 0 on success, -EINVAL on error. + */ +int osmo_mdns_result_from_answer(struct osmo_mslookup_result *result, const struct osmo_mdns_msg_answer *ans) +{ + struct osmo_mdns_record *rec; + char txt_key[64]; + char txt_value[64]; + bool found_age = false; + bool found_ip_v4 = false; + bool found_ip_v6 = false; + struct osmo_sockaddr_str *expect_port_for = NULL; + + result->rc = OSMO_MSLOOKUP_RC_NONE; + + llist_for_each_entry(rec, &ans->records, list) { + switch (rec->type) { + case OSMO_MDNS_RFC_RECORD_TYPE_A: + if (expect_port_for) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "'A' record found, but still expecting a 'port' value first\n"); + return -EINVAL; + } + if (found_ip_v4) { + LOGP(DMSLOOKUP, LOGL_ERROR, "'A' record found twice in mDNS answer\n"); + return -EINVAL; + } + found_ip_v4 = true; + expect_port_for = &result->host_v4; + if (sockaddr_str_from_mdns_record(expect_port_for, rec)) { + LOGP(DMSLOOKUP, LOGL_ERROR, "'A' record with invalid address data\n"); + return -EINVAL; + } + break; + case OSMO_MDNS_RFC_RECORD_TYPE_AAAA: + if (expect_port_for) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "'AAAA' record found, but still expecting a 'port' value first\n"); + return -EINVAL; + } + if (found_ip_v6) { + LOGP(DMSLOOKUP, LOGL_ERROR, "'AAAA' record found twice in mDNS answer\n"); + return -EINVAL; + } + found_ip_v6 = true; + expect_port_for = &result->host_v6; + if (sockaddr_str_from_mdns_record(expect_port_for, rec) != 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "'AAAA' record with invalid address data\n"); + return -EINVAL; + } + break; + case OSMO_MDNS_RFC_RECORD_TYPE_TXT: + if (osmo_mdns_record_txt_keyval_decode(rec, txt_key, sizeof(txt_key), + txt_value, sizeof(txt_value)) != 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "failed to decode txt record\n"); + return -EINVAL; + } + if (strcmp(txt_key, "age") == 0) { + if (found_age) { + LOGP(DMSLOOKUP, LOGL_ERROR, "duplicate 'TXT' record for 'age'\n"); + return -EINVAL; + } + found_age = true; + if (decode_uint32_t(txt_value, &result->age)) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "'TXT' record: invalid 'age' value ('age=%s')\n", txt_value); + return -EINVAL; + } + } else if (strcmp(txt_key, "port") == 0) { + if (!expect_port_for) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "'TXT' record for 'port' without previous 'A' or 'AAAA' record\n"); + return -EINVAL; + } + if (decode_port(txt_value, &expect_port_for->port)) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "'TXT' record: invalid 'port' value ('port=%s')\n", txt_value); + return -EINVAL; + } + expect_port_for = NULL; + } else { + LOGP(DMSLOOKUP, LOGL_ERROR, "unexpected key '%s' in TXT record\n", txt_key); + return -EINVAL; + } + break; + default: + LOGP(DMSLOOKUP, LOGL_ERROR, "unexpected record type\n"); + return -EINVAL; + } + } + + /* Check if everything was found */ + if (!found_age || !(found_ip_v4 || found_ip_v6) || expect_port_for) { + LOGP(DMSLOOKUP, LOGL_ERROR, "missing resource records in mDNS answer\n"); + return -EINVAL; + } + + result->rc = OSMO_MSLOOKUP_RC_RESULT; + return 0; +} + +/*! Decode a mDNS answer packet into a mslookup result, query and packet_id. + * \param[out] packet_id same ID as sent in the request packet. + * \param[out] query the original query (service, ID, ID type). + * \param[out] result holds the age, IPs and ports of the queried service. + * \returns 0 on success, -EINVAL on error. + */ +int osmo_mdns_result_decode(void *ctx, const uint8_t *data, size_t data_len, uint16_t *packet_id, + struct osmo_mslookup_query *query, struct osmo_mslookup_result *result) +{ + int rc = -EINVAL; + struct osmo_mdns_msg_answer *ans; + ans = osmo_mdns_msg_answer_decode(ctx, data, data_len); + if (!ans) + goto exit_free; + + if (osmo_mslookup_query_init_from_domain_str(query, ans->domain) < 0) + goto exit_free; + + if (osmo_mdns_result_from_answer(result, ans) < 0) + goto exit_free; + + *packet_id = ans->id; + rc = 0; +exit_free: + if (ans) + talloc_free(ans); + return rc; +} diff --git a/src/mslookup/mdns_msg.c b/src/mslookup/mdns_msg.c new file mode 100644 index 0000000..370b9ef --- /dev/null +++ b/src/mslookup/mdns_msg.c @@ -0,0 +1,182 @@ +/* High level mDNS encoding and decoding functions for whole messages: + * Request message (header, question) + * Answer message (header, resource record 1, ... resource record N)*/ + +/* Copyright 2019 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 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 "mdns_msg.h" +#include "mdns_record.h" +#include +#include +#include + +/*! Encode request message into one mDNS packet, consisting of the header section and one question section. + * \returns 0 on success, -EINVAL on error. + */ +int osmo_mdns_msg_request_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_msg_request *req) +{ + struct osmo_mdns_rfc_header hdr = {0}; + struct osmo_mdns_rfc_question qst = {0}; + + hdr.id = req->id; + hdr.qdcount = 1; + osmo_mdns_rfc_header_encode(msg, &hdr); + + qst.domain = req->domain; + qst.qtype = req->type; + qst.qclass = OSMO_MDNS_RFC_CLASS_IN; + if (osmo_mdns_rfc_question_encode(ctx, msg, &qst) != 0) + return -EINVAL; + + return 0; +} + +/*! Decode request message from a mDNS packet, consisting of the header section and one question section. + * \returns allocated request message on success, NULL on error. + */ +struct osmo_mdns_msg_request *osmo_mdns_msg_request_decode(void *ctx, const uint8_t *data, size_t data_len) +{ + struct osmo_mdns_rfc_header hdr = {0}; + size_t hdr_len = sizeof(struct osmo_mdns_rfc_header); + struct osmo_mdns_rfc_question* qst = NULL; + struct osmo_mdns_msg_request *ret = NULL; + + if (data_len < hdr_len || osmo_mdns_rfc_header_decode(data, hdr_len, &hdr) != 0 || hdr.qr != 0) + return NULL; + + qst = osmo_mdns_rfc_question_decode(ctx, data + hdr_len, data_len - hdr_len); + if (!qst) + return NULL; + + ret = talloc(ctx, struct osmo_mdns_msg_request); + ret->id = hdr.id; + ret->domain = talloc_strdup(ret, qst->domain); + ret->type = qst->qtype; + + talloc_free(qst); + return ret; +} + +/*! Initialize the linked list for resource records in a answer message. */ +void osmo_mdns_msg_answer_init(struct osmo_mdns_msg_answer *ans) +{ + *ans = (struct osmo_mdns_msg_answer){}; + INIT_LLIST_HEAD(&ans->records); +} + +/*! Encode answer message into one mDNS packet, consisting of the header section and N resource records. + * + * To keep things simple, this sends the domain with each resource record. Other DNS implementations make use of + * "message compression", which would send a question section with the domain before the resource records, and then + * point inside each resource record with an offset back to the domain in the question section (RFC 1035 4.1.4). + * \returns 0 on success, -EINVAL on error. + */ +int osmo_mdns_msg_answer_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_msg_answer *ans) +{ + struct osmo_mdns_rfc_header hdr = {0}; + struct osmo_mdns_record *ans_record; + + hdr.id = ans->id; + hdr.qr = 1; + hdr.ancount = llist_count(&ans->records); + osmo_mdns_rfc_header_encode(msg, &hdr); + + llist_for_each_entry(ans_record, &ans->records, list) { + struct osmo_mdns_rfc_record rec = {0}; + + rec.domain = ans->domain; + rec.type = ans_record->type; + rec.class = OSMO_MDNS_RFC_CLASS_IN; + rec.ttl = 0; + rec.rdlength = ans_record->length; + rec.rdata = ans_record->data; + + if (osmo_mdns_rfc_record_encode(ctx, msg, &rec) != 0) + return -EINVAL; + } + + return 0; +} + +/*! Decode answer message from a mDNS packet. + * + * Answer messages must consist of one header and one or more resource records. An additional question section or + * message compression (RFC 1035 4.1.4) are not supported. +* \returns allocated answer message on success, NULL on error. + */ +struct osmo_mdns_msg_answer *osmo_mdns_msg_answer_decode(void *ctx, const uint8_t *data, size_t data_len) +{ + struct osmo_mdns_rfc_header hdr = {}; + size_t hdr_len = sizeof(struct osmo_mdns_rfc_header); + struct osmo_mdns_msg_answer *ret = talloc_zero(ctx, struct osmo_mdns_msg_answer); + + /* Parse header section */ + if (data_len < hdr_len || osmo_mdns_rfc_header_decode(data, hdr_len, &hdr) != 0 || hdr.qr != 1) + goto error; + ret->id = hdr.id; + data_len -= hdr_len; + data += hdr_len; + + /* Parse resource records */ + INIT_LLIST_HEAD(&ret->records); + while (data_len) { + size_t record_len; + struct osmo_mdns_rfc_record *rec; + struct osmo_mdns_record* ret_record; + + rec = osmo_mdns_rfc_record_decode(ret, data, data_len, &record_len); + if (!rec) + goto error; + + /* Copy domain to ret */ + if (ret->domain) { + if (strcmp(ret->domain, rec->domain) != 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "domain mismatch in resource records ('%s' vs '%s')\n", + ret->domain, rec->domain); + goto error; + } + } + else + ret->domain = talloc_strdup(ret, rec->domain); + + /* Add simplified record to ret */ + ret_record = talloc(ret, struct osmo_mdns_record); + ret_record->type = rec->type; + ret_record->length = rec->rdlength; + ret_record->data = talloc_memdup(ret_record, rec->rdata, rec->rdlength); + llist_add_tail(&ret_record->list, &ret->records); + + data += record_len; + data_len -= record_len; + talloc_free(rec); + } + + /* Verify record count */ + if (llist_count(&ret->records) != hdr.ancount) { + LOGP(DMSLOOKUP, LOGL_ERROR, "amount of parsed records (%i) doesn't match count in header (%i)\n", + llist_count(&ret->records), hdr.ancount); + goto error; + } + + return ret; +error: + talloc_free(ret); + return NULL; +} diff --git a/src/mslookup/mdns_msg.h b/src/mslookup/mdns_msg.h new file mode 100644 index 0000000..e4ab13f --- /dev/null +++ b/src/mslookup/mdns_msg.h @@ -0,0 +1,43 @@ +/* Copyright 2019 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 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 "mdns_rfc.h" + +struct osmo_mdns_msg_request { + uint16_t id; + char *domain; + enum osmo_mdns_rfc_record_type type; +}; + +struct osmo_mdns_msg_answer { + uint16_t id; + char *domain; + struct llist_head records; +}; + +int osmo_mdns_msg_request_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_msg_request *req); +struct osmo_mdns_msg_request *osmo_mdns_msg_request_decode(void *ctx, const uint8_t *data, size_t data_len); + +void osmo_mdns_msg_answer_init(struct osmo_mdns_msg_answer *answer); +int osmo_mdns_msg_answer_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_msg_answer *ans); +struct osmo_mdns_msg_answer *osmo_mdns_msg_answer_decode(void *ctx, const uint8_t *data, size_t data_len); +int osmo_mdns_result_from_answer(struct osmo_mslookup_result *result, const struct osmo_mdns_msg_answer *ans); diff --git a/src/mslookup/mdns_record.c b/src/mslookup/mdns_record.c new file mode 100644 index 0000000..8f0bfbb --- /dev/null +++ b/src/mslookup/mdns_record.c @@ -0,0 +1,105 @@ +/* High level mDNS functions for specific resource records, in particular for handling "key=value" TXT records. */ + +/* Copyright 2019 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 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 "mdns_record.h" + +/*! Get a TXT resource record, which stores a key=value string. + * \returns allocated resource record on success, NULL on error. + */ +static struct osmo_mdns_record *_osmo_mdns_record_txt_encode(void *ctx, const char *key, const char *value) +{ + struct osmo_mdns_record *ret = talloc_zero(ctx, struct osmo_mdns_record); + size_t len = strlen(key) + 1 + strlen(value); + + if (len > OSMO_MDNS_RFC_MAX_CHARACTER_STRING_LEN - 1) + return NULL; + + /* redundant len is required, see RFC 1035 3.3.14 and 3.3. */ + ret->data = (uint8_t *)talloc_asprintf(ctx, "%c%s=%s", (char)len, key, value); + if (!ret->data) + return NULL; + ret->type = OSMO_MDNS_RFC_RECORD_TYPE_TXT; + ret->length = len + 1; + return ret; +} + +/*! Get a TXT resource record, which stores a key=value string, but build value from a format string. + * \returns allocated resource record on success, NULL on error. + */ +struct osmo_mdns_record *osmo_mdns_record_txt_keyval_encode(void *ctx, const char *key, const char *value_fmt, ...) +{ + va_list ap; + char *value = NULL; + struct osmo_mdns_record *r; + + if (!value_fmt) + return _osmo_mdns_record_txt_encode(ctx, key, ""); + + va_start(ap, value_fmt); + value = talloc_vasprintf(ctx, value_fmt, ap); + if (!value) + return NULL; + va_end(ap); + r = _osmo_mdns_record_txt_encode(ctx, key, value); + talloc_free(value); + return r; +} + +/*! Decode a TXT resource record, which stores a key=value string. + * \returns 0 on success, -EINVAL on error. + */ +int osmo_mdns_record_txt_keyval_decode(const struct osmo_mdns_record *rec, + char *key_buf, size_t key_size, char *value_buf, size_t value_size) +{ + const char *key_value; + const char *key_value_end; + const char *sep; + const char *value; + + if (rec->type != OSMO_MDNS_RFC_RECORD_TYPE_TXT) + return -EINVAL; + + key_value = (const char *)rec->data; + key_value_end = key_value + rec->length; + + /* Verify and then skip the redundant string length byte */ + if (*key_value != rec->length - 1) + return -EINVAL; + key_value++; + + if (key_value >= key_value_end) + return -EINVAL; + + /* Find equals sign */ + sep = osmo_strnchr(key_value, key_value_end - key_value, '='); + if (!sep) + return -EINVAL; + + /* Parse key */ + osmo_print_n(key_buf, key_size, key_value, sep - key_value); + + /* Parse value */ + value = sep + 1; + osmo_print_n(value_buf, value_size, value, key_value_end - value); + return 0; +} diff --git a/src/mslookup/mdns_record.h b/src/mslookup/mdns_record.h new file mode 100644 index 0000000..d5247c5 --- /dev/null +++ b/src/mslookup/mdns_record.h @@ -0,0 +1,35 @@ +/* Copyright 2019 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 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 "mdns_rfc.h" +#include +#include + +struct osmo_mdns_record { + struct llist_head list; + enum osmo_mdns_rfc_record_type type; + uint16_t length; + uint8_t *data; +}; + +struct osmo_mdns_record *osmo_mdns_record_txt_keyval_encode(void *ctx, const char *key, const char *value_fmt, ...); +int osmo_mdns_record_txt_keyval_decode(const struct osmo_mdns_record *rec, + char *key_buf, size_t key_size, char *value_buf, size_t value_size); diff --git a/src/mslookup/mdns_rfc.c b/src/mslookup/mdns_rfc.c new file mode 100644 index 0000000..dd19aae --- /dev/null +++ b/src/mslookup/mdns_rfc.c @@ -0,0 +1,266 @@ +/* Low level mDNS encoding and decoding functions of the qname IE, header/question sections and resource records, + * as described in these RFCs: + * - RFC 1035 (Domain names - implementation and specification) + * - RFC 3596 (DNS Extensions to Support IP Version 6) */ + +/* Copyright 2019 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 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 "mdns_rfc.h" + +/* + * Encode/decode IEs + */ + +/*! Encode a domain string as qname (RFC 1035 4.1.2). + * \param[in] domain multiple labels separated by dots, e.g. "sip.voice.1234.msisdn". + * \returns allocated buffer with length-value pairs for each label (e.g. 0x03 "sip" 0x05 "voice" ...), NULL on error. + */ +char *osmo_mdns_rfc_qname_encode(void *ctx, const char *domain) +{ + char *domain_dup; + char *domain_iter; + char buf[OSMO_MDNS_RFC_MAX_NAME_LEN + 2] = ""; /* len(qname) is len(domain) +1 */ + struct osmo_strbuf sb = { .buf = buf, .len = sizeof(buf) }; + char *label; + + if (strlen(domain) > OSMO_MDNS_RFC_MAX_NAME_LEN) + return NULL; + + domain_iter = domain_dup = talloc_strdup(ctx, domain); + while ((label = strsep(&domain_iter, "."))) { + size_t len = strlen(label); + + /* Empty domain, dot at start, two dots in a row, or ending with a dot */ + if (!len) + goto error; + + OSMO_STRBUF_PRINTF(sb, "%c%s", (char)len, label); + } + + talloc_free(domain_dup); + return talloc_strdup(ctx, buf); + +error: + talloc_free(domain_dup); + return NULL; +} + +/*! Decode a domain string from a qname (RFC 1035 4.1.2). + * \param[in] qname buffer with length-value pairs for each label (e.g. 0x03 "sip" 0x05 "voice" ...) + * \param[in] qname_max_len amount of bytes that can be read at most from the memory location that qname points to. + * \returns allocated buffer with domain string, multiple labels separated by dots (e.g. "sip.voice.1234.msisdn"), + * NULL on error. + */ +char *osmo_mdns_rfc_qname_decode(void *ctx, const char *qname, size_t qname_max_len) +{ + const char *next_label, *qname_end = qname + qname_max_len; + char buf[OSMO_MDNS_RFC_MAX_NAME_LEN + 1]; + int i = 0; + + if (qname_max_len < 1) + return NULL; + + while (*qname) { + size_t len = *qname; + next_label = qname + len + 1; + + if (next_label >= qname_end || i + len > OSMO_MDNS_RFC_MAX_NAME_LEN) + return NULL; + + if (i) { + /* Two dots in a row is not allowed */ + if (buf[i - 1] == '.') + return NULL; + + buf[i] = '.'; + i++; + } + + memcpy(buf + i, qname + 1, len); + i += len; + qname = next_label; + } + buf[i] = '\0'; + + return talloc_strdup(ctx, buf); +} + +/* + * Encode/decode message sections + */ + +/*! Encode header section (RFC 1035 4.1.1). + * \param[in] msgb mesage buffer to which the encoded data will be appended. + */ +void osmo_mdns_rfc_header_encode(struct msgb *msg, const struct osmo_mdns_rfc_header *hdr) +{ + struct osmo_mdns_rfc_header *buf = (struct osmo_mdns_rfc_header *) msgb_put(msg, sizeof(*hdr)); + memcpy(buf, hdr, sizeof(*hdr)); + + osmo_store16be(buf->id, &buf->id); + osmo_store16be(buf->qdcount, &buf->qdcount); + osmo_store16be(buf->ancount, &buf->ancount); + osmo_store16be(buf->nscount, &buf->nscount); + osmo_store16be(buf->arcount, &buf->arcount); +} + +/*! Decode header section (RFC 1035 4.1.1). */ +int osmo_mdns_rfc_header_decode(const uint8_t *data, size_t data_len, struct osmo_mdns_rfc_header *hdr) +{ + if (data_len != sizeof(*hdr)) + return -EINVAL; + + memcpy(hdr, data, data_len); + + hdr->id = osmo_load16be(&hdr->id); + hdr->qdcount = osmo_load16be(&hdr->qdcount); + hdr->ancount = osmo_load16be(&hdr->ancount); + hdr->nscount = osmo_load16be(&hdr->nscount); + hdr->arcount = osmo_load16be(&hdr->arcount); + + return 0; +} + +/*! Encode question section (RFC 1035 4.1.2). + * \param[in] msgb mesage buffer to which the encoded data will be appended. + */ +int osmo_mdns_rfc_question_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_question *qst) +{ + char *qname; + size_t qname_len; + uint8_t *qname_buf; + + /* qname */ + qname = osmo_mdns_rfc_qname_encode(ctx, qst->domain); + if (!qname) + return -EINVAL; + qname_len = strlen(qname) + 1; + qname_buf = msgb_put(msg, qname_len); + memcpy(qname_buf, qname, qname_len); + talloc_free(qname); + + /* qtype and qclass */ + msgb_put_u16(msg, qst->qtype); + msgb_put_u16(msg, qst->qclass); + + return 0; +} + +/*! Decode question section (RFC 1035 4.1.2). */ +struct osmo_mdns_rfc_question *osmo_mdns_rfc_question_decode(void *ctx, const uint8_t *data, size_t data_len) +{ + struct osmo_mdns_rfc_question *ret; + size_t qname_len = data_len - 4; + + if (data_len < 6) + return NULL; + + /* qname */ + ret = talloc_zero(ctx, struct osmo_mdns_rfc_question); + if (!ret) + return NULL; + ret->domain = osmo_mdns_rfc_qname_decode(ret, (const char *)data, qname_len); + if (!ret->domain) { + talloc_free(ret); + return NULL; + } + + /* qtype and qclass */ + ret->qtype = osmo_load16be(data + qname_len); + ret->qclass = osmo_load16be(data + qname_len + 2); + + return ret; +} + +/* + * Encode/decode resource records + */ + +/*! Encode one resource record (RFC 1035 4.1.3). + * \param[in] msgb mesage buffer to which the encoded data will be appended. + */ +int osmo_mdns_rfc_record_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_record *rec) +{ + char *name; + size_t name_len; + uint8_t *buf; + + /* name */ + name = osmo_mdns_rfc_qname_encode(ctx, rec->domain); + if (!name) + return -EINVAL; + name_len = strlen(name) + 1; + buf = msgb_put(msg, name_len); + memcpy(buf, name, name_len); + talloc_free(name); + + /* type, class, ttl, rdlength */ + msgb_put_u16(msg, rec->type); + msgb_put_u16(msg, rec->class); + msgb_put_u32(msg, rec->ttl); + msgb_put_u16(msg, rec->rdlength); + + /* rdata */ + buf = msgb_put(msg, rec->rdlength); + memcpy(buf, rec->rdata, rec->rdlength); + return 0; +} + +/*! Decode one resource record (RFC 1035 4.1.3). */ +struct osmo_mdns_rfc_record *osmo_mdns_rfc_record_decode(void *ctx, const uint8_t *data, size_t data_len, + size_t *record_len) +{ + struct osmo_mdns_rfc_record *ret = talloc_zero(ctx, struct osmo_mdns_rfc_record); + size_t name_len; + + /* name */ + ret->domain = osmo_mdns_rfc_qname_decode(ret, (const char *)data, data_len - 10); + if (!ret->domain) + goto error; + name_len = strlen(ret->domain) + 2; + if (name_len + 10 > data_len) + goto error; + + /* type, class, ttl, rdlength */ + ret->type = osmo_load16be(data + name_len); + ret->class = osmo_load16be(data + name_len + 2); + ret->ttl = osmo_load32be(data + name_len + 4); + ret->rdlength = osmo_load16be(data + name_len + 8); + if (name_len + 10 + ret->rdlength > data_len) + goto error; + + /* rdata */ + ret->rdata = talloc_memdup(ret, data + name_len + 10, ret->rdlength); + if (!ret->rdata) + return NULL; + + *record_len = name_len + 10 + ret->rdlength; + return ret; +error: + talloc_free(ret); + return NULL; +} + diff --git a/src/mslookup/mdns_rfc.h b/src/mslookup/mdns_rfc.h new file mode 100644 index 0000000..a2dc92e --- /dev/null +++ b/src/mslookup/mdns_rfc.h @@ -0,0 +1,114 @@ +/* Copyright 2019 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 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 +#include +#include +#include + +/* RFC 1035 2.3.4 */ +#define OSMO_MDNS_RFC_MAX_NAME_LEN 255 + +/* RFC 1035 3.3 */ +#define OSMO_MDNS_RFC_MAX_CHARACTER_STRING_LEN 256 + +enum osmo_mdns_rfc_record_type { + OSMO_MDNS_RFC_RECORD_TYPE_UNKNOWN = 0, + + /* RFC 1035 3.2.2 */ + OSMO_MDNS_RFC_RECORD_TYPE_A = 1, /* IPv4 address */ + OSMO_MDNS_RFC_RECORD_TYPE_TXT = 16, /* Text strings */ + + /* RFC 3596 2.1 */ + OSMO_MDNS_RFC_RECORD_TYPE_AAAA = 28, /* IPv6 address */ + + /* RFC 1035 3.2.3 */ + OSMO_MDNS_RFC_RECORD_TYPE_ALL = 255, /* Request only: ask for all */ +}; + +enum osmo_mdns_rfc_class { + OSMO_MDNS_RFC_CLASS_UNKNOWN = 0, + + /* RFC 1035 3.2.4 */ + OSMO_MDNS_RFC_CLASS_IN = 1, /* Internet and IP networks */ + + /* RFC 1035 3.2.5 */ + OSMO_MDNS_RFC_CLASS_ALL = 255, /* Request only: ask for all */ +}; + +/* RFC 1035 4.1.1 */ +struct osmo_mdns_rfc_header { +#if OSMO_IS_LITTLE_ENDIAN + uint16_t id; + uint8_t rd:1, + tc:1, + aa:1, + opcode:4, + qr:1; /* QR (0: query, 1: response) */ + uint8_t rcode:4, + z:3, + ra:1; + uint16_t qdcount; /* Number of questions */ + uint16_t ancount; /* Number of answers */ + uint16_t nscount; /* Number of authority records */ + uint16_t arcount; /* Number of additional records */ +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint16_t id; + uint8_t qr:1, opcode:4, aa:1, tc:1, rd:1; + uint8_t ra:1, z:3, rcode:4; + uint16_t qdcount; + uint16_t ancount; + uint16_t nscount; + uint16_t arcount; +#endif +} __attribute__ ((packed)); + +/* RFC 1035 4.1.2 */ +struct osmo_mdns_rfc_question { + char *domain; /* Domain to be encoded as qname (e.g. "gsup.hlr.1234567.imsi") */ + enum osmo_mdns_rfc_record_type qtype; + enum osmo_mdns_rfc_class qclass; +}; + +/* RFC 1035 4.1.3 */ +struct osmo_mdns_rfc_record { + char *domain; /* Domain to be encoded as name (e.g. "gsup.hlr.1234567.imsi") */ + enum osmo_mdns_rfc_record_type type; + enum osmo_mdns_rfc_class class; + uint32_t ttl; + uint16_t rdlength; + uint8_t *rdata; +}; + +char *osmo_mdns_rfc_qname_encode(void *ctx, const char *domain); +char *osmo_mdns_rfc_qname_decode(void *ctx, const char *qname, size_t qname_len); + +void osmo_mdns_rfc_header_encode(struct msgb *msg, const struct osmo_mdns_rfc_header *hdr); +int osmo_mdns_rfc_header_decode(const uint8_t *data, size_t data_len, struct osmo_mdns_rfc_header *hdr); + +int osmo_mdns_rfc_question_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_question *qst); +struct osmo_mdns_rfc_question *osmo_mdns_rfc_question_decode(void *ctx, const uint8_t *data, size_t data_len); + +int osmo_mdns_rfc_record_encode(void *ctx, struct msgb *msg, const struct osmo_mdns_rfc_record *rec); +struct osmo_mdns_rfc_record *osmo_mdns_rfc_record_decode(void *ctx, const uint8_t *data, size_t data_len, + size_t *record_len); diff --git a/src/mslookup/mdns_sock.c b/src/mslookup/mdns_sock.c new file mode 100644 index 0000000..838043f --- /dev/null +++ b/src/mslookup/mdns_sock.c @@ -0,0 +1,145 @@ +/* Copyright 2019 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 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 + +/*! Open socket to send and receive multicast data. + * + * The socket is opened with SO_REUSEADDR, so we can bind to the same IP and port multiple times. This socket receives + * everything sent to that multicast IP/port, including its own data data sent from osmo_mdns_sock_send(). So whenever + * sending something, the receive callback will be called with the same data and should discard it. + * + * \param[in] ip multicast IPv4 or IPv6 address. + * \param[in] port port number. + * \param[in] cb callback for incoming data that will be passed to osmo_fd_setup (should read from osmo_fd->fd). + * \param[in] data userdata passed to osmo_fd (available in cb as osmo_fd->data). + * \param[in] priv_nr additional userdata integer passed to osmo_fd (available in cb as osmo_fd->priv_nr). + * \returns allocated osmo_mdns_sock, NULL on error. + */ +struct osmo_mdns_sock *osmo_mdns_sock_init(void *ctx, const char *ip, unsigned int port, + int (*cb)(struct osmo_fd *fd, unsigned int what), + void *data, unsigned int priv_nr) +{ + struct osmo_mdns_sock *ret; + int sock, rc; + struct addrinfo hints = {0}; + struct ip_mreq multicast_req = {0}; + in_addr_t iface = INADDR_ANY; + char portbuf[10]; + int y = 1; + + snprintf(portbuf, sizeof(portbuf) -1, "%u", port); + ret = talloc_zero(ctx, struct osmo_mdns_sock); + OSMO_ASSERT(ret); + + /* Fill addrinfo */ + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = SOCK_DGRAM; + hints.ai_flags = (AI_PASSIVE | AI_NUMERICHOST); + rc = getaddrinfo(ip, portbuf, &hints, &ret->ai); + if (rc != 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: getaddrinfo: %s\n", gai_strerror(rc)); + ret->ai = NULL; + goto error; + } + + /* Open socket */ + sock = socket(ret->ai->ai_family, ret->ai->ai_socktype, 0); + if (sock == -1) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: socket: %s\n", strerror(errno)); + goto error; + } + + /* Set multicast options */ + rc = setsockopt(sock, IPPROTO_IP, IP_MULTICAST_IF, (char*)&iface, sizeof(iface)); + if (rc == -1) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: setsockopt: %s\n", strerror(errno)); + goto error; + } + memcpy(&multicast_req.imr_multiaddr, &((struct sockaddr_in*)(ret->ai->ai_addr))->sin_addr, + sizeof(multicast_req.imr_multiaddr)); + multicast_req.imr_interface.s_addr = htonl(INADDR_ANY); + rc = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*)&multicast_req, sizeof(multicast_req)); + if (rc == -1) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: setsockopt: %s\n", strerror(errno)); + goto error; + } + + /* Always allow binding the same IP and port twice. This is needed in OsmoHLR (where the code becomes cleaner by + * just using a different socket for server and client code) and in the mslookup_client_mdns_test. Also for + * osmo-mslookup-client if it is running multiple times in parallel (i.e. two incoming calls almost at the same + * time need to be resolved with the simple dialplan example that just starts new processes). */ + rc = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *)&y, sizeof(y)); + if (rc == -1) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: setsockopt: %s\n", strerror(errno)); + goto error; + } + + /* Bind and register osmo_fd callback */ + rc = bind(sock, ret->ai->ai_addr, ret->ai->ai_addrlen); + if (rc == -1) { + LOGP(DMSLOOKUP, LOGL_ERROR, "osmo_mdns_sock_init: bind: %s\n", strerror(errno)); + goto error; + } + osmo_fd_setup(&ret->osmo_fd, sock, OSMO_FD_READ, cb, data, priv_nr); + if (osmo_fd_register(&ret->osmo_fd) != 0) + goto error; + + return ret; +error: + if (ret->ai) + freeaddrinfo(ret->ai); + talloc_free(ret); + return NULL; +} + +/*! Send msgb over mdns_sock and consume msgb. + * \returns 0 on success, -1 on error. + */ +int osmo_mdns_sock_send(const struct osmo_mdns_sock *mdns_sock, struct msgb *msg) +{ + size_t len = msgb_length(msg); + int rc = sendto(mdns_sock->osmo_fd.fd, msgb_data(msg), len, 0, mdns_sock->ai->ai_addr, + mdns_sock->ai->ai_addrlen); + msgb_free(msg); + return (rc == len) ? 0 : -1; +} + +/*! Tear down osmo_mdns_sock. */ +void osmo_mdns_sock_cleanup(struct osmo_mdns_sock *mdns_sock) +{ + osmo_fd_close(&mdns_sock->osmo_fd); + freeaddrinfo(mdns_sock->ai); + talloc_free(mdns_sock); +} diff --git a/src/mslookup/mslookup_client_mdns.c b/src/mslookup/mslookup_client_mdns.c new file mode 100644 index 0000000..12501ee --- /dev/null +++ b/src/mslookup/mslookup_client_mdns.c @@ -0,0 +1,223 @@ +/* Copyright 2019 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 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 + +struct osmo_mdns_method_state { + /* Parameters passed by _add_method_dns() */ + struct osmo_sockaddr_str bind_addr; + + struct osmo_mdns_sock *mc; + + struct osmo_mslookup_client *client; + struct llist_head requests; + uint16_t next_packet_id; +}; + +struct osmo_mdns_method_request { + struct llist_head entry; + uint32_t request_handle; + struct osmo_mslookup_query query; + uint16_t packet_id; +}; + +static int request_handle_by_query(uint32_t *request_handle, struct osmo_mdns_method_state *state, + struct osmo_mslookup_query *query, uint16_t packet_id) +{ + struct osmo_mdns_method_request *request; + + llist_for_each_entry(request, &state->requests, entry) { + if (strcmp(request->query.service, query->service) != 0) + continue; + if (osmo_mslookup_id_cmp(&request->query.id, &query->id) != 0) + continue; + + /* Match! */ + *request_handle = request->request_handle; + return 0; + } + return -1; +} + +static int mdns_method_recv(struct osmo_fd *osmo_fd, unsigned int what) +{ + struct osmo_mdns_method_state *state = osmo_fd->data; + struct osmo_mslookup_result result; + struct osmo_mslookup_query query; + uint16_t packet_id; + int n; + uint8_t buffer[1024]; + uint32_t request_handle = 0; + void *ctx = state; + + n = read(osmo_fd->fd, buffer, sizeof(buffer)); + if (n < 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "failed to read from socket\n"); + return n; + } + + if (osmo_mdns_result_decode(ctx, buffer, n, &packet_id, &query, &result) < 0) + return -EINVAL; + + if (request_handle_by_query(&request_handle, state, &query, packet_id) != 0) + return -EINVAL; + + osmo_mslookup_client_rx_result(state->client, request_handle, &result); + return n; +} + +static void mdns_method_request(struct osmo_mslookup_client_method *method, const struct osmo_mslookup_query *query, + uint32_t request_handle) +{ + char buf[256]; + struct osmo_mdns_method_state *state = method->priv; + struct msgb *msg; + struct osmo_mdns_method_request *r = talloc_zero(method->client, struct osmo_mdns_method_request); + + *r = (struct osmo_mdns_method_request){ + .request_handle = request_handle, + .query = *query, + .packet_id = state->next_packet_id, + }; + llist_add(&r->entry, &state->requests); + state->next_packet_id++; + + msg = osmo_mdns_query_encode(method->client, r->packet_id, query); + if (!msg) { + LOGP(DMSLOOKUP, LOGL_ERROR, "Cannot encode request: %s\n", + osmo_mslookup_result_name_b(buf, sizeof(buf), query, NULL)); + } + + /* Send over the wire */ + LOGP(DMSLOOKUP, LOGL_DEBUG, "sending mDNS query: %s.%s\n", query->service, + osmo_mslookup_id_name_b(buf, sizeof(buf), &query->id)); + if (osmo_mdns_sock_send(state->mc, msg) == -1) + LOGP(DMSLOOKUP, LOGL_ERROR, "sending mDNS query failed\n"); +} + +static void mdns_method_request_cleanup(struct osmo_mslookup_client_method *method, uint32_t request_handle) +{ + struct osmo_mdns_method_state *state = method->priv; + + /* Tear down any state associated with this handle. */ + struct osmo_mdns_method_request *r; + llist_for_each_entry(r, &state->requests, entry) { + if (r->request_handle != request_handle) + continue; + llist_del(&r->entry); + talloc_free(r); + return; + } +} + +static void mdns_method_destruct(struct osmo_mslookup_client_method *method) +{ + struct osmo_mdns_method_state *state = method->priv; + struct osmo_mdns_method_request *e, *n; + if (!state) + return; + + /* Drop all DNS lookup request state. Triggering a timeout event and cleanup for mslookup client users will + * happen in the mslookup_client.c, we will simply stop responding from this lookup method. */ + llist_for_each_entry_safe(e, n, &state->requests, entry) { + llist_del(&e->entry); + } + + osmo_mdns_sock_cleanup(state->mc); +} + +/*! Initialize the mDNS lookup method. + * \param[in] client the client to attach the method to. + * \param[in] ip IPv4 or IPv6 address string. + * \param[in] port The port to bind to. + * \param[in] initial_packet_id Used in the first mslookup query, then increased by one in each following query. All + * servers answer to each query with the same packet ID. Set to -1 to use a random + * initial ID (recommended unless you need deterministic output). This ID is for visually + * distinguishing the packets in packet sniffers, the mslookup client uses not just the + * ID, but all query parameters (service type, ID, ID type), to determine if a reply is + * relevant. */ +struct osmo_mslookup_client_method *osmo_mslookup_client_add_mdns(struct osmo_mslookup_client *client, const char *ip, + uint16_t port, int initial_packet_id) +{ + struct osmo_mdns_method_state *state; + struct osmo_mslookup_client_method *m; + + m = talloc_zero(client, struct osmo_mslookup_client_method); + OSMO_ASSERT(m); + + state = talloc_zero(m, struct osmo_mdns_method_state); + OSMO_ASSERT(state); + INIT_LLIST_HEAD(&state->requests); + if (osmo_sockaddr_str_from_str(&state->bind_addr, ip, port)) { + LOGP(DMSLOOKUP, LOGL_ERROR, "mslookup mDNS: invalid address/port: %s %u\n", + ip, port); + goto error_cleanup; + } + + if (initial_packet_id == -1) { + if (osmo_get_rand_id((uint8_t *)&state->next_packet_id, 2) < 0) { + LOGP(DMSLOOKUP, LOGL_ERROR, "mslookup mDNS: failed to generate random initial packet ID\n"); + goto error_cleanup; + } + } else + state->next_packet_id = initial_packet_id; + + state->client = client; + + state->mc = osmo_mdns_sock_init(state, ip, port, mdns_method_recv, state, 0); + if (!state->mc) + goto error_cleanup; + + *m = (struct osmo_mslookup_client_method){ + .name = "mDNS", + .priv = state, + .request = mdns_method_request, + .request_cleanup = mdns_method_request_cleanup, + .destruct = mdns_method_destruct, + }; + + osmo_mslookup_client_method_add(client, m); + return m; + +error_cleanup: + talloc_free(m); + return NULL; +} + +const struct osmo_sockaddr_str *osmo_mslookup_client_method_mdns_get_bind_addr(struct osmo_mslookup_client_method + *dns_method) +{ + struct osmo_mdns_method_state *state; + if (!dns_method || !dns_method->priv) + return NULL; + state = dns_method->priv; + return &state->bind_addr; +} diff --git a/tests/mslookup/Makefile.am b/tests/mslookup/Makefile.am index 71602a3..ebf2add 100644 --- a/tests/mslookup/Makefile.am +++ b/tests/mslookup/Makefile.am @@ -16,11 +16,15 @@ $(NULL) EXTRA_DIST = \ + mdns_test.err \ + mslookup_client_mdns_test.err \ mslookup_client_test.err \ mslookup_test.err \ $(NULL) check_PROGRAMS = \ + mdns_test \ + mslookup_client_mdns_test \ mslookup_client_test \ mslookup_test \ $(NULL) @@ -41,6 +45,22 @@ $(LIBOSMOGSM_LIBS) \ $(NULL) +mslookup_client_mdns_test_SOURCES = \ + mslookup_client_mdns_test.c \ + $(NULL) +mslookup_client_mdns_test_LDADD = \ + $(top_builddir)/src/mslookup/libosmo-mslookup.la \ + $(LIBOSMOGSM_LIBS) \ + $(NULL) + +mdns_test_SOURCES = \ + mdns_test.c \ + $(NULL) +mdns_test_LDADD = \ + $(top_builddir)/src/mslookup/libosmo-mslookup.la \ + $(LIBOSMOGSM_LIBS) \ + $(NULL) + .PHONY: update_exp update_exp: for i in $(check_PROGRAMS); do \ diff --git a/tests/mslookup/mdns_test.c b/tests/mslookup/mdns_test.c new file mode 100644 index 0000000..ac87bbe --- /dev/null +++ b/tests/mslookup/mdns_test.c @@ -0,0 +1,603 @@ +/* Copyright 2019 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 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 "../../src/mslookup/mdns_rfc.h" +#include "../../src/mslookup/mdns_record.h" +#include "../../src/mslookup/mdns_msg.h" +#include +#include +#include +#include +#include +#include + +struct qname_enc_dec_test { + const char *domain; + const char *qname; + size_t qname_max_len; /* default: strlen(qname) + 1 */ +}; + +static const struct qname_enc_dec_test qname_enc_dec_test_data[] = { + { + /* OK: typical mslookup domain */ + .domain = "hlr.1234567.imsi", + .qname = "\x03" "hlr" "\x07" "1234567" "\x04" "imsi", + }, + { + /* Wrong format: double dot */ + .domain = "hlr..imsi", + .qname = NULL, + }, + { + /* Wrong format: double dot */ + .domain = "hlr", + .qname = "\x03hlr\0\x03imsi", + }, + { + /* Wrong format: dot at end */ + .domain = "hlr.", + .qname = NULL, + }, + { + /* Wrong format: dot at start */ + .domain = ".hlr", + .qname = NULL, + }, + { + /* Wrong format: empty */ + .domain = "", + .qname = NULL, + }, + { + /* OK: maximum length */ + .domain = + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "12345" + , + .qname = + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\x05" "12345" + }, + { + /* Error: too long domain */ + .domain = + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "123456789." "123456789." "123456789." "123456789." "123456789." + "12345toolong" + , + .qname = NULL, + }, + { + /* Error: too long qname */ + .domain = NULL, + .qname = + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + "\t123456789\t123456789\t123456789\t123456789\t123456789" + }, + { + /* Error: wrong token length in qname */ + .domain = NULL, + .qname = "\x03" "hlr" "\x07" "1234567" "\x05" "imsi", + }, + { + /* Error: wrong token length in qname */ + .domain = NULL, + .qname = "\x02" "hlr" "\x07" "1234567" "\x04" "imsi", + }, + { + /* Wrong format: token length at end of qname */ + .domain = NULL, + .qname = "\x03hlr\x03", + }, + { + /* Error: overflow in label length */ + .domain = NULL, + .qname = "\x03" "hlr" "\x07" "1234567" "\x04" "imsi", + .qname_max_len = 17, + }, +}; + +void test_enc_dec_rfc_qname(void *ctx) +{ + char quote_buf[300]; + int i; + + fprintf(stderr, "-- %s --\n", __func__); + + for (i = 0; i < ARRAY_SIZE(qname_enc_dec_test_data); i++) { + const struct qname_enc_dec_test *t = &qname_enc_dec_test_data[i]; + char *res; + + if (t->domain) { + fprintf(stderr, "domain: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->domain, -1)); + fprintf(stderr, "exp: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->qname, -1)); + res = osmo_mdns_rfc_qname_encode(ctx, t->domain); + fprintf(stderr, "res: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), res, -1)); + if (t->qname == res || (t->qname && res && strcmp(t->qname, res) == 0)) + fprintf(stderr, "=> OK\n"); + else + fprintf(stderr, "=> ERROR\n"); + if (res) + talloc_free(res); + fprintf(stderr, "\n"); + } + + if (t->qname) { + size_t qname_max_len = t->qname_max_len; + if (qname_max_len) + fprintf(stderr, "qname_max_len: %lu\n", qname_max_len); + else + qname_max_len = strlen(t->qname) + 1; + + fprintf(stderr, "qname: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->qname, -1)); + fprintf(stderr, "exp: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), t->domain, -1)); + res = osmo_mdns_rfc_qname_decode(ctx, t->qname, qname_max_len); + fprintf(stderr, "res: %s\n", osmo_quote_str_buf2(quote_buf, sizeof(quote_buf), res, -1)); + if (t->domain == res || (t->domain && res && strcmp(t->domain, res) == 0)) + fprintf(stderr, "=> OK\n"); + else + fprintf(stderr, "=> ERROR\n"); + if (res) + talloc_free(res); + fprintf(stderr, "\n"); + } + } +} + +#define PRINT_HDR(hdr, name) \ + fprintf(stderr, "header %s:\n" \ + ".id = %i\n" \ + ".qr = %i\n" \ + ".opcode = %x\n" \ + ".aa = %i\n" \ + ".tc = %i\n" \ + ".rd = %i\n" \ + ".ra = %i\n" \ + ".z = %x\n" \ + ".rcode = %x\n" \ + ".qdcount = %u\n" \ + ".ancount = %u\n" \ + ".nscount = %u\n" \ + ".arcount = %u\n", \ + name, hdr.id, hdr.qr, hdr.opcode, hdr.aa, hdr.tc, hdr.rd, hdr.ra, hdr.z, hdr.rcode, hdr.qdcount, \ + hdr.ancount, hdr.nscount, hdr.arcount) + +static const struct osmo_mdns_rfc_header header_enc_dec_test_data[] = { + { + /* Typical use case for mslookup */ + .id = 1337, + .qdcount = 1, + }, + { + /* Fill out everything */ + .id = 42, + .qr = 1, + .opcode = 0x02, + .aa = 1, + .tc = 1, + .rd = 1, + .ra = 1, + .z = 0x02, + .rcode = 0x03, + .qdcount = 1234, + .ancount = 1111, + .nscount = 2222, + .arcount = 3333, + }, +}; + +void test_enc_dec_rfc_header() +{ + int i; + + fprintf(stderr, "-- %s --\n", __func__); + for (i = 0; i< ARRAY_SIZE(header_enc_dec_test_data); i++) { + const struct osmo_mdns_rfc_header in = header_enc_dec_test_data[i]; + struct osmo_mdns_rfc_header out = {0}; + struct msgb *msg = msgb_alloc(4096, "dns_test"); + + PRINT_HDR(in, "in"); + osmo_mdns_rfc_header_encode(msg, &in); + fprintf(stderr, "encoded: %s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg))); + assert(osmo_mdns_rfc_header_decode(msgb_data(msg), msgb_length(msg), &out) == 0); + PRINT_HDR(out, "out"); + + fprintf(stderr, "in (hexdump): %s\n", osmo_hexdump((unsigned char *)&in, sizeof(in))); + fprintf(stderr, "out (hexdump): %s\n", osmo_hexdump((unsigned char *)&out, sizeof(out))); + assert(memcmp(&in, &out, sizeof(in)) == 0); + + fprintf(stderr, "=> OK\n\n"); + msgb_free(msg); + } +} + +void test_enc_dec_rfc_header_einval() +{ + struct osmo_mdns_rfc_header out = {0}; + struct msgb *msg = msgb_alloc(4096, "dns_test"); + fprintf(stderr, "-- %s --\n", __func__); + + assert(osmo_mdns_rfc_header_decode(msgb_data(msg), 11, &out) == -EINVAL); + fprintf(stderr, "=> OK\n\n"); + + msgb_free(msg); +} + +#define PRINT_QST(qst, name) \ + fprintf(stderr, "question %s:\n" \ + ".domain = %s\n" \ + ".qtype = %i\n" \ + ".qclass = %i\n", \ + name, (qst)->domain, (qst)->qtype, (qst)->qclass) + +static const struct osmo_mdns_rfc_question question_enc_dec_test_data[] = { + { + .domain = "hlr.1234567.imsi", + .qtype = OSMO_MDNS_RFC_RECORD_TYPE_ALL, + .qclass = OSMO_MDNS_RFC_CLASS_IN, + }, + { + .domain = "hlr.1234567.imsi", + .qtype = OSMO_MDNS_RFC_RECORD_TYPE_A, + .qclass = OSMO_MDNS_RFC_CLASS_ALL, + }, + { + .domain = "hlr.1234567.imsi", + .qtype = OSMO_MDNS_RFC_RECORD_TYPE_AAAA, + .qclass = OSMO_MDNS_RFC_CLASS_ALL, + }, +}; + +void test_enc_dec_rfc_question(void *ctx) +{ + int i; + + fprintf(stderr, "-- %s --\n", __func__); + for (i = 0; i< ARRAY_SIZE(question_enc_dec_test_data); i++) { + const struct osmo_mdns_rfc_question in = question_enc_dec_test_data[i]; + struct osmo_mdns_rfc_question *out; + struct msgb *msg = msgb_alloc(4096, "dns_test"); + + PRINT_QST(&in, "in"); + assert(osmo_mdns_rfc_question_encode(ctx, msg, &in) == 0); + fprintf(stderr, "encoded: %s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg))); + out = osmo_mdns_rfc_question_decode(ctx, msgb_data(msg), msgb_length(msg)); + assert(out); + PRINT_QST(out, "out"); + + if (strcmp(in.domain, out->domain) != 0) + fprintf(stderr, "=> ERROR: domain does not match\n"); + else if (in.qtype != out->qtype) + fprintf(stderr, "=> ERROR: qtype does not match\n"); + else if (in.qclass != out->qclass) + fprintf(stderr, "=> ERROR: qclass does not match\n"); + else + fprintf(stderr, "=> OK\n"); + + fprintf(stderr, "\n"); + msgb_free(msg); + talloc_free(out); + } +} + +void test_enc_dec_rfc_question_null(void *ctx) +{ + uint8_t data[5] = {0}; + + fprintf(stderr, "-- %s --\n", __func__); + assert(osmo_mdns_rfc_question_decode(ctx, data, sizeof(data)) == NULL); + fprintf(stderr, "=> OK\n\n"); +} + +#define PRINT_REC(rec, name) \ + fprintf(stderr, "question %s:\n" \ + ".domain = %s\n" \ + ".type = %i\n" \ + ".class = %i\n" \ + ".ttl = %i\n" \ + ".rdlength = %i\n" \ + ".rdata = %s\n", \ + name, (rec)->domain, (rec)->type, (rec)->class, (rec)->ttl, (rec)->rdlength, \ + osmo_quote_str((char *)(rec)->rdata, (rec)->rdlength)) + +static const struct osmo_mdns_rfc_record record_enc_dec_test_data[] = { + { + .domain = "hlr.1234567.imsi", + .type = OSMO_MDNS_RFC_RECORD_TYPE_A, + .class = OSMO_MDNS_RFC_CLASS_IN, + .ttl = 1234, + .rdlength = 9, + .rdata = (uint8_t *)"10.42.2.1", + }, +}; + +void test_enc_dec_rfc_record(void *ctx) +{ + int i; + + fprintf(stderr, "-- %s --\n", __func__); + for (i=0; i< ARRAY_SIZE(record_enc_dec_test_data); i++) { + const struct osmo_mdns_rfc_record in = record_enc_dec_test_data[i]; + struct osmo_mdns_rfc_record *out; + struct msgb *msg = msgb_alloc(4096, "dns_test"); + size_t record_len; + + PRINT_REC(&in, "in"); + assert(osmo_mdns_rfc_record_encode(ctx, msg, &in) == 0); + fprintf(stderr, "encoded: %s\n", osmo_hexdump(msgb_data(msg), msgb_length(msg))); + out = osmo_mdns_rfc_record_decode(ctx, msgb_data(msg), msgb_length(msg), &record_len); + fprintf(stderr, "record_len: %lu\n", record_len); + assert(out); + PRINT_REC(out, "out"); + + if (strcmp(in.domain, out->domain) != 0) + fprintf(stderr, "=> ERROR: domain does not match\n"); + else if (in.type != out->type) + fprintf(stderr, "=> ERROR: type does not match\n"); + else if (in.class != out->class) + fprintf(stderr, "=> ERROR: class does not match\n"); + else if (in.ttl != out->ttl) + fprintf(stderr, "=> ERROR: ttl does not match\n"); + else if (in.rdlength != out->rdlength) + fprintf(stderr, "=> ERROR: rdlength does not match\n"); + else if (memcmp(in.rdata, out->rdata, in.rdlength) != 0) + fprintf(stderr, "=> ERROR: rdata does not match\n"); + else + fprintf(stderr, "=> OK\n"); + + fprintf(stderr, "\n"); + msgb_free(msg); + talloc_free(out); + } +} + +static uint8_t ip_v4_n[] = {23, 42, 47, 11}; +static uint8_t ip_v6_n[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, + 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00}; + + +enum test_records { + RECORD_NONE, + RECORD_A, + RECORD_AAAA, + RECORD_TXT_AGE, + RECORD_TXT_PORT_444, + RECORD_TXT_PORT_666, + RECORD_TXT_INVALID_KEY, + RECORD_TXT_INVALID_NO_KEY_VALUE, + RECORD_INVALID, +}; +struct result_from_answer_test { + const char *desc; + const enum test_records records[5]; + bool error; + const struct osmo_mslookup_result res; +}; + +static void test_result_from_answer(void *ctx) +{ + void *print_ctx = talloc_named_const(ctx, 0, __func__); + struct osmo_sockaddr_str test_host_v4 = {.af = AF_INET, .port=444, .ip = "23.42.47.11"}; + struct osmo_sockaddr_str test_host_v6 = {.af = AF_INET6, .port=666, + .ip = "1122:3344:5566:7788:99aa:bbcc:ddee:ff00"}; + struct osmo_mslookup_result test_result_v4 = {.rc = OSMO_MSLOOKUP_RC_RESULT, .age = 3, + .host_v4 = test_host_v4}; + struct osmo_mslookup_result test_result_v6 = {.rc = OSMO_MSLOOKUP_RC_RESULT, .age = 3, + .host_v6 = test_host_v6}; + struct osmo_mslookup_result test_result_v4_v6 = {.rc = OSMO_MSLOOKUP_RC_RESULT, .age = 3, + .host_v4 = test_host_v4, .host_v6 = test_host_v6}; + struct result_from_answer_test result_from_answer_data[] = { + { + .desc = "IPv4", + .records = {RECORD_TXT_AGE, RECORD_A, RECORD_TXT_PORT_444}, + .res = test_result_v4 + }, + { + .desc = "IPv6", + .records = {RECORD_TXT_AGE, RECORD_AAAA, RECORD_TXT_PORT_666}, + .res = test_result_v6 + }, + { + .desc = "IPv4 + IPv6", + .records = {RECORD_TXT_AGE, RECORD_A, RECORD_TXT_PORT_444, RECORD_AAAA, RECORD_TXT_PORT_666}, + .res = test_result_v4_v6 + }, + { + .desc = "A twice", + .records = {RECORD_TXT_AGE, RECORD_A, RECORD_TXT_PORT_444, RECORD_A}, + .error = true + }, + { + .desc = "AAAA twice", + .records = {RECORD_TXT_AGE, RECORD_AAAA, RECORD_TXT_PORT_444, RECORD_AAAA}, + .error = true + }, + { + .desc = "invalid TXT: no key/value pair", + .records = {RECORD_TXT_AGE, RECORD_AAAA, RECORD_TXT_INVALID_NO_KEY_VALUE}, + .error = true + }, + { + .desc = "age twice", + .records = {RECORD_TXT_AGE, RECORD_TXT_AGE}, + .error = true + }, + { + .desc = "port as first record", + .records = {RECORD_TXT_PORT_444}, + .error = true + }, + { + .desc = "port without previous ip record", + .records = {RECORD_TXT_AGE, RECORD_TXT_PORT_444}, + .error = true + }, + { + .desc = "invalid TXT: invalid key", + .records = {RECORD_TXT_AGE, RECORD_AAAA, RECORD_TXT_INVALID_KEY}, + .error = true + }, + { + .desc = "unexpected record type", + .records = {RECORD_TXT_AGE, RECORD_INVALID}, + .error = true + }, + { + .desc = "missing record: age", + .records = {RECORD_A, RECORD_TXT_PORT_444}, + .error = true + }, + { + .desc = "missing record: port for ipv4", + .records = {RECORD_TXT_AGE, RECORD_A}, + .error = true + }, + { + .desc = "missing record: port for ipv4 #2", + .records = {RECORD_TXT_AGE, RECORD_AAAA, RECORD_TXT_PORT_666, RECORD_A}, + .error = true + }, + }; + int i = 0; + int j = 0; + + fprintf(stderr, "-- %s --\n", __func__); + for (i = 0; i < ARRAY_SIZE(result_from_answer_data); i++) { + struct result_from_answer_test *t = &result_from_answer_data[i]; + struct osmo_mdns_msg_answer ans = {0}; + struct osmo_mslookup_result res = {0}; + void *ctx_test = talloc_named_const(ctx, 0, t->desc); + bool is_error; + + fprintf(stderr, "---\n"); + fprintf(stderr, "test: %s\n", t->desc); + fprintf(stderr, "error: %s\n", t->error ? "true" : "false"); + fprintf(stderr, "records:\n"); + /* Build records list */ + INIT_LLIST_HEAD(&ans.records); + for (j = 0; j < ARRAY_SIZE(t->records); j++) { + struct osmo_mdns_record *rec = NULL; + + switch (t->records[j]) { + case RECORD_NONE: + break; + case RECORD_A: + fprintf(stderr, "- A 42.42.42.42\n"); + rec = talloc_zero(ctx_test, struct osmo_mdns_record); + rec->type = OSMO_MDNS_RFC_RECORD_TYPE_A; + rec->data = ip_v4_n; + rec->length = sizeof(ip_v4_n); + break; + case RECORD_AAAA: + fprintf(stderr, "- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00\n"); + rec = talloc_zero(ctx_test, struct osmo_mdns_record); + rec->type = OSMO_MDNS_RFC_RECORD_TYPE_AAAA; + rec->data = ip_v6_n; + rec->length = sizeof(ip_v6_n); + break; + case RECORD_TXT_AGE: + fprintf(stderr, "- TXT age=3\n"); + rec = osmo_mdns_record_txt_keyval_encode(ctx_test, "age", "3"); + break; + case RECORD_TXT_PORT_444: + fprintf(stderr, "- TXT port=444\n"); + rec = osmo_mdns_record_txt_keyval_encode(ctx_test, "port", "444"); + break; + case RECORD_TXT_PORT_666: + fprintf(stderr, "- TXT port=666\n"); + rec = osmo_mdns_record_txt_keyval_encode(ctx_test, "port", "666"); + break; + case RECORD_TXT_INVALID_KEY: + fprintf(stderr, "- TXT hello=world\n"); + rec = osmo_mdns_record_txt_keyval_encode(ctx_test, "hello", "world"); + break; + case RECORD_TXT_INVALID_NO_KEY_VALUE: + fprintf(stderr, "- TXT 12345\n"); + rec = osmo_mdns_record_txt_keyval_encode(ctx_test, "12", "45"); + rec->data[3] = '3'; + break; + case RECORD_INVALID: + fprintf(stderr, "- (invalid)\n"); + rec = talloc_zero(ctx, struct osmo_mdns_record); + rec->type = OSMO_MDNS_RFC_RECORD_TYPE_UNKNOWN; + break; + } + + if (rec) + llist_add_tail(&rec->list, &ans.records); + } + + /* Verify output */ + is_error = (osmo_mdns_result_from_answer(&res, &ans) != 0); + if (t->error != is_error) { + fprintf(stderr, "got %s\n", is_error ? "error" : "no error"); + OSMO_ASSERT(false); + } + if (!t->error) { + fprintf(stderr, "exp: %s\n", osmo_mslookup_result_name_c(print_ctx, NULL, &t->res)); + fprintf(stderr, "res: %s\n", osmo_mslookup_result_name_c(print_ctx, NULL, &res)); + OSMO_ASSERT(t->res.rc == res.rc); + OSMO_ASSERT(!osmo_sockaddr_str_cmp(&t->res.host_v4, &res.host_v4)); + OSMO_ASSERT(!osmo_sockaddr_str_cmp(&t->res.host_v6, &res.host_v6)); + OSMO_ASSERT(t->res.age == res.age); + OSMO_ASSERT(t->res.last == res.last); + } + + talloc_free(ctx_test); + fprintf(stderr, "=> OK\n"); + } +} + +int main() +{ + void *ctx = talloc_named_const(NULL, 0, "main"); + osmo_init_logging2(ctx, NULL); + + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_level(osmo_stderr_target, 1); + log_set_print_category(osmo_stderr_target, 1); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + + test_enc_dec_rfc_qname(ctx); + test_enc_dec_rfc_header(); + test_enc_dec_rfc_header_einval(); + test_enc_dec_rfc_question(ctx); + test_enc_dec_rfc_question_null(ctx); + test_enc_dec_rfc_record(ctx); + + test_result_from_answer(ctx); + + return 0; +} diff --git a/tests/mslookup/mdns_test.err b/tests/mslookup/mdns_test.err new file mode 100644 index 0000000..51e5afe --- /dev/null +++ b/tests/mslookup/mdns_test.err @@ -0,0 +1,336 @@ +-- test_enc_dec_rfc_qname -- +domain: "hlr.1234567.imsi" +exp: "\3hlr\a1234567\4imsi" +res: "\3hlr\a1234567\4imsi" +=> OK + +qname: "\3hlr\a1234567\4imsi" +exp: "hlr.1234567.imsi" +res: "hlr.1234567.imsi" +=> OK + +domain: "hlr..imsi" +exp: NULL +res: NULL +=> OK + +domain: "hlr" +exp: "\3hlr" +res: "\3hlr" +=> OK + +qname: "\3hlr" +exp: "hlr" +res: "hlr" +=> OK + +domain: "hlr." +exp: NULL +res: NULL +=> OK + +domain: ".hlr" +exp: NULL +res: NULL +=> OK + +domain: "" +exp: NULL +res: NULL +=> OK + +domain: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345" +exp: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345" +res: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345" +=> OK + +qname: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345" +exp: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345" +res: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345" +=> OK + +domain: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345toolong" +exp: NULL +res: NULL +=> OK + +qname: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\ +exp: NULL +res: NULL +=> OK + +qname: "\3hlr\a1234567\5imsi" +exp: NULL +res: NULL +=> OK + +qname: "\2hlr\a1234567\4imsi" +exp: NULL +res: NULL +=> OK + +qname: "\3hlr\3" +exp: NULL +res: NULL +=> OK + +qname_max_len: 17 +qname: "\3hlr\a1234567\4imsi" +exp: NULL +res: NULL +=> OK + +-- test_enc_dec_rfc_header -- +header in: +.id = 1337 +.qr = 0 +.opcode = 0 +.aa = 0 +.tc = 0 +.rd = 0 +.ra = 0 +.z = 0 +.rcode = 0 +.qdcount = 1 +.ancount = 0 +.nscount = 0 +.arcount = 0 +encoded: 05 39 00 00 00 01 00 00 00 00 00 00 +header out: +.id = 1337 +.qr = 0 +.opcode = 0 +.aa = 0 +.tc = 0 +.rd = 0 +.ra = 0 +.z = 0 +.rcode = 0 +.qdcount = 1 +.ancount = 0 +.nscount = 0 +.arcount = 0 +in (hexdump): 39 05 00 00 01 00 00 00 00 00 00 00 +out (hexdump): 39 05 00 00 01 00 00 00 00 00 00 00 +=> OK + +header in: +.id = 42 +.qr = 1 +.opcode = 2 +.aa = 1 +.tc = 1 +.rd = 1 +.ra = 1 +.z = 2 +.rcode = 3 +.qdcount = 1234 +.ancount = 1111 +.nscount = 2222 +.arcount = 3333 +encoded: 00 2a 97 a3 04 d2 04 57 08 ae 0d 05 +header out: +.id = 42 +.qr = 1 +.opcode = 2 +.aa = 1 +.tc = 1 +.rd = 1 +.ra = 1 +.z = 2 +.rcode = 3 +.qdcount = 1234 +.ancount = 1111 +.nscount = 2222 +.arcount = 3333 +in (hexdump): 2a 00 97 a3 d2 04 57 04 ae 08 05 0d +out (hexdump): 2a 00 97 a3 d2 04 57 04 ae 08 05 0d +=> OK + +-- test_enc_dec_rfc_header_einval -- +=> OK + +-- test_enc_dec_rfc_question -- +question in: +.domain = hlr.1234567.imsi +.qtype = 255 +.qclass = 1 +encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 ff 00 01 +question out: +.domain = hlr.1234567.imsi +.qtype = 255 +.qclass = 1 +=> OK + +question in: +.domain = hlr.1234567.imsi +.qtype = 1 +.qclass = 255 +encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 01 00 ff +question out: +.domain = hlr.1234567.imsi +.qtype = 1 +.qclass = 255 +=> OK + +question in: +.domain = hlr.1234567.imsi +.qtype = 28 +.qclass = 255 +encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 1c 00 ff +question out: +.domain = hlr.1234567.imsi +.qtype = 28 +.qclass = 255 +=> OK + +-- test_enc_dec_rfc_question_null -- +=> OK + +-- test_enc_dec_rfc_record -- +question in: +.domain = hlr.1234567.imsi +.type = 1 +.class = 1 +.ttl = 1234 +.rdlength = 9 +.rdata = "10.42.2.1" +encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 01 00 01 00 00 04 d2 00 09 31 30 2e 34 32 2e 32 2e 31 +record_len: 37 +question out: +.domain = hlr.1234567.imsi +.type = 1 +.class = 1 +.ttl = 1234 +.rdlength = 9 +.rdata = "10.42.2.1" +=> OK + +-- test_result_from_answer -- +--- +test: IPv4 +error: false +records: +- TXT age=3 +- A 42.42.42.42 +- TXT port=444 +exp: -> ipv4: 23.42.47.11:444 (age=3) (not-last) +res: -> ipv4: 23.42.47.11:444 (age=3) (not-last) +=> OK +--- +test: IPv6 +error: false +records: +- TXT age=3 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT port=666 +exp: -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last) +res: -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last) +=> OK +--- +test: IPv4 + IPv6 +error: false +records: +- TXT age=3 +- A 42.42.42.42 +- TXT port=444 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT port=666 +exp: -> ipv4: 23.42.47.11:444 -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last) +res: -> ipv4: 23.42.47.11:444 -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last) +=> OK +--- +test: A twice +error: true +records: +- TXT age=3 +- A 42.42.42.42 +- TXT port=444 +- A 42.42.42.42 +DLGLOBAL ERROR 'A' record found twice in mDNS answer +=> OK +--- +test: AAAA twice +error: true +records: +- TXT age=3 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT port=444 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +DLGLOBAL ERROR 'AAAA' record found twice in mDNS answer +=> OK +--- +test: invalid TXT: no key/value pair +error: true +records: +- TXT age=3 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT 12345 +DLGLOBAL ERROR failed to decode txt record +=> OK +--- +test: age twice +error: true +records: +- TXT age=3 +- TXT age=3 +DLGLOBAL ERROR duplicate 'TXT' record for 'age' +=> OK +--- +test: port as first record +error: true +records: +- TXT port=444 +DLGLOBAL ERROR 'TXT' record for 'port' without previous 'A' or 'AAAA' record +=> OK +--- +test: port without previous ip record +error: true +records: +- TXT age=3 +- TXT port=444 +DLGLOBAL ERROR 'TXT' record for 'port' without previous 'A' or 'AAAA' record +=> OK +--- +test: invalid TXT: invalid key +error: true +records: +- TXT age=3 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT hello=world +DLGLOBAL ERROR unexpected key 'hello' in TXT record +=> OK +--- +test: unexpected record type +error: true +records: +- TXT age=3 +- (invalid) +DLGLOBAL ERROR unexpected record type +=> OK +--- +test: missing record: age +error: true +records: +- A 42.42.42.42 +- TXT port=444 +DLGLOBAL ERROR missing resource records in mDNS answer +=> OK +--- +test: missing record: port for ipv4 +error: true +records: +- TXT age=3 +- A 42.42.42.42 +DLGLOBAL ERROR missing resource records in mDNS answer +=> OK +--- +test: missing record: port for ipv4 #2 +error: true +records: +- TXT age=3 +- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00 +- TXT port=666 +- A 42.42.42.42 +DLGLOBAL ERROR missing resource records in mDNS answer +=> OK diff --git a/tests/mslookup/mslookup_client_mdns_test.c b/tests/mslookup/mslookup_client_mdns_test.c new file mode 100644 index 0000000..d75be5c --- /dev/null +++ b/tests/mslookup/mslookup_client_mdns_test.c @@ -0,0 +1,219 @@ +/* Copyright 2019 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 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 + +void *ctx = NULL; + +#define TEST_IP OSMO_MSLOOKUP_MDNS_IP4 +#define TEST_PORT OSMO_MSLOOKUP_MDNS_PORT + +/* + * Test server (emulates the mDNS server in OsmoHLR) and client + */ +struct osmo_mdns_sock *server_mc; + + +static void server_reply(struct osmo_mslookup_query *query, uint16_t packet_id) +{ + struct osmo_mslookup_result result = {0}; + struct msgb *msg; + + result.rc = OSMO_MSLOOKUP_RC_RESULT; + result.age = 3; + osmo_sockaddr_str_from_str(&result.host_v4, "42.42.42.42", 444); + osmo_sockaddr_str_from_str(&result.host_v6, "1122:3344:5566:7788:99aa:bbcc:ddee:ff00", 666); + + msg = osmo_mdns_result_encode(ctx, packet_id, query, &result); + OSMO_ASSERT(msg); + OSMO_ASSERT(osmo_mdns_sock_send(server_mc, msg) == 0); +} + +static int server_recv(struct osmo_fd *osmo_fd, unsigned int what) +{ + int n; + uint8_t buffer[1024]; + uint16_t packet_id; + struct osmo_mslookup_query *query; + + fprintf(stderr, "%s\n", __func__); + + /* Parse the message and print it */ + n = read(osmo_fd->fd, buffer, sizeof(buffer)); + OSMO_ASSERT(n >= 0); + + query = osmo_mdns_query_decode(ctx, buffer, n, &packet_id); + if (!query) + return -1; /* server receiving own answer is expected */ + + fprintf(stderr, "received request\n"); + server_reply(query, packet_id); + talloc_free(query); + return n; +} + +static void server_init() +{ + fprintf(stderr, "%s\n", __func__); + server_mc = osmo_mdns_sock_init(ctx, TEST_IP, TEST_PORT, server_recv, NULL, 0); + OSMO_ASSERT(server_mc); +} + +static void server_stop() +{ + fprintf(stderr, "%s\n", __func__); + OSMO_ASSERT(server_mc); + osmo_mdns_sock_cleanup(server_mc); + server_mc = NULL; +} + +struct osmo_mslookup_client* client; +struct osmo_mslookup_client_method* client_method; + +static void client_init() +{ + fprintf(stderr, "%s\n", __func__); + client = osmo_mslookup_client_new(ctx); + OSMO_ASSERT(client); + client_method = osmo_mslookup_client_add_mdns(client, TEST_IP, TEST_PORT, 1337); + OSMO_ASSERT(client_method); +} + +static void client_recv(struct osmo_mslookup_client *client, uint32_t request_handle, + const struct osmo_mslookup_query *query, const struct osmo_mslookup_result *result) +{ + char buf[256]; + fprintf(stderr, "%s\n", __func__); + fprintf(stderr, "client_recv(): %s\n", osmo_mslookup_result_name_b(buf, sizeof(buf), query, result)); + + osmo_mslookup_client_request_cancel(client, request_handle); +} + +static void client_query() +{ + struct osmo_mslookup_id id = {.type = OSMO_MSLOOKUP_ID_IMSI, + .imsi = "123456789012345"}; + const struct osmo_mslookup_query query = { + .service = "gsup.hlr", + .id = id, + }; + struct osmo_mslookup_query_handling handling = { + .result_timeout_milliseconds = 2000, + .result_cb = client_recv, + }; + + fprintf(stderr, "%s\n", __func__); + osmo_mslookup_client_request(client, &query, &handling); +} + +static void client_stop() +{ + fprintf(stderr, "%s\n", __func__); + osmo_mslookup_client_free(client); + client = NULL; +} +const struct timeval fake_time_start_time = { 0, 0 }; + +#define fake_time_passes(secs, usecs) do \ +{ \ + struct timeval diff; \ + osmo_gettimeofday_override_add(secs, usecs); \ + osmo_clock_override_add(CLOCK_MONOTONIC, secs, usecs * 1000); \ + timersub(&osmo_gettimeofday_override_time, &fake_time_start_time, &diff); \ + LOGP(DMSLOOKUP, LOGL_DEBUG, "Total time passed: %d.%06d s\n", \ + (int)diff.tv_sec, (int)diff.tv_usec); \ + osmo_timers_prepare(); \ + osmo_timers_update(); \ +} while (0) + +static void fake_time_start() +{ + struct timespec *clock_override; + + osmo_gettimeofday_override_time = fake_time_start_time; + osmo_gettimeofday_override = true; + clock_override = osmo_clock_override_gettimespec(CLOCK_MONOTONIC); + OSMO_ASSERT(clock_override); + clock_override->tv_sec = fake_time_start_time.tv_sec; + clock_override->tv_nsec = fake_time_start_time.tv_usec * 1000; + osmo_clock_override_enable(CLOCK_MONOTONIC, true); + fake_time_passes(0, 0); +} +static void test_server_client() +{ + fprintf(stderr, "-- %s --\n", __func__); + server_init(); + client_init(); + client_query(); + + /* Let the server receive the query and indirectly call server_recv(). As side effect of using the same IP and + * port, the client will also receive its own question. The client will dismiss its own question, as it is just + * looking for answers. */ + OSMO_ASSERT(osmo_select_main_ctx(1) == 1); + + /* Let the mslookup client receive the answer (also same side effect as above). It does not call the callback + * (client_recv()) just yet, because it is waiting for the best result within two seconds. */ + OSMO_ASSERT(osmo_select_main_ctx(1) == 1); + + /* Time flies by, client_recv() gets called. */ + fake_time_passes(5, 0); + + server_stop(); + client_stop(); +} + +/* + * Run all tests + */ +int main() +{ + talloc_enable_null_tracking(); + ctx = talloc_named_const(NULL, 0, "main"); + osmo_init_logging2(ctx, NULL); + + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_level(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 0); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + log_set_category_filter(osmo_stderr_target, DMSLOOKUP, true, LOGL_DEBUG); + + fake_time_start(); + + test_server_client(); + + log_fini(); + + OSMO_ASSERT(talloc_total_blocks(ctx) == 1); + talloc_free(ctx); + OSMO_ASSERT(talloc_total_blocks(NULL) == 1); + talloc_disable_null_tracking(); + + return 0; +} diff --git a/tests/mslookup/mslookup_client_mdns_test.err b/tests/mslookup/mslookup_client_mdns_test.err new file mode 100644 index 0000000..b4ea269 --- /dev/null +++ b/tests/mslookup/mslookup_client_mdns_test.err @@ -0,0 +1,14 @@ +Total time passed: 0.000000 s +-- test_server_client -- +server_init +client_init +client_query +sending mDNS query: gsup.hlr.123456789012345.imsi +server_recv +received request +server_recv +client_recv +client_recv(): gsup.hlr.123456789012345.imsi -> ipv4: 42.42.42.42:444 -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last) +Total time passed: 5.000000 s +server_stop +client_stop diff --git a/tests/testsuite.at b/tests/testsuite.at index 39df7aa..827e9f8 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -40,6 +40,12 @@ AT_CHECK([$abs_srcdir/db_upgrade/db_upgrade_test.sh $abs_srcdir/db_upgrade $abs_builddir/db_upgrade], [], [expout], [experr]) AT_CLEANUP +AT_SETUP([mdns]) +AT_KEYWORDS([mdns]) +cat $abs_srcdir/mslookup/mdns_test.err > experr +AT_CHECK([$abs_top_builddir/tests/mslookup/mdns_test], [0], [ignore], [experr]) +AT_CLEANUP + AT_SETUP([mslookup]) AT_KEYWORDS([mslookup]) cat $abs_srcdir/mslookup/mslookup_test.err > experr @@ -51,3 +57,9 @@ cat $abs_srcdir/mslookup/mslookup_client_test.err > experr AT_CHECK([$abs_top_builddir/tests/mslookup/mslookup_client_test], [0], [ignore], [experr]) AT_CLEANUP + +AT_SETUP([mslookup_client_mdns]) +AT_KEYWORDS([mslookup_client_mdns]) +cat $abs_srcdir/mslookup/mslookup_client_mdns_test.err > experr +AT_CHECK([$abs_top_builddir/tests/mslookup/mslookup_client_mdns_test], [0], [ignore], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 Gerrit-Change-Number: 16256 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 06:13:34 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 06:13:34 +0000 Subject: Change in osmo-hlr[master]: D-GSM 2/n: implement mDNS method of mslookup server References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16257 ) Change subject: D-GSM 2/n: implement mDNS method of mslookup server ...................................................................... D-GSM 2/n: implement mDNS method of mslookup server Implement the mslookup server's mDNS responder, to actually service remote mslookup requests: - VTY mslookup/server config with service names, - the mslookup_mdns_server listening for mslookup requests, For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: I5cae6459090588b4dd292be90a5e8903432669d2 --- M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_vty.h M include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/mslookup_server_mdns.h M src/Makefile.am A src/dgsm_vty.c M src/hlr.c A src/mslookup_server_mdns.c 9 files changed, 509 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/57/16257/1 diff --git a/include/osmocom/hlr/Makefile.am b/include/osmocom/hlr/Makefile.am index 5c96ec8..b24f084 100644 --- a/include/osmocom/hlr/Makefile.am +++ b/include/osmocom/hlr/Makefile.am @@ -11,6 +11,7 @@ logging.h \ lu_fsm.h \ mslookup_server.h \ + mslookup_server_mdns.h \ rand.h \ timestamp.h \ $(NULL) diff --git a/include/osmocom/hlr/hlr.h b/include/osmocom/hlr/hlr.h index 5a10856..8bc7def 100644 --- a/include/osmocom/hlr/hlr.h +++ b/include/osmocom/hlr/hlr.h @@ -26,6 +26,7 @@ #include #include #include +#include #define HLR_DEFAULT_DB_FILE_PATH "hlr.db" @@ -70,9 +71,19 @@ unsigned int subscr_create_on_demand_rand_msisdn_len; struct { + bool allow_startup; struct { + /* Whether the mslookup server should be active in general (all lookup methods) */ + bool enable; uint32_t local_attach_max_age; struct llist_head local_site_services; + struct { + /* Whether the mDNS method of the mslookup server should be active. */ + bool enable; + /* The mDNS bind address as set by the VTY, not necessarily in use. */ + struct osmo_sockaddr_str bind_addr; + struct osmo_mslookup_server_mdns *running; + } mdns; } server; } mslookup; }; diff --git a/include/osmocom/hlr/hlr_vty.h b/include/osmocom/hlr/hlr_vty.h index acd6510..c026d91 100644 --- a/include/osmocom/hlr/hlr_vty.h +++ b/include/osmocom/hlr/hlr_vty.h @@ -31,8 +31,13 @@ HLR_NODE = _LAST_OSMOVTY_NODE + 1, GSUP_NODE, EUSE_NODE, + MSLOOKUP_NODE, + MSLOOKUP_SERVER_NODE, + MSLOOKUP_SERVER_MSC_NODE, + MSLOOKUP_CLIENT_NODE, }; int hlr_vty_is_config_node(struct vty *vty, int node); int hlr_vty_go_parent(struct vty *vty); void hlr_vty_init(void); +void dgsm_vty_init(void); diff --git a/include/osmocom/hlr/mslookup_server.h b/include/osmocom/hlr/mslookup_server.h index c8f5c54..1f36345 100644 --- a/include/osmocom/hlr/mslookup_server.h +++ b/include/osmocom/hlr/mslookup_server.h @@ -1,5 +1,8 @@ #pragma once +#include +#include + struct osmo_mslookup_query; struct osmo_mslookup_result; @@ -41,7 +44,6 @@ extern const struct osmo_gt mslookup_server_msc_wildcard; struct mslookup_server_msc_cfg *mslookup_server_msc_get(const struct osmo_gt *msc_name, bool create); - struct mslookup_service_host *mslookup_server_get_local_gsup_addr(); void mslookup_server_rx(const struct osmo_mslookup_query *query, struct osmo_mslookup_result *result); diff --git a/include/osmocom/hlr/mslookup_server_mdns.h b/include/osmocom/hlr/mslookup_server_mdns.h new file mode 100644 index 0000000..85117b8 --- /dev/null +++ b/include/osmocom/hlr/mslookup_server_mdns.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include +#include + +struct osmo_mslookup_server_mdns { + struct osmo_mslookup_server *mslookup; + struct osmo_sockaddr_str bind_addr; + struct osmo_mdns_sock *sock; +}; + +struct osmo_mslookup_server_mdns *osmo_mslookup_server_mdns_start(void *ctx, const struct osmo_sockaddr_str *bind_addr); +void osmo_mslookup_server_mdns_stop(struct osmo_mslookup_server_mdns *server); +void mslookup_server_mdns_config_apply(); diff --git a/src/Makefile.am b/src/Makefile.am index 26fafba..a03aeff 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -54,8 +54,10 @@ gsup_send.c \ hlr_ussd.c \ lu_fsm.c \ - mslookup_server.c \ timestamp.c \ + mslookup_server.c \ + mslookup_server_mdns.c \ + dgsm_vty.c \ $(NULL) osmo_hlr_LDADD = \ diff --git a/src/dgsm_vty.c b/src/dgsm_vty.c new file mode 100644 index 0000000..7cbc257 --- /dev/null +++ b/src/dgsm_vty.c @@ -0,0 +1,336 @@ +#include +#include +#include +#include +#include +#include +#include + +struct cmd_node mslookup_node = { + MSLOOKUP_NODE, + "%s(config-mslookup)# ", + 1, +}; + +DEFUN(cfg_mslookup, + cfg_mslookup_cmd, + "mslookup", + "Configure Distributed GSM mslookup") +{ + vty->node = MSLOOKUP_NODE; + return CMD_SUCCESS; +} + +static int mslookup_server_mdns_bind(struct vty *vty, int argc, const char **argv) +{ + const char *ip_str = argc > 0? argv[0] : g_hlr->mslookup.server.mdns.bind_addr.ip; + const char *port_str = argc > 1? argv[1] : NULL; + uint16_t port_nr = port_str ? atoi(port_str) : g_hlr->mslookup.server.mdns.bind_addr.port; + struct osmo_sockaddr_str addr; + if (osmo_sockaddr_str_from_str(&addr, ip_str, port_nr) + || !osmo_sockaddr_str_is_nonzero(&addr)) { + vty_out(vty, "%% mslookup server: Invalid mDNS bind address: %s %u%s", + ip_str, port_nr, VTY_NEWLINE); + return CMD_WARNING; + } + + g_hlr->mslookup.server.mdns.bind_addr = addr; + g_hlr->mslookup.server.mdns.enable = true; + g_hlr->mslookup.server.enable = true; + mslookup_server_mdns_config_apply(); + return CMD_SUCCESS; +} + +#define MDNS_IP46_STR "multicast IPv4 address like " OSMO_MSLOOKUP_MDNS_IP4 \ + " or IPv6 address like " OSMO_MSLOOKUP_MDNS_IP6 "\n" +#define MDNS_PORT_STR "mDNS UDP Port number\n" +#define IP46_STR "IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1\n" +#define PORT_STR "Service-specific port number\n" + +struct cmd_node mslookup_server_node = { + MSLOOKUP_SERVER_NODE, + "%s(config-mslookup-server)# ", + 1, +}; + +DEFUN(cfg_mslookup_server, + cfg_mslookup_server_cmd, + "server", + "Enable and configure Distributed GSM mslookup server") +{ + vty->node = MSLOOKUP_SERVER_NODE; + g_hlr->mslookup.server.enable = true; + mslookup_server_mdns_config_apply(); + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_no_server, + cfg_mslookup_no_server_cmd, + "no server", + NO_STR "Disable Distributed GSM mslookup server") +{ + g_hlr->mslookup.server.enable = false; + mslookup_server_mdns_config_apply(); + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_server_mdns_bind, + cfg_mslookup_server_mdns_bind_cmd, + "mdns [IP] [<1-65535>]", + "Configure where the mDNS server listens for mslookup requests\n" + MDNS_IP46_STR MDNS_PORT_STR) +{ + return mslookup_server_mdns_bind(vty, argc, argv); +} + +DEFUN(cfg_mslookup_server_no_mdns, + cfg_mslookup_server_no_mdns_cmd, + "no mdns", + NO_STR "Disable server for mDNS mslookup (do not answer remote requests)\n") +{ + g_hlr->mslookup.server.mdns.enable = false; + mslookup_server_mdns_config_apply(); + return CMD_SUCCESS; +} + +struct cmd_node mslookup_server_msc_node = { + MSLOOKUP_SERVER_MSC_NODE, + "%s(config-mslookup-server-msc)# ", + 1, +}; + +DEFUN(cfg_mslookup_server_msc, + cfg_mslookup_server_msc_cmd, + "msc .UNIT_NAME", + "Configure services for individual local MSCs\n" + "IPA Unit Name of the local MSC to configure\n") +{ + struct osmo_gt msc_name; + struct mslookup_server_msc_cfg *msc; + osmo_gt_set_str(&msc_name, argv_concat(argv, argc, 0)); + + msc = mslookup_server_msc_get(&msc_name, true); + if (!msc) { + vty_out(vty, "%% Error creating MSC %s%s", osmo_gt_name(&msc_name), VTY_NEWLINE); + return CMD_WARNING; + } + vty->node = MSLOOKUP_SERVER_MSC_NODE; + vty->index = msc; + return CMD_SUCCESS; +} + +#define SERVICE_NAME_STR \ + "mslookup service name, e.g. sip.voice or smpp.sms\n" + +static struct mslookup_server_msc_cfg *msc_from_node(struct vty *vty) +{ + switch (vty->node) { + case MSLOOKUP_SERVER_NODE: + /* On the mslookup.server node, set services on the wildcard msc, without a particular name. */ + return mslookup_server_msc_get(&mslookup_server_msc_wildcard, true); + case MSLOOKUP_SERVER_MSC_NODE: + return vty->index; + default: + return NULL; + } +} + +DEFUN(cfg_mslookup_server_msc_service, + cfg_mslookup_server_msc_service_cmd, + "service NAME at IP <1-65535>", + "Configure addresses of local services, as sent in replies to remote mslookup requests.\n" + SERVICE_NAME_STR "at\n" IP46_STR PORT_STR) +{ + /* If this command is run on the 'server' node, it produces an empty unit name and serves as wildcard for all + * MSCs. If on a 'server' / 'msc' node, set services only for that MSC Unit Name. */ + struct mslookup_server_msc_cfg *msc = msc_from_node(vty); + const char *service = argv[0]; + const char *ip_str = argv[1]; + const char *port_str = argv[2]; + struct osmo_sockaddr_str addr; + + if (!msc) { + vty_out(vty, "%% Error: no MSC object on this node%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (osmo_sockaddr_str_from_str(&addr, ip_str, atoi(port_str)) + || !osmo_sockaddr_str_is_nonzero(&addr)) { + vty_out(vty, "%% mslookup server: Invalid address for service %s: %s %s%s", + service, ip_str, port_str, VTY_NEWLINE); + return CMD_WARNING; + } + + if (mslookup_server_msc_service_set(msc, service, &addr)) { + vty_out(vty, "%% mslookup server: Error setting service %s to %s %s%s", + service, ip_str, port_str, VTY_NEWLINE); + return CMD_WARNING; + } + return CMD_SUCCESS; +} + +#define NO_SERVICE_AND_NAME_STR NO_STR "Remove one or more service address entries\n" SERVICE_NAME_STR + +DEFUN(cfg_mslookup_server_msc_no_service, + cfg_mslookup_server_msc_no_service_cmd, + "no service NAME", + NO_SERVICE_AND_NAME_STR) +{ + /* If this command is run on the 'server' node, it produces an empty unit name and serves as wildcard for all + * MSCs. If on a 'server' / 'msc' node, set services only for that MSC Unit Name. */ + struct mslookup_server_msc_cfg *msc = msc_from_node(vty); + const char *service = argv[0]; + + if (!msc) { + vty_out(vty, "%% Error: no MSC object on this node%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (mslookup_server_msc_service_del(msc, service, NULL) < 1) { + vty_out(vty, "%% mslookup server: cannot remove service '%s'%s", + service, VTY_NEWLINE); + return CMD_WARNING; + } + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_server_msc_no_service_addr, + cfg_mslookup_server_msc_no_service_addr_cmd, + "no service NAME at IP <1-65535>", + NO_SERVICE_AND_NAME_STR "at\n" IP46_STR PORT_STR) +{ + /* If this command is run on the 'server' node, it produces an empty unit name and serves as wildcard for all + * MSCs. If on a 'server' / 'msc' node, set services only for that MSC Unit Name. */ + struct mslookup_server_msc_cfg *msc = msc_from_node(vty); + const char *service = argv[0]; + const char *ip_str = argv[1]; + const char *port_str = argv[2]; + struct osmo_sockaddr_str addr; + + if (!msc) { + vty_out(vty, "%% Error: no MSC object on this node%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (osmo_sockaddr_str_from_str(&addr, ip_str, atoi(port_str)) + || !osmo_sockaddr_str_is_nonzero(&addr)) { + vty_out(vty, "%% mslookup server: Invalid address for 'no service' %s: %s %s%s", + service, ip_str, port_str, VTY_NEWLINE); + return CMD_WARNING; + } + + if (mslookup_server_msc_service_del(msc, service, &addr) < 1) { + vty_out(vty, "%% mslookup server: cannot remove service '%s' to %s %s%s", + service, ip_str, port_str, VTY_NEWLINE); + return CMD_WARNING; + } + return CMD_SUCCESS; +} + +void config_write_msc_services(struct vty *vty, const char *indent, struct mslookup_server_msc_cfg *msc) +{ + struct mslookup_service_host *e; + + llist_for_each_entry(e, &msc->service_hosts, entry) { + if (osmo_sockaddr_str_is_nonzero(&e->host_v4)) + vty_out(vty, "%sservice %s at %s %u%s", indent, e->service, e->host_v4.ip, e->host_v4.port, + VTY_NEWLINE); + if (osmo_sockaddr_str_is_nonzero(&e->host_v6)) + vty_out(vty, "%sservice %s at %s %u%s", indent, e->service, e->host_v6.ip, e->host_v6.port, + VTY_NEWLINE); + } +} + +int config_write_mslookup(struct vty *vty) +{ + if (!g_hlr->mslookup.server.enable + && llist_empty(&g_hlr->mslookup.server.local_site_services)) + return CMD_SUCCESS; + + vty_out(vty, "mslookup%s", VTY_NEWLINE); + + if (g_hlr->mslookup.server.enable || !llist_empty(&g_hlr->mslookup.server.local_site_services)) { + struct mslookup_server_msc_cfg *msc; + + vty_out(vty, " server%s", VTY_NEWLINE); + + if (g_hlr->mslookup.server.mdns.enable + && osmo_sockaddr_str_is_nonzero(&g_hlr->mslookup.server.mdns.bind_addr)) + vty_out(vty, " mdns bind %s %u%s", + g_hlr->mslookup.server.mdns.bind_addr.ip, + g_hlr->mslookup.server.mdns.bind_addr.port, + VTY_NEWLINE); + + msc = mslookup_server_msc_get(&mslookup_server_msc_wildcard, false); + if (msc) + config_write_msc_services(vty, " ", msc); + + llist_for_each_entry(msc, &g_hlr->mslookup.server.local_site_services, entry) { + if (!osmo_gt_cmp(&mslookup_server_msc_wildcard, &msc->name)) + continue; + vty_out(vty, " msc %s%s", osmo_gt_name(&msc->name), VTY_NEWLINE); + config_write_msc_services(vty, " ", msc); + } + + /* If the server is disabled, still output the above to not lose the service config. */ + if (!g_hlr->mslookup.server.enable) + vty_out(vty, " no server%s", VTY_NEWLINE); + } + + return CMD_SUCCESS; +} + +DEFUN(do_mslookup_show_services, + do_mslookup_show_services_cmd, + "show mslookup services", + SHOW_STR "Distributed GSM / mslookup related information\n" + "List configured service addresses as sent to remote mslookup requests\n") +{ + struct mslookup_server_msc_cfg *msc; + struct mslookup_service_host *local_hlr = mslookup_server_get_local_gsup_addr(); + + vty_out(vty, "Local GSUP HLR address returned in mslookup responses for local IMSIs:"); + if (osmo_sockaddr_str_is_nonzero(&local_hlr->host_v4)) + vty_out(vty, " " OSMO_SOCKADDR_STR_FMT, + OSMO_SOCKADDR_STR_FMT_ARGS(&local_hlr->host_v4)); + if (osmo_sockaddr_str_is_nonzero(&local_hlr->host_v6)) + vty_out(vty, " " OSMO_SOCKADDR_STR_FMT, + OSMO_SOCKADDR_STR_FMT_ARGS(&local_hlr->host_v6)); + vty_out(vty, "%s", VTY_NEWLINE); + + msc = mslookup_server_msc_get(&mslookup_server_msc_wildcard, false); + if (msc) + config_write_msc_services(vty, "", msc); + + llist_for_each_entry(msc, &g_hlr->mslookup.server.local_site_services, entry) { + if (!osmo_gt_cmp(&mslookup_server_msc_wildcard, &msc->name)) + continue; + vty_out(vty, "msc %s%s", osmo_gt_name(&msc->name), VTY_NEWLINE); + config_write_msc_services(vty, " ", msc); + } + return CMD_SUCCESS; +} + +void dgsm_vty_init(void) +{ + install_element(CONFIG_NODE, &cfg_mslookup_cmd); + + install_node(&mslookup_node, config_write_mslookup); + install_element(MSLOOKUP_NODE, &cfg_mslookup_server_cmd); + install_element(MSLOOKUP_NODE, &cfg_mslookup_no_server_cmd); + + install_node(&mslookup_server_node, NULL); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_mdns_bind_cmd); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_no_mdns_cmd); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_msc_service_cmd); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_msc_no_service_cmd); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_msc_no_service_addr_cmd); + install_element(MSLOOKUP_SERVER_NODE, &cfg_mslookup_server_msc_cmd); + + install_node(&mslookup_server_msc_node, NULL); + install_element(MSLOOKUP_SERVER_MSC_NODE, &cfg_mslookup_server_msc_service_cmd); + install_element(MSLOOKUP_SERVER_MSC_NODE, &cfg_mslookup_server_msc_no_service_cmd); + install_element(MSLOOKUP_SERVER_MSC_NODE, &cfg_mslookup_server_msc_no_service_addr_cmd); + + install_element_ve(&do_mslookup_show_services_cmd); +} diff --git a/src/hlr.c b/src/hlr.c index 6a55100..b19acf8 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -698,6 +698,7 @@ ctrl_vty_init(hlr_ctx); handle_options(argc, argv); hlr_vty_init(); + dgsm_vty_init(); rc = vty_read_config_file(cmdline_opts.config_file, NULL); if (rc < 0) { diff --git a/src/mslookup_server_mdns.c b/src/mslookup_server_mdns.c new file mode 100644 index 0000000..50c13f1 --- /dev/null +++ b/src/mslookup_server_mdns.c @@ -0,0 +1,134 @@ +#include +#include + +#include +#include +#include +#include +#include +#include + +static void osmo_mslookup_server_mdns_tx(struct osmo_mslookup_server_mdns *server, + uint16_t packet_id, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + struct msgb *msg; + const char *errmsg = NULL; + void *ctx = talloc_named_const(server, 0, __func__); + + msg = osmo_mdns_result_encode(ctx, packet_id, query, result); + if (!msg) + errmsg = "Error encoding mDNS answer packet"; + else if (osmo_mdns_sock_send(server->sock, msg)) + errmsg = "Error sending mDNS answer"; + if (errmsg) + LOGP(DMSLOOKUP, LOGL_ERROR, "%s: mDNS: %s\n", osmo_mslookup_result_name_c(ctx, query, result), errmsg); + talloc_free(ctx); +} + +static void osmo_mslookup_server_mdns_handle_request(uint16_t packet_id, + struct osmo_mslookup_server_mdns *server, + const struct osmo_mslookup_query *query) +{ + struct osmo_mslookup_result result; + + mslookup_server_rx(query, &result); + /* Error logging already happens in mslookup_server_rx() */ + if (result.rc != OSMO_MSLOOKUP_RC_RESULT) + return; + + osmo_mslookup_server_mdns_tx(server, packet_id, query, &result); +} + +static int osmo_mslookup_server_mdns_rx(struct osmo_fd *osmo_fd, unsigned int what) +{ + struct osmo_mslookup_server_mdns *server = osmo_fd->data; + struct osmo_mslookup_query *query; + uint16_t packet_id; + int n; + uint8_t buffer[1024]; + void *ctx; + + /* Parse the message and print it */ + n = read(osmo_fd->fd, buffer, sizeof(buffer)); + if (n < 0) + return n; + + ctx = talloc_named_const(server, 0, __func__); + query = osmo_mdns_query_decode(ctx, buffer, n, &packet_id); + if (!query) { + talloc_free(ctx); + return -1; + } + + osmo_mslookup_id_name_buf((char *)buffer, sizeof(buffer), &query->id); + LOGP(DMSLOOKUP, LOGL_DEBUG, "mDNS rx request: %s.%s\n", query->service, buffer); + osmo_mslookup_server_mdns_handle_request(packet_id, server, query); + talloc_free(ctx); + return n; +} + +struct osmo_mslookup_server_mdns *osmo_mslookup_server_mdns_start(void *ctx, const struct osmo_sockaddr_str *bind_addr) +{ + struct osmo_mslookup_server_mdns *server = talloc_zero(ctx, struct osmo_mslookup_server_mdns); + OSMO_ASSERT(server); + *server = (struct osmo_mslookup_server_mdns){ + .bind_addr = *bind_addr, + }; + + server->sock = osmo_mdns_sock_init(server, + bind_addr->ip, bind_addr->port, + osmo_mslookup_server_mdns_rx, + server, 0); + if (!server->sock) { + LOGP(DMSLOOKUP, LOGL_ERROR, + "mslookup mDNS server: error initializing multicast bind on " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(bind_addr)); + talloc_free(server); + return NULL; + } + + return server; +} + +void osmo_mslookup_server_mdns_stop(struct osmo_mslookup_server_mdns *server) +{ + if (!server) + return; + osmo_mdns_sock_cleanup(server->sock); + talloc_free(server); +} + +void mslookup_server_mdns_config_apply() +{ + /* Check whether to start/stop/restart mDNS server */ + bool should_run; + bool should_stop; + if (!g_hlr->mslookup.allow_startup) + return; + + should_run = g_hlr->mslookup.server.enable && g_hlr->mslookup.server.mdns.enable; + should_stop = g_hlr->mslookup.server.mdns.running + && (!should_run + || osmo_sockaddr_str_cmp(&g_hlr->mslookup.server.mdns.bind_addr, + &g_hlr->mslookup.server.mdns.running->bind_addr)); + + if (should_stop) { + osmo_mslookup_server_mdns_stop(g_hlr->mslookup.server.mdns.running); + g_hlr->mslookup.server.mdns.running = NULL; + LOGP(DMSLOOKUP, LOGL_NOTICE, "Stopped mslookup mDNS server\n"); + } + + if (should_run && !g_hlr->mslookup.server.mdns.running) { + g_hlr->mslookup.server.mdns.running = + osmo_mslookup_server_mdns_start(g_hlr, &g_hlr->mslookup.server.mdns.bind_addr); + if (!g_hlr->mslookup.server.mdns.running) + LOGP(DMSLOOKUP, LOGL_ERROR, "Failed to start mslookup mDNS server on " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&g_hlr->mslookup.server.mdns.running->bind_addr)); + else + LOGP(DMSLOOKUP, LOGL_NOTICE, "Started mslookup mDNS server, receiving mDNS requests at multicast " + OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&g_hlr->mslookup.server.mdns.running->bind_addr)); + } +} -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5cae6459090588b4dd292be90a5e8903432669d2 Gerrit-Change-Number: 16257 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 06:13:34 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 06:13:34 +0000 Subject: Change in osmo-hlr[master]: D-GSM 3/n: implement roaming by mslookup in osmo-hlr References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16258 ) Change subject: D-GSM 3/n: implement roaming by mslookup in osmo-hlr ...................................................................... D-GSM 3/n: implement roaming by mslookup in osmo-hlr Add mslookup client to find remote home HLRs of unknown IMSIs, and proxy/forward GSUP for those to the right remote HLR instances. Add remote_hlr.c to manage one GSUP client per remote HLR GSUP address. Add proxy.c to keep state about remotely handled IMSIs (remote GSUP address, MSISDN, and probably more in future patches). The mslookup_server that determines whether a given MSISDN is attached locally now also needs to look in the proxy record: it is always the osmo-hlr immediately peering for the MSC that should respond to mslookup service address queries like SIP and SMPP. (Only gsup.hlr service is always answered by the home HLR.) Add dgsm.c to set up an mdns mslookup client, ask for IMSI homes, and to decide which GSUP is handled locally and which needs to go to a remote HLR. Add full VTY config and VTY tests. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: I2fe453553c90e6ee527ed13a13089900efd488aa --- M include/osmocom/hlr/Makefile.am A include/osmocom/hlr/dgsm.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/proxy.h A include/osmocom/hlr/remote_hlr.h M src/Makefile.am A src/dgsm.c M src/dgsm_vty.c M src/hlr.c M src/hlr_vty.c M src/logging.c M src/mslookup_server.c M src/mslookup_server_mdns.c A src/proxy.c A src/remote_hlr.c M tests/test_nodes.vty M tests/test_subscriber.vty 19 files changed, 1,738 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/58/16258/1 diff --git a/include/osmocom/hlr/Makefile.am b/include/osmocom/hlr/Makefile.am index b24f084..aceda4a 100644 --- a/include/osmocom/hlr/Makefile.am +++ b/include/osmocom/hlr/Makefile.am @@ -2,6 +2,7 @@ auc.h \ ctrl.h \ db.h \ + dgsm.h \ gsup_router.h \ gsup_server.h \ hlr.h \ @@ -12,6 +13,8 @@ lu_fsm.h \ mslookup_server.h \ mslookup_server_mdns.h \ + proxy.h \ rand.h \ + remote_hlr.h \ timestamp.h \ $(NULL) diff --git a/include/osmocom/hlr/dgsm.h b/include/osmocom/hlr/dgsm.h new file mode 100644 index 0000000..24e30fe --- /dev/null +++ b/include/osmocom/hlr/dgsm.h @@ -0,0 +1,26 @@ +#pragma once + +#include +#include +#include +#include + +#define LOG_DGSM(imsi, level, fmt, args...) \ + LOGP(DDGSM, level, "(IMSI-%s) " fmt, imsi, ##args) + +struct vty; +struct remote_hlr; +struct hlr_subscriber; + +extern void *dgsm_ctx; + +void dgsm_init(void *ctx); +void dgsm_start(void *ctx); +void dgsm_stop(); + +bool dgsm_check_forward_gsup_msg(struct osmo_gsup_req *req); + +void dgsm_vty_init(); +void dgsm_mdns_client_config_apply(void); + +bool hlr_subscr_lu_age(const struct hlr_subscriber *subscr, uint32_t *age_p); diff --git a/include/osmocom/hlr/gsup_server.h b/include/osmocom/hlr/gsup_server.h index c3efea2..7002da0 100644 --- a/include/osmocom/hlr/gsup_server.h +++ b/include/osmocom/hlr/gsup_server.h @@ -27,6 +27,9 @@ struct ipa_server_link *link; osmo_gsup_read_cb_t read_cb; struct llist_head routes; + + /* Proxy requests from this server's clients to remote GSUP servers. */ + struct proxy *proxy; }; diff --git a/include/osmocom/hlr/hlr.h b/include/osmocom/hlr/hlr.h index 8bc7def..cc7d52e 100644 --- a/include/osmocom/hlr/hlr.h +++ b/include/osmocom/hlr/hlr.h @@ -28,6 +28,8 @@ #include #include +#include + #define HLR_DEFAULT_DB_FILE_PATH "hlr.db" struct hlr_euse; @@ -85,6 +87,28 @@ struct osmo_mslookup_server_mdns *running; } mdns; } server; + + /* The mslookup client in osmo-hlr is used to find out which remote HLRs service a locally unknown IMSI. + * (It may also be used to resolve recipients for SMS-over-GSUP in the future.) */ + struct { + /* Whether to proxy/forward to remote HLRs */ + bool enable; + + /* If this is set, all GSUP for unknown IMSIs is forwarded directly to this GSUP address, + * unconditionally. */ + struct osmo_sockaddr_str gsup_gateway_proxy; + + /* mslookup client request handling */ + unsigned int result_timeout_milliseconds; + + struct osmo_mslookup_client *client; + struct { + /* Whether to use mDNS for IMSI MS Lookup */ + bool enable; + struct osmo_sockaddr_str query_addr; + struct osmo_mslookup_client_method *running; + } mdns; + } client; } mslookup; }; diff --git a/include/osmocom/hlr/logging.h b/include/osmocom/hlr/logging.h index 4e0a25c..a8081af 100644 --- a/include/osmocom/hlr/logging.h +++ b/include/osmocom/hlr/logging.h @@ -10,6 +10,7 @@ DSS, DMSLOOKUP, DLU, + DDGSM, }; extern const struct log_info hlr_log_info; diff --git a/include/osmocom/hlr/proxy.h b/include/osmocom/hlr/proxy.h new file mode 100644 index 0000000..0fd574c --- /dev/null +++ b/include/osmocom/hlr/proxy.h @@ -0,0 +1,83 @@ +#pragma once + +#include +#include +#include +#include +#include + +struct osmo_gsup_req; +struct remote_hlr; + +struct proxy_pending_gsup_req { + struct llist_head entry; + struct osmo_gsup_req *req; + timestamp_t received_at; +}; + +struct proxy { + struct llist_head subscr_list; + struct llist_head pending_gsup_reqs; + + /* When messages arrive back from a remote HLR that this is the proxy for, reach the VLR to forward the response + * to via this osmo_gsup_server. */ + struct osmo_gsup_server *gsup_server_to_vlr; + + /* How long to keep proxy entries without a refresh, in seconds. */ + uint32_t fresh_time; + + /* How often to garbage collect the proxy cache, period in seconds. + * To change this and take effect immediately, rather use proxy_set_gc_period(). */ + uint32_t gc_period; + + struct osmo_timer_list gc_timer; +}; + +struct proxy_subscr_domain_state { + struct osmo_gt vlr_name; + timestamp_t last_lu; + + /* The name from which an Update Location Request was received. Copied to vlr_name as soon as the LU is + * completed successfully. */ + struct osmo_gt vlr_name_preliminary; + + /* Set if this is a middle proxy, i.e. a proxy behind another proxy. + * That is mostly to know whether the MS is attached at a local MSC/SGSN or further away. + * It could be a boolean, but store the full name for logging. Set only at successful LU acceptance. */ + struct osmo_gt vlr_via_proxy; +}; + +struct proxy_subscr { + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; + char msisdn[GSM23003_MSISDN_MAX_DIGITS+1]; + struct osmo_sockaddr_str remote_hlr_addr; + struct proxy_subscr_domain_state cs, ps; +}; + +void proxy_init(struct osmo_gsup_server *gsup_server_to_vlr); +void proxy_del(struct proxy *proxy); +void proxy_set_gc_period(struct proxy *proxy, uint32_t gc_period); + +/* The API to access / modify proxy entries keeps the implementation opaque, to make sure that we can easily move proxy + * storage to SQLite db. */ +const struct proxy_subscr *proxy_subscr_get_by_imsi(struct proxy *proxy, const char *imsi); +const struct proxy_subscr *proxy_subscr_get_by_msisdn(struct proxy *proxy, const char *msisdn); +void proxy_subscrs_get_by_remote_hlr(struct proxy *proxy, const struct osmo_sockaddr_str *remote_hlr_addr, + bool (*yield)(struct proxy *proxy, const struct proxy_subscr *subscr, void *data), + void *data); +const struct proxy_subscr *proxy_subscr_get_by_imsi(struct proxy *proxy, const char *imsi); +int proxy_subscr_update(struct proxy *proxy, const struct proxy_subscr *proxy_subscr); +int proxy_subscr_del(struct proxy *proxy, const char *imsi); + +void proxy_subscr_forward_to_remote_hlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct osmo_gsup_req *req); +void proxy_subscr_forward_to_remote_hlr_resolved(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr, struct osmo_gsup_req *req); + +int proxy_subscr_forward_to_vlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + const struct osmo_gsup_message *gsup, struct remote_hlr *from_remote_hlr); + +void proxy_subscr_remote_hlr_resolved(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr); +void proxy_subscr_remote_hlr_up(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr); diff --git a/include/osmocom/hlr/remote_hlr.h b/include/osmocom/hlr/remote_hlr.h new file mode 100644 index 0000000..bfa3d95 --- /dev/null +++ b/include/osmocom/hlr/remote_hlr.h @@ -0,0 +1,29 @@ +#pragma once + +#include +#include +#include + +struct osmo_gsup_client; +struct osmo_gsup_message; +struct osmo_gsup_req; +struct msgb; + +#define LOG_REMOTE_HLR(remote_hlr, level, fmt, args...) \ + LOGP(DDGSM, level, "(Proxy HLR-" OSMO_SOCKADDR_STR_FMT ") " fmt, \ + OSMO_SOCKADDR_STR_FMT_ARGS((remote_hlr) ? &(remote_hlr)->addr : NULL), ##args) + +#define LOG_REMOTE_HLR_MSG(remote_hlr, gsup_msg, level, fmt, args...) \ + LOG_REMOTE_HLR(remote_hlr, level, "%s: " fmt, osmo_gsup_message_type_name((gsup_msg)->message_type), ##args) + +/* GSUP client link for proxying to a remote HLR. */ +struct remote_hlr { + struct llist_head entry; + struct osmo_sockaddr_str addr; + struct osmo_gsup_client *gsupc; +}; + +struct remote_hlr *remote_hlr_get(const struct osmo_sockaddr_str *addr, bool create); +void remote_hlr_destroy(struct remote_hlr *remote_hlr); +int remote_hlr_msgb_send(struct remote_hlr *remote_hlr, struct msgb *msg); +void remote_hlr_gsup_forward_to_remote_hlr(struct remote_hlr *remote_hlr, struct osmo_gsup_req *req); diff --git a/src/Makefile.am b/src/Makefile.am index a03aeff..0a07aaf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -53,6 +53,9 @@ hlr_vty_subscr.c \ gsup_send.c \ hlr_ussd.c \ + proxy.c \ + dgsm.c \ + remote_hlr.c \ lu_fsm.c \ timestamp.c \ mslookup_server.c \ diff --git a/src/dgsm.c b/src/dgsm.c new file mode 100644 index 0000000..5e0d494 --- /dev/null +++ b/src/dgsm.c @@ -0,0 +1,247 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void *dgsm_ctx = NULL; + +static void resolve_hlr_result_cb(struct osmo_mslookup_client *client, + uint32_t request_handle, + const struct osmo_mslookup_query *query, + const struct osmo_mslookup_result *result) +{ + struct proxy *proxy = g_hlr->gs->proxy; + const struct proxy_subscr *proxy_subscr; + const struct osmo_sockaddr_str *use_addr; + struct remote_hlr *remote_hlr; + + /* A remote HLR is answering back, indicating that it is the home HLR for a given IMSI. + * There should be a mostly empty proxy entry for that IMSI. + * Add the remote address data in the proxy. */ + if (query->id.type != OSMO_MSLOOKUP_ID_IMSI) { + LOGP(DDGSM, LOGL_ERROR, "Expected IMSI ID type in mslookup query+result: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, result)); + return; + } + + if (result->rc != OSMO_MSLOOKUP_RC_RESULT) { + LOG_DGSM(query->id.imsi, LOGL_ERROR, "Failed to resolve remote HLR: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, result)); + proxy_subscr_del(proxy, query->id.imsi); + return; + } + + if (osmo_sockaddr_str_is_nonzero(&result->host_v4)) + use_addr = &result->host_v4; + else if (osmo_sockaddr_str_is_nonzero(&result->host_v6)) + use_addr = &result->host_v6; + else { + LOG_DGSM(query->id.imsi, LOGL_ERROR, "Invalid address for remote HLR: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, result)); + proxy_subscr_del(proxy, query->id.imsi); + return; + } + + remote_hlr = remote_hlr_get(use_addr, true); + if (!remote_hlr) { + proxy_subscr_del(proxy, query->id.imsi); + return; + } + + proxy_subscr = proxy_subscr_get_by_imsi(proxy, query->id.imsi); + if (!proxy_subscr) { + LOG_DGSM(query->id.imsi, LOGL_ERROR, "No proxy entry for mslookup result: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, result)); + return; + } + + /* The remote HLR already exists and is connected. Messages for this IMSI were spooled because we did not know + * which remote HLR was responsible. Now we know, send this IMSI's messages now. */ + LOG_DGSM(query->id.imsi, LOGL_DEBUG, "Resolved remote HLR, sending spooled GSUP messages: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, result)); + + proxy_subscr_remote_hlr_resolved(proxy, proxy_subscr, remote_hlr); + + if (!remote_hlr->gsupc || !remote_hlr->gsupc->is_connected) { + LOG_REMOTE_HLR(remote_hlr, LOGL_DEBUG, "Waiting for link-up\n"); + return; + } + proxy_subscr_remote_hlr_up(proxy, proxy_subscr, remote_hlr); +} + +/* Return true when the message has been handled by D-GSM. */ +bool dgsm_check_forward_gsup_msg(struct osmo_gsup_req *req) +{ + const struct proxy_subscr *proxy_subscr; + struct proxy_subscr proxy_subscr_new; + struct proxy *proxy = g_hlr->gs->proxy; + struct osmo_mslookup_query query; + struct osmo_mslookup_query_handling handling; + uint32_t request_handle; + + /* If the IMSI is known in the local HLR, then we won't proxy. */ + if (db_subscr_exists_by_imsi(g_hlr->dbc, req->gsup.imsi) == 0) + return false; + + /* Are we already forwarding this IMSI to a remote HLR? */ + proxy_subscr = proxy_subscr_get_by_imsi(proxy, req->gsup.imsi); + if (proxy_subscr) + goto yes_we_are_proxying; + + /* The IMSI is not known locally, so we want to proxy to a remote HLR, but no proxy entry exists yet. We need to + * look up the subscriber in remote HLRs via D-GSM mslookup, forward GSUP and reply once a result is back from + * there. Defer message and kick off MS lookup. */ + + /* Add a proxy entry without a remote address to indicate that we are busy querying for a remote HLR. */ + proxy_subscr_new = (struct proxy_subscr){}; + OSMO_STRLCPY_ARRAY(proxy_subscr_new.imsi, req->gsup.imsi); + proxy_subscr = &proxy_subscr_new; + if (proxy_subscr_update(proxy, proxy_subscr)) { + LOG_DGSM(req->gsup.imsi, LOGL_ERROR, "Failed to create proxy entry\n"); + return false; + } + + /* Is a fixed gateway proxy configured? */ + if (osmo_sockaddr_str_is_nonzero(&g_hlr->mslookup.client.gsup_gateway_proxy)) { + struct remote_hlr *gsup_gateway_proxy = remote_hlr_get(&g_hlr->mslookup.client.gsup_gateway_proxy, true); + if (!gsup_gateway_proxy) { + LOG_DGSM(req->gsup.imsi, LOGL_ERROR, + "Failed to set up fixed gateway proxy " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&g_hlr->mslookup.client.gsup_gateway_proxy)); + return false; + } + + proxy_subscr_remote_hlr_resolved(proxy, proxy_subscr, gsup_gateway_proxy); + + /* Update info */ + proxy_subscr = proxy_subscr_get_by_imsi(proxy, req->gsup.imsi); + if (!proxy_subscr) { + LOG_DGSM(req->gsup.imsi, LOGL_ERROR, "Proxy entry disappeared\n"); + return false; + } + goto yes_we_are_proxying; + } + + /* Kick off an mslookup for the remote HLR. */ + if (!g_hlr->mslookup.client.client) { + LOG_GSUP_REQ(req, LOGL_DEBUG, "mslookup client not running, cannot query remote home HLR\n"); + return false; + } + + query = (struct osmo_mslookup_query){ + .id = { + .type = OSMO_MSLOOKUP_ID_IMSI, + } + }; + OSMO_STRLCPY_ARRAY(query.id.imsi, req->gsup.imsi); + OSMO_STRLCPY_ARRAY(query.service, OSMO_MSLOOKUP_SERVICE_HLR_GSUP); + handling = (struct osmo_mslookup_query_handling){ + .min_delay_milliseconds = g_hlr->mslookup.client.result_timeout_milliseconds, + .result_cb = resolve_hlr_result_cb, + }; + request_handle = osmo_mslookup_client_request(g_hlr->mslookup.client.client, &query, &handling); + if (!request_handle) { + LOG_DGSM(req->gsup.imsi, LOGL_ERROR, "Error dispatching mslookup query for home HLR: %s\n", + osmo_mslookup_result_name_c(OTC_SELECT, &query, NULL)); + proxy_subscr_del(proxy, req->gsup.imsi); + return false; + } + +yes_we_are_proxying: + OSMO_ASSERT(proxy_subscr); + + /* If the remote HLR is already known, directly forward the GSUP message; otherwise, spool the GSUP message + * until the remote HLR will respond / until timeout aborts. */ + proxy_subscr_forward_to_remote_hlr(proxy, proxy_subscr, req); + return true; +} + +void dgsm_init(void *ctx) +{ + dgsm_ctx = talloc_named_const(ctx, 0, "dgsm"); + INIT_LLIST_HEAD(&g_hlr->mslookup.server.local_site_services); + + g_hlr->mslookup.server.local_attach_max_age = 60 * 60; + + g_hlr->mslookup.client.result_timeout_milliseconds = 2000; + + g_hlr->gsup_unit_name.unit_name = "HLR"; + g_hlr->gsup_unit_name.serno = "unnamed-HLR"; + g_hlr->gsup_unit_name.swversion = PACKAGE_NAME "-" PACKAGE_VERSION; + + osmo_sockaddr_str_from_str(&g_hlr->mslookup.server.mdns.bind_addr, + OSMO_MSLOOKUP_MDNS_IP4, OSMO_MSLOOKUP_MDNS_PORT); + osmo_sockaddr_str_from_str(&g_hlr->mslookup.client.mdns.query_addr, + OSMO_MSLOOKUP_MDNS_IP4, OSMO_MSLOOKUP_MDNS_PORT); +} + +void dgsm_start(void *ctx) +{ + g_hlr->mslookup.client.client = osmo_mslookup_client_new(dgsm_ctx); + OSMO_ASSERT(g_hlr->mslookup.client.client); + g_hlr->mslookup.allow_startup = true; + mslookup_server_mdns_config_apply(); + dgsm_mdns_client_config_apply(); +} + +void dgsm_stop() +{ + g_hlr->mslookup.allow_startup = false; + mslookup_server_mdns_config_apply(); + dgsm_mdns_client_config_apply(); +} + +void dgsm_mdns_client_config_apply(void) +{ + /* Check whether to start/stop/restart mDNS client */ + const struct osmo_sockaddr_str *current_bind_addr; + current_bind_addr = osmo_mslookup_client_method_mdns_get_bind_addr(g_hlr->mslookup.client.mdns.running); + + bool should_run = g_hlr->mslookup.allow_startup + && g_hlr->mslookup.client.enable && g_hlr->mslookup.client.mdns.enable; + + bool should_stop = g_hlr->mslookup.client.mdns.running && + (!should_run + || osmo_sockaddr_str_cmp(&g_hlr->mslookup.client.mdns.query_addr, + current_bind_addr)); + + if (should_stop) { + osmo_mslookup_client_method_del(g_hlr->mslookup.client.client, g_hlr->mslookup.client.mdns.running); + g_hlr->mslookup.client.mdns.running = NULL; + LOGP(DDGSM, LOGL_NOTICE, "Stopped mslookup mDNS client\n"); + } + + if (should_run && !g_hlr->mslookup.client.mdns.running) { + g_hlr->mslookup.client.mdns.running = + osmo_mslookup_client_add_mdns(g_hlr->mslookup.client.client, + g_hlr->mslookup.client.mdns.query_addr.ip, + g_hlr->mslookup.client.mdns.query_addr.port, + -1); + if (!g_hlr->mslookup.client.mdns.running) + LOGP(DDGSM, LOGL_ERROR, "Failed to start mslookup mDNS client with target " + OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&g_hlr->mslookup.client.mdns.query_addr)); + else + LOGP(DDGSM, LOGL_NOTICE, "Started mslookup mDNS client, sending mDNS requests to multicast " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&g_hlr->mslookup.client.mdns.query_addr)); + } + + if (g_hlr->mslookup.client.enable && osmo_sockaddr_str_is_nonzero(&g_hlr->mslookup.client.gsup_gateway_proxy)) + LOGP(DDGSM, LOGL_NOTICE, + "mslookup client: all GSUP requests for unknown IMSIs will be forwarded to" + " gateway-proxy " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&g_hlr->mslookup.client.gsup_gateway_proxy)); +} diff --git a/src/dgsm_vty.c b/src/dgsm_vty.c index 7cbc257..68222ca 100644 --- a/src/dgsm_vty.c +++ b/src/dgsm_vty.c @@ -41,12 +41,57 @@ return CMD_SUCCESS; } +static int mslookup_client_mdns_to(struct vty *vty, int argc, const char **argv) +{ + const char *ip_str = argc > 0? argv[0] : g_hlr->mslookup.client.mdns.query_addr.ip; + const char *port_str = argc > 1? argv[1] : NULL; + uint16_t port_nr = port_str ? atoi(port_str) : g_hlr->mslookup.client.mdns.query_addr.port; + struct osmo_sockaddr_str addr; + if (osmo_sockaddr_str_from_str(&addr, ip_str, port_nr) + || !osmo_sockaddr_str_is_nonzero(&addr)) { + vty_out(vty, "%% mslookup client: Invalid mDNS target address: %s %u%s", + ip_str, port_nr, VTY_NEWLINE); + return CMD_WARNING; + } + + g_hlr->mslookup.client.mdns.query_addr = addr; + g_hlr->mslookup.client.mdns.enable = true; + g_hlr->mslookup.client.enable = true; + dgsm_mdns_client_config_apply(); + return CMD_SUCCESS; +} + #define MDNS_IP46_STR "multicast IPv4 address like " OSMO_MSLOOKUP_MDNS_IP4 \ " or IPv6 address like " OSMO_MSLOOKUP_MDNS_IP6 "\n" #define MDNS_PORT_STR "mDNS UDP Port number\n" #define IP46_STR "IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1\n" #define PORT_STR "Service-specific port number\n" +DEFUN(cfg_mslookup_mdns, + cfg_mslookup_mdns_cmd, + "mdns [IP] [<1-65535>]", + "Convenience shortcut: enable and configure both server and client for mDNS mslookup\n" + MDNS_IP46_STR MDNS_PORT_STR) +{ + int rc1 = mslookup_server_mdns_bind(vty, argc, argv); + int rc2 = mslookup_client_mdns_to(vty, argc, argv); + if (rc1 != CMD_SUCCESS) + return rc1; + return rc2; +} + +DEFUN(cfg_mslookup_no_mdns, + cfg_mslookup_no_mdns_cmd, + "no mdns", + NO_STR "Disable both server and client for mDNS mslookup\n") +{ + g_hlr->mslookup.server.mdns.enable = false; + g_hlr->mslookup.client.mdns.enable = false; + mslookup_server_mdns_config_apply(); + dgsm_mdns_client_config_apply(); + return CMD_SUCCESS; +} + struct cmd_node mslookup_server_node = { MSLOOKUP_SERVER_NODE, "%s(config-mslookup-server)# ", @@ -227,6 +272,68 @@ return CMD_SUCCESS; } +struct cmd_node mslookup_client_node = { + MSLOOKUP_CLIENT_NODE, + "%s(config-mslookup-client)# ", + 1, +}; + +DEFUN(cfg_mslookup_client, + cfg_mslookup_client_cmd, + "client", + "Enable and configure Distributed GSM mslookup client") +{ + vty->node = MSLOOKUP_CLIENT_NODE; + g_hlr->mslookup.client.enable = true; + dgsm_mdns_client_config_apply(); + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_no_client, + cfg_mslookup_no_client_cmd, + "no client", + NO_STR "Disable Distributed GSM mslookup client") +{ + g_hlr->mslookup.client.enable = false; + dgsm_mdns_client_config_apply(); + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_client_timeout, + cfg_mslookup_client_timeout_cmd, + "timeout <1-100000>", + "How long should the mslookup client wait for remote responses before evaluating received results\n" + "timeout in milliseconds\n") +{ + uint32_t val = atol(argv[0]); + g_hlr->mslookup.client.result_timeout_milliseconds = val; + return CMD_SUCCESS; +} + +#define EXIT_HINT() \ + if (vty->type != VTY_FILE) \ + vty_out(vty, "%% 'exit' this node to apply changes%s", VTY_NEWLINE) + + +DEFUN(cfg_mslookup_client_mdns, + cfg_mslookup_client_mdns_cmd, + "mdns [IP] [<1-65535>]", + "Enable mDNS client, and configure multicast address to send mDNS mslookup requests to\n" + MDNS_IP46_STR MDNS_PORT_STR) +{ + return mslookup_client_mdns_to(vty, argc, argv); +} + +DEFUN(cfg_mslookup_client_no_mdns, + cfg_mslookup_client_no_mdns_cmd, + "no mdns", + NO_STR "Disable mDNS client, do not query remote services by mDNS\n") +{ + g_hlr->mslookup.client.mdns.enable = false; + dgsm_mdns_client_config_apply(); + return CMD_SUCCESS; +} + void config_write_msc_services(struct vty *vty, const char *indent, struct mslookup_server_msc_cfg *msc) { struct mslookup_service_host *e; @@ -244,7 +351,8 @@ int config_write_mslookup(struct vty *vty) { if (!g_hlr->mslookup.server.enable - && llist_empty(&g_hlr->mslookup.server.local_site_services)) + && llist_empty(&g_hlr->mslookup.server.local_site_services) + && !g_hlr->mslookup.client.enable) return CMD_SUCCESS; vty_out(vty, "mslookup%s", VTY_NEWLINE); @@ -277,6 +385,53 @@ vty_out(vty, " no server%s", VTY_NEWLINE); } + if (g_hlr->mslookup.client.enable) { + vty_out(vty, " client%s", VTY_NEWLINE); + + if (osmo_sockaddr_str_is_nonzero(&g_hlr->mslookup.client.gsup_gateway_proxy)) + vty_out(vty, " gateway-proxy %s %u%s", + g_hlr->mslookup.client.gsup_gateway_proxy.ip, + g_hlr->mslookup.client.gsup_gateway_proxy.port, + VTY_NEWLINE); + + if (g_hlr->mslookup.client.mdns.enable + && osmo_sockaddr_str_is_nonzero(&g_hlr->mslookup.client.mdns.query_addr)) + vty_out(vty, " mdns to %s %u%s", + g_hlr->mslookup.client.mdns.query_addr.ip, + g_hlr->mslookup.client.mdns.query_addr.port, + VTY_NEWLINE); + } + + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_client_gateway_proxy, + cfg_mslookup_client_gateway_proxy_cmd, + "gateway-proxy IP [<1-65535>]", + "Configure a fixed IP address to send all GSUP requests for unknown IMSIs to, without invoking a lookup for IMSI\n" + "IP address of the remote HLR\n" "GSUP port number (omit for default " OSMO_STRINGIFY_VAL(OSMO_GSUP_PORT) ")\n") +{ + const char *ip_str = argv[0]; + const char *port_str = argc > 1 ? argv[1] : NULL; + struct osmo_sockaddr_str addr; + + if (osmo_sockaddr_str_from_str(&addr, ip_str, port_str ? atoi(port_str) : OSMO_GSUP_PORT) + || !osmo_sockaddr_str_is_nonzero(&addr)) { + vty_out(vty, "%% mslookup client: Invalid address for gateway-proxy: %s %s%s", + ip_str, port_str ? : "", VTY_NEWLINE); + return CMD_WARNING; + } + + g_hlr->mslookup.client.gsup_gateway_proxy = addr; + return CMD_SUCCESS; +} + +DEFUN(cfg_mslookup_client_no_gateway_proxy, + cfg_mslookup_client_no_gateway_proxy_cmd, + "no gateway-proxy", + NO_STR "Disable gateway proxy for GSUP with unknown IMSIs\n") +{ + g_hlr->mslookup.client.gsup_gateway_proxy = (struct osmo_sockaddr_str){}; return CMD_SUCCESS; } @@ -316,6 +471,8 @@ install_element(CONFIG_NODE, &cfg_mslookup_cmd); install_node(&mslookup_node, config_write_mslookup); + install_element(MSLOOKUP_NODE, &cfg_mslookup_mdns_cmd); + install_element(MSLOOKUP_NODE, &cfg_mslookup_no_mdns_cmd); install_element(MSLOOKUP_NODE, &cfg_mslookup_server_cmd); install_element(MSLOOKUP_NODE, &cfg_mslookup_no_server_cmd); @@ -332,5 +489,14 @@ install_element(MSLOOKUP_SERVER_MSC_NODE, &cfg_mslookup_server_msc_no_service_cmd); install_element(MSLOOKUP_SERVER_MSC_NODE, &cfg_mslookup_server_msc_no_service_addr_cmd); + install_element(MSLOOKUP_NODE, &cfg_mslookup_client_cmd); + install_element(MSLOOKUP_NODE, &cfg_mslookup_no_client_cmd); + install_node(&mslookup_client_node, NULL); + install_element(MSLOOKUP_CLIENT_NODE, &cfg_mslookup_client_timeout_cmd); + install_element(MSLOOKUP_CLIENT_NODE, &cfg_mslookup_client_mdns_cmd); + install_element(MSLOOKUP_CLIENT_NODE, &cfg_mslookup_client_no_mdns_cmd); + install_element(MSLOOKUP_CLIENT_NODE, &cfg_mslookup_client_gateway_proxy_cmd); + install_element(MSLOOKUP_CLIENT_NODE, &cfg_mslookup_client_no_gateway_proxy_cmd); + install_element_ve(&do_mslookup_show_services_cmd); } diff --git a/src/hlr.c b/src/hlr.c index b19acf8..ce1510f 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -47,6 +48,8 @@ #include #include #include +#include +#include #include struct hlr *g_hlr; @@ -489,6 +492,15 @@ } } + /* Distributed GSM: check whether to proxy for / lookup a remote HLR. + * It would require less database hits to do this only if a local-only operation fails with "unknown IMSI", but + * it becomes semantically easier if we do this once-off ahead of time. */ + if (osmo_mslookup_client_active(g_hlr->mslookup.client.client) + || osmo_sockaddr_str_is_nonzero(&g_hlr->mslookup.client.gsup_gateway_proxy)) { + if (dgsm_check_forward_gsup_msg(req)) + return 0; + } + switch (req->gsup.message_type) { /* requests sent to us */ case OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: @@ -693,6 +705,9 @@ exit(1); } + /* Set up llists and objects, startup is happening from VTY commands. */ + dgsm_init(hlr_ctx); + osmo_stats_init(hlr_ctx); vty_init(&vty_info); ctrl_vty_init(hlr_ctx); @@ -748,10 +763,13 @@ LOGP(DMAIN, LOGL_FATAL, "Error starting GSUP server\n"); exit(1); } + proxy_init(g_hlr->gs); g_hlr->ctrl_bind_addr = ctrl_vty_get_bind_addr(); g_hlr->ctrl = hlr_controlif_setup(g_hlr); + dgsm_start(hlr_ctx); + osmo_init_ignore_signals(); signal(SIGINT, &signal_hdlr); signal(SIGTERM, &signal_hdlr); @@ -768,6 +786,7 @@ while (!quit) osmo_select_main_ctx(0); + dgsm_stop(); osmo_gsup_server_destroy(g_hlr->gs); db_close(g_hlr->dbc); diff --git a/src/hlr_vty.c b/src/hlr_vty.c index 6701cd9..e959be8 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -146,6 +146,24 @@ return CMD_SUCCESS; } +DEFUN(cfg_hlr_gsup_ipa_name, + cfg_hlr_gsup_ipa_name_cmd, + "ipa-name NAME", + "Set the IPA name of this HLR, for proxying to remote HLRs\n" + "A globally unique name for this HLR. For example: PLMN + redundancy server number: HLR-901-70-0. " + "This name is used for GSUP routing and must be set if multiple HLRs interconnect (e.g. mslookup " + "for Distributed GSM).\n") +{ + if (vty->type != VTY_FILE) { + vty_out(vty, "gsup/ipa-name: The GSUP IPA name cannot be changed at run-time; " + "It can only be set in the configuraton file.%s", VTY_NEWLINE); + return CMD_WARNING; + } + + g_hlr->gsup_unit_name.serno = talloc_strdup(g_hlr, argv[0]); + return CMD_SUCCESS; +} + /*********************************************************************** * USSD Entity ***********************************************************************/ @@ -444,6 +462,7 @@ install_node(&gsup_node, config_write_hlr_gsup); install_element(GSUP_NODE, &cfg_hlr_gsup_bind_ip_cmd); + install_element(GSUP_NODE, &cfg_hlr_gsup_ipa_name_cmd); install_element(HLR_NODE, &cfg_database_cmd); diff --git a/src/logging.c b/src/logging.c index d123fcd..9d3cc62 100644 --- a/src/logging.c +++ b/src/logging.c @@ -31,6 +31,12 @@ .color = "\033[1;33m", .enabled = 1, .loglevel = LOGL_NOTICE, }, + [DDGSM] = { + .name = "DDGSM", + .description = "Distributed GSM: MS lookup and proxy", + .color = "\033[1;35m", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, }; diff --git a/src/mslookup_server.c b/src/mslookup_server.c index 0af0407..43d3f58 100644 --- a/src/mslookup_server.c +++ b/src/mslookup_server.c @@ -8,6 +8,7 @@ #include #include #include +#include static const struct osmo_mslookup_result not_found = { .rc = OSMO_MSLOOKUP_RC_NOT_FOUND, @@ -271,6 +272,67 @@ return true; } + +/* Determine whether the subscriber with the given ID has routed a Location Updating via this HLR as first hop. Return + * true if it is attached at a local VLR, and we are serving as proxy for a remote home HLR. + */ +static bool subscriber_has_done_lu_here_proxy(const struct osmo_mslookup_query *query, + uint32_t *lu_age, + struct osmo_gt *local_msc_name) +{ + const struct proxy_subscr *proxy_subscr; + uint32_t age; + + /* See the local HLR record. If the subscriber is "at home" in this HLR and is also currently located here, we + * will find a valid location updating and no vlr_via_proxy entry. */ + switch (query->id.type) { + case OSMO_MSLOOKUP_ID_IMSI: + proxy_subscr = proxy_subscr_get_by_imsi(g_hlr->gs->proxy, query->id.imsi); + break; + case OSMO_MSLOOKUP_ID_MSISDN: + proxy_subscr = proxy_subscr_get_by_msisdn(g_hlr->gs->proxy, query->id.msisdn); + break; + default: + LOGP(DDGSM, LOGL_ERROR, "%s: unknown ID type\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL)); + return false; + } + + if (!proxy_subscr) { + LOGP(DDGSM, LOGL_DEBUG, "%s: does not exist in GSUP proxy\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL)); + return false; + } + + /* We only need to care about CS LU, since only CS services need D-GSM routing. */ + if (!timestamp_age(&proxy_subscr->cs.last_lu, &age) + || age > g_hlr->mslookup.server.local_attach_max_age) { + LOGP(DDGSM, LOGL_ERROR, + "%s: last attach was at local VLR (proxying for remote HLR), but too long ago: %us > %us\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + age, g_hlr->mslookup.server.local_attach_max_age); + return false; + } + + if (proxy_subscr->cs.vlr_via_proxy.len) { + LOGP(DDGSM, LOGL_DEBUG, "%s: last attach is not at local VLR, but at VLR '%s' via proxy '%s'\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + osmo_gt_name(&proxy_subscr->cs.vlr_name), + osmo_gt_name(&proxy_subscr->cs.vlr_via_proxy)); + return false; + } + + *lu_age = age; + *local_msc_name = proxy_subscr->cs.vlr_name; + LOGP(DDGSM, LOGL_DEBUG, "%s: attached %u seconds ago at local VLR %s; proxying for remote HLR " + OSMO_SOCKADDR_STR_FMT "\n", + osmo_mslookup_result_name_c(OTC_SELECT, query, NULL), + age, osmo_gt_name(local_msc_name), + OSMO_SOCKADDR_STR_FMT_ARGS(&proxy_subscr->remote_hlr_addr)); + + return true; +} + static bool subscriber_has_done_lu_here(const struct osmo_mslookup_query *query, uint32_t *lu_age_p, struct osmo_gt *local_msc_name) @@ -278,6 +340,9 @@ bool attached_here; uint32_t lu_age = 0; struct osmo_gt msc_name = {}; + bool attached_here_proxy; + uint32_t proxy_lu_age = 0; + struct osmo_gt proxy_msc_name = {}; /* First ask the local HLR db, but if the local proxy record indicates a more recent LU, use that instead. * For all usual cases, only one of these will reflect a LU, even if a subscriber had more than one home HLR: @@ -288,8 +353,14 @@ * situations, compare the two entries. */ attached_here = subscriber_has_done_lu_here_hlr(query, &lu_age, &msc_name); + attached_here_proxy = subscriber_has_done_lu_here_proxy(query, &proxy_lu_age, &proxy_msc_name); - /* Future: If proxy has a younger lu, replace. */ + /* If proxy has a younger lu, replace. */ + if (attached_here_proxy && (!attached_here || (proxy_lu_age < lu_age))) { + attached_here = true; + lu_age = proxy_lu_age; + msc_name = proxy_msc_name; + } if (attached_here && !msc_name.len) { LOGP(DMSLOOKUP, LOGL_ERROR, "%s: attached here, but no VLR name known\n", diff --git a/src/mslookup_server_mdns.c b/src/mslookup_server_mdns.c index 50c13f1..ed4b23f 100644 --- a/src/mslookup_server_mdns.c +++ b/src/mslookup_server_mdns.c @@ -105,10 +105,9 @@ /* Check whether to start/stop/restart mDNS server */ bool should_run; bool should_stop; - if (!g_hlr->mslookup.allow_startup) - return; - should_run = g_hlr->mslookup.server.enable && g_hlr->mslookup.server.mdns.enable; + should_run = g_hlr->mslookup.allow_startup + && g_hlr->mslookup.server.enable && g_hlr->mslookup.server.mdns.enable; should_stop = g_hlr->mslookup.server.mdns.running && (!should_run || osmo_sockaddr_str_cmp(&g_hlr->mslookup.server.mdns.bind_addr, diff --git a/src/proxy.c b/src/proxy.c new file mode 100644 index 0000000..6c61f77 --- /dev/null +++ b/src/proxy.c @@ -0,0 +1,525 @@ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#define LOG_PROXY_SUBSCR(proxy_subscr, level, fmt, args...) \ + LOGP(DDGSM, level, "(Proxy IMSI-%s MSISDN-%s HLR-" OSMO_SOCKADDR_STR_FMT ") " fmt, \ + ((proxy_subscr) && *(proxy_subscr)->imsi)? (proxy_subscr)->imsi : "?", \ + ((proxy_subscr) && *(proxy_subscr)->msisdn)? (proxy_subscr)->msisdn : "?", \ + OSMO_SOCKADDR_STR_FMT_ARGS((proxy_subscr)? &(proxy_subscr)->remote_hlr_addr : NULL), \ + ##args) + +#define LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup_msg, level, fmt, args...) \ + LOG_PROXY_SUBSCR(proxy_subscr, level, "%s: " fmt, \ + (gsup_msg) ? osmo_gsup_message_type_name((gsup_msg)->message_type) : "NULL", \ + ##args) + +/* Why have a separate struct to add an llist_head entry? + * This is to keep the option open to store the proxy data in the database instead, without any visible effect outside + * of proxy.c. */ +struct proxy_subscr_listentry { + struct llist_head entry; + timestamp_t last_update; + struct proxy_subscr data; +}; + +/* Defer a GSUP message until we know a remote HLR to proxy to. + * Where to send this GSUP message is indicated by its IMSI: as soon as an MS lookup has yielded the IMSI's home HLR, + * that's where the message should go. */ +static void proxy_defer_gsup_req(struct proxy *proxy, struct osmo_gsup_req *req) +{ + struct proxy_pending_gsup_req *m; + + m = talloc_zero(proxy, struct proxy_pending_gsup_req); + OSMO_ASSERT(m); + m->req = req; + timestamp_update(&m->received_at); + llist_add_tail(&m->entry, &proxy->pending_gsup_reqs); +} + +/* Unable to resolve remote HLR for this IMSI, Answer with error back to the sender. */ +static void proxy_defer_gsup_message_err(struct proxy *proxy, struct proxy_pending_gsup_req *m) +{ + osmo_gsup_req_respond_err(m->req, GMM_CAUSE_IMSI_UNKNOWN, "could not reach home HLR"); + m->req = NULL; +} + +/* Forward spooled message for this IMSI to remote HLR. */ +static void proxy_defer_gsup_message_send(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct proxy_pending_gsup_req *m, struct remote_hlr *remote_hlr) +{ + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &m->req->gsup, LOGL_INFO, "Forwarding deferred message\n"); + proxy_subscr_forward_to_remote_hlr_resolved(proxy, proxy_subscr, remote_hlr, m->req); + m->req = NULL; +} + +/* Result of looking for remote HLR. If it failed, pass remote_hlr as NULL. On failure, the proxy_subscr and the + * remote_hlr may be passed NULL. The IMSI then reflects who the error was for. */ +static void proxy_defer_gsup_message_pop(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + const char *imsi, struct remote_hlr *remote_hlr) +{ + struct proxy_pending_gsup_req *m, *n; + if (!imsi && proxy_subscr) + imsi = proxy_subscr->imsi; + OSMO_ASSERT(imsi); + + if (!remote_hlr) + LOGP(DDGSM, LOGL_ERROR, "IMSI-%s: No remote HLR found, dropping spooled GSUP messages\n", imsi); + + llist_for_each_entry_safe(m, n, &proxy->pending_gsup_reqs, entry) { + if (strcmp(m->req->gsup.imsi, imsi)) + continue; + + if (!remote_hlr) + proxy_defer_gsup_message_err(proxy, m); + else + proxy_defer_gsup_message_send(proxy, proxy_subscr, m, remote_hlr); + + llist_del(&m->entry); + talloc_free(m); + } +} + + +static bool proxy_subscr_matches_imsi(const struct proxy_subscr *proxy_subscr, const char *imsi) +{ + if (!proxy_subscr || !imsi) + return false; + return strcmp(proxy_subscr->imsi, imsi) == 0; +} + +static bool proxy_subscr_matches_msisdn(const struct proxy_subscr *proxy_subscr, const char *msisdn) +{ + if (!proxy_subscr || !msisdn) + return false; + return strcmp(proxy_subscr->msisdn, msisdn) == 0; +} + +static struct proxy_subscr_listentry *_proxy_get_by_imsi(struct proxy *proxy, const char *imsi) +{ + struct proxy_subscr_listentry *e; + if (!proxy) + return NULL; + llist_for_each_entry(e, &proxy->subscr_list, entry) { + if (proxy_subscr_matches_imsi(&e->data, imsi)) + return e; + } + return NULL; +} + +static struct proxy_subscr_listentry *_proxy_get_by_msisdn(struct proxy *proxy, const char *msisdn) +{ + struct proxy_subscr_listentry *e; + if (!proxy) + return NULL; + llist_for_each_entry(e, &proxy->subscr_list, entry) { + if (proxy_subscr_matches_msisdn(&e->data, msisdn)) + return e; + } + return NULL; +} + +const struct proxy_subscr *proxy_subscr_get_by_imsi(struct proxy *proxy, const char *imsi) +{ + struct proxy_subscr_listentry *e = _proxy_get_by_imsi(proxy, imsi); + if (!e) + return NULL; + return &e->data; +} + +const struct proxy_subscr *proxy_subscr_get_by_msisdn(struct proxy *proxy, const char *msisdn) +{ + struct proxy_subscr_listentry *e = _proxy_get_by_msisdn(proxy, msisdn); + if (!e) + return NULL; + return &e->data; +} + +void proxy_subscrs_get_by_remote_hlr(struct proxy *proxy, const struct osmo_sockaddr_str *remote_hlr_addr, + bool (*yield)(struct proxy *proxy, const struct proxy_subscr *subscr, void *data), + void *data) +{ + struct proxy_subscr_listentry *e; + if (!proxy) + return; + llist_for_each_entry(e, &proxy->subscr_list, entry) { + if (!osmo_sockaddr_str_cmp(remote_hlr_addr, &e->data.remote_hlr_addr)) { + if (!yield(proxy, &e->data, data)) + return; + } + } +} + +int proxy_subscr_update(struct proxy *proxy, const struct proxy_subscr *proxy_subscr) +{ + struct proxy_subscr_listentry *e = _proxy_get_by_imsi(proxy, proxy_subscr->imsi); + if (!e) { + /* Does not exist yet */ + e = talloc_zero(proxy, struct proxy_subscr_listentry); + llist_add(&e->entry, &proxy->subscr_list); + } + e->data = *proxy_subscr; + timestamp_update(&e->last_update); + return 0; +} + +int _proxy_subscr_del(struct proxy_subscr_listentry *e) +{ + llist_del(&e->entry); + return 0; +} + +int proxy_subscr_del(struct proxy *proxy, const char *imsi) +{ + struct proxy_subscr_listentry *e; + proxy_defer_gsup_message_pop(proxy, NULL, imsi, NULL); + e = _proxy_get_by_imsi(proxy, imsi); + if (!e) + return -ENOENT; + return _proxy_subscr_del(e); +} + +/* Discard stale proxy entries. */ +static void proxy_cleanup(void *proxy_v) +{ + struct proxy *proxy = proxy_v; + struct proxy_subscr_listentry *e, *n; + uint32_t age; + llist_for_each_entry_safe(e, n, &proxy->subscr_list, entry) { + if (!timestamp_age(&e->last_update, &age)) + LOGP(DDGSM, LOGL_ERROR, "Invalid timestamp, deleting proxy entry\n"); + else if (age <= proxy->fresh_time) + continue; + LOG_PROXY_SUBSCR(&e->data, LOGL_INFO, "proxy entry timed out, deleting\n"); + _proxy_subscr_del(e); + } + if (proxy->gc_period) + osmo_timer_schedule(&proxy->gc_timer, proxy->gc_period, 0); + else + LOGP(DDGSM, LOGL_NOTICE, "Proxy cleanup is switched off (gc_period == 0)\n"); +} + +void proxy_set_gc_period(struct proxy *proxy, uint32_t gc_period) +{ + proxy->gc_period = gc_period; + proxy_cleanup(proxy); +} + +void proxy_init(struct osmo_gsup_server *gsup_server_to_vlr) +{ + OSMO_ASSERT(!gsup_server_to_vlr->proxy); + struct proxy *proxy = talloc_zero(gsup_server_to_vlr, struct proxy); + *proxy = (struct proxy){ + .gsup_server_to_vlr = gsup_server_to_vlr, + .fresh_time = 60*60, + .gc_period = 60, + }; + INIT_LLIST_HEAD(&proxy->subscr_list); + INIT_LLIST_HEAD(&proxy->pending_gsup_reqs); + + osmo_timer_setup(&proxy->gc_timer, proxy_cleanup, proxy); + /* Invoke to trigger the first timer schedule */ + proxy_set_gc_period(proxy, proxy->gc_period); + gsup_server_to_vlr->proxy = proxy; +} + +void proxy_del(struct proxy *proxy) +{ + osmo_timer_del(&proxy->gc_timer); + talloc_free(proxy); +} + +void proxy_subscr_remote_hlr_up(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr) +{ + proxy_defer_gsup_message_pop(proxy, proxy_subscr, proxy_subscr->imsi, remote_hlr); +} + +void proxy_subscr_remote_hlr_resolved(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr) +{ + struct proxy_subscr proxy_subscr_new; + + if (osmo_sockaddr_str_is_nonzero(&proxy_subscr->remote_hlr_addr)) { + if (!osmo_sockaddr_str_cmp(&remote_hlr->addr, &proxy_subscr->remote_hlr_addr)) { + /* Already have this remote address */ + return; + } else { + LOG_PROXY_SUBSCR(proxy_subscr, LOGL_NOTICE, + "Remote HLR address changes to " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&remote_hlr->addr)); + } + } + + /* Store the address. Make a copy to modify. */ + proxy_subscr_new = *proxy_subscr; + proxy_subscr = &proxy_subscr_new; + proxy_subscr_new.remote_hlr_addr = remote_hlr->addr; + + if (proxy_subscr_update(proxy, proxy_subscr)) { + LOG_PROXY_SUBSCR(proxy_subscr, LOGL_ERROR, "Failed to store proxy entry for remote HLR\n"); + /* If no remote HLR is known for the IMSI, the proxy entry is pointless. */ + proxy_subscr_del(proxy, proxy_subscr->imsi); + return; + } + LOG_PROXY_SUBSCR(proxy_subscr, LOGL_DEBUG, "Remote HLR resolved, stored address\n"); +} + +/* All GSUP messages sent to the remote HLR pass through this function, to modify the subscriber state or disallow + * sending the message. Return 0 to allow sending the message. */ +static int proxy_acknowledge_gsup_to_remote_hlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + const struct osmo_gsup_req *req) +{ + struct proxy_subscr proxy_subscr_new = *proxy_subscr; + bool ps; + bool cs; + int rc; + + switch (req->gsup.message_type) { + + case OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: + /* Store the CS and PS VLR name in vlr_name_preliminary to later update the right {cs,ps} LU timestamp + * when receiving an OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT. Store in vlr_name_preliminary so that in + * case the LU fails, we keep the vlr_name intact. */ + switch (req->gsup.cn_domain) { + case OSMO_GSUP_CN_DOMAIN_CS: + proxy_subscr_new.cs.vlr_name_preliminary = req->source_name; + break; + case OSMO_GSUP_CN_DOMAIN_PS: + proxy_subscr_new.ps.vlr_name_preliminary = req->source_name; + break; + default: + break; + } + + ps = cs = false; + if (osmo_gt_cmp(&proxy_subscr_new.cs.vlr_name_preliminary, &proxy_subscr->cs.vlr_name_preliminary)) + cs = true; + if (osmo_gt_cmp(&proxy_subscr_new.ps.vlr_name_preliminary, &proxy_subscr->ps.vlr_name_preliminary)) + ps = true; + + if (!(cs || ps)) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, LOGL_DEBUG, "VLR names remain unchanged\n"); + break; + } + + rc = proxy_subscr_update(proxy, &proxy_subscr_new); + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, rc ? LOGL_ERROR : LOGL_INFO, + "%s: preliminary VLR name for%s%s to %s\n", + rc ? "failed to update" : "updated", + cs ? " CS" : "", ps ? " PS" : "", + osmo_gt_name(&req->source_name)); + break; + /* TODO: delete proxy entry in case of a Purge Request? */ + default: + break; + } + return 0; +} + +/* All GSUP messages received from the remote HLR to be sent to a local MSC pass through this function, to modify the + * subscriber state or disallow sending the message. Return 0 to allow sending the message. + * The local MSC shall be indicated by gsup.destination_name. */ +static int proxy_acknowledge_gsup_from_remote_hlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + const struct osmo_gsup_message *gsup, + struct remote_hlr *from_remote_hlr, + const struct osmo_gt *destination, + const struct osmo_gt *via_peer) +{ + struct proxy_subscr proxy_subscr_new = *proxy_subscr; + bool ps; + bool cs; + bool vlr_name_changed_cs; + bool vlr_name_changed_ps; + int rc; + struct osmo_gt via_proxy = {}; + if (osmo_gt_cmp(via_peer, destination)) + via_proxy = *via_peer; + + switch (gsup->message_type) { + case OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: + /* Remember the MSISDN of the subscriber. This does not need to be a preliminary record, because when + * the HLR tells us about subscriber data, it is definitive info and there is no ambiguity (like there + * would be with failed LU attempts from various sources). */ + if (!gsup->msisdn_enc_len) + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_DEBUG, "No MSISDN in this Insert Data Request\n"); + else if (gsm48_decode_bcd_number2(proxy_subscr_new.msisdn, sizeof(proxy_subscr_new.msisdn), + gsup->msisdn_enc, gsup->msisdn_enc_len, 0)) + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, "Failed to decode MSISDN\n"); + else if (!osmo_msisdn_str_valid(proxy_subscr_new.msisdn)) + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, "invalid MSISDN: %s\n", + osmo_quote_str_c(OTC_SELECT, proxy_subscr_new.msisdn, -1)); + else if (!strcmp(proxy_subscr->msisdn, proxy_subscr_new.msisdn)) + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_DEBUG, "already have MSISDN = %s\n", + proxy_subscr_new.msisdn); + else if (proxy_subscr_update(proxy, &proxy_subscr_new)) + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, "failed to update MSISDN to %s\n", + proxy_subscr_new.msisdn); + else + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_INFO, "stored MSISDN=%s\n", + proxy_subscr_new.msisdn); + break; + + case OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: + /* Update the Location Updating timestamp */ + cs = ps = false; + if (!osmo_gt_cmp(destination, &proxy_subscr->cs.vlr_name_preliminary)) { + timestamp_update(&proxy_subscr_new.cs.last_lu); + proxy_subscr_new.cs.vlr_name_preliminary = (struct osmo_gt){}; + vlr_name_changed_cs = + osmo_gt_cmp(&proxy_subscr->cs.vlr_name, destination) + || osmo_gt_cmp(&proxy_subscr->cs.vlr_via_proxy, &via_proxy); + proxy_subscr_new.cs.vlr_name = *destination; + proxy_subscr_new.cs.vlr_via_proxy = via_proxy; + cs = true; + } + if (!osmo_gt_cmp(destination, &proxy_subscr->ps.vlr_name_preliminary)) { + timestamp_update(&proxy_subscr_new.ps.last_lu); + proxy_subscr_new.ps.vlr_name_preliminary = (struct osmo_gt){}; + proxy_subscr_new.ps.vlr_name = *destination; + vlr_name_changed_ps = + osmo_gt_cmp(&proxy_subscr->ps.vlr_name, destination) + || osmo_gt_cmp(&proxy_subscr->ps.vlr_via_proxy, &via_proxy); + proxy_subscr_new.ps.vlr_via_proxy = via_proxy; + ps = true; + } + if (!(cs || ps)) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, + "destination is neither CS nor PS VLR: %s\n", + osmo_gt_name(destination)); + return GMM_CAUSE_PROTO_ERR_UNSPEC; + } + rc = proxy_subscr_update(proxy, &proxy_subscr_new); + + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, rc ? LOGL_ERROR : LOGL_INFO, + "%s LU: timestamp for%s%s%s%s%s%s%s%s%s%s\n", + rc ? "failed to update" : "updated", + cs ? " CS" : "", ps ? " PS" : "", + vlr_name_changed_cs? ", CS VLR=" : "", + vlr_name_changed_cs? osmo_gt_name(&proxy_subscr_new.cs.vlr_name) : "", + proxy_subscr_new.cs.vlr_via_proxy.len ? " via proxy " : "", + proxy_subscr_new.cs.vlr_via_proxy.len ? + osmo_gt_name(&proxy_subscr_new.cs.vlr_via_proxy) : "", + vlr_name_changed_ps? ", PS VLR=" : "", + vlr_name_changed_ps? osmo_gt_name(&proxy_subscr_new.ps.vlr_name) : "", + proxy_subscr_new.ps.vlr_via_proxy.len ? " via proxy " : "", + proxy_subscr_new.ps.vlr_via_proxy.len ? + osmo_gt_name(&proxy_subscr_new.ps.vlr_via_proxy) : "" + ); + break; + + default: + break; + } + + return 0; +} + + +void proxy_subscr_forward_to_remote_hlr_resolved(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + struct remote_hlr *remote_hlr, struct osmo_gsup_req *req) +{ + if (proxy_acknowledge_gsup_to_remote_hlr(proxy, proxy_subscr, req)) { + osmo_gsup_req_respond_err(req, GMM_CAUSE_PROTO_ERR_UNSPEC, "Proxy does not allow this message"); + return; + } + + remote_hlr_gsup_forward_to_remote_hlr(remote_hlr, req); +} + +void proxy_subscr_forward_to_remote_hlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, struct osmo_gsup_req *req) +{ + struct remote_hlr *remote_hlr; + + if (!osmo_sockaddr_str_is_nonzero(&proxy_subscr->remote_hlr_addr)) { + /* We don't know the remote target yet. Still waiting for an MS lookup response. */ + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, LOGL_DEBUG, "deferring until remote HLR is known\n"); + proxy_defer_gsup_req(proxy, req); + return; + } + + if (req->via_proxy.len) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, LOGL_INFO, "VLR->HLR: forwarding from %s via proxy %s\n", + osmo_gt_name(&req->source_name), + osmo_gt_name(&req->via_proxy)); + } else { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, LOGL_INFO, "VLR->HLR: forwarding from %s\n", + osmo_gt_name(&req->source_name)); + } + + remote_hlr = remote_hlr_get(&proxy_subscr->remote_hlr_addr, true); + if (!remote_hlr) { + osmo_gsup_req_respond_err(req, GMM_CAUSE_NET_FAIL, + "Proxy: Failed to establish connection to remote HLR " OSMO_SOCKADDR_STR_FMT, + OSMO_SOCKADDR_STR_FMT_ARGS(&proxy_subscr->remote_hlr_addr)); + return; + } + + if (!remote_hlr->gsupc || !remote_hlr->gsupc->is_connected) { + /* GSUP link is still busy establishing... */ + LOG_PROXY_SUBSCR_MSG(proxy_subscr, &req->gsup, LOGL_DEBUG, + "deferring until link to remote HLR is up\n"); + proxy_defer_gsup_req(proxy, req); + return; + } + + proxy_subscr_forward_to_remote_hlr_resolved(proxy, proxy_subscr, remote_hlr, req); +} + +int proxy_subscr_forward_to_vlr(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, + const struct osmo_gsup_message *gsup, struct remote_hlr *from_remote_hlr) +{ + struct osmo_gt destination; + struct osmo_gsup_conn *vlr_conn; + struct msgb *msg; + + if (osmo_gt_set(&destination, gsup->destination_name, gsup->destination_name_len)) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, + "no valid Destination Name IE, cannot route to VLR.\n"); + return GMM_CAUSE_INV_MAND_INFO; + } + + /* Route to MSC/SGSN that we're proxying for */ + vlr_conn = gsup_route_find_gt(proxy->gsup_server_to_vlr, &destination); + if (!vlr_conn) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, + "Destination VLR unreachable: %s\n", osmo_gt_name(&destination)); + return GMM_CAUSE_MSC_TEMP_NOTREACH; + } + + if (proxy_acknowledge_gsup_from_remote_hlr(proxy, proxy_subscr, gsup, from_remote_hlr, &destination, + &vlr_conn->peer_name)) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, + "Proxy does not allow forwarding this message\n"); + return GMM_CAUSE_PROTO_ERR_UNSPEC; + } + + msg = osmo_gsup_msgb_alloc("GSUP proxy to VLR"); + if (osmo_gsup_encode(msg, gsup)) { + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_ERROR, + "Failed to re-encode GSUP message, cannot forward\n"); + return GMM_CAUSE_INV_MAND_INFO; + } + + LOG_PROXY_SUBSCR_MSG(proxy_subscr, gsup, LOGL_INFO, "VLR<-HLR: forwarding to %s%s%s\n", + osmo_gt_name(&destination), + osmo_gt_cmp(&destination, &vlr_conn->peer_name) ? " via " : "", + osmo_gt_cmp(&destination, &vlr_conn->peer_name) ? + osmo_gt_name(&vlr_conn->peer_name) : ""); + return osmo_gsup_conn_send(vlr_conn, msg); +} diff --git a/src/remote_hlr.c b/src/remote_hlr.c new file mode 100644 index 0000000..08f7bb5 --- /dev/null +++ b/src/remote_hlr.c @@ -0,0 +1,180 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static LLIST_HEAD(remote_hlrs); + +static void remote_hlr_err_reply(struct remote_hlr *rh, const struct osmo_gsup_message *gsup_orig, + enum gsm48_gmm_cause cause) +{ + struct osmo_gsup_message gsup_reply; + + /* No need to answer if we couldn't parse an ERROR message type, only REQUESTs need an error reply. */ + if (!OSMO_GSUP_IS_MSGT_REQUEST(gsup_orig->message_type)) + return; + + gsup_reply = (struct osmo_gsup_message){ + .cause = cause, + .message_type = OSMO_GSUP_TO_MSGT_ERROR(gsup_orig->message_type), + .message_class = gsup_orig->message_class, + + /* RP-Message-Reference is mandatory for SM Service */ + .sm_rp_mr = gsup_orig->sm_rp_mr, + }; + + OSMO_STRLCPY_ARRAY(gsup_reply.imsi, gsup_orig->imsi); + + /* For SS/USSD, it's important to keep both session state and ID IEs */ + if (gsup_orig->session_state != OSMO_GSUP_SESSION_STATE_NONE) { + gsup_reply.session_state = OSMO_GSUP_SESSION_STATE_END; + gsup_reply.session_id = gsup_orig->session_id; + } + + if (osmo_gsup_client_enc_send(rh->gsupc, &gsup_reply)) + LOGP(DLGSUP, LOGL_ERROR, "Failed to send Error reply (imsi=%s)\n", + osmo_quote_str(gsup_orig->imsi, -1)); +} + +/* We are receiving a GSUP message from a remote HLR to go back to a local MSC. + * The local MSC shall be indicated by gsup.destination_name. */ +static int remote_hlr_rx(struct osmo_gsup_client *gsupc, struct msgb *msg) +{ + struct remote_hlr *rh = gsupc->data; + const struct proxy_subscr *proxy_subscr; + struct osmo_gsup_message gsup; + int rc; + + rc = osmo_gsup_decode(msgb_l2(msg), msgb_l2len(msg), &gsup); + if (rc < 0) { + LOG_REMOTE_HLR(rh, LOGL_ERROR, "Failed to decode GSUP message: '%s' (%d) [ %s]\n", + get_value_string(gsm48_gmm_cause_names, -rc), + -rc, osmo_hexdump(msg->data, msg->len)); + return rc; + } + + if (!osmo_imsi_str_valid(gsup.imsi)) { + LOG_REMOTE_HLR_MSG(rh, &gsup, LOGL_ERROR, "Invalid IMSI\n"); + remote_hlr_err_reply(rh, &gsup, GMM_CAUSE_INV_MAND_INFO); + return -GMM_CAUSE_INV_MAND_INFO; + } + + proxy_subscr = proxy_subscr_get_by_imsi(g_hlr->gs->proxy, gsup.imsi); + if (!proxy_subscr) { + LOG_REMOTE_HLR_MSG(rh, &gsup, LOGL_ERROR, "No proxy entry for this IMSI\n"); + remote_hlr_err_reply(rh, &gsup, GMM_CAUSE_NET_FAIL); + return -GMM_CAUSE_NET_FAIL; + } + + rc = proxy_subscr_forward_to_vlr(g_hlr->gs->proxy, proxy_subscr, &gsup, rh); + if (rc) { + LOG_REMOTE_HLR_MSG(rh, &gsup, LOGL_ERROR, "Failed to forward GSUP message towards VLR\n"); + remote_hlr_err_reply(rh, &gsup, GMM_CAUSE_NET_FAIL); + return -GMM_CAUSE_NET_FAIL; + } + return 0; +} + +static bool remote_hlr_up_yield(struct proxy *proxy, const struct proxy_subscr *proxy_subscr, void *data) +{ + struct remote_hlr *remote_hlr = data; + proxy_subscr_remote_hlr_up(proxy, proxy_subscr, remote_hlr); + return true; +} + +static bool remote_hlr_up_down(struct osmo_gsup_client *gsupc, bool up) +{ + struct remote_hlr *remote_hlr = gsupc->data; + if (!up) { + LOG_REMOTE_HLR(remote_hlr, LOGL_NOTICE, "link to remote HLR is down, removing GSUP client\n"); + remote_hlr_destroy(remote_hlr); + return false; + } + + LOG_REMOTE_HLR(remote_hlr, LOGL_NOTICE, "link up\n"); + proxy_subscrs_get_by_remote_hlr(g_hlr->gs->proxy, &remote_hlr->addr, remote_hlr_up_yield, remote_hlr); + return true; +} + +struct remote_hlr *remote_hlr_get(const struct osmo_sockaddr_str *addr, bool create) +{ + struct remote_hlr *rh; + + llist_for_each_entry(rh, &remote_hlrs, entry) { + if (!osmo_sockaddr_str_cmp(&rh->addr, addr)) + return rh; + } + + if (!create) + return NULL; + + /* Doesn't exist yet, create a GSUP client to remote HLR. */ + rh = talloc_zero(dgsm_ctx, struct remote_hlr); + OSMO_ASSERT(rh); + *rh = (struct remote_hlr){ + .addr = *addr, + .gsupc = osmo_gsup_client_create3(rh, &g_hlr->gsup_unit_name, + addr->ip, addr->port, + NULL, + remote_hlr_rx, + remote_hlr_up_down, + rh), + }; + if (!rh->gsupc) { + LOGP(DDGSM, LOGL_ERROR, + "Failed to establish connection to remote HLR " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(addr)); + talloc_free(rh); + return NULL; + } + rh->gsupc->data = rh; + llist_add(&rh->entry, &remote_hlrs); + return rh; +} + +void remote_hlr_destroy(struct remote_hlr *remote_hlr) +{ + osmo_gsup_client_destroy(remote_hlr->gsupc); + remote_hlr->gsupc = NULL; + llist_del(&remote_hlr->entry); + talloc_free(remote_hlr); +} + +/* This function takes ownership of the msg, do not free it after passing to this function. */ +int remote_hlr_msgb_send(struct remote_hlr *remote_hlr, struct msgb *msg) +{ + int rc = osmo_gsup_client_send(remote_hlr->gsupc, msg); + if (rc) { + LOGP(DDGSM, LOGL_ERROR, "Failed to send GSUP message to " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&remote_hlr->addr)); + } + return rc; +} + +/* A GSUP message was received from the MS/MSC side, forward it to the remote HLR. */ +void remote_hlr_gsup_forward_to_remote_hlr(struct remote_hlr *remote_hlr, struct osmo_gsup_req *req) +{ + int rc; + struct msgb *msg = osmo_gsup_msgb_alloc("GSUP proxy to remote HLR"); + /* To forward to a remote HLR, we need to indicate the source MSC's name in the Source Name IE to make sure the + * reply can be routed back. Store the sender MSC in gsup->source_name -- the remote HLR is required to return + * this as gsup->destination_name so that the reply gets routed to the original MSC. */ + struct osmo_gsup_message forward = req->gsup; + forward.source_name = req->source_name.val; + forward.source_name_len = req->source_name.len; + + rc = osmo_gsup_encode(msg, &forward); + if (rc) { + osmo_gsup_req_respond_err(req, GMM_CAUSE_NET_FAIL, "Failed to encode GSUP message for forwarding\n"); + return; + } + remote_hlr_msgb_send(remote_hlr, msg); + osmo_gsup_req_free(req); +} diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index 610c610..ac9ff31 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -35,6 +35,7 @@ show gsup-connections subscriber (imsi|msisdn|id|imei) IDENT show show subscriber (imsi|msisdn|id|imei) IDENT + show mslookup services OsmoHLR> enable OsmoHLR# ? @@ -81,6 +82,7 @@ log Configure logging sub-system stats Configure stats sub-system hlr Configure the HLR + mslookup Configure Distributed GSM mslookup OsmoHLR(config)# list help ... @@ -88,6 +90,7 @@ end ... hlr + mslookup OsmoHLR(config)# hlr OsmoHLR(config-hlr)# ? @@ -121,10 +124,12 @@ OsmoHLR(config-hlr)# gsup OsmoHLR(config-hlr-gsup)# ? ... - bind Listen/Bind related socket option + bind Listen/Bind related socket option + ipa-name Set the IPA name of this HLR, for proxying to remote HLRs OsmoHLR(config-hlr-gsup)# list ... bind ip A.B.C.D + ipa-name NAME OsmoHLR(config-hlr-gsup)# exit OsmoHLR(config-hlr)# exit @@ -149,6 +154,7 @@ logging level auc notice logging level ss info logging level lu notice + logging level dgsm notice ... hlr store-imei @@ -158,3 +164,324 @@ ussd route prefix *#100# internal own-msisdn ussd route prefix *#101# internal own-imsi end + +OsmoHLR# configure terminal + +OsmoHLR(config)# mslookup +OsmoHLR(config-mslookup)# ? +... + mdns Convenience shortcut: enable and configure both server and client for mDNS mslookup + no Negate a command or set its defaults + server Enable and configure Distributed GSM mslookup server + client Enable and configure Distributed GSM mslookup client +OsmoHLR(config-mslookup)# list +... + mdns [IP] [<1-65535>] + no mdns + server + no server + client + no client + +OsmoHLR(config-mslookup)# ? +... + mdns Convenience shortcut: enable and configure both server and client for mDNS mslookup + no Negate a command or set its defaults + server Enable and configure Distributed GSM mslookup server + client Enable and configure Distributed GSM mslookup client +OsmoHLR(config-mslookup)# no? + no Negate a command or set its defaults +OsmoHLR(config-mslookup)# no ? + mdns Disable both server and client for mDNS mslookup + server Disable Distributed GSM mslookup server + client Disable Distributed GSM mslookup client +OsmoHLR(config-mslookup)# mdns ? + [IP] multicast IPv4 address like 239.192.23.42 or IPv6 address like ff08::23:42 +OsmoHLR(config-mslookup)# mdns 1.2.3.4 ? + [<1-65535>] mDNS UDP Port number + +OsmoHLR(config-mslookup)# server +OsmoHLR(config-mslookup-server)# ? +... + mdns Configure where the mDNS server listens for mslookup requests + no Negate a command or set its defaults + service Configure addresses of local services, as sent in replies to remote mslookup requests. + msc Configure services for individual local MSCs +OsmoHLR(config-mslookup-server)# list +... + mdns [IP] [<1-65535>] + no mdns + service NAME at IP <1-65535> + no service NAME + no service NAME at IP <1-65535> + msc .UNIT_NAME + +OsmoHLR(config-mslookup-server)# mdns? + mdns Configure where the mDNS server listens for mslookup requests +OsmoHLR(config-mslookup-server)# mdns ? + [IP] multicast IPv4 address like 239.192.23.42 or IPv6 address like ff08::23:42 +OsmoHLR(config-mslookup-server)# mdns bind ? + [<1-65535>] mDNS UDP Port number +OsmoHLR(config-mslookup-server)# mdns bind 1.2.3.4 ? +% There is no matched command. +OsmoHLR(config-mslookup-server)# mdns bind 1.2.3.4 ? +% There is no matched command. + +OsmoHLR(config-mslookup-server)# service? + service Configure addresses of local services, as sent in replies to remote mslookup requests. +OsmoHLR(config-mslookup-server)# service ? + NAME mslookup service name, e.g. sip.voice or smpp.sms +OsmoHLR(config-mslookup-server)# service foo ? + at at +OsmoHLR(config-mslookup-server)# service foo at ? + IP IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1 +OsmoHLR(config-mslookup-server)# service foo at 1.2.3.4 ? + <1-65535> Service-specific port number + +OsmoHLR(config-mslookup-server)# no ? + mdns Disable server for mDNS mslookup (do not answer remote requests) + service Remove one or more service address entries +OsmoHLR(config-mslookup-server)# no service ? + NAME mslookup service name, e.g. sip.voice or smpp.sms +OsmoHLR(config-mslookup-server)# no service foo ? + at at + +OsmoHLR(config-mslookup-server)# no service foo at ? + IP IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1 +OsmoHLR(config-mslookup-server)# no service foo at 1.2.3.4 ? + <1-65535> Service-specific port number + +OsmoHLR(config-mslookup-server)# msc? + msc Configure services for individual local MSCs +OsmoHLR(config-mslookup-server)# msc ? + UNIT_NAME IPA Unit Name of the local MSC to configure + +OsmoHLR(config-mslookup-server)# msc MSC-1 +OsmoHLR(config-mslookup-server-msc)# ? +... + service Configure addresses of local services, as sent in replies to remote mslookup requests. + no Negate a command or set its defaults +OsmoHLR(config-mslookup-server-msc)# list +... + service NAME at IP <1-65535> + no service NAME + no service NAME at IP <1-65535> + +OsmoHLR(config-mslookup-server-msc)# service? + service Configure addresses of local services, as sent in replies to remote mslookup requests. +OsmoHLR(config-mslookup-server-msc)# service ? + NAME mslookup service name, e.g. sip.voice or smpp.sms +OsmoHLR(config-mslookup-server-msc)# service foo ? + at at +OsmoHLR(config-mslookup-server-msc)# service foo at ? + IP IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1 +OsmoHLR(config-mslookup-server-msc)# service foo at 1.2.3.4 ? + <1-65535> Service-specific port number + +OsmoHLR(config-mslookup-server-msc)# no ? + service Remove one or more service address entries +OsmoHLR(config-mslookup-server-msc)# no service ? + NAME mslookup service name, e.g. sip.voice or smpp.sms +OsmoHLR(config-mslookup-server-msc)# no service foo ? + at at + +OsmoHLR(config-mslookup-server-msc)# no service foo at ? + IP IPv4 address like 1.2.3.4 or IPv6 address like a:b:c:d::1 +OsmoHLR(config-mslookup-server-msc)# no service foo at 1.2.3.4 ? + <1-65535> Service-specific port number + +OsmoHLR(config-mslookup-server-msc)# exit +OsmoHLR(config-mslookup-server)# exit +OsmoHLR(config-mslookup)# client +OsmoHLR(config-mslookup-client)# ? +... + timeout How long should the mslookup client wait for remote responses before evaluating received results + mdns Enable mDNS client, and configure multicast address to send mDNS mslookup requests to + no Negate a command or set its defaults + gateway-proxy Configure a fixed IP address to send all GSUP requests for unknown IMSIs to, without invoking a lookup for IMSI +OsmoHLR(config-mslookup-client)# list +... + timeout <1-100000> + mdns [IP] [<1-65535>] + no mdns + gateway-proxy IP [<1-65535>] + no gateway-proxy + +OsmoHLR(config-mslookup-client)# timeout? + timeout How long should the mslookup client wait for remote responses before evaluating received results +OsmoHLR(config-mslookup-client)# timeout ? + <1-100000> timeout in milliseconds + +OsmoHLR(config-mslookup-client)# mdns? + mdns Enable mDNS client, and configure multicast address to send mDNS mslookup requests to +OsmoHLR(config-mslookup-client)# mdns to ? + [<1-65535>] mDNS UDP Port number +OsmoHLR(config-mslookup-client)# mdns to 1.2.3.4 ? +% There is no matched command. + +OsmoHLR(config-mslookup-client)# gateway-proxy? + gateway-proxy Configure a fixed IP address to send all GSUP requests for unknown IMSIs to, without invoking a lookup for IMSI +OsmoHLR(config-mslookup-client)# gateway-proxy ? + IP IP address of the remote HLR +OsmoHLR(config-mslookup-client)# gateway-proxy 1.2.3.4 ? + [<1-65535>] GSUP port number (omit for default 4222) + +OsmoHLR(config-mslookup-client)# no? + no Negate a command or set its defaults +OsmoHLR(config-mslookup-client)# no ? + mdns Disable mDNS client, do not query remote services by mDNS + gateway-proxy Disable gateway proxy for GSUP with unknown IMSIs + +OsmoHLR(config-mslookup-client)# gateway-proxy ? + IP IP address of the remote HLR +OsmoHLR(config-mslookup-client)# gateway-proxy 1.2.3.4 ? + [<1-65535>] GSUP port number (omit for default 4222) + +OsmoHLR(config-mslookup-client)# do show mslookup? + mslookup Distributed GSM / mslookup related information +OsmoHLR(config-mslookup-client)# do show mslookup ? + services List configured service addresses as sent to remote mslookup requests + +OsmoHLR(config-mslookup-client)# gateway-proxy 1.2.3.4 + +OsmoHLR(config-mslookup-client)# exit + +OsmoHLR(config-mslookup)# mdns +OsmoHLR(config-mslookup)# server +OsmoHLR(config-mslookup-server)# service qwert at 123.45.67.89 qwert +% Unknown command. +OsmoHLR(config-mslookup-server)# service qwert at qwert 1234 +% mslookup server: Invalid address for service qwert: qwert 1234 +OsmoHLR(config-mslookup-server)# service foo.bar at 123.45.67.89 1011 +OsmoHLR(config-mslookup-server)# service baz.bar at 121.31.41.5 1617 +OsmoHLR(config-mslookup-server)# service baz.bar at a:b:c::d 1819 +OsmoHLR(config-mslookup-server)# msc msc-901-70-23 +OsmoHLR(config-mslookup-server-msc)# service foo.bar at 76.54.32.10 1234 +OsmoHLR(config-mslookup-server-msc)# service baz.bar at 12.11.10.98 7654 +OsmoHLR(config-mslookup-server-msc)# service baz.bar at 999:999:999::999 9999 +OsmoHLR(config-mslookup-server-msc)# service baz.bar at dd:cc:bb::a 3210 +OsmoHLR(config-mslookup-server-msc)# exit +OsmoHLR(config-mslookup-server)# msc msc-901-70-42 +OsmoHLR(config-mslookup-server-msc)# service foo.bar at 1.1.1.1 1111 +OsmoHLR(config-mslookup-server-msc)# service baz.bar at 2.2.2.2 2222 +OsmoHLR(config-mslookup-server-msc)# service baz.bar at 2222:2222:2222::2 2222 +OsmoHLR(config-mslookup-server-msc)# do show mslookup services +Local GSUP HLR address returned in mslookup responses for local IMSIs: 127.0.0.1:4222 +service foo.bar at 123.45.67.89 1011 +service baz.bar at 121.31.41.5 1617 +service baz.bar at a:b:c::d 1819 +msc MSC-1 +msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 + service baz.bar at dd:cc:bb::a 3210 +msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + service baz.bar at 2.2.2.2 2222 + service baz.bar at 2222:2222:2222::2 2222 + +OsmoHLR(config-mslookup-server-msc)# show running-config +... +mslookup + server + mdns bind 239.192.23.42 4266 + service foo.bar at 123.45.67.89 1011 + service baz.bar at 121.31.41.5 1617 + service baz.bar at a:b:c::d 1819 + msc MSC-1 + msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 + service baz.bar at dd:cc:bb::a 3210 + msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + service baz.bar at 2.2.2.2 2222 + service baz.bar at 2222:2222:2222::2 2222 + client + gateway-proxy 1.2.3.4 4222 + mdns to 239.192.23.42 4266 +... + +OsmoHLR(config-mslookup-server-msc)# no service baz.bar +OsmoHLR(config-mslookup-server-msc)# no service asdf +% mslookup server: cannot remove service 'asdf' +OsmoHLR(config-mslookup-server-msc)# exit +OsmoHLR(config-mslookup-server)# msc msc-901-70-23 +OsmoHLR(config-mslookup-server-msc)# no service baz.bar at dd:cc:bb::a 3210 +% mslookup server: cannot remove service 'baz.bar' to dd:cc:bb::a 3210 +OsmoHLR(config-mslookup-server-msc)# no service asdf at asdf asdf +% Unknown command. +OsmoHLR(config-mslookup-server-msc)# no service asdf at asdf 3210 +% mslookup server: Invalid address for 'no service' asdf: asdf 3210 +OsmoHLR(config-mslookup-server-msc)# no service asdf at dd:cc:bb::a 3210 +% mslookup server: cannot remove service 'asdf' to dd:cc:bb::a 3210 +OsmoHLR(config-mslookup-server-msc)# exit +OsmoHLR(config-mslookup-server)# no service baz.bar at 2.2.2.2 2222 +% mslookup server: cannot remove service 'baz.bar' to 2.2.2.2 2222 +OsmoHLR(config-mslookup-server)# no service baz.bar at a:b:c::d 1819 +% mslookup server: cannot remove service 'baz.bar' to a:b:c::d 1819 + +OsmoHLR(config-mslookup-server)# exit +OsmoHLR(config-mslookup)# client +OsmoHLR(config-mslookup-client)# no gateway-proxy + +OsmoHLR(config-mslookup-client)# do show mslookup services +Local GSUP HLR address returned in mslookup responses for local IMSIs: 127.0.0.1:4222 +service foo.bar at 123.45.67.89 1011 +service baz.bar at 121.31.41.5 1617 +msc MSC-1 +msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 +msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + +OsmoHLR(config-mslookup-client)# show running-config +... +mslookup + server + mdns bind 239.192.23.42 4266 + service foo.bar at 123.45.67.89 1011 + service baz.bar at 121.31.41.5 1617 + msc MSC-1 + msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 + msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + client + mdns to 239.192.23.42 4266 +... + +OsmoHLR(config-mslookup-client)# exit +OsmoHLR(config-mslookup)# server +OsmoHLR(config-mslookup-server)# service gsup.hlr at 23.42.17.11 4223 +OsmoHLR(config-mslookup-server)# do show mslookup services +Local GSUP HLR address returned in mslookup responses for local IMSIs: 23.42.17.11:4223 +service foo.bar at 123.45.67.89 1011 +service baz.bar at 121.31.41.5 1617 +service gsup.hlr at 23.42.17.11 4223 +msc MSC-1 +msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 +msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + +OsmoHLR(config-mslookup-server)# show running-config +... +mslookup + server + mdns bind 239.192.23.42 4266 + service foo.bar at 123.45.67.89 1011 + service baz.bar at 121.31.41.5 1617 + service gsup.hlr at 23.42.17.11 4223 + msc MSC-1 + msc msc-901-70-23 + service foo.bar at 76.54.32.10 1234 + service baz.bar at 12.11.10.98 7654 + msc msc-901-70-42 + service foo.bar at 1.1.1.1 1111 + client + mdns to 239.192.23.42 4266 +... diff --git a/tests/test_subscriber.vty b/tests/test_subscriber.vty index 8e9026d..fb5da0e 100644 --- a/tests/test_subscriber.vty +++ b/tests/test_subscriber.vty @@ -13,6 +13,7 @@ subscriber (imsi|msisdn|id|imei) IDENT update aud3g milenage k K (op|opc) OP_C [ind-bitlen] [<0-28>] subscriber (imsi|msisdn|id|imei) IDENT update imei (none|IMEI) subscriber (imsi|msisdn|id|imei) IDENT update network-access-mode (none|cs|ps|cs+ps) + show mslookup services OsmoHLR# subscriber? subscriber Subscriber management commands -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I2fe453553c90e6ee527ed13a13089900efd488aa Gerrit-Change-Number: 16258 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 07:57:42 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 07:57:42 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16189 ) Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... Patch Set 3: (3 comments) https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c File src/gsm/gsup.c: https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 910 PS3, Line 910: * Note: after calling this function, fields in the reply may reference the same memory as rx and are not deep-copied. I see no deep-copied as a source of problems. Usually you want to queue this response message while freeing the rx message potentially beforehand (because theoretically the socket kernel queue could be full and we have our own wqueue). Am I missing something in my picture? https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 943 PS3, Line 943: if (!reply->imsi[0]) I'll keep asking to please match against = '\0', it's then clear from reader point of view that this is a string and not some random pointer array. https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 1040 PS3, Line 1040: OSMO_NAME_C_IMPL(ctx, 64, "ERROR", osmo_gsup_message_name_buf, msg) 64 looks a bit small here given the amount of text above. 128? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 07:57:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 07:59:14 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 07:59:14 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... Patch Set 6: My question here has not yet been answered. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 07:59:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:01:48 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:01:48 +0000 Subject: Change in osmo-gsm-tester[master]: bts_osmotrx: Allow Setting Rx/TX paths through resources.conf In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16228 ) Change subject: bts_osmotrx: Allow Setting Rx/TX paths through resources.conf ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iddb0f20366c3242098bdf869f39fc3e2244c13e7 Gerrit-Change-Number: 16228 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 08:01:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:01:53 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:01:53 +0000 Subject: Change in osmo-gsm-tester[master]: process: Return proc in function helpers In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16229 ) Change subject: process: Return proc in function helpers ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I60a18dcf699ebeaced951f7d5ff188f573772282 Gerrit-Change-Number: 16229 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 08:01:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:01:57 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:01:57 +0000 Subject: Change in osmo-gsm-tester[master]: process: Allow passing no local inst to copy_inst_ssh In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16230 ) Change subject: process: Allow passing no local inst to copy_inst_ssh ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16230 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I6b0f2a19e493c7ac911c5db0ea08f5c0ab936d74 Gerrit-Change-Number: 16230 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 08:01:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:02:01 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:02:01 +0000 Subject: Change in osmo-gsm-tester[master]: bts_osmotrx: Add support to run osmo-trx on LimeNet-micro In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16231 ) Change subject: bts_osmotrx: Add support to run osmo-trx on LimeNet-micro ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16231 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I6bd76f6d7e0cb2b6f7bdde971b6515846048a341 Gerrit-Change-Number: 16231 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 08:02:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:02:06 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:02:06 +0000 Subject: Change in osmo-gsm-tester[master]: default-suites.confg: Add suites to test LimeNet-micro In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16232 ) Change subject: default-suites.confg: Add suites to test LimeNet-micro ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16232 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I7f774e7bf6539c5afd1d3e35da765ba8d702fdb7 Gerrit-Change-Number: 16232 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 08:02:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:02:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:02:09 +0000 Subject: Change in osmo-gsm-tester[master]: bts_osmotrx: Allow Setting Rx/TX paths through resources.conf In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16228 ) Change subject: bts_osmotrx: Allow Setting Rx/TX paths through resources.conf ...................................................................... bts_osmotrx: Allow Setting Rx/TX paths through resources.conf Change-Id: Iddb0f20366c3242098bdf869f39fc3e2244c13e7 --- M example/resources.conf.prod M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/resource.py 3 files changed, 4 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 5b4185b..e5911f1 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -62,6 +62,8 @@ trx_ip: 10.42.42.117 clock_reference: external dev_args: "LimeSDR-USB,serial=00090706024F0A22" + channels: + - rx_path: "LNAW" - label: sysmoCell 5000 type: osmo-bts-trx diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 554a236..f1fbdd1 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -344,7 +344,6 @@ def __init__(self, suite_run, conf): super().__init__(suite_run, conf) - self.conf['osmo_trx']['channels'][0]['rx_path'] = 'LNAW' def binary_name(self): return OsmoTrxLMS.BIN_TRX diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 1b18076..992734d 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -76,6 +76,8 @@ 'bts[].osmo_trx.dev_args': schema.STR, 'bts[].osmo_trx.multi_arfcn': schema.BOOL_STR, 'bts[].osmo_trx.max_trxd_version': schema.UINT, + 'bts[].osmo_trx.channels[].rx_path': schema.STR, + 'bts[].osmo_trx.channels[].tx_path': schema.STR, 'arfcn[].arfcn': schema.INT, 'arfcn[].band': schema.BAND, 'modem[].type': schema.STR, -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iddb0f20366c3242098bdf869f39fc3e2244c13e7 Gerrit-Change-Number: 16228 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:02:09 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:02:09 +0000 Subject: Change in osmo-gsm-tester[master]: process: Return proc in function helpers In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16229 ) Change subject: process: Return proc in function helpers ...................................................................... process: Return proc in function helpers Caller may want to access the proc object after running the process, for instance to check return code or inspect its stdout/stderr logs. Change-Id: I60a18dcf699ebeaced951f7d5ff188f573772282 --- M src/osmo_gsm_tester/process.py 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index b73673f..ef6bca1 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -399,16 +399,19 @@ run_dir =run_dir.new_dir(name) proc = Process(name, run_dir, popen_args) proc.launch_sync() + return proc def run_local_netns_sync(run_dir, name, netns, popen_args): run_dir =run_dir.new_dir(name) proc = NetNSProcess(name, run_dir, netns, popen_args) proc.launch_sync() + return proc def run_remote_sync(run_dir, remote_user, remote_addr, name, popen_args, remote_cwd=None): run_dir = run_dir.new_dir(name) proc = RemoteProcess(name, run_dir, remote_user, remote_addr, remote_cwd, popen_args) proc.launch_sync() + return proc def scp(run_dir, remote_user, remote_addr, name, local_path, remote_path): run_local_sync(run_dir, name, ('scp', '-r', local_path, '%s@%s:%s' % (remote_user, remote_addr, remote_path))) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I60a18dcf699ebeaced951f7d5ff188f573772282 Gerrit-Change-Number: 16229 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:02:10 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:02:10 +0000 Subject: Change in osmo-gsm-tester[master]: process: Allow passing no local inst to copy_inst_ssh In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16230 ) Change subject: process: Allow passing no local inst to copy_inst_ssh ...................................................................... process: Allow passing no local inst to copy_inst_ssh This will be useful in the event a user wants to run a binary already available in the target which needs no copying, but still requires the non-binary related items to be copied and set up, such as config files, directory structure, etc. This option will be used to run osmo-trx-lms in LimeNetMicro already installed from an OBS repo, since cross-compiling all related dependencies would require a lot of work to do now. Change-Id: I6b0f2a19e493c7ac911c5db0ea08f5c0ab936d74 --- M src/osmo_gsm_tester/process.py 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index ef6bca1..06da3bf 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -416,12 +416,16 @@ def scp(run_dir, remote_user, remote_addr, name, local_path, remote_path): run_local_sync(run_dir, name, ('scp', '-r', local_path, '%s@%s:%s' % (remote_user, remote_addr, remote_path))) +# If no inst binaries copying is required (eg. because binary+libs is already available in distro), inst can be None. def copy_inst_ssh(run_dir, inst, remote_dir, remote_user, remote_addr, remote_rundir_append, cfg_file_name): - remote_inst = Dir(remote_dir.child(os.path.basename(str(inst)))) remote_dir_str = str(remote_dir) run_remote_sync(run_dir, remote_user, remote_addr, 'rm-remote-dir', ('test', '!', '-d', remote_dir_str, '||', 'rm', '-rf', remote_dir_str)) run_remote_sync(run_dir, remote_user, remote_addr, 'mk-remote-dir', ('mkdir', '-p', remote_dir_str)) - scp(run_dir, remote_user, remote_addr, 'scp-inst-to-remote', str(inst), remote_dir_str) + if inst is not None: + remote_inst = Dir(remote_dir.child(os.path.basename(str(inst)))) + scp(run_dir, remote_user, remote_addr, 'scp-inst-to-remote', str(inst), remote_dir_str) + else: + remote_inst = None remote_run_dir = remote_dir.child(remote_rundir_append) run_remote_sync(run_dir, remote_user, remote_addr, 'mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16230 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I6b0f2a19e493c7ac911c5db0ea08f5c0ab936d74 Gerrit-Change-Number: 16230 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:02:11 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:02:11 +0000 Subject: Change in osmo-gsm-tester[master]: bts_osmotrx: Add support to run osmo-trx on LimeNet-micro In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16231 ) Change subject: bts_osmotrx: Add support to run osmo-trx on LimeNet-micro ...................................................................... bts_osmotrx: Add support to run osmo-trx on LimeNet-micro bts_osmotrx will check if target host can run the inst, and otherwise run osmo-trx-lms already present in the system (installed by other means). This way same class can be used both ways, since the only real difference between the 2 scenarios is: * copying inst vs not copying it. * Running binary from inst vs running it from PATH. This commit does not provide a mechanism to make sure the osmo-trx or its dependencies are up-to-date in the target system. A solution for that will be provided separately. Related: SYS#4663 Change-Id: I6bd76f6d7e0cb2b6f7bdde971b6515846048a341 --- M example/resources.conf.prod A example/scenarios/trx-lms-limenet-micro.conf M src/osmo_gsm_tester/bts_osmotrx.py 3 files changed, 61 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/example/resources.conf.prod b/example/resources.conf.prod index e5911f1..6de4e2e 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -65,6 +65,20 @@ channels: - rx_path: "LNAW" +- label: LimeNET-Micro + type: osmo-bts-trx + ipa_unit_id: 15 + addr: 10.42.42.53 + band: GSM-1800 + ciphers: [a5_0, a5_1] + osmo_trx: + type: lms + launch_trx: true + remote_user: pi + trx_ip: 10.42.42.123 + clock_reference: external + dev_args: "LimeNET-Micro,serial=005839AF25B352" + - label: sysmoCell 5000 type: osmo-bts-trx ipa_unit_id: 7 diff --git a/example/scenarios/trx-lms-limenet-micro.conf b/example/scenarios/trx-lms-limenet-micro.conf new file mode 100644 index 0000000..2e2c1cc --- /dev/null +++ b/example/scenarios/trx-lms-limenet-micro.conf @@ -0,0 +1,4 @@ +resources: + bts: + - label: LimeNET-Micro + type: osmo-bts-trx diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index f1fbdd1..9110d8a 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -295,35 +295,55 @@ os.chmod(wrapper_script, st.st_mode | stat.S_IEXEC) return wrapper_script + def inst_compatible_for_remote(self): + proc = process.run_remote_sync(self.run_dir, self.remote_user, self.listen_ip, 'uname-m', ('uname', '-m')) + if "x86_64" in (proc.get_stdout() or ''): + return True + return False + + def start_remotely(self, keepalive): + # Run remotely through ssh. We need to run osmo-trx under a wrapper + # script since osmo-trx ignores SIGHUP and will keep running after + # we close local ssh session. The wrapper script catches SIGHUP and + # sends SIGINT to it. + remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR) + remote_config_file = remote_run_dir.child(OsmoTrx.CONF_OSMO_TRX) + + have_inst = self.inst_compatible_for_remote() + if have_inst: + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx'))) + + # if self.inst is None, we still want to copy config file, create remote run dir, etc. + self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, remote_run_dir, self.remote_user, + self.listen_ip, self.binary_name(), self.config_file) + + wrapper_script = self.generate_wrapper_script() + remote_wrapper_script = remote_run_dir.child(OsmoTrx.WRAPPER_SCRIPT) + process.scp(self.run_dir, self.remote_user, self.listen_ip, 'scp-wrapper-to-remote', wrapper_script, remote_wrapper_script) + + if have_inst: + remote_lib = self.remote_inst.child('lib') + remote_binary = self.remote_inst.child('bin', self.binary_name()) + args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_wrapper_script, remote_binary, '-C', remote_config_file) + else: # Use whatever is available i nremote system PATH: + args = (remote_wrapper_script, self.binary_name(), '-C', remote_config_file) + + self.proc_trx = self.launch_process_remote(self.binary_name(), args, remote_cwd=remote_run_dir, keepalive=keepalive) + ############## # PUBLIC (test API included) ############## def start(self, keepalive=False): self.configure() + if self.remote_user: + self.start_remotely(keepalive) + return + # Run locally if ssh user is not set self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx'))) - if not self.remote_user: - # Run locally if ssh user is not set - lib = self.inst.child('lib') - self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } - self.proc_trx = self.launch_process_local(keepalive, self.binary_name(), - '-C', os.path.abspath(self.config_file)) - else: - # Run remotely through ssh. We need to run osmo-trx under a wrapper - # script since osmo-trx ignores SIGHUP and will keep running after - # we close local ssh session. The wrapper script catches SIGHUP and - # sends SIGINT to it. - wrapper_script = self.generate_wrapper_script() - remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR) - self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, remote_run_dir, self.remote_user, - self.listen_ip, self.binary_name(), self.config_file) - remote_wrapper_script = remote_run_dir.child(OsmoTrx.WRAPPER_SCRIPT) - remote_config_file = remote_run_dir.child(OsmoTrx.CONF_OSMO_TRX) - remote_lib = self.remote_inst.child('lib') - remote_binary = self.remote_inst.child('bin', self.binary_name()) - process.scp(self.run_dir, self.remote_user, self.listen_ip, 'scp-wrapper-to-remote', wrapper_script, remote_wrapper_script) - - args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_wrapper_script, remote_binary, '-C', remote_config_file) - self.proc_trx = self.launch_process_remote(self.binary_name(), args, remote_cwd=remote_run_dir, keepalive=keepalive) + lib = self.inst.child('lib') + self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + self.proc_trx = self.launch_process_local(keepalive, self.binary_name(), + '-C', os.path.abspath(self.config_file)) def trx_ready(self): if not self.proc_trx or not self.proc_trx.is_running: -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16231 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I6bd76f6d7e0cb2b6f7bdde971b6515846048a341 Gerrit-Change-Number: 16231 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:02:11 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:02:11 +0000 Subject: Change in osmo-gsm-tester[master]: default-suites.confg: Add suites to test LimeNet-micro In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16232 ) Change subject: default-suites.confg: Add suites to test LimeNet-micro ...................................................................... default-suites.confg: Add suites to test LimeNet-micro Change-Id: I7f774e7bf6539c5afd1d3e35da765ba8d702fdb7 --- M example/default-suites.conf 1 file changed, 18 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/example/default-suites.conf b/example/default-suites.conf index 05967d6..a0dabdd 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -111,6 +111,24 @@ - dynts:trx-lms+mod-bts0-dynts67-ipa+cfg-codec-fr-any - dynts:trx-lms+mod-bts0-dynts67-osmo +- nitb_sms:trx-lms-limenet-micro +- sms:trx-lms-limenet-micro +- nitb_ussd:trx-lms-limenet-micro +- ussd:trx-lms-limenet-micro +- voice:trx-lms-limenet-micro+mod-bts0-ts-tchf+cfg-codec-fr1 +- voice:trx-lms-limenet-micro+mod-bts0-ts-tchf+cfg-codec-fr2 +- voice:trx-lms-limenet-micro+mod-bts0-ts-tchf+cfg-codec-fr3 +- voice:trx-lms-limenet-micro+mod-bts0-ts-tchh+cfg-codec-hr1 +- voice:trx-lms-limenet-micro+mod-bts0-ts-tchh+cfg-codec-hr3 +- voice:trx-lms-limenet-micro+mod-bts0-dynts-ipa+cfg-codec-fr-any +- voice:trx-lms-limenet-micro+mod-bts0-dynts-osmo +- gprs:trx-lms-limenet-micro +- gprs:trx-lms-limenet-micro+mod-bts0-egprs +- gprs:trx-lms-limenet-micro+mod-bts0-dynts-ipa +- gprs:trx-lms-limenet-micro+mod-bts0-dynts-osmo +- dynts:trx-lms-limenet-micro+mod-bts0-dynts67-ipa+cfg-codec-fr-any +- dynts:trx-lms-limenet-micro+mod-bts0-dynts67-osmo + - nitb_sms:nanobts - sms:nanobts+band-1900 - nitb_ussd:nanobts+band-1900 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16232 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I7f774e7bf6539c5afd1d3e35da765ba8d702fdb7 Gerrit-Change-Number: 16232 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:41:11 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:41:11 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: Hello lynxis lazus, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 to look at the new patch set (#3). Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... ansible: gsm-tester: Enable ip forwarding and masquerading on boot Some nodes in the internal network, such as LimeNetMicro, will need Internet access to upgrade osmo-trx-lms from OBS repos. It also makes it easier to update manually other nodes inside the internal network. Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 --- M ansible/roles/gsm-tester-network/README.md M ansible/roles/gsm-tester-network/defaults/main.yml A ansible/roles/gsm-tester-network/files/ogt-sysctl.conf M ansible/roles/gsm-tester-network/tasks/main.yml A ansible/roles/gsm-tester-network/templates/etc/iptables-ogt 5 files changed, 34 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/26/16226/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:42:16 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:42:16 +0000 Subject: Change in osmo-ci[master]: ansible: Fix several file permission mask format In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16234 ) Change subject: ansible: Fix several file permission mask format ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I91008927c50016a837420c4249b5f69b9153572e Gerrit-Change-Number: 16234 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 08:42:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:42:18 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 08:42:18 +0000 Subject: Change in osmo-ci[master]: ansible: Fix several file permission mask format In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16234 ) Change subject: ansible: Fix several file permission mask format ...................................................................... ansible: Fix several file permission mask format >From ansible documentation [1]: """ For those used to /usr/bin/chmod remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like 0644 or 01777) or quote it (like '644' or '1777') so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. """ [1] https://docs.ansible.com/ansible/latest/modules/template_module.html?highlight=template Change-Id: I91008927c50016a837420c4249b5f69b9153572e --- M ansible/roles/gsm-tester/tasks/main.yml M ansible/roles/install-coverity/tasks/main.yml M ansible/roles/install-poky-sdk/tasks/main.yml 3 files changed, 7 insertions(+), 9 deletions(-) Approvals: pespin: Verified lynxis lazus: Looks good to me, approved laforge: Looks good to me, approved diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 34846a5..d880127 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -191,7 +191,7 @@ file: path: /usr/sbin/tcpdump group: osmo-gsm-tester - mode: 750 + mode: 0750 - name: create a symlink for tcpdump file: @@ -219,7 +219,7 @@ copy: src: osmo-gsm-tester_setcap_net_raw.sh dest: /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh - mode: 755 + mode: 0755 - name: allow osmo-gsm-tester sudo osmo-gsm-tester_setcap_net_raw.sh copy: @@ -232,7 +232,7 @@ copy: src: osmo-gsm-tester_setcap_net_admin.sh dest: /usr/local/bin/osmo-gsm-tester_setcap_net_admin.sh - mode: 755 + mode: 0755 - name: allow osmo-gsm-tester sudo osmo-gsm-tester_setcap_net_admin.sh copy: @@ -245,7 +245,7 @@ copy: src: osmo-gsm-tester_netns_exec.sh dest: /usr/local/bin/osmo-gsm-tester_netns_exec.sh - mode: 755 + mode: 0755 - name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_exec.sh copy: @@ -258,7 +258,7 @@ copy: src: osmo-gsm-tester_netns_setup.sh dest: /usr/local/bin/osmo-gsm-tester_netns_setup.sh - mode: 755 + mode: 0755 - name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_setup.sh copy: diff --git a/ansible/roles/install-coverity/tasks/main.yml b/ansible/roles/install-coverity/tasks/main.yml index 200a349..886dda2 100644 --- a/ansible/roles/install-coverity/tasks/main.yml +++ b/ansible/roles/install-coverity/tasks/main.yml @@ -3,7 +3,7 @@ copy: src: "{{ coverity_installer_file }}" dest: "/tmp/{{ coverity_installer_file }}" - mode: 750 + mode: 0750 register: coverity_copy ignore_errors: yes tags: [coverity] @@ -36,4 +36,3 @@ msg: "Ansible can not find {{ coverity_installer_file }}" when: coverity_copy.failed tags: [coverity] - diff --git a/ansible/roles/install-poky-sdk/tasks/main.yml b/ansible/roles/install-poky-sdk/tasks/main.yml index 85b310a..7f95dce 100644 --- a/ansible/roles/install-poky-sdk/tasks/main.yml +++ b/ansible/roles/install-poky-sdk/tasks/main.yml @@ -12,7 +12,7 @@ copy: src: "{{ poky_installer_file }}" dest: "/tmp/{{ poky_installer_file }}" - mode: 750 + mode: 0750 register: poky_copy ignore_errors: yes tags: [poky] @@ -45,4 +45,3 @@ msg: "Ansible can not find or copy {{ poky_installer_file }}" when: poky_copy.failed tags: [poky] - -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I91008927c50016a837420c4249b5f69b9153572e Gerrit-Change-Number: 16234 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:46:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 08:46:01 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16189 ) Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c File src/gsm/gsup.c: https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 985 PS3, Line 985: osmo_gsup_message_name_buf > Maybe you're thinking of osmo_gsup_message_type_name() which we have for the the message type? [?] _stringify()? _tostr() _sprint() ? IMHO, the Name of a message doesn't contain details about its contents. A persons name also doesn't include their height, date of birth, ... -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 08:46:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:47:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 08:47:37 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16189 ) Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... Patch Set 3: (3 comments) https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c File src/gsm/gsup.c: https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 910 PS3, Line 910: * Note: after calling this function, fields in the reply may reference the same memory as rx and are not deep-copied. > I see no deep-copied as a source of problems. [?] Ack https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 943 PS3, Line 943: if (!reply->imsi[0]) > I'll keep asking to please match against = '\0', it's then clear from reader point of view that this [?] Ack https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 1040 PS3, Line 1040: OSMO_NAME_C_IMPL(ctx, 64, "ERROR", osmo_gsup_message_name_buf, msg) > 64 looks a bit small here given the amount of text above. [?] Ack -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 08:47:37 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:52:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 08:52:06 +0000 Subject: Change in osmo-bts[master]: rsl: ensure measurement reports are sent In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16170 ) Change subject: rsl: ensure measurement reports are sent ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16170/3/src/common/l1sap.c File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/16170/3/src/common/l1sap.c at 1246 PS3, Line 1246: le = &lchan->lapdm_ch.lapdm_acch; Why restrict this to tch? sdcch do have a sacch, too. They also do have meas rep -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2 Gerrit-Change-Number: 16170 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 08:52:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 08:54:46 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 08:54:46 +0000 Subject: Change in osmo-bts[master]: l1sap.c: ensure ms power control loop is running In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16233 ) Change subject: l1sap.c: ensure ms power control loop is running ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16233/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/16233/2//COMMIT_MSG at 14 PS2, Line 14: frames, lets call lchan_ms_pwr_ctrl() with dummy values. > "dummy MS power value." And actually the value is not dummy, rather called "estimated". [?] Actually, only the timing offset is estimated. The RSSI value is real, computed from the energy in the channel -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16233 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4fb85754b1a69376b02da7f4b175c6e8ec9cc35c Gerrit-Change-Number: 16233 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 08:54:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:01:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 09:01:52 +0000 Subject: Change in osmo-bts[master]: logging: remame category DSUM to DBTS, update description In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16145 ) Change subject: logging: remame category DSUM to DBTS, update description ...................................................................... Patch Set 1: (4 comments) I wonder if we can completely remove that category. In terms of naming, I think bts is confusing. Everything in the bits relates to the bits ;) I think some other programs have DMAIN, maybe use that if a category is needed. https://gerrit.osmocom.org/c/osmo-bts/+/16145/1/src/common/bts.c File src/common/bts.c: https://gerrit.osmocom.org/c/osmo-bts/+/16145/1/src/common/bts.c at 309 PS1, Line 309: LOGP(DBTS, LOGL_INFO, "Main link established, sending Status'.\n"); Could be oml https://gerrit.osmocom.org/c/osmo-bts/+/16145/1/src/common/bts.c at 345 PS1, Line 345: LOGP(DBTS, LOGL_INFO, "RSL link (TRX %02x) state changed to %s, sending Status'.\n", Could be rsl https://gerrit.osmocom.org/c/osmo-bts/+/16145/1/src/common/bts.c at 369 PS1, Line 369: LOGP(DBTS, LOGL_INFO, "TRX(%d): Setting available = %d\n", OML too https://gerrit.osmocom.org/c/osmo-bts/+/16145/1/src/common/bts.c at 635 PS1, Line 635: LOGP(DBTS, LOGL_ERROR, RR? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia9db783bc92b23ba87b4fdf1e4ed07d59ea6bbce Gerrit-Change-Number: 16145 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 09:01:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:02:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 09:02:35 +0000 Subject: Change in osmo-bts[master]: logging: use generic DBTS category where applicable In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16146 ) Change subject: logging: use generic DBTS category where applicable ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I15023436e81d5bdb51930912b221a23c69437847 Gerrit-Change-Number: 16146 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 09:02:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:06:10 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 09:06:10 +0000 Subject: Change in osmo-sip-connector[master]: logging from sofia: add missing newline In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 ) Change subject: logging from sofia: add missing newline ...................................................................... Patch Set 1: Code-Review+1 We could probably do a vlogp followed by a LOGPC to avoid yet another sprintf, but up to you -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Ia26c0b57a0166cf7de87c49471ce6f528a366dd5 Gerrit-Change-Number: 16220 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 09:06:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:08:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 09:08:02 +0000 Subject: Change in osmo-sip-connector[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 ) Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 Gerrit-Change-Number: 16221 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 09:08:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:17:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 09:17:37 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15947 ) Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 09:17:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:20:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 09:20:06 +0000 Subject: Change in osmo-msc[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 09:20:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:20:38 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 09:20:38 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: better err logging for dtap msgs In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15949 ) Change subject: msc_vlr_tests: better err logging for dtap msgs ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 Gerrit-Change-Number: 15949 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 09:20:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:21:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 09:21:52 +0000 Subject: Change in osmo-sip-connector[master]: logging from sofia: add missing newline In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 ) Change subject: logging from sofia: add missing newline ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220/1//COMMIT_MSG at 9 PS1, Line 9: Sometimes, lgging from sofia lacks the final newline character, messing up log logging https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220/1/src/sip.c File src/sip.c: https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220/1/src/sip.c at 674 PS1, Line 674: char *end = log_line + OSMO_MIN(strlen(log_line), sizeof(log_line) - 2); No need to strlen(log_line) here, you should have available information from return of vsnprintf above. -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Ia26c0b57a0166cf7de87c49471ce6f528a366dd5 Gerrit-Change-Number: 16220 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 09:21:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:22:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 09:22:15 +0000 Subject: Change in osmo-msc[master]: msc_vlr_test_call.c: add MNCC logging In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15950 ) Change subject: msc_vlr_test_call.c: add MNCC logging ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I03b25c134553c620d3fa9d23a67ad39414546861 Gerrit-Change-Number: 15950 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 09:22:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:22:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 09:22:39 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: log descriptions in color with -v In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15951 ) Change subject: msc_vlr_tests: log descriptions in color with -v ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d Gerrit-Change-Number: 15951 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 09:22:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 09:23:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 09:23:30 +0000 Subject: Change in osmo-msc[master]: msc_vlr_test_call: rename lu_utran_tmsi In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15952 ) Change subject: msc_vlr_test_call: rename lu_utran_tmsi ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15952 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I46a41321e6d1be3672a56a6e3cc36f013fdcd396 Gerrit-Change-Number: 15952 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 09:23:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 10:44:40 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 27 Nov 2019 10:44:40 +0000 Subject: Change in osmo-bts[master]: rsl: ensure measurement reports are sent In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16170 ) Change subject: rsl: ensure measurement reports are sent ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16170/3/src/common/scheduler.c File src/common/scheduler.c: https://gerrit.osmocom.org/c/osmo-bts/+/16170/3/src/common/scheduler.c at 368 PS3, Line 368: .nope_fn = rx_data_fn, Again, why only SACCH/TF? We also have SACCH on TCH/H and on SDCCH... -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2 Gerrit-Change-Number: 16170 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 10:44:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 11:07:28 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 11:07:28 +0000 Subject: Change in libosmocore[master]: Introduce fields related to DTAP DLCI References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16259 ) Change subject: Introduce fields related to DTAP DLCI ...................................................................... Introduce fields related to DTAP DLCI Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561 --- M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/libosmogsm.map 3 files changed, 33 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/16259/1 diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index a540609..366f207 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -7,6 +7,7 @@ #include #include #include +#include /* * this is from GSM 03.03 CGI but is copied in GSM 08.08 @@ -40,11 +41,34 @@ } __attribute__((packed)); struct dtap_header { +#if OSMO_IS_LITTLE_ENDIAN uint8_t type; - uint8_t link_id; + union { + uint8_t link_id; /* Backward compatibility */ + uint8_t dlci_cc:2, + dlci_spare:3, + dlci_sapi:3; /* enum gsm0406_dlc_sapi */ + }; uint8_t length; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t type; + union { + uint8_t link_id; + uint8_t dlci_sapi:3, dlci_spare:3, dlci_cc:2; + }; + uint8_t length; +#endif } __attribute__((packed)); +/* Data Link Control SAPI, GSM 08.06 ? 6.3.2, GSM 04.06 ? 3.3.3 */ +enum gsm0406_dlci_sapi { + DLCI_SAPI_RR_MM_CC = 0x0, + DLCI_SAPI_SMS = 0x3, +}; +extern const struct value_string gsm0406_dlci_sapi_names[]; +static inline const char *gsm0406_dlci_sapi_name(enum gsm0406_dlci_sapi val) +{ return get_value_string(gsm0406_dlci_sapi_names, val); } enum BSS_MAP_MSG_TYPE { BSS_MAP_MSG_RESERVED_0 = 0, diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 514d7f2..f9f7b58 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -1399,6 +1399,12 @@ return &bss_att_tlvdef; } +const struct value_string gsm0406_dlci_sapi_names[] = { + { DLCI_SAPI_RR_MM_CC, "RR/MM/CC" }, + { DLCI_SAPI_SMS, "SMS" }, + { 0, NULL } +}; + static const struct value_string gsm0808_msgt_names[] = { { BSS_MAP_MSG_ASSIGMENT_RQST, "ASSIGNMENT REQ" }, { BSS_MAP_MSG_ASSIGMENT_COMPLETE, "ASSIGNMENT COMPL" }, diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a0e3b32..efca0a5 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -86,6 +86,8 @@ gsm0341_build_msg; +gsm0406_dlci_sapi_names; + gsm0480_create_notifySS; gsm0480_create_unstructuredSS_Notify; gsm0480_create_ussd_resp; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561 Gerrit-Change-Number: 16259 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 11:09:42 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 11:09:42 +0000 Subject: Change in osmo-bsc[master]: bssap: Use new DTAP DLCI helper fields from libosmocore References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16260 ) Change subject: bssap: Use new DTAP DLCI helper fields from libosmocore ...................................................................... bssap: Use new DTAP DLCI helper fields from libosmocore Change-Id: Ib72e2bda46e39d1075e4270ac5fa51df2f418164 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/60/16260/1 diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 74faae1..0833ed0 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -1109,7 +1109,7 @@ return -1; } - LOGP(DMSC, LOGL_INFO, "Rx MSC DTAP, SAPI: %u CHAN: %u\n", header->link_id & 0x07, header->link_id & 0xC0); + LOGP(DMSC, LOGL_INFO, "Rx MSC DTAP, SAPI: %s CHAN: %u\n", gsm0406_dlci_sapi_name(header->dlci_sapi), header->dlci_cc); /* forward the data */ gsm48 = gsm48_msgb_alloc_name("GSM 04.08 DTAP RCV"); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16260 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib72e2bda46e39d1075e4270ac5fa51df2f418164 Gerrit-Change-Number: 16260 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup abstract client In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup abstract client ...................................................................... add libosmo-mslookup abstract client mslookup is a key concept in Distributed GSM, which allows querying the current location of a subscriber in a number of cooperating but independent core network sites, by arbitrary service names and by MSISDN/IMSI. Add the abstract mslookup client library. An actual lookup method (besides mslookup_client_fake.c) is added in a subsequent patch. For a detailed overview of this and upcoming patches, please see the elaborate comment at the top of mslookup.c. Add as separate library, libosmo-mslookup, to allow adding D-GSM capability to arbitrary client programs. osmo-hlr will be the mslookup server, added in a subsequent patch. osmo-hlr itself will also use this library and act as an mslookup client, when requesting the home HLR for locally unknown IMSIs. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 23 files changed, 1,620 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16203 ) Change subject: add osmo-mslookup-client program ...................................................................... add osmo-mslookup-client program Standalone program using libosmo-mslookup to easily integrate with programs that want to connect services (SIP, SMS,...) to the current location of a subscriber. Also useful for manual testing. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 --- M .gitignore M configure.ac M contrib/Makefile.am A contrib/dgsm/Makefile.am A contrib/dgsm/osmo-mslookup-pipe.py A contrib/dgsm/osmo-mslookup-socket.py M src/mslookup/Makefile.am A src/mslookup/osmo-mslookup-client.c 8 files changed, 950 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/03/16203/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: contrib/dgsm/ add example esme and dialplan In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16204 ) Change subject: contrib/dgsm/ add example esme and dialplan ...................................................................... contrib/dgsm/ add example esme and dialplan Add example scripts for the distributed GSM network: esme_dgsm.py: connect to the SMPP port of OsmoMSC A and forward SMS to the SMPP port of OsmoMSC B. The IP and port of OsmoMSC B is retrieved by the receiver's MSISDN using osmo-mslookup-client. contrib/dgsm/freeswitch_dialplan_dgsm.py: resolve the destination SIP servers of calls with osmo-mslookup-client and bridge the calls accordingly. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Related: OS#4254 Related: OS#4255 Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 --- M contrib/dgsm/Makefile.am A contrib/dgsm/esme_dgsm.py A contrib/dgsm/freeswitch_dialplan_dgsm.py 3 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/04/16204/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 Gerrit-Change-Number: 16204 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt ...................................................................... refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt These are seemingly orthogonal changes in one patch, because they are in fact sufficiently intertwined that we are not willing to spend the time to separate them. They are also refactoring changes, unlikely to make sense on their own. ** lu_fsm: Attempting to make luop.c keep state about incoming GSUP requests made me find shortcomings in several places: - since it predates osmo_fsm, it is a state machine that does not strictly enforce the order of state transitions or the right sequence of incoming events. - several places OSMO_ASSERT() on data received from the network. - modifies the subscriber state before a LU is accepted. - dead code about canceling a subscriber in a previous VLR. That would be a good thing to actually do, which should also be trivial now that we record vlr_name and sgsn_name, but I decided to remove the dead code for now. To both step up the LU game *and* make it easier for me to integrate osmo_gsup_req handling, I decided to create a lu_fsm, drawing from my, by now, ample experience of writing osmo_fsms. ** osmo_gsup_req: Prepare for D-GSM, where osmo-hlr will do proxy routing for remote HLRs / communicate with remote MSCs via a proxy: a) It is important that a response that osmo-hlr generates and that is sent back to a requesting MSC contains all IEs that are needed to route it back to the requester. Particularly source_name must become destination_name in the response to be able to even reach the requesting MSC. Other fields are also necessary to match, which were so far taken care of in individual numerous code paths. b) For some operations, the response to a GSUP request is generated asynchronously (like Update Location Request -> Response, or taking the response from an EUSE, or the upcoming proxying to a remote HLR). To be able to feed a request message's information back into the response, we must thus keep the request data around. Since struct osmo_gsup_message references a lot of external data, usually with pointers directly into the received msgb, it is not so trivial to pass GSUP message data around asynchronously, on its own. osmo_gsup_req is the combined solution for both a and b: it keeps all data for a GSUP message by taking ownership of the incoming msgb, and it provides an explicit API "forcing" callers to respond with osmo_gsup_req_respond(), so that all code paths trivially are definitely responding with the correct IEs set to match the request's routing (by using osmo_gsup_make_response() recently added to libosmocore). Adjust all osmo-hlr code paths to use *only* osmo_gsup_req to respond to incoming requests received on the GSUP server (above LU code being one of them). In fact, the same should be done on the client side. Hence osmo_gsup_req is implemented in a server/client agnostic way, and is placed in libosmo-gsupclient. As soon as we see routing errors in complex GSUP setups, using osmo_gsup_req in the related GSUP client is likely to resolve those problems without much thinking required beyond making all code paths use it. libosmo-gsupclient is hence added to osmo-hlr binary's own library dependencies. It would have been added by the D-GSM proxy routing anyway, we are just doing it a little sooner. ** global_title.c / osmo_gt: We so far handle a Global Title a.k.a. an IPA unit name as pointer + size, or as just pointer with implicit talloc size. To ease working with GSUP peer identification data, I require: - a non-allocated storage of a Global Title. It brings the drawback of being size limited, but our current implementation is anyway only able to handle MSC and SGSN names of 31 characters (see struct hlr_subscriber). - a single-argument handle for Global Title, - easy to use utility functions like osmo_gt_name(), osmo_gt_cmp(), and copying by simple assignment, a = b. Hence this patch adds a osmo_gt in global_title.h and global_title.c. Heavily used in LU and osmo_gsup_req. Depends: libosmocore Id9692880079ea0f219f52d81b1923a76fc640566 Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 --- M include/Makefile.am A include/osmocom/gsupclient/global_title.h A include/osmocom/gsupclient/gsup_req.h M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/db.h M include/osmocom/hlr/gsup_router.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/lu_fsm.h D include/osmocom/hlr/luop.h M src/Makefile.am M src/db.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/gsupclient/Makefile.am A src/gsupclient/global_title.c M src/gsupclient/gsup_client.c A src/gsupclient/gsup_req.c M src/hlr.c M src/hlr_ussd.c M src/logging.c A src/lu_fsm.c D src/luop.c M tests/db/Makefile.am M tests/db/db_test.c M tests/db/db_test.err M tests/gsup_server/Makefile.am M tests/test_nodes.vty 32 files changed, 1,225 insertions(+), 904 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/16205/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: gsup client: add up_down_cb(), add osmo_gsup_client_create3() In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16206 ) Change subject: gsup client: add up_down_cb(), add osmo_gsup_client_create3() ...................................................................... gsup client: add up_down_cb(), add osmo_gsup_client_create3() For the GSUP clients in upcoming D-GSM enabled osmo-hlr, it will be necessary to trigger an event as soon as a GSUP client connection becomes ready for communication. Add the osmo_gsup_client->up_down_cb. Add osmo_gsup_client_create3() pass the up_down_cb in the arguments. Also add a cb data argument, and groupt the cb and data arguments after the oapc_config argument. (Usually, we have cb and data arguments last.) We need the callbacks and data pointer in the osmo_gsup_client_create() function right before startup, because this function immediately starts up the connection. Who knows whether callbacks might trigger right away. Change-Id: I6f181e42b678465bc9945f192559dc57d2083c6d --- M include/osmocom/gsupclient/gsup_client.h M src/gsupclient/gsup_client.c 2 files changed, 63 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/06/16206/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I6f181e42b678465bc9945f192559dc57d2083c6d Gerrit-Change-Number: 16206 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16207 ) Change subject: db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy ...................................................................... db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy D-GSM will store in the HLR DB whether a locally connected MSC has attached the subscriber (last_lu_seen[_ps]), or whether the attach happened via a GSUP proxy from a different site. Add columns for this separately in this patch. Change-Id: I98c7b3870559ede84adf56e4bf111f53c7487745 --- M include/osmocom/hlr/db.h M sql/hlr.sql M src/db.c M src/db_hlr.c M tests/db_upgrade/db_upgrade_test.ok 5 files changed, 75 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/07/16207/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I98c7b3870559ede84adf56e4bf111f53c7487745 Gerrit-Change-Number: 16207 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: enlarge the GSUP message headroom In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16208 ) Change subject: enlarge the GSUP message headroom ...................................................................... enlarge the GSUP message headroom Make room for (more) arbitrary IPA headers, like longer IPA names as configured by the user. Change-Id: I7d86f2dadcae29fe1550ea2c9773394ab31a837b --- M src/gsup_server.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/08/16208/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I7d86f2dadcae29fe1550ea2c9773394ab31a837b Gerrit-Change-Number: 16208 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: D-GSM 1/n: add mslookup server in osmo-hlr In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16209 ) Change subject: D-GSM 1/n: add mslookup server in osmo-hlr ...................................................................... D-GSM 1/n: add mslookup server in osmo-hlr Implement the mslookup server to service remote mslookup requests. This patch merely adds the logic to answer incoming mslookup requests, an actual method to receive requests (mDNS) follows in a subsequent patch. - API to configure service names and addresses for the local site (per MSC). - determine whether a subscriber is on a local MSC (checking the local proxy will be added in subsequent patch that adds proxy capability). - VTY config follows in a subsequent patch. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b --- M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/hlr.h A include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/timestamp.h M src/Makefile.am M src/hlr.c A src/mslookup_server.c A src/timestamp.c 8 files changed, 458 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/09/16209/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b Gerrit-Change-Number: 16209 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: D-GSM 2/n: implement mDNS method of mslookup server In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#2) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16257 ) Change subject: D-GSM 2/n: implement mDNS method of mslookup server ...................................................................... D-GSM 2/n: implement mDNS method of mslookup server Implement the mslookup server's mDNS responder, to actually service remote mslookup requests: - VTY mslookup/server config with service names, - the mslookup_mdns_server listening for mslookup requests, For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: I5cae6459090588b4dd292be90a5e8903432669d2 --- M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_vty.h M include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/mslookup_server_mdns.h M src/Makefile.am A src/dgsm_vty.c M src/hlr.c A src/mslookup_server_mdns.c 9 files changed, 509 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/57/16257/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5cae6459090588b4dd292be90a5e8903432669d2 Gerrit-Change-Number: 16257 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: D-GSM 3/n: implement roaming by mslookup in osmo-hlr In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#2) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16258 ) Change subject: D-GSM 3/n: implement roaming by mslookup in osmo-hlr ...................................................................... D-GSM 3/n: implement roaming by mslookup in osmo-hlr Add mslookup client to find remote home HLRs of unknown IMSIs, and proxy/forward GSUP for those to the right remote HLR instances. Add remote_hlr.c to manage one GSUP client per remote HLR GSUP address. Add proxy.c to keep state about remotely handled IMSIs (remote GSUP address, MSISDN, and probably more in future patches). The mslookup_server that determines whether a given MSISDN is attached locally now also needs to look in the proxy record: it is always the osmo-hlr immediately peering for the MSC that should respond to mslookup service address queries like SIP and SMPP. (Only gsup.hlr service is always answered by the home HLR.) Add dgsm.c to set up an mdns mslookup client, ask for IMSI homes, and to decide which GSUP is handled locally and which needs to go to a remote HLR. Add full VTY config and VTY tests. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: I2fe453553c90e6ee527ed13a13089900efd488aa --- M include/osmocom/hlr/Makefile.am A include/osmocom/hlr/dgsm.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/proxy.h A include/osmocom/hlr/remote_hlr.h M src/Makefile.am A src/dgsm.c M src/dgsm_vty.c M src/hlr.c M src/hlr_vty.c M src/logging.c M src/mslookup_server.c M src/mslookup_server_mdns.c A src/proxy.c A src/remote_hlr.c M tests/test_nodes.vty M tests/test_subscriber.vty 19 files changed, 1,738 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/58/16258/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I2fe453553c90e6ee527ed13a13089900efd488aa Gerrit-Change-Number: 16258 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: hlr_vty_subscr: prettier output for last LU seen In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 to look at the new patch set (#11). Change subject: hlr_vty_subscr: prettier output for last LU seen ...................................................................... hlr_vty_subscr: prettier output for last LU seen Extend the "last LU seen on ..." line with the amount of seconds that passed since now, or "(invalid timestamp)". Patch split from Id7fc50567211a0870ac0524f6dee94d4513781ba, because it depends on timestamp_age which was just added in Ife4a61d71926d08f310a1aeed9d9f1974f64178b. Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 --- M src/hlr_vty_subscr.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/14/16214/11 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 Gerrit-Change-Number: 16214 Gerrit-PatchSet: 11 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: add mslookup_manual_test In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16210 ) Change subject: add mslookup_manual_test ...................................................................... add mslookup_manual_test This can be used for manually testing proxy routing. It is not run as part of the testsuite. Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 --- M .gitignore M configure.ac M tests/Makefile.am A tests/mslookup_manual_test/Makefile.am A tests/mslookup_manual_test/fake_msc.c A tests/mslookup_manual_test/osmo-hlr-1.cfg A tests/mslookup_manual_test/osmo-hlr-2.cfg A tests/mslookup_manual_test/run.sh 8 files changed, 241 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/10/16210/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 Gerrit-Change-Number: 16210 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: adoc: add D-GSM chapter to osmohlr-usermanual In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16211 ) Change subject: adoc: add D-GSM chapter to osmohlr-usermanual ...................................................................... adoc: add D-GSM chapter to osmohlr-usermanual Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 --- A doc/manuals/chapters/dgsm.adoc M doc/manuals/osmohlr-usermanual.adoc 2 files changed, 483 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/11/16211/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I392b5523870c2ef3267179160028d26f3f761b77 Gerrit-Change-Number: 16211 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:03:18 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 12:03:18 +0000 Subject: Change in osmo-hlr[master]: drop error log for when a subscriber does not exist In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#13) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16212 ) Change subject: drop error log for when a subscriber does not exist ...................................................................... drop error log for when a subscriber does not exist Checking for existence of a subscriber and seeing that there is none is not inherently an error. However, osmo-hlr currently logs on all occasions: DAUC ERROR Cannot read subscriber from db: MSISDN='1001': No such subscriber This spams the ERROR log level. Particularly when a D-GSM setup does subscriber existence checks for every incoming mslookup request, that potentially creates constant ERROR logging. The "No such subscriber" part comes from db_sel(), which might also return an sqlite3_errmsg(). We still want those sqlite3_errmsg()es in the ERROR log. Hence print an ERROR log only if db_sel() returns an rc != -ENOENT. Change-Id: I5044e9b4519b948edc4e451cef0f7830d315619b --- M src/db_hlr.c M tests/db/db_test.err 2 files changed, 4 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/12/16212/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5044e9b4519b948edc4e451cef0f7830d315619b Gerrit-Change-Number: 16212 Gerrit-PatchSet: 13 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:18:05 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 12:18:05 +0000 Subject: Change in osmo-trx[master]: Transceiver: Fix wrong response upon CMD HANDOVER failure References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/16261 ) Change subject: Transceiver: Fix wrong response upon CMD HANDOVER failure ...................................................................... Transceiver: Fix wrong response upon CMD HANDOVER failure Change-Id: I9d3f120b1696a9ce92c81097d04e81dbb717287d --- M Transceiver52M/Transceiver.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/61/16261/1 diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index 9697bb3..27049b9 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -794,7 +794,7 @@ unsigned ts = 0, ss = 0; sscanf(params, "%u %u", &ts, &ss); if (ts > 7 || ss > 7) { - sprintf(response, "RSP NOHANDOVER 1 %u %u", ts, ss); + sprintf(response, "RSP HANDOVER 1 %u %u", ts, ss); } else { mHandover[ts][ss] = true; sprintf(response, "RSP HANDOVER 0 %u %u", ts, ss); -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I9d3f120b1696a9ce92c81097d04e81dbb717287d Gerrit-Change-Number: 16261 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:21:32 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 27 Nov 2019 12:21:32 +0000 Subject: Change in osmo-trx[master]: Transceiver: Fix wrong response upon CMD HANDOVER failure In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/16261 ) Change subject: Transceiver: Fix wrong response upon CMD HANDOVER failure ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I9d3f120b1696a9ce92c81097d04e81dbb717287d Gerrit-Change-Number: 16261 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: fixeria Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Wed, 27 Nov 2019 12:21:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 12:39:21 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 27 Nov 2019 12:39:21 +0000 Subject: Change in libosmocore[master]: Introduce fields related to DTAP DLCI In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16259 ) Change subject: Introduce fields related to DTAP DLCI ...................................................................... Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16259/1/include/osmocom/gsm/protocol/gsm_08_08.h File include/osmocom/gsm/protocol/gsm_08_08.h: https://gerrit.osmocom.org/c/libosmocore/+/16259/1/include/osmocom/gsm/protocol/gsm_08_08.h at 46 PS1, Line 46: union Oh, be careful! Unions with bit-fields is a dangerous mix. I had a very bad experience with such constructions. At least on GCC it was not working as expected: all bit-fields actually share the same memory with the same offset (i.e. changing dlci_cc to 0x02 would also set both dlci_spare and dlci_sapi to 0x02). For more details, see (in Russian, but Google Translate can do the magic) https://www.stableit.ru/2016/02/union-bit-fields-c.html. Feel free to add a unit test setting different values to the bit-fields, and check their values. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561 Gerrit-Change-Number: 16259 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 27 Nov 2019 12:39:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 13:01:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 13:01:12 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup abstract client In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#14) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup abstract client ...................................................................... add libosmo-mslookup abstract client mslookup is a key concept in Distributed GSM, which allows querying the current location of a subscriber in a number of cooperating but independent core network sites, by arbitrary service names and by MSISDN/IMSI. Add the abstract mslookup client library. An actual lookup method (besides mslookup_client_fake.c) is added in a subsequent patch. For a detailed overview of this and upcoming patches, please see the elaborate comment at the top of mslookup.c. Add as separate library, libosmo-mslookup, to allow adding D-GSM capability to arbitrary client programs. osmo-hlr will be the mslookup server, added in a subsequent patch. osmo-hlr itself will also use this library and act as an mslookup client, when requesting the home HLR for locally unknown IMSIs. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 23 files changed, 1,622 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/14 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 14 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 13:01:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 13:01:12 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#14) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16203 ) Change subject: add osmo-mslookup-client program ...................................................................... add osmo-mslookup-client program Standalone program using libosmo-mslookup to easily integrate with programs that want to connect services (SIP, SMS,...) to the current location of a subscriber. Also useful for manual testing. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 --- M .gitignore M configure.ac M contrib/Makefile.am A contrib/dgsm/Makefile.am A contrib/dgsm/osmo-mslookup-pipe.py A contrib/dgsm/osmo-mslookup-socket.py M src/mslookup/Makefile.am A src/mslookup/osmo-mslookup-client.c 8 files changed, 949 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/03/16203/14 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 14 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 13:01:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 13:01:12 +0000 Subject: Change in osmo-hlr[master]: refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#14) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt ...................................................................... refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt These are seemingly orthogonal changes in one patch, because they are in fact sufficiently intertwined that we are not willing to spend the time to separate them. They are also refactoring changes, unlikely to make sense on their own. ** lu_fsm: Attempting to make luop.c keep state about incoming GSUP requests made me find shortcomings in several places: - since it predates osmo_fsm, it is a state machine that does not strictly enforce the order of state transitions or the right sequence of incoming events. - several places OSMO_ASSERT() on data received from the network. - modifies the subscriber state before a LU is accepted. - dead code about canceling a subscriber in a previous VLR. That would be a good thing to actually do, which should also be trivial now that we record vlr_name and sgsn_name, but I decided to remove the dead code for now. To both step up the LU game *and* make it easier for me to integrate osmo_gsup_req handling, I decided to create a lu_fsm, drawing from my, by now, ample experience of writing osmo_fsms. ** osmo_gsup_req: Prepare for D-GSM, where osmo-hlr will do proxy routing for remote HLRs / communicate with remote MSCs via a proxy: a) It is important that a response that osmo-hlr generates and that is sent back to a requesting MSC contains all IEs that are needed to route it back to the requester. Particularly source_name must become destination_name in the response to be able to even reach the requesting MSC. Other fields are also necessary to match, which were so far taken care of in individual numerous code paths. b) For some operations, the response to a GSUP request is generated asynchronously (like Update Location Request -> Response, or taking the response from an EUSE, or the upcoming proxying to a remote HLR). To be able to feed a request message's information back into the response, we must thus keep the request data around. Since struct osmo_gsup_message references a lot of external data, usually with pointers directly into the received msgb, it is not so trivial to pass GSUP message data around asynchronously, on its own. osmo_gsup_req is the combined solution for both a and b: it keeps all data for a GSUP message by taking ownership of the incoming msgb, and it provides an explicit API "forcing" callers to respond with osmo_gsup_req_respond(), so that all code paths trivially are definitely responding with the correct IEs set to match the request's routing (by using osmo_gsup_make_response() recently added to libosmocore). Adjust all osmo-hlr code paths to use *only* osmo_gsup_req to respond to incoming requests received on the GSUP server (above LU code being one of them). In fact, the same should be done on the client side. Hence osmo_gsup_req is implemented in a server/client agnostic way, and is placed in libosmo-gsupclient. As soon as we see routing errors in complex GSUP setups, using osmo_gsup_req in the related GSUP client is likely to resolve those problems without much thinking required beyond making all code paths use it. libosmo-gsupclient is hence added to osmo-hlr binary's own library dependencies. It would have been added by the D-GSM proxy routing anyway, we are just doing it a little sooner. ** global_title.c / osmo_gt: We so far handle a Global Title a.k.a. an IPA unit name as pointer + size, or as just pointer with implicit talloc size. To ease working with GSUP peer identification data, I require: - a non-allocated storage of a Global Title. It brings the drawback of being size limited, but our current implementation is anyway only able to handle MSC and SGSN names of 31 characters (see struct hlr_subscriber). - a single-argument handle for Global Title, - easy to use utility functions like osmo_gt_name(), osmo_gt_cmp(), and copying by simple assignment, a = b. Hence this patch adds a osmo_gt in global_title.h and global_title.c. Heavily used in LU and osmo_gsup_req. Depends: libosmocore Id9692880079ea0f219f52d81b1923a76fc640566 Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 --- M include/Makefile.am A include/osmocom/gsupclient/global_title.h A include/osmocom/gsupclient/gsup_req.h M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/db.h M include/osmocom/hlr/gsup_router.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/lu_fsm.h D include/osmocom/hlr/luop.h M src/Makefile.am M src/db.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/gsupclient/Makefile.am A src/gsupclient/global_title.c M src/gsupclient/gsup_client.c A src/gsupclient/gsup_req.c M src/hlr.c M src/hlr_ussd.c M src/logging.c A src/lu_fsm.c D src/luop.c M tests/db/Makefile.am M tests/db/db_test.c M tests/db/db_test.err M tests/gsup_server/Makefile.am M tests/test_nodes.vty 32 files changed, 1,339 insertions(+), 904 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/16205/14 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 14 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 13:01:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 13:01:12 +0000 Subject: Change in osmo-hlr[master]: D-GSM 1/n: add mslookup server in osmo-hlr In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#14) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16209 ) Change subject: D-GSM 1/n: add mslookup server in osmo-hlr ...................................................................... D-GSM 1/n: add mslookup server in osmo-hlr Implement the mslookup server to service remote mslookup requests. This patch merely adds the logic to answer incoming mslookup requests, an actual method to receive requests (mDNS) follows in a subsequent patch. - API to configure service names and addresses for the local site (per MSC). - determine whether a subscriber is on a local MSC (checking the local proxy will be added in subsequent patch that adds proxy capability). - VTY config follows in a subsequent patch. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b --- M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h A include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/timestamp.h M src/Makefile.am M src/hlr.c A src/mslookup_server.c A src/timestamp.c 9 files changed, 553 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/09/16209/14 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b Gerrit-Change-Number: 16209 Gerrit-PatchSet: 14 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 13:01:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 13:01:12 +0000 Subject: Change in osmo-hlr[master]: D-GSM 2/n: implement mDNS method of mslookup server In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16257 ) Change subject: D-GSM 2/n: implement mDNS method of mslookup server ...................................................................... D-GSM 2/n: implement mDNS method of mslookup server Implement the mslookup server's mDNS responder, to actually service remote mslookup requests: - VTY mslookup/server config with service names, - the mslookup_mdns_server listening for mslookup requests, For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: I5cae6459090588b4dd292be90a5e8903432669d2 --- M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_vty.h M include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/mslookup_server_mdns.h M src/Makefile.am A src/dgsm_vty.c M src/hlr.c A src/mslookup_server_mdns.c 9 files changed, 566 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/57/16257/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5cae6459090588b4dd292be90a5e8903432669d2 Gerrit-Change-Number: 16257 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 13:01:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 13:01:12 +0000 Subject: Change in osmo-hlr[master]: D-GSM 3/n: implement roaming by mslookup in osmo-hlr In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#3) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16258 ) Change subject: D-GSM 3/n: implement roaming by mslookup in osmo-hlr ...................................................................... D-GSM 3/n: implement roaming by mslookup in osmo-hlr Add mslookup client to find remote home HLRs of unknown IMSIs, and proxy/forward GSUP for those to the right remote HLR instances. Add remote_hlr.c to manage one GSUP client per remote HLR GSUP address. Add proxy.c to keep state about remotely handled IMSIs (remote GSUP address, MSISDN, and probably more in future patches). The mslookup_server that determines whether a given MSISDN is attached locally now also needs to look in the proxy record: it is always the osmo-hlr immediately peering for the MSC that should respond to mslookup service address queries like SIP and SMPP. (Only gsup.hlr service is always answered by the home HLR.) Add dgsm.c to set up an mdns mslookup client, ask for IMSI homes, and to decide which GSUP is handled locally and which needs to go to a remote HLR. Add full VTY config and VTY tests. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: I2fe453553c90e6ee527ed13a13089900efd488aa --- M include/osmocom/hlr/Makefile.am A include/osmocom/hlr/dgsm.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/proxy.h A include/osmocom/hlr/remote_hlr.h M src/Makefile.am A src/dgsm.c M src/dgsm_vty.c M src/hlr.c M src/hlr_vty.c M src/logging.c M src/mslookup_server.c M src/mslookup_server_mdns.c A src/proxy.c A src/remote_hlr.c M tests/test_nodes.vty M tests/test_subscriber.vty 19 files changed, 1,851 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/58/16258/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I2fe453553c90e6ee527ed13a13089900efd488aa Gerrit-Change-Number: 16258 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 13:01:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 13:01:12 +0000 Subject: Change in osmo-hlr[master]: hlr_vty_subscr: prettier output for last LU seen In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 to look at the new patch set (#12). Change subject: hlr_vty_subscr: prettier output for last LU seen ...................................................................... hlr_vty_subscr: prettier output for last LU seen Extend the "last LU seen on ..." line with the amount of seconds that passed since now, or "(invalid timestamp)". Patch split from Id7fc50567211a0870ac0524f6dee94d4513781ba, because it depends on timestamp_age which was just added in Ife4a61d71926d08f310a1aeed9d9f1974f64178b. Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 --- M src/hlr_vty_subscr.c 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/14/16214/12 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 Gerrit-Change-Number: 16214 Gerrit-PatchSet: 12 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 13:01:12 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 13:01:12 +0000 Subject: Change in osmo-hlr[master]: add mslookup_manual_test In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#14) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16210 ) Change subject: add mslookup_manual_test ...................................................................... add mslookup_manual_test This can be used for manually testing proxy routing. It is not run as part of the testsuite. Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 --- M .gitignore M configure.ac M tests/Makefile.am A tests/mslookup_manual_test/Makefile.am A tests/mslookup_manual_test/fake_msc.c A tests/mslookup_manual_test/osmo-hlr-1.cfg A tests/mslookup_manual_test/osmo-hlr-2.cfg A tests/mslookup_manual_test/run.sh 8 files changed, 260 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/10/16210/14 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 Gerrit-Change-Number: 16210 Gerrit-PatchSet: 14 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 14:09:19 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 14:09:19 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup abstract client In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup abstract client ...................................................................... Patch Set 14: (9 comments) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 52 PS14, Line 52: * src/mslookup/mslookup_client_mdns.c lookup method implementing multicast DNS, client side. This line should go in next patches but fine. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 56 PS14, Line 56: * src/mslookup/mslookup_client_fake.c lookup method generating fake results, for testing client implementations. Better put this one after mslookup_client.c https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 58 PS14, Line 58: * src/mslookup/mdns*.c implementation of DNS to be used by mslookup_client_mdns.c, You may want to put that inside (1), before (1a) since it's for both 1a and 1b. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 61 PS14, Line 61: * contrib/dgsm/esme_dgsm.py Example implementation for an mslookup enabled SMS handler. utils/? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 80 PS14, Line 80: * src/proxy.c Keep track of proxied IMSIs and cache important subscriber data. is code in this file going to be used outside of dgsm scope? if not, sounds like it should be renamed to dgsm_proxy.c or dgsm_cache.c or alike. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 91 PS14, Line 91: #define CMP(a,b) (a < b? -1 : (a > b? 1 : 0)) Don't we have an OSMO_CMP somewhere for that? BTW, missing () around a and b. Missing space after b. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 214 PS14, Line 214: if (result->host_v4.ip[0]) { != '\0'. I had to go look into the header then into "struct osmo_sockaddr_str" @ libosmocore to find if that was a string or some kind of pointer. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 218 PS14, Line 218: if (result->host_v6.ip[0]) { same https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup_client.c File src/mslookup/mslookup_client.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup_client.c at 72 PS14, Line 72: if (!client) do we really expect someone to call this function with a null pointer? I wouldn't expect it. Add an assert if you are afraid about bad use. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 14 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 14:09:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 14:26:36 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 14:26:36 +0000 Subject: Change in libosmocore[master]: Introduce fields related to DTAP DLCI In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16259 to look at the new patch set (#2). Change subject: Introduce fields related to DTAP DLCI ...................................................................... Introduce fields related to DTAP DLCI Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561 --- M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/libosmogsm.map 3 files changed, 36 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/59/16259/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561 Gerrit-Change-Number: 16259 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 14:44:14 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 14:44:14 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... Patch Set 6: > Patch Set 5: > > Why does it matter whether attachment is CS or PS? please explain better the rationale behind this change from user case / scenario point of view. MSC and SGSN are two distinct clients connecting to the HLR and previously both overwrite the same last_lu_seen item. It is theoretically possible that the SGSN talks to a different HLR than the MSC, or that the SGSN does a LU later than the MSC, and, as the commit log states, for D-GSM I need to find out where the *CS* has been attached. If the SGSN modifies the same data, it may corrupt the decision of where a subscriber is currently attached for voice calls and SMS. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 14:44:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:00:01 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 15:00:01 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup abstract client In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup abstract client ...................................................................... Patch Set 14: (6 comments) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 52 PS14, Line 52: * src/mslookup/mslookup_client_mdns.c lookup method implementing multicast DNS, client side. > This line should go in next patches but fine. (this was explicitly meant as an overview across all upcoming patches) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 61 PS14, Line 61: * contrib/dgsm/esme_dgsm.py Example implementation for an mslookup enabled SMS handler. > utils/? IMHO it still belongs in contrib https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 80 PS14, Line 80: * src/proxy.c Keep track of proxied IMSIs and cache important subscriber data. > is code in this file going to be used outside of dgsm scope? if not, sounds like it should be rename [?] D-GSM is the concept for finding out where to proxy to, the GSUP proxy itself is a building block not necessarily limited to D-GSM https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 91 PS14, Line 91: #define CMP(a,b) (a < b? -1 : (a > b? 1 : 0)) > Don't we have an OSMO_CMP somewhere for that? BTW, missing () around a and b. Missing space after b. ah indeed https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup.c at 214 PS14, Line 214: if (result->host_v4.ip[0]) { > != '\0'. [?] this is literally the least interesting aspect of these patches that we could possibly discuss :P https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup_client.c File src/mslookup/mslookup_client.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/14/src/mslookup/mslookup_client.c at 72 PS14, Line 72: if (!client) > do we really expect someone to call this function with a null pointer? I wouldn't expect it. [?] no, I want to return false if the client is not allocated, not abort the program. osmo_mslookup_client_active(g_hlr->mslookup.client.running); -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 14 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 15:00:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:06:03 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 15:06:03 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 15:06:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:14:59 2019 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 27 Nov 2019 15:14:59 +0000 Subject: Change in osmo-bts[master]: l1sap.c: ensure ms power control loop is running In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/16233 to look at the new patch set (#3). Change subject: l1sap.c: ensure ms power control loop is running ...................................................................... l1sap.c: ensure ms power control loop is running When a bad SACCH frame is received the processing of the frame is ended early and lchan_ms_pwr_ctrl() is not called. This means that the power control loop does not get informed about a situation where the signal level is very weak and increasing the ms power would make sense. In order to ensure that the power control keeps working on lost SACCH frames, lets call lchan_ms_pwr_ctrl() with the current RSSI and the last known ms power setting. Related: OS#4281 Change-Id: I4fb85754b1a69376b02da7f4b175c6e8ec9cc35c --- M src/common/l1sap.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/33/16233/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16233 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4fb85754b1a69376b02da7f4b175c6e8ec9cc35c Gerrit-Change-Number: 16233 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:17:46 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 27 Nov 2019 15:17:46 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 15:17:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:27:14 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 15:27:14 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup abstract client In-Reply-To: References: Message-ID: Hello fixeria, pespin, laforge, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 to look at the new patch set (#15). Change subject: add libosmo-mslookup abstract client ...................................................................... add libosmo-mslookup abstract client mslookup is a key concept in Distributed GSM, which allows querying the current location of a subscriber in a number of cooperating but independent core network sites, by arbitrary service names and by MSISDN/IMSI. Add the abstract mslookup client library. An actual lookup method (besides mslookup_client_fake.c) is added in a subsequent patch. For a detailed overview of this and upcoming patches, please see the elaborate comment at the top of mslookup.c. Add as separate library, libosmo-mslookup, to allow adding D-GSM capability to arbitrary client programs. osmo-hlr will be the mslookup server, added in a subsequent patch. osmo-hlr itself will also use this library and act as an mslookup client, when requesting the home HLR for locally unknown IMSIs. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 23 files changed, 1,620 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/15 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 15 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:27:14 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 15:27:14 +0000 Subject: Change in osmo-hlr[master]: add mDNS lookup method to libosmo-mslookup In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16256 to look at the new patch set (#4). Change subject: add mDNS lookup method to libosmo-mslookup ...................................................................... add mDNS lookup method to libosmo-mslookup Add the first actually useful lookup method to the mslookup library: multicast DNS. The server side is added in a subsequent commit, when the mslookup server is implemented for the osmo-hlr program. Use custom DNS encoding instead of libc-ares (which we use in OsmoSGSN already), because libc-ares is only a DNS client implementation and we will need both client and server. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 --- M .gitignore M configure.ac M include/Makefile.am A include/osmocom/mslookup/Makefile.am A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_msg.h A include/osmocom/mslookup/mdns_rfc.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup_client_mdns.h M src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_rfc.c A src/mslookup/mdns_sock.c A src/mslookup/mslookup_client_mdns.c M tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err M tests/testsuite.at 21 files changed, 2,778 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/56/16256/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 Gerrit-Change-Number: 16256 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:39:27 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 15:39:27 +0000 Subject: Change in osmo-hlr[master]: change format of 'last LU seen' In-Reply-To: References: Message-ID: neels has uploaded a new patch set (#4) to the change originally created by laforge. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15359 ) Change subject: change format of 'last LU seen' ...................................................................... change format of 'last LU seen' So far, the time string format comes from ctime_r, and we manually add "UTC" to it. The ctime_r format is wildly chaotic IMHO, mixing weekday, day-of-month and hour and year in very unsorted ways. Adding "UTC" to it is non-standard. Instead use an ISO-8601 standardized time string via strftime(). Change-Id: I6731968f05050399f4dd43b241290186e0c59e1a --- M src/hlr_vty_subscr.c 1 file changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/59/15359/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15359 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I6731968f05050399f4dd43b241290186e0c59e1a Gerrit-Change-Number: 15359 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:41:20 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 15:41:20 +0000 Subject: Change in osmo-hlr[master]: change format of 'last LU seen' In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15359 ) Change subject: change format of 'last LU seen' ...................................................................... Patch Set 4: I took the liberty to rebase this onto the dgsm branch to avoid a merge conflict; fixed the condition; removed the static char[]. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15359 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I6731968f05050399f4dd43b241290186e0c59e1a Gerrit-Change-Number: 15359 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Wed, 27 Nov 2019 15:41:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:52:03 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 15:52:03 +0000 Subject: Change in osmo-hlr[master]: vty: show subscriber: change format of 'last LU seen' In-Reply-To: References: Message-ID: neels has uploaded a new patch set (#5) to the change originally created by laforge. ( https://gerrit.osmocom.org/c/osmo-hlr/+/15359 ) Change subject: vty: show subscriber: change format of 'last LU seen' ...................................................................... vty: show subscriber: change format of 'last LU seen' So far, the time string format comes from ctime_r, and we manually add "UTC" to it. The ctime_r format is wildly chaotic IMHO, mixing weekday, day-of-month and hour and year in very unsorted ways. Adding "UTC" to it is non-standard. Instead use an ISO-8601 standardized time string via strftime(). Change-Id: I6731968f05050399f4dd43b241290186e0c59e1a --- M src/hlr_vty_subscr.c 1 file changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/59/15359/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/15359 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I6731968f05050399f4dd43b241290186e0c59e1a Gerrit-Change-Number: 15359 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:52:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 15:52:04 +0000 Subject: Change in osmo-hlr[master]: vty: show subscriber: show lu d, h, m, s ago, not just seconds References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16262 ) Change subject: vty: show subscriber: show lu d,h,m,s ago, not just seconds ...................................................................... vty: show subscriber: show lu d,h,m,s ago, not just seconds Change-Id: I0fe34e0f065160ef959b2b7b4dd040f3f2985f43 --- M src/hlr_vty_subscr.c 1 file changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/62/16262/1 diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 0512ff6..dfbf72f 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -57,8 +57,20 @@ vty_out(vty, " last LU seen on %s: %s", domain_label, get_datestr(&last_lu_seen, datebuf, sizeof(datebuf))); if (!timestamp_age(&last_lu_seen, &age)) vty_out(vty, " (invalid timestamp)%s", VTY_NEWLINE); - else - vty_out(vty, " (%us ago)%s", age, VTY_NEWLINE); + else { + vty_out(vty, " ("); +#define UNIT_AGO(UNITNAME, UNITVAL) \ + if (age >= (UNITVAL)) { \ + vty_out(vty, "%u%s", age / (UNITVAL), UNITNAME); \ + age = age % (UNITVAL); \ + } + UNIT_AGO("d", 60*60*24); + UNIT_AGO("h", 60*60); + UNIT_AGO("m", 60); + UNIT_AGO("s", 1); + vty_out(vty, " ago)%s", VTY_NEWLINE); +#undef UNIT_AGO + } } static void subscr_dump_full_vty(struct vty *vty, struct hlr_subscriber *subscr) -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I0fe34e0f065160ef959b2b7b4dd040f3f2985f43 Gerrit-Change-Number: 16262 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:54:54 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 15:54:54 +0000 Subject: Change in osmo-hlr[master]: add mDNS lookup method to libosmo-mslookup In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16256 to look at the new patch set (#5). Change subject: add mDNS lookup method to libosmo-mslookup ...................................................................... add mDNS lookup method to libosmo-mslookup Add the first actually useful lookup method to the mslookup library: multicast DNS. The server side is added in a subsequent commit, when the mslookup server is implemented for the osmo-hlr program. Use custom DNS encoding instead of libc-ares (which we use in OsmoSGSN already), because libc-ares is only a DNS client implementation and we will need both client and server. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 --- M .gitignore M configure.ac M include/Makefile.am M include/osmocom/Makefile.am A include/osmocom/mslookup/Makefile.am A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_msg.h A include/osmocom/mslookup/mdns_rfc.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup_client_mdns.h M src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_rfc.c A src/mslookup/mdns_sock.c A src/mslookup/mslookup_client_mdns.c M tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err M tests/testsuite.at 22 files changed, 2,779 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/56/16256/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 Gerrit-Change-Number: 16256 Gerrit-PatchSet: 5 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:55:32 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:55:32 +0000 Subject: Change in osmo-ccid-firmware[master]: prevent uart interrupts before having proper structs In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16236 ) Change subject: prevent uart interrupts before having proper structs ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I177b182e5c693da34183e9066351e6930c61e4a6 Gerrit-Change-Number: 16236 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:55:40 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:55:40 +0000 Subject: Change in osmo-ccid-firmware[master]: setparameters/PPS works In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237 ) Change subject: setparameters/PPS works ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I2e226b0033f8a147fad60a33a63cc45ee9adc756 Gerrit-Change-Number: 16237 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:55:43 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:55:43 +0000 Subject: Change in osmo-ccid-firmware[master]: make it work, async uart (mode 0x1/0x7 does not matter), requires delay In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235 ) Change subject: make it work, async uart (mode 0x1/0x7 does not matter), requires delay ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia9d3b099181c24feabdb6a5fddb8db6c44efb72d Gerrit-Change-Number: 16235 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:55:45 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:55:45 +0000 Subject: Change in osmo-ccid-firmware[master]: attempt at handling card insertion/removal In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16238 ) Change subject: attempt at handling card insertion/removal ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16238 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib1a9a9c5cfb8c22cc3b885bc30a349e0f0145630 Gerrit-Change-Number: 16238 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:55:48 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:55:48 +0000 Subject: Change in osmo-ccid-firmware[master]: additional descriptor fixes In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16239 ) Change subject: additional descriptor fixes ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16239 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I5ebe907b3c35107e5a50cbc65835aca75e617c41 Gerrit-Change-Number: 16239 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:55:50 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:55:50 +0000 Subject: Change in osmo-ccid-firmware[master]: proper sercom config for the other 6 slots In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16240 ) Change subject: proper sercom config for the other 6 slots ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I266014e4d3ff09be9c5cdd5a686d6d2f5668145a Gerrit-Change-Number: 16240 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:55:53 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:55:53 +0000 Subject: Change in osmo-ccid-firmware[master]: assert on free in interrupt, too In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16241 ) Change subject: assert on free in interrupt, too ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I825496c81c2259f4af7f80089a0b047c5600a211 Gerrit-Change-Number: 16241 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:55:55 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:55:55 +0000 Subject: Change in osmo-ccid-firmware[master]: disable talloc_memlimit() and use existing msgb_context (pool) In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16242 ) Change subject: disable talloc_memlimit() and use existing msgb_context (pool) ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I7d3a00ea4581b4f01e72294ac4e810e54c410e24 Gerrit-Change-Number: 16242 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:55:57 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:55:57 +0000 Subject: Change in osmo-ccid-firmware[master]: dbg In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16243 ) Change subject: dbg ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I4340cb53f0f903842eb1c4d60a36d44ac9e5cbde Gerrit-Change-Number: 16243 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:56:00 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:56:00 +0000 Subject: Change in osmo-ccid-firmware[master]: better error handling In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16244 ) Change subject: better error handling ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9983c2f58c7f420a0132d186f344ace1de616ba1 Gerrit-Change-Number: 16244 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:56:02 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:56:02 +0000 Subject: Change in osmo-ccid-firmware[master]: fix power descriptor value In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16245 ) Change subject: fix power descriptor value ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id7231c2315b141d2f6e88a0ddd4eca3b9384ecc8 Gerrit-Change-Number: 16245 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:56:05 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:56:05 +0000 Subject: Change in osmo-ccid-firmware[master]: fsm completion event handling from main loop In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16246 ) Change subject: fsm completion event handling from main loop ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: If71a37dcaa5162c18d83e4b2a0cdae69574b92d9 Gerrit-Change-Number: 16246 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:56:11 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:56:11 +0000 Subject: Change in osmo-ccid-firmware[master]: add a note for D=64 pecularities In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16247 ) Change subject: add a note for D=64 pecularities ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3da1f0172737c8208325a6ec5aff72fa68355963 Gerrit-Change-Number: 16247 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:56:14 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:56:14 +0000 Subject: Change in osmo-ccid-firmware[master]: pps warning In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16248 ) Change subject: pps warning ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie0cbca9c901643268adddc69c08be494432a3235 Gerrit-Change-Number: 16248 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:56:16 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:56:16 +0000 Subject: Change in osmo-ccid-firmware[master]: the magic sauce that makes it work In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16250 ) Change subject: the magic sauce that makes it work ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I25ba236b5a3a2c876ace4ca4398061889b4a9bff Gerrit-Change-Number: 16250 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:56:19 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:56:19 +0000 Subject: Change in osmo-ccid-firmware[master]: boost the uart interrupt priority In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16249 ) Change subject: boost the uart interrupt priority ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic1873922c042c45335320bdb669cf2a9346eaa81 Gerrit-Change-Number: 16249 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:56:22 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:56:22 +0000 Subject: Change in osmo-ccid-firmware[master]: remove old uart commands In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16252 ) Change subject: remove old uart commands ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16252 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I91fff5d8c296661bcef8576244079f3a5fc8800b Gerrit-Change-Number: 16252 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:56:25 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:56:25 +0000 Subject: Change in osmo-ccid-firmware[master]: enable the final slot In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16254 ) Change subject: enable the final slot ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I1c18459d7e43e6fbd1022fabb52138904f2bf480 Gerrit-Change-Number: 16254 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:56:59 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:56:59 +0000 Subject: Change in osmo-ccid-firmware[master]: prettier slot bitmask code In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16255 ) Change subject: prettier slot bitmask code ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16255 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iaeb97a12f04c6f07ab59b290bad5519b45300916 Gerrit-Change-Number: 16255 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:57:03 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:57:03 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart cleanup In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16251 ) Change subject: cuart cleanup ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia5b66a86f0f53e5123139c3c5047f70582d1bf6e Gerrit-Change-Number: 16251 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:57:06 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:57:06 +0000 Subject: Change in osmo-ccid-firmware[master]: first attempt at timeout handling In-Reply-To: References: Message-ID: Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16253 ) Change subject: first attempt at timeout handling ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I96315fed5696ccd75318ebd88cb7725ed7568c07 Gerrit-Change-Number: 16253 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:58:53 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:58:53 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: Add card_uart driver for ASF4 USART In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15723 ) Change subject: WIP: Add card_uart driver for ASF4 USART ...................................................................... Patch Set 6: Code-Review-2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15723 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9a141e9d2125fbfc992ad51aa4b11a39ee186607 Gerrit-Change-Number: 15723 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Assignee: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 15:58:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 15:59:01 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 15:59:01 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: attempt to use iso7816_fsm + Cuart from firmware In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15724 ) Change subject: WIP: attempt to use iso7816_fsm + Cuart from firmware ...................................................................... Patch Set 6: Code-Review-2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15724 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I1d7c9371406ecfadc565fdf047dd935eceeee48f Gerrit-Change-Number: 15724 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Assignee: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 15:59:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 16:33:01 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 27 Nov 2019 16:33:01 +0000 Subject: Change in osmo-bts[master]: l1sap.c: ensure ms power control loop is running In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16233 ) Change subject: l1sap.c: ensure ms power control loop is running ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/16233/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/16233/3//COMMIT_MSG at 15 PS3, Line 15: last known ms power setting. It's not the last known ms power setting, but the requested one by the BTS/BSC :) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16233 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4fb85754b1a69376b02da7f4b175c6e8ec9cc35c Gerrit-Change-Number: 16233 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Wed, 27 Nov 2019 16:33:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:06 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:06 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: attempt to use iso7816_fsm + Cuart from firmware References: Message-ID: Hello laforge, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16263 to review the following change. Change subject: WIP: attempt to use iso7816_fsm + Cuart from firmware ...................................................................... WIP: attempt to use iso7816_fsm + Cuart from firmware Change-Id: I9d65428edbd3e6c978024a255a65d4531f556f62 --- M ccid_host/ccid_slot_sim.c M sysmoOCTSIM/gcc/Makefile 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/63/16263/1 diff --git a/ccid_host/ccid_slot_sim.c b/ccid_host/ccid_slot_sim.c index 1bd514a..dc33114 100644 --- a/ccid_host/ccid_slot_sim.c +++ b/ccid_host/ccid_slot_sim.c @@ -100,9 +100,10 @@ { if (enable) { cs->icc_powered = true; - /* FIXME: What to do about ATR? */ + cs->icc_in_reset = false; } else { cs->icc_powered = false; + cs->icc_in_reset = true; } } diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 595fd62..4840fea 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -83,6 +83,10 @@ atmel_start.o \ ccid_common/ccid_proto.o \ ccid_common/ccid_device.o \ + ccid_common/iso7816_fsm.o \ + ccid_common/cuart.o \ + ccid_common/ccid_slot_fsm.o \ + cuart_driver_asf4_usart_async.o \ command.o \ dma_m2m/dma_memory.o \ driver_init.o \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9d65428edbd3e6c978024a255a65d4531f556f62 Gerrit-Change-Number: 16263 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:07 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:07 +0000 Subject: Change in osmo-ccid-firmware[master]: don't wait for TCK if card only supports T0 References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 ) Change subject: don't wait for TCK if card only supports T0 ...................................................................... don't wait for TCK if card only supports T0 This could be handled by a timeout instead, but timeouts don't work yet. Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add --- M ccid_common/iso7816_fsm.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/64/16264/1 diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 21378e0..beda7ab 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -633,6 +633,10 @@ osmo_fsm_inst_state_chg_ms(fi, ATR_S_WAIT_TCK, guard_time_ms, T_GUARD); break; + } else { + /* no TCK present, ATR complete; notify parent */ + osmo_fsm_inst_state_chg(fi, ATR_S_DONE, 0, 0); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_ATR_DONE_IND, atp->atr); } } else { break; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add Gerrit-Change-Number: 16264 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:07 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:07 +0000 Subject: Change in osmo-ccid-firmware[master]: sercom config for t1 References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 ) Change subject: sercom config for t1 ...................................................................... sercom config for t1 t0 doesn't work Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 --- M sysmoOCTSIM/config/hpl_sercom_config.h 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/65/16265/1 diff --git a/sysmoOCTSIM/config/hpl_sercom_config.h b/sysmoOCTSIM/config/hpl_sercom_config.h index beac040..bb2bbff 100644 --- a/sysmoOCTSIM/config/hpl_sercom_config.h +++ b/sysmoOCTSIM/config/hpl_sercom_config.h @@ -52,7 +52,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_0_USART_SBMODE -#define CONF_SERCOM_0_USART_SBMODE 0 +#define CONF_SERCOM_0_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -70,7 +70,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_0_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_0_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_0_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -324,7 +324,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_1_USART_SBMODE -#define CONF_SERCOM_1_USART_SBMODE 0 +#define CONF_SERCOM_1_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -342,7 +342,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_1_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_1_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_1_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -596,7 +596,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_2_USART_SBMODE -#define CONF_SERCOM_2_USART_SBMODE 0 +#define CONF_SERCOM_2_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -614,7 +614,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_2_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_2_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_2_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -868,7 +868,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_3_USART_SBMODE -#define CONF_SERCOM_3_USART_SBMODE 0 +#define CONF_SERCOM_3_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -886,7 +886,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_3_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_3_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_3_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -1140,7 +1140,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_4_USART_SBMODE -#define CONF_SERCOM_4_USART_SBMODE 0 +#define CONF_SERCOM_4_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -1158,7 +1158,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_4_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_4_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_4_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -1412,7 +1412,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_5_USART_SBMODE -#define CONF_SERCOM_5_USART_SBMODE 0 +#define CONF_SERCOM_5_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -1430,7 +1430,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_5_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_5_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_5_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -1684,7 +1684,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_6_USART_SBMODE -#define CONF_SERCOM_6_USART_SBMODE 0 +#define CONF_SERCOM_6_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -1702,7 +1702,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_6_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_6_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_6_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 Gerrit-Change-Number: 16265 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:07 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:07 +0000 Subject: Change in osmo-ccid-firmware[master]: split usb descriptor code References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16266 ) Change subject: split usb descriptor code ...................................................................... split usb descriptor code Change-Id: I9eb3606cfbaecf81f7ae80a9ea3d061a39088760 --- M sysmoOCTSIM/main.c M sysmoOCTSIM/usb/class/ccid/device/ccid_df.c M sysmoOCTSIM/usb_descriptors.c A sysmoOCTSIM/usb_descriptors.h 4 files changed, 105 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/66/16266/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 15e2004..fed562b 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -43,6 +43,8 @@ // TODO put declaration in more global file // TODO for now SIM7 is not present because used for debug static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; +#include "ccid_device.h" +#include "usb_descriptors.h" /** number of bytes transmitted on the SIM peripheral */ static volatile bool SIM_tx_count[8]; diff --git a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c index 65d3499..665f0fc 100644 --- a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c +++ b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c @@ -24,6 +24,9 @@ #include "ccid_proto.h" #include "usb_includes.h" +#include "cdcdf_acm_desc.h" +#include "usb_descriptors.h" + #ifndef USB_CLASS_CCID #define USB_CLASS_CCID 11 #endif @@ -40,9 +43,11 @@ static struct usbdf_driver _ccid_df; static struct ccid_df_func_data _ccid_df_funcd; +extern const struct usb_desc_collection usb_fs_descs; + /* FIXME: make those configurable, ensure they're sized according to * bNumClockSupported / bNumDataRatesSupported */ -static uint32_t ccid_clock_frequencies[] = { LE32(20000) }; +static uint32_t ccid_clock_frequencies[CCID_NUM_CLK_SUPPORTED] = { LE32(2500),LE32(5000),LE32(10000),LE32(20000) }; static uint32_t ccid_baud_rates[] = { LE32(9600) }; static int32_t ccid_df_enable(struct usbdf_driver *drv, struct usbd_descriptors *desc) diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index 944e43b..63ace0c 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -1,54 +1,32 @@ +/* + * Copyright (C) 2019 sysmocom -s.f.m.c. GmbH, Author: Eric Wild + * + * This program is free software; you can redistribute it and/or + * modify 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 "usbd_config.h" #include "usbdc.h" #include "usb_protocol.h" #include "usb_protocol_cdc.h" #include "ccid_proto.h" #include "cdcdf_acm_desc.h" +#include "usb_descriptors.h" -/* aggregate descriptors for the combined CDC-ACM + CCID device that we expose - * from sysmoQMOD */ -enum str_desc_num { - STR_DESC_MANUF = 1, - STR_DESC_PRODUCT, - STR_DESC_CONFIG, - STR_DESC_INTF_ACM_COMM, - STR_DESC_INTF_ACM_DATA, - STR_DESC_INTF_CCID, - STR_DESC_SERIAL, -}; -/* a struct of structs representing the concatenated collection of USB descriptors */ -struct usb_desc_collection { - struct usb_dev_desc dev; - struct usb_config_desc cfg; - - /* CDC-ACM: Two interfaces, one with IRQ EP and one with BULK IN + OUT */ - struct { - struct { - struct usb_iface_desc iface; - struct usb_cdc_hdr_desc cdc_hdr; - struct usb_cdc_call_mgmt_desc cdc_call_mgmt; - struct usb_cdc_acm_desc cdc_acm; - struct usb_cdc_union_desc cdc_union; - struct usb_ep_desc ep[1]; - } comm; - struct { - struct usb_iface_desc iface; - struct usb_ep_desc ep[2]; - } data; - } cdc; - - /* CCID: One interface with CCID class descriptor and three endpoints */ - struct { - struct usb_iface_desc iface; - struct usb_ccid_class_descriptor class; - struct usb_ep_desc ep[3]; - } ccid; - uint8_t str[116]; -} __attribute__((packed)); - -static const struct usb_desc_collection usb_fs_descs = { +const struct usb_desc_collection usb_fs_descs = { .dev = { .bLength = sizeof(struct usb_dev_desc), .bDescriptorType = USB_DT_DEVICE, @@ -176,17 +154,23 @@ .bcdCCID = LE16(0x0110), .bMaxSlotIndex = 7, .bVoltageSupport = 0x07, /* 5/3/1.8V */ - .dwProtocols = 0x03, + .dwProtocols = 0x01, /* only t0 */ .dwDefaultClock = LE32(2500), .dwMaximumClock = LE32(20000), - .bNumClockSupported = 4, - .dwDataRate = LE32(9600), + .bNumClockSupported = CCID_NUM_CLK_SUPPORTED, + .dwDataRate = LE32(6720), /* default clock 2.5M/372 */ .dwMaxDataRate = LE32(921600), .bNumDataRatesSupported = 0, .dwMaxIFSD = LE32(0), .dwSynchProtocols = LE32(0), .dwMechanical = LE32(0), - .dwFeatures = LE32(0x10 | 0x00010000), + /* 0x10000 TPDU level exchanges with CCID + * 0x80 Automatic PPS made by the CCID according to the active parameters + * 0x20 Automatic baud rate change according to active parameters + * provided by the Host or self determined + * 0x10 Automatic ICC clock frequency change according to active parameters + * provided by the Host or self determined */ + .dwFeatures = LE32(0x10 | 0x20 | 0x80 | 0x00010000), .dwMaxCCIDMessageLength = 272, .bClassGetResponse = 0xff, .bClassEnvelope = 0xff, diff --git a/sysmoOCTSIM/usb_descriptors.h b/sysmoOCTSIM/usb_descriptors.h new file mode 100644 index 0000000..94a4212 --- /dev/null +++ b/sysmoOCTSIM/usb_descriptors.h @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2019 sysmocom -s.f.m.c. GmbH, Author: Eric Wild + * + * This program is free software; you can redistribute it and/or + * modify 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. +*/ + +#ifndef USB_DESCRIPTORS_H_ +#define USB_DESCRIPTORS_H_ + +#define CCID_NUM_CLK_SUPPORTED 4 + +/* aggregate descriptors for the combined CDC-ACM + CCID device that we expose + * from sysmoQMOD */ + +enum str_desc_num { + STR_DESC_MANUF = 1, + STR_DESC_PRODUCT, + STR_DESC_CONFIG, + STR_DESC_INTF_ACM_COMM, + STR_DESC_INTF_ACM_DATA, + STR_DESC_INTF_CCID, + STR_DESC_SERIAL, +}; + +/* a struct of structs representing the concatenated collection of USB descriptors */ +struct usb_desc_collection { + struct usb_dev_desc dev; + struct usb_config_desc cfg; + + /* CDC-ACM: Two interfaces, one with IRQ EP and one with BULK IN + OUT */ + struct { + struct { + struct usb_iface_desc iface; + struct usb_cdc_hdr_desc cdc_hdr; + struct usb_cdc_call_mgmt_desc cdc_call_mgmt; + struct usb_cdc_acm_desc cdc_acm; + struct usb_cdc_union_desc cdc_union; + struct usb_ep_desc ep[1]; + } comm; + struct { + struct usb_iface_desc iface; + struct usb_ep_desc ep[2]; + } data; + } cdc; + + /* CCID: One interface with CCID class descriptor and three endpoints */ + struct { + struct usb_iface_desc iface; + struct usb_ccid_class_descriptor class; + struct usb_ep_desc ep[3]; + } ccid; + uint8_t str[116]; +} __attribute__((packed)); + +#endif /* USB_DESCRIPTORS_H_ */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9eb3606cfbaecf81f7ae80a9ea3d061a39088760 Gerrit-Change-Number: 16266 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:08 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:08 +0000 Subject: Change in osmo-ccid-firmware[master]: Add card_uart driver for ASF4 USART References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16267 ) Change subject: Add card_uart driver for ASF4 USART ...................................................................... Add card_uart driver for ASF4 USART Change-Id: Ic690055bc332ccca3de7c5f4429399cf9ff1d4da --- M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.h A sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/main.c 4 files changed, 525 insertions(+), 720 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/67/16267/1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index a7ecb9f..870cf35 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -31,12 +31,18 @@ static struct iso_fsm_slot_instance g_si; -struct iso_fsm_slot *ccid_slot2iso_fsm_slot(struct ccid_slot *cs) +static struct iso_fsm_slot *ccid_slot2iso_fsm_slot(struct ccid_slot *cs) { OSMO_ASSERT(cs->slot_nr < ARRAY_SIZE(g_si.slot)); return &g_si.slot[cs->slot_nr]; } +struct card_uart *cuart4slot_nr(uint8_t slot_nr) +{ + OSMO_ASSERT(slot_nr < ARRAY_SIZE(g_si.slot)); + return g_si.slot[slot_nr].cuart; +} + static const uint8_t sysmousim_sjs1_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, @@ -74,9 +80,10 @@ osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_POWER_UP_IND, NULL); cs->icc_powered = true; card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK, true); - usleep(10000); - card_uart_ctrl(ss->cuart, CUART_CTL_RST, false); + delay_us(10000); + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_RESET_REL_IND, NULL); + card_uart_ctrl(ss->cuart, CUART_CTL_RST, false); msgb_free(msg); /* continues in iso_fsm_clot_user_cb once ATR is received */ @@ -145,8 +152,10 @@ if (enable) { card_uart_ctrl(ss->cuart, CUART_CTL_POWER, true); + cs->icc_powered = true; } else { card_uart_ctrl(ss->cuart, CUART_CTL_POWER, false); + cs->icc_powered = false; } } @@ -179,31 +188,35 @@ return 0; } - +extern void *g_tall_ctx; static int iso_fsm_slot_init(struct ccid_slot *cs) { - void *ctx = NULL; /* FIXME */ + void *ctx = g_tall_ctx; /* FIXME */ struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct card_uart *cuart = talloc_zero(ctx, struct card_uart); - char id_buf[16]; - char *devname = NULL; + char id_buf[16] = "SIM0"; + char devname[] = "foobar"; int rc; LOGPCS(cs, LOGL_DEBUG, "%s\n", __func__); /* HACK: make this in some way configurable so it works both in the firmware * and on the host (functionfs) */ - if (cs->slot_nr == 0) { - cs->icc_present = true; - devname = "/dev/ttyUSB5"; - } +// if (cs->slot_nr == 0) { +// cs->icc_present = true; +// devname = "/dev/ttyUSB5"; +// } + devname[0] = cs->slot_nr +0x30; + devname[1] = 0; + //sprintf(devname, "%d", cs->slot_nr); if (!cuart) return -ENOMEM; - snprintf(id_buf, sizeof(id_buf), "SIM%d", cs->slot_nr); + //snprintf(id_buf, sizeof(id_buf), "SIM%d", cs->slot_nr); + id_buf[3] = cs->slot_nr +0x30; if (devname) { - rc = card_uart_open(cuart, "tty", devname); + rc = card_uart_open(cuart, "asf4", devname); if (rc < 0) { LOGPCS(cs, LOGL_ERROR, "Cannot open UART %s: %d\n", devname, rc); talloc_free(cuart); diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 951a3ec..5e397ab 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -7,6 +7,8 @@ #include #include "utils_ringbuffer.h" +struct usart_async_descriptor; + enum card_uart_event { /* a single byte was received, it's present at the (uint8_t *) data location */ CUART_E_RX_SINGLE, @@ -90,6 +92,10 @@ struct osmo_fd ofd; unsigned int baudrate; } tty; + struct { + struct usart_async_descriptor *usa_pd; + uint8_t slot_nr; + } asf4; } u; }; diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c new file mode 100644 index 0000000..f9856f3 --- /dev/null +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -0,0 +1,402 @@ +/* Card (ICC) UART driver for the Atmel ASF4 asynchronous USART */ + +#include + +#include +#include + +#include +#include +#include "driver_init.h" + +#include "ncn8025.h" + +#include "cuart.h" + +static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; + +extern struct card_uart *cuart4slot_nr(uint8_t slot_nr); + +/*********************************************************************** + * low-level helper routines + ***********************************************************************/ + +static void _SIM_rx_cb(const struct usart_async_descriptor *const io_descr, uint8_t slot_nr) +{ + struct card_uart *cuart = cuart4slot_nr(slot_nr); + int rc; + OSMO_ASSERT(cuart); + + if (cuart->rx_threshold == 1) { + /* bypass ringbuffer and report byte directly */ + uint8_t rx[1]; + rc = io_read((struct io_descriptor * const)&io_descr->io, rx, sizeof(rx)); + OSMO_ASSERT(rc == sizeof(rx)); + card_uart_notification(cuart, CUART_E_RX_SINGLE, rx); + } else { + /* go via ringbuffer and notify only after threshold */ + if (ringbuffer_num(&io_descr->rx) >= cuart->rx_threshold) + card_uart_notification(cuart, CUART_E_RX_COMPLETE, NULL); + } +} + +static void _SIM_tx_cb(const struct usart_async_descriptor *const io_descr, uint8_t slot_nr) +{ + struct card_uart *cuart = cuart4slot_nr(slot_nr); + OSMO_ASSERT(cuart); + card_uart_notification(cuart, CUART_E_TX_COMPLETE, io_descr->tx_buffer); +} + +#include +#include + + +static void _SIM_error_cb(const struct usart_async_descriptor *const descr){ + volatile uint32_t status = hri_sercomusart_read_STATUS_reg(descr->device.hw); + volatile uint32_t data = hri_sercomusart_read_DATA_reg(descr->device.hw); + volatile uint32_t errrs = hri_sercomusart_read_RXERRCNT_reg(descr->device.hw); + OSMO_ASSERT(0 == 1) +} + +/* the below ugli-ness is required as the usart_async_descriptor doesn't have + * some kind of 'private' member that could provide the call-back anty kind of + * context */ +static void SIM0_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 0); +} +static void SIM1_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 1); +} +static void SIM2_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 2); +} +static void SIM3_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 3); +} +static void SIM4_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 4); +} +static void SIM5_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 5); +} +static void SIM6_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 6); +} +static void SIM7_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 7); +} +static usart_cb_t SIM_rx_cb[8] = { + SIM0_rx_cb, SIM1_rx_cb, SIM2_rx_cb, SIM3_rx_cb, + SIM4_rx_cb, SIM5_rx_cb, SIM6_rx_cb, SIM7_rx_cb, +}; +static void SIM0_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 0); +} +static void SIM1_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 1); +} +static void SIM2_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 2); +} +static void SIM3_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 3); +} +static void SIM4_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 4); +} +static void SIM5_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 5); +} +static void SIM6_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 6); +} +static void SIM7_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 7); +} +static usart_cb_t SIM_tx_cb[8] = { + SIM0_tx_cb, SIM1_tx_cb, SIM2_tx_cb, SIM3_tx_cb, + SIM4_tx_cb, SIM5_tx_cb, SIM6_tx_cb, SIM7_tx_cb, +}; + +#include +#include "atmel_start.h" +#include "atmel_start_pins.h" +#include "config/hpl_gclk_config.h" +#include "iso7816_3.h" + +/** possible clock sources for the SERCOM peripheral + * warning: the definition must match the GCLK configuration + */ +static const uint8_t sercom_glck_sources[] = {GCLK_PCHCTRL_GEN_GCLK2_Val, GCLK_PCHCTRL_GEN_GCLK4_Val, GCLK_PCHCTRL_GEN_GCLK6_Val}; + + /** possible clock frequencies in MHz for the SERCOM peripheral + * warning: the definition must match the GCLK configuration + */ +static const double sercom_glck_freqs[] = {100E6 / CONF_GCLK_GEN_2_DIV, 100E6 / CONF_GCLK_GEN_4_DIV, 120E6 / CONF_GCLK_GEN_6_DIV}; + +/** the GCLK ID for the SERCOM SIM peripherals + * @note: used as index for PCHCTRL + */ +static const uint8_t SIM_peripheral_GCLK_ID[] = {SERCOM0_GCLK_ID_CORE, SERCOM1_GCLK_ID_CORE, SERCOM2_GCLK_ID_CORE, SERCOM3_GCLK_ID_CORE, SERCOM4_GCLK_ID_CORE, SERCOM5_GCLK_ID_CORE, SERCOM6_GCLK_ID_CORE, SERCOM7_GCLK_ID_CORE}; + + +/** change baud rate of card slot + * @param[in] slotnr slot number for which the baud rate should be set + * @param[in] baudrate baud rate in bps to set + * @return if the baud rate has been set, else a parameter is out of range + */ +static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) +{ + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + + // calculate the error corresponding to the clock sources + uint16_t bauds[ARRAY_SIZE(sercom_glck_freqs)]; + double errors[ARRAY_SIZE(sercom_glck_freqs)]; + for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { + double freq = sercom_glck_freqs[i]; // remember possible SERCOM frequency + uint32_t min = freq/16. * (1. - 65535. / 65536.); // calculate the minimum baud rate for this frequency + uint32_t max = freq/16. * (1. - 1. / 65536.); // calculate the maximum baud rate for this frequency + if (baudrate < min || baudrate > max) { // baud rate it out of supported range + errors[i] = NAN; + } else { + uint16_t baud = round(65536. * (1. - 16. * (baudrate/freq))); + bauds[i] = baud; + double actual = freq/16. * (1. - baud / 65536.); + errors[i] = fabs(1.0 - (actual / baudrate)); + } + } + + // find the smallest error + uint8_t best = ARRAY_SIZE(sercom_glck_freqs); + for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { + if (isnan(errors[i])) { + continue; + } + if (best >= ARRAY_SIZE(sercom_glck_freqs)) { + best = i; + } else if (errors[i] < errors[best]) { + best = i; + } + } + if (best >= ARRAY_SIZE(sercom_glck_freqs)) { // found no clock supporting this baud rate + return false; + } + + // set clock and baud rate + struct usart_async_descriptor* slot = SIM_peripheral_descriptors[slotnr]; // get slot + if (NULL == slot) { + return false; + } + printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); + while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) + usart_async_disable(slot); // disable SERCOM peripheral + hri_gclk_clear_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos)); // disable clock for this peripheral + while (hri_gclk_get_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos))); // wait until clock is really disabled + // it does not seem we need to completely disable the peripheral using hri_mclk_clear_APBDMASK_SERCOMn_bit + hri_gclk_write_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], sercom_glck_sources[best] | (1 << GCLK_PCHCTRL_CHEN_Pos)); // set peripheral core clock and re-enable it + usart_async_set_baud_rate(slot, bauds[best]); // set the new baud rate + usart_async_enable(slot); // re-enable SERCOM peripheral + + return true; +} + +/** change ISO baud rate of card slot + * @param[in] slotnr slot number for which the baud rate should be set + * @param[in] clkdiv can clock divider + * @param[in] f clock rate conversion integer F + * @param[in] d baud rate adjustment factor D + * @return if the baud rate has been set, else a parameter is out of range + */ +static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { + return false; + } + if (!iso7816_3_valid_f(f)) { + return false; + } + if (!iso7816_3_valid_d(d)) { + return false; + } + + // set clockdiv + struct ncn8025_settings settings; + ncn8025_get(slotnr, &settings); + if (settings.clkdiv != clkdiv) { + settings.clkdiv = clkdiv; + ncn8025_set(slotnr, &settings); + } + + // calculate desired frequency + uint32_t freq = 20000000UL; // maximum frequency + switch (clkdiv) { + case SIM_CLKDIV_1: + freq /= 1; + break; + case SIM_CLKDIV_2: + freq /= 2; + break; + case SIM_CLKDIV_4: + freq /= 4; + break; + case SIM_CLKDIV_8: + freq /= 8; + break; + } + + // set baud rate + uint32_t baudrate = (freq * d) / f; // calculate actual baud rate + return slot_set_baudrate(slotnr, baudrate); // set baud rate +} + +/*********************************************************************** + * Interface with card_uart (cuart) core + ***********************************************************************/ + +/* forward-declaration */ +static struct card_uart_driver asf4_usart_driver; +static int asf4_usart_close(struct card_uart *cuart); + +static int asf4_usart_open(struct card_uart *cuart, const char *device_name) +{ + struct usart_async_descriptor *usa_pd; + int slot_nr = atoi(device_name); + + if (slot_nr >= ARRAY_SIZE(SIM_peripheral_descriptors)) + return -ENODEV; + usa_pd = SIM_peripheral_descriptors[slot_nr]; + if (!usa_pd) + return -ENODEV; + + cuart->u.asf4.usa_pd = usa_pd; + cuart->u.asf4.slot_nr = slot_nr; + + + usart_async_register_callback(usa_pd, USART_ASYNC_RXC_CB, SIM_rx_cb[slot_nr]); + usart_async_register_callback(usa_pd, USART_ASYNC_TXC_CB, SIM_tx_cb[slot_nr]); + usart_async_register_callback(usa_pd, USART_ASYNC_ERROR_CB, _SIM_error_cb); + usart_async_enable(usa_pd); + + // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + + return 0; +} + +static int asf4_usart_close(struct card_uart *cuart) +{ + struct usart_async_descriptor *usa_pd = cuart->u.asf4.usa_pd; + + OSMO_ASSERT(cuart->driver == &asf4_usart_driver); + + usart_async_disable(usa_pd); + + return 0; +} + +static int asf4_usart_async_tx(struct card_uart *cuart, const uint8_t *data, size_t len) +{ + struct usart_async_descriptor *usa_pd = cuart->u.asf4.usa_pd; + int rc; + + OSMO_ASSERT(cuart->driver == &asf4_usart_driver); + OSMO_ASSERT(usart_async_is_tx_empty(usa_pd)); + + rc = io_write(&usa_pd->io, data, len); + if (rc < 0) + return rc; + + cuart->tx_busy = true; + + return rc; +} + +static int asf4_usart_async_rx(struct card_uart *cuart, uint8_t *data, size_t len) +{ + struct usart_async_descriptor *usa_pd = cuart->u.asf4.usa_pd; + + OSMO_ASSERT(cuart->driver == &asf4_usart_driver); + + return io_read(&usa_pd->io, data, len); +} + +static int asf4_usart_ctrl(struct card_uart *cuart, enum card_uart_ctl ctl, int arg) +{ + struct ncn8025_settings settings; + Sercom *sercom = cuart->u.asf4.usa_pd->device.hw; + + switch (ctl) { + case CUART_CTL_RX: + if (arg){ + sercom->USART.CTRLB.bit.RXEN = 1; + sercom->USART.CTRLB.bit.TXEN = 0; + } else { + delay_us(100); + sercom->USART.CTRLB.bit.RXEN = 0; + sercom->USART.CTRLB.bit.TXEN = 1; + } + break; + case CUART_CTL_RST: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + settings.rstin = arg ? true : false; + ncn8025_set(cuart->u.asf4.slot_nr, &settings); + usart_async_flush_rx_buffer(cuart->u.asf4.usa_pd); + break; + case CUART_CTL_POWER: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + settings.cmdvcc = arg ? true : false; + settings.led = arg ? true : false; + settings.vsel = SIM_VOLT_5V0; + + // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + if(arg) + slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + + ncn8025_set(cuart->u.asf4.slot_nr, &settings); + break; + case CUART_CTL_WTIME: + /* no driver-specific handling of this */ + break; + case CUART_CTL_CLOCK: + /* FIXME */ + default: + return -EINVAL; + } + return 0; +} + +static const struct card_uart_ops asf4_usart_ops = { + .open = asf4_usart_open, + .close = asf4_usart_close, + .async_tx = asf4_usart_async_tx, + .async_rx = asf4_usart_async_rx, + .ctrl = asf4_usart_ctrl, +}; + +static struct card_uart_driver asf4_usart_driver = { + .name = "asf4", + .ops = &asf4_usart_ops, +}; + +static __attribute__((constructor)) void on_dso_load_cuart_asf4(void) +{ + card_uart_driver_register(&asf4_usart_driver); +} diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index fed562b..059c99d 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -40,48 +40,11 @@ #include "command.h" -// TODO put declaration in more global file -// TODO for now SIM7 is not present because used for debug -static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; #include "ccid_device.h" #include "usb_descriptors.h" +extern struct ccid_slot_ops iso_fsm_slot_ops; +static struct ccid_instance g_ci; -/** number of bytes transmitted on the SIM peripheral */ -static volatile bool SIM_tx_count[8]; - -static void SIM_rx_cb(const struct usart_async_descriptor *const io_descr) -{ -} - -/** called when the transmission is complete - * e.g. this is when the byte has been sent and there is no data to transmit anymore - */ -static void SIM_tx_cb(const struct usart_async_descriptor *const io_descr) -{ - // find slotnr for corresponding USART - uint8_t slotnr; - for (slotnr = 0; slotnr < ARRAY_SIZE(SIM_peripheral_descriptors) && SIM_peripheral_descriptors[slotnr] != io_descr; slotnr++); - - // set flag - if (slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)) { - SIM_tx_count[slotnr] = true; - } -} - -/** possible clock sources for the SERCOM peripheral - * warning: the definition must match the GCLK configuration - */ -static const uint8_t sercom_glck_sources[] = {GCLK_PCHCTRL_GEN_GCLK2_Val, GCLK_PCHCTRL_GEN_GCLK4_Val, GCLK_PCHCTRL_GEN_GCLK6_Val}; - -/** possible clock frequencies in MHz for the SERCOM peripheral - * warning: the definition must match the GCLK configuration - */ -static const double sercom_glck_freqs[] = {100E6 / CONF_GCLK_GEN_2_DIV, 100E6 / CONF_GCLK_GEN_4_DIV, 120E6 / CONF_GCLK_GEN_6_DIV}; - -/** the GCLK ID for the SERCOM SIM peripherals - * @note: used as index for PCHCTRL - */ -static const uint8_t SIM_peripheral_GCLK_ID[] = {SERCOM0_GCLK_ID_CORE, SERCOM1_GCLK_ID_CORE, SERCOM2_GCLK_ID_CORE, SERCOM3_GCLK_ID_CORE, SERCOM4_GCLK_ID_CORE, SERCOM5_GCLK_ID_CORE, SERCOM6_GCLK_ID_CORE, SERCOM7_GCLK_ID_CORE}; static void ccid_app_init(void); @@ -103,16 +66,6 @@ * (there are 8 inputs + traces to drive!) */ hri_port_set_PINCFG_DRVSTR_bit(PORT, 0, 11); - // enable SIM interfaces - for (uint8_t i = 0; i < ARRAY_SIZE(SIM_peripheral_descriptors); i++) { - if (NULL == SIM_peripheral_descriptors[i]) { - continue; - } - usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_RXC_CB, SIM_rx_cb); // required for RX to work, even if the callback does nothing - usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_TXC_CB, SIM_tx_cb); // to count the number of bytes transmitted since we are using it asynchronously - usart_async_enable(SIM_peripheral_descriptors[i]); - } - ccid_app_init(); } @@ -201,7 +154,9 @@ struct msgb *msg; int rc; - OSMO_ASSERT(!ep_q->in_progress); + if (ep_q->in_progress) + return 0; + msg = msgb_dequeue_irqsafe(&ep_q->list); if (!msg) return 0; @@ -250,6 +205,7 @@ msg = msgb_dequeue_irqsafe(&g_ccid_s.free_q); if (!msg) return -1; + msgb_reset(msg); ep_q->in_progress = msg; rc = ccid_df_read_out(msgb_data(msg), msgb_tailroom(msg)); @@ -272,6 +228,7 @@ msgb_put(msg, transferred); /* append to list of pending-to-be-handed messages */ llist_add_tail_at(&msg->list, &g_ccid_s.out_ep.list); + g_ccid_s.out_ep.in_progress = NULL; /* submit another [free] msgb to receive the next transfer */ submit_next_out(); @@ -343,8 +300,11 @@ struct msgb *msg; unsigned int i; - for (i = 0; i < 8; i++) - new_mask |= ncn8025_interrupt_level(i) << i; + for (i = 0; i < 8; i++){ + bool level = ncn8025_interrupt_level(i); + new_mask |= level << i; + g_ci.slot[i].icc_present = level; + } /* notify the user/host about any changes */ if (g_ccid_s.card_insert_mask != new_mask) { @@ -363,629 +323,6 @@ * Command Line interface ***********************************************************************/ -static int validate_slotnr(int argc, char **argv, int idx) -{ - int slotnr; - if (argc < idx+1) { - printf("You have to specify the slot number (0..7)\r\n"); - return -1; - } - slotnr = atoi(argv[idx]); - if (slotnr < 0 || slotnr > 7) { - printf("You have to specify the slot number (0..7)\r\n"); - return -1; - } - return slotnr; -} - -/** change baud rate of card slot - * @param[in] slotnr slot number for which the baud rate should be set - * @param[in] baudrate baud rate in bps to set - * @return if the baud rate has been set, else a parameter is out of range - */ -static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) -{ - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - - // calculate the error corresponding to the clock sources - uint16_t bauds[ARRAY_SIZE(sercom_glck_freqs)]; - double errors[ARRAY_SIZE(sercom_glck_freqs)]; - for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { - double freq = sercom_glck_freqs[i]; // remember possible SERCOM frequency - uint32_t min = freq / (2 * (255 + 1)); // calculate the minimum baud rate for this frequency - uint32_t max = freq / (2 * (0 + 1)); // calculate the maximum baud rate for this frequency - if (baudrate < min || baudrate > max) { // baud rate it out of supported range - errors[i] = NAN; - } else { - uint16_t baud = round(freq / (2 * baudrate) - 1); - bauds[i] = baud; - double actual = freq / (2 * (baud + 1)); - errors[i] = fabs(1.0 - (actual / baudrate)); - } - } - - // find the smallest error - uint8_t best = ARRAY_SIZE(sercom_glck_freqs); - for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { - if (isnan(errors[i])) { - continue; - } - if (best >= ARRAY_SIZE(sercom_glck_freqs)) { - best = i; - } else if (errors[i] < errors[best]) { - best = i; - } - } - if (best >= ARRAY_SIZE(sercom_glck_freqs)) { // found no clock supporting this baud rate - return false; - } - - // set clock and baud rate - struct usart_async_descriptor* slot = SIM_peripheral_descriptors[slotnr]; // get slot - if (NULL == slot) { - return false; - } - printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); - while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) - usart_async_disable(slot); // disable SERCOM peripheral - hri_gclk_clear_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos)); // disable clock for this peripheral - while (hri_gclk_get_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos))); // wait until clock is really disabled - // it does not seem we need to completely disable the peripheral using hri_mclk_clear_APBDMASK_SERCOMn_bit - hri_gclk_write_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], sercom_glck_sources[best] | (1 << GCLK_PCHCTRL_CHEN_Pos)); // set peripheral core clock and re-enable it - usart_async_set_baud_rate(slot, bauds[best]); // set the new baud rate - usart_async_enable(slot); // re-enable SERCOM peripheral - - return true; -} - -/** change ISO baud rate of card slot - * @param[in] slotnr slot number for which the baud rate should be set - * @param[in] clkdiv can clock divider - * @param[in] f clock rate conversion integer F - * @param[in] d baud rate adjustment factor D - * @return if the baud rate has been set, else a parameter is out of range - */ -static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { - return false; - } - if (!iso7816_3_valid_f(f)) { - return false; - } - if (!iso7816_3_valid_d(d)) { - return false; - } - - // set clockdiv - struct ncn8025_settings settings; - ncn8025_get(slotnr, &settings); - if (settings.clkdiv != clkdiv) { - settings.clkdiv = clkdiv; - ncn8025_set(slotnr, &settings); - } - - // calculate desired frequency - uint32_t freq = 20000000UL; // maximum frequency - switch (clkdiv) { - case SIM_CLKDIV_1: - freq /= 1; - break; - case SIM_CLKDIV_2: - freq /= 2; - break; - case SIM_CLKDIV_4: - freq /= 4; - break; - case SIM_CLKDIV_8: - freq /= 8; - break; - } - - // set baud rate - uint32_t baudrate = (freq * d) / f; // calculate actual baud rate - return slot_set_baudrate(slotnr, baudrate); // set baud rate -} - -/** write data to card - * @param[in] slotnr slot number on which to send data - * @param[in] data data to be transmitted - * @param[in] length length of data to be transmitted - * @return error code - */ -static int slot_card_write(uint8_t slotnr, const uint8_t* data, uint16_t length) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (0 == length || NULL == data) { - return ERR_INVALID_ARG; - } - - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; // disable receive (to avoid the echo back) - SIM_tx_count[slotnr] = false; // reset TX complete - for (uint16_t i = 0; i < length; i++) { // transmit data - while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING blocking) - if (1 != io_write(&sim->io, &data[i], 1)) { // put but in transmit buffer - return ERR_IO; - } - } - while (!SIM_tx_count[slotnr]); // wait until transmission is complete (WARNING blocking) - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // enable receive again - - return ERR_NONE; -} - -/** read data from card - * @param[in] slotnr slot number on which to send data - * @param[out] data buffer for read data to be stored - * @param[in] length length of data to be read - * @param[in] wt Waiting Time in ETU - * @return error code - * TODO fix WT/ETU duration - */ -static int slot_card_read(uint8_t slotnr, uint8_t* data, uint16_t length, uint32_t wt) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (0 == length || NULL == data) { - return ERR_INVALID_ARG; - } - - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; - - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // ensure RX is enabled - uint32_t timeout = wt; // reset waiting time - for (uint16_t i = 0; i < length; i++) { // read all data - while (timeout && !usart_async_is_rx_not_empty(sim)) { // verify if data is present - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - timeout--; - } - if (0 == timeout) { // timeout reached - return ERR_TIMEOUT; - } - timeout = wt; // reset waiting time - if (1 != io_read(&sim->io, &data[i], 1)) { // read one byte - return ERR_IO; - } - } - - return ERR_NONE; -} - -/** transfer TPDU - * @param[in] slotnr slot number on which to transfer the TPDU - * @param[in] header TPDU header to send - * @param[io] data TPDU data to transfer - * @param[in] data_length length of TPDU data to transfer - * @param[in] write if the data should be written (true) or read (false) - * TODO fix WT - * TODO the data length can be deduce from the header - */ -static int slot_tpdu_xfer(uint8_t slotnr, const uint8_t* header, uint8_t* data, uint16_t data_length, bool write) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (NULL == header || (data_length > 0 && NULL == data)) { - return ERR_INVALID_ARG; - } - - int rc; - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; // get USART peripheral - usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch - - // send command header - printf("(%d) TPDU: ", slotnr); - for (uint8_t i = 0; i < 5; i++) { - printf("%02x ", header[i]); - } - rc = slot_card_write(slotnr, header, 5); // transmit header - if (ERR_NONE != rc) { - printf("error in command header transmit (errno = %d)\r\n", rc); - return rc; - } - - // read procedure byte, and handle data - uint8_t pb = 0x60; // wait more procedure byte - uint16_t data_i = 0; // progress in the data transfer - while (0x60 == pb) { // wait for SW - rc = slot_card_read(slotnr, &pb, 1, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error while receiving PB/SW1 (errno = %d)\r\n", rc); - return rc; - } - printf("%02x ", pb); - if (0x60 == pb) { // NULL byte - // just wait more time - } else if ((0x60 == (pb & 0xf0)) || (0x90 == (pb & 0xf0))) { // SW1 byte - // left the rest of the code handle it - } else if (header[1] == pb) { // ACK byte - // transfer rest of the data - if (data_i >= data_length) { - printf("error no more data to transfer\r\n"); - return ERR_INVALID_DATA; - } - if (write) { // transmit remaining command data - rc = slot_card_write(slotnr, &data[data_i], data_length - data_i); // transmit command data - if (ERR_NONE != rc) { - printf("error in command data transmit (errno = %d)\r\n", rc); - return rc; - } - } else { // receive remaining command data - rc = slot_card_read(slotnr, &data[data_i], data_length - data_i, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error in command data receive (errno = %d)\r\n", rc); - return rc; - } - } - for (uint16_t i = data_i; i < data_length; i++) { - printf("%02x ", data[i]); - } - data_i = data_length; // remember we transferred the data - pb = 0x60; // wait for SW1 - } else if (header[1] == (pb ^ 0xff)) { // ACK byte - // transfer only one byte - if (data_i >= data_length) { - printf("error no more data to transfer\r\n"); - return ERR_INVALID_DATA; - } - if (write) { // transmit command data byte - rc = slot_card_write(slotnr, &data[data_i], 1); // transmit command data - if (ERR_NONE != rc) { - printf("error in command data transmit (errno = %d)\r\n", rc); - return rc; - } - } else { // receive command data byte - rc = slot_card_read(slotnr, &data[data_i], 1, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error in command data receive (errno = %d)\r\n", rc); - return rc; - } - } - printf("%02x ", data[data_i]); - data_i += 1; // remember we transferred one data byte - pb = 0x60; // wait for SW1 - } else { // invalid byte - return ERR_INVALID_DATA; - } - } - - // read SW2 - uint8_t sw2; - rc = slot_card_read(slotnr, &sw2, 1, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error in receiving SW2 (errno = %d)\r\n", rc); - return rc; - } - printf("%02x", sw2); - - printf("\r\n"); - return ERR_NONE; -} - -DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - if (slotnr < 0) - return; - ncn8025_get(slotnr, &settings); - printf("SIM%d: ", slotnr); - ncn8025_dump(&settings); - printf("\r\n"); -} - -DEFUN(sim_power, cmd_sim_power, "sim-power", "Enable/disable SIM card power") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - int enable; - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify 0=disable or 1=enable\r\n"); - return; - } - enable = atoi(argv[2]); - ncn8025_get(slotnr, &settings); - if (enable) - settings.cmdvcc = true; - else - settings.cmdvcc = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_reset, cmd_sim_reset, "sim-reset", "Enable/disable SIM reset") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - int enable; - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify 0=disable or 1=enable\r\n"); - return; - } - enable = atoi(argv[2]); - ncn8025_get(slotnr, &settings); - if (enable) - settings.rstin = true; - else - settings.rstin = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_clkdiv, cmd_sim_clkdiv, "sim-clkdiv", "Set SIM clock divider (1,2,4,8)") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - int clkdiv; - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify a valid divider (1,2,4,8)\r\n"); - return; - } - clkdiv = atoi(argv[2]); - if (clkdiv != 1 && clkdiv != 2 && clkdiv != 4 && clkdiv != 8) { - printf("You have to specify a valid divider (1,2,4,8)\r\n"); - return; - } - ncn8025_get(slotnr, &settings); - switch (clkdiv) { - case 1: - settings.clkdiv = SIM_CLKDIV_1; - break; - case 2: - settings.clkdiv = SIM_CLKDIV_2; - break; - case 4: - settings.clkdiv = SIM_CLKDIV_4; - break; - case 8: - settings.clkdiv = SIM_CLKDIV_8; - break; - } - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_voltage, cmd_sim_voltage, "sim-voltage", "Set SIM voltage (5/3/1.8)") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify a valid voltage (5/3/1.8)\r\n"); - return; - } - ncn8025_get(slotnr, &settings); - if (!strcmp(argv[2], "5")) - settings.vsel = SIM_VOLT_5V0; - else if (!strcmp(argv[2], "3")) - settings.vsel = SIM_VOLT_3V0; - else if (!strcmp(argv[2], "1.8")) - settings.vsel = SIM_VOLT_1V8; - else { - printf("You have to specify a valid voltage (5/3/1.8)\r\n"); - return; - } - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_led, cmd_sim_led, "sim-led", "Set SIM LED (1=on, 0=off)") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify 0=disable or 1=enable\r\n"); - return; - } - ncn8025_get(slotnr, &settings); - if (atoi(argv[2])) - settings.led = true; - else - settings.led = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_atr, cmd_sim_atr, "sim-atr", "Read ATR from SIM card") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { - return; - } - - // check if card is present (and read current settings) - ncn8025_get(slotnr, &settings); - if (!settings.simpres) { - printf("(%d) error: no card present\r\n", slotnr); - return; - } - - // switch card off (assert reset and disable power) - // note: ISO/IEC 7816-3:2006 section 6.4 provides the deactivation sequence, but not the minimum corresponding times - settings.rstin = true; - settings.cmdvcc = false; - settings.led = true; - ncn8025_set(slotnr, &settings); - - // TODO wait some time for card to be completely deactivated - usart_async_flush_rx_buffer(SIM_peripheral_descriptors[slotnr]); // flush RX buffer to start from scratch - - - // set clock to lowest frequency (20 MHz / 8 = 2.5 MHz) - // note: according to ISO/IEC 7816-3:2006 section 5.2.3 the minimum value is 1 MHz, and maximum is 5 MHz during activation - settings.clkdiv = SIM_CLKDIV_8; - // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) - slot_set_isorate(slotnr, settings.clkdiv, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); - // set card voltage to 3.0 V (the most supported) - // note: according to ISO/IEC 7816-3:2006 no voltage should damage the card, and you should cycle from low to high - settings.vsel = SIM_VOLT_3V0; - // provide power (the NCN8025 should perform the activation according to spec) - // note: activation sequence is documented in ISO/IEC 7816-3:2006 section 6.2 - settings.cmdvcc = true; - ncn8025_set(slotnr, &settings); - - // wait for Tb=400 cycles before re-asserting reset - delay_us(400 * 10000 / 2500); // 400 cycles * 1000 for us, 2.5 MHz / 1000 for us - - // de-assert reset to switch card back on - settings.rstin = false; - ncn8025_set(slotnr, &settings); - - // wait for Tc=40000 cycles for transmission to start - uint32_t cycles = 40000; - while (cycles && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - delay_us(10); - cycles -= 25; // 10 us = 25 cycles at 2.5 MHz - } - if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - delay_us(12 * 372 / 1 / 2); // wait more than one byte (approximate freq down to 2 MHz) - } - // verify if one byte has been received - if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - printf("(%d) error: card not responsive\r\n", slotnr); - return; - } - - // read ATR (just do it until there is no traffic anymore) - // TODO the ATR should be parsed to read the right number of bytes, instead we just wait until to end of WT - printf("(%d) ATR: ", slotnr); - uint8_t atr_byte; - while (usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - if (1 == io_read(&SIM_peripheral_descriptors[slotnr]->io, &atr_byte, 1)) { - printf("%02x ", atr_byte); - } - uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU - while (wt && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - } - printf("\r\n"); - - /* disable LED */ - settings.led = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_iccid, cmd_sim_iccid, "sim-iccid", "Read ICCID from SIM card") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { - return; - } - - // read current settings and check if card is present and powered - ncn8025_get(slotnr, &settings); - if (!settings.simpres) { - printf("(%d) error: no card present\r\n", slotnr); - return; - } - if (!settings.cmdvcc) { - printf("(%d) error: card not powered\r\n", slotnr); - return; - } - if (settings.rstin) { - printf("(%d) error: card under reset\r\n", slotnr); - return; - } - - // enable LED - if (!settings.led) { - settings.led = true; - ncn8025_set(slotnr, &settings); - } - - // select MF - printf("(%d) SELECT MF\r\n", slotnr); - const uint8_t select_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; // see TS 102.221 sec. 11.1.1 - const uint8_t select_data_mf[] = {0x3f, 0x00}; // see TS 102.221 sec. 13.1 - int rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_mf, ARRAY_SIZE(select_data_mf), true); // transfer TPDU - if (ERR_NONE != rc) { - printf("error while SELECT MF (errno = %d)\r\n", rc); - } - // ignore response data - - // select EF_ICCID - printf("(%d) SELECT EF_ICCID\r\n", slotnr); - const uint8_t select_data_ef_iccid[] = {0x2f, 0xe2}; // see TS 102.221 sec. 13.2 - rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_ef_iccid, ARRAY_SIZE(select_data_ef_iccid), true); // transfer TPDU - if (ERR_NONE != rc) { - printf("error while SELECT EF_ICCID (errno = %d)\r\n", rc); - } - // ignore response data - - // read EF_ICCID - printf("(%d) READ EF_ICCID\r\n", slotnr); - uint8_t iccid[10]; - uint8_t read_binary[] = {0xa0, 0xb0, 0x00, 0x00, ARRAY_SIZE(iccid)}; // see TS 102.221 sec. 11.1.3 - rc = slot_tpdu_xfer(slotnr, read_binary, iccid, ARRAY_SIZE(iccid), false); // transfer TPDU - if (ERR_NONE != rc) { - printf("error while READ ICCID (errno = %d)\r\n", rc); - } - // ignore response data - - printf("(%d) ICCID: ", slotnr); - for (uint8_t i = 0; i < ARRAY_SIZE(iccid); i++) { - uint8_t nibble = iccid[i] & 0xf; - if (0xf == nibble) { - break; - } - printf("%x", nibble); - nibble = iccid[i] >> 4; - if (0xf == nibble) { - break; - } - printf("%x", nibble); - } - printf("\r\n"); - - // disable LED - settings.led = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(get_time, cmd_get_time, "get-time", "Read Time from RTC") -{ - struct calendar_date_time dt; - calendar_get_date_time(&CALENDAR_0, &dt); - printf("%04u-%02u-%02u %02u:%02u:%02u\r\n", dt.date.year, dt.date.month, dt.date.day, - dt.time.hour, dt.time.min, dt.time.sec); -} - -#include -static struct osmo_timer_list t; -static void tmr_cb(void *data) -{ - printf("timer fired!\r\n"); -} -DEFUN(test_timer, cmd_test_timer, "test-timer", "Test osmo_timer") -{ - printf("Setting up timer for 3s...\n\r"); - osmo_timer_setup(&t, &tmr_cb, NULL); - osmo_timer_schedule(&t, 3, 0); -} - extern void testmode_init(void); extern void libosmo_emb_init(void); @@ -993,25 +330,9 @@ #include "talloc.h" #include "logging.h" -#include + void *g_tall_ctx; -DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc report") -{ - talloc_report_full(g_tall_ctx, stdout); -} - -DEFUN(talloc_test, cmd_talloc_test, "talloc-test", "Test the talloc allocator") -{ - for (int i = 0; i < 10; i++) - talloc_named_const(g_tall_ctx, 10, "sibling"); -} - -DEFUN(v_talloc_free, cmd_talloc_free, "talloc-free", "Release all memory") -{ - talloc_free(g_tall_ctx); - g_tall_ctx = NULL; -} /* Section 9.6 of SAMD5x/E5x Family Data Sheet */ static int get_chip_unique_serial(uint8_t *out, size_t len) @@ -1067,6 +388,55 @@ strcat(out, "BACKUP "); } +//####################### + + + +static uint32_t clock_freqs[] = { + 2500000 +}; + +static uint32_t data_rates[] = { + 6720 +}; +extern struct usb_desc_collection usb_fs_descs; + + + +static int feed_ccid(void) +{ + struct usb_ep_q *ep_q = &g_ccid_s.out_ep; + struct msgb *msg; + int rc; + + msg = msgb_dequeue_irqsafe(&g_ccid_s.out_ep.list); + if (!msg) + return -1; + + ccid_handle_out(&g_ci, msg); + return 1; +} + +static int ccid_ops_send_in(struct ccid_instance *ci, struct msgb *msg) +{ + /* add just-received msg to tail of endpoint queue */ + OSMO_ASSERT(msg); + + /* append to list of pending-to-be-handed messages */ + llist_add_tail_at(&msg->list, &g_ccid_s.in_ep.list); + submit_next_in(); + return 0; +} + +static const struct ccid_ops c_ops = { + .send_in = ccid_ops_send_in, + .send_int = 0, +}; + +//####################### + +#define NUM_OUT_BUF 7 + int main(void) { char sernr_buf[16*2+1]; @@ -1080,20 +450,6 @@ board_init(); command_init("sysmoOCTSIM> "); - command_register(&cmd_sim_status); - command_register(&cmd_sim_power); - command_register(&cmd_sim_reset); - command_register(&cmd_sim_clkdiv); - command_register(&cmd_sim_voltage); - command_register(&cmd_sim_led); - command_register(&cmd_sim_atr); - command_register(&cmd_sim_iccid); - testmode_init(); - command_register(&cmd_talloc_test); - command_register(&cmd_talloc_report); - command_register(&cmd_talloc_free); - command_register(&cmd_get_time); - command_register(&cmd_test_timer); printf("\r\n\r\n" "=============================================================================\n\r" @@ -1111,11 +467,39 @@ LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); - command_print_prompt(); + ccid_instance_init(&g_ci, &c_ops, &iso_fsm_slot_ops, &usb_fs_descs.ccid.class, + data_rates, clock_freqs, "", 0); + + for(int i =0; i < NUM_OUT_BUF; i++){ + struct msgb *msg = msgb_alloc(300, "ccid"); + OSMO_ASSERT(msg); + /* return the message back to the queue of free message buffers */ + llist_add_tail_at(&msg->list, &g_ccid_s.free_q); + } + submit_next_out(); + +// command_print_prompt(); while (true) { // main loop command_try_recv(); poll_card_detect(); submit_next_irq(); + feed_ccid(); osmo_timers_update(); + int qs = llist_count_at(&g_ccid_s.free_q); + if(qs > NUM_OUT_BUF) + for (int i= 0; i < qs-NUM_OUT_BUF; i++){ + struct msgb *msg = msgb_dequeue_irqsafe(&g_ccid_s.free_q); + if (msg) + msgb_free(msg); + } + if(qs < NUM_OUT_BUF) + for (int i= 0; i < qs-NUM_OUT_BUF; i++){ + struct msgb *msg = msgb_alloc(300,"ccid"); + OSMO_ASSERT(msg); + /* return the message back to the queue of free message buffers */ + llist_add_tail_at(&msg->list, &g_ccid_s.free_q); + } + + } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic690055bc332ccca3de7c5f4429399cf9ff1d4da Gerrit-Change-Number: 16267 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:08 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:08 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the uart ring buffer size References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 ) Change subject: increase the uart ring buffer size ...................................................................... increase the uart ring buffer size must be be a power of 2, and should be at least as large as the largest transfer that we might be waiting for - revisit this, is 256 enough? Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c --- M sysmoOCTSIM/driver_init.c 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/68/16268/1 diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index 620ed6c..c373dc2 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -12,25 +12,25 @@ #include /*! The buffer size for USART */ -#define SIM0_BUFFER_SIZE 16 +#define SIM0_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM1_BUFFER_SIZE 16 +#define SIM1_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM2_BUFFER_SIZE 16 +#define SIM2_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM3_BUFFER_SIZE 16 +#define SIM3_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM4_BUFFER_SIZE 16 +#define SIM4_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM5_BUFFER_SIZE 16 +#define SIM5_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM6_BUFFER_SIZE 16 +#define SIM6_BUFFER_SIZE 512 /*! The buffer size for USART */ #define UART_DEBUG_BUFFER_SIZE 256 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c Gerrit-Change-Number: 16268 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:08 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:08 +0000 Subject: Change in osmo-ccid-firmware[master]: talloc asserts References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 ) Change subject: talloc asserts ...................................................................... talloc asserts Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99 --- M sysmoOCTSIM/talloc.c 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/69/16269/1 diff --git a/sysmoOCTSIM/talloc.c b/sysmoOCTSIM/talloc.c index c5c9062..918cf42 100644 --- a/sysmoOCTSIM/talloc.c +++ b/sysmoOCTSIM/talloc.c @@ -30,6 +30,10 @@ inspired by http://swapped.cc/halloc/ */ +#include +#include +#include + #include "replace.h" #include "talloc.h" @@ -727,6 +731,9 @@ size_t total_len = TC_HDR_SIZE + size + prefix_len; struct talloc_chunk *parent = NULL; + // do not allocate while handling interrupts! + OSMO_ASSERT( !(SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) ) + if (unlikely(context == NULL)) { context = null_context; } @@ -1740,6 +1747,9 @@ { struct talloc_chunk *tc; + // do not deallocate while handling interrupts! + OSMO_ASSERT( !(SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) ) + if (unlikely(ptr == NULL)) { return -1; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99 Gerrit-Change-Number: 16269 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:08 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:08 +0000 Subject: Change in osmo-ccid-firmware[master]: no logging, no memory pool References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 ) Change subject: no logging, no memory pool ...................................................................... no logging, no memory pool Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c 3 files changed, 15 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/70/16270/1 diff --git a/sysmoOCTSIM/atmel_start.c b/sysmoOCTSIM/atmel_start.c index bee1ed2..6670364 100644 --- a/sysmoOCTSIM/atmel_start.c +++ b/sysmoOCTSIM/atmel_start.c @@ -14,6 +14,6 @@ system_init(); dma_memory_init(); dma_memory_register_callback(DMA_MEMORY_COMPLETE_CB, M2M_DMA_complete_cb); - stdio_redirect_init(); +// stdio_redirect_init(); usb_init(); } diff --git a/sysmoOCTSIM/libosmo_emb.c b/sysmoOCTSIM/libosmo_emb.c index 1914568..a12c490 100644 --- a/sysmoOCTSIM/libosmo_emb.c +++ b/sysmoOCTSIM/libosmo_emb.c @@ -41,43 +41,43 @@ [DUSB] = { .name = "USB", .description = "USB Transport", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_NOTICE, }, [DCCID] = { .name = "CCID", .description = "USB-CCID Protocol", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DISO7816] = { .name = "ISO7816", .description = "ISO7816-3 State machines", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DATR] = { .name = "ATR", .description = "ATR (Answer To Reset) FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DTPDU] = { .name = "TPDU", .description = "TPDU FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DPPS] = { .name = "PPS", .description = "PPS (Protocol and Parameter Selection) FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DCARD] = { .name = "CARD", .description = "Card FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, }; @@ -150,16 +150,18 @@ struct log_target *stderr_target; /* msgb */ +#if 0 g_msgb_ctx = talloc_pool(g_tall_ctx, 20480); talloc_set_memlimit(g_msgb_ctx, 20480); msgb_talloc_ctx_init(g_msgb_ctx, 0); - +#endif /* logging */ log_init(&log_info, g_tall_ctx); +#if 0 stderr_target = log_target_create_stderr_raw(); log_add_target(stderr_target); log_set_all_filter(stderr_target, 1); - +#endif /* timer */ SysTick_Config(SystemCoreClock / 1000); } diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 059c99d..0f2409a 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -463,6 +463,9 @@ g_tall_ctx = talloc_named_const(NULL, 0, "global"); printf("g_tall_ctx=%p\r\n", g_tall_ctx); + //FIXME osmo_emb has a pool? + msgb_talloc_ctx_init(g_tall_ctx, 0); + libosmo_emb_init(); LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca Gerrit-Change-Number: 16270 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:09 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:09 +0000 Subject: Change in osmo-ccid-firmware[master]: prevent uart interrupts before having proper structs References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 ) Change subject: prevent uart interrupts before having proper structs ...................................................................... prevent uart interrupts before having proper structs Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e --- M sysmoOCTSIM/main.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/71/16271/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 0f2409a..7ddca92 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -470,6 +470,8 @@ LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); + //prevent spurious interrupts before our driver structs are ready + CRITICAL_SECTION_ENTER() ccid_instance_init(&g_ci, &c_ops, &iso_fsm_slot_ops, &usb_fs_descs.ccid.class, data_rates, clock_freqs, "", 0); @@ -480,6 +482,7 @@ llist_add_tail_at(&msg->list, &g_ccid_s.free_q); } submit_next_out(); + CRITICAL_SECTION_LEAVE() // command_print_prompt(); while (true) { // main loop -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e Gerrit-Change-Number: 16271 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:09 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:09 +0000 Subject: Change in osmo-ccid-firmware[master]: move iso7816_3 to common dir References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 ) Change subject: move iso7816_3 to common dir ...................................................................... move iso7816_3 to common dir Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92 --- R ccid_common/iso7816_3.c R ccid_common/iso7816_3.h M sysmoOCTSIM/gcc/Makefile 3 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/72/16272/1 diff --git a/sysmoOCTSIM/iso7816_3.c b/ccid_common/iso7816_3.c similarity index 100% rename from sysmoOCTSIM/iso7816_3.c rename to ccid_common/iso7816_3.c diff --git a/sysmoOCTSIM/iso7816_3.h b/ccid_common/iso7816_3.h similarity index 100% rename from sysmoOCTSIM/iso7816_3.h rename to ccid_common/iso7816_3.h diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 4840fea..95a582f 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -84,6 +84,7 @@ ccid_common/ccid_proto.o \ ccid_common/ccid_device.o \ ccid_common/iso7816_fsm.o \ + ccid_common/iso7816_3.o \ ccid_common/cuart.o \ ccid_common/ccid_slot_fsm.o \ cuart_driver_asf4_usart_async.o \ @@ -123,7 +124,6 @@ hpl/sercom/hpl_sercom.o \ hpl/usb/hpl_usb.o \ i2c_bitbang.o \ - iso7816_3.o \ libosmo_emb.o \ main.o \ manual_test.o \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92 Gerrit-Change-Number: 16272 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:09 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:09 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart icc clock freq and divider setting support References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 ) Change subject: cuart icc clock freq and divider setting support ...................................................................... cuart icc clock freq and divider setting support Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e --- M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/ncn8025.c M sysmoOCTSIM/ncn8025.h 4 files changed, 43 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/73/16273/1 diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 5e397ab..6c53481 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -25,8 +25,10 @@ CUART_CTL_RX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ + CUART_CTL_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ CUART_CTL_RST, /* enable/disable ICC reset */ CUART_CTL_WTIME, /* set the waiting time (in etu) */ + CUART_CTL_FD, }; struct card_uart; @@ -95,6 +97,8 @@ struct { struct usart_async_descriptor *usa_pd; uint8_t slot_nr; + /* in us, required, no delay breaks _rx_ */ + uint32_t extrawait_after_rx; } asf4; } u; }; diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index f9856f3..a8f8044 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -289,6 +289,8 @@ cuart->u.asf4.usa_pd = usa_pd; cuart->u.asf4.slot_nr = slot_nr; + /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ + cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); usart_async_register_callback(usa_pd, USART_ASYNC_RXC_CB, SIM_rx_cb[slot_nr]); usart_async_register_callback(usa_pd, USART_ASYNC_TXC_CB, SIM_tx_cb[slot_nr]); @@ -338,6 +340,8 @@ return io_read(&usa_pd->io, data, len); } +#include "ccid_device.h" +#include "iso7816_3.h" static int asf4_usart_ctrl(struct card_uart *cuart, enum card_uart_ctl ctl, int arg) { struct ncn8025_settings settings; @@ -349,7 +353,7 @@ sercom->USART.CTRLB.bit.RXEN = 1; sercom->USART.CTRLB.bit.TXEN = 0; } else { - delay_us(100); + delay_us(cuart->u.asf4.extrawait_after_rx); sercom->USART.CTRLB.bit.RXEN = 0; sercom->USART.CTRLB.bit.TXEN = 1; } @@ -361,22 +365,47 @@ usart_async_flush_rx_buffer(cuart->u.asf4.usa_pd); break; case CUART_CTL_POWER: - ncn8025_get(cuart->u.asf4.slot_nr, &settings); - settings.cmdvcc = arg ? true : false; - settings.led = arg ? true : false; - settings.vsel = SIM_VOLT_5V0; + /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ + cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) if(arg) slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + settings.cmdvcc = arg ? true : false; + settings.led = arg ? true : false; + settings.vsel = SIM_VOLT_5V0; ncn8025_set(cuart->u.asf4.slot_nr, &settings); + break; case CUART_CTL_WTIME: /* no driver-specific handling of this */ break; case CUART_CTL_CLOCK: - /* FIXME */ + /* no clock stop support */ + break; + case CUART_CTL_CLOCK_FREQ: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + + /* 2,5/5/10/20 supported by dividers */ + enum ncn8025_sim_clkdiv clkdiv = SIM_CLKDIV_1; + if(arg < 20000000) + clkdiv = SIM_CLKDIV_2; + if(arg < 10000000) + clkdiv = SIM_CLKDIV_4; + if(arg < 5000000) + clkdiv = SIM_CLKDIV_8; + settings.clkdiv = clkdiv; + ncn8025_set(cuart->u.asf4.slot_nr, &settings); + break; + case CUART_CTL_FD: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + uint8_t divider = ncn8025_div_val[settings.clkdiv]; + uint32_t baudrate = (20e6/divider)/arg; + cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; + slot_set_baudrate(cuart->u.asf4.slot_nr, baudrate); + break; default: return -EINVAL; } diff --git a/sysmoOCTSIM/ncn8025.c b/sysmoOCTSIM/ncn8025.c index 540b166..74d3b39 100644 --- a/sysmoOCTSIM/ncn8025.c +++ b/sysmoOCTSIM/ncn8025.c @@ -159,7 +159,7 @@ [SIM_VOLT_1V8] = "1.8", }; -static const unsigned int div_val[] = { +const unsigned int ncn8025_div_val[] = { [SIM_CLKDIV_1] = 1, [SIM_CLKDIV_2] = 2, [SIM_CLKDIV_4] = 4, @@ -168,7 +168,7 @@ void ncn8025_dump(const struct ncn8025_settings *set) { - printf("VOLT=%s, CLKDIV=%u", volt_str[set->vsel], div_val[set->clkdiv]); + printf("VOLT=%s, CLKDIV=%u", volt_str[set->vsel], ncn8025_div_val[set->clkdiv]); if (set->rstin) printf(", RST"); if (set->cmdvcc) diff --git a/sysmoOCTSIM/ncn8025.h b/sysmoOCTSIM/ncn8025.h index 2e774a7..01ddc97 100644 --- a/sysmoOCTSIM/ncn8025.h +++ b/sysmoOCTSIM/ncn8025.h @@ -14,6 +14,8 @@ SIM_CLKDIV_8 = 0, }; +extern const unsigned int ncn8025_div_val[]; + struct ncn8025_settings { bool rstin; /* Reset signal (true: asserted low) */ bool cmdvcc; /* Command VCC pin. Activation sequence Enable (true: active low) */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e Gerrit-Change-Number: 16273 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:09 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:09 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid setparameters/PPS support References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 ) Change subject: ccid setparameters/PPS support ...................................................................... ccid setparameters/PPS support Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a --- M ccid_common/ccid_device.c M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M ccid_common/iso7816_fsm.h 5 files changed, 322 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/74/16274/1 diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index 8183b16..c67c52e 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -23,9 +23,11 @@ /* decode on-the-wire T0 parameters into their parsed form */ static int decode_ccid_pars_t0(struct ccid_pars_decoded *out, const struct ccid_proto_data_t0 *in) { - /* input validation: only 0x00 and 0x02 permitted for bmTCCKST0 */ - if (in->bmTCCKST0 & 0xFD) - return -11; + /* input validation: only 0x00 and 0x02 permitted for bmTCCKST0 + * if (in->bmTCCKST0 & 0xFD) + * return -11; + * 7816-3 6.1.7 says: "Note: the CCID ignores this bit", placeholder for GETparameters */ + /* input validation: only 0x00 to 0x03 permitted for bClockSTop */ if (in->bClockStop & 0xFC) return -14; @@ -254,7 +256,7 @@ } return msg; } -static struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, +struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err) { return ccid_gen_parameters_t0_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, &cs->pars); @@ -276,7 +278,7 @@ } return msg; } -static struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, +struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err) { return ccid_gen_parameters_t1_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, &cs->pars); @@ -465,7 +467,7 @@ /* copy default parameters from somewhere */ /* FIXME: T=1 */ - cs->ci->slot_ops->set_params(cs, CCID_PROTOCOL_NUM_T0, cs->default_pars); + cs->ci->slot_ops->set_params(cs, seq, CCID_PROTOCOL_NUM_T0, cs->default_pars); cs->pars = *cs->default_pars; resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); @@ -502,14 +504,16 @@ goto out; } + cs->proposed_pars = pars_dec; + /* validate parameters; abort if they are not supported */ - rc = cs->ci->slot_ops->set_params(cs, spar->bProtocolNum, &pars_dec); + rc = cs->ci->slot_ops->set_params(cs, seq, spar->bProtocolNum, &pars_dec); if (rc < 0) { resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); - } else { - cs->pars = pars_dec; - resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); + goto out; } + /* busy, tdpu like callback */ + return 1; out: return ccid_slot_send_unbusy(cs, resp); } diff --git a/ccid_common/ccid_device.h b/ccid_common/ccid_device.h index ae3ab5b..8390783 100644 --- a/ccid_common/ccid_device.h +++ b/ccid_common/ccid_device.h @@ -53,6 +53,8 @@ bool cmd_busy; /* decided CCID parameters */ struct ccid_pars_decoded pars; + /* proposed CCID parameters */ + struct ccid_pars_decoded proposed_pars; /* default parameters; applied on ResetParameters */ const struct ccid_pars_decoded *default_pars; }; @@ -80,7 +82,7 @@ const struct ccid_pc_to_rdr_xfr_block *xfb); void (*set_power)(struct ccid_slot *cs, bool enable); void (*set_clock)(struct ccid_slot *cs, enum ccid_clock_command cmd); - int (*set_params)(struct ccid_slot *cs, enum ccid_protocol_num proto, + int (*set_params)(struct ccid_slot *cs, uint8_t seq, enum ccid_protocol_num proto, const struct ccid_pars_decoded *pars_dec); int (*set_rate_and_clock)(struct ccid_slot *cs, uint32_t freq_hz, uint32_t rate_bps); }; @@ -118,6 +120,10 @@ const uint32_t *data_rates, const uint32_t *clock_freqs, const char *name, void *priv); int ccid_handle_out(struct ccid_instance *ci, struct msgb *msg); +struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err); +struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err); /* Invalid request received: Please return STALL */ #define CCID_CTRL_RET_INVALID -1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 870cf35..8bdcfd5 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -13,6 +13,7 @@ #include "ccid_device.h" #include "cuart.h" #include "iso7816_fsm.h" +#include "iso7816_3.h" struct iso_fsm_slot { /* CCID slot above us */ @@ -112,6 +113,33 @@ ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); break; + case ISO7816_E_PPS_DONE_IND: + tpdu = data; + /* pps was successful, so we know these values are fine */ + uint16_t F = iso7816_3_fi_table[cs->proposed_pars.fi]; + uint8_t D = iso7816_3_di_table[cs->proposed_pars.di]; + uint32_t fmax = iso7816_3_fmax_table[cs->proposed_pars.fi]; + + card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK_FREQ, fmax); + card_uart_ctrl(ss->cuart, CUART_CTL_FD, F/D); + card_uart_ctrl(ss->cuart, CUART_CTL_WTIME, cs->proposed_pars.t0.waiting_integer); + + cs->pars = cs->proposed_pars; + resp = ccid_gen_parameters_t0(cs, ss->seq, CCID_CMD_STATUS_OK, 0); + + ccid_slot_send_unbusy(cs, resp); + + /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ + msgb_free(tpdu); + break; + case ISO7816_E_PPS_FAILED_IND: + tpdu = data; + /* failed fi/di */ + resp = ccid_gen_parameters_t0(cs, ss->seq, CCID_CMD_STATUS_FAILED, 10); + ccid_slot_send_unbusy(cs, resp); + /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ + msgb_free(tpdu); + break; default: LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, cause=%d, data=%p) unhandled\n", __func__, event, cause, data); @@ -175,10 +203,36 @@ } } -static int iso_fsm_slot_set_params(struct ccid_slot *cs, enum ccid_protocol_num proto, +static int iso_fsm_slot_set_params(struct ccid_slot *cs, uint8_t seq, enum ccid_protocol_num proto, const struct ccid_pars_decoded *pars_dec) { - /* we always acknowledge all parameters */ + struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); + struct msgb *tpdu; + + /* see 6.1.7 for error offsets */ + if(proto != CCID_PROTOCOL_NUM_T0) + return -7; + + if(pars_dec->t0.guard_time_etu != 0) + return -12; + + if(pars_dec->clock_stop != CCID_CLOCK_STOP_NOTALLOWED) + return -14; + + ss->seq = seq; + + /* Hardware does not support SPU, so no PPS2, and PPS3 is reserved anyway */ + tpdu = msgb_alloc(6, "PPSRQ"); + OSMO_ASSERT(tpdu); + msgb_put_u8(tpdu, 0xff); + msgb_put_u8(tpdu, (1 << 4)); /* only PPS1, T=0 */ + msgb_put_u8(tpdu, (pars_dec->fi << 4 | pars_dec->di)); + msgb_put_u8(tpdu, 0xff ^ (1 << 4) ^ (pars_dec->fi << 4 | pars_dec->di)); + + + LOGPCS(cs, LOGL_DEBUG, "scheduling PPS transfer: %s\n", msgb_hexdump(tpdu)); + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_PPS_CMD, tpdu); + /* continues in iso_fsm_clot_user_cb once response/error/timeout is received */ return 0; } diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index beda7ab..d02a955 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -69,6 +69,7 @@ * @note defined in ISO/IEC 7816-3:2006(E) section 9 */ enum pps_state { + PPS_S_TX_PPS_REQ, /*!< tx pps request */ PPS_S_WAIT_PPSS, /*!< initial byte */ PPS_S_WAIT_PPS0, /*!< format byte */ PPS_S_WAIT_PPS1, /*!< first parameter byte */ @@ -221,7 +222,7 @@ /* go back to initial state in child FSMs */ osmo_fsm_inst_state_chg(ip->atr_fi, ATR_S_WAIT_TS, 0, 0); - //osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_WAIT_PPSS, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); osmo_fsm_inst_state_chg(ip->tpdu_fi, TPDU_S_INIT, 0, 0); } @@ -311,6 +312,11 @@ /* pass on to sub-fsm */ osmo_fsm_inst_dispatch(ip->tpdu_fi, event, data); break; + case ISO7816_E_XCEIVE_PPS_CMD: + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); + osmo_fsm_inst_dispatch(ip->pps_fi, event, data); + break; default: OSMO_ASSERT(0); } @@ -369,6 +375,62 @@ } } +static void iso7816_3_in_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct iso7816_3_priv *tfp = get_iso7816_3_priv(fi); + + switch (event) { + case ISO7816_E_XCEIVE_PPS_CMD: + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); + break; + default: + OSMO_ASSERT(0); + } +} + + +static void iso7816_3_s_wait_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + switch (event) { + case ISO7816_E_TX_COMPL: + /* Rx of single byte is already enabled by previous card_uart_tx() call */ + osmo_fsm_inst_state_chg(fi, ISO7816_S_IN_PPS_RSP, 0, 0); + break; + default: + OSMO_ASSERT(0); + } +} + +static void iso7816_3_s_ins_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); + struct msgb *ppsrsp; + OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + + switch (event) { + case ISO7816_E_RX_SINGLE: + case ISO7816_E_WTIME_EXP: + /* simply pass this through to the child FSM for the ATR */ + osmo_fsm_inst_dispatch(ip->pps_fi, event, data); + break; + case ISO7816_E_PPS_DONE_IND: + case ISO7816_E_PPS_FAILED_IND: + ppsrsp = data; + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_TPDU, 0, 0); + /* notify user about PPS result */ + ip->user_cb(fi, event, 0, ppsrsp); + break; + case ISO7816_E_RX_ERR_IND: + ppsrsp = data; + osmo_fsm_inst_state_chg(fi, ISO7816_S_RESET, 0, 0); + ip->user_cb(fi, event, 0, ppsrsp); + break; + default: + OSMO_ASSERT(0); + } +} + static const struct osmo_fsm_state iso7816_3_states[] = { [ISO7816_S_RESET] = { .name = "RESET", @@ -400,11 +462,13 @@ }, [ISO7816_S_WAIT_TPDU] = { .name = "WAIT_TPDU", - .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD), + .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD) | + S(ISO7816_E_XCEIVE_PPS_CMD), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_TPDU) | - S(ISO7816_S_IN_PPS_REQ), + S(ISO7816_S_IN_PPS_REQ) | + S(ISO7816_S_WAIT_PPS_RSP), .action = iso7816_3_wait_tpdu_action, .onenter = iso7816_3_wait_tpdu_onenter, }, @@ -424,26 +488,36 @@ }, [ISO7816_S_IN_PPS_REQ] = { .name = "IN_PPS_REQ", - .in_event_mask = 0, /* FIXME */ + .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_PPS_REQ) | S(ISO7816_S_WAIT_PPS_RSP), + .action = iso7816_3_in_pps_req_action, }, [ISO7816_S_WAIT_PPS_RSP] = { .name = "WAIT_PPS_RESP", - .in_event_mask = 0, /* FIXME */ + .in_event_mask = S(ISO7816_E_TX_COMPL) | + S(ISO7816_E_TX_ERR_IND) | + S(ISO7816_E_WTIME_EXP), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_WAIT_PPS_RSP) | S(ISO7816_S_IN_PPS_RSP), + .action = iso7816_3_s_wait_pps_rsp_action, }, [ISO7816_S_IN_PPS_RSP] = { .name = "IN_PPS_RESP", - .in_event_mask = 0, /* FIXME */ + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_RX_COMPL) | + S(ISO7816_E_RX_ERR_IND) | + S(ISO7816_E_PPS_DONE_IND) | + S(ISO7816_E_PPS_FAILED_IND) | + S(ISO7816_E_WTIME_EXP), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_PPS_RSP), + .action = iso7816_3_s_ins_pps_rsp_action, }, }; static struct osmo_fsm iso7816_3_fsm = { @@ -796,28 +870,188 @@ /*********************************************************************** * PPS FSM ***********************************************************************/ +struct pps_fsm_priv { + struct msgb* tx_cmd; + struct msgb* rx_cmd; + uint8_t pps0_recv; +}; + +static void pps_s_wait_ppss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct pps_fsm_priv *atp = fi->priv; + + if (!atp->rx_cmd) + atp->rx_cmd = msgb_alloc_c(fi, 6, "ATR"); /* TS + 32 chars */ + else + msgb_reset(atp->rx_cmd); +} + +static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct pps_fsm_priv *atp = fi->priv; + atp->tx_cmd = data; + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + switch (event) { + case ISO7816_E_XCEIVE_PPS_CMD: + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSS, 0, 0); + card_uart_tx(ip->uart, msgb_data(data), msgb_length(data), true); + break; + default: + OSMO_ASSERT(0); + } +} + +static void pps_wait_pX_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct pps_fsm_priv *atp = fi->priv; +// uint32_t guard_time_ms = atr_fi_gt_ms(fi); + uint8_t byte; + + switch (event) { + case ISO7816_E_RX_SINGLE: + byte = get_rx_byte_evt(fi->proc.parent, data); + LOGPFSML(fi, LOGL_DEBUG, "RX byte '%02x'\n", byte); + msgb_put_u8(atp->rx_cmd, byte); + switch (fi->state) { + case PPS_S_WAIT_PPSS: + if (byte == 0xff) + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS0, 0, 0); + break; + case PPS_S_WAIT_PPS0: + atp->pps0_recv = byte; + if(atp->pps0_recv & (1 << 4)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS1, 0, 0); + break; + } else if (atp->pps0_recv & (1 << 5)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS2, 0, 0); + break; + } else if (atp->pps0_recv & (1 << 6)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS3, 0, 0); + break; + } + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PPS1: + if (atp->pps0_recv & (1 << 5)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS2, 0, 0); + break; + } else if (atp->pps0_recv & (1 << 6)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS3, 0, 0); + break; + } + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PPS2: + if (atp->pps0_recv & (1 << 6)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS3, 0, 0); + break; + } + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PPS3: + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PCK: + /* verify checksum if present */ + if (fi->state == PPS_S_WAIT_PCK) { + uint8_t *pps_received = msgb_data(atp->rx_cmd); + uint8_t *pps_sent = msgb_data(atp->tx_cmd); + + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_END, 0, 0); + + /* pps was successful if response equals request + * rx buffer stays with the fsm, tx buffer gets handed back and freed + * by the cb */ + if (msgb_length(atp->rx_cmd) == msgb_length(atp->tx_cmd) && + !memcmp(pps_received, pps_sent, msgb_length(atp->rx_cmd))) { + osmo_fsm_inst_dispatch(fi->proc.parent, + ISO7816_E_PPS_DONE_IND, atp->tx_cmd); + } else { + osmo_fsm_inst_dispatch(fi->proc.parent, + ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); + } + } + break; + default: + OSMO_ASSERT(0); + } + break; + case ISO7816_E_WTIME_EXP: + /* FIXME: timeout handling if no pps supported ? */ + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_RX_ERR_IND, NULL); + break; + default: + OSMO_ASSERT(0); + } +} + static const struct osmo_fsm_state pps_states[] = { + [PPS_S_TX_PPS_REQ] = { + .name = "TX_PPS_REQ", + .in_event_mask = S(ISO7816_E_XCEIVE_PPS_CMD) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_TX_PPS_REQ) | + S(PPS_S_WAIT_PPSS), + .action = pps_s_tx_pps_req_action, + .onenter = pps_s_wait_ppss_onenter, + }, [PPS_S_WAIT_PPSS] = { .name = "WAIT_PPSS", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS0) | + S(PPS_S_WAIT_PPSS), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS0] = { .name = "WAIT_PPS0", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS1) | + S(PPS_S_WAIT_PPS2) | + S(PPS_S_WAIT_PPS3) | + S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS1] = { .name = "WAIT_PPS1", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS2) | + S(PPS_S_WAIT_PPS3) | + S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS2] = { .name = "WAIT_PPS2", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS3) | + S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS3] = { .name = "WAIT_PPS3", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PCK] = { .name = "WAIT_PCK", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_END), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_END] = { .name = "WAIT_END", + .in_event_mask = 0, + .out_state_mask = S(PPS_S_TX_PPS_REQ) | + S(PPS_S_WAIT_PPSS), }, }; @@ -1223,7 +1457,7 @@ if (!ip->tpdu_fi->priv) goto out_tpdu; -#if 0 +#if 1 ip->pps_fi = osmo_fsm_inst_alloc_child(&pps_fsm, fi, ISO7816_E_SW_ERR_IND); if (!ip->pps_fi) goto out_tpdu; @@ -1237,7 +1471,7 @@ return fi; -#if 0 +#if 1 out_pps: osmo_fsm_inst_free(ip->pps_fi); #endif diff --git a/ccid_common/iso7816_fsm.h b/ccid_common/iso7816_fsm.h index f2c7483..f512709 100644 --- a/ccid_common/iso7816_fsm.h +++ b/ccid_common/iso7816_fsm.h @@ -21,6 +21,9 @@ ISO7816_E_RESET_ACT_IND, /*!< Reset activated */ ISO7816_E_ABORT_REQ, /*!< Abort request (e.g. from CCID) */ /* TODO: PPS request */ + ISO7816_E_XCEIVE_PPS_CMD, + ISO7816_E_PPS_DONE_IND, + ISO7816_E_PPS_FAILED_IND, /* TODO: Clock stop request */ /* TODO: Rx FIFO overrun */ /* TODO: Rx buffer overrun */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a Gerrit-Change-Number: 16274 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:10 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:10 +0000 Subject: Change in osmo-ccid-firmware[master]: attempt at handling card insertion/removal References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 ) Change subject: attempt at handling card insertion/removal ...................................................................... attempt at handling card insertion/removal Change-Id: I88130de7f889811425c0a2ca4063ea8822c83f66 --- M ccid_common/ccid_device.c M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M ccid_common/iso7816_fsm.h M sysmoOCTSIM/main.c 6 files changed, 89 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/75/16275/1 diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index c67c52e..11edd3e 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -438,9 +438,20 @@ { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); const struct ccid_header *ch = (const struct ccid_header *) u; + struct msgb *resp; + int rc; /* handle this asynchronously */ - cs->ci->slot_ops->xfr_block_async(cs, msg, &u->xfr_block); + rc = cs->ci->slot_ops->xfr_block_async(cs, msg, &u->xfr_block); + if (rc < 0) { + msgb_trim(msg, sizeof(struct ccid_rdr_to_pc_data_block)); + resp = ccid_gen_data_block(cs, u->xfr_block.hdr.bSeq, CCID_CMD_STATUS_FAILED, -rc, 0, 0); + goto out; + } + /* busy */ + return 1; +out: + ccid_slot_send_unbusy(cs, resp); return 1; } diff --git a/ccid_common/ccid_device.h b/ccid_common/ccid_device.h index 8390783..38a71db 100644 --- a/ccid_common/ccid_device.h +++ b/ccid_common/ccid_device.h @@ -78,13 +78,14 @@ void (*icc_power_on_async)(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_icc_power_on *ipo); - void (*xfr_block_async)(struct ccid_slot *cs, struct msgb *msg, + int (*xfr_block_async)(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_xfr_block *xfb); void (*set_power)(struct ccid_slot *cs, bool enable); void (*set_clock)(struct ccid_slot *cs, enum ccid_clock_command cmd); int (*set_params)(struct ccid_slot *cs, uint8_t seq, enum ccid_protocol_num proto, const struct ccid_pars_decoded *pars_dec); int (*set_rate_and_clock)(struct ccid_slot *cs, uint32_t freq_hz, uint32_t rate_bps); + void (*icc_set_insertion_status)(struct ccid_slot *cs, bool present); }; /* An instance of CCID (i.e. a card reader device) */ diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 8bdcfd5..8d38f29 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -66,6 +66,23 @@ /* do nothing; real hardware would update the slot related state here */ } +static void iso_fsm_slot_icc_set_insertion_status(struct ccid_slot *cs, bool present) { + struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); + + if(present == cs->icc_present) + return; + + cs->icc_present = present; + + if (!present) { + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_CARD_REMOVAL, NULL); + card_uart_ctrl(ss->cuart, CUART_CTL_RST, true); + card_uart_ctrl(ss->cuart, CUART_CTL_POWER, false); + cs->icc_powered = false; + cs->cmd_busy = false; + } +} + static void iso_fsm_slot_icc_power_on_async(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_icc_power_on *ipo) { @@ -113,6 +130,15 @@ ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); break; + case ISO7816_E_TPDU_FAILED_IND: + tpdu = data; + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + msgb_hexdump(tpdu)); + /* FIXME: other error causes than card removal?*/ + resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_FAILED, CCID_ERR_ICC_MUTE, msgb_l2(tpdu), 0); + ccid_slot_send_unbusy(cs, resp); + msgb_free(tpdu); + break; case ISO7816_E_PPS_DONE_IND: tpdu = data; /* pps was successful, so we know these values are fine */ @@ -147,12 +173,15 @@ } } -static void iso_fsm_slot_xfr_block_async(struct ccid_slot *cs, struct msgb *msg, +static int iso_fsm_slot_xfr_block_async(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_xfr_block *xfb) { struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct msgb *tpdu; + if(!cs->icc_present) + return -CCID_ERR_ICC_MUTE; + ss->seq = xfb->hdr.bSeq; /* must be '0' for TPDU level exchanges or for short APDU */ @@ -171,6 +200,7 @@ LOGPCS(cs, LOGL_DEBUG, "scheduling TPDU transfer: %s\n", msgb_hexdump(tpdu)); osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_TPDU_CMD, tpdu); /* continues in iso_fsm_clot_user_cb once response/error/timeout is received */ + return 0; } @@ -296,6 +326,7 @@ .init = iso_fsm_slot_init, .pre_proc_cb = iso_fsm_slot_pre_proc_cb, .icc_power_on_async = iso_fsm_slot_icc_power_on_async, + .icc_set_insertion_status = iso_fsm_slot_icc_set_insertion_status, .xfr_block_async = iso_fsm_slot_xfr_block_async, .set_power = iso_fsm_slot_set_power, .set_clock = iso_fsm_slot_set_clock, diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index d02a955..98c32d3 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -45,7 +45,6 @@ ISO7816_S_IN_ATR, /*!< while we are receiving the ATR */ ISO7816_S_WAIT_TPDU, /*!< waiting for start of new TPDU */ ISO7816_S_IN_TPDU, /*!< inside a single TPDU */ - ISO7816_S_IN_PPS_REQ, /*!< while we are inside the PPS request */ ISO7816_S_WAIT_PPS_RSP, /*!< waiting for start of the PPS response */ ISO7816_S_IN_PPS_RSP, /*!< while we are inside the PPS request */ }; @@ -230,6 +229,7 @@ { struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + struct msgb *msg; switch (event) { case ISO7816_E_RESET_REL_IND: @@ -238,6 +238,16 @@ osmo_fsm_inst_state_chg_ms(fi, ISO7816_S_WAIT_ATR, fi_cycles2ms(fi, 40000), T_WAIT_ATR); break; + case ISO7816_E_PPS_FAILED_IND: + msg = data; + /* notify user about PPS result */ + ip->user_cb(fi, event, 0, msg); + break; + case ISO7816_E_TPDU_FAILED_IND: + msg = data; + /* hand finished TPDU to user */ + ip->user_cb(fi, event, 0, msg); + break; default: OSMO_ASSERT(0); } @@ -375,19 +385,6 @@ } } -static void iso7816_3_in_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) -{ - struct iso7816_3_priv *tfp = get_iso7816_3_priv(fi); - - switch (event) { - case ISO7816_E_XCEIVE_PPS_CMD: - osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); - break; - default: - OSMO_ASSERT(0); - } -} - static void iso7816_3_s_wait_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { @@ -434,7 +431,9 @@ static const struct osmo_fsm_state iso7816_3_states[] = { [ISO7816_S_RESET] = { .name = "RESET", - .in_event_mask = S(ISO7816_E_RESET_REL_IND), + .in_event_mask = S(ISO7816_E_RESET_REL_IND) | + S(ISO7816_E_PPS_FAILED_IND)| + S(ISO7816_E_TPDU_FAILED_IND), .out_state_mask = S(ISO7816_S_WAIT_ATR) | S(ISO7816_S_RESET), .action = iso7816_3_reset_action, @@ -467,7 +466,6 @@ .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_TPDU) | - S(ISO7816_S_IN_PPS_REQ) | S(ISO7816_S_WAIT_PPS_RSP), .action = iso7816_3_wait_tpdu_action, .onenter = iso7816_3_wait_tpdu_onenter, @@ -486,15 +484,6 @@ S(ISO7816_S_IN_TPDU), .action = iso7816_3_in_tpdu_action, }, - [ISO7816_S_IN_PPS_REQ] = { - .name = "IN_PPS_REQ", - .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD), - .out_state_mask = S(ISO7816_S_RESET) | - S(ISO7816_S_WAIT_TPDU) | - S(ISO7816_S_IN_PPS_REQ) | - S(ISO7816_S_WAIT_PPS_RSP), - .action = iso7816_3_in_pps_req_action, - }, [ISO7816_S_WAIT_PPS_RSP] = { .name = "WAIT_PPS_RESP", .in_event_mask = S(ISO7816_E_TX_COMPL) | @@ -881,18 +870,27 @@ struct pps_fsm_priv *atp = fi->priv; if (!atp->rx_cmd) - atp->rx_cmd = msgb_alloc_c(fi, 6, "ATR"); /* TS + 32 chars */ + atp->rx_cmd = msgb_alloc_c(fi, 6, "PPSRSP"); /* at most 6 */ else msgb_reset(atp->rx_cmd); + + /* notify in case card got pulled out */ + if (atp->tx_cmd){ + osmo_fsm_inst_dispatch(fi->proc.parent, + ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); + atp->tx_cmd = 0; + } } static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct pps_fsm_priv *atp = fi->priv; - atp->tx_cmd = data; struct osmo_fsm_inst *parent_fi = fi->proc.parent; struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + /* keep the buffer to compare it with the received response */ + atp->tx_cmd = data; + switch (event) { case ISO7816_E_XCEIVE_PPS_CMD: osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSS, 0, 0); @@ -972,6 +970,8 @@ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); } + /* ownership transfer */ + atp->tx_cmd = 0; } break; default: @@ -1093,6 +1093,16 @@ return (struct tpdu_fsm_priv *) fi->priv; } +static void tpdu_s_init_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); + + /* notify in case card got pulled out */ + if (tfp->tpdu){ + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, tfp->tpdu); + tfp->tpdu = 0; + } +} static void tpdu_s_init_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { @@ -1311,6 +1321,9 @@ osmo_fsm_inst_state_chg(fi, TPDU_S_DONE, 0, 0); /* Notify parent FSM */ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_DONE_IND, tfp->tpdu); + + /* ownership transfer */ + tfp->tpdu = 0; break; default: OSMO_ASSERT(0); @@ -1342,6 +1355,7 @@ .out_state_mask = S(TPDU_S_INIT) | S(TPDU_S_TX_HDR), .action = tpdu_s_init_action, + .onenter = tpdu_s_init_onenter, }, [TPDU_S_TX_HDR] = { .name = "TX_HDR", diff --git a/ccid_common/iso7816_fsm.h b/ccid_common/iso7816_fsm.h index f512709..d4aee59 100644 --- a/ccid_common/iso7816_fsm.h +++ b/ccid_common/iso7816_fsm.h @@ -32,6 +32,7 @@ ISO7816_E_ATR_DONE_IND, /*!< ATR Done indication from ATR child FSM */ ISO7816_E_ATR_ERR_IND, /*!< ATR Error indication from ATR child FSM */ ISO7816_E_TPDU_DONE_IND, /*!< TPDU Done indication from TPDU child FSM */ + ISO7816_E_TPDU_FAILED_IND, /*!< TPDU Failed indication from TPDU child FSM */ ISO7816_E_TPDU_CLEAR_REQ, /*!< Return TPDU FSM to TPDU_S_INIT */ }; diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 7ddca92..959e7eb 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -303,7 +303,7 @@ for (i = 0; i < 8; i++){ bool level = ncn8025_interrupt_level(i); new_mask |= level << i; - g_ci.slot[i].icc_present = level; + g_ci.slot_ops->icc_set_insertion_status(&g_ci.slot[i], level); } /* notify the user/host about any changes */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I88130de7f889811425c0a2ca4063ea8822c83f66 Gerrit-Change-Number: 16275 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:10 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:10 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the debug uart buffer size References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 ) Change subject: increase the debug uart buffer size ...................................................................... increase the debug uart buffer size printing to the buffer is faster than getting the data out, so let's increase it a bit to drop less information Change-Id: I343b03d5b06962b90f0c1aaceda03aa871a2f98b --- M sysmoOCTSIM/driver_init.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/76/16276/1 diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index c373dc2..7071ea5 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -33,7 +33,7 @@ #define SIM6_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define UART_DEBUG_BUFFER_SIZE 256 +#define UART_DEBUG_BUFFER_SIZE 4096 struct usart_async_descriptor SIM0; struct usart_async_descriptor SIM1; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I343b03d5b06962b90f0c1aaceda03aa871a2f98b Gerrit-Change-Number: 16276 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:10 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:10 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to use the DWT unit References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 ) Change subject: debug code to use the DWT unit ...................................................................... debug code to use the DWT unit Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 --- M sysmoOCTSIM/main.c 1 file changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/77/16277/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 959e7eb..a1b84b7 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -442,6 +442,29 @@ char sernr_buf[16*2+1]; char rstcause_buf[RSTCAUSE_STR_SIZE]; +#if 0 +CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk ; //| /* tracing*/ +////CoreDebug_DEMCR_MON_EN_Msk; /* mon interupt catcher */ + + +DWT->COMP0 = 0x40003028; /* sercom 0 data */ +//DWT->COMP0 = 0x40003428; /* sercom 1 data */ +DWT->MASK0 = 0; /* 0 */ +DWT->FUNCTION0 = 0; /* has to be 0 for linked address */ + +DWT->COMP1 = 0xa5; /* value */ +DWT->MASK1 = 0; /* match all bits */ +DWT->FUNCTION1 = (0b10 << DWT_FUNCTION_DATAVSIZE_Pos) | /* DATAVSIZE 10 - dword */ +#if 1 +(0 << DWT_FUNCTION_DATAVADDR0_Pos) | /* Data Match linked addr pointer in COMP0 */ +#else +(1 << DWT_FUNCTION_DATAVADDR0_Pos) | /* Data Match on any addr -> own number */ +#endif +(1 << DWT_FUNCTION_DATAVMATCH_Pos) | /* DATAVMATCH Enable data comparation */ +(0b0111 << DWT_FUNCTION_FUNCTION_Pos); /* generate a watchpoint event on rw */ + +#endif + atmel_start_init(); get_chip_unique_serial_str(sernr_buf, sizeof(sernr_buf)); get_rstcause_str(rstcause_buf); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 Gerrit-Change-Number: 16277 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:11 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:11 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to measure uart timing using the CAN header References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 ) Change subject: debug code to measure uart timing using the CAN header ...................................................................... debug code to measure uart timing using the CAN header Change-Id: I5f2c174076b5599dcb56f887330de27f470aeffc --- M ccid_common/iso7816_fsm.c M sysmoOCTSIM/hpl/sercom/hpl_sercom.c M sysmoOCTSIM/main.c 3 files changed, 37 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/78/16278/1 diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 98c32d3..031f6b0 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -1134,6 +1134,7 @@ } } +#include static void tpdu_s_tx_hdr_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { OSMO_ASSERT(fi->fsm == &tpdu_fsm); @@ -1173,6 +1174,12 @@ } else if (byte == tpduh->ins) { if (tfp->is_command) { /* transmit all remaining bytes */ +#if 0 +// rx -> tx delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif card_uart_tx(ip->uart, msgb_l2(tfp->tpdu), msgb_l2len(tfp->tpdu), true); osmo_fsm_inst_state_chg(fi, TPDU_S_TX_REMAINING, 0, 0); } else { diff --git a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c index f235115..272fb07 100644 --- a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c +++ b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c @@ -577,7 +577,7 @@ hri_sercomusart_write_INTEN_ERROR_bit(device->hw, state); } } - +#include /** * \internal Sercom interrupt handler * @@ -591,6 +591,12 @@ hri_sercomusart_clear_INTEN_DRE_bit(hw); device->usart_cb.tx_byte_sent(device); } else if (hri_sercomusart_get_interrupt_TXC_bit(hw) && hri_sercomusart_get_INTEN_TXC_bit(hw)) { +#if 0 +// tx byte last edge <-> txc irq delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif hri_sercomusart_clear_INTEN_TXC_bit(hw); device->usart_cb.tx_done_cb(device); } else if (hri_sercomusart_get_interrupt_RXC_bit(hw)) { @@ -600,8 +606,20 @@ hri_sercomusart_clear_STATUS_reg(hw, SERCOM_USART_STATUS_MASK); return; } +#if 0 +// rx byte last edge <-> rxc irq delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif device->usart_cb.rx_done_cb(device, hri_sercomusart_read_DATA_reg(hw)); +#if 0 +// rx byte last edge <-> rxc irq end delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif } else if (hri_sercomusart_get_interrupt_ERROR_bit(hw)) { uint32_t status; diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index a1b84b7..54616af 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -506,6 +506,17 @@ } submit_next_out(); CRITICAL_SECTION_LEAVE() +#if 0 + /* CAN_RX */ + gpio_set_pin_function(PIN_PB12, GPIO_PIN_FUNCTION_OFF); + gpio_set_pin_direction(PIN_PB12, GPIO_DIRECTION_OUT); + gpio_set_pin_level(PIN_PB12, false); + + /* CAN_TX */ + gpio_set_pin_function(PIN_PB13, GPIO_PIN_FUNCTION_OFF); + gpio_set_pin_direction(PIN_PB13, GPIO_DIRECTION_OUT); + gpio_set_pin_level(PIN_PB13, false); +#endif // command_print_prompt(); while (true) { // main loop -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I5f2c174076b5599dcb56f887330de27f470aeffc Gerrit-Change-Number: 16278 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:11 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:11 +0000 Subject: Change in osmo-ccid-firmware[master]: add a "no rx or tx" state References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 ) Change subject: add a "no rx or tx" state ...................................................................... add a "no rx or tx" state Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63 --- M ccid_common/cuart.h M ccid_common/iso7816_fsm.c M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 3 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/79/16279/1 diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 6c53481..32a8daa 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -23,6 +23,7 @@ enum card_uart_ctl { CUART_CTL_RX, /* enable/disable receiver */ + CUART_CTL_NO_RXTX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ CUART_CTL_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 031f6b0..623193f 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -305,7 +305,7 @@ { struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); - card_uart_ctrl(ip->uart, CUART_CTL_RX, false); + card_uart_ctrl(ip->uart, CUART_CTL_NO_RXTX, true); /* reset the TPDU state machine */ osmo_fsm_inst_dispatch(ip->tpdu_fi, ISO7816_E_TPDU_CLEAR_REQ, NULL); } diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index a8f8044..21ab5a4 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -348,6 +348,8 @@ Sercom *sercom = cuart->u.asf4.usa_pd->device.hw; switch (ctl) { + case CUART_CTL_NO_RXTX: + break; case CUART_CTL_RX: if (arg){ sercom->USART.CTRLB.bit.RXEN = 1; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63 Gerrit-Change-Number: 16279 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:12 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:12 +0000 Subject: Change in osmo-ccid-firmware[master]: switching rx/tx is too slow, and not necessary References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 ) Change subject: switching rx/tx is too slow, and not necessary ...................................................................... switching rx/tx is too slow, and not necessary Change-Id: Ic91b3e183ba451b4e327e407aae0497273652f56 --- M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/80/16280/1 diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index 21ab5a4..a0b3821 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -352,12 +352,9 @@ break; case CUART_CTL_RX: if (arg){ - sercom->USART.CTRLB.bit.RXEN = 1; - sercom->USART.CTRLB.bit.TXEN = 0; + /* no op */ } else { delay_us(cuart->u.asf4.extrawait_after_rx); - sercom->USART.CTRLB.bit.RXEN = 0; - sercom->USART.CTRLB.bit.TXEN = 1; } break; case CUART_CTL_RST: -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic91b3e183ba451b4e327e407aae0497273652f56 Gerrit-Change-Number: 16280 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:12 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:12 +0000 Subject: Change in osmo-ccid-firmware[master]: add some volatility to debug missing state changes References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 ) Change subject: add some volatility to debug missing state changes ...................................................................... add some volatility to debug missing state changes Change-Id: I2e12e32ad27b03d73ba3533903c34abc2fcce37a --- M sysmoOCTSIM/main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/81/16281/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 54616af..02b7b09 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -101,7 +101,7 @@ /* bit-mask of card-insert status, as determined from NCN8025 IRQ output */ uint8_t card_insert_mask; }; -static struct ccid_state g_ccid_s; +static volatile struct ccid_state g_ccid_s; static void ccid_out_read_compl(const uint8_t ep, enum usb_xfer_code code, uint32_t transferred); static void ccid_in_write_compl(const uint8_t ep, enum usb_xfer_code code, uint32_t transferred); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I2e12e32ad27b03d73ba3533903c34abc2fcce37a Gerrit-Change-Number: 16281 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:12 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:12 +0000 Subject: Change in osmo-ccid-firmware[master]: better ccid error handling, fix buffer leaks References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 ) Change subject: better ccid error handling, fix buffer leaks ...................................................................... better ccid error handling, fix buffer leaks Change-Id: Ib8b8524809e12608a7ade79ce7d7c3ced16eeb57 --- M ccid_common/ccid_device.c M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c 3 files changed, 30 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/82/16282/1 diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index 11edd3e..b14f194 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -475,14 +475,25 @@ const struct ccid_header *ch = (const struct ccid_header *) u; uint8_t seq = u->reset_parameters.hdr.bSeq; struct msgb *resp; + int rc; /* copy default parameters from somewhere */ /* FIXME: T=1 */ - cs->ci->slot_ops->set_params(cs, seq, CCID_PROTOCOL_NUM_T0, cs->default_pars); - cs->pars = *cs->default_pars; - resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); - return ccid_slot_send_unbusy(cs, resp); + /* validate parameters; abort if they are not supported */ + rc = cs->ci->slot_ops->set_params(cs, seq, CCID_PROTOCOL_NUM_T0, cs->default_pars); + if (rc < 0) { + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + goto out; + } + + msgb_free(msg); + /* busy, tdpu like callback */ + return 1; +out: + msgb_free(msg); + ccid_slot_send_unbusy(cs, resp); + return 1; } /* Section 6.1.7 */ @@ -523,10 +534,14 @@ resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); goto out; } + + msgb_free(msg); /* busy, tdpu like callback */ return 1; out: - return ccid_slot_send_unbusy(cs, resp); + msgb_free(msg); + ccid_slot_send_unbusy(cs, resp); + return 1; } /* Section 6.1.8 */ @@ -682,6 +697,15 @@ return ccid_send(ci, resp); } + if(!cs->icc_present) { + LOGPCS(cs, LOGL_ERROR, "No icc present, but another cmd received\n"); + /* FIXME: ABORT logic as per section 5.3.1 of CCID Spec v1.1 */ + resp = gen_err_resp(ch->bMessageType, ch->bSlot, get_icc_status(cs), ch->bSeq, + CCID_ERR_ICC_MUTE); + msgb_free(msg); + return ccid_send(ci, resp); + } + LOGPCS(cs, LOGL_DEBUG, "Rx CCID(OUT) %s %s\n", get_value_string(ccid_msg_type_vals, ch->bMessageType), msgb_hexdump(msg)); diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 8d38f29..d2aec26 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -179,9 +179,6 @@ struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct msgb *tpdu; - if(!cs->icc_present) - return -CCID_ERR_ICC_MUTE; - ss->seq = xfb->hdr.bSeq; /* must be '0' for TPDU level exchanges or for short APDU */ diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 623193f..3778dcc 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -293,6 +293,7 @@ ip->user_cb(fi, event, 0, atr); break; case ISO7816_E_ATR_ERR_IND: + atr = data; osmo_fsm_inst_state_chg(fi, ISO7816_S_RESET, 0, 0); ip->user_cb(fi, event, 0, atr); break; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib8b8524809e12608a7ade79ce7d7c3ced16eeb57 Gerrit-Change-Number: 16282 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:13 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:13 +0000 Subject: Change in osmo-ccid-firmware[master]: fix power descriptor value References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 ) Change subject: fix power descriptor value ...................................................................... fix power descriptor value The previous value would allow using the device without external power, i.e. on a hub, which leads to silent failures trying to power up the slots (nothing happens, no atr will be received) Change-Id: I40c48ea56151d13de362b8f73cae5b21aba0ebfa FIXME: The device should offer at least one 100mA configuration. --- M sysmoOCTSIM/usb_descriptors.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/83/16283/1 diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index 63ace0c..beb1633 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -52,7 +52,8 @@ .bConfigurationValue = CONF_USB_CDCD_ACM_BCONFIGVAL, .iConfiguration = STR_DESC_CONFIG, .bmAttributes = CONF_USB_CDCD_ACM_BMATTRI, - .bMaxPower = CONF_USB_CDCD_ACM_BMAXPOWER, + /* FIXME: The device should offer at least one 100mA configuration. */ + .bMaxPower = 250, /* request 500mA */ }, .cdc = { .comm = { -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I40c48ea56151d13de362b8f73cae5b21aba0ebfa Gerrit-Change-Number: 16283 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:13 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:13 +0000 Subject: Change in osmo-ccid-firmware[master]: fsm completion event handling from main loop References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16284 ) Change subject: fsm completion event handling from main loop ...................................................................... fsm completion event handling from main loop The main loop will now poll for finished/failed transactions and handle them, this was previously handled during the last rx interrupt of a transaction, which was bad for timing. This does also fix malloc/free while handling interrupts. Change-Id: I055110720089e20e65db592eccc3ce4d618e8c63 --- M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M sysmoOCTSIM/main.c 4 files changed, 68 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/84/16284/1 diff --git a/ccid_common/ccid_device.h b/ccid_common/ccid_device.h index 38a71db..f364f72 100644 --- a/ccid_common/ccid_device.h +++ b/ccid_common/ccid_device.h @@ -57,6 +57,8 @@ struct ccid_pars_decoded proposed_pars; /* default parameters; applied on ResetParameters */ const struct ccid_pars_decoded *default_pars; + volatile uint32_t event; + volatile void* event_data; }; /* CCID operations provided by USB transport layer */ @@ -86,6 +88,7 @@ const struct ccid_pars_decoded *pars_dec); int (*set_rate_and_clock)(struct ccid_slot *cs, uint32_t freq_hz, uint32_t rate_bps); void (*icc_set_insertion_status)(struct ccid_slot *cs, bool present); + int (*handle_fsm_events)(struct ccid_slot *cs, bool enable); }; /* An instance of CCID (i.e. a card reader device) */ diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index d2aec26..9be31d6 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -110,34 +110,76 @@ { struct iso_fsm_slot *ss = iso7816_fsm_get_user_priv(fi); struct ccid_slot *cs = ss->cs; + + switch (event) { + case ISO7816_E_ATR_DONE_IND: + case ISO7816_E_ATR_ERR_IND: + case ISO7816_E_TPDU_DONE_IND: + case ISO7816_E_TPDU_FAILED_IND: + case ISO7816_E_PPS_DONE_IND: + case ISO7816_E_PPS_FAILED_IND: + cs->event_data = data; + asm volatile("dmb st": : :"memory"); + cs->event = event; + break; + default: + LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, cause=%d, data=%p) unhandled\n", + __func__, event, cause, data); + break; + } +} + +static int iso_handle_fsm_events(struct ccid_slot *cs, bool enable){ + struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct msgb *tpdu, *resp; + volatile uint32_t event = cs->event; + volatile void * volatile data = cs->event_data; + + if(!event) + return 0; + if(event && !data) + return 0; switch (event) { case ISO7816_E_ATR_DONE_IND: tpdu = data; - LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, msgb_hexdump(tpdu)); resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_OK, 0, msgb_data(tpdu), msgb_length(tpdu)); ccid_slot_send_unbusy(cs, resp); /* Don't free "TPDU" here, as the ATR should survive */ + cs->event = 0; + break; + case ISO7816_E_ATR_ERR_IND: + tpdu = data; + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, + msgb_hexdump(tpdu)); + resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_FAILED, CCID_ERR_ICC_MUTE, + msgb_data(tpdu), msgb_length(tpdu)); + ccid_slot_send_unbusy(cs, resp); + /* Don't free "TPDU" here, as the ATR should survive */ + cs->event = 0; + break; break; case ISO7816_E_TPDU_DONE_IND: tpdu = data; - LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, msgb_hexdump(tpdu)); resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_OK, 0, msgb_l2(tpdu), msgb_l2len(tpdu)); ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); + cs->event = 0; break; case ISO7816_E_TPDU_FAILED_IND: tpdu = data; - LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, msgb_hexdump(tpdu)); /* FIXME: other error causes than card removal?*/ resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_FAILED, CCID_ERR_ICC_MUTE, msgb_l2(tpdu), 0); ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); + cs->event = 0; break; case ISO7816_E_PPS_DONE_IND: tpdu = data; @@ -157,6 +199,7 @@ /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ msgb_free(tpdu); + cs->event = 0; break; case ISO7816_E_PPS_FAILED_IND: tpdu = data; @@ -165,10 +208,13 @@ ccid_slot_send_unbusy(cs, resp); /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ msgb_free(tpdu); + cs->event = 0; + break; + case 0: break; default: - LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, cause=%d, data=%p) unhandled\n", - __func__, event, cause, data); + LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, data=%p) unhandled\n", + __func__, event, data); break; } } @@ -177,7 +223,7 @@ const struct ccid_pc_to_rdr_xfr_block *xfb) { struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); - struct msgb *tpdu; + ss->seq = xfb->hdr.bSeq; @@ -185,17 +231,10 @@ OSMO_ASSERT(xfb->wLevelParameter == 0x0000); OSMO_ASSERT(msgb_length(msg) > xfb->hdr.dwLength); - /* 'msg' contains the raw CCID message as received from USB. We could create - * a new message buffer for the ISO7816 side here or we could 'strip the CCID - * header off the start of the message. Let's KISS and do a copy here */ - tpdu = msgb_alloc(512, "TPDU"); - OSMO_ASSERT(tpdu); - memcpy(msgb_data(tpdu), xfb->abData, xfb->hdr.dwLength); - msgb_put(tpdu, xfb->hdr.dwLength); - msgb_free(msg); + msgb_pull(msg, 10); - LOGPCS(cs, LOGL_DEBUG, "scheduling TPDU transfer: %s\n", msgb_hexdump(tpdu)); - osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_TPDU_CMD, tpdu); + LOGPCS(cs, LOGL_DEBUG, "scheduling TPDU transfer: %s\n", msgb_hexdump(msg)); + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_TPDU_CMD, msg); /* continues in iso_fsm_clot_user_cb once response/error/timeout is received */ return 0; } @@ -329,4 +368,5 @@ .set_clock = iso_fsm_slot_set_clock, .set_params = iso_fsm_slot_set_params, .set_rate_and_clock = iso_fsm_slot_set_rate_and_clock, + .handle_fsm_events = iso_handle_fsm_events, }; diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 3778dcc..44c8191 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -238,6 +238,8 @@ osmo_fsm_inst_state_chg_ms(fi, ISO7816_S_WAIT_ATR, fi_cycles2ms(fi, 40000), T_WAIT_ATR); break; + case ISO7816_E_POWER_UP_IND: + break; case ISO7816_E_PPS_FAILED_IND: msg = data; /* notify user about PPS result */ @@ -876,7 +878,7 @@ msgb_reset(atp->rx_cmd); /* notify in case card got pulled out */ - if (atp->tx_cmd){ + if (atp->tx_cmd && old_state != PPS_S_DONE){ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); atp->tx_cmd = 0; @@ -1099,7 +1101,7 @@ struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); /* notify in case card got pulled out */ - if (tfp->tpdu){ + if (tfp->tpdu && old_state != TPDU_S_DONE){ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, tfp->tpdu); tfp->tpdu = 0; } diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 02b7b09..806a9f6 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -267,7 +267,7 @@ { uint8_t statusbytes[2] = {0}; //struct msgb *msg = ccid_msgb_alloc(); - struct msgb *msg = msgb_alloc(64, "IRQ"); + struct msgb *msg = msgb_alloc(300,"IRQ"); struct ccid_rdr_to_pc_notify_slot_change *nsc = msgb_put(msg, sizeof(*nsc) + sizeof(statusbytes)); nsc->bMessageType = RDR_to_PC_NotifySlotChange; @@ -523,6 +523,9 @@ command_try_recv(); poll_card_detect(); submit_next_irq(); + for (int i = 0; i < usb_fs_descs.ccid.class.bMaxSlotIndex; i++){ + g_ci.slot_ops->handle_fsm_events(&g_ci.slot[i], true); + } feed_ccid(); osmo_timers_update(); int qs = llist_count_at(&g_ccid_s.free_q); @@ -533,13 +536,12 @@ msgb_free(msg); } if(qs < NUM_OUT_BUF) - for (int i= 0; i < qs-NUM_OUT_BUF; i++){ + for (int i= 0; i < NUM_OUT_BUF-qs; i++){ struct msgb *msg = msgb_alloc(300,"ccid"); OSMO_ASSERT(msg); /* return the message back to the queue of free message buffers */ llist_add_tail_at(&msg->list, &g_ccid_s.free_q); } - } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16284 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I055110720089e20e65db592eccc3ce4d618e8c63 Gerrit-Change-Number: 16284 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:13 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:13 +0000 Subject: Change in osmo-ccid-firmware[master]: add a note for D=64 pecularities References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16285 ) Change subject: add a note for D=64 pecularities ...................................................................... add a note for D=64 pecularities Change-Id: Icf2845e0f07f2d23f5090d35b6d8d145ad65a2f8 --- M ccid_common/ccid_slot_fsm.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/85/16285/1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 9be31d6..d7740fe 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -287,6 +287,14 @@ ss->seq = seq; + /* FIXME: + When using D=64, the interface device shall ensure a delay + of at least 16 etu between the leading edge of the last + received character and the leading edge of the character transmitted + for initiating a command. + -> we can't really do 4 stop bits?! + */ + /* Hardware does not support SPU, so no PPS2, and PPS3 is reserved anyway */ tpdu = msgb_alloc(6, "PPSRQ"); OSMO_ASSERT(tpdu); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16285 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Icf2845e0f07f2d23f5090d35b6d8d145ad65a2f8 Gerrit-Change-Number: 16285 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:13 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:13 +0000 Subject: Change in osmo-ccid-firmware[master]: pps warning References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16286 ) Change subject: pps warning ...................................................................... pps warning Change-Id: Ia125b7983e81342af224bc6e8771d8be4c4bfa42 --- M ccid_common/ccid_slot_fsm.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/86/16286/1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index d7740fe..fef1515 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -188,6 +188,13 @@ uint8_t D = iso7816_3_di_table[cs->proposed_pars.di]; uint32_t fmax = iso7816_3_fmax_table[cs->proposed_pars.fi]; + /* 7816-3 5.2.3 + * No information shall be exchanged when switching the + * frequency value. Two different times are recommended + * for switching the frequency value, either + * - after ATR while card is idle + * - after PPS while card is idle + */ card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK_FREQ, fmax); card_uart_ctrl(ss->cuart, CUART_CTL_FD, F/D); card_uart_ctrl(ss->cuart, CUART_CTL_WTIME, cs->proposed_pars.t0.waiting_integer); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia125b7983e81342af224bc6e8771d8be4c4bfa42 Gerrit-Change-Number: 16286 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:14 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:14 +0000 Subject: Change in osmo-ccid-firmware[master]: boost uart priority References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16287 ) Change subject: boost uart priority ...................................................................... boost uart priority Change-Id: I10ea17ca8b120c09b8926da010c9e358b219f7ed --- M sysmoOCTSIM/main.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/87/16287/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 806a9f6..c73b715 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -474,6 +474,12 @@ board_init(); command_init("sysmoOCTSIM> "); + /* boost uart priority by setting all other irqs to uartprio+1 */ + for(int i = 0; i < PERIPH_COUNT_IRQn; i++) + NVIC_SetPriority(i, 2); + for(int i = SERCOM0_0_IRQn; i <= SERCOM7_3_IRQn; i++) + NVIC_SetPriority(i, 1); + printf("\r\n\r\n" "=============================================================================\n\r" "sysmoOCTSIM firmware " GIT_VERSION "\n\r" -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I10ea17ca8b120c09b8926da010c9e358b219f7ed Gerrit-Change-Number: 16287 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:14 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:14 +0000 Subject: Change in osmo-ccid-firmware[master]: the magic sauce that makes it work References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16288 ) Change subject: the magic sauce that makes it work ...................................................................... the magic sauce that makes it work 1mio concurrent select mf transfers, 5mhz, fi/di 512/32 Change-Id: Ica8539e4428ca3e3eb3e8ca9f5a5b50eb738ca8d --- M sysmoOCTSIM/hpl/sercom/hpl_sercom.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/88/16288/1 diff --git a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c index 272fb07..7373962 100644 --- a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c +++ b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c @@ -589,6 +589,8 @@ if (hri_sercomusart_get_interrupt_DRE_bit(hw) && hri_sercomusart_get_INTEN_DRE_bit(hw)) { hri_sercomusart_clear_INTEN_DRE_bit(hw); + hri_sercomusart_read_DATA_reg(hw); + hri_sercomusart_clear_INTFLAG_RXC_bit(hw); device->usart_cb.tx_byte_sent(device); } else if (hri_sercomusart_get_interrupt_TXC_bit(hw) && hri_sercomusart_get_INTEN_TXC_bit(hw)) { #if 0 @@ -598,6 +600,8 @@ gpio_set_pin_level(PIN_PB12, false); #endif hri_sercomusart_clear_INTEN_TXC_bit(hw); + hri_sercomusart_read_DATA_reg(hw); + hri_sercomusart_clear_INTFLAG_RXC_bit(hw); device->usart_cb.tx_done_cb(device); } else if (hri_sercomusart_get_interrupt_RXC_bit(hw)) { if (hri_sercomusart_read_STATUS_reg(hw) -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ica8539e4428ca3e3eb3e8ca9f5a5b50eb738ca8d Gerrit-Change-Number: 16288 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:14 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:14 +0000 Subject: Change in osmo-ccid-firmware[master]: change uart ctl define names References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16289 ) Change subject: change uart ctl define names ...................................................................... change uart ctl define names Change-Id: I656e9e32c67d6e7b70a53f8f113583f25619e00f --- M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 3 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/89/16289/1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index fef1515..3a591d7 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -195,8 +195,8 @@ * - after ATR while card is idle * - after PPS while card is idle */ - card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK_FREQ, fmax); - card_uart_ctrl(ss->cuart, CUART_CTL_FD, F/D); + card_uart_ctrl(ss->cuart, CUART_CTL_SET_CLOCK_FREQ, fmax); + card_uart_ctrl(ss->cuart, CUART_CTL_SET_FD, F/D); card_uart_ctrl(ss->cuart, CUART_CTL_WTIME, cs->proposed_pars.t0.waiting_integer); cs->pars = cs->proposed_pars; diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 32a8daa..c72b51c 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -26,10 +26,10 @@ CUART_CTL_NO_RXTX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ - CUART_CTL_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ + CUART_CTL_SET_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ CUART_CTL_RST, /* enable/disable ICC reset */ CUART_CTL_WTIME, /* set the waiting time (in etu) */ - CUART_CTL_FD, + CUART_CTL_SET_FD, }; struct card_uart; diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index a0b3821..db3dc79 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -384,7 +384,7 @@ case CUART_CTL_CLOCK: /* no clock stop support */ break; - case CUART_CTL_CLOCK_FREQ: + case CUART_CTL_SET_CLOCK_FREQ: ncn8025_get(cuart->u.asf4.slot_nr, &settings); /* 2,5/5/10/20 supported by dividers */ @@ -398,7 +398,7 @@ settings.clkdiv = clkdiv; ncn8025_set(cuart->u.asf4.slot_nr, &settings); break; - case CUART_CTL_FD: + case CUART_CTL_SET_FD: ncn8025_get(cuart->u.asf4.slot_nr, &settings); uint8_t divider = ncn8025_div_val[settings.clkdiv]; uint32_t baudrate = (20e6/divider)/arg; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16289 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I656e9e32c67d6e7b70a53f8f113583f25619e00f Gerrit-Change-Number: 16289 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:14 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:14 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart: allow getting the icc baud rate and clock freq References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16290 ) Change subject: cuart: allow getting the icc baud rate and clock freq ...................................................................... cuart: allow getting the icc baud rate and clock freq Change-Id: I577907e6c60582a80666d43b17c20de4e03cc8df --- M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/90/16290/1 diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index c72b51c..6a782db 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -30,6 +30,8 @@ CUART_CTL_RST, /* enable/disable ICC reset */ CUART_CTL_WTIME, /* set the waiting time (in etu) */ CUART_CTL_SET_FD, + CUART_CTL_GET_BAUDRATE, + CUART_CTL_GET_CLOCK_FREQ, }; struct card_uart; @@ -100,6 +102,7 @@ uint8_t slot_nr; /* in us, required, no delay breaks _rx_ */ uint32_t extrawait_after_rx; + uint32_t current_baudrate; } asf4; } u; }; diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index db3dc79..f12ed73 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -203,6 +203,9 @@ if (NULL == slot) { return false; } + + // update cached values + cuart->u.asf4.current_baudrate = baudrate; printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) usart_async_disable(slot); // disable SERCOM peripheral @@ -404,6 +407,12 @@ uint32_t baudrate = (20e6/divider)/arg; cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; slot_set_baudrate(cuart->u.asf4.slot_nr, baudrate); + case CUART_CTL_GET_BAUDRATE: + return cuart->u.asf4.current_baudrate; + break; + case CUART_CTL_GET_CLOCK_FREQ: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + return 20e6 / ncn8025_div_val[settings.clkdiv]; break; default: return -EINVAL; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I577907e6c60582a80666d43b17c20de4e03cc8df Gerrit-Change-Number: 16290 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:15 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:15 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart: fix etu calculation References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16291 ) Change subject: cuart: fix etu calculation ...................................................................... cuart: fix etu calculation Change-Id: Ib2f83654bdaae5090bb1dfd75e0906551d6b6aa7 --- M ccid_common/cuart.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/91/16291/1 diff --git a/ccid_common/cuart.c b/ccid_common/cuart.c index 9a68167..1ae50c6 100644 --- a/ccid_common/cuart.c +++ b/ccid_common/cuart.c @@ -29,8 +29,12 @@ /* obtain the current ETU in us */ static int get_etu_in_us(struct card_uart *cuart) { - /* FIXME: actually implement this based on the real baud rate */ - return (1000000/9600); + OSMO_ASSERT(cuart); + OSMO_ASSERT(cuart->driver); + OSMO_ASSERT(cuart->driver->ops); + OSMO_ASSERT(cuart->driver->ops->ctrl); + + return 1e6 / cuart->driver->ops->ctrl(cuart, CUART_CTL_GET_BAUDRATE, 0); } /* software waiting-time timer has expired */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib2f83654bdaae5090bb1dfd75e0906551d6b6aa7 Gerrit-Change-Number: 16291 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:15 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:15 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart cleanup References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16292 ) Change subject: cuart cleanup ...................................................................... cuart cleanup Change-Id: I15ea4d68263b62fca3da76795969358a07e7f1a6 --- M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 1 file changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/92/16292/1 diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index f12ed73..c7d29eb 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -161,8 +161,10 @@ * @param[in] baudrate baud rate in bps to set * @return if the baud rate has been set, else a parameter is out of range */ -static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) +static bool slot_set_baudrate(struct card_uart *cuart, uint32_t baudrate) { + uint8_t slotnr = cuart->u.asf4.slot_nr; + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); // calculate the error corresponding to the clock sources @@ -206,6 +208,8 @@ // update cached values cuart->u.asf4.current_baudrate = baudrate; + cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; + printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) usart_async_disable(slot); // disable SERCOM peripheral @@ -226,8 +230,10 @@ * @param[in] d baud rate adjustment factor D * @return if the baud rate has been set, else a parameter is out of range */ -static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) +static bool slot_set_isorate(struct card_uart *cuart, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) { + uint8_t slotnr = cuart->u.asf4.slot_nr; + // input checks ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { @@ -267,7 +273,7 @@ // set baud rate uint32_t baudrate = (freq * d) / f; // calculate actual baud rate - return slot_set_baudrate(slotnr, baudrate); // set baud rate + return slot_set_baudrate(cuart, baudrate); // set baud rate } /*********************************************************************** @@ -292,16 +298,13 @@ cuart->u.asf4.usa_pd = usa_pd; cuart->u.asf4.slot_nr = slot_nr; - /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ - cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); - usart_async_register_callback(usa_pd, USART_ASYNC_RXC_CB, SIM_rx_cb[slot_nr]); usart_async_register_callback(usa_pd, USART_ASYNC_TXC_CB, SIM_tx_cb[slot_nr]); usart_async_register_callback(usa_pd, USART_ASYNC_ERROR_CB, _SIM_error_cb); usart_async_enable(usa_pd); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) - slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + slot_set_isorate(cuart, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); return 0; } @@ -352,6 +355,7 @@ switch (ctl) { case CUART_CTL_NO_RXTX: + /* no op */ break; case CUART_CTL_RX: if (arg){ @@ -367,12 +371,8 @@ usart_async_flush_rx_buffer(cuart->u.asf4.usa_pd); break; case CUART_CTL_POWER: - /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ - cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); - - // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) - if(arg) - slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + /* reset everything */ + slot_set_isorate(cuart, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); ncn8025_get(cuart->u.asf4.slot_nr, &settings); settings.cmdvcc = arg ? true : false; @@ -405,8 +405,8 @@ ncn8025_get(cuart->u.asf4.slot_nr, &settings); uint8_t divider = ncn8025_div_val[settings.clkdiv]; uint32_t baudrate = (20e6/divider)/arg; - cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; - slot_set_baudrate(cuart->u.asf4.slot_nr, baudrate); + slot_set_baudrate(cuart, baudrate); + break; case CUART_CTL_GET_BAUDRATE: return cuart->u.asf4.current_baudrate; break; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I15ea4d68263b62fca3da76795969358a07e7f1a6 Gerrit-Change-Number: 16292 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:15 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:15 +0000 Subject: Change in osmo-ccid-firmware[master]: first attempt at rx timeout handling References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16293 ) Change subject: first attempt at rx timeout handling ...................................................................... first attempt at rx timeout handling The general idea is to provide hints to cuart so it can calculate a reasonable timeout value when receiving multiple bytes instead of having per-byte timeouts Change-Id: Ia6ad2d83cea48a8661ed2e4eb50f9bcb85218454 --- M ccid_common/cuart.c M ccid_common/cuart.h M ccid_common/iso7816_fsm.c 3 files changed, 143 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/93/16293/1 diff --git a/ccid_common/cuart.c b/ccid_common/cuart.c index 1ae50c6..1d777f9 100644 --- a/ccid_common/cuart.c +++ b/ccid_common/cuart.c @@ -49,7 +49,12 @@ { int secs, usecs; - usecs = get_etu_in_us(cuart) * cuart->wtime_etu; + if(!cuart->current_wtime_byte) + return; + + /* timemout is wtime * ETU + expected number of bytes * (12ETU+1 slack)ETU */ + usecs = get_etu_in_us(cuart) * cuart->wtime_etu + + get_etu_in_us(cuart) * cuart->current_wtime_byte * (12+1); if (usecs > 1000000) { secs = usecs / 1000000; usecs = usecs % 1000000; @@ -108,6 +113,15 @@ cuart->rx_enabled = arg ? true : false; if (!cuart->rx_enabled) osmo_timer_del(&cuart->wtime_tmr); +// else +// card_uart_wtime_restart(cuart); + break; + case CUART_CTL_RX_TIMER_HINT: + cuart->current_wtime_byte = arg; + if(arg) + card_uart_wtime_restart(cuart); + else + osmo_timer_del(&cuart->wtime_tmr); break; default: break; @@ -158,6 +172,12 @@ if (cuart->rx_after_tx_compl) card_uart_ctrl(cuart, CUART_CTL_RX, true); break; +// case CUART_E_RX_COMPLETE: +// osmo_timer_del(&cuart->wtime_tmr); +// break; +// case CUART_E_RX_SINGLE: +// card_uart_wtime_restart(cuart); +// break; default: break; } diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 6a782db..1df0c49 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -23,6 +23,7 @@ enum card_uart_ctl { CUART_CTL_RX, /* enable/disable receiver */ + CUART_CTL_RX_TIMER_HINT, /* tell cuart approximate number of rx bytes */ CUART_CTL_NO_RXTX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ @@ -78,6 +79,8 @@ uint32_t wtime_etu; struct osmo_timer_list wtime_tmr; + /* expected number of bytes, for timeout */ + uint32_t current_wtime_byte; /* driver-specific private data */ union { diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 44c8191..412bea7 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -68,14 +68,14 @@ * @note defined in ISO/IEC 7816-3:2006(E) section 9 */ enum pps_state { - PPS_S_TX_PPS_REQ, /*!< tx pps request */ - PPS_S_WAIT_PPSS, /*!< initial byte */ + PPS_S_PPS_REQ_INIT, /*!< tx pps request */ + PPS_S_TX_PPS_REQ, + PPS_S_WAIT_PPSX, /*!< initial byte */ PPS_S_WAIT_PPS0, /*!< format byte */ PPS_S_WAIT_PPS1, /*!< first parameter byte */ PPS_S_WAIT_PPS2, /*!< second parameter byte */ PPS_S_WAIT_PPS3, /*!< third parameter byte */ PPS_S_WAIT_PCK, /*!< check byte */ - PPS_S_WAIT_END, /*!< all done */ PPS_S_DONE }; @@ -219,9 +219,11 @@ struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); + /* go back to initial state in child FSMs */ osmo_fsm_inst_state_chg(ip->atr_fi, ATR_S_WAIT_TS, 0, 0); - osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_PPS_REQ_INIT, 0, 0); osmo_fsm_inst_state_chg(ip->tpdu_fi, TPDU_S_INIT, 0, 0); } @@ -235,8 +237,13 @@ case ISO7816_E_RESET_REL_IND: /* TOOD: this should happen before reset is released */ card_uart_ctrl(ip->uart, CUART_CTL_RX, true); - osmo_fsm_inst_state_chg_ms(fi, ISO7816_S_WAIT_ATR, - fi_cycles2ms(fi, 40000), T_WAIT_ATR); + + /* let's be reasonable here: the 40k cycle delay to ATR start is + * ~1.4ms @ 2.5Mhz/6720 baud, 1ETU = 372 cycles -> 40k/372=107/12ETU ~ 9 byte + * default timeout for rx is 9600 ETU, ATR might be missing the TCK + * so it might time out, so just add this delay */ + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 32+9); + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_ATR, 0, 0); break; case ISO7816_E_POWER_UP_IND: break; @@ -308,6 +315,7 @@ { struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); card_uart_ctrl(ip->uart, CUART_CTL_NO_RXTX, true); /* reset the TPDU state machine */ osmo_fsm_inst_dispatch(ip->tpdu_fi, ISO7816_E_TPDU_CLEAR_REQ, NULL); @@ -327,7 +335,7 @@ break; case ISO7816_E_XCEIVE_PPS_CMD: osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); - osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_PPS_REQ_INIT, 0, 0); osmo_fsm_inst_dispatch(ip->pps_fi, event, data); break; default: @@ -391,11 +399,13 @@ static void iso7816_3_s_wait_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); switch (event) { case ISO7816_E_TX_COMPL: /* Rx of single byte is already enabled by previous card_uart_tx() call */ osmo_fsm_inst_state_chg(fi, ISO7816_S_IN_PPS_RSP, 0, 0); + osmo_fsm_inst_dispatch(ip->pps_fi, event, data); break; default: OSMO_ASSERT(0); @@ -435,6 +445,7 @@ [ISO7816_S_RESET] = { .name = "RESET", .in_event_mask = S(ISO7816_E_RESET_REL_IND) | + S(ISO7816_E_POWER_UP_IND) | S(ISO7816_E_PPS_FAILED_IND)| S(ISO7816_E_TPDU_FAILED_IND), .out_state_mask = S(ISO7816_S_WAIT_ATR) | @@ -751,6 +762,14 @@ } } +static void atr_done_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); +} + static const struct osmo_fsm_state atr_states[] = { [ATR_S_WAIT_TS] = { .name = "WAIT_TS", @@ -847,7 +866,7 @@ .name = "DONE", .in_event_mask = 0, .out_state_mask = S(ATR_S_WAIT_TS), - //.action = atr_done_action, + .onenter = atr_done_onenter }, }; @@ -868,7 +887,7 @@ uint8_t pps0_recv; }; -static void pps_s_wait_ppss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +static void pps_s_pps_req_init_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) { struct pps_fsm_priv *atp = fi->priv; @@ -885,7 +904,7 @@ } } -static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +static void pps_s_pps_req_init_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct pps_fsm_priv *atp = fi->priv; struct osmo_fsm_inst *parent_fi = fi->proc.parent; @@ -896,7 +915,8 @@ switch (event) { case ISO7816_E_XCEIVE_PPS_CMD: - osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSS, 0, 0); + osmo_fsm_inst_state_chg(fi, PPS_S_TX_PPS_REQ, 0, 0); + card_uart_set_rx_threshold(ip->uart, 1); card_uart_tx(ip->uart, msgb_data(data), msgb_length(data), true); break; default: @@ -904,10 +924,29 @@ } } +static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + switch (event) { + case ISO7816_E_TX_COMPL: + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 6); + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSX, 0, 0); + break; + default: + OSMO_ASSERT(0); + } +} + + + + static void pps_wait_pX_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct pps_fsm_priv *atp = fi->priv; -// uint32_t guard_time_ms = atr_fi_gt_ms(fi); + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); uint8_t byte; switch (event) { @@ -916,7 +955,7 @@ LOGPFSML(fi, LOGL_DEBUG, "RX byte '%02x'\n", byte); msgb_put_u8(atp->rx_cmd, byte); switch (fi->state) { - case PPS_S_WAIT_PPSS: + case PPS_S_WAIT_PPSX: if (byte == 0xff) osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS0, 0, 0); break; @@ -960,7 +999,7 @@ uint8_t *pps_received = msgb_data(atp->rx_cmd); uint8_t *pps_sent = msgb_data(atp->tx_cmd); - osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_END, 0, 0); + osmo_fsm_inst_state_chg(fi, PPS_S_DONE, 0, 0); /* pps was successful if response equals request * rx buffer stays with the fsm, tx buffer gets handed back and freed @@ -982,6 +1021,7 @@ } break; case ISO7816_E_WTIME_EXP: + osmo_fsm_inst_state_chg(fi, PPS_S_DONE, 0, 0); /* FIXME: timeout handling if no pps supported ? */ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_RX_ERR_IND, NULL); break; @@ -991,22 +1031,37 @@ } +static void pps_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); +} + + static const struct osmo_fsm_state pps_states[] = { - [PPS_S_TX_PPS_REQ] = { - .name = "TX_PPS_REQ", + [PPS_S_PPS_REQ_INIT] = { + .name = "INIT", .in_event_mask = S(ISO7816_E_XCEIVE_PPS_CMD) | S(ISO7816_E_WTIME_EXP), - .out_state_mask = S(PPS_S_TX_PPS_REQ) | - S(PPS_S_WAIT_PPSS), - .action = pps_s_tx_pps_req_action, - .onenter = pps_s_wait_ppss_onenter, + .out_state_mask = S(PPS_S_PPS_REQ_INIT) | + S(PPS_S_TX_PPS_REQ), + .action = pps_s_pps_req_init_action, + .onenter = pps_s_pps_req_init_onenter, }, - [PPS_S_WAIT_PPSS] = { + [PPS_S_TX_PPS_REQ] = { + .name = "TX_PPS_REQ", + .in_event_mask = S(ISO7816_E_TX_COMPL), + .out_state_mask = S(PPS_S_WAIT_PPSX), + .action = pps_s_tx_pps_req_action, + }, + [PPS_S_WAIT_PPSX] = { .name = "WAIT_PPSS", .in_event_mask = S(ISO7816_E_RX_SINGLE) | S(ISO7816_E_WTIME_EXP), .out_state_mask = S(PPS_S_WAIT_PPS0) | - S(PPS_S_WAIT_PPSS), + S(PPS_S_WAIT_PPSX), .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS0] = { @@ -1047,14 +1102,15 @@ .name = "WAIT_PCK", .in_event_mask = S(ISO7816_E_RX_SINGLE) | S(ISO7816_E_WTIME_EXP), - .out_state_mask = S(PPS_S_WAIT_END), + .out_state_mask = S(PPS_S_DONE), .action = pps_wait_pX_action, }, - [PPS_S_WAIT_END] = { - .name = "WAIT_END", + [PPS_S_DONE] = { + .name = "DONE", .in_event_mask = 0, - .out_state_mask = S(PPS_S_TX_PPS_REQ) | - S(PPS_S_WAIT_PPSS), + .out_state_mask = S(PPS_S_PPS_REQ_INIT), + .action = NULL, + .onenter = pps_s_done_onenter, }, }; @@ -1140,9 +1196,14 @@ #include static void tpdu_s_tx_hdr_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); OSMO_ASSERT(fi->fsm == &tpdu_fsm); switch (event) { case ISO7816_E_TX_COMPL: + + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); /* Rx of single byte is already enabled by previous card_uart_tx() call */ osmo_fsm_inst_state_chg(fi, TPDU_S_PROCEDURE, 0, 0); break; @@ -1167,11 +1228,15 @@ LOGPFSML(fi, LOGL_DEBUG, "Received 0x%02x from UART\n", byte); if (byte == 0x60) { /* NULL: wait for another procedure byte */ + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_PROCEDURE, 0, 0); } else if ((byte >= 0x60 && byte <= 0x6f) || (byte >= 0x90 && byte <= 0x9f)) { //msgb_apdu_sw(tfp->apdu) = byte << 8; msgb_put(tfp->tpdu, byte); /* receive second SW byte (SW2) */ + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW2, 0, 0); break; } else if (byte == tpduh->ins) { @@ -1187,6 +1252,7 @@ osmo_fsm_inst_state_chg(fi, TPDU_S_TX_REMAINING, 0, 0); } else { card_uart_set_rx_threshold(ip->uart, tpduh->p3); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, tpduh->p3); osmo_fsm_inst_state_chg(fi, TPDU_S_RX_REMAINING, 0, 0); } } else if (byte == (tpduh->ins ^ 0xFF)) { @@ -1197,6 +1263,8 @@ card_uart_tx(ip->uart, msgb_l3(tfp->tpdu), 1, false); osmo_fsm_inst_state_chg(fi, TPDU_S_TX_SINGLE, 0, 0); } else { + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_RX_SINGLE, 0, 0); } } else @@ -1216,6 +1284,7 @@ switch (event) { case ISO7816_E_TX_COMPL: card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW1, 0, 0); break; default: @@ -1227,10 +1296,14 @@ static void tpdu_s_tx_single_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); switch (event) { case ISO7816_E_TX_COMPL: tfp->tpdu->l3h += 1; + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); if (msgb_l3len(tfp->tpdu)) osmo_fsm_inst_state_chg(fi, TPDU_S_PROCEDURE, 0, 0); else @@ -1261,6 +1334,7 @@ msgb_l2len(tfp->tpdu)); } card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW1, 0, 0); break; default: @@ -1273,6 +1347,8 @@ { struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); struct osim_apdu_cmd_hdr *tpduh = msgb_tpdu_hdr(tfp->tpdu); + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); uint8_t byte; switch (event) { @@ -1280,6 +1356,10 @@ byte = get_rx_byte_evt(fi->proc.parent, data); LOGPFSML(fi, LOGL_DEBUG, "Received 0x%02x from UART\n", byte); msgb_put_u8(tfp->tpdu, byte); + + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); + /* determine if number of expected bytes received */ if (msgb_l2len(tfp->tpdu) == tpduh->p3) osmo_fsm_inst_state_chg(fi, TPDU_S_SW1, 0, 0); @@ -1306,6 +1386,7 @@ //msgb_apdu_sw(tfp->apdu) = byte << 8; msgb_put_u8(tfp->tpdu, byte); card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW2, 0, 0); break; default: @@ -1349,7 +1430,7 @@ case ISO7816_E_TX_ERR_IND: /* FIXME: handle this in some different way */ osmo_fsm_inst_state_chg(fi, TPDU_S_DONE, 0, 0); - osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_DONE_IND, NULL); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, NULL); break; case ISO7816_E_TPDU_CLEAR_REQ: osmo_fsm_inst_state_chg(fi, TPDU_S_INIT, 0, 0); @@ -1357,6 +1438,15 @@ } } + +static void tpdu_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); +} + static const struct osmo_fsm_state tpdu_states[] = { [TPDU_S_INIT] = { .name = "INIT", @@ -1433,6 +1523,7 @@ .in_event_mask = 0, .out_state_mask = S(TPDU_S_INIT), .action = NULL, + .onenter = tpdu_s_done_onenter, }, }; static struct osmo_fsm tpdu_fsm = { -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia6ad2d83cea48a8661ed2e4eb50f9bcb85218454 Gerrit-Change-Number: 16293 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:16 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:16 +0000 Subject: Change in osmo-ccid-firmware[master]: enable the final slot References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16294 ) Change subject: enable the final slot ...................................................................... enable the final slot The debug uart is shared with slot 7, so in order to use sim slot 7 the pin config and the uart config needs to be changed. Going back to using the debug uart works by defining ENABLE_DBG_UART7 Change-Id: I8f3c7c60306941159c35307a5c1e38c2a2bd2fe1 --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/atmel_start_pins.h M sysmoOCTSIM/command.c M sysmoOCTSIM/config/hpl_sercom_config.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/driver_init.h M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c D sysmoOCTSIM/manual_test.c M sysmoOCTSIM/stdio_start.c 12 files changed, 353 insertions(+), 264 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/94/16294/1 diff --git a/sysmoOCTSIM/atmel_start.c b/sysmoOCTSIM/atmel_start.c index 6670364..931a09a 100644 --- a/sysmoOCTSIM/atmel_start.c +++ b/sysmoOCTSIM/atmel_start.c @@ -14,6 +14,8 @@ system_init(); dma_memory_init(); dma_memory_register_callback(DMA_MEMORY_COMPLETE_CB, M2M_DMA_complete_cb); -// stdio_redirect_init(); +#ifdef ENABLE_DBG_UART7 + stdio_redirect_init(); +#endif usb_init(); } diff --git a/sysmoOCTSIM/atmel_start_pins.h b/sysmoOCTSIM/atmel_start_pins.h index 7cbaed5..0c33536 100644 --- a/sysmoOCTSIM/atmel_start_pins.h +++ b/sysmoOCTSIM/atmel_start_pins.h @@ -60,6 +60,7 @@ #define SWITCH GPIO(GPIO_PORTC, 14) #define MUX_STAT GPIO(GPIO_PORTC, 15) #define SIM6_IO GPIO(GPIO_PORTC, 16) +#define SIM7_IO GPIO(GPIO_PORTB, 21) #define USER_LED GPIO(GPIO_PORTC, 26) #define SCL4 GPIO(GPIO_PORTC, 27) #define SDA4 GPIO(GPIO_PORTC, 28) diff --git a/sysmoOCTSIM/command.c b/sysmoOCTSIM/command.c index 454cd2f..48d8c11 100644 --- a/sysmoOCTSIM/command.c +++ b/sysmoOCTSIM/command.c @@ -78,6 +78,7 @@ void command_try_recv(void) { +#ifdef ENABLE_DBG_UART7 unsigned int i = 0; /* yield CPU after maximum of 10 received characters */ @@ -101,6 +102,7 @@ i++; } +#endif } void command_init(const char *prompt) diff --git a/sysmoOCTSIM/config/hpl_sercom_config.h b/sysmoOCTSIM/config/hpl_sercom_config.h index bb2bbff..86b4c0a 100644 --- a/sysmoOCTSIM/config/hpl_sercom_config.h +++ b/sysmoOCTSIM/config/hpl_sercom_config.h @@ -1910,6 +1910,8 @@ #include +#ifdef ENABLE_DBG_UART7 + #ifndef CONF_SERCOM_7_USART_ENABLE #define CONF_SERCOM_7_USART_ENABLE 1 #endif @@ -2176,7 +2178,281 @@ #define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 #endif #endif +#else +#include + +#ifndef CONF_SERCOM_7_USART_ENABLE +#define CONF_SERCOM_7_USART_ENABLE 1 +#endif + +// Basic Configuration + +// Receive buffer enable +// Enable input buffer in SERCOM module +// usart_rx_enable +#ifndef CONF_SERCOM_7_USART_RXEN +#define CONF_SERCOM_7_USART_RXEN 1 +#endif + +// Transmitt buffer enable +// Enable output buffer in SERCOM module +// usart_tx_enable +#ifndef CONF_SERCOM_7_USART_TXEN +#define CONF_SERCOM_7_USART_TXEN 1 +#endif + +// Frame parity +// <0x1=>Even parity +// Parity bit mode for USART frame +// usart_parity +#ifndef CONF_SERCOM_7_USART_PARITY +#define CONF_SERCOM_7_USART_PARITY 1 +#endif + +// Character Size +// <0x0=>8 bits +// <0x1=>9 bits +// <0x5=>5 bits +// <0x6=>6 bits +// <0x7=>7 bits +// Data character size in USART frame +// usart_character_size +#ifndef CONF_SERCOM_7_USART_CHSIZE +#define CONF_SERCOM_7_USART_CHSIZE 0x0 +#endif + +// Stop Bit +// <0=>One stop bit +// <1=>Two stop bits +// Number of stop bits in USART frame +// usart_stop_bit +#ifndef CONF_SERCOM_7_USART_SBMODE +#define CONF_SERCOM_7_USART_SBMODE 1 +#endif + +// Baud rate <1-3000000> +// USART baud rate setting +// usart_baud_rate +#ifndef CONF_SERCOM_7_USART_BAUD +#define CONF_SERCOM_7_USART_BAUD 6720 +#endif +// + +// ISO7816 configuration +// ISO7816 Protocol Type +// <0x1=> T=0 +// <0x0=> T=1 +// Define ISO7816 protocol type as 0. +// usart_iso7816_type +#ifndef CONF_SERCOM_7_USART_ISO7816_PROTOCOL_T +#define CONF_SERCOM_7_USART_ISO7816_PROTOCOL_T 0x0 +#endif + +// ISO7816 Inhibit Not Acknowledge +// <0x0=> NACK is transmitted when a parity error is received. +// <0x1=> NACK is not transmitted when a parity error is received. +// Define whether a NACK is transmitted when a parity error is received. +// usart_inack +#ifndef CONF_SERCOM_7_USART_INACK +#define CONF_SERCOM_7_USART_INACK 0x0 +#endif + +// ISO7816 Disable Successive Not Acknowledge +// <0x0=> The successive receive NACK is disable. +// <0x1=> The successive receive NACK is enable. +// Define whether NACK will be sent on parity error reception. +// usart_dsnack +#ifndef CONF_SERCOM_7_USART_DSNACK +#define CONF_SERCOM_7_USART_DSNACK 0x0 +#endif + +// ISO7816 Maximum Iterations<0-7> +// Define the maximum number of retransmit iterations. +// usart_maxiter +#ifndef CONF_SERCOM_7_USART_MAXITER +#define CONF_SERCOM_7_USART_MAXITER 0x7 +#endif + +// ISO7816 Guard Time +// <0x2=> 2-bit times +// <0x3=> 3-bit times +// <0x4=> 4-bit times +// <0x5=> 5-bit times +// <0x6=> 6-bit times +// <0x7=> 7-bit times +// Define the guard time. +// usart_gtime +#ifndef CONF_SERCOM_7_USART_GTIME +#define CONF_SERCOM_7_USART_GTIME 0x2 +#endif + +// Inverse transmission and reception enabled +// Define inverse transmission and reception enabled. +// usart_inverse_enabled +#ifndef CONF_SERCOM_7_USART_INVERSE_ENABLED +#define CONF_SERCOM_7_USART_INVERSE_ENABLED 0x0 +#endif + +#if (CONF_SERCOM_7_USART_INVERSE_ENABLED == 1) +#define CONF_SERCOM_7_USART_RXINV 0x1 +#define CONF_SERCOM_7_USART_TXINV 0x1 +#else +#define CONF_SERCOM_7_USART_RXINV 0x0 +#define CONF_SERCOM_7_USART_TXINV 0x0 +#endif + +// + +// Advanced configuration +// usart_advanced +#ifndef CONF_SERCOM_7_USART_ADVANCED_CONFIG +#define CONF_SERCOM_7_USART_ADVANCED_CONFIG 0 +#endif + +// Run in stand-by +// Keep the module running in standby sleep mode +// usart_arch_runstdby +#ifndef CONF_SERCOM_7_USART_RUNSTDBY +#define CONF_SERCOM_7_USART_RUNSTDBY 0 +#endif + +// Immediate Buffer Overflow Notification +// Controls when the BUFOVF status bit is asserted +// usart_arch_ibon +#ifndef CONF_SERCOM_7_USART_IBON +#define CONF_SERCOM_7_USART_IBON 0 +#endif + +// Start of Frame Detection Enable +// Will wake the device from any sleep mode if usart_init and usart_enable was run priort to going to sleep. (receive buffer must be enabled) +// usart_arch_sfde +#ifndef CONF_SERCOM_7_USART_SFDE +#define CONF_SERCOM_7_USART_SFDE 0 +#endif + +// Collision Detection Enable +// Collision detection enable +// usart_arch_cloden +#ifndef CONF_SERCOM_7_USART_CLODEN +#define CONF_SERCOM_7_USART_CLODEN 0 +#endif + +// Operating Mode +// <0x1=>USART with internal clock +// Drive the shift register by an internal clock generated by the baud rate generator. +// usart_arch_clock_mode +#ifndef CONF_SERCOM_7_USART_MODE +#define CONF_SERCOM_7_USART_MODE 0x1 +#endif + +// Data Order +// <0=>MSB is transmitted first +// <1=>LSB is transmitted first +// Data order of the data bits in the frame +// usart_arch_dord +#ifndef CONF_SERCOM_7_USART_DORD +#define CONF_SERCOM_7_USART_DORD 1 +#endif + +// Debug Stop Mode +// Behavior of the baud-rate generator when CPU is halted by external debugger. +// <0=>Keep running +// <1=>Halt +// usart_arch_dbgstop +#ifndef CONF_SERCOM_7_USART_DEBUG_STOP_MODE +#define CONF_SERCOM_7_USART_DEBUG_STOP_MODE 0 +#endif + +// Does not do anything in USRT mode +#define CONF_SERCOM_7_USART_SAMPR 0x0 +#define CONF_SERCOM_7_USART_SAMPA 0x0 +#define CONF_SERCOM_7_USART_FRACTIONAL 0x0 + +// Does not do anything in UART mode +#define CONF_SERCOM_7_USART_CPOL 0 + +// Does not do anything in USRT mode +#define CONF_SERCOM_7_USART_ENC 0 + +// + +#ifndef CONF_SERCOM_7_USART_CMODE +#define CONF_SERCOM_7_USART_CMODE CONF_SERCOM_7_USART_ISO7816_PROTOCOL_T +#endif + +/* RX is on PIN_PC16 */ +#ifndef CONF_SERCOM_7_USART_RXPO +#define CONF_SERCOM_7_USART_RXPO 0 +#endif + +/* TX uses the same pin with RX */ +#ifndef CONF_SERCOM_7_USART_TXPO +#define CONF_SERCOM_7_USART_TXPO 2 +#endif + +/* Set iso7816 mode */ +#define CONF_SERCOM_7_USART_PMODE (CONF_SERCOM_7_USART_PARITY - 1) +#define CONF_SERCOM_7_USART_FORM 7 + +#if CONF_SERCOM_7_USART_CMODE == 0 +// Calculate BAUD register value in UART mode +#if CONF_SERCOM_7_USART_SAMPR == 0 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + 65536 - ((65536 * 16.0f * CONF_SERCOM_7_USART_BAUD) / CONF_GCLK_SERCOM7_CORE_FREQUENCY) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 1 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + ((CONF_GCLK_SERCOM7_CORE_FREQUENCY) / (CONF_SERCOM_7_USART_BAUD * 16)) - (CONF_SERCOM_7_USART_FRACTIONAL / 8) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 2 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + 65536 - ((65536 * 8.0f * CONF_SERCOM_7_USART_BAUD) / CONF_GCLK_SERCOM7_CORE_FREQUENCY) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 3 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + ((CONF_GCLK_SERCOM7_CORE_FREQUENCY) / (CONF_SERCOM_7_USART_BAUD * 8)) - (CONF_SERCOM_7_USART_FRACTIONAL / 8) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 4 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + 65536 - ((65536 * 3.0f * CONF_SERCOM_7_USART_BAUD) / CONF_GCLK_SERCOM7_CORE_FREQUENCY) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#endif + +#elif CONF_SERCOM_7_USART_CMODE == 1 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +// Calculate BAUD register value in USRT mode +#define CONF_SERCOM_7_USART_BAUD_RATE (CONF_GCLK_SERCOM7_CORE_FREQUENCY) / (2 * CONF_SERCOM_7_USART_BAUD) - 1 +#endif + +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#else +#error CMODE value for SERCOM 7 in USART mode not known +#endif + +#endif // <<< end of configuration section >>> #endif // HPL_SERCOM_CONFIG_H diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index c7d29eb..87f5123 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -13,7 +13,11 @@ #include "cuart.h" +#ifndef ENABLE_DBG_UART7 +static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, &SIM7}; +#else static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; +#endif extern struct card_uart *cuart4slot_nr(uint8_t slot_nr); diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index 7071ea5..1cfd8cf 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -33,7 +33,11 @@ #define SIM6_BUFFER_SIZE 512 /*! The buffer size for USART */ +#ifdef ENABLE_DBG_UART7 #define UART_DEBUG_BUFFER_SIZE 4096 +#else +#define SIM7_BUFFER_SIZE 512 +#endif struct usart_async_descriptor SIM0; struct usart_async_descriptor SIM1; @@ -42,6 +46,9 @@ struct usart_async_descriptor SIM4; struct usart_async_descriptor SIM5; struct usart_async_descriptor SIM6; +#ifndef ENABLE_DBG_UART7 +struct usart_async_descriptor SIM7; +#endif static uint8_t SIM0_buffer[SIM0_BUFFER_SIZE]; static uint8_t SIM1_buffer[SIM1_BUFFER_SIZE]; @@ -50,12 +57,14 @@ static uint8_t SIM4_buffer[SIM4_BUFFER_SIZE]; static uint8_t SIM5_buffer[SIM5_BUFFER_SIZE]; static uint8_t SIM6_buffer[SIM6_BUFFER_SIZE]; - +#ifndef ENABLE_DBG_UART7 +static uint8_t SIM7_buffer[SIM7_BUFFER_SIZE]; +#else struct usart_async_rings_descriptor UART_debug; -struct calendar_descriptor CALENDAR_0; - static uint8_t UART_DEBUG_buffer_rx[UART_DEBUG_BUFFER_SIZE]; static uint8_t UART_DEBUG_buffer_tx[UART_DEBUG_BUFFER_SIZE]; +#endif +struct calendar_descriptor CALENDAR_0; void CALENDAR_0_CLOCK_init(void) { @@ -327,6 +336,7 @@ SIM6_PORT_init(); } +#ifdef ENABLE_DBG_UART7 /** * \brief USART Clock initialization function * @@ -365,7 +375,44 @@ usart_async_rings_init(&UART_debug, SERCOM7, UART_DEBUG_buffer_rx, UART_DEBUG_BUFFER_SIZE, UART_DEBUG_buffer_tx, UART_DEBUG_BUFFER_SIZE, (void *)NULL); UART_debug_PORT_init(); } +#else +/** + * \brief USART Clock initialization function + * + * Enables register interface and peripheral clock + */ +void SIM7_CLOCK_init() +{ + hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM7_GCLK_ID_CORE, CONF_GCLK_SERCOM7_CORE_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); + hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM7_GCLK_ID_SLOW, CONF_GCLK_SERCOM7_SLOW_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); + + hri_mclk_set_APBDMASK_SERCOM7_bit(MCLK); +} + +/** + * \brief USART pinmux initialization function + * + * Set each required pin to USART functionality + */ +void SIM7_PORT_init() +{ + + gpio_set_pin_function(SIM7_IO, PINMUX_PB21D_SERCOM7_PAD0); +} + +/** + * \brief USART initialization function + * + * Enables USART peripheral, clocks and initializes USART driver + */ +void SIM7_init(void) +{ + SIM7_CLOCK_init(); + usart_async_init(&SIM7, SERCOM7, SIM7_buffer, SIM7_BUFFER_SIZE, (void *)NULL); + SIM7_PORT_init(); +} +#endif void USB_DEVICE_INSTANCE_PORT_init(void) { @@ -923,8 +970,11 @@ SIM4_init(); SIM5_init(); SIM6_init(); - +#ifndef ENABLE_DBG_UART7 + SIM7_init(); +#else UART_debug_init(); +#endif USB_DEVICE_INSTANCE_init(); } diff --git a/sysmoOCTSIM/driver_init.h b/sysmoOCTSIM/driver_init.h index de5e441..f9d23b7 100644 --- a/sysmoOCTSIM/driver_init.h +++ b/sysmoOCTSIM/driver_init.h @@ -36,7 +36,11 @@ extern struct usart_async_descriptor SIM4; extern struct usart_async_descriptor SIM5; extern struct usart_async_descriptor SIM6; +#ifdef ENABLE_DBG_UART7 extern struct usart_async_rings_descriptor UART_debug; +#else +extern struct usart_async_descriptor SIM7; +#endif void CALENDAR_0_CLOCK_init(void); void CALENDAR_0_init(void); @@ -69,6 +73,10 @@ void SIM6_CLOCK_init(void); void SIM6_init(void); +void SIM7_PORT_init(void); +void SIM7_CLOCK_init(void); +void SIM7_init(void); + void UART_debug_PORT_init(void); void UART_debug_CLOCK_init(void); void UART_debug_init(void); diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 95a582f..7a37036 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -126,7 +126,6 @@ i2c_bitbang.o \ libosmo_emb.o \ main.o \ - manual_test.o \ ncn8025.o \ octsim_i2c.o \ stdio_redirect/gcc/read.o \ diff --git a/sysmoOCTSIM/libosmo_emb.c b/sysmoOCTSIM/libosmo_emb.c index a12c490..81b29e3 100644 --- a/sysmoOCTSIM/libosmo_emb.c +++ b/sysmoOCTSIM/libosmo_emb.c @@ -157,7 +157,7 @@ #endif /* logging */ log_init(&log_info, g_tall_ctx); -#if 0 +#ifdef ENABLE_DBG_UART7 stderr_target = log_target_create_stderr_raw(); log_add_target(stderr_target); log_set_all_filter(stderr_target, 1); diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index c73b715..e3d7034 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -435,7 +435,7 @@ //####################### -#define NUM_OUT_BUF 7 +#define NUM_OUT_BUF 16 int main(void) { @@ -529,7 +529,7 @@ command_try_recv(); poll_card_detect(); submit_next_irq(); - for (int i = 0; i < usb_fs_descs.ccid.class.bMaxSlotIndex; i++){ + for (int i = 0; i <= usb_fs_descs.ccid.class.bMaxSlotIndex; i++){ g_ci.slot_ops->handle_fsm_events(&g_ci.slot[i], true); } feed_ccid(); diff --git a/sysmoOCTSIM/manual_test.c b/sysmoOCTSIM/manual_test.c deleted file mode 100644 index d6852bc..0000000 --- a/sysmoOCTSIM/manual_test.c +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright (C) 2019 Harald Welte - * - * This program is free software; you can redistribute it and/or - * modify 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 "atmel_start.h" -#include "atmel_start_pins.h" - -#include "i2c_bitbang.h" -#include "octsim_i2c.h" -#include "ncn8025.h" - -#include "command.h" - -enum testmode_test { - TEST_USER_LED, - /* test the per-slot LED by blinking it shortly */ - TEST_LED, - /* test the voltages of the SIMVCC */ - TEST_VOLTAGE, - /* test the clock rates of the SIMCLK pin */ - TEST_CLOCK, - /* test the RST line by asserting it low and then back high */ - TEST_RST, - /* test the RST line by asserting it low and then back high */ - TEST_IO, - _NUM_TESTS -}; -static const char *test_names[_NUM_TESTS] = { - [TEST_USER_LED] = "USER_LED", - [TEST_LED] = "LED", - [TEST_VOLTAGE] = "VOLTAGE", - [TEST_CLOCK] = "CLOCK", - [TEST_RST] = "RST", - [TEST_IO] = "IO", -}; - -struct testmode_state { - uint8_t slot; - enum testmode_test test_nr; - int test_int; - struct ncn8025_settings ncn; -}; -static struct testmode_state g_tms; - -#define BLINK_MS 500 - -static void set_slot(uint8_t slot) -{ - printf("changing slot to %u\r\n", slot); - g_tms.slot = slot; - g_tms.ncn = (struct ncn8025_settings) { - .rstin = false, - .cmdvcc = false, - .led = false, - .clkdiv = SIM_CLKDIV_8, - .vsel = SIM_VOLT_3V0, - }; - ncn8025_set(g_tms.slot, &g_tms.ncn); - ncn8025_get(g_tms.slot, &g_tms.ncn); -} - -static void next_test(void) -{ - g_tms.test_nr = (g_tms.test_nr + 1) % _NUM_TESTS; - g_tms.test_int = 0; - printf("changing test to %s\r\n", test_names[g_tms.test_nr]); -} - -static void test_user_led(void) -{ - printf("blinking User LED\r\n"); - - gpio_set_pin_function(PIN_PC26, GPIO_PIN_FUNCTION_OFF); - gpio_set_pin_direction(PIN_PC26, GPIO_DIRECTION_OUT); - gpio_set_pin_level(PIN_PC26, true); - delay_ms(BLINK_MS); - gpio_set_pin_level(PIN_PC26, false); -} - -static void test_led(void) -{ - printf("blinking Slot LED\r\n"); - - g_tms.ncn.led = true; - ncn8025_set(g_tms.slot, &g_tms.ncn); - delay_ms(BLINK_MS); - g_tms.ncn.led = false; - ncn8025_set(g_tms.slot, &g_tms.ncn); -} - -static enum ncn8025_sim_voltage voltage[3] = { SIM_VOLT_1V8, SIM_VOLT_3V0, SIM_VOLT_5V0 }; -static const char *voltage_name[3] = { "1.8", "3.0", "5.0" }; - -static void ncn_change_voltage(enum ncn8025_sim_voltage vsel) -{ - /* first disable the output; VSEL changes require output to be disabled */ - g_tms.ncn.cmdvcc = false; - ncn8025_set(g_tms.slot, &g_tms.ncn); - - /* then re-enable it with the new voltage setting */ - g_tms.ncn.vsel = vsel; - g_tms.ncn.cmdvcc = true; - ncn8025_set(g_tms.slot, &g_tms.ncn); -} - -static void test_voltage(void) -{ - printf("Testing Voltage %s\r\n", voltage_name[g_tms.test_int]); - - ncn_change_voltage(voltage[g_tms.test_int]); - g_tms.test_int = (g_tms.test_int+1) % 3; -} - -static enum ncn8025_sim_clkdiv clk_div[4] = { SIM_CLKDIV_8, SIM_CLKDIV_4, SIM_CLKDIV_2, SIM_CLKDIV_1 }; -static const uint8_t clk_div_val[4] = { 8, 4, 2, 1 }; - -static void test_clock(void) -{ - printf("Testing Clock Divider %u\r\n", clk_div_val[g_tms.test_int]); - g_tms.ncn.cmdvcc = true; - g_tms.ncn.clkdiv = clk_div[g_tms.test_int]; - ncn8025_set(g_tms.slot, &g_tms.ncn); - g_tms.test_int = (g_tms.test_int+1) % 4; -} - -static void test_rst(void) -{ - printf("blinking RST\r\n"); - - /* well-defined voltage for LED brightness */ - ncn_change_voltage(SIM_VOLT_3V0); - - g_tms.ncn.cmdvcc = true; - g_tms.ncn.rstin = true; - ncn8025_set(g_tms.slot, &g_tms.ncn); - - delay_ms(BLINK_MS); - - g_tms.ncn.rstin = false; - ncn8025_set(g_tms.slot, &g_tms.ncn); -} - -#ifndef SIM7_IO -#define SIM7_IO PIN_PB21 -#endif -static const enum gpio_port sim_io_gpio[] = { SIM0_IO, SIM1_IO, SIM2_IO, SIM3_IO, - SIM4_IO, SIM5_IO, SIM6_IO, SIM7_IO }; - -static void test_io(void) -{ - enum gpio_port gpio = sim_io_gpio[g_tms.slot]; - printf("blinking I/O\r\n"); - - /* well-defined voltage for LED brightness */ - ncn_change_voltage(SIM_VOLT_3V0); - - gpio_set_pin_function(gpio, GPIO_PIN_FUNCTION_OFF); - gpio_set_pin_direction(gpio, GPIO_DIRECTION_OUT); - gpio_set_pin_level(gpio, false); - delay_ms(BLINK_MS); - gpio_set_pin_level(gpio, true); - - /* FIXME: restore tack to original function! */ - //gpio_set_pin_function(sim_io_gpio[g_tms.slot], GPIO_PIN_FUNCTION_OFF); -} - -typedef void (*test_fn)(void); -static const test_fn test_functions[_NUM_TESTS] = { - [TEST_USER_LED] = test_user_led, - [TEST_LED] = test_led, - [TEST_VOLTAGE] = test_voltage, - [TEST_CLOCK] = test_clock, - [TEST_RST] = test_rst, - [TEST_IO] = test_io, -}; - -static void execute_test(void) -{ - printf("(%u) %-10s: ", g_tms.slot, test_names[g_tms.test_nr]); - test_functions[g_tms.test_nr](); -} - -static int wait_for_key_and_process(void) -{ - int c; - - do { - } while (!usart_async_rings_is_rx_not_empty(&UART_debug)); - - c = getchar(); - if (c < 0) - return -1; - - switch (c) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - set_slot(c - '0'); - execute_test(); - break; - case 'n': - case 'N': - next_test(); - execute_test(); - break; - case 'Q': - case 'q': - printf("Leaving Test Mode\r\n"); - return -1; - case ' ': - execute_test(); - break; - } - return 0; -} - -DEFUN(testmode_fn, cmd_testmode, - "testmode", "Enter board testing mode (Use `Q` to exit)") -{ - printf("Manual test mode. 'Q': exit, 'N': next test, SPACE: re-run, '0'-'7': slot\r\n"); - - printf("SPACE will start the current test (%s)\r\n", test_names[g_tms.test_nr]); - while (1) { - if (wait_for_key_and_process() < 0) - break; - } -} - -void testmode_init(void) -{ - command_register(&cmd_testmode); -} diff --git a/sysmoOCTSIM/stdio_start.c b/sysmoOCTSIM/stdio_start.c index 8a15c88..63e125d 100644 --- a/sysmoOCTSIM/stdio_start.c +++ b/sysmoOCTSIM/stdio_start.c @@ -9,6 +9,7 @@ #include "atmel_start.h" #include "stdio_start.h" +#ifdef ENABLE_DBG_UART7 static void UART_debug_rx_cb(const struct usart_async_rings_descriptor *const io_descr) { } @@ -19,3 +20,4 @@ usart_async_rings_enable(&UART_debug); stdio_io_init(&UART_debug.io); } +#endif -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I8f3c7c60306941159c35307a5c1e38c2a2bd2fe1 Gerrit-Change-Number: 16294 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-CC: Jenkins Builder Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:44:16 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Wed, 27 Nov 2019 18:44:16 +0000 Subject: Change in osmo-ccid-firmware[master]: prettier slot bitmask code References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 ) Change subject: prettier slot bitmask code ...................................................................... prettier slot bitmask code Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2 --- M sysmoOCTSIM/main.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/95/16295/1 diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index e3d7034..07c5af8 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -273,8 +273,8 @@ for(int i = 0; i <8; i++) { uint8_t byteidx = i >> 2; - uint8_t old_bit = old_bm & (1 << i); - uint8_t new_bit = new_bm & (1 << i); + uint8_t old_bit = (old_bm >> i) & 1; + uint8_t new_bit = (new_bm >> i) & 1; uint8_t bv; if (old_bit == new_bit && new_bit == 0) bv = 0x00; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2 Gerrit-Change-Number: 16295 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-CC: Jenkins Builder Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:57:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 18:57:53 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: attempt to use iso7816_fsm + Cuart from firmware In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16263 ) Change subject: WIP: attempt to use iso7816_fsm + Cuart from firmware ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9d65428edbd3e6c978024a255a65d4531f556f62 Gerrit-Change-Number: 16263 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 18:57:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:58:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 18:58:39 +0000 Subject: Change in osmo-ccid-firmware[master]: don't wait for TCK if card only supports T0 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 ) Change subject: don't wait for TCK if card only supports T0 ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264/1//COMMIT_MSG at 7 PS1, Line 7: don't wait for TCK if card only supports T0 is that stated in the spec? If so, it might be useful to state this here. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add Gerrit-Change-Number: 16264 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 18:58:39 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:59:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 18:59:08 +0000 Subject: Change in osmo-ccid-firmware[master]: sercom config for t1 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 ) Change subject: sercom config for t1 ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265/1//COMMIT_MSG at 9 PS1, Line 9: t0 doesn't work it would be good to have a statement about what doesn't work, or what kind of observations have been made. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 Gerrit-Change-Number: 16265 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 18:59:08 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 18:59:39 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 18:59:39 +0000 Subject: Change in osmo-ccid-firmware[master]: split usb descriptor code In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16266 ) Change subject: split usb descriptor code ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9eb3606cfbaecf81f7ae80a9ea3d061a39088760 Gerrit-Change-Number: 16266 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 18:59:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:00:20 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:00:20 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the uart ring buffer size In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 ) Change subject: increase the uart ring buffer size ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c Gerrit-Change-Number: 16268 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:00:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:00:34 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:00:34 +0000 Subject: Change in osmo-ccid-firmware[master]: talloc asserts In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 ) Change subject: talloc asserts ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99 Gerrit-Change-Number: 16269 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:00:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:00:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:00:53 +0000 Subject: Change in osmo-ccid-firmware[master]: no logging, no memory pool In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 ) Change subject: no logging, no memory pool ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca Gerrit-Change-Number: 16270 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:00:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:01:01 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:01:01 +0000 Subject: Change in osmo-ccid-firmware[master]: prevent uart interrupts before having proper structs In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 ) Change subject: prevent uart interrupts before having proper structs ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e Gerrit-Change-Number: 16271 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:01:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:01:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:01:16 +0000 Subject: Change in osmo-ccid-firmware[master]: move iso7816_3 to common dir In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 ) Change subject: move iso7816_3 to common dir ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92 Gerrit-Change-Number: 16272 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:01:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:01:34 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:01:34 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart icc clock freq and divider setting support In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 ) Change subject: cuart icc clock freq and divider setting support ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e Gerrit-Change-Number: 16273 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:01:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:02:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:02:05 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid setparameters/PPS support In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 ) Change subject: ccid setparameters/PPS support ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a Gerrit-Change-Number: 16274 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:02:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:02:28 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:02:28 +0000 Subject: Change in osmo-ccid-firmware[master]: attempt at handling card insertion/removal In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 ) Change subject: attempt at handling card insertion/removal ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I88130de7f889811425c0a2ca4063ea8822c83f66 Gerrit-Change-Number: 16275 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:02:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:02:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:02:48 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the debug uart buffer size In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 ) Change subject: increase the debug uart buffer size ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I343b03d5b06962b90f0c1aaceda03aa871a2f98b Gerrit-Change-Number: 16276 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:02:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:03:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:03:02 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to use the DWT unit In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 ) Change subject: debug code to use the DWT unit ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 Gerrit-Change-Number: 16277 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:03:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:03:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:03:17 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to measure uart timing using the CAN header In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 ) Change subject: debug code to measure uart timing using the CAN header ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I5f2c174076b5599dcb56f887330de27f470aeffc Gerrit-Change-Number: 16278 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:03:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:03:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:03:42 +0000 Subject: Change in osmo-ccid-firmware[master]: add a "no rx or tx" state In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 ) Change subject: add a "no rx or tx" state ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63 Gerrit-Change-Number: 16279 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:03:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:03:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:03:55 +0000 Subject: Change in osmo-ccid-firmware[master]: switching rx/tx is too slow, and not necessary In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 ) Change subject: switching rx/tx is too slow, and not necessary ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic91b3e183ba451b4e327e407aae0497273652f56 Gerrit-Change-Number: 16280 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:03:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:04:04 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:04:04 +0000 Subject: Change in osmo-ccid-firmware[master]: add some volatility to debug missing state changes In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 ) Change subject: add some volatility to debug missing state changes ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I2e12e32ad27b03d73ba3533903c34abc2fcce37a Gerrit-Change-Number: 16281 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:04:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:04:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:04:21 +0000 Subject: Change in osmo-ccid-firmware[master]: better ccid error handling, fix buffer leaks In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 ) Change subject: better ccid error handling, fix buffer leaks ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib8b8524809e12608a7ade79ce7d7c3ced16eeb57 Gerrit-Change-Number: 16282 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:04:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:04:38 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:04:38 +0000 Subject: Change in osmo-ccid-firmware[master]: fix power descriptor value In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 ) Change subject: fix power descriptor value ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I40c48ea56151d13de362b8f73cae5b21aba0ebfa Gerrit-Change-Number: 16283 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:04:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 19:07:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 19:07:02 +0000 Subject: Change in libosmocore[master]: Introduce fields related to DTAP DLCI In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16259 ) Change subject: Introduce fields related to DTAP DLCI ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561 Gerrit-Change-Number: 16259 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 27 Nov 2019 19:07:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 21:13:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 27 Nov 2019 21:13:30 +0000 Subject: Change in simtrace2[master]: simtrace2-sniff.c: fix printf usage References: Message-ID: Hello osmith, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/simtrace2/+/16296 to review the following change. Change subject: simtrace2-sniff.c: fix printf usage ...................................................................... simtrace2-sniff.c: fix printf usage Fixes: simtrace2-sniff.c:113:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(flag_meanings[i].str); Change-Id: I9793c680f070e724ce89272e9e489963c7516d52 --- M host/src/simtrace2-sniff.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/96/16296/1 diff --git a/host/src/simtrace2-sniff.c b/host/src/simtrace2-sniff.c index 7e8e5eb..b2ce4a0 100644 --- a/host/src/simtrace2-sniff.c +++ b/host/src/simtrace2-sniff.c @@ -110,7 +110,7 @@ uint32_t i; for (i = 0; i < nb_flags; i++) { if (flags & flag_meanings[i].value) { - printf(flag_meanings[i].str); + printf("%s", flag_meanings[i].str); flags &= ~flag_meanings[i].value; if (flags) { printf(", "); -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I9793c680f070e724ce89272e9e489963c7516d52 Gerrit-Change-Number: 16296 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 22:59:41 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 22:59:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add tests for SMS and voice call while Paging References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 ) Change subject: msc: add tests for SMS and voice call while Paging ...................................................................... msc: add tests for SMS and voice call while Paging Start a second - MT SMS - MT call while a Paging is already ongoing. The second trans being an SMS works. The second trans being a call fails with current osmo-msc master; a fix is in the related patch (s.b.). Related: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 2 files changed, 129 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/97/16297/1 diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 0846c04..aaacd06 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1754,22 +1754,25 @@ f_mo_sms_wait_rp_ack(spars); } +function f_mt_sms_expect_deliver_pdu(in SmsParameters spars) +runs on BSC_ConnHdlr +return template PDU_DTAP_MT { + var template TPDU_RP_DATA_SGSN_MS tp_mt := tr_SMS_DELIVER(?, spars.tp.ud, spars.tp.pid, spars.tp.dcs, ?); + var template RPDU_SGSN_MS rp_mt := tr_RP_DATA_MT(?, ?, omit, tp_mt); + var template PDU_ML3_NW_MS l3_mt := tr_ML3_MT_SMS(?, c_TIF_ORIG, tr_CP_DATA_MT(rp_mt)); + return tr_PDU_DTAP_MT(l3_mt, spars.dlci); +} + /* Wait for MT SMS on an already existing DTAP connection */ function f_mt_sms_expect(inout SmsParameters spars) runs on BSC_ConnHdlr { var template (value) PDU_ML3_MS_NW l3_mo; - var template TPDU_RP_DATA_SGSN_MS tp_mt; - var template RPDU_SGSN_MS rp_mt; - var template PDU_ML3_NW_MS l3_mt; var PDU_DTAP_MT dtap_mt; var default d := activate(as_other_sms()); /* Expect CP-DATA(RP-DATA(SMS-DELIVER)) */ - tp_mt := tr_SMS_DELIVER(?, spars.tp.ud, spars.tp.pid, spars.tp.dcs, ?); - rp_mt := tr_RP_DATA_MT(?, ?, omit, tp_mt); - l3_mt := tr_ML3_MT_SMS(?, c_TIF_ORIG, tr_CP_DATA_MT(rp_mt)); - BSSAP.receive(tr_PDU_DTAP_MT(l3_mt, spars.dlci)) -> value dtap_mt; + BSSAP.receive(f_mt_sms_expect_deliver_pdu(spars)) -> value dtap_mt; /* Extract relevant identifiers */ spars.tid := bit2int(dtap_mt.dtap.tiOrSkip.transactionId.tio); diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 480ec96..1b28b19 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -165,6 +165,14 @@ }; } +private function f_logp(charstring log_msg) runs on BSC_ConnHdlr +{ + // log on TTCN3 log output + log(log_msg); + // log in stderr log + f_vty_transceive(MSCVTY, "logp lglobal notice " & log_msg); +} + /* altstep for the global guard timer (only used when BSSAP_DIRECT * is used for communication */ private altstep as_Tguard_direct() runs on MTC_CT { @@ -1895,6 +1903,54 @@ vc_conn.done; } +/* SMS added while already Paging */ +friend function f_tc_lu_and_mt_sms_already_paging(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + var SmsParameters spars := valueof(t_SmsPars); + var OCT4 tmsi; + + f_init_handler(pars); + + /* Perform location update and call */ + f_perform_lu(); + + /* register an 'expect' for given IMSI (+TMSI) */ + if (isvalue(g_pars.tmsi)) { + tmsi := g_pars.tmsi; + } else { + tmsi := 'FFFFFFFF'O; + } + f_ran_register_imsi(g_pars.imsi, tmsi); + + f_logp("first SMS"); + f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS"); + + /* MSC->BSC: expect PAGING from MSC */ + f_expect_paging(); + + f_logp("second SMS"); + /* Now osmo-msc is in state "Paging pending", make sure that another SMS to be sent at this time just joins in + * with the pending paging. Another SMS: */ + f_vty_sms_send(hex2str(pars.imsi), "2342", "Another SMS"); + + /* Establish DTAP / BSSAP / SCCP connection */ + f_establish_fully(EST_TYPE_PAG_RESP); + + spars.tp.ud := 'C8329BFD064D9B53'O; + f_mt_sms(spars); + + spars.tp.ud := '41F79B8E2ECB41D3E614'O; + f_mt_sms(spars); + + f_expect_clear(); +} +testcase TC_lu_and_mt_sms_already_paging() runs on MTC_CT { + var BSC_ConnHdlrPars pars; + var BSC_ConnHdlr vc_conn; + f_init(); + pars := f_init_pars(43); + vc_conn := f_start_handler_with_pars(refers(f_tc_lu_and_mt_sms_already_paging), pars); + vc_conn.done; +} /* Paging for MT SMS but no response */ friend function f_tc_lu_and_mt_sms_paging_and_nothing(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { @@ -4915,6 +4971,67 @@ vc_conn.done; } +/* MT call while already Paging */ +friend function f_tc_lu_and_mt_call_already_paging(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + var CallParameters cpars := valueof(t_CallParams('123456'H, 0)); + var SmsParameters spars := valueof(t_SmsPars); + var OCT4 tmsi; + + f_init_handler(pars); + + /* Perform location update */ + f_perform_lu(); + + /* register an 'expect' for given IMSI (+TMSI) */ + if (isvalue(g_pars.tmsi)) { + tmsi := g_pars.tmsi; + } else { + tmsi := 'FFFFFFFF'O; + } + f_ran_register_imsi(g_pars.imsi, tmsi); + + f_logp("start Paging by an SMS"); + f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS"); + + /* MSC->BSC: expect PAGING from MSC */ + f_expect_paging(); + + f_logp("MNCC signals MT call, before Paging Response"); + f_mt_call_initate(cpars); + f_ran_register_imsi(g_pars.imsi, g_pars.tmsi); + + f_sleep(0.5); + f_logp("phone answers Paging, expecting both SMS and MT call to be established"); + f_establish_fully(EST_TYPE_PAG_RESP); + spars.tp.ud := 'C8329BFD064D9B53'O; + interleave { + [] BSSAP.receive(f_mt_sms_expect_deliver_pdu(spars)) { + f_logp("Got SMS-DELIVER"); + }; + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_SETUP(cpars.transaction_id, *, cpars.called_party))) { + f_logp("Got CC Setup"); + }; + } + setverdict(pass); + f_logp("success, tear down"); + var default ccrel := activate(as_optional_cc_rel(cpars)); + if (g_pars.ran_is_geran) { + BSSAP.send(ts_BSSMAP_ClearRequest(0)); + } else { + BSSAP.send(ts_RANAP_IuReleaseRequest(ts_RanapCause_om_intervention)); + } + f_expect_clear(); + deactivate(ccrel); + f_vty_sms_clear(hex2str(g_pars.imsi)); +} +testcase TC_lu_and_mt_call_already_paging() runs on MTC_CT { + var BSC_ConnHdlrPars pars; + var BSC_ConnHdlr vc_conn; + f_init(); + pars := f_init_pars(43); + vc_conn := f_start_handler_with_pars(refers(f_tc_lu_and_mt_call_already_paging), pars); + vc_conn.done; +} /* Perform a SGSAP LU and then make a CSFB call */ private function f_tc_sgsap_lu_and_mt_call(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { @@ -5733,9 +5850,11 @@ execute( TC_reset_two() ); execute( TC_lu_and_mt_call() ); + execute( TC_lu_and_mt_call_already_paging() ); execute( TC_lu_and_mo_sms() ); execute( TC_lu_and_mt_sms() ); + execute( TC_lu_and_mt_sms_already_paging() ); execute( TC_lu_and_mt_sms_paging_and_nothing() ); execute( TC_lu_and_mt_sms_paging_repeated() ); execute( TC_smpp_mo_sms() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 Gerrit-Change-Number: 16297 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 23:07:39 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 23:07:39 +0000 Subject: Change in osmo-msc[master]: fix incoming call while Paging References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16298 ) Change subject: fix incoming call while Paging ...................................................................... fix incoming call while Paging Do not free the CC transaction when an MT subscriber is already being Paged. Instead, invoke another paging request, which paging.c will correctly add to the list of pending paging response callbacks to run. A ttcn3 test is linked in the related patch (s.b.). Related: OS#4240 Related: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 Change-Id: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be --- M src/libmsc/gsm_04_08_cc.c 1 file changed, 2 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/98/16298/1 diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 4e604e5..8cfb611 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -1935,19 +1935,11 @@ * log it now. */ LOG_TRANS_CAT(trans, DMNCC, LOGL_DEBUG, "rx %s\n", get_mncc_name(msg->msg_type)); - if (vsub->cs.is_paging) { - LOG_TRANS(trans, LOGL_DEBUG, - "rx %s, subscriber not yet connected, paging already started\n", - get_mncc_name(msg->msg_type)); - vlr_subscr_put(vsub, __func__); - trans_free(trans); - return 0; - } - /* store setup information until paging succeeds */ memcpy(&trans->cc.msg, data, sizeof(struct gsm_mncc)); - /* Request a channel */ + /* Request a channel. If Paging already started, paging_request_start() will append the new + * trans to the already ongoing Paging. */ trans->paging_request = paging_request_start(vsub, PAGING_CAUSE_CALL_CONVERSATIONAL, cc_paging_cb, trans, "MNCC: establish call"); if (!trans->paging_request) { -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16298 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be Gerrit-Change-Number: 16298 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Nov 27 23:08:34 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Wed, 27 Nov 2019 23:08:34 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add tests for SMS and voice call while Paging In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 to look at the new patch set (#2). Change subject: msc: add tests for SMS and voice call while Paging ...................................................................... msc: add tests for SMS and voice call while Paging Start a second - MT SMS - MT call while a Paging is already ongoing. The second trans being an SMS works. The second trans being a call fails with current osmo-msc master; a fix is in the related patch (s.b.). Related: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn M msc/MSC_Tests_Iu.ttcn 3 files changed, 147 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/97/16297/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 Gerrit-Change-Number: 16297 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 00:03:04 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 00:03:04 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: fix 2 Iu tests: use f_mm_common() instead of f_mm_auth() References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16299 ) Change subject: msc: fix 2 Iu tests: use f_mm_common() instead of f_mm_auth() ...................................................................... msc: fix 2 Iu tests: use f_mm_common() instead of f_mm_auth() Fix these tests by using f_mm_common(), which takes care of Iu auth+ciph: TC_iu_lu_imsi_reject TC_iu_lu_imsi_timeout_gsup Change-Id: Id2bf160ac4e1cad4770202c6a6f1b8eeeee21d68 --- M msc/MSC_Tests.ttcn 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/99/16299/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 1b28b19..1a16dbf 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -486,7 +486,7 @@ f_create_gsup_expect(hex2str(g_pars.imsi)); f_cl3_or_initial_ue(l3_lu); - f_mm_auth(); + f_mm_common(); GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); GSUP.send(ts_GSUP_UL_ERR(g_pars.imsi, 23)); alt { @@ -516,7 +516,7 @@ f_create_gsup_expect(hex2str(g_pars.imsi)); f_cl3_or_initial_ue(l3_lu); - f_mm_auth(); + f_mm_common(); GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); /* Normally the HLR would need to respond here, but we decide to force a timeout here */ alt { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16299 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id2bf160ac4e1cad4770202c6a6f1b8eeeee21d68 Gerrit-Change-Number: 16299 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 00:47:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 00:47:30 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Iu: fix missing 'ran_is_geran := false' for TC_iu_lu_and_mt_sms_... References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16300 ) Change subject: msc: Iu: fix missing 'ran_is_geran := false' for TC_iu_lu_and_mt_sms_paging_repeated ...................................................................... msc: Iu: fix missing 'ran_is_geran := false' for TC_iu_lu_and_mt_sms_paging_repeated Change-Id: I011795cacf62f2cac6861fe657966795e6370ddb --- M msc/MSC_Tests_Iu.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/00/16300/1 diff --git a/msc/MSC_Tests_Iu.ttcn b/msc/MSC_Tests_Iu.ttcn index 198471d..2ef8505 100644 --- a/msc/MSC_Tests_Iu.ttcn +++ b/msc/MSC_Tests_Iu.ttcn @@ -301,7 +301,7 @@ var BSC_ConnHdlrPars pars; var BSC_ConnHdlr vc_conn; f_init(3); - pars := f_init_pars(101844); + pars := f_init_pars(101844, ran_idx := 2, ran_is_geran := false); vc_conn := f_start_handler_with_pars(refers(f_tc_lu_and_mt_sms_paging_repeated), pars); vc_conn.done; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16300 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I011795cacf62f2cac6861fe657966795e6370ddb Gerrit-Change-Number: 16300 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 00:47:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 00:47:30 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: expect only one Paging on GERAN References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16301 ) Change subject: msc: expect only one Paging on GERAN ...................................................................... msc: expect only one Paging on GERAN After discussion on this thread: http://lists.osmocom.org/pipermail/openbsc/2019-November/013058.html Do not expect repeated Paging on GERAN. Pending clarification on 3G, still expect repeated Paging on Iu, though we are not 100% certain that this is indeed required. Fixes MSC_Tests.TC_lu_and_mt_sms_paging_repeated, but not MSC_Tests_Iu.TC_iu_lu_and_mt_sms_paging_repeated Change-Id: Ie914ea88f31ac158f4bd1700143bbe728dd05e0b --- M msc/MSC_Tests.ttcn 1 file changed, 28 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/16301/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 1a16dbf..c4d407a 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -2030,11 +2030,37 @@ f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS"); + f_logp("Expecting first Paging"); /* MSC->BSC: expect PAGING from MSC */ f_expect_paging(); - /* MSC->BSC: expect PAGING from MSC */ - f_expect_paging(); + if (g_pars.ran_is_geran) { + f_logp("GERAN: expect no further Paging"); + } else { + f_logp("UTRAN: expect more Paging"); + } + + timer T := 5.0; + T.start; + alt { + [g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi)) { + setverdict(fail, "GERAN should not repeat Paging, but received a second Paging"); + mtc.stop; + } + [not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) { + f_logp("UTRAN: second Paging received, as expected"); + setverdict(pass); + } + [] T.timeout { + if (g_pars.ran_is_geran) { + f_logp("GERAN: No further Paging received, as expected"); + setverdict(pass); + } else { + setverdict(fail, "UTRAN: Expected a second Paging"); + mtc.stop; + } + } + } /* Establish DTAP / BSSAP / SCCP connection */ f_establish_fully(EST_TYPE_PAG_RESP); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie914ea88f31ac158f4bd1700143bbe728dd05e0b Gerrit-Change-Number: 16301 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 01:46:40 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 01:46:40 +0000 Subject: Change in osmo-msc[master]: fail on invalid RTP address from MGW References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16302 ) Change subject: fail on invalid RTP address from MGW ...................................................................... fail on invalid RTP address from MGW When the CRCX OK returns an invalid RTP address, abort the call; fixes MSC_Tests.TC_invalid_mgcp_crash. The original crash happened when adding this error handling without this commit I08c03946605aa12e0a5ce8b3c773704ef5327a7a ("fsm: use deferred deallocation" for osmo-mgw I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 "fix use-after-free: require new fsm deferred dealloc, check for term"). With this error handling added, even though avoiding a crash, the test does not pass yet, because instead of rejecting the call, it currently composes an Assignment Command without a Transport Layer Address. Fix that. Change-Id: I00c3b5ff74c05bcc2b7c39375c33419916a57193 --- M src/libmsc/msc_a.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/02/16302/1 diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 0b07fbc..a4048f4 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -627,6 +627,12 @@ LOG_MSC_A(msc_a, LOGL_ERROR, "Invalid data for %s\n", osmo_fsm_event_name(fi->fsm, event)); return; } + if (!osmo_sockaddr_str_is_nonzero(&rtps->local)) { + LOG_MSC_A(msc_a, LOGL_ERROR, "Invalid RTP address received from MGW: " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local)); + call_leg_release(msc_a->cc.call_leg); + return; + } LOG_MSC_A(msc_a, LOGL_DEBUG, "MGW endpoint's RTP address available for the CI %s: " OSMO_SOCKADDR_STR_FMT " (osmux=%s:%d)\n", rtp_direction_name(rtps->dir), OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local), -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16302 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I00c3b5ff74c05bcc2b7c39375c33419916a57193 Gerrit-Change-Number: 16302 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 01:46:41 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 01:46:41 +0000 Subject: Change in osmo-msc[master]: msc_a CC: add some basic sanity tests References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16303 ) Change subject: msc_a CC: add some basic sanity tests ...................................................................... msc_a CC: add some basic sanity tests Change-Id: I9d7d7d4073282abc6c02a6a297c807dc70c5154c --- M src/libmsc/msc_a.c 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/03/16303/1 diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index a4048f4..bc5b7ea 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -518,6 +518,12 @@ struct gsm_trans *cc_trans = msc_a->cc.active_trans; struct gsm0808_channel_type channel_type; + if (!cc_trans) { + LOG_MSC_A(msc_a, LOGL_ERROR, "No CC transaction active\n"); + call_leg_release(msc_a->cc.call_leg); + return; + } + /* Once a CI is known, we could also CRCX the CN side of the MGW endpoint, but it makes sense to wait for the * codec to be determined by the Assignment Complete message, first. */ @@ -627,6 +633,10 @@ LOG_MSC_A(msc_a, LOGL_ERROR, "Invalid data for %s\n", osmo_fsm_event_name(fi->fsm, event)); return; } + if (!msc_a->cc.call_leg) { + LOG_MSC_A(msc_a, LOGL_ERROR, "No call leg active\n"); + return; + } if (!osmo_sockaddr_str_is_nonzero(&rtps->local)) { LOG_MSC_A(msc_a, LOGL_ERROR, "Invalid RTP address received from MGW: " OSMO_SOCKADDR_STR_FMT "\n", OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local)); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I9d7d7d4073282abc6c02a6a297c807dc70c5154c Gerrit-Change-Number: 16303 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 01:53:35 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 01:53:35 +0000 Subject: Change in osmo-msc[master]: add full SDP codec information to the MNCC socket In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 to look at the new patch set (#6). Change subject: add full SDP codec information to the MNCC socket ...................................................................... add full SDP codec information to the MNCC socket This way osmo-msc can benefit from the complete codec information received via SIP, which was so far terminated at osmo-sip-connector. osmo-sip-connector could/should have translated the received SDP to MNCC bearer_cap, but this was never implemented properly. Since osmo-msc already handles SDP towards the MGW, it makes most sense to pass SDP to osmo-msc transparently. To be able to send a valid RTP IP:port in the SDP upon the first MNCC_SETUP_IND going out, move the CN side CRCX to the very start of establishing a voice call. As a result, first create MGW conns for both RAN and CN before starting. The voice_call_full.msc chart shows the change in message sequence for MO and MT voice calls. Implement cc_sdp.c, which accumulates codec information from various sources (MS, BSS, Assignment, remote call leg) and provides filtering to get the available set of codecs at any point in time. Implement codec_sdp_cc_t9n.c, to translate between SDP and the various libosmo-mgcp-client, CC and BSSMAP representations of codecs: - Speech Version, - Permitted Speech, - Speech Codec Type, - default Payload Type numbers, - enum mgcp_codecs, - FR/HR compatibility - SDP audio codec names, - various AMR configurations. A codec_map lists these relations in one large data record. Various functions provide conversions by traversing this map. Add trans->cc.mnccc_release_sent: so far, avoiding to send an MNCC release during trans_free() was done by setting the callref = 0. But that also skips CC Release. On codec mismatch, we send a specific MNCC error code but still want a normal CC Release: hence send the MNCC message, set mnccc_release_sent = true and do normal CC Release in trans_free(). (A better way to do this would be to adopt the mncc_call FSM from inter-MSC handover also for local voice calls, but that is out of scope for now. I want to try that soon, as time permits.) Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f --- M doc/sequence_charts/voice_call_full.msc M include/osmocom/msc/Makefile.am M include/osmocom/msc/call_leg.h A include/osmocom/msc/cc_sdp.h A include/osmocom/msc/codec_sdp_cc_t9n.h M include/osmocom/msc/gsm_04_08.h M include/osmocom/msc/msc_a.h M include/osmocom/msc/msc_ho.h M include/osmocom/msc/rtp_stream.h M include/osmocom/msc/sdp_msg.h M include/osmocom/msc/transaction.h M src/libmsc/Makefile.am M src/libmsc/call_leg.c A src/libmsc/cc_sdp.c A src/libmsc/codec_sdp_cc_t9n.c M src/libmsc/gsm_04_08_cc.c M src/libmsc/mncc_call.c M src/libmsc/msc_a.c M src/libmsc/msc_ho.c M src/libmsc/msc_t.c M src/libmsc/rtp_stream.c M src/libmsc/sdp_msg.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h M tests/sdp_msg/sdp_msg_test.ok 27 files changed, 5,489 insertions(+), 445 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/53/15953/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 09:42:36 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 28 Nov 2019 09:42:36 +0000 Subject: Change in simtrace2[master]: simtrace2-sniff.c: fix printf usage In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16296 ) Change subject: simtrace2-sniff.c: fix printf usage ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I9793c680f070e724ce89272e9e489963c7516d52 Gerrit-Change-Number: 16296 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 28 Nov 2019 09:42:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 09:42:43 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 28 Nov 2019 09:42:43 +0000 Subject: Change in simtrace2[master]: simtrace2-sniff.c: fix printf usage In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16296 ) Change subject: simtrace2-sniff.c: fix printf usage ...................................................................... simtrace2-sniff.c: fix printf usage Fixes: simtrace2-sniff.c:113:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(flag_meanings[i].str); Change-Id: I9793c680f070e724ce89272e9e489963c7516d52 --- M host/src/simtrace2-sniff.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/host/src/simtrace2-sniff.c b/host/src/simtrace2-sniff.c index 7e8e5eb..b2ce4a0 100644 --- a/host/src/simtrace2-sniff.c +++ b/host/src/simtrace2-sniff.c @@ -110,7 +110,7 @@ uint32_t i; for (i = 0; i < nb_flags; i++) { if (flags & flag_meanings[i].value) { - printf(flag_meanings[i].str); + printf("%s", flag_meanings[i].str); flags &= ~flag_meanings[i].value; if (flags) { printf(", "); -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I9793c680f070e724ce89272e9e489963c7516d52 Gerrit-Change-Number: 16296 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:18:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:18:17 +0000 Subject: Change in osmo-ccid-firmware[master]: sercom config for t1 In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 to look at the new patch set (#2). Change subject: sercom config for t1 ...................................................................... sercom config for t1 T0 doesn't work, as the datasheet states it's synchronous, apparently to the internal clock. That doesn't align too well with what 7816-3 says, so this already fails during the ATR after a few tries. Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 --- M sysmoOCTSIM/config/hpl_sercom_config.h 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/65/16265/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 Gerrit-Change-Number: 16265 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:19:09 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:19:09 +0000 Subject: Change in osmo-ccid-firmware[master]: sercom config for t1 In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 ) Change subject: sercom config for t1 ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265/1//COMMIT_MSG at 9 PS1, Line 9: t0 doesn't work > it would be good to have a statement about what doesn't work, or what kind of observations have been [?] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 Gerrit-Change-Number: 16265 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 10:19:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:28:03 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:28:03 +0000 Subject: Change in osmo-ccid-firmware[master]: don't wait for TCK if card only supports T0 In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 to look at the new patch set (#2). Change subject: don't wait for TCK if card only supports T0 ...................................................................... don't wait for TCK if card only supports T0 See 7816-3 8.2.5, T0 only (maybe implicitly) and no T15 = no TCK. This could be handled by a timeout instead, but timeouts don't work yet. Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add --- M ccid_common/iso7816_fsm.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/64/16264/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add Gerrit-Change-Number: 16264 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:28:32 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:28:32 +0000 Subject: Change in osmo-ccid-firmware[master]: don't wait for TCK if card only supports T0 In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 ) Change subject: don't wait for TCK if card only supports T0 ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264/1//COMMIT_MSG at 7 PS1, Line 7: don't wait for TCK if card only supports T0 > is that stated in the spec? If so, it might be useful to state this here. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add Gerrit-Change-Number: 16264 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 10:28:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: don't wait for TCK if card only supports T0 In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 to look at the new patch set (#3). Change subject: don't wait for TCK if card only supports T0 ...................................................................... don't wait for TCK if card only supports T0 This could be handled by a timeout instead, but timeouts don't work yet. Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add --- M ccid_common/iso7816_fsm.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/64/16264/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add Gerrit-Change-Number: 16264 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: sercom config for t1 In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 to look at the new patch set (#3). Change subject: sercom config for t1 ...................................................................... sercom config for t1 t0 doesn't work Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 --- M sysmoOCTSIM/config/hpl_sercom_config.h 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/65/16265/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 Gerrit-Change-Number: 16265 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: Add card_uart driver for ASF4 USART In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16267 to look at the new patch set (#2). Change subject: Add card_uart driver for ASF4 USART ...................................................................... Add card_uart driver for ASF4 USART Change-Id: Ic690055bc332ccca3de7c5f4429399cf9ff1d4da --- M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.h M ccid_host/ccid_slot_sim.c A sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/main.c 6 files changed, 531 insertions(+), 721 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/67/16267/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic690055bc332ccca3de7c5f4429399cf9ff1d4da Gerrit-Change-Number: 16267 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the uart ring buffer size In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 to look at the new patch set (#2). Change subject: increase the uart ring buffer size ...................................................................... increase the uart ring buffer size must be be a power of 2, and should be at least as large as the largest transfer that we might be waiting for - revisit this, is 256 enough? Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c --- M sysmoOCTSIM/driver_init.c 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/68/16268/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c Gerrit-Change-Number: 16268 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: talloc asserts In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 to look at the new patch set (#2). Change subject: talloc asserts ...................................................................... talloc asserts Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99 --- M sysmoOCTSIM/talloc.c 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/69/16269/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99 Gerrit-Change-Number: 16269 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: no logging, no memory pool In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 to look at the new patch set (#2). Change subject: no logging, no memory pool ...................................................................... no logging, no memory pool Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c 3 files changed, 15 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/70/16270/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca Gerrit-Change-Number: 16270 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: prevent uart interrupts before having proper structs In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 to look at the new patch set (#2). Change subject: prevent uart interrupts before having proper structs ...................................................................... prevent uart interrupts before having proper structs Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e --- M sysmoOCTSIM/main.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/71/16271/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e Gerrit-Change-Number: 16271 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: move iso7816_3 to common dir In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 to look at the new patch set (#2). Change subject: move iso7816_3 to common dir ...................................................................... move iso7816_3 to common dir Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92 --- R ccid_common/iso7816_3.c R ccid_common/iso7816_3.h M sysmoOCTSIM/gcc/Makefile 3 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/72/16272/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92 Gerrit-Change-Number: 16272 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart icc clock freq and divider setting support In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 to look at the new patch set (#2). Change subject: cuart icc clock freq and divider setting support ...................................................................... cuart icc clock freq and divider setting support Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e --- M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/ncn8025.c M sysmoOCTSIM/ncn8025.h 4 files changed, 43 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/73/16273/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e Gerrit-Change-Number: 16273 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid setparameters/PPS support In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 to look at the new patch set (#2). Change subject: ccid setparameters/PPS support ...................................................................... ccid setparameters/PPS support Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a --- M ccid_common/ccid_device.c M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M ccid_common/iso7816_fsm.h 5 files changed, 322 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/74/16274/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a Gerrit-Change-Number: 16274 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: attempt at handling card insertion/removal In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 to look at the new patch set (#2). Change subject: attempt at handling card insertion/removal ...................................................................... attempt at handling card insertion/removal Change-Id: I88130de7f889811425c0a2ca4063ea8822c83f66 --- M ccid_common/ccid_device.c M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M ccid_common/iso7816_fsm.h M sysmoOCTSIM/main.c 6 files changed, 89 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/75/16275/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I88130de7f889811425c0a2ca4063ea8822c83f66 Gerrit-Change-Number: 16275 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the debug uart buffer size In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 to look at the new patch set (#2). Change subject: increase the debug uart buffer size ...................................................................... increase the debug uart buffer size printing to the buffer is faster than getting the data out, so let's increase it a bit to drop less information Change-Id: I343b03d5b06962b90f0c1aaceda03aa871a2f98b --- M sysmoOCTSIM/driver_init.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/76/16276/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I343b03d5b06962b90f0c1aaceda03aa871a2f98b Gerrit-Change-Number: 16276 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to use the DWT unit In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 to look at the new patch set (#2). Change subject: debug code to use the DWT unit ...................................................................... debug code to use the DWT unit Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 --- M sysmoOCTSIM/main.c 1 file changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/77/16277/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 Gerrit-Change-Number: 16277 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to measure uart timing using the CAN header In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 to look at the new patch set (#2). Change subject: debug code to measure uart timing using the CAN header ...................................................................... debug code to measure uart timing using the CAN header Change-Id: I5f2c174076b5599dcb56f887330de27f470aeffc --- M ccid_common/iso7816_fsm.c M sysmoOCTSIM/hpl/sercom/hpl_sercom.c M sysmoOCTSIM/main.c 3 files changed, 37 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/78/16278/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I5f2c174076b5599dcb56f887330de27f470aeffc Gerrit-Change-Number: 16278 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: add a "no rx or tx" state In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 to look at the new patch set (#2). Change subject: add a "no rx or tx" state ...................................................................... add a "no rx or tx" state Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63 --- M ccid_common/cuart.h M ccid_common/iso7816_fsm.c M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 3 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/79/16279/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63 Gerrit-Change-Number: 16279 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: switching rx/tx is too slow, and not necessary In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 to look at the new patch set (#2). Change subject: switching rx/tx is too slow, and not necessary ...................................................................... switching rx/tx is too slow, and not necessary Change-Id: Ic91b3e183ba451b4e327e407aae0497273652f56 --- M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/80/16280/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic91b3e183ba451b4e327e407aae0497273652f56 Gerrit-Change-Number: 16280 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: add some volatility to debug missing state changes In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 to look at the new patch set (#2). Change subject: add some volatility to debug missing state changes ...................................................................... add some volatility to debug missing state changes Change-Id: I2e12e32ad27b03d73ba3533903c34abc2fcce37a --- M sysmoOCTSIM/main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/81/16281/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I2e12e32ad27b03d73ba3533903c34abc2fcce37a Gerrit-Change-Number: 16281 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: better ccid error handling, fix buffer leaks In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 to look at the new patch set (#2). Change subject: better ccid error handling, fix buffer leaks ...................................................................... better ccid error handling, fix buffer leaks Change-Id: Ib8b8524809e12608a7ade79ce7d7c3ced16eeb57 --- M ccid_common/ccid_device.c M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c 3 files changed, 30 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/82/16282/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib8b8524809e12608a7ade79ce7d7c3ced16eeb57 Gerrit-Change-Number: 16282 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: fix power descriptor value In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 to look at the new patch set (#2). Change subject: fix power descriptor value ...................................................................... fix power descriptor value The previous value would allow using the device without external power, i.e. on a hub, which leads to silent failures trying to power up the slots (nothing happens, no atr will be received) Change-Id: I40c48ea56151d13de362b8f73cae5b21aba0ebfa FIXME: The device should offer at least one 100mA configuration. --- M sysmoOCTSIM/usb_descriptors.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/83/16283/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I40c48ea56151d13de362b8f73cae5b21aba0ebfa Gerrit-Change-Number: 16283 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: fsm completion event handling from main loop In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16284 to look at the new patch set (#2). Change subject: fsm completion event handling from main loop ...................................................................... fsm completion event handling from main loop The main loop will now poll for finished/failed transactions and handle them, this was previously handled during the last rx interrupt of a transaction, which was bad for timing. This does also fix malloc/free while handling interrupts. Change-Id: I055110720089e20e65db592eccc3ce4d618e8c63 --- M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M sysmoOCTSIM/main.c 4 files changed, 68 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/84/16284/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16284 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I055110720089e20e65db592eccc3ce4d618e8c63 Gerrit-Change-Number: 16284 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: add a note for D=64 pecularities In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16285 to look at the new patch set (#2). Change subject: add a note for D=64 pecularities ...................................................................... add a note for D=64 pecularities Change-Id: Icf2845e0f07f2d23f5090d35b6d8d145ad65a2f8 --- M ccid_common/ccid_slot_fsm.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/85/16285/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16285 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Icf2845e0f07f2d23f5090d35b6d8d145ad65a2f8 Gerrit-Change-Number: 16285 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: pps warning In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16286 to look at the new patch set (#2). Change subject: pps warning ...................................................................... pps warning Change-Id: Ia125b7983e81342af224bc6e8771d8be4c4bfa42 --- M ccid_common/ccid_slot_fsm.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/86/16286/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia125b7983e81342af224bc6e8771d8be4c4bfa42 Gerrit-Change-Number: 16286 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: boost uart priority In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16287 to look at the new patch set (#2). Change subject: boost uart priority ...................................................................... boost uart priority Change-Id: I10ea17ca8b120c09b8926da010c9e358b219f7ed --- M sysmoOCTSIM/main.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/87/16287/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I10ea17ca8b120c09b8926da010c9e358b219f7ed Gerrit-Change-Number: 16287 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: the magic sauce that makes it work In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16288 to look at the new patch set (#2). Change subject: the magic sauce that makes it work ...................................................................... the magic sauce that makes it work 1mio concurrent select mf transfers, 5mhz, fi/di 512/32 Change-Id: Ica8539e4428ca3e3eb3e8ca9f5a5b50eb738ca8d --- M sysmoOCTSIM/hpl/sercom/hpl_sercom.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/88/16288/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ica8539e4428ca3e3eb3e8ca9f5a5b50eb738ca8d Gerrit-Change-Number: 16288 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: change uart ctl define names In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16289 to look at the new patch set (#2). Change subject: change uart ctl define names ...................................................................... change uart ctl define names Change-Id: I656e9e32c67d6e7b70a53f8f113583f25619e00f --- M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 3 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/89/16289/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16289 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I656e9e32c67d6e7b70a53f8f113583f25619e00f Gerrit-Change-Number: 16289 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart: allow getting the icc baud rate and clock freq In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16290 to look at the new patch set (#2). Change subject: cuart: allow getting the icc baud rate and clock freq ...................................................................... cuart: allow getting the icc baud rate and clock freq Change-Id: I577907e6c60582a80666d43b17c20de4e03cc8df --- M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/90/16290/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I577907e6c60582a80666d43b17c20de4e03cc8df Gerrit-Change-Number: 16290 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart: fix etu calculation In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16291 to look at the new patch set (#2). Change subject: cuart: fix etu calculation ...................................................................... cuart: fix etu calculation Change-Id: Ib2f83654bdaae5090bb1dfd75e0906551d6b6aa7 --- M ccid_common/cuart.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/91/16291/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib2f83654bdaae5090bb1dfd75e0906551d6b6aa7 Gerrit-Change-Number: 16291 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart cleanup In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16292 to look at the new patch set (#2). Change subject: cuart cleanup ...................................................................... cuart cleanup Change-Id: I15ea4d68263b62fca3da76795969358a07e7f1a6 --- M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 1 file changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/92/16292/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I15ea4d68263b62fca3da76795969358a07e7f1a6 Gerrit-Change-Number: 16292 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: first attempt at rx timeout handling In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16293 to look at the new patch set (#2). Change subject: first attempt at rx timeout handling ...................................................................... first attempt at rx timeout handling The general idea is to provide hints to cuart so it can calculate a reasonable timeout value when receiving multiple bytes instead of having per-byte timeouts Change-Id: Ia6ad2d83cea48a8661ed2e4eb50f9bcb85218454 --- M ccid_common/cuart.c M ccid_common/cuart.h M ccid_common/iso7816_fsm.c 3 files changed, 143 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/93/16293/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia6ad2d83cea48a8661ed2e4eb50f9bcb85218454 Gerrit-Change-Number: 16293 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: enable the final slot In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16294 to look at the new patch set (#2). Change subject: enable the final slot ...................................................................... enable the final slot The debug uart is shared with slot 7, so in order to use sim slot 7 the pin config and the uart config needs to be changed. Going back to using the debug uart works by defining ENABLE_DBG_UART7 Change-Id: I8f3c7c60306941159c35307a5c1e38c2a2bd2fe1 --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/atmel_start_pins.h M sysmoOCTSIM/command.c M sysmoOCTSIM/config/hpl_sercom_config.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/driver_init.h M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c D sysmoOCTSIM/manual_test.c M sysmoOCTSIM/stdio_start.c 12 files changed, 353 insertions(+), 264 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/94/16294/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I8f3c7c60306941159c35307a5c1e38c2a2bd2fe1 Gerrit-Change-Number: 16294 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:49:56 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 10:49:56 +0000 Subject: Change in osmo-ccid-firmware[master]: prettier slot bitmask code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 to look at the new patch set (#2). Change subject: prettier slot bitmask code ...................................................................... prettier slot bitmask code Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2 --- M sysmoOCTSIM/main.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/95/16295/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2 Gerrit-Change-Number: 16295 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:53:42 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 28 Nov 2019 10:53:42 +0000 Subject: Change in simtrace2[master]: Fix topdir Makefile and debian packaging References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16304 ) Change subject: Fix topdir Makefile and debian packaging ...................................................................... Fix topdir Makefile and debian packaging Make building the debian packages work again. I've verified that it works in my own OBS namespace. This patch also adds missing pkgconf variables in host/Makefile.am, so libosmo-simtrace2.pc installs properly. Related: OS#4283 Fixes: 964cda309dc699a293692d5e2549ae80b5b9bd11 ("host: use autotools and split shared code to libosmo-simtrace2") Change-Id: I2377de1e8b149520922217a1ab16f6e22fe6462a --- M Makefile M debian/changelog M debian/control A debian/libosmo-simtrace2-0.install A debian/libosmo-simtrace2-dev.install M debian/rules M host/Makefile.am 7 files changed, 72 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/04/16304/1 diff --git a/Makefile b/Makefile index 1c00740..e9917c3 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,15 @@ fw: fw-simtrace-dfu fw-simtrace-trace fw-simtrace-cardem fw-qmod-dfu fw-qmod-cardem utils: - make -C host + (cd host && \ + autoreconf -fi && \ + ./configure --prefix=/usr --disable-werror && \ + make) clean: fw-clean - make -C host clean + if [ -e host/Makefile ]; then \ + make -C host clean; \ + fi install: make -C firmware install diff --git a/debian/changelog b/debian/changelog index a3da488..ccebd49 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +simtrace2 (0.5.2) UNRELEASED; urgency=medium + + * adapt to host tools in autotools + + -- Harald Welte Thu, 28 Nov 2019 00:44:57 +0100 + simtrace2 (0.5.1) unstable; urgency=medium * Backwards-compatibility with older (released, non-master) libosmocore diff --git a/debian/control b/debian/control index f30b1d3..cbe9f75 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,13 @@ Section: devel Priority: optional Build-Depends: debhelper (>= 9), + autotools-dev, + autoconf, + automake, + libtool, + pkg-config, + git, + dh-autoreconf, libosmocore-dev, libpcsclite-dev, libnewlib-arm-none-eabi, @@ -26,6 +33,33 @@ Section: devel Architecture: any Multi-Arch: same -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, libosmo-simtrace2-0 Recommends: simtrace2-firmware Description: Host utilities to communicate with SIMtrace2 USB Devices. + +Package: libosmo-simtrace2-0 +Section: libs +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Osmocom SIMtrace2 library + This library contains core "driver" functionality to interface with the + Osmocom SIMtrace2 (and compatible) USB device firmware. It enables + applications to implement SIM card / smart card tracing as well as + SIM / smart card emulation functions. + +Package: libosmo-simtrace2-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: libosmo-simtrace2-0, ${misc:Depends} +Description: Development headers for Osmocom SIMtrace2 library + This library contains core "driver" functionality to interface with the + Osmocom SIMtrace2 (and compatible) USB device firmware. It enables + applications to implement SIM card / smart card tracing as well as + SIM / smart card emulation functions. + . + The header files provided by this package may be used to develop + with any of the libosmocore libraries. + . + Also static libraries are installed with this package. diff --git a/debian/libosmo-simtrace2-0.install b/debian/libosmo-simtrace2-0.install new file mode 100644 index 0000000..383b232 --- /dev/null +++ b/debian/libosmo-simtrace2-0.install @@ -0,0 +1 @@ +usr/lib/libosmo-simtrace2*.so.* diff --git a/debian/libosmo-simtrace2-dev.install b/debian/libosmo-simtrace2-dev.install new file mode 100644 index 0000000..eec0e15 --- /dev/null +++ b/debian/libosmo-simtrace2-dev.install @@ -0,0 +1,5 @@ +usr/include/* +usr/lib/lib*.a +usr/lib/lib*.so +usr/lib/lib*.la +usr/lib/pkgconfig/* diff --git a/debian/rules b/debian/rules index 2d33f6a..2c615db 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,19 @@ #!/usr/bin/make -f +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2) +DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1) +VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions + + %: dh $@ + +override_dh_autoreconf: + cd host && dh_autoreconf diff --git a/host/Makefile.am b/host/Makefile.am index d1b3b31..de76851 100644 --- a/host/Makefile.am +++ b/host/Makefile.am @@ -5,6 +5,9 @@ EXTRA_DIST = .version git-version-gen +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libosmo-simtrace2.pc + @RELMAKE@ BUILT_SOURCES = $(top_srcdir)/.version -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16304 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I2377de1e8b149520922217a1ab16f6e22fe6462a Gerrit-Change-Number: 16304 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:54:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 10:54:24 +0000 Subject: Change in osmo-msc[master]: fail on invalid RTP address from MGW In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16302 ) Change subject: fail on invalid RTP address from MGW ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16302 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I00c3b5ff74c05bcc2b7c39375c33419916a57193 Gerrit-Change-Number: 16302 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 10:54:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:54:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 10:54:42 +0000 Subject: Change in osmo-msc[master]: msc_a CC: add some basic sanity tests In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16303 ) Change subject: msc_a CC: add some basic sanity tests ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I9d7d7d4073282abc6c02a6a297c807dc70c5154c Gerrit-Change-Number: 16303 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 10:54:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:55:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 10:55:24 +0000 Subject: Change in osmo-msc[master]: fix incoming call while Paging In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16298 ) Change subject: fix incoming call while Paging ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16298 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be Gerrit-Change-Number: 16298 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 10:55:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:55:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 10:55:30 +0000 Subject: Change in osmo-msc[master]: fail on invalid RTP address from MGW In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16302 ) Change subject: fail on invalid RTP address from MGW ...................................................................... fail on invalid RTP address from MGW When the CRCX OK returns an invalid RTP address, abort the call; fixes MSC_Tests.TC_invalid_mgcp_crash. The original crash happened when adding this error handling without this commit I08c03946605aa12e0a5ce8b3c773704ef5327a7a ("fsm: use deferred deallocation" for osmo-mgw I7df2e9202b04e7ca7366bb0a8ec53cf3bb14faf3 "fix use-after-free: require new fsm deferred dealloc, check for term"). With this error handling added, even though avoiding a crash, the test does not pass yet, because instead of rejecting the call, it currently composes an Assignment Command without a Transport Layer Address. Fix that. Change-Id: I00c3b5ff74c05bcc2b7c39375c33419916a57193 --- M src/libmsc/msc_a.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 0b07fbc..a4048f4 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -627,6 +627,12 @@ LOG_MSC_A(msc_a, LOGL_ERROR, "Invalid data for %s\n", osmo_fsm_event_name(fi->fsm, event)); return; } + if (!osmo_sockaddr_str_is_nonzero(&rtps->local)) { + LOG_MSC_A(msc_a, LOGL_ERROR, "Invalid RTP address received from MGW: " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local)); + call_leg_release(msc_a->cc.call_leg); + return; + } LOG_MSC_A(msc_a, LOGL_DEBUG, "MGW endpoint's RTP address available for the CI %s: " OSMO_SOCKADDR_STR_FMT " (osmux=%s:%d)\n", rtp_direction_name(rtps->dir), OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local), -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16302 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I00c3b5ff74c05bcc2b7c39375c33419916a57193 Gerrit-Change-Number: 16302 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 10:55:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 10:55:30 +0000 Subject: Change in osmo-msc[master]: msc_a CC: add some basic sanity tests In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16303 ) Change subject: msc_a CC: add some basic sanity tests ...................................................................... msc_a CC: add some basic sanity tests Change-Id: I9d7d7d4073282abc6c02a6a297c807dc70c5154c --- M src/libmsc/msc_a.c 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index a4048f4..bc5b7ea 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -518,6 +518,12 @@ struct gsm_trans *cc_trans = msc_a->cc.active_trans; struct gsm0808_channel_type channel_type; + if (!cc_trans) { + LOG_MSC_A(msc_a, LOGL_ERROR, "No CC transaction active\n"); + call_leg_release(msc_a->cc.call_leg); + return; + } + /* Once a CI is known, we could also CRCX the CN side of the MGW endpoint, but it makes sense to wait for the * codec to be determined by the Assignment Complete message, first. */ @@ -627,6 +633,10 @@ LOG_MSC_A(msc_a, LOGL_ERROR, "Invalid data for %s\n", osmo_fsm_event_name(fi->fsm, event)); return; } + if (!msc_a->cc.call_leg) { + LOG_MSC_A(msc_a, LOGL_ERROR, "No call leg active\n"); + return; + } if (!osmo_sockaddr_str_is_nonzero(&rtps->local)) { LOG_MSC_A(msc_a, LOGL_ERROR, "Invalid RTP address received from MGW: " OSMO_SOCKADDR_STR_FMT "\n", OSMO_SOCKADDR_STR_FMT_ARGS(&rtps->local)); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I9d7d7d4073282abc6c02a6a297c807dc70c5154c Gerrit-Change-Number: 16303 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 11:07:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 11:07:21 +0000 Subject: Change in osmo-ccid-firmware[master]: don't wait for TCK if card only supports T0 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 ) Change subject: don't wait for TCK if card only supports T0 ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264/1//COMMIT_MSG at 7 PS1, Line 7: don't wait for TCK if card only supports T0 > Done I'm sorry, but I don't see it? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add Gerrit-Change-Number: 16264 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 11:07:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Comment-In-Reply-To: Hoernchen Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 11:08:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 11:08:05 +0000 Subject: Change in osmo-ccid-firmware[master]: don't wait for TCK if card only supports T0 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 ) Change subject: don't wait for TCK if card only supports T0 ...................................................................... Patch Set 3: erm, you added the spec reference in v2 of the patch, but removed it again in v3 :/ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add Gerrit-Change-Number: 16264 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 11:08:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 11:08:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 11:08:58 +0000 Subject: Change in osmo-ccid-firmware[master]: sercom config for t1 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 ) Change subject: sercom config for t1 ...................................................................... Patch Set 3: Code-Review-1 same here, v2 was fixed but v3 removed the addition of v2? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 Gerrit-Change-Number: 16265 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 11:08:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 11:58:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 11:58:47 +0000 Subject: Change in simtrace2[master]: Fix topdir Makefile and debian packaging In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16304 ) Change subject: Fix topdir Makefile and debian packaging ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16304 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I2377de1e8b149520922217a1ab16f6e22fe6462a Gerrit-Change-Number: 16304 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 28 Nov 2019 11:58:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 11:58:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 11:58:49 +0000 Subject: Change in simtrace2[master]: Fix topdir Makefile and debian packaging In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16304 ) Change subject: Fix topdir Makefile and debian packaging ...................................................................... Fix topdir Makefile and debian packaging Make building the debian packages work again. I've verified that it works in my own OBS namespace. This patch also adds missing pkgconf variables in host/Makefile.am, so libosmo-simtrace2.pc installs properly. Related: OS#4283 Fixes: 964cda309dc699a293692d5e2549ae80b5b9bd11 ("host: use autotools and split shared code to libosmo-simtrace2") Change-Id: I2377de1e8b149520922217a1ab16f6e22fe6462a --- M Makefile M debian/changelog M debian/control A debian/libosmo-simtrace2-0.install A debian/libosmo-simtrace2-dev.install M debian/rules M host/Makefile.am 7 files changed, 72 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/Makefile b/Makefile index 1c00740..e9917c3 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,15 @@ fw: fw-simtrace-dfu fw-simtrace-trace fw-simtrace-cardem fw-qmod-dfu fw-qmod-cardem utils: - make -C host + (cd host && \ + autoreconf -fi && \ + ./configure --prefix=/usr --disable-werror && \ + make) clean: fw-clean - make -C host clean + if [ -e host/Makefile ]; then \ + make -C host clean; \ + fi install: make -C firmware install diff --git a/debian/changelog b/debian/changelog index a3da488..ccebd49 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +simtrace2 (0.5.2) UNRELEASED; urgency=medium + + * adapt to host tools in autotools + + -- Harald Welte Thu, 28 Nov 2019 00:44:57 +0100 + simtrace2 (0.5.1) unstable; urgency=medium * Backwards-compatibility with older (released, non-master) libosmocore diff --git a/debian/control b/debian/control index f30b1d3..cbe9f75 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,13 @@ Section: devel Priority: optional Build-Depends: debhelper (>= 9), + autotools-dev, + autoconf, + automake, + libtool, + pkg-config, + git, + dh-autoreconf, libosmocore-dev, libpcsclite-dev, libnewlib-arm-none-eabi, @@ -26,6 +33,33 @@ Section: devel Architecture: any Multi-Arch: same -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, libosmo-simtrace2-0 Recommends: simtrace2-firmware Description: Host utilities to communicate with SIMtrace2 USB Devices. + +Package: libosmo-simtrace2-0 +Section: libs +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Osmocom SIMtrace2 library + This library contains core "driver" functionality to interface with the + Osmocom SIMtrace2 (and compatible) USB device firmware. It enables + applications to implement SIM card / smart card tracing as well as + SIM / smart card emulation functions. + +Package: libosmo-simtrace2-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: libosmo-simtrace2-0, ${misc:Depends} +Description: Development headers for Osmocom SIMtrace2 library + This library contains core "driver" functionality to interface with the + Osmocom SIMtrace2 (and compatible) USB device firmware. It enables + applications to implement SIM card / smart card tracing as well as + SIM / smart card emulation functions. + . + The header files provided by this package may be used to develop + with any of the libosmocore libraries. + . + Also static libraries are installed with this package. diff --git a/debian/libosmo-simtrace2-0.install b/debian/libosmo-simtrace2-0.install new file mode 100644 index 0000000..383b232 --- /dev/null +++ b/debian/libosmo-simtrace2-0.install @@ -0,0 +1 @@ +usr/lib/libosmo-simtrace2*.so.* diff --git a/debian/libosmo-simtrace2-dev.install b/debian/libosmo-simtrace2-dev.install new file mode 100644 index 0000000..eec0e15 --- /dev/null +++ b/debian/libosmo-simtrace2-dev.install @@ -0,0 +1,5 @@ +usr/include/* +usr/lib/lib*.a +usr/lib/lib*.so +usr/lib/lib*.la +usr/lib/pkgconfig/* diff --git a/debian/rules b/debian/rules index 2d33f6a..2c615db 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,19 @@ #!/usr/bin/make -f +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2) +DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1) +VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions + + %: dh $@ + +override_dh_autoreconf: + cd host && dh_autoreconf diff --git a/host/Makefile.am b/host/Makefile.am index d1b3b31..de76851 100644 --- a/host/Makefile.am +++ b/host/Makefile.am @@ -5,6 +5,9 @@ EXTRA_DIST = .version git-version-gen +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libosmo-simtrace2.pc + @RELMAKE@ BUILT_SOURCES = $(top_srcdir)/.version -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16304 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I2377de1e8b149520922217a1ab16f6e22fe6462a Gerrit-Change-Number: 16304 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: don't wait for TCK if card only supports T0 In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 to look at the new patch set (#4). Change subject: don't wait for TCK if card only supports T0 ...................................................................... don't wait for TCK if card only supports T0 See 7816-3 8.2.5, T0 only (maybe implicitly) and no T15 = no TCK. This could be handled by a timeout instead, but timeouts don't work yet. Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add --- M ccid_common/iso7816_fsm.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/64/16264/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add Gerrit-Change-Number: 16264 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: sercom config for t1 In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 to look at the new patch set (#4). Change subject: sercom config for t1 ...................................................................... sercom config for t1 T0 doesn't work, as the datasheet states it's synchronous, apparently to the internal clock. That doesn't align too well with what 7816-3 says, so this already fails during the ATR after a few tries. Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 --- M sysmoOCTSIM/config/hpl_sercom_config.h 1 file changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/65/16265/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 Gerrit-Change-Number: 16265 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: split usb descriptor code In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16266 to look at the new patch set (#3). Change subject: split usb descriptor code ...................................................................... split usb descriptor code Change-Id: I9eb3606cfbaecf81f7ae80a9ea3d061a39088760 --- M sysmoOCTSIM/main.c M sysmoOCTSIM/usb/class/ccid/device/ccid_df.c M sysmoOCTSIM/usb_descriptors.c A sysmoOCTSIM/usb_descriptors.h 4 files changed, 105 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/66/16266/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9eb3606cfbaecf81f7ae80a9ea3d061a39088760 Gerrit-Change-Number: 16266 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: Add card_uart driver for ASF4 USART In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16267 to look at the new patch set (#3). Change subject: Add card_uart driver for ASF4 USART ...................................................................... Add card_uart driver for ASF4 USART Change-Id: Ic690055bc332ccca3de7c5f4429399cf9ff1d4da --- M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.h M ccid_host/ccid_slot_sim.c A sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/main.c 6 files changed, 531 insertions(+), 721 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/67/16267/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic690055bc332ccca3de7c5f4429399cf9ff1d4da Gerrit-Change-Number: 16267 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the uart ring buffer size In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 to look at the new patch set (#3). Change subject: increase the uart ring buffer size ...................................................................... increase the uart ring buffer size must be be a power of 2, and should be at least as large as the largest transfer that we might be waiting for - revisit this, is 256 enough? Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c --- M sysmoOCTSIM/driver_init.c 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/68/16268/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c Gerrit-Change-Number: 16268 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: talloc asserts In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 to look at the new patch set (#3). Change subject: talloc asserts ...................................................................... talloc asserts Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99 --- M sysmoOCTSIM/talloc.c 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/69/16269/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99 Gerrit-Change-Number: 16269 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: no logging, no memory pool In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 to look at the new patch set (#3). Change subject: no logging, no memory pool ...................................................................... no logging, no memory pool Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c 3 files changed, 15 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/70/16270/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca Gerrit-Change-Number: 16270 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: prevent uart interrupts before having proper structs In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 to look at the new patch set (#3). Change subject: prevent uart interrupts before having proper structs ...................................................................... prevent uart interrupts before having proper structs Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e --- M sysmoOCTSIM/main.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/71/16271/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e Gerrit-Change-Number: 16271 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: move iso7816_3 to common dir In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 to look at the new patch set (#3). Change subject: move iso7816_3 to common dir ...................................................................... move iso7816_3 to common dir Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92 --- R ccid_common/iso7816_3.c R ccid_common/iso7816_3.h M sysmoOCTSIM/gcc/Makefile 3 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/72/16272/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92 Gerrit-Change-Number: 16272 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart icc clock freq and divider setting support In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 to look at the new patch set (#3). Change subject: cuart icc clock freq and divider setting support ...................................................................... cuart icc clock freq and divider setting support Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e --- M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/ncn8025.c M sysmoOCTSIM/ncn8025.h 4 files changed, 43 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/73/16273/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e Gerrit-Change-Number: 16273 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid setparameters/PPS support In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 to look at the new patch set (#3). Change subject: ccid setparameters/PPS support ...................................................................... ccid setparameters/PPS support Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a --- M ccid_common/ccid_device.c M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M ccid_common/iso7816_fsm.h 5 files changed, 322 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/74/16274/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a Gerrit-Change-Number: 16274 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: attempt at handling card insertion/removal In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 to look at the new patch set (#3). Change subject: attempt at handling card insertion/removal ...................................................................... attempt at handling card insertion/removal Change-Id: I88130de7f889811425c0a2ca4063ea8822c83f66 --- M ccid_common/ccid_device.c M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M ccid_common/iso7816_fsm.h M sysmoOCTSIM/main.c 6 files changed, 89 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/75/16275/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I88130de7f889811425c0a2ca4063ea8822c83f66 Gerrit-Change-Number: 16275 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the debug uart buffer size In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 to look at the new patch set (#3). Change subject: increase the debug uart buffer size ...................................................................... increase the debug uart buffer size printing to the buffer is faster than getting the data out, so let's increase it a bit to drop less information Change-Id: I343b03d5b06962b90f0c1aaceda03aa871a2f98b --- M sysmoOCTSIM/driver_init.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/76/16276/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I343b03d5b06962b90f0c1aaceda03aa871a2f98b Gerrit-Change-Number: 16276 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to use the DWT unit In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 to look at the new patch set (#3). Change subject: debug code to use the DWT unit ...................................................................... debug code to use the DWT unit Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 --- M sysmoOCTSIM/main.c 1 file changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/77/16277/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 Gerrit-Change-Number: 16277 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to measure uart timing using the CAN header In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 to look at the new patch set (#3). Change subject: debug code to measure uart timing using the CAN header ...................................................................... debug code to measure uart timing using the CAN header Change-Id: I5f2c174076b5599dcb56f887330de27f470aeffc --- M ccid_common/iso7816_fsm.c M sysmoOCTSIM/hpl/sercom/hpl_sercom.c M sysmoOCTSIM/main.c 3 files changed, 37 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/78/16278/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I5f2c174076b5599dcb56f887330de27f470aeffc Gerrit-Change-Number: 16278 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: add a "no rx or tx" state In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 to look at the new patch set (#3). Change subject: add a "no rx or tx" state ...................................................................... add a "no rx or tx" state Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63 --- M ccid_common/cuart.h M ccid_common/iso7816_fsm.c M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 3 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/79/16279/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63 Gerrit-Change-Number: 16279 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: switching rx/tx is too slow, and not necessary In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 to look at the new patch set (#3). Change subject: switching rx/tx is too slow, and not necessary ...................................................................... switching rx/tx is too slow, and not necessary Change-Id: Ic91b3e183ba451b4e327e407aae0497273652f56 --- M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/80/16280/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic91b3e183ba451b4e327e407aae0497273652f56 Gerrit-Change-Number: 16280 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: add some volatility to debug missing state changes In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 to look at the new patch set (#3). Change subject: add some volatility to debug missing state changes ...................................................................... add some volatility to debug missing state changes Change-Id: I2e12e32ad27b03d73ba3533903c34abc2fcce37a --- M sysmoOCTSIM/main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/81/16281/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I2e12e32ad27b03d73ba3533903c34abc2fcce37a Gerrit-Change-Number: 16281 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: better ccid error handling, fix buffer leaks In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 to look at the new patch set (#3). Change subject: better ccid error handling, fix buffer leaks ...................................................................... better ccid error handling, fix buffer leaks Change-Id: Ib8b8524809e12608a7ade79ce7d7c3ced16eeb57 --- M ccid_common/ccid_device.c M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c 3 files changed, 30 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/82/16282/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib8b8524809e12608a7ade79ce7d7c3ced16eeb57 Gerrit-Change-Number: 16282 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: fix power descriptor value In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 to look at the new patch set (#3). Change subject: fix power descriptor value ...................................................................... fix power descriptor value The previous value would allow using the device without external power, i.e. on a hub, which leads to silent failures trying to power up the slots (nothing happens, no atr will be received) Change-Id: I40c48ea56151d13de362b8f73cae5b21aba0ebfa FIXME: The device should offer at least one 100mA configuration. --- M sysmoOCTSIM/usb_descriptors.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/83/16283/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I40c48ea56151d13de362b8f73cae5b21aba0ebfa Gerrit-Change-Number: 16283 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: fsm completion event handling from main loop In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16284 to look at the new patch set (#3). Change subject: fsm completion event handling from main loop ...................................................................... fsm completion event handling from main loop The main loop will now poll for finished/failed transactions and handle them, this was previously handled during the last rx interrupt of a transaction, which was bad for timing. This does also fix malloc/free while handling interrupts. Change-Id: I055110720089e20e65db592eccc3ce4d618e8c63 --- M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M sysmoOCTSIM/main.c 4 files changed, 68 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/84/16284/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16284 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I055110720089e20e65db592eccc3ce4d618e8c63 Gerrit-Change-Number: 16284 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: add a note for D=64 pecularities In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16285 to look at the new patch set (#3). Change subject: add a note for D=64 pecularities ...................................................................... add a note for D=64 pecularities Change-Id: Icf2845e0f07f2d23f5090d35b6d8d145ad65a2f8 --- M ccid_common/ccid_slot_fsm.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/85/16285/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16285 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Icf2845e0f07f2d23f5090d35b6d8d145ad65a2f8 Gerrit-Change-Number: 16285 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: pps warning In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16286 to look at the new patch set (#3). Change subject: pps warning ...................................................................... pps warning Change-Id: Ia125b7983e81342af224bc6e8771d8be4c4bfa42 --- M ccid_common/ccid_slot_fsm.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/86/16286/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia125b7983e81342af224bc6e8771d8be4c4bfa42 Gerrit-Change-Number: 16286 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: boost uart priority In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16287 to look at the new patch set (#3). Change subject: boost uart priority ...................................................................... boost uart priority Change-Id: I10ea17ca8b120c09b8926da010c9e358b219f7ed --- M sysmoOCTSIM/main.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/87/16287/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I10ea17ca8b120c09b8926da010c9e358b219f7ed Gerrit-Change-Number: 16287 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: the magic sauce that makes it work In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16288 to look at the new patch set (#3). Change subject: the magic sauce that makes it work ...................................................................... the magic sauce that makes it work 1mio concurrent select mf transfers, 5mhz, fi/di 512/32 Change-Id: Ica8539e4428ca3e3eb3e8ca9f5a5b50eb738ca8d --- M sysmoOCTSIM/hpl/sercom/hpl_sercom.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/88/16288/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ica8539e4428ca3e3eb3e8ca9f5a5b50eb738ca8d Gerrit-Change-Number: 16288 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: change uart ctl define names In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16289 to look at the new patch set (#3). Change subject: change uart ctl define names ...................................................................... change uart ctl define names Change-Id: I656e9e32c67d6e7b70a53f8f113583f25619e00f --- M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 3 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/89/16289/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16289 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I656e9e32c67d6e7b70a53f8f113583f25619e00f Gerrit-Change-Number: 16289 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart: allow getting the icc baud rate and clock freq In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16290 to look at the new patch set (#3). Change subject: cuart: allow getting the icc baud rate and clock freq ...................................................................... cuart: allow getting the icc baud rate and clock freq Change-Id: I577907e6c60582a80666d43b17c20de4e03cc8df --- M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/90/16290/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I577907e6c60582a80666d43b17c20de4e03cc8df Gerrit-Change-Number: 16290 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart: fix etu calculation In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16291 to look at the new patch set (#3). Change subject: cuart: fix etu calculation ...................................................................... cuart: fix etu calculation Change-Id: Ib2f83654bdaae5090bb1dfd75e0906551d6b6aa7 --- M ccid_common/cuart.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/91/16291/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib2f83654bdaae5090bb1dfd75e0906551d6b6aa7 Gerrit-Change-Number: 16291 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart cleanup In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16292 to look at the new patch set (#3). Change subject: cuart cleanup ...................................................................... cuart cleanup Change-Id: I15ea4d68263b62fca3da76795969358a07e7f1a6 --- M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 1 file changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/92/16292/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I15ea4d68263b62fca3da76795969358a07e7f1a6 Gerrit-Change-Number: 16292 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: first attempt at rx timeout handling In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16293 to look at the new patch set (#3). Change subject: first attempt at rx timeout handling ...................................................................... first attempt at rx timeout handling The general idea is to provide hints to cuart so it can calculate a reasonable timeout value when receiving multiple bytes instead of having per-byte timeouts Change-Id: Ia6ad2d83cea48a8661ed2e4eb50f9bcb85218454 --- M ccid_common/cuart.c M ccid_common/cuart.h M ccid_common/iso7816_fsm.c 3 files changed, 143 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/93/16293/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia6ad2d83cea48a8661ed2e4eb50f9bcb85218454 Gerrit-Change-Number: 16293 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: enable the final slot In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16294 to look at the new patch set (#3). Change subject: enable the final slot ...................................................................... enable the final slot The debug uart is shared with slot 7, so in order to use sim slot 7 the pin config and the uart config needs to be changed. Going back to using the debug uart works by defining ENABLE_DBG_UART7 Change-Id: I8f3c7c60306941159c35307a5c1e38c2a2bd2fe1 --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/atmel_start_pins.h M sysmoOCTSIM/command.c M sysmoOCTSIM/config/hpl_sercom_config.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/driver_init.h M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c D sysmoOCTSIM/manual_test.c M sysmoOCTSIM/stdio_start.c 12 files changed, 353 insertions(+), 264 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/94/16294/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I8f3c7c60306941159c35307a5c1e38c2a2bd2fe1 Gerrit-Change-Number: 16294 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:12:17 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:12:17 +0000 Subject: Change in osmo-ccid-firmware[master]: prettier slot bitmask code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 to look at the new patch set (#3). Change subject: prettier slot bitmask code ...................................................................... prettier slot bitmask code Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2 --- M sysmoOCTSIM/main.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/95/16295/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2 Gerrit-Change-Number: 16295 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:13:34 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 12:13:34 +0000 Subject: Change in libosmo-sccp[master]: Skip dynamic ASPs when writing the list of ASPs in an AS References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16305 ) Change subject: Skip dynamic ASPs when writing the list of ASPs in an AS ...................................................................... Skip dynamic ASPs when writing the list of ASPs in an AS we handle this correctly in not writing the actual "asp" configuration, but we have a bug when writing the list of asps within one "as". Let's make sure to skip the dynamically-created ASPs there, too. Change-Id: I1a184f3ddec2e91ced8c95ada224da8b490407a8 Closes: OS#4284 --- M src/osmo_ss7_vty.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/05/16305/1 diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index ebae5a5..591254e 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1044,6 +1044,9 @@ struct osmo_ss7_asp *asp = as->cfg.asps[i]; if (!asp) continue; + /* skip any dynamically created ASPs (e.g. auto-created at connect time) */ + if (asp->dyn_allocated || asp->simple_client_allocated) + continue; vty_out(vty, " asp %s%s", asp->cfg.name, VTY_NEWLINE); } if (as->cfg.mode_set_by_vty) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16305 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I1a184f3ddec2e91ced8c95ada224da8b490407a8 Gerrit-Change-Number: 16305 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:17:04 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 12:17:04 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: add tests for SMS and voice call while Paging In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 ) Change subject: msc: add tests for SMS and voice call while Paging ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/2/msc/MSC_Tests.ttcn File msc/MSC_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/2/msc/MSC_Tests.ttcn at 168 PS2, Line 168: private function f_logp(charstring log_msg) runs on BSC_ConnHdlr Does it really need to run on BSC_ConnHdlr? Can we move this function to library/ ? https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/2/msc/MSC_Tests.ttcn at 1938 PS2, Line 1938: spars.tp.ud := 'C8329BFD064D9B53'O; what are these hexstrings? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 Gerrit-Change-Number: 16297 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 12:17:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:18:06 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 12:18:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: fix 2 Iu tests: use f_mm_common() instead of f_mm_auth() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16299 ) Change subject: msc: fix 2 Iu tests: use f_mm_common() instead of f_mm_auth() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16299 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id2bf160ac4e1cad4770202c6a6f1b8eeeee21d68 Gerrit-Change-Number: 16299 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 12:18:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:18:22 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 12:18:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: msc: Iu: fix missing 'ran_is_geran := false' for TC_iu_lu_and_mt_sms_... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16300 ) Change subject: msc: Iu: fix missing 'ran_is_geran := false' for TC_iu_lu_and_mt_sms_paging_repeated ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16300 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I011795cacf62f2cac6861fe657966795e6370ddb Gerrit-Change-Number: 16300 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 12:18:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:19:35 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 12:19:35 +0000 Subject: Change in libosmo-sccp[master]: Skip dynamic ASPs when writing the list of ASPs in an AS In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16305 ) Change subject: Skip dynamic ASPs when writing the list of ASPs in an AS ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16305 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I1a184f3ddec2e91ced8c95ada224da8b490407a8 Gerrit-Change-Number: 16305 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 12:19:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:22:52 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 12:22:52 +0000 Subject: Change in osmo-msc[master]: fix incoming call while Paging In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16298 ) Change subject: fix incoming call while Paging ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16298 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be Gerrit-Change-Number: 16298 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 12:22:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:42:52 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:42:52 +0000 Subject: Change in osmo-ccid-firmware[master]: disable build for now References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16306 ) Change subject: disable build for now ...................................................................... disable build for now The firmware itself has priority, and the following patch series leads to a working firmware build, but contains commits that are not buildable. Change-Id: I778f525ab856b4966428c046c3eeee7a38692c07 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/06/16306/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index f3a0169..a993645 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,5 +1,5 @@ #!/bin/bash - +exit 0 if ! [ -x "$(command -v osmo-deps.sh)" ]; then echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" exit 2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I778f525ab856b4966428c046c3eeee7a38692c07 Gerrit-Change-Number: 16306 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 12:51:15 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 12:51:15 +0000 Subject: Change in osmo-ccid-firmware[master]: reenable firmware build References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16307 ) Change subject: reenable firmware build ...................................................................... reenable firmware build Host build is still disabled until it is fixed Change-Id: Iee56a50c0cd818887a8e9d8f2f660acaef16a8ca --- M contrib/jenkins.sh 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/07/16307/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a993645..f19fc35 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,5 +1,5 @@ #!/bin/bash -exit 0 + if ! [ -x "$(command -v osmo-deps.sh)" ]; then echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" exit 2 @@ -13,7 +13,7 @@ inst="$TOPDIR/install" export deps inst - +: ' echo echo "=============== libosmocore hostt build ===========" osmo-build-dep.sh libosmocore "" --disable-doxygen @@ -27,7 +27,7 @@ make clean make $PARALLEL_MAKE make clean - +' # adapted from echo echo "=============== libosmocore cross-build ===========" -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iee56a50c0cd818887a8e9d8f2f660acaef16a8ca Gerrit-Change-Number: 16307 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 13:04:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 13:04:30 +0000 Subject: Change in osmo-ttcn3-hacks[master]: initial checkin of CCID tests References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16308 ) Change subject: initial checkin of CCID tests ...................................................................... initial checkin of CCID tests Change-Id: I35f41cb0097a4408afe7c31f42463baaa47f15bd --- A ccid/CCID_Tests.cfg A ccid/CCID_Tests.default A ccid/CCID_Tests.ttcn A ccid/gen_links.sh A ccid/regen_makefile.sh M deps/Makefile 6 files changed, 260 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/08/16308/1 diff --git a/ccid/CCID_Tests.cfg b/ccid/CCID_Tests.cfg new file mode 100644 index 0000000..de427b2 --- /dev/null +++ b/ccid/CCID_Tests.cfg @@ -0,0 +1,20 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./CCID_Tests.default" + +# Local configuration below + +[LOGGING] +ConsoleMask := ERROR | WARNING | TESTCASE | USER; + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] + + +[MAIN_CONTROLLER] + +[EXECUTE] +CCID_Tests.control diff --git a/ccid/CCID_Tests.default b/ccid/CCID_Tests.default new file mode 100644 index 0000000..f441d67 --- /dev/null +++ b/ccid/CCID_Tests.default @@ -0,0 +1,8 @@ +[LOGGING] +mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC; + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] + +[EXECUTE] diff --git a/ccid/CCID_Tests.ttcn b/ccid/CCID_Tests.ttcn new file mode 100644 index 0000000..a985536 --- /dev/null +++ b/ccid/CCID_Tests.ttcn @@ -0,0 +1,199 @@ +module CCID_Tests { + +import from General_Types all; +import from Osmocom_Types all; +import from Misc_Helpers all; + +import from USB_PortType all; + +import from CCID_Types all; +import from CCID_Templates all; +import from CCID_Emulation all; + +/* global test component; manages CCID device */ +type component Test_CT { + var CCID_Emulation_CT vc_CCID; + port USB_PT USB; + var Slot_CT vc_SLOT[NR_SLOTS]; +}; + +/* per-slot test component; manages one slot */ +type component Slot_CT { + var uint8_t g_slot_nr; + port CCID_SLOT_PT CCID; + timer g_Tguard := 10.0; +}; + +private const integer NR_SLOTS := 4; + +/*********************************************************************** + * helper infrastructure + ***********************************************************************/ + +type function void_fn() runs on Slot_CT; + +/* altstep running on the per-slot test component */ +private altstep as_Tguard() runs on Slot_CT { + [] g_Tguard.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Tguard timeout"); + } +} + +/* first function inside Slot_CT; wait for CCID_EVENT_UP + call testcase-specific function */ +private function f_handler_init(void_fn fn, integer slot_nr) runs on Slot_CT { + g_slot_nr := slot_nr; + CCID.receive(CCID_Emulation_Event:{up_down:=CCID_EVENT_UP}); + g_Tguard.start; + activate(as_Tguard()); + + fn.apply(); +} + +/* start a single slot handler */ +private function f_start_handler(void_fn fn, integer slot_nr) runs on Test_CT +{ + var Slot_CT vc; + + vc_SLOT[slot_nr] := Slot_CT.create("Slot" & int2str(slot_nr)); + connect(vc_SLOT[slot_nr]:CCID, vc_CCID:SLOT[slot_nr]); + vc_SLOT[slot_nr].start(f_handler_init(fn, slot_nr)); +} + +private function f_wait_handlers_complete() runs on Test_CT { + var integer i; + + for (i := 0; i < NR_SLOTS; i := i+1) { + if (vc_SLOT[i] != null) { + vc_SLOT[i].done; + } + } + setverdict(pass); +} + +private function f_start_and_wait() runs on Test_CT { + /* start CCID_Emulation last, it will trigger all the per-slot components */ + vc_CCID.start(CCID_Emulation.main()); + f_wait_handlers_complete(); +} + +private function f_init() runs on Test_CT { + var integer i; + vc_CCID := CCID_Emulation_CT.create("CCID"); + map(vc_CCID:USB, system:USB); + for (i := 0; i < NR_SLOTS; i := i+1) { + vc_SLOT[i] := null; + } +} + +private function f_power_on(CCID_PowerSelect psel := CCID_PWRSEL_AUTO) runs on Slot_CT { + CCID.send(ts_CCID_IccPowerOn(g_slot_nr, psel)); + CCID.receive(tr_CCID_DataBlock(g_slot_nr)); +} + +private function f_xceive(octetstring tx, template octetstring rx) runs on Slot_CT return octetstring { + var CCID_PDU pdu; + + CCID.send(ts_CCID_XfrBlock(g_slot_nr, tx, 0)); + alt { + [] CCID.receive(tr_CCID_DataBlock(g_slot_nr, ?, rx)) -> value pdu { + return pdu.u.DataBlock.abData; + } + [] CCID.receive(tr_CCID_DataBlock(g_slot_nr, ?, ?)) -> value pdu { + setverdict(fail, "Received unexpected DataBlock ", pdu); + self.stop; + } + [] CCID.receive(CCID_PDU:?) -> value pdu { + setverdict(fail, "Received unexpected CCID ", pdu); + self.stop; + } + } + return ''O; +} + + +/*********************************************************************** + * actual test cases + ***********************************************************************/ + + +/* request 100 times the slot status */ +private function f_TC_getstatus() runs on Slot_CT +{ + var integer i; + for (i := 0; i < 100; i := i+1) { + CCID.send(ts_CCID_GetSlotStatus(g_slot_nr)); + /* it would be fun to simply send more requests here, but the CCID + * spec doesn't permit more than one unresponded command [per slot] */ + alt { + [] CCID.receive(tr_CCID_SlotStatus(g_slot_nr)); + [] CCID.receive { + setverdict(fail, "Unexpected data from device"); + } + } + } + setverdict(pass); +} +testcase TC_get_status() runs on Test_CT +{ + var integer i; + + f_init(); + + for (i := 0; i < NR_SLOTS; i := i+1) { + f_start_handler(refers(f_TC_getstatus), i); + } + + f_start_and_wait(); +} + + +private function f_TC_power_on() runs on Slot_CT +{ + f_power_on(); +} +testcase TC_power_on() runs on Test_CT +{ + var integer i; + + f_init(); + + for (i := 0; i < NR_SLOTS; i := i+1) { + f_start_handler(refers(f_TC_power_on), i); + } + + f_start_and_wait(); +} + +private function f_TC_select_mf() runs on Slot_CT +{ + var integer i; + f_power_on(); + for (i := 0; i < 10000; i := i+1) { + f_xceive('00a40004023f00'O, ?); + } +} +testcase TC_select_mf() runs on Test_CT +{ + var integer i; + + f_init(); + + for (i := 0; i < NR_SLOTS; i := i+1) { + f_start_handler(refers(f_TC_select_mf), i); + } + + f_start_and_wait(); +} + + + +control { + execute( TC_get_status() ); + execute( TC_power_on() ); + execute( TC_select_mf() ); +} + + + + +} diff --git a/ccid/gen_links.sh b/ccid/gen_links.sh new file mode 100755 index 0000000..e53954b --- /dev/null +++ b/ccid/gen_links.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +BASEDIR=../deps + +. ../gen_links.sh.inc + +#DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +#FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" +#gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.USB/src +FILES="USB_PT.cc USB_PT.hh USB_PortType.ttcn USB_PortTypes.ttcn USB_Templates.ttcn USB_Types.ttcn USB_Component.ttcn " +FILES+="CCID_Types.ttcn CCID_Templates.ttcn CCID_Emulation.ttcn " +gen_links $DIR $FILES + +DIR=../library +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn " +FILES+="Native_Functions.ttcn Native_FunctionDefs.cc " +gen_links $DIR $FILES + +ignore_pp_results diff --git a/ccid/regen_makefile.sh b/ccid/regen_makefile.sh new file mode 100755 index 0000000..215d9c6 --- /dev/null +++ b/ccid/regen_makefile.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +FILES="*.ttcn USB_PT.cc Native_FunctionDefs.cc " + +../regen-makefile.sh CCID_Tests.ttcn $FILES + +#sed -i -e 's/^LINUX_LIBS = -lxml2/LINUX_LIBS = -lxml2 -lusb/' Makefile +sed -i -e '/^LINUX_LIBS/ s/$/ `pkg-config --libs libusb-1.0`/' Makefile +sed -i -e '/^CPPFLAGS/ s/$/ `pkg-config --cflags libusb-1.0`/' Makefile diff --git a/deps/Makefile b/deps/Makefile index 2d8f687..5d263aa 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -67,7 +67,8 @@ titan.ProtocolEmulations.M3UA OSMOGIT_REPOS= titan.ProtocolModules.MAP \ - titan.ProtocolModules.BSSMAP + titan.ProtocolModules.BSSMAP \ + titan.TestPorts.USB ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS) @@ -121,6 +122,7 @@ titan.TestPorts.TELNETasp_commit= R.9.A titan.TestPorts.UDPasp_commit= R.8.A titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-4-gbacd73d +titan.TestPorts.USB_commit= master all: $(foreach dir,$(ALL_REPOS),$(dir)/update) clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16308 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I35f41cb0097a4408afe7c31f42463baaa47f15bd Gerrit-Change-Number: 16308 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 13:04:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 13:04:30 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ccid: Increase guard timeout to 120s References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16309 ) Change subject: ccid: Increase guard timeout to 120s ...................................................................... ccid: Increase guard timeout to 120s Change-Id: Ie824dcf7b3f0d50ba4652d1a6e46d9ed81c5f069 --- M ccid/CCID_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/09/16309/1 diff --git a/ccid/CCID_Tests.ttcn b/ccid/CCID_Tests.ttcn index a985536..cf615d4 100644 --- a/ccid/CCID_Tests.ttcn +++ b/ccid/CCID_Tests.ttcn @@ -21,7 +21,7 @@ type component Slot_CT { var uint8_t g_slot_nr; port CCID_SLOT_PT CCID; - timer g_Tguard := 10.0; + timer g_Tguard := 120.0; }; private const integer NR_SLOTS := 4; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16309 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie824dcf7b3f0d50ba4652d1a6e46d9ed81c5f069 Gerrit-Change-Number: 16309 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 13:04:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 13:04:31 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ccid: Many more CCID tests References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16310 ) Change subject: ccid: Many more CCID tests ...................................................................... ccid: Many more CCID tests Change-Id: Id046aff7c35b5ad3ab55fdf53a53e7637602d147 --- M ccid/CCID_Tests.ttcn 1 file changed, 404 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/10/16310/1 diff --git a/ccid/CCID_Tests.ttcn b/ccid/CCID_Tests.ttcn index cf615d4..f6816be 100644 --- a/ccid/CCID_Tests.ttcn +++ b/ccid/CCID_Tests.ttcn @@ -1,15 +1,27 @@ module CCID_Tests { +/* TTCN-3 tests for USB CCID (Chip Card Interface Device) + * + * (C) 2018-2019 by Harald Welte + */ + import from General_Types all; import from Osmocom_Types all; import from Misc_Helpers all; import from USB_PortType all; +import from USB_Component all; import from CCID_Types all; import from CCID_Templates all; import from CCID_Emulation all; +modulepar { + USB_Device_Match mp_usb_dev_match := { vid_pid := { vid := '1df0'H, pid := '6141'H } }; + integer mp_use_slot_count := 8; + boolean mp_test_power_off := true; + boolean mp_quirk_resetpar_returns_slotsts := false; +} /* global test component; manages CCID device */ type component Test_CT { var CCID_Emulation_CT vc_CCID; @@ -24,12 +36,16 @@ timer g_Tguard := 120.0; }; -private const integer NR_SLOTS := 4; +/* maximum number of slots we are supporting in the test suite */ +private const integer NR_SLOTS := 16; /*********************************************************************** * helper infrastructure ***********************************************************************/ +const octetstring c_UICC_SELECT_MF := '00a40004023f00'O; +const octetstring c_SIM_SELECT_MF := 'a0a40004023f00'O; + type function void_fn() runs on Slot_CT; /* altstep running on the per-slot test component */ @@ -39,6 +55,18 @@ } } +private altstep as_ccid_any() runs on Slot_CT { + var CCID_PDU pdu; + [] CCID.receive(CCID_PDU:?) -> value pdu { + setverdict(fail, "Received unexpected CCID ", pdu); + self.stop; + } + [] CCID.receive { + setverdict(fail, "Received unexpected non-CCID"); + self.stop; + } +} + /* first function inside Slot_CT; wait for CCID_EVENT_UP + call testcase-specific function */ private function f_handler_init(void_fn fn, integer slot_nr) runs on Slot_CT { g_slot_nr := slot_nr; @@ -72,7 +100,8 @@ private function f_start_and_wait() runs on Test_CT { /* start CCID_Emulation last, it will trigger all the per-slot components */ - vc_CCID.start(CCID_Emulation.main()); + var CCID_Emulation_Params cep := { usb_dev_match := mp_usb_dev_match }; + vc_CCID.start(CCID_Emulation.main(cep)); f_wait_handlers_complete(); } @@ -85,37 +114,125 @@ } } -private function f_power_on(CCID_PowerSelect psel := CCID_PWRSEL_AUTO) runs on Slot_CT { - CCID.send(ts_CCID_IccPowerOn(g_slot_nr, psel)); - CCID.receive(tr_CCID_DataBlock(g_slot_nr)); -} -private function f_xceive(octetstring tx, template octetstring rx) runs on Slot_CT return octetstring { +/* transceive a CCID command (send 'tx' on OUT; expect 'rx' on IN) */ +private function f_ccid_xceive(template (value) CCID_PDU tx, template (present) CCID_PDU exp_rx) +runs on Slot_CT return CCID_PDU { var CCID_PDU pdu; - CCID.send(ts_CCID_XfrBlock(g_slot_nr, tx, 0)); + tx.hdr.bSlot := g_slot_nr; + exp_rx.hdr.bSlot := g_slot_nr; + + CCID.send(tx); alt { - [] CCID.receive(tr_CCID_DataBlock(g_slot_nr, ?, rx)) -> value pdu { - return pdu.u.DataBlock.abData; + [] CCID.receive(exp_rx) -> value pdu { + return pdu; } - [] CCID.receive(tr_CCID_DataBlock(g_slot_nr, ?, ?)) -> value pdu { - setverdict(fail, "Received unexpected DataBlock ", pdu); - self.stop; - } - [] CCID.receive(CCID_PDU:?) -> value pdu { - setverdict(fail, "Received unexpected CCID ", pdu); - self.stop; - } + [] as_ccid_any(); } - return ''O; + return pdu; +} + +private template (present) CCID_Header_IN tr_inact := + tr_CCID_HeaderIN_OK(icc_status := (CCID_ICC_STATUS_PRES_INACT, CCID_ICC_STATUS_NO_ICC)); + +private template (present) CCID_Header_IN tr_act := + tr_CCID_HeaderIN_OK(icc_status := CCID_ICC_STATUS_PRES_ACT); + +/* Send IccPowerOn on OUT; expect DataBlock in retunr */ +private function f_ccid_power_on(CCID_PowerSelect psel := CCID_PWRSEL_AUTO, + template (present) CCID_Header_IN hdr_in := tr_act) +runs on Slot_CT return CCID_PDU { + var CCID_PDU pdu; + + pdu := f_ccid_xceive(ts_CCID_IccPowerOn(g_slot_nr, psel), + tr_CCID_DataBlock(g_slot_nr, hdr_in := hdr_in) ); + return pdu; +} + +/* Send IccPowerOn on OUT; expect SlotStatus in return */ +private function f_ccid_power_off(template (present) CCID_Header_IN hdr_in := tr_inact) +runs on Slot_CT return CCID_PDU { + var CCID_PDU pdu; + + pdu := f_ccid_xceive(ts_CCID_IccPowerOff(g_slot_nr), + tr_CCID_SlotStatus(slot := g_slot_nr, hdr_in := hdr_in) ); + return pdu; +} + +/* Send IccClockCommand on OUT; expect SlotStatus in return */ +private function f_ccid_clock_cmd(CCID_ClockCommand cmd, + template (present) CCID_Header_IN hdr_in := tr_CCID_HeaderIN_OK) +runs on Slot_CT return CCID_PDU { + var CCID_PDU pdu; + + pdu := f_ccid_xceive(ts_CCID_ClockCommand(g_slot_nr, cmd), + tr_CCID_SlotStatus(slot := g_slot_nr, hdr_in := hdr_in)); + return pdu; +} + +/* Send XfrBlock on OUT; expect DataBlock in return */ +private function f_ccid_xfr(octetstring tx, template octetstring rx) runs on Slot_CT return octetstring { + var CCID_PDU pdu; + + pdu := f_ccid_xceive(ts_CCID_XfrBlock(g_slot_nr, tx, 0), + tr_CCID_DataBlock(g_slot_nr, ?, ?, rx) ); + return pdu.u.DataBlock.abData; +} + +/* Send SetParameters on OUT; expect Parameters on IN */ +private function f_ccid_set_par(template (value) CCID_ProtocolData par, + template (present) CCID_Header_IN hdr_in := tr_CCID_HeaderIN_OK) +runs on Slot_CT return CCID_PDU { + var CCID_PDU pdu; + + pdu := f_ccid_xceive(ts_CCID_SetParameters(g_slot_nr, par), + tr_CCID_Parameters(g_slot_nr, hdr_in := hdr_in)); + return pdu; +} + +/* Send GetParameters on OUT; expect Parameters on IN */ +private function f_ccid_get_par(template (present) CCID_Header_IN hdr_in := tr_CCID_HeaderIN_OK) +runs on Slot_CT return CCID_PDU { + var CCID_PDU pdu; + + pdu := f_ccid_xceive(ts_CCID_GetParameters(g_slot_nr), + tr_CCID_Parameters(g_slot_nr, hdr_in := hdr_in)); + return pdu; +} + +/* Send ResetParameters on OUT; expect Parameters on IN */ +private function f_ccid_reset_par(template (present) CCID_Header_IN hdr_in := tr_CCID_HeaderIN_OK) +runs on Slot_CT return CCID_PDU { + var CCID_PDU pdu; + + /* [at least] Omnikey seems to have failed to follow the CCID spec here :/ */ + if (mp_quirk_resetpar_returns_slotsts) { + pdu := f_ccid_xceive(ts_CCID_ResetParameters(g_slot_nr), + tr_CCID_SlotStatus(g_slot_nr, hdr_in := hdr_in)); + } else { + pdu := f_ccid_xceive(ts_CCID_ResetParameters(g_slot_nr), + tr_CCID_Parameters(g_slot_nr, hdr_in := hdr_in)); + } + return pdu; +} + +/* Send Escape on OUT; expect Escape on IN */ +private function f_ccid_escape(template (value) octetstring data, + template (present) CCID_Header_IN hdr_in := tr_CCID_HeaderIN_OK) +runs on Slot_CT return CCID_PDU { + var CCID_PDU pdu; + + pdu := f_ccid_xceive(ts_CCID_Escape(g_slot_nr, data), + tr_CCID_EscapeIN(g_slot_nr, hdr_in := hdr_in)); + return pdu; } /*********************************************************************** - * actual test cases + * Test behavior regarding valid situations ***********************************************************************/ - /* request 100 times the slot status */ private function f_TC_getstatus() runs on Slot_CT { @@ -126,9 +243,7 @@ * spec doesn't permit more than one unresponded command [per slot] */ alt { [] CCID.receive(tr_CCID_SlotStatus(g_slot_nr)); - [] CCID.receive { - setverdict(fail, "Unexpected data from device"); - } + [] as_ccid_any(); } } setverdict(pass); @@ -139,7 +254,7 @@ f_init(); - for (i := 0; i < NR_SLOTS; i := i+1) { + for (i := 0; i < mp_use_slot_count; i := i+1) { f_start_handler(refers(f_TC_getstatus), i); } @@ -149,7 +264,7 @@ private function f_TC_power_on() runs on Slot_CT { - f_power_on(); + f_ccid_power_on(); } testcase TC_power_on() runs on Test_CT { @@ -157,19 +272,65 @@ f_init(); - for (i := 0; i < NR_SLOTS; i := i+1) { + for (i := 0; i < mp_use_slot_count; i := i+1) { f_start_handler(refers(f_TC_power_on), i); } f_start_and_wait(); } +private function f_TC_power_off() runs on Slot_CT +{ + f_ccid_power_on(); + f_ccid_power_off(); +} +testcase TC_power_off() runs on Test_CT +{ + var integer i; + + f_init(); + + for (i := 0; i < mp_use_slot_count; i := i+1) { + f_start_handler(refers(f_TC_power_off), i); + } + + f_start_and_wait(); +} + + +/* repeat IccPowerOn on slot that's already active (next warm reset ATR) */ +private function f_TC_power_on_warm() runs on Slot_CT +{ + var integer i; + + /* initial power on */ + f_ccid_power_on(); + + /* additional power on */ + for (i := 0; i < 20; i := i+1) { + f_ccid_power_on(); + } +} +testcase TC_power_on_warm() runs on Test_CT +{ + var integer i; + + f_init(); + + for (i := 0; i < mp_use_slot_count; i := i+1) { + f_start_handler(refers(f_TC_power_on_warm), i); + } + + f_start_and_wait(); +} + +/* transfer 1000 APDUs by issuing SELECT MF */ private function f_TC_select_mf() runs on Slot_CT { var integer i; - f_power_on(); - for (i := 0; i < 10000; i := i+1) { - f_xceive('00a40004023f00'O, ?); + f_ccid_power_on(); + for (i := 0; i < 1000; i := i+1) { + f_ccid_xfr(c_UICC_SELECT_MF, ?); } } testcase TC_select_mf() runs on Test_CT @@ -178,19 +339,231 @@ f_init(); - for (i := 0; i < NR_SLOTS; i := i+1) { + for (i := 0; i < mp_use_slot_count; i := i+1) { f_start_handler(refers(f_TC_select_mf), i); } f_start_and_wait(); } +/* GetParametrs: verify contents */ +private function f_TC_get_params() runs on Slot_CT +{ + var CCID_PDU par; + f_ccid_power_on(); + par := f_ccid_get_par(); + log(par); +} +testcase TC_get_params() runs on Test_CT +{ + var integer i; + + f_init(); + + for (i := 0; i < mp_use_slot_count; i := i+1) { + f_start_handler(refers(f_TC_get_params), i); + } + f_start_and_wait(); +} + +/* SetParameters: verify change */ +private function f_TC_set_params() runs on Slot_CT +{ + var CCID_PDU par; + f_ccid_power_on(); + + /* get current parameters */ + par := f_ccid_get_par(); + + /* modify some of them */ + var CCID_ProtocolData pd := par.u.Parameters.abProtocolData; + pd.T0.bGuardTimeT0 := 23; + pd.T0.bWaitingIntegerT0 := 42; + par := f_ccid_set_par(pd); + + /* check if modifications were applied */ + var template (present) CCID_ProtocolData tr_PD := { + T0 := { + Findex := ?, + Dindex := ?, + bRFU := ?, + inv_convention := ?, + bRFU2 := ?, + bGuardTimeT0 := 23, + bWaitingIntegerT0 := 42, + bClockStop := ? + } + }; + if (match(par.u.Parameters.abProtocolData, tr_PD)) { + setverdict(pass); + } else { + setverdict(fail, "SetParameters didn't change GuardTime/WaitingInteger"); + } +} +testcase TC_set_params() runs on Test_CT +{ + var integer i; + + f_init(); + + for (i := 0; i < mp_use_slot_count; i := i+1) { + f_start_handler(refers(f_TC_set_params), i); + } + f_start_and_wait(); +} + +/* ResetParameters: verify change */ +private function f_TC_reset_params() runs on Slot_CT +{ + var CCID_PDU par; + + f_TC_set_params(); + par := f_ccid_reset_par(); + if (mp_quirk_resetpar_returns_slotsts) { + par := f_ccid_get_par(); + } + if (par.u.Parameters.abProtocolData.T0.bGuardTimeT0 == 23 or + par.u.Parameters.abProtocolData.T0.bWaitingIntegerT0 == 42) { + setverdict(fail, "ResetParameters didn't reset properly"); + } +} +testcase TC_reset_params() runs on Test_CT +{ + var integer i; + + f_init(); + + for (i := 0; i < mp_use_slot_count; i := i+1) { + f_start_handler(refers(f_TC_reset_params), i); + } + f_start_and_wait(); +} + + + +/* TODO */ +/* IccPowerOn: verify that CCID resets all parameters to default values */ +/* IccPowerOn: verify that bPowerSelect has no effect in active state */ +/* XfrBlock: length corner cases (Lc/Le max, ...) */ +/* IccClock: verify clock has stopped/restarted */ +/* Abort for command that already terminated */ +/* Abort for command that's still processing */ + + +/*********************************************************************** + * Test behavior regarding invalid situations + ***********************************************************************/ + +/* message for invalid slot number (more than we have) */ +private function f_TC_inval_slot() runs on Slot_CT { + CCID.send(ts_CCID_GetSlotStatus(g_slot_nr)); + alt { + [] CCID.receive(tr_CCID_SlotStatus(hdr_in := tr_CCID_HeaderIN_FAIL(CCID_ERR_SLOT_NOT_EXIST))) { + setverdict(pass); + } + [] CCID.receive(tr_CCID_SlotStatus) { + setverdict(fail, "Unexpected SlotStatus"); + mtc.stop; + } + [] as_ccid_any(); + } +} +testcase TC_inval_slot() runs on Test_CT { + f_init(); + f_start_handler(refers(f_TC_inval_slot), 15); + f_start_and_wait(); +} + +/* switch card off and then XfrBlock. Requires reader with IccPowerOff support */ +private function f_TC_xfer_off() runs on Slot_CT { + f_ccid_power_off(); + CCID.send(ts_CCID_XfrBlock(g_slot_nr, c_SIM_SELECT_MF, 0)); + alt { + [] CCID.receive(tr_CCID_DataBlock(slot:=g_slot_nr, hdr_in:=tr_CCID_HeaderIN_FAIL)) { + setverdict(pass); + } + [] CCID.receive(tr_CCID_DataBlock(slot:=g_slot_nr, hdr_in:=tr_CCID_HeaderIN_OK)) { + setverdict(fail, "Expected XfrBlock to fail"); + mtc.stop; + } + [] as_ccid_any(); + } +} +testcase TC_xfer_off() runs on Test_CT { + f_init(); + f_start_handler(refers(f_TC_xfer_off), 0); + f_start_and_wait(); +} + + +/* unsupported Mechanical */ +private function f_TC_unsupp_mechanical() runs on Slot_CT { + CCID.send(ts_CCID_Mechanical(g_slot_nr, CCID_MECH_FN_EJECT_CARD)); + alt { + [] CCID.receive(tr_CCID_SlotStatus(hdr_in := tr_CCID_HeaderIN_FAIL(CCID_ERR_CMD_NOT_SUPPORTED))) { + setverdict(pass); + } + [] as_ccid_any(); + } +} +testcase TC_unsupp_mechanical() runs on Test_CT { + f_init(); + f_start_handler(refers(f_TC_unsupp_mechanical), 0); + f_start_and_wait(); +} + +/* unsupported Secure */ +private function f_TC_unsupp_secure() runs on Slot_CT { + CCID.send(ts_CCID_Secure(g_slot_nr, 0, 0, ''O)); + alt { + [] CCID.receive(tr_CCID_DataBlock(hdr_in := tr_CCID_HeaderIN_FAIL(CCID_ERR_CMD_NOT_SUPPORTED))) { + setverdict(pass); + } + [] as_ccid_any(); + } +} +testcase TC_unsupp_secure() runs on Test_CT { + f_init(); + f_start_handler(refers(f_TC_unsupp_secure), 0); + f_start_and_wait(); +} + + +/* TODO */ +/* truncated message */ +/* IccPowerOn with wrong voltage (> 0x04) */ +/* XfrBlock on empty slot */ +/* GetParameters on empty slot */ +/* SetParameters for bProtocolNum > 0x01 */ +/* SetParameters: invalid parameters */ +/* set unsupported frequency */ +/* set unsupported clock rate */ +/* XfrBlock: bWI in T=0? */ +/* XfrBlock: wLevelParameter not matching level? */ +/* Abort for command that was not even submitted yet*/ +/* dwMaxCCIDMessageLength */ control { + /* valid transactions */ execute( TC_get_status() ); execute( TC_power_on() ); + execute( TC_power_on_warm() ); + if (mp_test_power_off) { + execute( TC_power_off() ); + } execute( TC_select_mf() ); + execute( TC_get_params() ); + execute( TC_set_params() ); + execute( TC_reset_params() ); + + /* error handling */ + execute( TC_inval_slot() ); + if (mp_test_power_off) { + execute( TC_xfer_off() ); + } + execute( TC_unsupp_mechanical() ); + execute( TC_unsupp_secure() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16310 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id046aff7c35b5ad3ab55fdf53a53e7637602d147 Gerrit-Change-Number: 16310 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 13:04:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 13:04:31 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pps exchange after power on References: Message-ID: Hello Hoernchen, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16311 to review the following change. Change subject: pps exchange after power on ...................................................................... pps exchange after power on Change-Id: Ibe289de5134eec4f7ba26c75ceb4714ad523f0da --- M ccid/CCID_Tests.ttcn 1 file changed, 49 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/11/16311/1 diff --git a/ccid/CCID_Tests.ttcn b/ccid/CCID_Tests.ttcn index f6816be..c620b0b 100644 --- a/ccid/CCID_Tests.ttcn +++ b/ccid/CCID_Tests.ttcn @@ -46,6 +46,54 @@ const octetstring c_UICC_SELECT_MF := '00a40004023f00'O; const octetstring c_SIM_SELECT_MF := 'a0a40004023f00'O; +/* Table 7 of ISO7816-3 */ +type enumerated ISO7816_Fi { + ISO7816_FI_372_4MHz ('0000'B), + ISO7816_FI_372_5MHz ('0001'B), + ISO7816_FI_558_6MHz ('0010'B), + ISO7816_FI_744_8MHz ('0011'B), + ISO7816_FI_1116_12MHz ('0100'B), + ISO7816_FI_1488_16MHz ('0101'B), + ISO7816_FI_1860_20MHz ('0110'B), + + ISO7816_FI_512_5MHz ('1001'B), + ISO7816_FI_768_7MHz ('1010'B), + ISO7816_FI_1024_10MHz ('1011'B), + ISO7816_FI_1536_15MHz ('1100'B), + ISO7816_FI_2048_20MHz ('1101'B) +}; + +/* Table 8 of ISO7816-3 */ +type enumerated ISO7816_Di { + ISO7816_DI_1 ('0001'B), + ISO7816_DI_2 ('0010'B), + ISO7816_DI_4 ('0011'B), + ISO7816_DI_8 ('0100'B), + ISO7816_DI_16 ('0101'B), + ISO7816_DI_32 ('0110'B), + ISO7816_DI_64 ('0111'B), + + ISO7816_DI_12 ('1000'B), + ISO7816_DI_20 ('1001'B) +} + +private template (value) CCID_ProtocolData ts_ProtoDataT0(ISO7816_Fi fi, ISO7816_Di di, + uint8_t guard_time := 0, + uint8_t wait_int := 0) := { + T0 := { + Findex := enum2int(fi), + Dindex := enum2int(di), + + bRFU := '000000'B, + inv_convention := false, + bRFU2 := '0'B, + + bGuardTimeT0 := guard_time, + bWaitingIntegerT0 := wait_int, + bClockStop := STOPPING_NOT_ALLOWED + } +}; + type function void_fn() runs on Slot_CT; /* altstep running on the per-slot test component */ @@ -329,6 +377,7 @@ { var integer i; f_ccid_power_on(); + f_ccid_set_par(ts_ProtoDataT0(ISO7816_FI_512_5MHz, ISO7816_DI_32)); for (i := 0; i < 1000; i := i+1) { f_ccid_xfr(c_UICC_SELECT_MF, ?); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16311 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ibe289de5134eec4f7ba26c75ceb4714ad523f0da Gerrit-Change-Number: 16311 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 13:04:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 13:04:55 +0000 Subject: Change in osmo-ttcn3-hacks[master]: ccid: Increase guard timeout to 120s In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16309 ) Change subject: ccid: Increase guard timeout to 120s ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16309 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie824dcf7b3f0d50ba4652d1a6e46d9ed81c5f069 Gerrit-Change-Number: 16309 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 13:04:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 13:05:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 13:05:16 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: attempt to use iso7816_fsm + Cuart from firmware In-Reply-To: References: Message-ID: laforge has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15724 ) Change subject: WIP: attempt to use iso7816_fsm + Cuart from firmware ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15724 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I1d7c9371406ecfadc565fdf047dd935eceeee48f Gerrit-Change-Number: 15724 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Assignee: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 13:05:20 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 13:05:20 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: Add card_uart driver for ASF4 USART In-Reply-To: References: Message-ID: laforge has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15723 ) Change subject: WIP: Add card_uart driver for ASF4 USART ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/15723 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9a141e9d2125fbfc992ad51aa4b11a39ee186607 Gerrit-Change-Number: 15723 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Assignee: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:11:54 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 28 Nov 2019 14:11:54 +0000 Subject: Change in osmo-sip-connector[master]: mncc.c: fix gsm_mncc_rtp size checks References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16312 ) Change subject: mncc.c: fix gsm_mncc_rtp size checks ...................................................................... mncc.c: fix gsm_mncc_rtp size checks Verify is the parsed data is at least the size of the struct, not exactly the size. Make it accept messages with additional data, like the SDP information the TTCN-3 testsuite is sending since Ic9568c8927507e161aadfad1a4d20aa896d8ae30. This change makes the size checks consistent with the two other size checks in the file: if (rc < sizeof(*rtp)) { if (rc < sizeof(**mncc)) { Related: OS#4282 Change-Id: I522ce7f206932a816a64f03d916799c3215bb8c7 --- M src/mncc.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/12/16312/1 diff --git a/src/mncc.c b/src/mncc.c index f2e2579..16eed96 100644 --- a/src/mncc.c +++ b/src/mncc.c @@ -472,7 +472,7 @@ struct call *call; struct mncc_call_leg *leg; - if (rc != sizeof(*data)) { + if (rc < sizeof(*data)) { LOGP(DMNCC, LOGL_ERROR, "gsm_mncc of wrong size %d vs. %zu\n", rc, sizeof(*data)); return close_connection(conn); @@ -548,7 +548,7 @@ { struct mncc_call_leg *leg; - if (rc != sizeof(**mncc)) { + if (rc < sizeof(**mncc)) { LOGP(DMNCC, LOGL_ERROR, "gsm_mncc of wrong size %d vs. %zu\n", rc, sizeof(**mncc)); close_connection(conn); -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16312 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: I522ce7f206932a816a64f03d916799c3215bb8c7 Gerrit-Change-Number: 16312 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:12:21 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 28 Nov 2019 14:12:21 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sip: add osmo-sip-connector.cfg References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16313 ) Change subject: sip: add osmo-sip-connector.cfg ...................................................................... sip: add osmo-sip-connector.cfg Add config that works with SIP_Tests.default. Change-Id: I820a6573fafea9990eabcf40f1b7745558717cc7 --- A sip/osmo-sip-connector.cfg 1 file changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/13/16313/1 diff --git a/sip/osmo-sip-connector.cfg b/sip/osmo-sip-connector.cfg new file mode 100644 index 0000000..59f89db --- /dev/null +++ b/sip/osmo-sip-connector.cfg @@ -0,0 +1,25 @@ +! +! OsmoMNCC (1.1.0-dirty) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging print file basename + logging level all debug +! +stats interval 5 +! +line vty + no login + bind 127.0.0.1 +! +sip + local 127.0.0.1 5060 + remote 127.0.0.2 5060 +mncc + socket-path /tmp/mncc +app -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16313 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I820a6573fafea9990eabcf40f1b7745558717cc7 Gerrit-Change-Number: 16313 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:12:21 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 28 Nov 2019 14:12:21 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/MNCC_Types: fix sdp in tr_MNCC_* References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 ) Change subject: library/MNCC_Types: fix sdp in tr_MNCC_* ...................................................................... library/MNCC_Types: fix sdp in tr_MNCC_* Make sure it is * everywhere, not "". Partially fix the SIP tests, where tr_MNCC_RTP_CONNECT did not match anymore: 13:15:27.516387 5 SIP_Tests.ttcn:219 Message enqueued on MNCC from SIP_Test-MNCC(3) @MNCC_Types.MNCC_PDU : { msg_type := MNCC_RTP_CONNECT (517), u := { rtp := { callref := 5001, ip := 0, rtp_port := 0, payload_type := 0, payload_msg_type := 0, sdp := "0" } } } id 3 13:15:27.516604 5 SIP_Tests.ttcn:221 Matching on port MNCC .u.rtp.sdp := "0" with "" unmatched: First message in the queue does not match the template: Together with I522ce7f206932a816a64f03d916799c3215bb8c7 in osmo-sip-connector.git, this makes the testsuite work again for osmo-sip-connector master. In order to fix the TTCN-3 tests for the latest release, we would need to add a second code path to the TTCN-3 code, that does not send the sdp data based on a configuration option. Considering that I've spent quite some time already to fix this up, it does not seem worth the effort. Related: OS#4282 Fixes: 06b859ca314f53a902329ed95848dbafef1d4f87 ("msc: add sdp to MNCC") Change-Id: Ic7a2df0b6faeaa88682880f816518618ced79a7e --- M library/MNCC_Types.ttcn 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/16314/1 diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn index 5296579..0a8e7d9 100644 --- a/library/MNCC_Types.ttcn +++ b/library/MNCC_Types.ttcn @@ -1478,7 +1478,7 @@ imsi := ?, lchan_type := 0, lchan_mode := 0, - sdp := "" + sdp := * } } } @@ -1856,7 +1856,7 @@ imsi := "", lchan_type := 0, lchan_mode := 0, - sdp := "" + sdp := * } } } @@ -1977,7 +1977,7 @@ rtp_port := rtp_port, payload_type := pt, payload_msg_type := 0, - sdp := "" + sdp := * } } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic7a2df0b6faeaa88682880f816518618ced79a7e Gerrit-Change-Number: 16314 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:12:42 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 28 Nov 2019 14:12:42 +0000 Subject: Change in osmo-dev[master]: ttcn3.sh: support sip (osmo-sip-connector) References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/16315 ) Change subject: ttcn3.sh: support sip (osmo-sip-connector) ...................................................................... ttcn3.sh: support sip (osmo-sip-connector) Change-Id: I9eed35628f25be37bf0190e5d5797d792c1f0ef9 --- M ttcn3/ttcn3.sh 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/15/16315/1 diff --git a/ttcn3/ttcn3.sh b/ttcn3/ttcn3.sh index 4cb4344..5322182 100755 --- a/ttcn3/ttcn3.sh +++ b/ttcn3/ttcn3.sh @@ -10,7 +10,7 @@ if [ -z "$PROJECT" ]; then echo "usage: $(basename $0) PROJECT" echo "example: $(basename $0) hlr" - echo "known working projects: hlr, mgw, msc, pcu, pcu-sns, sgsn" + echo "known working projects: hlr, mgw, msc, pcu, pcu-sns, sip, sgsn" echo "wip: bts, bts-oml" echo "" echo "notes (see docker-playground.git/ttcn3-*/jenkins.sh):" @@ -59,6 +59,7 @@ pcu-sns) echo "osmo-pcu" ;; pcu) echo "osmo-pcu osmo-bsc osmo-bts-virtual virtphy" ;; sgsn) echo "osmo-stp osmo-sgsn" ;; + sip) echo "osmo-sip-connector" ;; *) echo "osmo-$PROJECT" ;; esac } -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/16315 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I9eed35628f25be37bf0190e5d5797d792c1f0ef9 Gerrit-Change-Number: 16315 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:17:24 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 14:17:24 +0000 Subject: Change in osmo-sip-connector[master]: mncc.c: fix gsm_mncc_rtp size checks In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16312 ) Change subject: mncc.c: fix gsm_mncc_rtp size checks ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16312 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: I522ce7f206932a816a64f03d916799c3215bb8c7 Gerrit-Change-Number: 16312 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 14:17:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:18:05 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 14:18:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sip: add osmo-sip-connector.cfg In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16313 ) Change subject: sip: add osmo-sip-connector.cfg ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16313 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I820a6573fafea9990eabcf40f1b7745558717cc7 Gerrit-Change-Number: 16313 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 14:18:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:20:11 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 14:20:11 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/MNCC_Types: fix sdp in tr_MNCC_* In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 ) Change subject: library/MNCC_Types: fix sdp in tr_MNCC_* ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314/1//COMMIT_MSG at 25 PS1, Line 25: 13:15:27.516604 5 SIP_Tests.ttcn:221 Matching on port MNCC .u.rtp.sdp := "0" with "" unmatched: First message in the queue does not match the template: is "0" actually a correct SDP message? or is it some length inside a string? that looks confusing. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic7a2df0b6faeaa88682880f816518618ced79a7e Gerrit-Change-Number: 16314 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 14:20:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:20:16 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 28 Nov 2019 14:20:16 +0000 Subject: Change in osmo-dev[master]: ttcn3.sh: support sip (osmo-sip-connector) In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/16315 ) Change subject: ttcn3.sh: support sip (osmo-sip-connector) ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/16315 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I9eed35628f25be37bf0190e5d5797d792c1f0ef9 Gerrit-Change-Number: 16315 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 28 Nov 2019 14:20:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:20:37 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 14:20:37 +0000 Subject: Change in osmo-dev[master]: ttcn3.sh: support sip (osmo-sip-connector) In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/16315 ) Change subject: ttcn3.sh: support sip (osmo-sip-connector) ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/16315 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I9eed35628f25be37bf0190e5d5797d792c1f0ef9 Gerrit-Change-Number: 16315 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 14:20:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:39:06 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 28 Nov 2019 14:39:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/MNCC_Types: fix sdp in tr_MNCC_* In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 ) Change subject: library/MNCC_Types: fix sdp in tr_MNCC_* ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314/1//COMMIT_MSG at 25 PS1, Line 25: 13:15:27.516604 5 SIP_Tests.ttcn:221 Matching on port MNCC .u.rtp.sdp := "0" with "" unmatched: First message in the queue does not match the template: > is "0" actually a correct SDP message? or is it some length inside a string? that looks confusing. This is the output from the TTCN-3 testsuite. My understanding is, that osmo-sip-connector does not send the SDP data before [1] is merged, therefore the information is empty. I don't know why it is displayed here as "0". But that should not be relevant for the patch, which fixes up a previous patch [2] where all tr_MNCC_* templates have sdp := *, except for these three, and it's clear that the intention was to do this for all such tr_MNCC_* templates. [1] https://gerrit.osmocom.org/c/osmo-sip-connector/+/16222 [2] https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16032 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic7a2df0b6faeaa88682880f816518618ced79a7e Gerrit-Change-Number: 16314 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 14:39:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:41:14 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 14:41:14 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/MNCC_Types: fix sdp in tr_MNCC_* In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 ) Change subject: library/MNCC_Types: fix sdp in tr_MNCC_* ...................................................................... Patch Set 1: Code-Review+1 Ok, I was just pointing it out so you can have a look and make sure that's not the SDP being sent in wireshark because if that's the case something looks wrong. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic7a2df0b6faeaa88682880f816518618ced79a7e Gerrit-Change-Number: 16314 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 14:41:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 14:50:30 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 28 Nov 2019 14:50:30 +0000 Subject: Change in osmo-hlr[master]: db v4: add column last_lu_seen_ps In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16201 ) Change subject: db v4: add column last_lu_seen_ps ...................................................................... db v4: add column last_lu_seen_ps Location Updating procedures from both CS and PS overwrite the same last_lu_seen field of a subscriber. For upcoming D-GSM it will be important to distinguish those, because only CS attaches qualify for MSISDN lookup. Add column last_lu_seen_ps, and upon PS LU, do not overwrite last_lu_seen, so that last_lu_seen now only reflects CS LU. In the VTY, dump both LU dates distinctively. Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba --- M include/osmocom/hlr/db.h M sql/hlr.sql M src/db.c M src/db_hlr.c M src/hlr_vty_subscr.c M tests/db_upgrade/db_upgrade_test.ok 6 files changed, 76 insertions(+), 32 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/hlr/db.h b/include/osmocom/hlr/db.h index 15d83de..eacc78e 100644 --- a/include/osmocom/hlr/db.h +++ b/include/osmocom/hlr/db.h @@ -28,6 +28,7 @@ DB_STMT_AUC_3G_INSERT, DB_STMT_AUC_3G_DELETE, DB_STMT_SET_LAST_LU_SEEN, + DB_STMT_SET_LAST_LU_SEEN_PS, DB_STMT_EXISTS_BY_IMSI, DB_STMT_EXISTS_BY_MSISDN, _NUM_DB_STMT @@ -95,6 +96,7 @@ bool ms_purged_cs; bool ms_purged_ps; time_t last_lu_seen; + time_t last_lu_seen_ps; }; /* A format string for use with strptime(3). This format string is diff --git a/sql/hlr.sql b/sql/hlr.sql index f8fdc0b..ad57661 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -42,7 +42,8 @@ -- Timestamp of last location update seen from subscriber -- The value is a string which encodes a UTC timestamp in granularity of seconds. - last_lu_seen TIMESTAMP default NULL + last_lu_seen TIMESTAMP default NULL, + last_lu_seen_ps TIMESTAMP default NULL ); CREATE TABLE subscriber_apn ( @@ -77,4 +78,4 @@ -- Set HLR database schema version number -- Note: This constant is currently duplicated in src/db.c and must be kept in sync! -PRAGMA user_version = 3; +PRAGMA user_version = 4; diff --git a/src/db.c b/src/db.c index 992dbad..5e5ad35 100644 --- a/src/db.c +++ b/src/db.c @@ -28,7 +28,7 @@ #include "db_bootstrap.h" /* This constant is currently duplicated in sql/hlr.sql and must be kept in sync! */ -#define CURRENT_SCHEMA_VERSION 3 +#define CURRENT_SCHEMA_VERSION 4 #define SEL_COLUMNS \ "id," \ @@ -45,7 +45,8 @@ "lmsi," \ "ms_purged_cs," \ "ms_purged_ps," \ - "last_lu_seen" + "last_lu_seen," \ + "last_lu_seen_ps" \ static const char *stmt_sql[] = { [DB_STMT_SEL_BY_IMSI] = "SELECT " SEL_COLUMNS " FROM subscriber WHERE imsi = ?", @@ -79,6 +80,7 @@ " VALUES($subscriber_id, $algo_id_3g, $k, $op, $opc, $ind_bitlen)", [DB_STMT_AUC_3G_DELETE] = "DELETE FROM auc_3g WHERE subscriber_id = $subscriber_id", [DB_STMT_SET_LAST_LU_SEEN] = "UPDATE subscriber SET last_lu_seen = datetime($val, 'unixepoch') WHERE id = $subscriber_id", + [DB_STMT_SET_LAST_LU_SEEN_PS] = "UPDATE subscriber SET last_lu_seen_ps = datetime($val, 'unixepoch') WHERE id = $subscriber_id", [DB_STMT_EXISTS_BY_IMSI] = "SELECT 1 FROM subscriber WHERE imsi = $imsi", [DB_STMT_EXISTS_BY_MSISDN] = "SELECT 1 FROM subscriber WHERE msisdn = $msisdn", }; @@ -423,11 +425,28 @@ return rc; } +static int db_upgrade_v4(struct db_context *dbc) +{ + int rc; + const char *statements[] = { + "ALTER TABLE subscriber ADD COLUMN last_lu_seen_ps TIMESTAMP default NULL", + "PRAGMA user_version = 4", + }; + + rc = db_run_statements(dbc, statements, ARRAY_SIZE(statements)); + if (rc != SQLITE_DONE) { + LOGP(DDB, LOGL_ERROR, "Unable to update HLR database schema to version 4\n"); + return rc; + } + return rc; +} + typedef int (*db_upgrade_func_t)(struct db_context *dbc); static db_upgrade_func_t db_upgrade_path[] = { db_upgrade_v1, db_upgrade_v2, db_upgrade_v3, + db_upgrade_v4, }; static int db_get_user_version(struct db_context *dbc) diff --git a/src/db_hlr.c b/src/db_hlr.c index e52b5ed..b3e3887 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -438,14 +438,36 @@ return ret; } +static void parse_last_lu_seen(time_t *dst, const char *last_lu_seen_str, const char *imsi, const char *label) +{ + struct tm tm = {0}; + time_t val; + if (!last_lu_seen_str || last_lu_seen_str[0] == '\0') + return; + + if (strptime(last_lu_seen_str, DB_LAST_LU_SEEN_FMT, &tm) == NULL) { + LOGP(DAUC, LOGL_ERROR, "IMSI-%s: Last LU Seen %s: Cannot parse timestamp '%s'\n", + imsi, label, last_lu_seen_str); + return; + } + + errno = 0; + val = mktime(&tm); + if (val == -1) { + LOGP(DAUC, LOGL_ERROR, "IMSI-%s: Last LU Seen %s: Cannot convert timestamp '%s' to time_t: %s\n", + imsi, label, last_lu_seen_str, strerror(errno)); + val = 0; + } + + *dst = val; +} + /* Common code for db_subscr_get_by_*() functions. */ static int db_sel(struct db_context *dbc, sqlite3_stmt *stmt, struct hlr_subscriber *subscr, const char **err) { int rc; int ret = 0; - const char *last_lu_seen_str; - struct tm tm = {0}; /* execute the statement */ rc = sqlite3_step(stmt); @@ -479,20 +501,10 @@ subscr->lmsi = sqlite3_column_int(stmt, 11); subscr->ms_purged_cs = sqlite3_column_int(stmt, 12); subscr->ms_purged_ps = sqlite3_column_int(stmt, 13); - last_lu_seen_str = (const char *)sqlite3_column_text(stmt, 14); - if (last_lu_seen_str && last_lu_seen_str[0] != '\0') { - if (strptime(last_lu_seen_str, DB_LAST_LU_SEEN_FMT, &tm) == NULL) { - LOGP(DAUC, LOGL_ERROR, "Cannot parse last LU timestamp '%s' of subscriber with IMSI='%s': %s\n", - last_lu_seen_str, subscr->imsi, strerror(errno)); - } else { - subscr->last_lu_seen = mktime(&tm); - if (subscr->last_lu_seen == -1) { - LOGP(DAUC, LOGL_ERROR, "Cannot convert LU timestamp '%s' to time_t: %s\n", - last_lu_seen_str, strerror(errno)); - subscr->last_lu_seen = 0; - } - } - } + parse_last_lu_seen(&subscr->last_lu_seen, (const char *)sqlite3_column_text(stmt, 14), + subscr->imsi, "CS"); + parse_last_lu_seen(&subscr->last_lu_seen_ps, (const char *)sqlite3_column_text(stmt, 15), + subscr->imsi, "PS"); out: db_remove_reset(stmt); @@ -770,7 +782,7 @@ goto out; } - stmt = dbc->stmt[DB_STMT_SET_LAST_LU_SEEN]; + stmt = dbc->stmt[is_ps? DB_STMT_SET_LAST_LU_SEEN_PS : DB_STMT_SET_LAST_LU_SEEN]; if (!db_bind_int64(stmt, "$subscriber_id", subscr_id)) return -EIO; diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index d2c4c81..b561636 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -47,12 +47,20 @@ return s; } +static void dump_last_lu_seen(struct vty *vty, const char *domain_label, time_t last_lu_seen) +{ + char datebuf[26]; /* for ctime_r(3) */ + if (!last_lu_seen) + return; + vty_out(vty, " last LU seen on %s: %s UTC%s", domain_label, get_datestr(&last_lu_seen, datebuf), + VTY_NEWLINE); +} + static void subscr_dump_full_vty(struct vty *vty, struct hlr_subscriber *subscr) { int rc; struct osmo_sub_auth_data aud2g; struct osmo_sub_auth_data aud3g; - char datebuf[26]; /* for ctime_r(3) */ vty_out(vty, " ID: %"PRIu64"%s", subscr->id, VTY_NEWLINE); @@ -87,8 +95,8 @@ vty_out(vty, " PS disabled%s", VTY_NEWLINE); if (subscr->ms_purged_ps) vty_out(vty, " PS purged%s", VTY_NEWLINE); - if (subscr->last_lu_seen) - vty_out(vty, " last LU seen: %s UTC%s", get_datestr(&subscr->last_lu_seen, datebuf), VTY_NEWLINE); + dump_last_lu_seen(vty, "CS", subscr->last_lu_seen); + dump_last_lu_seen(vty, "PS", subscr->last_lu_seen_ps); if (!*subscr->imsi) return; diff --git a/tests/db_upgrade/db_upgrade_test.ok b/tests/db_upgrade/db_upgrade_test.ok index 49e7151..67d0006 100644 --- a/tests/db_upgrade/db_upgrade_test.ok +++ b/tests/db_upgrade/db_upgrade_test.ok @@ -83,6 +83,7 @@ DDB Database test.db' has been upgraded to HLR DB schema version 1 DDB Database test.db' has been upgraded to HLR DB schema version 2 DDB Database test.db' has been upgraded to HLR DB schema version 3 +DDB Database test.db' has been upgraded to HLR DB schema version 4 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. Resulting db: @@ -124,6 +125,7 @@ imeisv|VARCHAR|0||0 imsi|VARCHAR(15)|1||0 last_lu_seen|TIMESTAMP|0|NULL|0 +last_lu_seen_ps|TIMESTAMP|0|NULL|0 lmsi|INTEGER|0||0 ms_purged_cs|BOOLEAN|1|0|0 ms_purged_ps|BOOLEAN|1|0|0 @@ -139,13 +141,13 @@ vlr_number|VARCHAR(15)|0||0 Table subscriber contents: -ggsn_number|gmlc_number|id|imei|imeisv|imsi|last_lu_seen|lmsi|ms_purged_cs|ms_purged_ps|msc_number|msisdn|nam_cs|nam_ps|periodic_lu_tmr|periodic_rau_tau_tmr|sgsn_address|sgsn_number|smsc_number|vlr_number -||1|||123456789012345|||0|0||098765432109876|1|1||||||MSC-1 -||2|||111111111|||1|0|||1|1|||||| -||3|||222222222|||0|1||22222|1|1|||||| -||4|||333333|||0|0||3|0|1|||||| -||5|||444444444444444|||0|0||4444|1|0|||||| -||6|||5555555|||0|0||55555555555555|0|0|||||| +ggsn_number|gmlc_number|id|imei|imeisv|imsi|last_lu_seen|last_lu_seen_ps|lmsi|ms_purged_cs|ms_purged_ps|msc_number|msisdn|nam_cs|nam_ps|periodic_lu_tmr|periodic_rau_tau_tmr|sgsn_address|sgsn_number|smsc_number|vlr_number +||1|||123456789012345||||0|0||098765432109876|1|1||||||MSC-1 +||2|||111111111||||1|0|||1|1|||||| +||3|||222222222||||0|1||22222|1|1|||||| +||4|||333333||||0|0||3|0|1|||||| +||5|||444444444444444||||0|0||4444|1|0|||||| +||6|||5555555||||0|0||55555555555555|0|0|||||| Table: subscriber_apn name|type|notnull|dflt_value|pk @@ -166,5 +168,5 @@ rc = 0 DMAIN hlr starting DDB using database: test.db -DDB Database test.db' has HLR DB schema version 3 +DDB Database test.db' has HLR DB schema version 4 DMAIN Cmdline option --db-check: Database was opened successfully, quitting. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id7fc50567211a0870ac0524f6dee94d4513781ba Gerrit-Change-Number: 16201 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:15:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:15:52 +0000 Subject: Change in osmo-ccid-firmware[master]: talloc asserts In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 ) Change subject: talloc asserts ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99 Gerrit-Change-Number: 16269 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:15:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:16:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:16:03 +0000 Subject: Change in osmo-ccid-firmware[master]: don't wait for TCK if card only supports T0 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 ) Change subject: don't wait for TCK if card only supports T0 ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add Gerrit-Change-Number: 16264 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:16:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:16:09 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:16:09 +0000 Subject: Change in osmo-ccid-firmware[master]: sercom config for t1 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 ) Change subject: sercom config for t1 ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 Gerrit-Change-Number: 16265 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:16:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:16:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:16:16 +0000 Subject: Change in osmo-ccid-firmware[master]: split usb descriptor code In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16266 ) Change subject: split usb descriptor code ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9eb3606cfbaecf81f7ae80a9ea3d061a39088760 Gerrit-Change-Number: 16266 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:16:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:16:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:16:24 +0000 Subject: Change in osmo-ccid-firmware[master]: Add card_uart driver for ASF4 USART In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16267 ) Change subject: Add card_uart driver for ASF4 USART ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic690055bc332ccca3de7c5f4429399cf9ff1d4da Gerrit-Change-Number: 16267 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:16:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:16:27 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:16:27 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the uart ring buffer size In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 ) Change subject: increase the uart ring buffer size ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c Gerrit-Change-Number: 16268 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:16:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:16:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:16:33 +0000 Subject: Change in osmo-ccid-firmware[master]: no logging, no memory pool In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 ) Change subject: no logging, no memory pool ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca Gerrit-Change-Number: 16270 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:16:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:16:38 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:16:38 +0000 Subject: Change in osmo-ccid-firmware[master]: prevent uart interrupts before having proper structs In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 ) Change subject: prevent uart interrupts before having proper structs ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e Gerrit-Change-Number: 16271 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:16:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:16:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:16:44 +0000 Subject: Change in osmo-ccid-firmware[master]: move iso7816_3 to common dir In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 ) Change subject: move iso7816_3 to common dir ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92 Gerrit-Change-Number: 16272 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:16:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:16:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:16:51 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart icc clock freq and divider setting support In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 ) Change subject: cuart icc clock freq and divider setting support ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e Gerrit-Change-Number: 16273 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:16:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:05 +0000 Subject: Change in osmo-ccid-firmware[master]: don't wait for TCK if card only supports T0 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 ) Change subject: don't wait for TCK if card only supports T0 ...................................................................... don't wait for TCK if card only supports T0 See 7816-3 8.2.5, T0 only (maybe implicitly) and no T15 = no TCK. This could be handled by a timeout instead, but timeouts don't work yet. Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add --- M ccid_common/iso7816_fsm.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 21378e0..beda7ab 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -633,6 +633,10 @@ osmo_fsm_inst_state_chg_ms(fi, ATR_S_WAIT_TCK, guard_time_ms, T_GUARD); break; + } else { + /* no TCK present, ATR complete; notify parent */ + osmo_fsm_inst_state_chg(fi, ATR_S_DONE, 0, 0); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_ATR_DONE_IND, atp->atr); } } else { break; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ice7bc4e603bbbbef88258af41f61e14a06727add Gerrit-Change-Number: 16264 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:05 +0000 Subject: Change in osmo-ccid-firmware[master]: sercom config for t1 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 ) Change subject: sercom config for t1 ...................................................................... sercom config for t1 T0 doesn't work, as the datasheet states it's synchronous, apparently to the internal clock. That doesn't align too well with what 7816-3 says, so this already fails during the ATR after a few tries. Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 --- M sysmoOCTSIM/config/hpl_sercom_config.h 1 file changed, 14 insertions(+), 14 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/sysmoOCTSIM/config/hpl_sercom_config.h b/sysmoOCTSIM/config/hpl_sercom_config.h index beac040..bb2bbff 100644 --- a/sysmoOCTSIM/config/hpl_sercom_config.h +++ b/sysmoOCTSIM/config/hpl_sercom_config.h @@ -52,7 +52,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_0_USART_SBMODE -#define CONF_SERCOM_0_USART_SBMODE 0 +#define CONF_SERCOM_0_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -70,7 +70,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_0_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_0_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_0_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -324,7 +324,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_1_USART_SBMODE -#define CONF_SERCOM_1_USART_SBMODE 0 +#define CONF_SERCOM_1_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -342,7 +342,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_1_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_1_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_1_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -596,7 +596,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_2_USART_SBMODE -#define CONF_SERCOM_2_USART_SBMODE 0 +#define CONF_SERCOM_2_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -614,7 +614,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_2_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_2_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_2_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -868,7 +868,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_3_USART_SBMODE -#define CONF_SERCOM_3_USART_SBMODE 0 +#define CONF_SERCOM_3_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -886,7 +886,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_3_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_3_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_3_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -1140,7 +1140,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_4_USART_SBMODE -#define CONF_SERCOM_4_USART_SBMODE 0 +#define CONF_SERCOM_4_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -1158,7 +1158,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_4_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_4_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_4_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -1412,7 +1412,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_5_USART_SBMODE -#define CONF_SERCOM_5_USART_SBMODE 0 +#define CONF_SERCOM_5_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -1430,7 +1430,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_5_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_5_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_5_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge @@ -1684,7 +1684,7 @@ // Number of stop bits in USART frame // usart_stop_bit #ifndef CONF_SERCOM_6_USART_SBMODE -#define CONF_SERCOM_6_USART_SBMODE 0 +#define CONF_SERCOM_6_USART_SBMODE 1 #endif // Baud rate <1-3000000> @@ -1702,7 +1702,7 @@ // Define ISO7816 protocol type as 0. // usart_iso7816_type #ifndef CONF_SERCOM_6_USART_ISO7816_PROTOCOL_T -#define CONF_SERCOM_6_USART_ISO7816_PROTOCOL_T 0x1 +#define CONF_SERCOM_6_USART_ISO7816_PROTOCOL_T 0x0 #endif // ISO7816 Inhibit Not Acknowledge -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie6cb7ec51036f1de15c83b59d130f3cb85309594 Gerrit-Change-Number: 16265 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:06 +0000 Subject: Change in osmo-ccid-firmware[master]: split usb descriptor code In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16266 ) Change subject: split usb descriptor code ...................................................................... split usb descriptor code Change-Id: I9eb3606cfbaecf81f7ae80a9ea3d061a39088760 --- M sysmoOCTSIM/main.c M sysmoOCTSIM/usb/class/ccid/device/ccid_df.c M sysmoOCTSIM/usb_descriptors.c A sysmoOCTSIM/usb_descriptors.h 4 files changed, 105 insertions(+), 47 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 15e2004..fed562b 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -43,6 +43,8 @@ // TODO put declaration in more global file // TODO for now SIM7 is not present because used for debug static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; +#include "ccid_device.h" +#include "usb_descriptors.h" /** number of bytes transmitted on the SIM peripheral */ static volatile bool SIM_tx_count[8]; diff --git a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c index 65d3499..665f0fc 100644 --- a/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c +++ b/sysmoOCTSIM/usb/class/ccid/device/ccid_df.c @@ -24,6 +24,9 @@ #include "ccid_proto.h" #include "usb_includes.h" +#include "cdcdf_acm_desc.h" +#include "usb_descriptors.h" + #ifndef USB_CLASS_CCID #define USB_CLASS_CCID 11 #endif @@ -40,9 +43,11 @@ static struct usbdf_driver _ccid_df; static struct ccid_df_func_data _ccid_df_funcd; +extern const struct usb_desc_collection usb_fs_descs; + /* FIXME: make those configurable, ensure they're sized according to * bNumClockSupported / bNumDataRatesSupported */ -static uint32_t ccid_clock_frequencies[] = { LE32(20000) }; +static uint32_t ccid_clock_frequencies[CCID_NUM_CLK_SUPPORTED] = { LE32(2500),LE32(5000),LE32(10000),LE32(20000) }; static uint32_t ccid_baud_rates[] = { LE32(9600) }; static int32_t ccid_df_enable(struct usbdf_driver *drv, struct usbd_descriptors *desc) diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index 944e43b..63ace0c 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -1,54 +1,32 @@ +/* + * Copyright (C) 2019 sysmocom -s.f.m.c. GmbH, Author: Eric Wild + * + * This program is free software; you can redistribute it and/or + * modify 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 "usbd_config.h" #include "usbdc.h" #include "usb_protocol.h" #include "usb_protocol_cdc.h" #include "ccid_proto.h" #include "cdcdf_acm_desc.h" +#include "usb_descriptors.h" -/* aggregate descriptors for the combined CDC-ACM + CCID device that we expose - * from sysmoQMOD */ -enum str_desc_num { - STR_DESC_MANUF = 1, - STR_DESC_PRODUCT, - STR_DESC_CONFIG, - STR_DESC_INTF_ACM_COMM, - STR_DESC_INTF_ACM_DATA, - STR_DESC_INTF_CCID, - STR_DESC_SERIAL, -}; -/* a struct of structs representing the concatenated collection of USB descriptors */ -struct usb_desc_collection { - struct usb_dev_desc dev; - struct usb_config_desc cfg; - - /* CDC-ACM: Two interfaces, one with IRQ EP and one with BULK IN + OUT */ - struct { - struct { - struct usb_iface_desc iface; - struct usb_cdc_hdr_desc cdc_hdr; - struct usb_cdc_call_mgmt_desc cdc_call_mgmt; - struct usb_cdc_acm_desc cdc_acm; - struct usb_cdc_union_desc cdc_union; - struct usb_ep_desc ep[1]; - } comm; - struct { - struct usb_iface_desc iface; - struct usb_ep_desc ep[2]; - } data; - } cdc; - - /* CCID: One interface with CCID class descriptor and three endpoints */ - struct { - struct usb_iface_desc iface; - struct usb_ccid_class_descriptor class; - struct usb_ep_desc ep[3]; - } ccid; - uint8_t str[116]; -} __attribute__((packed)); - -static const struct usb_desc_collection usb_fs_descs = { +const struct usb_desc_collection usb_fs_descs = { .dev = { .bLength = sizeof(struct usb_dev_desc), .bDescriptorType = USB_DT_DEVICE, @@ -176,17 +154,23 @@ .bcdCCID = LE16(0x0110), .bMaxSlotIndex = 7, .bVoltageSupport = 0x07, /* 5/3/1.8V */ - .dwProtocols = 0x03, + .dwProtocols = 0x01, /* only t0 */ .dwDefaultClock = LE32(2500), .dwMaximumClock = LE32(20000), - .bNumClockSupported = 4, - .dwDataRate = LE32(9600), + .bNumClockSupported = CCID_NUM_CLK_SUPPORTED, + .dwDataRate = LE32(6720), /* default clock 2.5M/372 */ .dwMaxDataRate = LE32(921600), .bNumDataRatesSupported = 0, .dwMaxIFSD = LE32(0), .dwSynchProtocols = LE32(0), .dwMechanical = LE32(0), - .dwFeatures = LE32(0x10 | 0x00010000), + /* 0x10000 TPDU level exchanges with CCID + * 0x80 Automatic PPS made by the CCID according to the active parameters + * 0x20 Automatic baud rate change according to active parameters + * provided by the Host or self determined + * 0x10 Automatic ICC clock frequency change according to active parameters + * provided by the Host or self determined */ + .dwFeatures = LE32(0x10 | 0x20 | 0x80 | 0x00010000), .dwMaxCCIDMessageLength = 272, .bClassGetResponse = 0xff, .bClassEnvelope = 0xff, diff --git a/sysmoOCTSIM/usb_descriptors.h b/sysmoOCTSIM/usb_descriptors.h new file mode 100644 index 0000000..94a4212 --- /dev/null +++ b/sysmoOCTSIM/usb_descriptors.h @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2019 sysmocom -s.f.m.c. GmbH, Author: Eric Wild + * + * This program is free software; you can redistribute it and/or + * modify 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. +*/ + +#ifndef USB_DESCRIPTORS_H_ +#define USB_DESCRIPTORS_H_ + +#define CCID_NUM_CLK_SUPPORTED 4 + +/* aggregate descriptors for the combined CDC-ACM + CCID device that we expose + * from sysmoQMOD */ + +enum str_desc_num { + STR_DESC_MANUF = 1, + STR_DESC_PRODUCT, + STR_DESC_CONFIG, + STR_DESC_INTF_ACM_COMM, + STR_DESC_INTF_ACM_DATA, + STR_DESC_INTF_CCID, + STR_DESC_SERIAL, +}; + +/* a struct of structs representing the concatenated collection of USB descriptors */ +struct usb_desc_collection { + struct usb_dev_desc dev; + struct usb_config_desc cfg; + + /* CDC-ACM: Two interfaces, one with IRQ EP and one with BULK IN + OUT */ + struct { + struct { + struct usb_iface_desc iface; + struct usb_cdc_hdr_desc cdc_hdr; + struct usb_cdc_call_mgmt_desc cdc_call_mgmt; + struct usb_cdc_acm_desc cdc_acm; + struct usb_cdc_union_desc cdc_union; + struct usb_ep_desc ep[1]; + } comm; + struct { + struct usb_iface_desc iface; + struct usb_ep_desc ep[2]; + } data; + } cdc; + + /* CCID: One interface with CCID class descriptor and three endpoints */ + struct { + struct usb_iface_desc iface; + struct usb_ccid_class_descriptor class; + struct usb_ep_desc ep[3]; + } ccid; + uint8_t str[116]; +} __attribute__((packed)); + +#endif /* USB_DESCRIPTORS_H_ */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9eb3606cfbaecf81f7ae80a9ea3d061a39088760 Gerrit-Change-Number: 16266 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:16 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid setparameters/PPS support In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 ) Change subject: ccid setparameters/PPS support ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a Gerrit-Change-Number: 16274 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:17:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:19 +0000 Subject: Change in osmo-ccid-firmware[master]: attempt at handling card insertion/removal In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 ) Change subject: attempt at handling card insertion/removal ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I88130de7f889811425c0a2ca4063ea8822c83f66 Gerrit-Change-Number: 16275 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:17:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:27 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:27 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to use the DWT unit In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 ) Change subject: debug code to use the DWT unit ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 Gerrit-Change-Number: 16277 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:17:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:34 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:34 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to measure uart timing using the CAN header In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 ) Change subject: debug code to measure uart timing using the CAN header ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I5f2c174076b5599dcb56f887330de27f470aeffc Gerrit-Change-Number: 16278 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:17:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:37 +0000 Subject: Change in osmo-ccid-firmware[master]: add a "no rx or tx" state In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 ) Change subject: add a "no rx or tx" state ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63 Gerrit-Change-Number: 16279 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:17:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:41 +0000 Subject: Change in osmo-ccid-firmware[master]: switching rx/tx is too slow, and not necessary In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 ) Change subject: switching rx/tx is too slow, and not necessary ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic91b3e183ba451b4e327e407aae0497273652f56 Gerrit-Change-Number: 16280 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:17:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:45 +0000 Subject: Change in osmo-ccid-firmware[master]: add some volatility to debug missing state changes In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 ) Change subject: add some volatility to debug missing state changes ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I2e12e32ad27b03d73ba3533903c34abc2fcce37a Gerrit-Change-Number: 16281 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:17:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:50 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:50 +0000 Subject: Change in osmo-ccid-firmware[master]: better ccid error handling, fix buffer leaks In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 ) Change subject: better ccid error handling, fix buffer leaks ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib8b8524809e12608a7ade79ce7d7c3ced16eeb57 Gerrit-Change-Number: 16282 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:17:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:17:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:17:58 +0000 Subject: Change in osmo-ccid-firmware[master]: fix power descriptor value In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 ) Change subject: fix power descriptor value ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I40c48ea56151d13de362b8f73cae5b21aba0ebfa Gerrit-Change-Number: 16283 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:17:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:19:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:19:02 +0000 Subject: Change in osmo-ccid-firmware[master]: fsm completion event handling from main loop In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16284 ) Change subject: fsm completion event handling from main loop ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16284 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I055110720089e20e65db592eccc3ce4d618e8c63 Gerrit-Change-Number: 16284 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:19:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:19:07 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:19:07 +0000 Subject: Change in osmo-ccid-firmware[master]: add a note for D=64 pecularities In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16285 ) Change subject: add a note for D=64 pecularities ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16285 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Icf2845e0f07f2d23f5090d35b6d8d145ad65a2f8 Gerrit-Change-Number: 16285 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:19:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:19:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:19:25 +0000 Subject: Change in osmo-ccid-firmware[master]: pps warning In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16286 ) Change subject: pps warning ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia125b7983e81342af224bc6e8771d8be4c4bfa42 Gerrit-Change-Number: 16286 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:19:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:19:57 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:19:57 +0000 Subject: Change in osmo-ccid-firmware[master]: boost uart priority In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16287 ) Change subject: boost uart priority ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I10ea17ca8b120c09b8926da010c9e358b219f7ed Gerrit-Change-Number: 16287 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:19:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:20:12 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:20:12 +0000 Subject: Change in osmo-ccid-firmware[master]: the magic sauce that makes it work In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16288 ) Change subject: the magic sauce that makes it work ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ica8539e4428ca3e3eb3e8ca9f5a5b50eb738ca8d Gerrit-Change-Number: 16288 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:20:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:20:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:20:29 +0000 Subject: Change in osmo-ccid-firmware[master]: change uart ctl define names In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16289 ) Change subject: change uart ctl define names ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16289 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I656e9e32c67d6e7b70a53f8f113583f25619e00f Gerrit-Change-Number: 16289 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:20:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:20:37 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:20:37 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart: allow getting the icc baud rate and clock freq In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16290 ) Change subject: cuart: allow getting the icc baud rate and clock freq ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I577907e6c60582a80666d43b17c20de4e03cc8df Gerrit-Change-Number: 16290 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:20:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:21:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:21:35 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart: fix etu calculation In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16291 ) Change subject: cuart: fix etu calculation ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib2f83654bdaae5090bb1dfd75e0906551d6b6aa7 Gerrit-Change-Number: 16291 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:21:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:21:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:21:44 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart cleanup In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16292 ) Change subject: cuart cleanup ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I15ea4d68263b62fca3da76795969358a07e7f1a6 Gerrit-Change-Number: 16292 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:21:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:22:07 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 15:22:07 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15947 ) Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... Patch Set 4: Code-Review+2 (1 comment) combining 2x +1 https://gerrit.osmocom.org/c/osmo-msc/+/15947/3/src/libmsc/sdp_msg.c File src/libmsc/sdp_msg.c: https://gerrit.osmocom.org/c/osmo-msc/+/15947/3/src/libmsc/sdp_msg.c at 511 PS3, Line 511: if (codec->fmtp[0]) > is this a check against != '\0' ? yes, a check for != '\0' -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 15:22:07 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:22:12 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:22:12 +0000 Subject: Change in osmo-ccid-firmware[master]: first attempt at rx timeout handling In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16293 ) Change subject: first attempt at rx timeout handling ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia6ad2d83cea48a8661ed2e4eb50f9bcb85218454 Gerrit-Change-Number: 16293 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:22:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:22:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:22:29 +0000 Subject: Change in osmo-ccid-firmware[master]: enable the final slot In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16294 ) Change subject: enable the final slot ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I8f3c7c60306941159c35307a5c1e38c2a2bd2fe1 Gerrit-Change-Number: 16294 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:22:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:22:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:22:41 +0000 Subject: Change in osmo-ccid-firmware[master]: prettier slot bitmask code In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 ) Change subject: prettier slot bitmask code ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2 Gerrit-Change-Number: 16295 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:22:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:22:46 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:22:46 +0000 Subject: Change in osmo-ccid-firmware[master]: reenable firmware build In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16307 ) Change subject: reenable firmware build ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iee56a50c0cd818887a8e9d8f2f660acaef16a8ca Gerrit-Change-Number: 16307 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:22:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:22:51 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 15:22:51 +0000 Subject: Change in osmo-msc[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... Patch Set 6: Code-Review+2 combining 2x+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 15:22:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:22:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:22:53 +0000 Subject: Change in osmo-ccid-firmware[master]: disable build for now In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16306 ) Change subject: disable build for now ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I778f525ab856b4966428c046c3eeee7a38692c07 Gerrit-Change-Number: 16306 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:22:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:33 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the debug uart buffer size In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 ) Change subject: increase the debug uart buffer size ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I343b03d5b06962b90f0c1aaceda03aa871a2f98b Gerrit-Change-Number: 16276 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 15:23:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:40 +0000 Subject: Change in osmo-ccid-firmware[master]: disable build for now In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16306 ) Change subject: disable build for now ...................................................................... disable build for now The firmware itself has priority, and the following patch series leads to a working firmware build, but contains commits that are not buildable. Change-Id: I778f525ab856b4966428c046c3eeee7a38692c07 --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index f3a0169..a993645 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,5 +1,5 @@ #!/bin/bash - +exit 0 if ! [ -x "$(command -v osmo-deps.sh)" ]; then echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" exit 2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16306 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I778f525ab856b4966428c046c3eeee7a38692c07 Gerrit-Change-Number: 16306 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:40 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:40 +0000 Subject: Change in osmo-ccid-firmware[master]: Add card_uart driver for ASF4 USART In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16267 ) Change subject: Add card_uart driver for ASF4 USART ...................................................................... Add card_uart driver for ASF4 USART Change-Id: Ic690055bc332ccca3de7c5f4429399cf9ff1d4da --- M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.h M ccid_host/ccid_slot_sim.c A sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/main.c 6 files changed, 531 insertions(+), 721 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index a7ecb9f..870cf35 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -31,12 +31,18 @@ static struct iso_fsm_slot_instance g_si; -struct iso_fsm_slot *ccid_slot2iso_fsm_slot(struct ccid_slot *cs) +static struct iso_fsm_slot *ccid_slot2iso_fsm_slot(struct ccid_slot *cs) { OSMO_ASSERT(cs->slot_nr < ARRAY_SIZE(g_si.slot)); return &g_si.slot[cs->slot_nr]; } +struct card_uart *cuart4slot_nr(uint8_t slot_nr) +{ + OSMO_ASSERT(slot_nr < ARRAY_SIZE(g_si.slot)); + return g_si.slot[slot_nr].cuart; +} + static const uint8_t sysmousim_sjs1_atr[] = { 0x3B, 0x9F, 0x96, 0x80, 0x1F, 0xC7, 0x80, 0x31, 0xA0, 0x73, 0xBE, 0x21, 0x13, 0x67, 0x43, 0x20, @@ -74,9 +80,10 @@ osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_POWER_UP_IND, NULL); cs->icc_powered = true; card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK, true); - usleep(10000); - card_uart_ctrl(ss->cuart, CUART_CTL_RST, false); + delay_us(10000); + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_RESET_REL_IND, NULL); + card_uart_ctrl(ss->cuart, CUART_CTL_RST, false); msgb_free(msg); /* continues in iso_fsm_clot_user_cb once ATR is received */ @@ -145,8 +152,10 @@ if (enable) { card_uart_ctrl(ss->cuart, CUART_CTL_POWER, true); + cs->icc_powered = true; } else { card_uart_ctrl(ss->cuart, CUART_CTL_POWER, false); + cs->icc_powered = false; } } @@ -179,31 +188,35 @@ return 0; } - +extern void *g_tall_ctx; static int iso_fsm_slot_init(struct ccid_slot *cs) { - void *ctx = NULL; /* FIXME */ + void *ctx = g_tall_ctx; /* FIXME */ struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct card_uart *cuart = talloc_zero(ctx, struct card_uart); - char id_buf[16]; - char *devname = NULL; + char id_buf[16] = "SIM0"; + char devname[] = "foobar"; int rc; LOGPCS(cs, LOGL_DEBUG, "%s\n", __func__); /* HACK: make this in some way configurable so it works both in the firmware * and on the host (functionfs) */ - if (cs->slot_nr == 0) { - cs->icc_present = true; - devname = "/dev/ttyUSB5"; - } +// if (cs->slot_nr == 0) { +// cs->icc_present = true; +// devname = "/dev/ttyUSB5"; +// } + devname[0] = cs->slot_nr +0x30; + devname[1] = 0; + //sprintf(devname, "%d", cs->slot_nr); if (!cuart) return -ENOMEM; - snprintf(id_buf, sizeof(id_buf), "SIM%d", cs->slot_nr); + //snprintf(id_buf, sizeof(id_buf), "SIM%d", cs->slot_nr); + id_buf[3] = cs->slot_nr +0x30; if (devname) { - rc = card_uart_open(cuart, "tty", devname); + rc = card_uart_open(cuart, "asf4", devname); if (rc < 0) { LOGPCS(cs, LOGL_ERROR, "Cannot open UART %s: %d\n", devname, rc); talloc_free(cuart); diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 951a3ec..5e397ab 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -7,6 +7,8 @@ #include #include "utils_ringbuffer.h" +struct usart_async_descriptor; + enum card_uart_event { /* a single byte was received, it's present at the (uint8_t *) data location */ CUART_E_RX_SINGLE, @@ -90,6 +92,10 @@ struct osmo_fd ofd; unsigned int baudrate; } tty; + struct { + struct usart_async_descriptor *usa_pd; + uint8_t slot_nr; + } asf4; } u; }; diff --git a/ccid_host/ccid_slot_sim.c b/ccid_host/ccid_slot_sim.c index 1bd514a..dc33114 100644 --- a/ccid_host/ccid_slot_sim.c +++ b/ccid_host/ccid_slot_sim.c @@ -100,9 +100,10 @@ { if (enable) { cs->icc_powered = true; - /* FIXME: What to do about ATR? */ + cs->icc_in_reset = false; } else { cs->icc_powered = false; + cs->icc_in_reset = true; } } diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c new file mode 100644 index 0000000..f9856f3 --- /dev/null +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -0,0 +1,402 @@ +/* Card (ICC) UART driver for the Atmel ASF4 asynchronous USART */ + +#include + +#include +#include + +#include +#include +#include "driver_init.h" + +#include "ncn8025.h" + +#include "cuart.h" + +static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; + +extern struct card_uart *cuart4slot_nr(uint8_t slot_nr); + +/*********************************************************************** + * low-level helper routines + ***********************************************************************/ + +static void _SIM_rx_cb(const struct usart_async_descriptor *const io_descr, uint8_t slot_nr) +{ + struct card_uart *cuart = cuart4slot_nr(slot_nr); + int rc; + OSMO_ASSERT(cuart); + + if (cuart->rx_threshold == 1) { + /* bypass ringbuffer and report byte directly */ + uint8_t rx[1]; + rc = io_read((struct io_descriptor * const)&io_descr->io, rx, sizeof(rx)); + OSMO_ASSERT(rc == sizeof(rx)); + card_uart_notification(cuart, CUART_E_RX_SINGLE, rx); + } else { + /* go via ringbuffer and notify only after threshold */ + if (ringbuffer_num(&io_descr->rx) >= cuart->rx_threshold) + card_uart_notification(cuart, CUART_E_RX_COMPLETE, NULL); + } +} + +static void _SIM_tx_cb(const struct usart_async_descriptor *const io_descr, uint8_t slot_nr) +{ + struct card_uart *cuart = cuart4slot_nr(slot_nr); + OSMO_ASSERT(cuart); + card_uart_notification(cuart, CUART_E_TX_COMPLETE, io_descr->tx_buffer); +} + +#include +#include + + +static void _SIM_error_cb(const struct usart_async_descriptor *const descr){ + volatile uint32_t status = hri_sercomusart_read_STATUS_reg(descr->device.hw); + volatile uint32_t data = hri_sercomusart_read_DATA_reg(descr->device.hw); + volatile uint32_t errrs = hri_sercomusart_read_RXERRCNT_reg(descr->device.hw); + OSMO_ASSERT(0 == 1) +} + +/* the below ugli-ness is required as the usart_async_descriptor doesn't have + * some kind of 'private' member that could provide the call-back anty kind of + * context */ +static void SIM0_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 0); +} +static void SIM1_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 1); +} +static void SIM2_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 2); +} +static void SIM3_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 3); +} +static void SIM4_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 4); +} +static void SIM5_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 5); +} +static void SIM6_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 6); +} +static void SIM7_rx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_rx_cb(io_descr, 7); +} +static usart_cb_t SIM_rx_cb[8] = { + SIM0_rx_cb, SIM1_rx_cb, SIM2_rx_cb, SIM3_rx_cb, + SIM4_rx_cb, SIM5_rx_cb, SIM6_rx_cb, SIM7_rx_cb, +}; +static void SIM0_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 0); +} +static void SIM1_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 1); +} +static void SIM2_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 2); +} +static void SIM3_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 3); +} +static void SIM4_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 4); +} +static void SIM5_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 5); +} +static void SIM6_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 6); +} +static void SIM7_tx_cb(const struct usart_async_descriptor *const io_descr) +{ + _SIM_tx_cb(io_descr, 7); +} +static usart_cb_t SIM_tx_cb[8] = { + SIM0_tx_cb, SIM1_tx_cb, SIM2_tx_cb, SIM3_tx_cb, + SIM4_tx_cb, SIM5_tx_cb, SIM6_tx_cb, SIM7_tx_cb, +}; + +#include +#include "atmel_start.h" +#include "atmel_start_pins.h" +#include "config/hpl_gclk_config.h" +#include "iso7816_3.h" + +/** possible clock sources for the SERCOM peripheral + * warning: the definition must match the GCLK configuration + */ +static const uint8_t sercom_glck_sources[] = {GCLK_PCHCTRL_GEN_GCLK2_Val, GCLK_PCHCTRL_GEN_GCLK4_Val, GCLK_PCHCTRL_GEN_GCLK6_Val}; + + /** possible clock frequencies in MHz for the SERCOM peripheral + * warning: the definition must match the GCLK configuration + */ +static const double sercom_glck_freqs[] = {100E6 / CONF_GCLK_GEN_2_DIV, 100E6 / CONF_GCLK_GEN_4_DIV, 120E6 / CONF_GCLK_GEN_6_DIV}; + +/** the GCLK ID for the SERCOM SIM peripherals + * @note: used as index for PCHCTRL + */ +static const uint8_t SIM_peripheral_GCLK_ID[] = {SERCOM0_GCLK_ID_CORE, SERCOM1_GCLK_ID_CORE, SERCOM2_GCLK_ID_CORE, SERCOM3_GCLK_ID_CORE, SERCOM4_GCLK_ID_CORE, SERCOM5_GCLK_ID_CORE, SERCOM6_GCLK_ID_CORE, SERCOM7_GCLK_ID_CORE}; + + +/** change baud rate of card slot + * @param[in] slotnr slot number for which the baud rate should be set + * @param[in] baudrate baud rate in bps to set + * @return if the baud rate has been set, else a parameter is out of range + */ +static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) +{ + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + + // calculate the error corresponding to the clock sources + uint16_t bauds[ARRAY_SIZE(sercom_glck_freqs)]; + double errors[ARRAY_SIZE(sercom_glck_freqs)]; + for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { + double freq = sercom_glck_freqs[i]; // remember possible SERCOM frequency + uint32_t min = freq/16. * (1. - 65535. / 65536.); // calculate the minimum baud rate for this frequency + uint32_t max = freq/16. * (1. - 1. / 65536.); // calculate the maximum baud rate for this frequency + if (baudrate < min || baudrate > max) { // baud rate it out of supported range + errors[i] = NAN; + } else { + uint16_t baud = round(65536. * (1. - 16. * (baudrate/freq))); + bauds[i] = baud; + double actual = freq/16. * (1. - baud / 65536.); + errors[i] = fabs(1.0 - (actual / baudrate)); + } + } + + // find the smallest error + uint8_t best = ARRAY_SIZE(sercom_glck_freqs); + for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { + if (isnan(errors[i])) { + continue; + } + if (best >= ARRAY_SIZE(sercom_glck_freqs)) { + best = i; + } else if (errors[i] < errors[best]) { + best = i; + } + } + if (best >= ARRAY_SIZE(sercom_glck_freqs)) { // found no clock supporting this baud rate + return false; + } + + // set clock and baud rate + struct usart_async_descriptor* slot = SIM_peripheral_descriptors[slotnr]; // get slot + if (NULL == slot) { + return false; + } + printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); + while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) + usart_async_disable(slot); // disable SERCOM peripheral + hri_gclk_clear_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos)); // disable clock for this peripheral + while (hri_gclk_get_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos))); // wait until clock is really disabled + // it does not seem we need to completely disable the peripheral using hri_mclk_clear_APBDMASK_SERCOMn_bit + hri_gclk_write_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], sercom_glck_sources[best] | (1 << GCLK_PCHCTRL_CHEN_Pos)); // set peripheral core clock and re-enable it + usart_async_set_baud_rate(slot, bauds[best]); // set the new baud rate + usart_async_enable(slot); // re-enable SERCOM peripheral + + return true; +} + +/** change ISO baud rate of card slot + * @param[in] slotnr slot number for which the baud rate should be set + * @param[in] clkdiv can clock divider + * @param[in] f clock rate conversion integer F + * @param[in] d baud rate adjustment factor D + * @return if the baud rate has been set, else a parameter is out of range + */ +static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) +{ + // input checks + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); + if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { + return false; + } + if (!iso7816_3_valid_f(f)) { + return false; + } + if (!iso7816_3_valid_d(d)) { + return false; + } + + // set clockdiv + struct ncn8025_settings settings; + ncn8025_get(slotnr, &settings); + if (settings.clkdiv != clkdiv) { + settings.clkdiv = clkdiv; + ncn8025_set(slotnr, &settings); + } + + // calculate desired frequency + uint32_t freq = 20000000UL; // maximum frequency + switch (clkdiv) { + case SIM_CLKDIV_1: + freq /= 1; + break; + case SIM_CLKDIV_2: + freq /= 2; + break; + case SIM_CLKDIV_4: + freq /= 4; + break; + case SIM_CLKDIV_8: + freq /= 8; + break; + } + + // set baud rate + uint32_t baudrate = (freq * d) / f; // calculate actual baud rate + return slot_set_baudrate(slotnr, baudrate); // set baud rate +} + +/*********************************************************************** + * Interface with card_uart (cuart) core + ***********************************************************************/ + +/* forward-declaration */ +static struct card_uart_driver asf4_usart_driver; +static int asf4_usart_close(struct card_uart *cuart); + +static int asf4_usart_open(struct card_uart *cuart, const char *device_name) +{ + struct usart_async_descriptor *usa_pd; + int slot_nr = atoi(device_name); + + if (slot_nr >= ARRAY_SIZE(SIM_peripheral_descriptors)) + return -ENODEV; + usa_pd = SIM_peripheral_descriptors[slot_nr]; + if (!usa_pd) + return -ENODEV; + + cuart->u.asf4.usa_pd = usa_pd; + cuart->u.asf4.slot_nr = slot_nr; + + + usart_async_register_callback(usa_pd, USART_ASYNC_RXC_CB, SIM_rx_cb[slot_nr]); + usart_async_register_callback(usa_pd, USART_ASYNC_TXC_CB, SIM_tx_cb[slot_nr]); + usart_async_register_callback(usa_pd, USART_ASYNC_ERROR_CB, _SIM_error_cb); + usart_async_enable(usa_pd); + + // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + + return 0; +} + +static int asf4_usart_close(struct card_uart *cuart) +{ + struct usart_async_descriptor *usa_pd = cuart->u.asf4.usa_pd; + + OSMO_ASSERT(cuart->driver == &asf4_usart_driver); + + usart_async_disable(usa_pd); + + return 0; +} + +static int asf4_usart_async_tx(struct card_uart *cuart, const uint8_t *data, size_t len) +{ + struct usart_async_descriptor *usa_pd = cuart->u.asf4.usa_pd; + int rc; + + OSMO_ASSERT(cuart->driver == &asf4_usart_driver); + OSMO_ASSERT(usart_async_is_tx_empty(usa_pd)); + + rc = io_write(&usa_pd->io, data, len); + if (rc < 0) + return rc; + + cuart->tx_busy = true; + + return rc; +} + +static int asf4_usart_async_rx(struct card_uart *cuart, uint8_t *data, size_t len) +{ + struct usart_async_descriptor *usa_pd = cuart->u.asf4.usa_pd; + + OSMO_ASSERT(cuart->driver == &asf4_usart_driver); + + return io_read(&usa_pd->io, data, len); +} + +static int asf4_usart_ctrl(struct card_uart *cuart, enum card_uart_ctl ctl, int arg) +{ + struct ncn8025_settings settings; + Sercom *sercom = cuart->u.asf4.usa_pd->device.hw; + + switch (ctl) { + case CUART_CTL_RX: + if (arg){ + sercom->USART.CTRLB.bit.RXEN = 1; + sercom->USART.CTRLB.bit.TXEN = 0; + } else { + delay_us(100); + sercom->USART.CTRLB.bit.RXEN = 0; + sercom->USART.CTRLB.bit.TXEN = 1; + } + break; + case CUART_CTL_RST: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + settings.rstin = arg ? true : false; + ncn8025_set(cuart->u.asf4.slot_nr, &settings); + usart_async_flush_rx_buffer(cuart->u.asf4.usa_pd); + break; + case CUART_CTL_POWER: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + settings.cmdvcc = arg ? true : false; + settings.led = arg ? true : false; + settings.vsel = SIM_VOLT_5V0; + + // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) + if(arg) + slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + + ncn8025_set(cuart->u.asf4.slot_nr, &settings); + break; + case CUART_CTL_WTIME: + /* no driver-specific handling of this */ + break; + case CUART_CTL_CLOCK: + /* FIXME */ + default: + return -EINVAL; + } + return 0; +} + +static const struct card_uart_ops asf4_usart_ops = { + .open = asf4_usart_open, + .close = asf4_usart_close, + .async_tx = asf4_usart_async_tx, + .async_rx = asf4_usart_async_rx, + .ctrl = asf4_usart_ctrl, +}; + +static struct card_uart_driver asf4_usart_driver = { + .name = "asf4", + .ops = &asf4_usart_ops, +}; + +static __attribute__((constructor)) void on_dso_load_cuart_asf4(void) +{ + card_uart_driver_register(&asf4_usart_driver); +} diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 595fd62..4840fea 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -83,6 +83,10 @@ atmel_start.o \ ccid_common/ccid_proto.o \ ccid_common/ccid_device.o \ + ccid_common/iso7816_fsm.o \ + ccid_common/cuart.o \ + ccid_common/ccid_slot_fsm.o \ + cuart_driver_asf4_usart_async.o \ command.o \ dma_m2m/dma_memory.o \ driver_init.o \ diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index fed562b..059c99d 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -40,48 +40,11 @@ #include "command.h" -// TODO put declaration in more global file -// TODO for now SIM7 is not present because used for debug -static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; #include "ccid_device.h" #include "usb_descriptors.h" +extern struct ccid_slot_ops iso_fsm_slot_ops; +static struct ccid_instance g_ci; -/** number of bytes transmitted on the SIM peripheral */ -static volatile bool SIM_tx_count[8]; - -static void SIM_rx_cb(const struct usart_async_descriptor *const io_descr) -{ -} - -/** called when the transmission is complete - * e.g. this is when the byte has been sent and there is no data to transmit anymore - */ -static void SIM_tx_cb(const struct usart_async_descriptor *const io_descr) -{ - // find slotnr for corresponding USART - uint8_t slotnr; - for (slotnr = 0; slotnr < ARRAY_SIZE(SIM_peripheral_descriptors) && SIM_peripheral_descriptors[slotnr] != io_descr; slotnr++); - - // set flag - if (slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)) { - SIM_tx_count[slotnr] = true; - } -} - -/** possible clock sources for the SERCOM peripheral - * warning: the definition must match the GCLK configuration - */ -static const uint8_t sercom_glck_sources[] = {GCLK_PCHCTRL_GEN_GCLK2_Val, GCLK_PCHCTRL_GEN_GCLK4_Val, GCLK_PCHCTRL_GEN_GCLK6_Val}; - -/** possible clock frequencies in MHz for the SERCOM peripheral - * warning: the definition must match the GCLK configuration - */ -static const double sercom_glck_freqs[] = {100E6 / CONF_GCLK_GEN_2_DIV, 100E6 / CONF_GCLK_GEN_4_DIV, 120E6 / CONF_GCLK_GEN_6_DIV}; - -/** the GCLK ID for the SERCOM SIM peripherals - * @note: used as index for PCHCTRL - */ -static const uint8_t SIM_peripheral_GCLK_ID[] = {SERCOM0_GCLK_ID_CORE, SERCOM1_GCLK_ID_CORE, SERCOM2_GCLK_ID_CORE, SERCOM3_GCLK_ID_CORE, SERCOM4_GCLK_ID_CORE, SERCOM5_GCLK_ID_CORE, SERCOM6_GCLK_ID_CORE, SERCOM7_GCLK_ID_CORE}; static void ccid_app_init(void); @@ -103,16 +66,6 @@ * (there are 8 inputs + traces to drive!) */ hri_port_set_PINCFG_DRVSTR_bit(PORT, 0, 11); - // enable SIM interfaces - for (uint8_t i = 0; i < ARRAY_SIZE(SIM_peripheral_descriptors); i++) { - if (NULL == SIM_peripheral_descriptors[i]) { - continue; - } - usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_RXC_CB, SIM_rx_cb); // required for RX to work, even if the callback does nothing - usart_async_register_callback(SIM_peripheral_descriptors[i], USART_ASYNC_TXC_CB, SIM_tx_cb); // to count the number of bytes transmitted since we are using it asynchronously - usart_async_enable(SIM_peripheral_descriptors[i]); - } - ccid_app_init(); } @@ -201,7 +154,9 @@ struct msgb *msg; int rc; - OSMO_ASSERT(!ep_q->in_progress); + if (ep_q->in_progress) + return 0; + msg = msgb_dequeue_irqsafe(&ep_q->list); if (!msg) return 0; @@ -250,6 +205,7 @@ msg = msgb_dequeue_irqsafe(&g_ccid_s.free_q); if (!msg) return -1; + msgb_reset(msg); ep_q->in_progress = msg; rc = ccid_df_read_out(msgb_data(msg), msgb_tailroom(msg)); @@ -272,6 +228,7 @@ msgb_put(msg, transferred); /* append to list of pending-to-be-handed messages */ llist_add_tail_at(&msg->list, &g_ccid_s.out_ep.list); + g_ccid_s.out_ep.in_progress = NULL; /* submit another [free] msgb to receive the next transfer */ submit_next_out(); @@ -343,8 +300,11 @@ struct msgb *msg; unsigned int i; - for (i = 0; i < 8; i++) - new_mask |= ncn8025_interrupt_level(i) << i; + for (i = 0; i < 8; i++){ + bool level = ncn8025_interrupt_level(i); + new_mask |= level << i; + g_ci.slot[i].icc_present = level; + } /* notify the user/host about any changes */ if (g_ccid_s.card_insert_mask != new_mask) { @@ -363,629 +323,6 @@ * Command Line interface ***********************************************************************/ -static int validate_slotnr(int argc, char **argv, int idx) -{ - int slotnr; - if (argc < idx+1) { - printf("You have to specify the slot number (0..7)\r\n"); - return -1; - } - slotnr = atoi(argv[idx]); - if (slotnr < 0 || slotnr > 7) { - printf("You have to specify the slot number (0..7)\r\n"); - return -1; - } - return slotnr; -} - -/** change baud rate of card slot - * @param[in] slotnr slot number for which the baud rate should be set - * @param[in] baudrate baud rate in bps to set - * @return if the baud rate has been set, else a parameter is out of range - */ -static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) -{ - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - - // calculate the error corresponding to the clock sources - uint16_t bauds[ARRAY_SIZE(sercom_glck_freqs)]; - double errors[ARRAY_SIZE(sercom_glck_freqs)]; - for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { - double freq = sercom_glck_freqs[i]; // remember possible SERCOM frequency - uint32_t min = freq / (2 * (255 + 1)); // calculate the minimum baud rate for this frequency - uint32_t max = freq / (2 * (0 + 1)); // calculate the maximum baud rate for this frequency - if (baudrate < min || baudrate > max) { // baud rate it out of supported range - errors[i] = NAN; - } else { - uint16_t baud = round(freq / (2 * baudrate) - 1); - bauds[i] = baud; - double actual = freq / (2 * (baud + 1)); - errors[i] = fabs(1.0 - (actual / baudrate)); - } - } - - // find the smallest error - uint8_t best = ARRAY_SIZE(sercom_glck_freqs); - for (uint8_t i = 0; i < ARRAY_SIZE(sercom_glck_freqs); i++) { - if (isnan(errors[i])) { - continue; - } - if (best >= ARRAY_SIZE(sercom_glck_freqs)) { - best = i; - } else if (errors[i] < errors[best]) { - best = i; - } - } - if (best >= ARRAY_SIZE(sercom_glck_freqs)) { // found no clock supporting this baud rate - return false; - } - - // set clock and baud rate - struct usart_async_descriptor* slot = SIM_peripheral_descriptors[slotnr]; // get slot - if (NULL == slot) { - return false; - } - printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); - while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) - usart_async_disable(slot); // disable SERCOM peripheral - hri_gclk_clear_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos)); // disable clock for this peripheral - while (hri_gclk_get_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], (1 << GCLK_PCHCTRL_CHEN_Pos))); // wait until clock is really disabled - // it does not seem we need to completely disable the peripheral using hri_mclk_clear_APBDMASK_SERCOMn_bit - hri_gclk_write_PCHCTRL_reg(GCLK, SIM_peripheral_GCLK_ID[slotnr], sercom_glck_sources[best] | (1 << GCLK_PCHCTRL_CHEN_Pos)); // set peripheral core clock and re-enable it - usart_async_set_baud_rate(slot, bauds[best]); // set the new baud rate - usart_async_enable(slot); // re-enable SERCOM peripheral - - return true; -} - -/** change ISO baud rate of card slot - * @param[in] slotnr slot number for which the baud rate should be set - * @param[in] clkdiv can clock divider - * @param[in] f clock rate conversion integer F - * @param[in] d baud rate adjustment factor D - * @return if the baud rate has been set, else a parameter is out of range - */ -static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { - return false; - } - if (!iso7816_3_valid_f(f)) { - return false; - } - if (!iso7816_3_valid_d(d)) { - return false; - } - - // set clockdiv - struct ncn8025_settings settings; - ncn8025_get(slotnr, &settings); - if (settings.clkdiv != clkdiv) { - settings.clkdiv = clkdiv; - ncn8025_set(slotnr, &settings); - } - - // calculate desired frequency - uint32_t freq = 20000000UL; // maximum frequency - switch (clkdiv) { - case SIM_CLKDIV_1: - freq /= 1; - break; - case SIM_CLKDIV_2: - freq /= 2; - break; - case SIM_CLKDIV_4: - freq /= 4; - break; - case SIM_CLKDIV_8: - freq /= 8; - break; - } - - // set baud rate - uint32_t baudrate = (freq * d) / f; // calculate actual baud rate - return slot_set_baudrate(slotnr, baudrate); // set baud rate -} - -/** write data to card - * @param[in] slotnr slot number on which to send data - * @param[in] data data to be transmitted - * @param[in] length length of data to be transmitted - * @return error code - */ -static int slot_card_write(uint8_t slotnr, const uint8_t* data, uint16_t length) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (0 == length || NULL == data) { - return ERR_INVALID_ARG; - } - - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 0; // disable receive (to avoid the echo back) - SIM_tx_count[slotnr] = false; // reset TX complete - for (uint16_t i = 0; i < length; i++) { // transmit data - while(!usart_async_is_tx_empty(sim)); // wait for previous byte to be transmitted (WARNING blocking) - if (1 != io_write(&sim->io, &data[i], 1)) { // put but in transmit buffer - return ERR_IO; - } - } - while (!SIM_tx_count[slotnr]); // wait until transmission is complete (WARNING blocking) - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // enable receive again - - return ERR_NONE; -} - -/** read data from card - * @param[in] slotnr slot number on which to send data - * @param[out] data buffer for read data to be stored - * @param[in] length length of data to be read - * @param[in] wt Waiting Time in ETU - * @return error code - * TODO fix WT/ETU duration - */ -static int slot_card_read(uint8_t slotnr, uint8_t* data, uint16_t length, uint32_t wt) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (0 == length || NULL == data) { - return ERR_INVALID_ARG; - } - - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; - - ((Sercom *)sim->device.hw)->USART.CTRLB.bit.RXEN = 1; // ensure RX is enabled - uint32_t timeout = wt; // reset waiting time - for (uint16_t i = 0; i < length; i++) { // read all data - while (timeout && !usart_async_is_rx_not_empty(sim)) { // verify if data is present - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - timeout--; - } - if (0 == timeout) { // timeout reached - return ERR_TIMEOUT; - } - timeout = wt; // reset waiting time - if (1 != io_read(&sim->io, &data[i], 1)) { // read one byte - return ERR_IO; - } - } - - return ERR_NONE; -} - -/** transfer TPDU - * @param[in] slotnr slot number on which to transfer the TPDU - * @param[in] header TPDU header to send - * @param[io] data TPDU data to transfer - * @param[in] data_length length of TPDU data to transfer - * @param[in] write if the data should be written (true) or read (false) - * TODO fix WT - * TODO the data length can be deduce from the header - */ -static int slot_tpdu_xfer(uint8_t slotnr, const uint8_t* header, uint8_t* data, uint16_t data_length, bool write) -{ - // input checks - ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); - if (NULL == header || (data_length > 0 && NULL == data)) { - return ERR_INVALID_ARG; - } - - int rc; - struct usart_async_descriptor* sim = SIM_peripheral_descriptors[slotnr]; // get USART peripheral - usart_async_flush_rx_buffer(sim); // flush RX buffer to start from scratch - - // send command header - printf("(%d) TPDU: ", slotnr); - for (uint8_t i = 0; i < 5; i++) { - printf("%02x ", header[i]); - } - rc = slot_card_write(slotnr, header, 5); // transmit header - if (ERR_NONE != rc) { - printf("error in command header transmit (errno = %d)\r\n", rc); - return rc; - } - - // read procedure byte, and handle data - uint8_t pb = 0x60; // wait more procedure byte - uint16_t data_i = 0; // progress in the data transfer - while (0x60 == pb) { // wait for SW - rc = slot_card_read(slotnr, &pb, 1, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error while receiving PB/SW1 (errno = %d)\r\n", rc); - return rc; - } - printf("%02x ", pb); - if (0x60 == pb) { // NULL byte - // just wait more time - } else if ((0x60 == (pb & 0xf0)) || (0x90 == (pb & 0xf0))) { // SW1 byte - // left the rest of the code handle it - } else if (header[1] == pb) { // ACK byte - // transfer rest of the data - if (data_i >= data_length) { - printf("error no more data to transfer\r\n"); - return ERR_INVALID_DATA; - } - if (write) { // transmit remaining command data - rc = slot_card_write(slotnr, &data[data_i], data_length - data_i); // transmit command data - if (ERR_NONE != rc) { - printf("error in command data transmit (errno = %d)\r\n", rc); - return rc; - } - } else { // receive remaining command data - rc = slot_card_read(slotnr, &data[data_i], data_length - data_i, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error in command data receive (errno = %d)\r\n", rc); - return rc; - } - } - for (uint16_t i = data_i; i < data_length; i++) { - printf("%02x ", data[i]); - } - data_i = data_length; // remember we transferred the data - pb = 0x60; // wait for SW1 - } else if (header[1] == (pb ^ 0xff)) { // ACK byte - // transfer only one byte - if (data_i >= data_length) { - printf("error no more data to transfer\r\n"); - return ERR_INVALID_DATA; - } - if (write) { // transmit command data byte - rc = slot_card_write(slotnr, &data[data_i], 1); // transmit command data - if (ERR_NONE != rc) { - printf("error in command data transmit (errno = %d)\r\n", rc); - return rc; - } - } else { // receive command data byte - rc = slot_card_read(slotnr, &data[data_i], 1, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error in command data receive (errno = %d)\r\n", rc); - return rc; - } - } - printf("%02x ", data[data_i]); - data_i += 1; // remember we transferred one data byte - pb = 0x60; // wait for SW1 - } else { // invalid byte - return ERR_INVALID_DATA; - } - } - - // read SW2 - uint8_t sw2; - rc = slot_card_read(slotnr, &sw2, 1, ISO7816_3_DEFAULT_WT); - if (ERR_NONE != rc) { - printf("error in receiving SW2 (errno = %d)\r\n", rc); - return rc; - } - printf("%02x", sw2); - - printf("\r\n"); - return ERR_NONE; -} - -DEFUN(sim_status, cmd_sim_status, "sim-status", "Get state of specified NCN8025") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - if (slotnr < 0) - return; - ncn8025_get(slotnr, &settings); - printf("SIM%d: ", slotnr); - ncn8025_dump(&settings); - printf("\r\n"); -} - -DEFUN(sim_power, cmd_sim_power, "sim-power", "Enable/disable SIM card power") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - int enable; - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify 0=disable or 1=enable\r\n"); - return; - } - enable = atoi(argv[2]); - ncn8025_get(slotnr, &settings); - if (enable) - settings.cmdvcc = true; - else - settings.cmdvcc = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_reset, cmd_sim_reset, "sim-reset", "Enable/disable SIM reset") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - int enable; - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify 0=disable or 1=enable\r\n"); - return; - } - enable = atoi(argv[2]); - ncn8025_get(slotnr, &settings); - if (enable) - settings.rstin = true; - else - settings.rstin = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_clkdiv, cmd_sim_clkdiv, "sim-clkdiv", "Set SIM clock divider (1,2,4,8)") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - int clkdiv; - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify a valid divider (1,2,4,8)\r\n"); - return; - } - clkdiv = atoi(argv[2]); - if (clkdiv != 1 && clkdiv != 2 && clkdiv != 4 && clkdiv != 8) { - printf("You have to specify a valid divider (1,2,4,8)\r\n"); - return; - } - ncn8025_get(slotnr, &settings); - switch (clkdiv) { - case 1: - settings.clkdiv = SIM_CLKDIV_1; - break; - case 2: - settings.clkdiv = SIM_CLKDIV_2; - break; - case 4: - settings.clkdiv = SIM_CLKDIV_4; - break; - case 8: - settings.clkdiv = SIM_CLKDIV_8; - break; - } - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_voltage, cmd_sim_voltage, "sim-voltage", "Set SIM voltage (5/3/1.8)") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify a valid voltage (5/3/1.8)\r\n"); - return; - } - ncn8025_get(slotnr, &settings); - if (!strcmp(argv[2], "5")) - settings.vsel = SIM_VOLT_5V0; - else if (!strcmp(argv[2], "3")) - settings.vsel = SIM_VOLT_3V0; - else if (!strcmp(argv[2], "1.8")) - settings.vsel = SIM_VOLT_1V8; - else { - printf("You have to specify a valid voltage (5/3/1.8)\r\n"); - return; - } - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_led, cmd_sim_led, "sim-led", "Set SIM LED (1=on, 0=off)") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0) - return; - - if (argc < 3) { - printf("You have to specify 0=disable or 1=enable\r\n"); - return; - } - ncn8025_get(slotnr, &settings); - if (atoi(argv[2])) - settings.led = true; - else - settings.led = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_atr, cmd_sim_atr, "sim-atr", "Read ATR from SIM card") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { - return; - } - - // check if card is present (and read current settings) - ncn8025_get(slotnr, &settings); - if (!settings.simpres) { - printf("(%d) error: no card present\r\n", slotnr); - return; - } - - // switch card off (assert reset and disable power) - // note: ISO/IEC 7816-3:2006 section 6.4 provides the deactivation sequence, but not the minimum corresponding times - settings.rstin = true; - settings.cmdvcc = false; - settings.led = true; - ncn8025_set(slotnr, &settings); - - // TODO wait some time for card to be completely deactivated - usart_async_flush_rx_buffer(SIM_peripheral_descriptors[slotnr]); // flush RX buffer to start from scratch - - - // set clock to lowest frequency (20 MHz / 8 = 2.5 MHz) - // note: according to ISO/IEC 7816-3:2006 section 5.2.3 the minimum value is 1 MHz, and maximum is 5 MHz during activation - settings.clkdiv = SIM_CLKDIV_8; - // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) - slot_set_isorate(slotnr, settings.clkdiv, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); - // set card voltage to 3.0 V (the most supported) - // note: according to ISO/IEC 7816-3:2006 no voltage should damage the card, and you should cycle from low to high - settings.vsel = SIM_VOLT_3V0; - // provide power (the NCN8025 should perform the activation according to spec) - // note: activation sequence is documented in ISO/IEC 7816-3:2006 section 6.2 - settings.cmdvcc = true; - ncn8025_set(slotnr, &settings); - - // wait for Tb=400 cycles before re-asserting reset - delay_us(400 * 10000 / 2500); // 400 cycles * 1000 for us, 2.5 MHz / 1000 for us - - // de-assert reset to switch card back on - settings.rstin = false; - ncn8025_set(slotnr, &settings); - - // wait for Tc=40000 cycles for transmission to start - uint32_t cycles = 40000; - while (cycles && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - delay_us(10); - cycles -= 25; // 10 us = 25 cycles at 2.5 MHz - } - if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - delay_us(12 * 372 / 1 / 2); // wait more than one byte (approximate freq down to 2 MHz) - } - // verify if one byte has been received - if (!usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - printf("(%d) error: card not responsive\r\n", slotnr); - return; - } - - // read ATR (just do it until there is no traffic anymore) - // TODO the ATR should be parsed to read the right number of bytes, instead we just wait until to end of WT - printf("(%d) ATR: ", slotnr); - uint8_t atr_byte; - while (usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - if (1 == io_read(&SIM_peripheral_descriptors[slotnr]->io, &atr_byte, 1)) { - printf("%02x ", atr_byte); - } - uint16_t wt = ISO7816_3_DEFAULT_WT; // waiting time in ETU - while (wt && !usart_async_is_rx_not_empty(SIM_peripheral_descriptors[slotnr])) { - delay_us(149); // wait for 1 ETU (372 / 1 / 2.5 MHz = 148.8 us) - wt--; - } - } - printf("\r\n"); - - /* disable LED */ - settings.led = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(sim_iccid, cmd_sim_iccid, "sim-iccid", "Read ICCID from SIM card") -{ - struct ncn8025_settings settings; - int slotnr = validate_slotnr(argc, argv, 1); - - if (slotnr < 0 || slotnr >= ARRAY_SIZE(SIM_peripheral_descriptors) || NULL == SIM_peripheral_descriptors[slotnr]) { - return; - } - - // read current settings and check if card is present and powered - ncn8025_get(slotnr, &settings); - if (!settings.simpres) { - printf("(%d) error: no card present\r\n", slotnr); - return; - } - if (!settings.cmdvcc) { - printf("(%d) error: card not powered\r\n", slotnr); - return; - } - if (settings.rstin) { - printf("(%d) error: card under reset\r\n", slotnr); - return; - } - - // enable LED - if (!settings.led) { - settings.led = true; - ncn8025_set(slotnr, &settings); - } - - // select MF - printf("(%d) SELECT MF\r\n", slotnr); - const uint8_t select_header[] = {0xa0, 0xa4, 0x00, 0x00, 0x02}; // see TS 102.221 sec. 11.1.1 - const uint8_t select_data_mf[] = {0x3f, 0x00}; // see TS 102.221 sec. 13.1 - int rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_mf, ARRAY_SIZE(select_data_mf), true); // transfer TPDU - if (ERR_NONE != rc) { - printf("error while SELECT MF (errno = %d)\r\n", rc); - } - // ignore response data - - // select EF_ICCID - printf("(%d) SELECT EF_ICCID\r\n", slotnr); - const uint8_t select_data_ef_iccid[] = {0x2f, 0xe2}; // see TS 102.221 sec. 13.2 - rc = slot_tpdu_xfer(slotnr, select_header, (uint8_t*)select_data_ef_iccid, ARRAY_SIZE(select_data_ef_iccid), true); // transfer TPDU - if (ERR_NONE != rc) { - printf("error while SELECT EF_ICCID (errno = %d)\r\n", rc); - } - // ignore response data - - // read EF_ICCID - printf("(%d) READ EF_ICCID\r\n", slotnr); - uint8_t iccid[10]; - uint8_t read_binary[] = {0xa0, 0xb0, 0x00, 0x00, ARRAY_SIZE(iccid)}; // see TS 102.221 sec. 11.1.3 - rc = slot_tpdu_xfer(slotnr, read_binary, iccid, ARRAY_SIZE(iccid), false); // transfer TPDU - if (ERR_NONE != rc) { - printf("error while READ ICCID (errno = %d)\r\n", rc); - } - // ignore response data - - printf("(%d) ICCID: ", slotnr); - for (uint8_t i = 0; i < ARRAY_SIZE(iccid); i++) { - uint8_t nibble = iccid[i] & 0xf; - if (0xf == nibble) { - break; - } - printf("%x", nibble); - nibble = iccid[i] >> 4; - if (0xf == nibble) { - break; - } - printf("%x", nibble); - } - printf("\r\n"); - - // disable LED - settings.led = false; - ncn8025_set(slotnr, &settings); -} - -DEFUN(get_time, cmd_get_time, "get-time", "Read Time from RTC") -{ - struct calendar_date_time dt; - calendar_get_date_time(&CALENDAR_0, &dt); - printf("%04u-%02u-%02u %02u:%02u:%02u\r\n", dt.date.year, dt.date.month, dt.date.day, - dt.time.hour, dt.time.min, dt.time.sec); -} - -#include -static struct osmo_timer_list t; -static void tmr_cb(void *data) -{ - printf("timer fired!\r\n"); -} -DEFUN(test_timer, cmd_test_timer, "test-timer", "Test osmo_timer") -{ - printf("Setting up timer for 3s...\n\r"); - osmo_timer_setup(&t, &tmr_cb, NULL); - osmo_timer_schedule(&t, 3, 0); -} - extern void testmode_init(void); extern void libosmo_emb_init(void); @@ -993,25 +330,9 @@ #include "talloc.h" #include "logging.h" -#include + void *g_tall_ctx; -DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc report") -{ - talloc_report_full(g_tall_ctx, stdout); -} - -DEFUN(talloc_test, cmd_talloc_test, "talloc-test", "Test the talloc allocator") -{ - for (int i = 0; i < 10; i++) - talloc_named_const(g_tall_ctx, 10, "sibling"); -} - -DEFUN(v_talloc_free, cmd_talloc_free, "talloc-free", "Release all memory") -{ - talloc_free(g_tall_ctx); - g_tall_ctx = NULL; -} /* Section 9.6 of SAMD5x/E5x Family Data Sheet */ static int get_chip_unique_serial(uint8_t *out, size_t len) @@ -1067,6 +388,55 @@ strcat(out, "BACKUP "); } +//####################### + + + +static uint32_t clock_freqs[] = { + 2500000 +}; + +static uint32_t data_rates[] = { + 6720 +}; +extern struct usb_desc_collection usb_fs_descs; + + + +static int feed_ccid(void) +{ + struct usb_ep_q *ep_q = &g_ccid_s.out_ep; + struct msgb *msg; + int rc; + + msg = msgb_dequeue_irqsafe(&g_ccid_s.out_ep.list); + if (!msg) + return -1; + + ccid_handle_out(&g_ci, msg); + return 1; +} + +static int ccid_ops_send_in(struct ccid_instance *ci, struct msgb *msg) +{ + /* add just-received msg to tail of endpoint queue */ + OSMO_ASSERT(msg); + + /* append to list of pending-to-be-handed messages */ + llist_add_tail_at(&msg->list, &g_ccid_s.in_ep.list); + submit_next_in(); + return 0; +} + +static const struct ccid_ops c_ops = { + .send_in = ccid_ops_send_in, + .send_int = 0, +}; + +//####################### + +#define NUM_OUT_BUF 7 + int main(void) { char sernr_buf[16*2+1]; @@ -1080,20 +450,6 @@ board_init(); command_init("sysmoOCTSIM> "); - command_register(&cmd_sim_status); - command_register(&cmd_sim_power); - command_register(&cmd_sim_reset); - command_register(&cmd_sim_clkdiv); - command_register(&cmd_sim_voltage); - command_register(&cmd_sim_led); - command_register(&cmd_sim_atr); - command_register(&cmd_sim_iccid); - testmode_init(); - command_register(&cmd_talloc_test); - command_register(&cmd_talloc_report); - command_register(&cmd_talloc_free); - command_register(&cmd_get_time); - command_register(&cmd_test_timer); printf("\r\n\r\n" "=============================================================================\n\r" @@ -1111,11 +467,39 @@ LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); - command_print_prompt(); + ccid_instance_init(&g_ci, &c_ops, &iso_fsm_slot_ops, &usb_fs_descs.ccid.class, + data_rates, clock_freqs, "", 0); + + for(int i =0; i < NUM_OUT_BUF; i++){ + struct msgb *msg = msgb_alloc(300, "ccid"); + OSMO_ASSERT(msg); + /* return the message back to the queue of free message buffers */ + llist_add_tail_at(&msg->list, &g_ccid_s.free_q); + } + submit_next_out(); + +// command_print_prompt(); while (true) { // main loop command_try_recv(); poll_card_detect(); submit_next_irq(); + feed_ccid(); osmo_timers_update(); + int qs = llist_count_at(&g_ccid_s.free_q); + if(qs > NUM_OUT_BUF) + for (int i= 0; i < qs-NUM_OUT_BUF; i++){ + struct msgb *msg = msgb_dequeue_irqsafe(&g_ccid_s.free_q); + if (msg) + msgb_free(msg); + } + if(qs < NUM_OUT_BUF) + for (int i= 0; i < qs-NUM_OUT_BUF; i++){ + struct msgb *msg = msgb_alloc(300,"ccid"); + OSMO_ASSERT(msg); + /* return the message back to the queue of free message buffers */ + llist_add_tail_at(&msg->list, &g_ccid_s.free_q); + } + + } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic690055bc332ccca3de7c5f4429399cf9ff1d4da Gerrit-Change-Number: 16267 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:41 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the uart ring buffer size In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 ) Change subject: increase the uart ring buffer size ...................................................................... increase the uart ring buffer size must be be a power of 2, and should be at least as large as the largest transfer that we might be waiting for - revisit this, is 256 enough? Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c --- M sysmoOCTSIM/driver_init.c 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index 620ed6c..c373dc2 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -12,25 +12,25 @@ #include /*! The buffer size for USART */ -#define SIM0_BUFFER_SIZE 16 +#define SIM0_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM1_BUFFER_SIZE 16 +#define SIM1_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM2_BUFFER_SIZE 16 +#define SIM2_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM3_BUFFER_SIZE 16 +#define SIM3_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM4_BUFFER_SIZE 16 +#define SIM4_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM5_BUFFER_SIZE 16 +#define SIM5_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define SIM6_BUFFER_SIZE 16 +#define SIM6_BUFFER_SIZE 512 /*! The buffer size for USART */ #define UART_DEBUG_BUFFER_SIZE 256 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id4b4691dd32d465f627ba42c0ba3d509dcf8f42c Gerrit-Change-Number: 16268 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:41 +0000 Subject: Change in osmo-ccid-firmware[master]: talloc asserts In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 ) Change subject: talloc asserts ...................................................................... talloc asserts Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99 --- M sysmoOCTSIM/talloc.c 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/talloc.c b/sysmoOCTSIM/talloc.c index c5c9062..918cf42 100644 --- a/sysmoOCTSIM/talloc.c +++ b/sysmoOCTSIM/talloc.c @@ -30,6 +30,10 @@ inspired by http://swapped.cc/halloc/ */ +#include +#include +#include + #include "replace.h" #include "talloc.h" @@ -727,6 +731,9 @@ size_t total_len = TC_HDR_SIZE + size + prefix_len; struct talloc_chunk *parent = NULL; + // do not allocate while handling interrupts! + OSMO_ASSERT( !(SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) ) + if (unlikely(context == NULL)) { context = null_context; } @@ -1740,6 +1747,9 @@ { struct talloc_chunk *tc; + // do not deallocate while handling interrupts! + OSMO_ASSERT( !(SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) ) + if (unlikely(ptr == NULL)) { return -1; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I00df6e41f38eba6b6f06a0dab52035f446718a99 Gerrit-Change-Number: 16269 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:42 +0000 Subject: Change in osmo-ccid-firmware[master]: no logging, no memory pool In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 ) Change subject: no logging, no memory pool ...................................................................... no logging, no memory pool Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c 3 files changed, 15 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/atmel_start.c b/sysmoOCTSIM/atmel_start.c index bee1ed2..6670364 100644 --- a/sysmoOCTSIM/atmel_start.c +++ b/sysmoOCTSIM/atmel_start.c @@ -14,6 +14,6 @@ system_init(); dma_memory_init(); dma_memory_register_callback(DMA_MEMORY_COMPLETE_CB, M2M_DMA_complete_cb); - stdio_redirect_init(); +// stdio_redirect_init(); usb_init(); } diff --git a/sysmoOCTSIM/libosmo_emb.c b/sysmoOCTSIM/libosmo_emb.c index 1914568..a12c490 100644 --- a/sysmoOCTSIM/libosmo_emb.c +++ b/sysmoOCTSIM/libosmo_emb.c @@ -41,43 +41,43 @@ [DUSB] = { .name = "USB", .description = "USB Transport", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_NOTICE, }, [DCCID] = { .name = "CCID", .description = "USB-CCID Protocol", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DISO7816] = { .name = "ISO7816", .description = "ISO7816-3 State machines", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DATR] = { .name = "ATR", .description = "ATR (Answer To Reset) FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DTPDU] = { .name = "TPDU", .description = "TPDU FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DPPS] = { .name = "PPS", .description = "PPS (Protocol and Parameter Selection) FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, [DCARD] = { .name = "CARD", .description = "Card FSM", - .enabled = 1, + .enabled = 0, .loglevel = LOGL_DEBUG, }, }; @@ -150,16 +150,18 @@ struct log_target *stderr_target; /* msgb */ +#if 0 g_msgb_ctx = talloc_pool(g_tall_ctx, 20480); talloc_set_memlimit(g_msgb_ctx, 20480); msgb_talloc_ctx_init(g_msgb_ctx, 0); - +#endif /* logging */ log_init(&log_info, g_tall_ctx); +#if 0 stderr_target = log_target_create_stderr_raw(); log_add_target(stderr_target); log_set_all_filter(stderr_target, 1); - +#endif /* timer */ SysTick_Config(SystemCoreClock / 1000); } diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 059c99d..0f2409a 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -463,6 +463,9 @@ g_tall_ctx = talloc_named_const(NULL, 0, "global"); printf("g_tall_ctx=%p\r\n", g_tall_ctx); + //FIXME osmo_emb has a pool? + msgb_talloc_ctx_init(g_tall_ctx, 0); + libosmo_emb_init(); LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iaf5123ab0340efec7b8e11e689f529f2e95e31ca Gerrit-Change-Number: 16270 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:42 +0000 Subject: Change in osmo-ccid-firmware[master]: prevent uart interrupts before having proper structs In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 ) Change subject: prevent uart interrupts before having proper structs ...................................................................... prevent uart interrupts before having proper structs Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e --- M sysmoOCTSIM/main.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 0f2409a..7ddca92 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -470,6 +470,8 @@ LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); + //prevent spurious interrupts before our driver structs are ready + CRITICAL_SECTION_ENTER() ccid_instance_init(&g_ci, &c_ops, &iso_fsm_slot_ops, &usb_fs_descs.ccid.class, data_rates, clock_freqs, "", 0); @@ -480,6 +482,7 @@ llist_add_tail_at(&msg->list, &g_ccid_s.free_q); } submit_next_out(); + CRITICAL_SECTION_LEAVE() // command_print_prompt(); while (true) { // main loop -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9cf7ff883721211ae11821339505d2e3b2a7961e Gerrit-Change-Number: 16271 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:42 +0000 Subject: Change in osmo-ccid-firmware[master]: move iso7816_3 to common dir In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 ) Change subject: move iso7816_3 to common dir ...................................................................... move iso7816_3 to common dir Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92 --- R ccid_common/iso7816_3.c R ccid_common/iso7816_3.h M sysmoOCTSIM/gcc/Makefile 3 files changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/iso7816_3.c b/ccid_common/iso7816_3.c similarity index 100% rename from sysmoOCTSIM/iso7816_3.c rename to ccid_common/iso7816_3.c diff --git a/sysmoOCTSIM/iso7816_3.h b/ccid_common/iso7816_3.h similarity index 100% rename from sysmoOCTSIM/iso7816_3.h rename to ccid_common/iso7816_3.h diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 4840fea..95a582f 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -84,6 +84,7 @@ ccid_common/ccid_proto.o \ ccid_common/ccid_device.o \ ccid_common/iso7816_fsm.o \ + ccid_common/iso7816_3.o \ ccid_common/cuart.o \ ccid_common/ccid_slot_fsm.o \ cuart_driver_asf4_usart_async.o \ @@ -123,7 +124,6 @@ hpl/sercom/hpl_sercom.o \ hpl/usb/hpl_usb.o \ i2c_bitbang.o \ - iso7816_3.o \ libosmo_emb.o \ main.o \ manual_test.o \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Id8cfc9247988ae999f5544d936d67f12e3902b92 Gerrit-Change-Number: 16272 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:42 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart icc clock freq and divider setting support In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 ) Change subject: cuart icc clock freq and divider setting support ...................................................................... cuart icc clock freq and divider setting support Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e --- M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/ncn8025.c M sysmoOCTSIM/ncn8025.h 4 files changed, 43 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 5e397ab..6c53481 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -25,8 +25,10 @@ CUART_CTL_RX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ + CUART_CTL_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ CUART_CTL_RST, /* enable/disable ICC reset */ CUART_CTL_WTIME, /* set the waiting time (in etu) */ + CUART_CTL_FD, }; struct card_uart; @@ -95,6 +97,8 @@ struct { struct usart_async_descriptor *usa_pd; uint8_t slot_nr; + /* in us, required, no delay breaks _rx_ */ + uint32_t extrawait_after_rx; } asf4; } u; }; diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index f9856f3..a8f8044 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -289,6 +289,8 @@ cuart->u.asf4.usa_pd = usa_pd; cuart->u.asf4.slot_nr = slot_nr; + /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ + cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); usart_async_register_callback(usa_pd, USART_ASYNC_RXC_CB, SIM_rx_cb[slot_nr]); usart_async_register_callback(usa_pd, USART_ASYNC_TXC_CB, SIM_tx_cb[slot_nr]); @@ -338,6 +340,8 @@ return io_read(&usa_pd->io, data, len); } +#include "ccid_device.h" +#include "iso7816_3.h" static int asf4_usart_ctrl(struct card_uart *cuart, enum card_uart_ctl ctl, int arg) { struct ncn8025_settings settings; @@ -349,7 +353,7 @@ sercom->USART.CTRLB.bit.RXEN = 1; sercom->USART.CTRLB.bit.TXEN = 0; } else { - delay_us(100); + delay_us(cuart->u.asf4.extrawait_after_rx); sercom->USART.CTRLB.bit.RXEN = 0; sercom->USART.CTRLB.bit.TXEN = 1; } @@ -361,22 +365,47 @@ usart_async_flush_rx_buffer(cuart->u.asf4.usa_pd); break; case CUART_CTL_POWER: - ncn8025_get(cuart->u.asf4.slot_nr, &settings); - settings.cmdvcc = arg ? true : false; - settings.led = arg ? true : false; - settings.vsel = SIM_VOLT_5V0; + /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ + cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) if(arg) slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + settings.cmdvcc = arg ? true : false; + settings.led = arg ? true : false; + settings.vsel = SIM_VOLT_5V0; ncn8025_set(cuart->u.asf4.slot_nr, &settings); + break; case CUART_CTL_WTIME: /* no driver-specific handling of this */ break; case CUART_CTL_CLOCK: - /* FIXME */ + /* no clock stop support */ + break; + case CUART_CTL_CLOCK_FREQ: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + + /* 2,5/5/10/20 supported by dividers */ + enum ncn8025_sim_clkdiv clkdiv = SIM_CLKDIV_1; + if(arg < 20000000) + clkdiv = SIM_CLKDIV_2; + if(arg < 10000000) + clkdiv = SIM_CLKDIV_4; + if(arg < 5000000) + clkdiv = SIM_CLKDIV_8; + settings.clkdiv = clkdiv; + ncn8025_set(cuart->u.asf4.slot_nr, &settings); + break; + case CUART_CTL_FD: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + uint8_t divider = ncn8025_div_val[settings.clkdiv]; + uint32_t baudrate = (20e6/divider)/arg; + cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; + slot_set_baudrate(cuart->u.asf4.slot_nr, baudrate); + break; default: return -EINVAL; } diff --git a/sysmoOCTSIM/ncn8025.c b/sysmoOCTSIM/ncn8025.c index 540b166..74d3b39 100644 --- a/sysmoOCTSIM/ncn8025.c +++ b/sysmoOCTSIM/ncn8025.c @@ -159,7 +159,7 @@ [SIM_VOLT_1V8] = "1.8", }; -static const unsigned int div_val[] = { +const unsigned int ncn8025_div_val[] = { [SIM_CLKDIV_1] = 1, [SIM_CLKDIV_2] = 2, [SIM_CLKDIV_4] = 4, @@ -168,7 +168,7 @@ void ncn8025_dump(const struct ncn8025_settings *set) { - printf("VOLT=%s, CLKDIV=%u", volt_str[set->vsel], div_val[set->clkdiv]); + printf("VOLT=%s, CLKDIV=%u", volt_str[set->vsel], ncn8025_div_val[set->clkdiv]); if (set->rstin) printf(", RST"); if (set->cmdvcc) diff --git a/sysmoOCTSIM/ncn8025.h b/sysmoOCTSIM/ncn8025.h index 2e774a7..01ddc97 100644 --- a/sysmoOCTSIM/ncn8025.h +++ b/sysmoOCTSIM/ncn8025.h @@ -14,6 +14,8 @@ SIM_CLKDIV_8 = 0, }; +extern const unsigned int ncn8025_div_val[]; + struct ncn8025_settings { bool rstin; /* Reset signal (true: asserted low) */ bool cmdvcc; /* Command VCC pin. Activation sequence Enable (true: active low) */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9c99c68511d3972513348ee6be5e7bb3b3a5f99e Gerrit-Change-Number: 16273 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:43 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:43 +0000 Subject: Change in osmo-ccid-firmware[master]: ccid setparameters/PPS support In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 ) Change subject: ccid setparameters/PPS support ...................................................................... ccid setparameters/PPS support Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a --- M ccid_common/ccid_device.c M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M ccid_common/iso7816_fsm.h 5 files changed, 322 insertions(+), 21 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index 8183b16..c67c52e 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -23,9 +23,11 @@ /* decode on-the-wire T0 parameters into their parsed form */ static int decode_ccid_pars_t0(struct ccid_pars_decoded *out, const struct ccid_proto_data_t0 *in) { - /* input validation: only 0x00 and 0x02 permitted for bmTCCKST0 */ - if (in->bmTCCKST0 & 0xFD) - return -11; + /* input validation: only 0x00 and 0x02 permitted for bmTCCKST0 + * if (in->bmTCCKST0 & 0xFD) + * return -11; + * 7816-3 6.1.7 says: "Note: the CCID ignores this bit", placeholder for GETparameters */ + /* input validation: only 0x00 to 0x03 permitted for bClockSTop */ if (in->bClockStop & 0xFC) return -14; @@ -254,7 +256,7 @@ } return msg; } -static struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, +struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err) { return ccid_gen_parameters_t0_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, &cs->pars); @@ -276,7 +278,7 @@ } return msg; } -static struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, +struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, enum ccid_error_code err) { return ccid_gen_parameters_t1_nr(cs->slot_nr, get_icc_status(cs), seq, cmd_sts, err, &cs->pars); @@ -465,7 +467,7 @@ /* copy default parameters from somewhere */ /* FIXME: T=1 */ - cs->ci->slot_ops->set_params(cs, CCID_PROTOCOL_NUM_T0, cs->default_pars); + cs->ci->slot_ops->set_params(cs, seq, CCID_PROTOCOL_NUM_T0, cs->default_pars); cs->pars = *cs->default_pars; resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); @@ -502,14 +504,16 @@ goto out; } + cs->proposed_pars = pars_dec; + /* validate parameters; abort if they are not supported */ - rc = cs->ci->slot_ops->set_params(cs, spar->bProtocolNum, &pars_dec); + rc = cs->ci->slot_ops->set_params(cs, seq, spar->bProtocolNum, &pars_dec); if (rc < 0) { resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); - } else { - cs->pars = pars_dec; - resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); + goto out; } + /* busy, tdpu like callback */ + return 1; out: return ccid_slot_send_unbusy(cs, resp); } diff --git a/ccid_common/ccid_device.h b/ccid_common/ccid_device.h index ae3ab5b..8390783 100644 --- a/ccid_common/ccid_device.h +++ b/ccid_common/ccid_device.h @@ -53,6 +53,8 @@ bool cmd_busy; /* decided CCID parameters */ struct ccid_pars_decoded pars; + /* proposed CCID parameters */ + struct ccid_pars_decoded proposed_pars; /* default parameters; applied on ResetParameters */ const struct ccid_pars_decoded *default_pars; }; @@ -80,7 +82,7 @@ const struct ccid_pc_to_rdr_xfr_block *xfb); void (*set_power)(struct ccid_slot *cs, bool enable); void (*set_clock)(struct ccid_slot *cs, enum ccid_clock_command cmd); - int (*set_params)(struct ccid_slot *cs, enum ccid_protocol_num proto, + int (*set_params)(struct ccid_slot *cs, uint8_t seq, enum ccid_protocol_num proto, const struct ccid_pars_decoded *pars_dec); int (*set_rate_and_clock)(struct ccid_slot *cs, uint32_t freq_hz, uint32_t rate_bps); }; @@ -118,6 +120,10 @@ const uint32_t *data_rates, const uint32_t *clock_freqs, const char *name, void *priv); int ccid_handle_out(struct ccid_instance *ci, struct msgb *msg); +struct msgb *ccid_gen_parameters_t0(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err); +struct msgb *ccid_gen_parameters_t1(struct ccid_slot *cs, uint8_t seq, uint8_t cmd_sts, + enum ccid_error_code err); /* Invalid request received: Please return STALL */ #define CCID_CTRL_RET_INVALID -1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 870cf35..8bdcfd5 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -13,6 +13,7 @@ #include "ccid_device.h" #include "cuart.h" #include "iso7816_fsm.h" +#include "iso7816_3.h" struct iso_fsm_slot { /* CCID slot above us */ @@ -112,6 +113,33 @@ ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); break; + case ISO7816_E_PPS_DONE_IND: + tpdu = data; + /* pps was successful, so we know these values are fine */ + uint16_t F = iso7816_3_fi_table[cs->proposed_pars.fi]; + uint8_t D = iso7816_3_di_table[cs->proposed_pars.di]; + uint32_t fmax = iso7816_3_fmax_table[cs->proposed_pars.fi]; + + card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK_FREQ, fmax); + card_uart_ctrl(ss->cuart, CUART_CTL_FD, F/D); + card_uart_ctrl(ss->cuart, CUART_CTL_WTIME, cs->proposed_pars.t0.waiting_integer); + + cs->pars = cs->proposed_pars; + resp = ccid_gen_parameters_t0(cs, ss->seq, CCID_CMD_STATUS_OK, 0); + + ccid_slot_send_unbusy(cs, resp); + + /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ + msgb_free(tpdu); + break; + case ISO7816_E_PPS_FAILED_IND: + tpdu = data; + /* failed fi/di */ + resp = ccid_gen_parameters_t0(cs, ss->seq, CCID_CMD_STATUS_FAILED, 10); + ccid_slot_send_unbusy(cs, resp); + /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ + msgb_free(tpdu); + break; default: LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, cause=%d, data=%p) unhandled\n", __func__, event, cause, data); @@ -175,10 +203,36 @@ } } -static int iso_fsm_slot_set_params(struct ccid_slot *cs, enum ccid_protocol_num proto, +static int iso_fsm_slot_set_params(struct ccid_slot *cs, uint8_t seq, enum ccid_protocol_num proto, const struct ccid_pars_decoded *pars_dec) { - /* we always acknowledge all parameters */ + struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); + struct msgb *tpdu; + + /* see 6.1.7 for error offsets */ + if(proto != CCID_PROTOCOL_NUM_T0) + return -7; + + if(pars_dec->t0.guard_time_etu != 0) + return -12; + + if(pars_dec->clock_stop != CCID_CLOCK_STOP_NOTALLOWED) + return -14; + + ss->seq = seq; + + /* Hardware does not support SPU, so no PPS2, and PPS3 is reserved anyway */ + tpdu = msgb_alloc(6, "PPSRQ"); + OSMO_ASSERT(tpdu); + msgb_put_u8(tpdu, 0xff); + msgb_put_u8(tpdu, (1 << 4)); /* only PPS1, T=0 */ + msgb_put_u8(tpdu, (pars_dec->fi << 4 | pars_dec->di)); + msgb_put_u8(tpdu, 0xff ^ (1 << 4) ^ (pars_dec->fi << 4 | pars_dec->di)); + + + LOGPCS(cs, LOGL_DEBUG, "scheduling PPS transfer: %s\n", msgb_hexdump(tpdu)); + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_PPS_CMD, tpdu); + /* continues in iso_fsm_clot_user_cb once response/error/timeout is received */ return 0; } diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index beda7ab..d02a955 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -69,6 +69,7 @@ * @note defined in ISO/IEC 7816-3:2006(E) section 9 */ enum pps_state { + PPS_S_TX_PPS_REQ, /*!< tx pps request */ PPS_S_WAIT_PPSS, /*!< initial byte */ PPS_S_WAIT_PPS0, /*!< format byte */ PPS_S_WAIT_PPS1, /*!< first parameter byte */ @@ -221,7 +222,7 @@ /* go back to initial state in child FSMs */ osmo_fsm_inst_state_chg(ip->atr_fi, ATR_S_WAIT_TS, 0, 0); - //osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_WAIT_PPSS, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); osmo_fsm_inst_state_chg(ip->tpdu_fi, TPDU_S_INIT, 0, 0); } @@ -311,6 +312,11 @@ /* pass on to sub-fsm */ osmo_fsm_inst_dispatch(ip->tpdu_fi, event, data); break; + case ISO7816_E_XCEIVE_PPS_CMD: + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); + osmo_fsm_inst_dispatch(ip->pps_fi, event, data); + break; default: OSMO_ASSERT(0); } @@ -369,6 +375,62 @@ } } +static void iso7816_3_in_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct iso7816_3_priv *tfp = get_iso7816_3_priv(fi); + + switch (event) { + case ISO7816_E_XCEIVE_PPS_CMD: + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); + break; + default: + OSMO_ASSERT(0); + } +} + + +static void iso7816_3_s_wait_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + switch (event) { + case ISO7816_E_TX_COMPL: + /* Rx of single byte is already enabled by previous card_uart_tx() call */ + osmo_fsm_inst_state_chg(fi, ISO7816_S_IN_PPS_RSP, 0, 0); + break; + default: + OSMO_ASSERT(0); + } +} + +static void iso7816_3_s_ins_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); + struct msgb *ppsrsp; + OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + + switch (event) { + case ISO7816_E_RX_SINGLE: + case ISO7816_E_WTIME_EXP: + /* simply pass this through to the child FSM for the ATR */ + osmo_fsm_inst_dispatch(ip->pps_fi, event, data); + break; + case ISO7816_E_PPS_DONE_IND: + case ISO7816_E_PPS_FAILED_IND: + ppsrsp = data; + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_TPDU, 0, 0); + /* notify user about PPS result */ + ip->user_cb(fi, event, 0, ppsrsp); + break; + case ISO7816_E_RX_ERR_IND: + ppsrsp = data; + osmo_fsm_inst_state_chg(fi, ISO7816_S_RESET, 0, 0); + ip->user_cb(fi, event, 0, ppsrsp); + break; + default: + OSMO_ASSERT(0); + } +} + static const struct osmo_fsm_state iso7816_3_states[] = { [ISO7816_S_RESET] = { .name = "RESET", @@ -400,11 +462,13 @@ }, [ISO7816_S_WAIT_TPDU] = { .name = "WAIT_TPDU", - .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD), + .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD) | + S(ISO7816_E_XCEIVE_PPS_CMD), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_TPDU) | - S(ISO7816_S_IN_PPS_REQ), + S(ISO7816_S_IN_PPS_REQ) | + S(ISO7816_S_WAIT_PPS_RSP), .action = iso7816_3_wait_tpdu_action, .onenter = iso7816_3_wait_tpdu_onenter, }, @@ -424,26 +488,36 @@ }, [ISO7816_S_IN_PPS_REQ] = { .name = "IN_PPS_REQ", - .in_event_mask = 0, /* FIXME */ + .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_PPS_REQ) | S(ISO7816_S_WAIT_PPS_RSP), + .action = iso7816_3_in_pps_req_action, }, [ISO7816_S_WAIT_PPS_RSP] = { .name = "WAIT_PPS_RESP", - .in_event_mask = 0, /* FIXME */ + .in_event_mask = S(ISO7816_E_TX_COMPL) | + S(ISO7816_E_TX_ERR_IND) | + S(ISO7816_E_WTIME_EXP), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_WAIT_PPS_RSP) | S(ISO7816_S_IN_PPS_RSP), + .action = iso7816_3_s_wait_pps_rsp_action, }, [ISO7816_S_IN_PPS_RSP] = { .name = "IN_PPS_RESP", - .in_event_mask = 0, /* FIXME */ + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_RX_COMPL) | + S(ISO7816_E_RX_ERR_IND) | + S(ISO7816_E_PPS_DONE_IND) | + S(ISO7816_E_PPS_FAILED_IND) | + S(ISO7816_E_WTIME_EXP), .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_PPS_RSP), + .action = iso7816_3_s_ins_pps_rsp_action, }, }; static struct osmo_fsm iso7816_3_fsm = { @@ -796,28 +870,188 @@ /*********************************************************************** * PPS FSM ***********************************************************************/ +struct pps_fsm_priv { + struct msgb* tx_cmd; + struct msgb* rx_cmd; + uint8_t pps0_recv; +}; + +static void pps_s_wait_ppss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct pps_fsm_priv *atp = fi->priv; + + if (!atp->rx_cmd) + atp->rx_cmd = msgb_alloc_c(fi, 6, "ATR"); /* TS + 32 chars */ + else + msgb_reset(atp->rx_cmd); +} + +static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct pps_fsm_priv *atp = fi->priv; + atp->tx_cmd = data; + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + switch (event) { + case ISO7816_E_XCEIVE_PPS_CMD: + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSS, 0, 0); + card_uart_tx(ip->uart, msgb_data(data), msgb_length(data), true); + break; + default: + OSMO_ASSERT(0); + } +} + +static void pps_wait_pX_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct pps_fsm_priv *atp = fi->priv; +// uint32_t guard_time_ms = atr_fi_gt_ms(fi); + uint8_t byte; + + switch (event) { + case ISO7816_E_RX_SINGLE: + byte = get_rx_byte_evt(fi->proc.parent, data); + LOGPFSML(fi, LOGL_DEBUG, "RX byte '%02x'\n", byte); + msgb_put_u8(atp->rx_cmd, byte); + switch (fi->state) { + case PPS_S_WAIT_PPSS: + if (byte == 0xff) + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS0, 0, 0); + break; + case PPS_S_WAIT_PPS0: + atp->pps0_recv = byte; + if(atp->pps0_recv & (1 << 4)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS1, 0, 0); + break; + } else if (atp->pps0_recv & (1 << 5)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS2, 0, 0); + break; + } else if (atp->pps0_recv & (1 << 6)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS3, 0, 0); + break; + } + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PPS1: + if (atp->pps0_recv & (1 << 5)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS2, 0, 0); + break; + } else if (atp->pps0_recv & (1 << 6)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS3, 0, 0); + break; + } + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PPS2: + if (atp->pps0_recv & (1 << 6)) { + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS3, 0, 0); + break; + } + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PPS3: + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PCK, 0, 0); + break; + case PPS_S_WAIT_PCK: + /* verify checksum if present */ + if (fi->state == PPS_S_WAIT_PCK) { + uint8_t *pps_received = msgb_data(atp->rx_cmd); + uint8_t *pps_sent = msgb_data(atp->tx_cmd); + + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_END, 0, 0); + + /* pps was successful if response equals request + * rx buffer stays with the fsm, tx buffer gets handed back and freed + * by the cb */ + if (msgb_length(atp->rx_cmd) == msgb_length(atp->tx_cmd) && + !memcmp(pps_received, pps_sent, msgb_length(atp->rx_cmd))) { + osmo_fsm_inst_dispatch(fi->proc.parent, + ISO7816_E_PPS_DONE_IND, atp->tx_cmd); + } else { + osmo_fsm_inst_dispatch(fi->proc.parent, + ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); + } + } + break; + default: + OSMO_ASSERT(0); + } + break; + case ISO7816_E_WTIME_EXP: + /* FIXME: timeout handling if no pps supported ? */ + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_RX_ERR_IND, NULL); + break; + default: + OSMO_ASSERT(0); + } +} + static const struct osmo_fsm_state pps_states[] = { + [PPS_S_TX_PPS_REQ] = { + .name = "TX_PPS_REQ", + .in_event_mask = S(ISO7816_E_XCEIVE_PPS_CMD) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_TX_PPS_REQ) | + S(PPS_S_WAIT_PPSS), + .action = pps_s_tx_pps_req_action, + .onenter = pps_s_wait_ppss_onenter, + }, [PPS_S_WAIT_PPSS] = { .name = "WAIT_PPSS", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS0) | + S(PPS_S_WAIT_PPSS), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS0] = { .name = "WAIT_PPS0", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS1) | + S(PPS_S_WAIT_PPS2) | + S(PPS_S_WAIT_PPS3) | + S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS1] = { .name = "WAIT_PPS1", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS2) | + S(PPS_S_WAIT_PPS3) | + S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS2] = { .name = "WAIT_PPS2", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PPS3) | + S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS3] = { .name = "WAIT_PPS3", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_PCK), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_PCK] = { .name = "WAIT_PCK", + .in_event_mask = S(ISO7816_E_RX_SINGLE) | + S(ISO7816_E_WTIME_EXP), + .out_state_mask = S(PPS_S_WAIT_END), + .action = pps_wait_pX_action, }, [PPS_S_WAIT_END] = { .name = "WAIT_END", + .in_event_mask = 0, + .out_state_mask = S(PPS_S_TX_PPS_REQ) | + S(PPS_S_WAIT_PPSS), }, }; @@ -1223,7 +1457,7 @@ if (!ip->tpdu_fi->priv) goto out_tpdu; -#if 0 +#if 1 ip->pps_fi = osmo_fsm_inst_alloc_child(&pps_fsm, fi, ISO7816_E_SW_ERR_IND); if (!ip->pps_fi) goto out_tpdu; @@ -1237,7 +1471,7 @@ return fi; -#if 0 +#if 1 out_pps: osmo_fsm_inst_free(ip->pps_fi); #endif diff --git a/ccid_common/iso7816_fsm.h b/ccid_common/iso7816_fsm.h index f2c7483..f512709 100644 --- a/ccid_common/iso7816_fsm.h +++ b/ccid_common/iso7816_fsm.h @@ -21,6 +21,9 @@ ISO7816_E_RESET_ACT_IND, /*!< Reset activated */ ISO7816_E_ABORT_REQ, /*!< Abort request (e.g. from CCID) */ /* TODO: PPS request */ + ISO7816_E_XCEIVE_PPS_CMD, + ISO7816_E_PPS_DONE_IND, + ISO7816_E_PPS_FAILED_IND, /* TODO: Clock stop request */ /* TODO: Rx FIFO overrun */ /* TODO: Rx buffer overrun */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I280969ec9fe681dedae14ae8e6806f69eed3ff5a Gerrit-Change-Number: 16274 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:43 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:43 +0000 Subject: Change in osmo-ccid-firmware[master]: attempt at handling card insertion/removal In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 ) Change subject: attempt at handling card insertion/removal ...................................................................... attempt at handling card insertion/removal Change-Id: I88130de7f889811425c0a2ca4063ea8822c83f66 --- M ccid_common/ccid_device.c M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M ccid_common/iso7816_fsm.h M sysmoOCTSIM/main.c 6 files changed, 89 insertions(+), 31 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index c67c52e..11edd3e 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -438,9 +438,20 @@ { const union ccid_pc_to_rdr *u = msgb_ccid_out(msg); const struct ccid_header *ch = (const struct ccid_header *) u; + struct msgb *resp; + int rc; /* handle this asynchronously */ - cs->ci->slot_ops->xfr_block_async(cs, msg, &u->xfr_block); + rc = cs->ci->slot_ops->xfr_block_async(cs, msg, &u->xfr_block); + if (rc < 0) { + msgb_trim(msg, sizeof(struct ccid_rdr_to_pc_data_block)); + resp = ccid_gen_data_block(cs, u->xfr_block.hdr.bSeq, CCID_CMD_STATUS_FAILED, -rc, 0, 0); + goto out; + } + /* busy */ + return 1; +out: + ccid_slot_send_unbusy(cs, resp); return 1; } diff --git a/ccid_common/ccid_device.h b/ccid_common/ccid_device.h index 8390783..38a71db 100644 --- a/ccid_common/ccid_device.h +++ b/ccid_common/ccid_device.h @@ -78,13 +78,14 @@ void (*icc_power_on_async)(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_icc_power_on *ipo); - void (*xfr_block_async)(struct ccid_slot *cs, struct msgb *msg, + int (*xfr_block_async)(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_xfr_block *xfb); void (*set_power)(struct ccid_slot *cs, bool enable); void (*set_clock)(struct ccid_slot *cs, enum ccid_clock_command cmd); int (*set_params)(struct ccid_slot *cs, uint8_t seq, enum ccid_protocol_num proto, const struct ccid_pars_decoded *pars_dec); int (*set_rate_and_clock)(struct ccid_slot *cs, uint32_t freq_hz, uint32_t rate_bps); + void (*icc_set_insertion_status)(struct ccid_slot *cs, bool present); }; /* An instance of CCID (i.e. a card reader device) */ diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 8bdcfd5..8d38f29 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -66,6 +66,23 @@ /* do nothing; real hardware would update the slot related state here */ } +static void iso_fsm_slot_icc_set_insertion_status(struct ccid_slot *cs, bool present) { + struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); + + if(present == cs->icc_present) + return; + + cs->icc_present = present; + + if (!present) { + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_CARD_REMOVAL, NULL); + card_uart_ctrl(ss->cuart, CUART_CTL_RST, true); + card_uart_ctrl(ss->cuart, CUART_CTL_POWER, false); + cs->icc_powered = false; + cs->cmd_busy = false; + } +} + static void iso_fsm_slot_icc_power_on_async(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_icc_power_on *ipo) { @@ -113,6 +130,15 @@ ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); break; + case ISO7816_E_TPDU_FAILED_IND: + tpdu = data; + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + msgb_hexdump(tpdu)); + /* FIXME: other error causes than card removal?*/ + resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_FAILED, CCID_ERR_ICC_MUTE, msgb_l2(tpdu), 0); + ccid_slot_send_unbusy(cs, resp); + msgb_free(tpdu); + break; case ISO7816_E_PPS_DONE_IND: tpdu = data; /* pps was successful, so we know these values are fine */ @@ -147,12 +173,15 @@ } } -static void iso_fsm_slot_xfr_block_async(struct ccid_slot *cs, struct msgb *msg, +static int iso_fsm_slot_xfr_block_async(struct ccid_slot *cs, struct msgb *msg, const struct ccid_pc_to_rdr_xfr_block *xfb) { struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct msgb *tpdu; + if(!cs->icc_present) + return -CCID_ERR_ICC_MUTE; + ss->seq = xfb->hdr.bSeq; /* must be '0' for TPDU level exchanges or for short APDU */ @@ -171,6 +200,7 @@ LOGPCS(cs, LOGL_DEBUG, "scheduling TPDU transfer: %s\n", msgb_hexdump(tpdu)); osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_TPDU_CMD, tpdu); /* continues in iso_fsm_clot_user_cb once response/error/timeout is received */ + return 0; } @@ -296,6 +326,7 @@ .init = iso_fsm_slot_init, .pre_proc_cb = iso_fsm_slot_pre_proc_cb, .icc_power_on_async = iso_fsm_slot_icc_power_on_async, + .icc_set_insertion_status = iso_fsm_slot_icc_set_insertion_status, .xfr_block_async = iso_fsm_slot_xfr_block_async, .set_power = iso_fsm_slot_set_power, .set_clock = iso_fsm_slot_set_clock, diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index d02a955..98c32d3 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -45,7 +45,6 @@ ISO7816_S_IN_ATR, /*!< while we are receiving the ATR */ ISO7816_S_WAIT_TPDU, /*!< waiting for start of new TPDU */ ISO7816_S_IN_TPDU, /*!< inside a single TPDU */ - ISO7816_S_IN_PPS_REQ, /*!< while we are inside the PPS request */ ISO7816_S_WAIT_PPS_RSP, /*!< waiting for start of the PPS response */ ISO7816_S_IN_PPS_RSP, /*!< while we are inside the PPS request */ }; @@ -230,6 +229,7 @@ { struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + struct msgb *msg; switch (event) { case ISO7816_E_RESET_REL_IND: @@ -238,6 +238,16 @@ osmo_fsm_inst_state_chg_ms(fi, ISO7816_S_WAIT_ATR, fi_cycles2ms(fi, 40000), T_WAIT_ATR); break; + case ISO7816_E_PPS_FAILED_IND: + msg = data; + /* notify user about PPS result */ + ip->user_cb(fi, event, 0, msg); + break; + case ISO7816_E_TPDU_FAILED_IND: + msg = data; + /* hand finished TPDU to user */ + ip->user_cb(fi, event, 0, msg); + break; default: OSMO_ASSERT(0); } @@ -375,19 +385,6 @@ } } -static void iso7816_3_in_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) -{ - struct iso7816_3_priv *tfp = get_iso7816_3_priv(fi); - - switch (event) { - case ISO7816_E_XCEIVE_PPS_CMD: - osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); - break; - default: - OSMO_ASSERT(0); - } -} - static void iso7816_3_s_wait_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { @@ -434,7 +431,9 @@ static const struct osmo_fsm_state iso7816_3_states[] = { [ISO7816_S_RESET] = { .name = "RESET", - .in_event_mask = S(ISO7816_E_RESET_REL_IND), + .in_event_mask = S(ISO7816_E_RESET_REL_IND) | + S(ISO7816_E_PPS_FAILED_IND)| + S(ISO7816_E_TPDU_FAILED_IND), .out_state_mask = S(ISO7816_S_WAIT_ATR) | S(ISO7816_S_RESET), .action = iso7816_3_reset_action, @@ -467,7 +466,6 @@ .out_state_mask = S(ISO7816_S_RESET) | S(ISO7816_S_WAIT_TPDU) | S(ISO7816_S_IN_TPDU) | - S(ISO7816_S_IN_PPS_REQ) | S(ISO7816_S_WAIT_PPS_RSP), .action = iso7816_3_wait_tpdu_action, .onenter = iso7816_3_wait_tpdu_onenter, @@ -486,15 +484,6 @@ S(ISO7816_S_IN_TPDU), .action = iso7816_3_in_tpdu_action, }, - [ISO7816_S_IN_PPS_REQ] = { - .name = "IN_PPS_REQ", - .in_event_mask = S(ISO7816_E_XCEIVE_TPDU_CMD), - .out_state_mask = S(ISO7816_S_RESET) | - S(ISO7816_S_WAIT_TPDU) | - S(ISO7816_S_IN_PPS_REQ) | - S(ISO7816_S_WAIT_PPS_RSP), - .action = iso7816_3_in_pps_req_action, - }, [ISO7816_S_WAIT_PPS_RSP] = { .name = "WAIT_PPS_RESP", .in_event_mask = S(ISO7816_E_TX_COMPL) | @@ -881,18 +870,27 @@ struct pps_fsm_priv *atp = fi->priv; if (!atp->rx_cmd) - atp->rx_cmd = msgb_alloc_c(fi, 6, "ATR"); /* TS + 32 chars */ + atp->rx_cmd = msgb_alloc_c(fi, 6, "PPSRSP"); /* at most 6 */ else msgb_reset(atp->rx_cmd); + + /* notify in case card got pulled out */ + if (atp->tx_cmd){ + osmo_fsm_inst_dispatch(fi->proc.parent, + ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); + atp->tx_cmd = 0; + } } static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct pps_fsm_priv *atp = fi->priv; - atp->tx_cmd = data; struct osmo_fsm_inst *parent_fi = fi->proc.parent; struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + /* keep the buffer to compare it with the received response */ + atp->tx_cmd = data; + switch (event) { case ISO7816_E_XCEIVE_PPS_CMD: osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSS, 0, 0); @@ -972,6 +970,8 @@ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); } + /* ownership transfer */ + atp->tx_cmd = 0; } break; default: @@ -1093,6 +1093,16 @@ return (struct tpdu_fsm_priv *) fi->priv; } +static void tpdu_s_init_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); + + /* notify in case card got pulled out */ + if (tfp->tpdu){ + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, tfp->tpdu); + tfp->tpdu = 0; + } +} static void tpdu_s_init_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { @@ -1311,6 +1321,9 @@ osmo_fsm_inst_state_chg(fi, TPDU_S_DONE, 0, 0); /* Notify parent FSM */ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_DONE_IND, tfp->tpdu); + + /* ownership transfer */ + tfp->tpdu = 0; break; default: OSMO_ASSERT(0); @@ -1342,6 +1355,7 @@ .out_state_mask = S(TPDU_S_INIT) | S(TPDU_S_TX_HDR), .action = tpdu_s_init_action, + .onenter = tpdu_s_init_onenter, }, [TPDU_S_TX_HDR] = { .name = "TX_HDR", diff --git a/ccid_common/iso7816_fsm.h b/ccid_common/iso7816_fsm.h index f512709..d4aee59 100644 --- a/ccid_common/iso7816_fsm.h +++ b/ccid_common/iso7816_fsm.h @@ -32,6 +32,7 @@ ISO7816_E_ATR_DONE_IND, /*!< ATR Done indication from ATR child FSM */ ISO7816_E_ATR_ERR_IND, /*!< ATR Error indication from ATR child FSM */ ISO7816_E_TPDU_DONE_IND, /*!< TPDU Done indication from TPDU child FSM */ + ISO7816_E_TPDU_FAILED_IND, /*!< TPDU Failed indication from TPDU child FSM */ ISO7816_E_TPDU_CLEAR_REQ, /*!< Return TPDU FSM to TPDU_S_INIT */ }; diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 7ddca92..959e7eb 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -303,7 +303,7 @@ for (i = 0; i < 8; i++){ bool level = ncn8025_interrupt_level(i); new_mask |= level << i; - g_ci.slot[i].icc_present = level; + g_ci.slot_ops->icc_set_insertion_status(&g_ci.slot[i], level); } /* notify the user/host about any changes */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I88130de7f889811425c0a2ca4063ea8822c83f66 Gerrit-Change-Number: 16275 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:43 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:43 +0000 Subject: Change in osmo-ccid-firmware[master]: increase the debug uart buffer size In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 ) Change subject: increase the debug uart buffer size ...................................................................... increase the debug uart buffer size printing to the buffer is faster than getting the data out, so let's increase it a bit to drop less information Change-Id: I343b03d5b06962b90f0c1aaceda03aa871a2f98b --- M sysmoOCTSIM/driver_init.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index c373dc2..7071ea5 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -33,7 +33,7 @@ #define SIM6_BUFFER_SIZE 512 /*! The buffer size for USART */ -#define UART_DEBUG_BUFFER_SIZE 256 +#define UART_DEBUG_BUFFER_SIZE 4096 struct usart_async_descriptor SIM0; struct usart_async_descriptor SIM1; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I343b03d5b06962b90f0c1aaceda03aa871a2f98b Gerrit-Change-Number: 16276 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:43 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:43 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to use the DWT unit In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 ) Change subject: debug code to use the DWT unit ...................................................................... debug code to use the DWT unit Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 --- M sysmoOCTSIM/main.c 1 file changed, 23 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 959e7eb..a1b84b7 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -442,6 +442,29 @@ char sernr_buf[16*2+1]; char rstcause_buf[RSTCAUSE_STR_SIZE]; +#if 0 +CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk ; //| /* tracing*/ +////CoreDebug_DEMCR_MON_EN_Msk; /* mon interupt catcher */ + + +DWT->COMP0 = 0x40003028; /* sercom 0 data */ +//DWT->COMP0 = 0x40003428; /* sercom 1 data */ +DWT->MASK0 = 0; /* 0 */ +DWT->FUNCTION0 = 0; /* has to be 0 for linked address */ + +DWT->COMP1 = 0xa5; /* value */ +DWT->MASK1 = 0; /* match all bits */ +DWT->FUNCTION1 = (0b10 << DWT_FUNCTION_DATAVSIZE_Pos) | /* DATAVSIZE 10 - dword */ +#if 1 +(0 << DWT_FUNCTION_DATAVADDR0_Pos) | /* Data Match linked addr pointer in COMP0 */ +#else +(1 << DWT_FUNCTION_DATAVADDR0_Pos) | /* Data Match on any addr -> own number */ +#endif +(1 << DWT_FUNCTION_DATAVMATCH_Pos) | /* DATAVMATCH Enable data comparation */ +(0b0111 << DWT_FUNCTION_FUNCTION_Pos); /* generate a watchpoint event on rw */ + +#endif + atmel_start_init(); get_chip_unique_serial_str(sernr_buf, sizeof(sernr_buf)); get_rstcause_str(rstcause_buf); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 Gerrit-Change-Number: 16277 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:44 +0000 Subject: Change in osmo-ccid-firmware[master]: debug code to measure uart timing using the CAN header In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 ) Change subject: debug code to measure uart timing using the CAN header ...................................................................... debug code to measure uart timing using the CAN header Change-Id: I5f2c174076b5599dcb56f887330de27f470aeffc --- M ccid_common/iso7816_fsm.c M sysmoOCTSIM/hpl/sercom/hpl_sercom.c M sysmoOCTSIM/main.c 3 files changed, 37 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 98c32d3..031f6b0 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -1134,6 +1134,7 @@ } } +#include static void tpdu_s_tx_hdr_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { OSMO_ASSERT(fi->fsm == &tpdu_fsm); @@ -1173,6 +1174,12 @@ } else if (byte == tpduh->ins) { if (tfp->is_command) { /* transmit all remaining bytes */ +#if 0 +// rx -> tx delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif card_uart_tx(ip->uart, msgb_l2(tfp->tpdu), msgb_l2len(tfp->tpdu), true); osmo_fsm_inst_state_chg(fi, TPDU_S_TX_REMAINING, 0, 0); } else { diff --git a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c index f235115..272fb07 100644 --- a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c +++ b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c @@ -577,7 +577,7 @@ hri_sercomusart_write_INTEN_ERROR_bit(device->hw, state); } } - +#include /** * \internal Sercom interrupt handler * @@ -591,6 +591,12 @@ hri_sercomusart_clear_INTEN_DRE_bit(hw); device->usart_cb.tx_byte_sent(device); } else if (hri_sercomusart_get_interrupt_TXC_bit(hw) && hri_sercomusart_get_INTEN_TXC_bit(hw)) { +#if 0 +// tx byte last edge <-> txc irq delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif hri_sercomusart_clear_INTEN_TXC_bit(hw); device->usart_cb.tx_done_cb(device); } else if (hri_sercomusart_get_interrupt_RXC_bit(hw)) { @@ -600,8 +606,20 @@ hri_sercomusart_clear_STATUS_reg(hw, SERCOM_USART_STATUS_MASK); return; } +#if 0 +// rx byte last edge <-> rxc irq delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif device->usart_cb.rx_done_cb(device, hri_sercomusart_read_DATA_reg(hw)); +#if 0 +// rx byte last edge <-> rxc irq end delay + gpio_set_pin_level(PIN_PB12, true); + delay_us(1); + gpio_set_pin_level(PIN_PB12, false); +#endif } else if (hri_sercomusart_get_interrupt_ERROR_bit(hw)) { uint32_t status; diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index a1b84b7..54616af 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -506,6 +506,17 @@ } submit_next_out(); CRITICAL_SECTION_LEAVE() +#if 0 + /* CAN_RX */ + gpio_set_pin_function(PIN_PB12, GPIO_PIN_FUNCTION_OFF); + gpio_set_pin_direction(PIN_PB12, GPIO_DIRECTION_OUT); + gpio_set_pin_level(PIN_PB12, false); + + /* CAN_TX */ + gpio_set_pin_function(PIN_PB13, GPIO_PIN_FUNCTION_OFF); + gpio_set_pin_direction(PIN_PB13, GPIO_DIRECTION_OUT); + gpio_set_pin_level(PIN_PB13, false); +#endif // command_print_prompt(); while (true) { // main loop -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I5f2c174076b5599dcb56f887330de27f470aeffc Gerrit-Change-Number: 16278 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:44 +0000 Subject: Change in osmo-ccid-firmware[master]: add a "no rx or tx" state In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 ) Change subject: add a "no rx or tx" state ...................................................................... add a "no rx or tx" state Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63 --- M ccid_common/cuart.h M ccid_common/iso7816_fsm.c M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 3 files changed, 4 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 6c53481..32a8daa 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -23,6 +23,7 @@ enum card_uart_ctl { CUART_CTL_RX, /* enable/disable receiver */ + CUART_CTL_NO_RXTX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ CUART_CTL_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 031f6b0..623193f 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -305,7 +305,7 @@ { struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); - card_uart_ctrl(ip->uart, CUART_CTL_RX, false); + card_uart_ctrl(ip->uart, CUART_CTL_NO_RXTX, true); /* reset the TPDU state machine */ osmo_fsm_inst_dispatch(ip->tpdu_fi, ISO7816_E_TPDU_CLEAR_REQ, NULL); } diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index a8f8044..21ab5a4 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -348,6 +348,8 @@ Sercom *sercom = cuart->u.asf4.usa_pd->device.hw; switch (ctl) { + case CUART_CTL_NO_RXTX: + break; case CUART_CTL_RX: if (arg){ sercom->USART.CTRLB.bit.RXEN = 1; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I27def4feff5a01b751fd48c5aa844ffdbb087f63 Gerrit-Change-Number: 16279 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:44 +0000 Subject: Change in osmo-ccid-firmware[master]: switching rx/tx is too slow, and not necessary In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 ) Change subject: switching rx/tx is too slow, and not necessary ...................................................................... switching rx/tx is too slow, and not necessary Change-Id: Ic91b3e183ba451b4e327e407aae0497273652f56 --- M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index 21ab5a4..a0b3821 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -352,12 +352,9 @@ break; case CUART_CTL_RX: if (arg){ - sercom->USART.CTRLB.bit.RXEN = 1; - sercom->USART.CTRLB.bit.TXEN = 0; + /* no op */ } else { delay_us(cuart->u.asf4.extrawait_after_rx); - sercom->USART.CTRLB.bit.RXEN = 0; - sercom->USART.CTRLB.bit.TXEN = 1; } break; case CUART_CTL_RST: -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic91b3e183ba451b4e327e407aae0497273652f56 Gerrit-Change-Number: 16280 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:44 +0000 Subject: Change in osmo-ccid-firmware[master]: add some volatility to debug missing state changes In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 ) Change subject: add some volatility to debug missing state changes ...................................................................... add some volatility to debug missing state changes Change-Id: I2e12e32ad27b03d73ba3533903c34abc2fcce37a --- M sysmoOCTSIM/main.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 54616af..02b7b09 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -101,7 +101,7 @@ /* bit-mask of card-insert status, as determined from NCN8025 IRQ output */ uint8_t card_insert_mask; }; -static struct ccid_state g_ccid_s; +static volatile struct ccid_state g_ccid_s; static void ccid_out_read_compl(const uint8_t ep, enum usb_xfer_code code, uint32_t transferred); static void ccid_in_write_compl(const uint8_t ep, enum usb_xfer_code code, uint32_t transferred); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I2e12e32ad27b03d73ba3533903c34abc2fcce37a Gerrit-Change-Number: 16281 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:45 +0000 Subject: Change in osmo-ccid-firmware[master]: better ccid error handling, fix buffer leaks In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 ) Change subject: better ccid error handling, fix buffer leaks ...................................................................... better ccid error handling, fix buffer leaks Change-Id: Ib8b8524809e12608a7ade79ce7d7c3ced16eeb57 --- M ccid_common/ccid_device.c M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c 3 files changed, 30 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c index 11edd3e..b14f194 100644 --- a/ccid_common/ccid_device.c +++ b/ccid_common/ccid_device.c @@ -475,14 +475,25 @@ const struct ccid_header *ch = (const struct ccid_header *) u; uint8_t seq = u->reset_parameters.hdr.bSeq; struct msgb *resp; + int rc; /* copy default parameters from somewhere */ /* FIXME: T=1 */ - cs->ci->slot_ops->set_params(cs, seq, CCID_PROTOCOL_NUM_T0, cs->default_pars); - cs->pars = *cs->default_pars; - resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_OK, 0); - return ccid_slot_send_unbusy(cs, resp); + /* validate parameters; abort if they are not supported */ + rc = cs->ci->slot_ops->set_params(cs, seq, CCID_PROTOCOL_NUM_T0, cs->default_pars); + if (rc < 0) { + resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); + goto out; + } + + msgb_free(msg); + /* busy, tdpu like callback */ + return 1; +out: + msgb_free(msg); + ccid_slot_send_unbusy(cs, resp); + return 1; } /* Section 6.1.7 */ @@ -523,10 +534,14 @@ resp = ccid_gen_parameters_t0(cs, seq, CCID_CMD_STATUS_FAILED, -rc); goto out; } + + msgb_free(msg); /* busy, tdpu like callback */ return 1; out: - return ccid_slot_send_unbusy(cs, resp); + msgb_free(msg); + ccid_slot_send_unbusy(cs, resp); + return 1; } /* Section 6.1.8 */ @@ -682,6 +697,15 @@ return ccid_send(ci, resp); } + if(!cs->icc_present) { + LOGPCS(cs, LOGL_ERROR, "No icc present, but another cmd received\n"); + /* FIXME: ABORT logic as per section 5.3.1 of CCID Spec v1.1 */ + resp = gen_err_resp(ch->bMessageType, ch->bSlot, get_icc_status(cs), ch->bSeq, + CCID_ERR_ICC_MUTE); + msgb_free(msg); + return ccid_send(ci, resp); + } + LOGPCS(cs, LOGL_DEBUG, "Rx CCID(OUT) %s %s\n", get_value_string(ccid_msg_type_vals, ch->bMessageType), msgb_hexdump(msg)); diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 8d38f29..d2aec26 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -179,9 +179,6 @@ struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct msgb *tpdu; - if(!cs->icc_present) - return -CCID_ERR_ICC_MUTE; - ss->seq = xfb->hdr.bSeq; /* must be '0' for TPDU level exchanges or for short APDU */ diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 623193f..3778dcc 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -293,6 +293,7 @@ ip->user_cb(fi, event, 0, atr); break; case ISO7816_E_ATR_ERR_IND: + atr = data; osmo_fsm_inst_state_chg(fi, ISO7816_S_RESET, 0, 0); ip->user_cb(fi, event, 0, atr); break; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib8b8524809e12608a7ade79ce7d7c3ced16eeb57 Gerrit-Change-Number: 16282 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:45 +0000 Subject: Change in osmo-ccid-firmware[master]: fix power descriptor value In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 ) Change subject: fix power descriptor value ...................................................................... fix power descriptor value The previous value would allow using the device without external power, i.e. on a hub, which leads to silent failures trying to power up the slots (nothing happens, no atr will be received) Change-Id: I40c48ea56151d13de362b8f73cae5b21aba0ebfa FIXME: The device should offer at least one 100mA configuration. --- M sysmoOCTSIM/usb_descriptors.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index 63ace0c..beb1633 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -52,7 +52,8 @@ .bConfigurationValue = CONF_USB_CDCD_ACM_BCONFIGVAL, .iConfiguration = STR_DESC_CONFIG, .bmAttributes = CONF_USB_CDCD_ACM_BMATTRI, - .bMaxPower = CONF_USB_CDCD_ACM_BMAXPOWER, + /* FIXME: The device should offer at least one 100mA configuration. */ + .bMaxPower = 250, /* request 500mA */ }, .cdc = { .comm = { -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I40c48ea56151d13de362b8f73cae5b21aba0ebfa Gerrit-Change-Number: 16283 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:46 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:46 +0000 Subject: Change in osmo-ccid-firmware[master]: fsm completion event handling from main loop In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16284 ) Change subject: fsm completion event handling from main loop ...................................................................... fsm completion event handling from main loop The main loop will now poll for finished/failed transactions and handle them, this was previously handled during the last rx interrupt of a transaction, which was bad for timing. This does also fix malloc/free while handling interrupts. Change-Id: I055110720089e20e65db592eccc3ce4d618e8c63 --- M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_fsm.c M sysmoOCTSIM/main.c 4 files changed, 68 insertions(+), 21 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/ccid_device.h b/ccid_common/ccid_device.h index 38a71db..f364f72 100644 --- a/ccid_common/ccid_device.h +++ b/ccid_common/ccid_device.h @@ -57,6 +57,8 @@ struct ccid_pars_decoded proposed_pars; /* default parameters; applied on ResetParameters */ const struct ccid_pars_decoded *default_pars; + volatile uint32_t event; + volatile void* event_data; }; /* CCID operations provided by USB transport layer */ @@ -86,6 +88,7 @@ const struct ccid_pars_decoded *pars_dec); int (*set_rate_and_clock)(struct ccid_slot *cs, uint32_t freq_hz, uint32_t rate_bps); void (*icc_set_insertion_status)(struct ccid_slot *cs, bool present); + int (*handle_fsm_events)(struct ccid_slot *cs, bool enable); }; /* An instance of CCID (i.e. a card reader device) */ diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index d2aec26..9be31d6 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -110,34 +110,76 @@ { struct iso_fsm_slot *ss = iso7816_fsm_get_user_priv(fi); struct ccid_slot *cs = ss->cs; + + switch (event) { + case ISO7816_E_ATR_DONE_IND: + case ISO7816_E_ATR_ERR_IND: + case ISO7816_E_TPDU_DONE_IND: + case ISO7816_E_TPDU_FAILED_IND: + case ISO7816_E_PPS_DONE_IND: + case ISO7816_E_PPS_FAILED_IND: + cs->event_data = data; + asm volatile("dmb st": : :"memory"); + cs->event = event; + break; + default: + LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, cause=%d, data=%p) unhandled\n", + __func__, event, cause, data); + break; + } +} + +static int iso_handle_fsm_events(struct ccid_slot *cs, bool enable){ + struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct msgb *tpdu, *resp; + volatile uint32_t event = cs->event; + volatile void * volatile data = cs->event_data; + + if(!event) + return 0; + if(event && !data) + return 0; switch (event) { case ISO7816_E_ATR_DONE_IND: tpdu = data; - LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, msgb_hexdump(tpdu)); resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_OK, 0, msgb_data(tpdu), msgb_length(tpdu)); ccid_slot_send_unbusy(cs, resp); /* Don't free "TPDU" here, as the ATR should survive */ + cs->event = 0; + break; + case ISO7816_E_ATR_ERR_IND: + tpdu = data; + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, + msgb_hexdump(tpdu)); + resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_FAILED, CCID_ERR_ICC_MUTE, + msgb_data(tpdu), msgb_length(tpdu)); + ccid_slot_send_unbusy(cs, resp); + /* Don't free "TPDU" here, as the ATR should survive */ + cs->event = 0; + break; break; case ISO7816_E_TPDU_DONE_IND: tpdu = data; - LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, msgb_hexdump(tpdu)); resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_OK, 0, msgb_l2(tpdu), msgb_l2len(tpdu)); ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); + cs->event = 0; break; case ISO7816_E_TPDU_FAILED_IND: tpdu = data; - LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, cause=%d, data=%s)\n", __func__, event, cause, + LOGPCS(cs, LOGL_DEBUG, "%s(event=%d, data=%s)\n", __func__, event, msgb_hexdump(tpdu)); /* FIXME: other error causes than card removal?*/ resp = ccid_gen_data_block(cs, ss->seq, CCID_CMD_STATUS_FAILED, CCID_ERR_ICC_MUTE, msgb_l2(tpdu), 0); ccid_slot_send_unbusy(cs, resp); msgb_free(tpdu); + cs->event = 0; break; case ISO7816_E_PPS_DONE_IND: tpdu = data; @@ -157,6 +199,7 @@ /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ msgb_free(tpdu); + cs->event = 0; break; case ISO7816_E_PPS_FAILED_IND: tpdu = data; @@ -165,10 +208,13 @@ ccid_slot_send_unbusy(cs, resp); /* this frees the pps req from the host, pps resp buffer stays with the pps fsm */ msgb_free(tpdu); + cs->event = 0; + break; + case 0: break; default: - LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, cause=%d, data=%p) unhandled\n", - __func__, event, cause, data); + LOGPCS(cs, LOGL_NOTICE, "%s(event=%d, data=%p) unhandled\n", + __func__, event, data); break; } } @@ -177,7 +223,7 @@ const struct ccid_pc_to_rdr_xfr_block *xfb) { struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); - struct msgb *tpdu; + ss->seq = xfb->hdr.bSeq; @@ -185,17 +231,10 @@ OSMO_ASSERT(xfb->wLevelParameter == 0x0000); OSMO_ASSERT(msgb_length(msg) > xfb->hdr.dwLength); - /* 'msg' contains the raw CCID message as received from USB. We could create - * a new message buffer for the ISO7816 side here or we could 'strip the CCID - * header off the start of the message. Let's KISS and do a copy here */ - tpdu = msgb_alloc(512, "TPDU"); - OSMO_ASSERT(tpdu); - memcpy(msgb_data(tpdu), xfb->abData, xfb->hdr.dwLength); - msgb_put(tpdu, xfb->hdr.dwLength); - msgb_free(msg); + msgb_pull(msg, 10); - LOGPCS(cs, LOGL_DEBUG, "scheduling TPDU transfer: %s\n", msgb_hexdump(tpdu)); - osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_TPDU_CMD, tpdu); + LOGPCS(cs, LOGL_DEBUG, "scheduling TPDU transfer: %s\n", msgb_hexdump(msg)); + osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_XCEIVE_TPDU_CMD, msg); /* continues in iso_fsm_clot_user_cb once response/error/timeout is received */ return 0; } @@ -329,4 +368,5 @@ .set_clock = iso_fsm_slot_set_clock, .set_params = iso_fsm_slot_set_params, .set_rate_and_clock = iso_fsm_slot_set_rate_and_clock, + .handle_fsm_events = iso_handle_fsm_events, }; diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 3778dcc..44c8191 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -238,6 +238,8 @@ osmo_fsm_inst_state_chg_ms(fi, ISO7816_S_WAIT_ATR, fi_cycles2ms(fi, 40000), T_WAIT_ATR); break; + case ISO7816_E_POWER_UP_IND: + break; case ISO7816_E_PPS_FAILED_IND: msg = data; /* notify user about PPS result */ @@ -876,7 +878,7 @@ msgb_reset(atp->rx_cmd); /* notify in case card got pulled out */ - if (atp->tx_cmd){ + if (atp->tx_cmd && old_state != PPS_S_DONE){ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_PPS_FAILED_IND, atp->tx_cmd); atp->tx_cmd = 0; @@ -1099,7 +1101,7 @@ struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); /* notify in case card got pulled out */ - if (tfp->tpdu){ + if (tfp->tpdu && old_state != TPDU_S_DONE){ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, tfp->tpdu); tfp->tpdu = 0; } diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 02b7b09..806a9f6 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -267,7 +267,7 @@ { uint8_t statusbytes[2] = {0}; //struct msgb *msg = ccid_msgb_alloc(); - struct msgb *msg = msgb_alloc(64, "IRQ"); + struct msgb *msg = msgb_alloc(300,"IRQ"); struct ccid_rdr_to_pc_notify_slot_change *nsc = msgb_put(msg, sizeof(*nsc) + sizeof(statusbytes)); nsc->bMessageType = RDR_to_PC_NotifySlotChange; @@ -523,6 +523,9 @@ command_try_recv(); poll_card_detect(); submit_next_irq(); + for (int i = 0; i < usb_fs_descs.ccid.class.bMaxSlotIndex; i++){ + g_ci.slot_ops->handle_fsm_events(&g_ci.slot[i], true); + } feed_ccid(); osmo_timers_update(); int qs = llist_count_at(&g_ccid_s.free_q); @@ -533,13 +536,12 @@ msgb_free(msg); } if(qs < NUM_OUT_BUF) - for (int i= 0; i < qs-NUM_OUT_BUF; i++){ + for (int i= 0; i < NUM_OUT_BUF-qs; i++){ struct msgb *msg = msgb_alloc(300,"ccid"); OSMO_ASSERT(msg); /* return the message back to the queue of free message buffers */ llist_add_tail_at(&msg->list, &g_ccid_s.free_q); } - } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16284 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I055110720089e20e65db592eccc3ce4d618e8c63 Gerrit-Change-Number: 16284 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:46 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:46 +0000 Subject: Change in osmo-ccid-firmware[master]: add a note for D=64 pecularities In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16285 ) Change subject: add a note for D=64 pecularities ...................................................................... add a note for D=64 pecularities Change-Id: Icf2845e0f07f2d23f5090d35b6d8d145ad65a2f8 --- M ccid_common/ccid_slot_fsm.c 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 9be31d6..d7740fe 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -287,6 +287,14 @@ ss->seq = seq; + /* FIXME: + When using D=64, the interface device shall ensure a delay + of at least 16 etu between the leading edge of the last + received character and the leading edge of the character transmitted + for initiating a command. + -> we can't really do 4 stop bits?! + */ + /* Hardware does not support SPU, so no PPS2, and PPS3 is reserved anyway */ tpdu = msgb_alloc(6, "PPSRQ"); OSMO_ASSERT(tpdu); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16285 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Icf2845e0f07f2d23f5090d35b6d8d145ad65a2f8 Gerrit-Change-Number: 16285 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:47 +0000 Subject: Change in osmo-ccid-firmware[master]: pps warning In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16286 ) Change subject: pps warning ...................................................................... pps warning Change-Id: Ia125b7983e81342af224bc6e8771d8be4c4bfa42 --- M ccid_common/ccid_slot_fsm.c 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index d7740fe..fef1515 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -188,6 +188,13 @@ uint8_t D = iso7816_3_di_table[cs->proposed_pars.di]; uint32_t fmax = iso7816_3_fmax_table[cs->proposed_pars.fi]; + /* 7816-3 5.2.3 + * No information shall be exchanged when switching the + * frequency value. Two different times are recommended + * for switching the frequency value, either + * - after ATR while card is idle + * - after PPS while card is idle + */ card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK_FREQ, fmax); card_uart_ctrl(ss->cuart, CUART_CTL_FD, F/D); card_uart_ctrl(ss->cuart, CUART_CTL_WTIME, cs->proposed_pars.t0.waiting_integer); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia125b7983e81342af224bc6e8771d8be4c4bfa42 Gerrit-Change-Number: 16286 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:47 +0000 Subject: Change in osmo-ccid-firmware[master]: boost uart priority In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16287 ) Change subject: boost uart priority ...................................................................... boost uart priority Change-Id: I10ea17ca8b120c09b8926da010c9e358b219f7ed --- M sysmoOCTSIM/main.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 806a9f6..c73b715 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -474,6 +474,12 @@ board_init(); command_init("sysmoOCTSIM> "); + /* boost uart priority by setting all other irqs to uartprio+1 */ + for(int i = 0; i < PERIPH_COUNT_IRQn; i++) + NVIC_SetPriority(i, 2); + for(int i = SERCOM0_0_IRQn; i <= SERCOM7_3_IRQn; i++) + NVIC_SetPriority(i, 1); + printf("\r\n\r\n" "=============================================================================\n\r" "sysmoOCTSIM firmware " GIT_VERSION "\n\r" -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I10ea17ca8b120c09b8926da010c9e358b219f7ed Gerrit-Change-Number: 16287 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:47 +0000 Subject: Change in osmo-ccid-firmware[master]: the magic sauce that makes it work In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16288 ) Change subject: the magic sauce that makes it work ...................................................................... the magic sauce that makes it work 1mio concurrent select mf transfers, 5mhz, fi/di 512/32 Change-Id: Ica8539e4428ca3e3eb3e8ca9f5a5b50eb738ca8d --- M sysmoOCTSIM/hpl/sercom/hpl_sercom.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c index 272fb07..7373962 100644 --- a/sysmoOCTSIM/hpl/sercom/hpl_sercom.c +++ b/sysmoOCTSIM/hpl/sercom/hpl_sercom.c @@ -589,6 +589,8 @@ if (hri_sercomusart_get_interrupt_DRE_bit(hw) && hri_sercomusart_get_INTEN_DRE_bit(hw)) { hri_sercomusart_clear_INTEN_DRE_bit(hw); + hri_sercomusart_read_DATA_reg(hw); + hri_sercomusart_clear_INTFLAG_RXC_bit(hw); device->usart_cb.tx_byte_sent(device); } else if (hri_sercomusart_get_interrupt_TXC_bit(hw) && hri_sercomusart_get_INTEN_TXC_bit(hw)) { #if 0 @@ -598,6 +600,8 @@ gpio_set_pin_level(PIN_PB12, false); #endif hri_sercomusart_clear_INTEN_TXC_bit(hw); + hri_sercomusart_read_DATA_reg(hw); + hri_sercomusart_clear_INTFLAG_RXC_bit(hw); device->usart_cb.tx_done_cb(device); } else if (hri_sercomusart_get_interrupt_RXC_bit(hw)) { if (hri_sercomusart_read_STATUS_reg(hw) -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ica8539e4428ca3e3eb3e8ca9f5a5b50eb738ca8d Gerrit-Change-Number: 16288 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:48 +0000 Subject: Change in osmo-ccid-firmware[master]: change uart ctl define names In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16289 ) Change subject: change uart ctl define names ...................................................................... change uart ctl define names Change-Id: I656e9e32c67d6e7b70a53f8f113583f25619e00f --- M ccid_common/ccid_slot_fsm.c M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 3 files changed, 6 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index fef1515..3a591d7 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -195,8 +195,8 @@ * - after ATR while card is idle * - after PPS while card is idle */ - card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK_FREQ, fmax); - card_uart_ctrl(ss->cuart, CUART_CTL_FD, F/D); + card_uart_ctrl(ss->cuart, CUART_CTL_SET_CLOCK_FREQ, fmax); + card_uart_ctrl(ss->cuart, CUART_CTL_SET_FD, F/D); card_uart_ctrl(ss->cuart, CUART_CTL_WTIME, cs->proposed_pars.t0.waiting_integer); cs->pars = cs->proposed_pars; diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 32a8daa..c72b51c 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -26,10 +26,10 @@ CUART_CTL_NO_RXTX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ - CUART_CTL_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ + CUART_CTL_SET_CLOCK_FREQ, /* set ICC clock frequency (hz)*/ CUART_CTL_RST, /* enable/disable ICC reset */ CUART_CTL_WTIME, /* set the waiting time (in etu) */ - CUART_CTL_FD, + CUART_CTL_SET_FD, }; struct card_uart; diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index a0b3821..db3dc79 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -384,7 +384,7 @@ case CUART_CTL_CLOCK: /* no clock stop support */ break; - case CUART_CTL_CLOCK_FREQ: + case CUART_CTL_SET_CLOCK_FREQ: ncn8025_get(cuart->u.asf4.slot_nr, &settings); /* 2,5/5/10/20 supported by dividers */ @@ -398,7 +398,7 @@ settings.clkdiv = clkdiv; ncn8025_set(cuart->u.asf4.slot_nr, &settings); break; - case CUART_CTL_FD: + case CUART_CTL_SET_FD: ncn8025_get(cuart->u.asf4.slot_nr, &settings); uint8_t divider = ncn8025_div_val[settings.clkdiv]; uint32_t baudrate = (20e6/divider)/arg; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16289 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I656e9e32c67d6e7b70a53f8f113583f25619e00f Gerrit-Change-Number: 16289 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:48 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart: allow getting the icc baud rate and clock freq In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16290 ) Change subject: cuart: allow getting the icc baud rate and clock freq ...................................................................... cuart: allow getting the icc baud rate and clock freq Change-Id: I577907e6c60582a80666d43b17c20de4e03cc8df --- M ccid_common/cuart.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 2 files changed, 12 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index c72b51c..6a782db 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -30,6 +30,8 @@ CUART_CTL_RST, /* enable/disable ICC reset */ CUART_CTL_WTIME, /* set the waiting time (in etu) */ CUART_CTL_SET_FD, + CUART_CTL_GET_BAUDRATE, + CUART_CTL_GET_CLOCK_FREQ, }; struct card_uart; @@ -100,6 +102,7 @@ uint8_t slot_nr; /* in us, required, no delay breaks _rx_ */ uint32_t extrawait_after_rx; + uint32_t current_baudrate; } asf4; } u; }; diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index db3dc79..f12ed73 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -203,6 +203,9 @@ if (NULL == slot) { return false; } + + // update cached values + cuart->u.asf4.current_baudrate = baudrate; printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) usart_async_disable(slot); // disable SERCOM peripheral @@ -404,6 +407,12 @@ uint32_t baudrate = (20e6/divider)/arg; cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; slot_set_baudrate(cuart->u.asf4.slot_nr, baudrate); + case CUART_CTL_GET_BAUDRATE: + return cuart->u.asf4.current_baudrate; + break; + case CUART_CTL_GET_CLOCK_FREQ: + ncn8025_get(cuart->u.asf4.slot_nr, &settings); + return 20e6 / ncn8025_div_val[settings.clkdiv]; break; default: return -EINVAL; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I577907e6c60582a80666d43b17c20de4e03cc8df Gerrit-Change-Number: 16290 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:48 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart: fix etu calculation In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16291 ) Change subject: cuart: fix etu calculation ...................................................................... cuart: fix etu calculation Change-Id: Ib2f83654bdaae5090bb1dfd75e0906551d6b6aa7 --- M ccid_common/cuart.c 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/cuart.c b/ccid_common/cuart.c index 9a68167..1ae50c6 100644 --- a/ccid_common/cuart.c +++ b/ccid_common/cuart.c @@ -29,8 +29,12 @@ /* obtain the current ETU in us */ static int get_etu_in_us(struct card_uart *cuart) { - /* FIXME: actually implement this based on the real baud rate */ - return (1000000/9600); + OSMO_ASSERT(cuart); + OSMO_ASSERT(cuart->driver); + OSMO_ASSERT(cuart->driver->ops); + OSMO_ASSERT(cuart->driver->ops->ctrl); + + return 1e6 / cuart->driver->ops->ctrl(cuart, CUART_CTL_GET_BAUDRATE, 0); } /* software waiting-time timer has expired */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib2f83654bdaae5090bb1dfd75e0906551d6b6aa7 Gerrit-Change-Number: 16291 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:48 +0000 Subject: Change in osmo-ccid-firmware[master]: cuart cleanup In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16292 ) Change subject: cuart cleanup ...................................................................... cuart cleanup Change-Id: I15ea4d68263b62fca3da76795969358a07e7f1a6 --- M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 1 file changed, 15 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index f12ed73..c7d29eb 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -161,8 +161,10 @@ * @param[in] baudrate baud rate in bps to set * @return if the baud rate has been set, else a parameter is out of range */ -static bool slot_set_baudrate(uint8_t slotnr, uint32_t baudrate) +static bool slot_set_baudrate(struct card_uart *cuart, uint32_t baudrate) { + uint8_t slotnr = cuart->u.asf4.slot_nr; + ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); // calculate the error corresponding to the clock sources @@ -206,6 +208,8 @@ // update cached values cuart->u.asf4.current_baudrate = baudrate; + cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; + printf("(%u) switching SERCOM clock to GCLK%u (freq = %lu kHz) and baud rate to %lu bps (baud = %u)\r\n", slotnr, (best + 1) * 2, (uint32_t)(round(sercom_glck_freqs[best] / 1000)), baudrate, bauds[best]); while (!usart_async_is_tx_empty(slot)); // wait for transmission to complete (WARNING no timeout) usart_async_disable(slot); // disable SERCOM peripheral @@ -226,8 +230,10 @@ * @param[in] d baud rate adjustment factor D * @return if the baud rate has been set, else a parameter is out of range */ -static bool slot_set_isorate(uint8_t slotnr, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) +static bool slot_set_isorate(struct card_uart *cuart, enum ncn8025_sim_clkdiv clkdiv, uint16_t f, uint8_t d) { + uint8_t slotnr = cuart->u.asf4.slot_nr; + // input checks ASSERT(slotnr < ARRAY_SIZE(SIM_peripheral_descriptors)); if (clkdiv != SIM_CLKDIV_1 && clkdiv != SIM_CLKDIV_2 && clkdiv != SIM_CLKDIV_4 && clkdiv != SIM_CLKDIV_8) { @@ -267,7 +273,7 @@ // set baud rate uint32_t baudrate = (freq * d) / f; // calculate actual baud rate - return slot_set_baudrate(slotnr, baudrate); // set baud rate + return slot_set_baudrate(cuart, baudrate); // set baud rate } /*********************************************************************** @@ -292,16 +298,13 @@ cuart->u.asf4.usa_pd = usa_pd; cuart->u.asf4.slot_nr = slot_nr; - /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ - cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); - usart_async_register_callback(usa_pd, USART_ASYNC_RXC_CB, SIM_rx_cb[slot_nr]); usart_async_register_callback(usa_pd, USART_ASYNC_TXC_CB, SIM_tx_cb[slot_nr]); usart_async_register_callback(usa_pd, USART_ASYNC_ERROR_CB, _SIM_error_cb); usart_async_enable(usa_pd); // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) - slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + slot_set_isorate(cuart, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); return 0; } @@ -352,6 +355,7 @@ switch (ctl) { case CUART_CTL_NO_RXTX: + /* no op */ break; case CUART_CTL_RX: if (arg){ @@ -367,12 +371,8 @@ usart_async_flush_rx_buffer(cuart->u.asf4.usa_pd); break; case CUART_CTL_POWER: - /* in us, 20Mhz with default ncn8025 divider 8, F=372, D=1*/ - cuart->u.asf4.extrawait_after_rx = 1./(20./8/372); - - // set USART baud rate to match the interface (f = 2.5 MHz) and card default settings (Fd = 372, Dd = 1) - if(arg) - slot_set_isorate(cuart->u.asf4.slot_nr, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); + /* reset everything */ + slot_set_isorate(cuart, SIM_CLKDIV_8, ISO7816_3_DEFAULT_FD, ISO7816_3_DEFAULT_DD); ncn8025_get(cuart->u.asf4.slot_nr, &settings); settings.cmdvcc = arg ? true : false; @@ -405,8 +405,8 @@ ncn8025_get(cuart->u.asf4.slot_nr, &settings); uint8_t divider = ncn8025_div_val[settings.clkdiv]; uint32_t baudrate = (20e6/divider)/arg; - cuart->u.asf4.extrawait_after_rx = 1./baudrate * 1000 * 1000; - slot_set_baudrate(cuart->u.asf4.slot_nr, baudrate); + slot_set_baudrate(cuart, baudrate); + break; case CUART_CTL_GET_BAUDRATE: return cuart->u.asf4.current_baudrate; break; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I15ea4d68263b62fca3da76795969358a07e7f1a6 Gerrit-Change-Number: 16292 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:49 +0000 Subject: Change in osmo-ccid-firmware[master]: first attempt at rx timeout handling In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16293 ) Change subject: first attempt at rx timeout handling ...................................................................... first attempt at rx timeout handling The general idea is to provide hints to cuart so it can calculate a reasonable timeout value when receiving multiple bytes instead of having per-byte timeouts Change-Id: Ia6ad2d83cea48a8661ed2e4eb50f9bcb85218454 --- M ccid_common/cuart.c M ccid_common/cuart.h M ccid_common/iso7816_fsm.c 3 files changed, 143 insertions(+), 29 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ccid_common/cuart.c b/ccid_common/cuart.c index 1ae50c6..1d777f9 100644 --- a/ccid_common/cuart.c +++ b/ccid_common/cuart.c @@ -49,7 +49,12 @@ { int secs, usecs; - usecs = get_etu_in_us(cuart) * cuart->wtime_etu; + if(!cuart->current_wtime_byte) + return; + + /* timemout is wtime * ETU + expected number of bytes * (12ETU+1 slack)ETU */ + usecs = get_etu_in_us(cuart) * cuart->wtime_etu + + get_etu_in_us(cuart) * cuart->current_wtime_byte * (12+1); if (usecs > 1000000) { secs = usecs / 1000000; usecs = usecs % 1000000; @@ -108,6 +113,15 @@ cuart->rx_enabled = arg ? true : false; if (!cuart->rx_enabled) osmo_timer_del(&cuart->wtime_tmr); +// else +// card_uart_wtime_restart(cuart); + break; + case CUART_CTL_RX_TIMER_HINT: + cuart->current_wtime_byte = arg; + if(arg) + card_uart_wtime_restart(cuart); + else + osmo_timer_del(&cuart->wtime_tmr); break; default: break; @@ -158,6 +172,12 @@ if (cuart->rx_after_tx_compl) card_uart_ctrl(cuart, CUART_CTL_RX, true); break; +// case CUART_E_RX_COMPLETE: +// osmo_timer_del(&cuart->wtime_tmr); +// break; +// case CUART_E_RX_SINGLE: +// card_uart_wtime_restart(cuart); +// break; default: break; } diff --git a/ccid_common/cuart.h b/ccid_common/cuart.h index 6a782db..1df0c49 100644 --- a/ccid_common/cuart.h +++ b/ccid_common/cuart.h @@ -23,6 +23,7 @@ enum card_uart_ctl { CUART_CTL_RX, /* enable/disable receiver */ + CUART_CTL_RX_TIMER_HINT, /* tell cuart approximate number of rx bytes */ CUART_CTL_NO_RXTX, /* enable/disable receiver */ CUART_CTL_POWER, /* enable/disable ICC power */ CUART_CTL_CLOCK, /* enable/disable ICC clock */ @@ -78,6 +79,8 @@ uint32_t wtime_etu; struct osmo_timer_list wtime_tmr; + /* expected number of bytes, for timeout */ + uint32_t current_wtime_byte; /* driver-specific private data */ union { diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 44c8191..412bea7 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -68,14 +68,14 @@ * @note defined in ISO/IEC 7816-3:2006(E) section 9 */ enum pps_state { - PPS_S_TX_PPS_REQ, /*!< tx pps request */ - PPS_S_WAIT_PPSS, /*!< initial byte */ + PPS_S_PPS_REQ_INIT, /*!< tx pps request */ + PPS_S_TX_PPS_REQ, + PPS_S_WAIT_PPSX, /*!< initial byte */ PPS_S_WAIT_PPS0, /*!< format byte */ PPS_S_WAIT_PPS1, /*!< first parameter byte */ PPS_S_WAIT_PPS2, /*!< second parameter byte */ PPS_S_WAIT_PPS3, /*!< third parameter byte */ PPS_S_WAIT_PCK, /*!< check byte */ - PPS_S_WAIT_END, /*!< all done */ PPS_S_DONE }; @@ -219,9 +219,11 @@ struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); + /* go back to initial state in child FSMs */ osmo_fsm_inst_state_chg(ip->atr_fi, ATR_S_WAIT_TS, 0, 0); - osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_PPS_REQ_INIT, 0, 0); osmo_fsm_inst_state_chg(ip->tpdu_fi, TPDU_S_INIT, 0, 0); } @@ -235,8 +237,13 @@ case ISO7816_E_RESET_REL_IND: /* TOOD: this should happen before reset is released */ card_uart_ctrl(ip->uart, CUART_CTL_RX, true); - osmo_fsm_inst_state_chg_ms(fi, ISO7816_S_WAIT_ATR, - fi_cycles2ms(fi, 40000), T_WAIT_ATR); + + /* let's be reasonable here: the 40k cycle delay to ATR start is + * ~1.4ms @ 2.5Mhz/6720 baud, 1ETU = 372 cycles -> 40k/372=107/12ETU ~ 9 byte + * default timeout for rx is 9600 ETU, ATR might be missing the TCK + * so it might time out, so just add this delay */ + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 32+9); + osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_ATR, 0, 0); break; case ISO7816_E_POWER_UP_IND: break; @@ -308,6 +315,7 @@ { struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); card_uart_ctrl(ip->uart, CUART_CTL_NO_RXTX, true); /* reset the TPDU state machine */ osmo_fsm_inst_dispatch(ip->tpdu_fi, ISO7816_E_TPDU_CLEAR_REQ, NULL); @@ -327,7 +335,7 @@ break; case ISO7816_E_XCEIVE_PPS_CMD: osmo_fsm_inst_state_chg(fi, ISO7816_S_WAIT_PPS_RSP, 0, 0); - osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_TX_PPS_REQ, 0, 0); + osmo_fsm_inst_state_chg(ip->pps_fi, PPS_S_PPS_REQ_INIT, 0, 0); osmo_fsm_inst_dispatch(ip->pps_fi, event, data); break; default: @@ -391,11 +399,13 @@ static void iso7816_3_s_wait_pps_rsp_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct iso7816_3_priv *ip = get_iso7816_3_priv(fi); OSMO_ASSERT(fi->fsm == &iso7816_3_fsm); switch (event) { case ISO7816_E_TX_COMPL: /* Rx of single byte is already enabled by previous card_uart_tx() call */ osmo_fsm_inst_state_chg(fi, ISO7816_S_IN_PPS_RSP, 0, 0); + osmo_fsm_inst_dispatch(ip->pps_fi, event, data); break; default: OSMO_ASSERT(0); @@ -435,6 +445,7 @@ [ISO7816_S_RESET] = { .name = "RESET", .in_event_mask = S(ISO7816_E_RESET_REL_IND) | + S(ISO7816_E_POWER_UP_IND) | S(ISO7816_E_PPS_FAILED_IND)| S(ISO7816_E_TPDU_FAILED_IND), .out_state_mask = S(ISO7816_S_WAIT_ATR) | @@ -751,6 +762,14 @@ } } +static void atr_done_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); +} + static const struct osmo_fsm_state atr_states[] = { [ATR_S_WAIT_TS] = { .name = "WAIT_TS", @@ -847,7 +866,7 @@ .name = "DONE", .in_event_mask = 0, .out_state_mask = S(ATR_S_WAIT_TS), - //.action = atr_done_action, + .onenter = atr_done_onenter }, }; @@ -868,7 +887,7 @@ uint8_t pps0_recv; }; -static void pps_s_wait_ppss_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +static void pps_s_pps_req_init_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) { struct pps_fsm_priv *atp = fi->priv; @@ -885,7 +904,7 @@ } } -static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +static void pps_s_pps_req_init_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct pps_fsm_priv *atp = fi->priv; struct osmo_fsm_inst *parent_fi = fi->proc.parent; @@ -896,7 +915,8 @@ switch (event) { case ISO7816_E_XCEIVE_PPS_CMD: - osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSS, 0, 0); + osmo_fsm_inst_state_chg(fi, PPS_S_TX_PPS_REQ, 0, 0); + card_uart_set_rx_threshold(ip->uart, 1); card_uart_tx(ip->uart, msgb_data(data), msgb_length(data), true); break; default: @@ -904,10 +924,29 @@ } } +static void pps_s_tx_pps_req_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + switch (event) { + case ISO7816_E_TX_COMPL: + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 6); + osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPSX, 0, 0); + break; + default: + OSMO_ASSERT(0); + } +} + + + + static void pps_wait_pX_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct pps_fsm_priv *atp = fi->priv; -// uint32_t guard_time_ms = atr_fi_gt_ms(fi); + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); uint8_t byte; switch (event) { @@ -916,7 +955,7 @@ LOGPFSML(fi, LOGL_DEBUG, "RX byte '%02x'\n", byte); msgb_put_u8(atp->rx_cmd, byte); switch (fi->state) { - case PPS_S_WAIT_PPSS: + case PPS_S_WAIT_PPSX: if (byte == 0xff) osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_PPS0, 0, 0); break; @@ -960,7 +999,7 @@ uint8_t *pps_received = msgb_data(atp->rx_cmd); uint8_t *pps_sent = msgb_data(atp->tx_cmd); - osmo_fsm_inst_state_chg(fi, PPS_S_WAIT_END, 0, 0); + osmo_fsm_inst_state_chg(fi, PPS_S_DONE, 0, 0); /* pps was successful if response equals request * rx buffer stays with the fsm, tx buffer gets handed back and freed @@ -982,6 +1021,7 @@ } break; case ISO7816_E_WTIME_EXP: + osmo_fsm_inst_state_chg(fi, PPS_S_DONE, 0, 0); /* FIXME: timeout handling if no pps supported ? */ osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_RX_ERR_IND, NULL); break; @@ -991,22 +1031,37 @@ } +static void pps_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); +} + + static const struct osmo_fsm_state pps_states[] = { - [PPS_S_TX_PPS_REQ] = { - .name = "TX_PPS_REQ", + [PPS_S_PPS_REQ_INIT] = { + .name = "INIT", .in_event_mask = S(ISO7816_E_XCEIVE_PPS_CMD) | S(ISO7816_E_WTIME_EXP), - .out_state_mask = S(PPS_S_TX_PPS_REQ) | - S(PPS_S_WAIT_PPSS), - .action = pps_s_tx_pps_req_action, - .onenter = pps_s_wait_ppss_onenter, + .out_state_mask = S(PPS_S_PPS_REQ_INIT) | + S(PPS_S_TX_PPS_REQ), + .action = pps_s_pps_req_init_action, + .onenter = pps_s_pps_req_init_onenter, }, - [PPS_S_WAIT_PPSS] = { + [PPS_S_TX_PPS_REQ] = { + .name = "TX_PPS_REQ", + .in_event_mask = S(ISO7816_E_TX_COMPL), + .out_state_mask = S(PPS_S_WAIT_PPSX), + .action = pps_s_tx_pps_req_action, + }, + [PPS_S_WAIT_PPSX] = { .name = "WAIT_PPSS", .in_event_mask = S(ISO7816_E_RX_SINGLE) | S(ISO7816_E_WTIME_EXP), .out_state_mask = S(PPS_S_WAIT_PPS0) | - S(PPS_S_WAIT_PPSS), + S(PPS_S_WAIT_PPSX), .action = pps_wait_pX_action, }, [PPS_S_WAIT_PPS0] = { @@ -1047,14 +1102,15 @@ .name = "WAIT_PCK", .in_event_mask = S(ISO7816_E_RX_SINGLE) | S(ISO7816_E_WTIME_EXP), - .out_state_mask = S(PPS_S_WAIT_END), + .out_state_mask = S(PPS_S_DONE), .action = pps_wait_pX_action, }, - [PPS_S_WAIT_END] = { - .name = "WAIT_END", + [PPS_S_DONE] = { + .name = "DONE", .in_event_mask = 0, - .out_state_mask = S(PPS_S_TX_PPS_REQ) | - S(PPS_S_WAIT_PPSS), + .out_state_mask = S(PPS_S_PPS_REQ_INIT), + .action = NULL, + .onenter = pps_s_done_onenter, }, }; @@ -1140,9 +1196,14 @@ #include static void tpdu_s_tx_hdr_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); OSMO_ASSERT(fi->fsm == &tpdu_fsm); switch (event) { case ISO7816_E_TX_COMPL: + + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); /* Rx of single byte is already enabled by previous card_uart_tx() call */ osmo_fsm_inst_state_chg(fi, TPDU_S_PROCEDURE, 0, 0); break; @@ -1167,11 +1228,15 @@ LOGPFSML(fi, LOGL_DEBUG, "Received 0x%02x from UART\n", byte); if (byte == 0x60) { /* NULL: wait for another procedure byte */ + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_PROCEDURE, 0, 0); } else if ((byte >= 0x60 && byte <= 0x6f) || (byte >= 0x90 && byte <= 0x9f)) { //msgb_apdu_sw(tfp->apdu) = byte << 8; msgb_put(tfp->tpdu, byte); /* receive second SW byte (SW2) */ + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW2, 0, 0); break; } else if (byte == tpduh->ins) { @@ -1187,6 +1252,7 @@ osmo_fsm_inst_state_chg(fi, TPDU_S_TX_REMAINING, 0, 0); } else { card_uart_set_rx_threshold(ip->uart, tpduh->p3); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, tpduh->p3); osmo_fsm_inst_state_chg(fi, TPDU_S_RX_REMAINING, 0, 0); } } else if (byte == (tpduh->ins ^ 0xFF)) { @@ -1197,6 +1263,8 @@ card_uart_tx(ip->uart, msgb_l3(tfp->tpdu), 1, false); osmo_fsm_inst_state_chg(fi, TPDU_S_TX_SINGLE, 0, 0); } else { + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_RX_SINGLE, 0, 0); } } else @@ -1216,6 +1284,7 @@ switch (event) { case ISO7816_E_TX_COMPL: card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW1, 0, 0); break; default: @@ -1227,10 +1296,14 @@ static void tpdu_s_tx_single_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); switch (event) { case ISO7816_E_TX_COMPL: tfp->tpdu->l3h += 1; + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); if (msgb_l3len(tfp->tpdu)) osmo_fsm_inst_state_chg(fi, TPDU_S_PROCEDURE, 0, 0); else @@ -1261,6 +1334,7 @@ msgb_l2len(tfp->tpdu)); } card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW1, 0, 0); break; default: @@ -1273,6 +1347,8 @@ { struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); struct osim_apdu_cmd_hdr *tpduh = msgb_tpdu_hdr(tfp->tpdu); + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); uint8_t byte; switch (event) { @@ -1280,6 +1356,10 @@ byte = get_rx_byte_evt(fi->proc.parent, data); LOGPFSML(fi, LOGL_DEBUG, "Received 0x%02x from UART\n", byte); msgb_put_u8(tfp->tpdu, byte); + + card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); + /* determine if number of expected bytes received */ if (msgb_l2len(tfp->tpdu) == tpduh->p3) osmo_fsm_inst_state_chg(fi, TPDU_S_SW1, 0, 0); @@ -1306,6 +1386,7 @@ //msgb_apdu_sw(tfp->apdu) = byte << 8; msgb_put_u8(tfp->tpdu, byte); card_uart_set_rx_threshold(ip->uart, 1); + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 1); osmo_fsm_inst_state_chg(fi, TPDU_S_SW2, 0, 0); break; default: @@ -1349,7 +1430,7 @@ case ISO7816_E_TX_ERR_IND: /* FIXME: handle this in some different way */ osmo_fsm_inst_state_chg(fi, TPDU_S_DONE, 0, 0); - osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_DONE_IND, NULL); + osmo_fsm_inst_dispatch(fi->proc.parent, ISO7816_E_TPDU_FAILED_IND, NULL); break; case ISO7816_E_TPDU_CLEAR_REQ: osmo_fsm_inst_state_chg(fi, TPDU_S_INIT, 0, 0); @@ -1357,6 +1438,15 @@ } } + +static void tpdu_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t old_state) +{ + struct osmo_fsm_inst *parent_fi = fi->proc.parent; + struct iso7816_3_priv *ip = get_iso7816_3_priv(parent_fi); + + card_uart_ctrl(ip->uart, CUART_CTL_RX_TIMER_HINT, 0); +} + static const struct osmo_fsm_state tpdu_states[] = { [TPDU_S_INIT] = { .name = "INIT", @@ -1433,6 +1523,7 @@ .in_event_mask = 0, .out_state_mask = S(TPDU_S_INIT), .action = NULL, + .onenter = tpdu_s_done_onenter, }, }; static struct osmo_fsm tpdu_fsm = { -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia6ad2d83cea48a8661ed2e4eb50f9bcb85218454 Gerrit-Change-Number: 16293 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:49 +0000 Subject: Change in osmo-ccid-firmware[master]: enable the final slot In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16294 ) Change subject: enable the final slot ...................................................................... enable the final slot The debug uart is shared with slot 7, so in order to use sim slot 7 the pin config and the uart config needs to be changed. Going back to using the debug uart works by defining ENABLE_DBG_UART7 Change-Id: I8f3c7c60306941159c35307a5c1e38c2a2bd2fe1 --- M sysmoOCTSIM/atmel_start.c M sysmoOCTSIM/atmel_start_pins.h M sysmoOCTSIM/command.c M sysmoOCTSIM/config/hpl_sercom_config.h M sysmoOCTSIM/cuart_driver_asf4_usart_async.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/driver_init.h M sysmoOCTSIM/gcc/Makefile M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c D sysmoOCTSIM/manual_test.c M sysmoOCTSIM/stdio_start.c 12 files changed, 353 insertions(+), 264 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/atmel_start.c b/sysmoOCTSIM/atmel_start.c index 6670364..931a09a 100644 --- a/sysmoOCTSIM/atmel_start.c +++ b/sysmoOCTSIM/atmel_start.c @@ -14,6 +14,8 @@ system_init(); dma_memory_init(); dma_memory_register_callback(DMA_MEMORY_COMPLETE_CB, M2M_DMA_complete_cb); -// stdio_redirect_init(); +#ifdef ENABLE_DBG_UART7 + stdio_redirect_init(); +#endif usb_init(); } diff --git a/sysmoOCTSIM/atmel_start_pins.h b/sysmoOCTSIM/atmel_start_pins.h index 7cbaed5..0c33536 100644 --- a/sysmoOCTSIM/atmel_start_pins.h +++ b/sysmoOCTSIM/atmel_start_pins.h @@ -60,6 +60,7 @@ #define SWITCH GPIO(GPIO_PORTC, 14) #define MUX_STAT GPIO(GPIO_PORTC, 15) #define SIM6_IO GPIO(GPIO_PORTC, 16) +#define SIM7_IO GPIO(GPIO_PORTB, 21) #define USER_LED GPIO(GPIO_PORTC, 26) #define SCL4 GPIO(GPIO_PORTC, 27) #define SDA4 GPIO(GPIO_PORTC, 28) diff --git a/sysmoOCTSIM/command.c b/sysmoOCTSIM/command.c index 454cd2f..48d8c11 100644 --- a/sysmoOCTSIM/command.c +++ b/sysmoOCTSIM/command.c @@ -78,6 +78,7 @@ void command_try_recv(void) { +#ifdef ENABLE_DBG_UART7 unsigned int i = 0; /* yield CPU after maximum of 10 received characters */ @@ -101,6 +102,7 @@ i++; } +#endif } void command_init(const char *prompt) diff --git a/sysmoOCTSIM/config/hpl_sercom_config.h b/sysmoOCTSIM/config/hpl_sercom_config.h index bb2bbff..86b4c0a 100644 --- a/sysmoOCTSIM/config/hpl_sercom_config.h +++ b/sysmoOCTSIM/config/hpl_sercom_config.h @@ -1910,6 +1910,8 @@ #include +#ifdef ENABLE_DBG_UART7 + #ifndef CONF_SERCOM_7_USART_ENABLE #define CONF_SERCOM_7_USART_ENABLE 1 #endif @@ -2176,7 +2178,281 @@ #define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 #endif #endif +#else +#include + +#ifndef CONF_SERCOM_7_USART_ENABLE +#define CONF_SERCOM_7_USART_ENABLE 1 +#endif + +// Basic Configuration + +// Receive buffer enable +// Enable input buffer in SERCOM module +// usart_rx_enable +#ifndef CONF_SERCOM_7_USART_RXEN +#define CONF_SERCOM_7_USART_RXEN 1 +#endif + +// Transmitt buffer enable +// Enable output buffer in SERCOM module +// usart_tx_enable +#ifndef CONF_SERCOM_7_USART_TXEN +#define CONF_SERCOM_7_USART_TXEN 1 +#endif + +// Frame parity +// <0x1=>Even parity +// Parity bit mode for USART frame +// usart_parity +#ifndef CONF_SERCOM_7_USART_PARITY +#define CONF_SERCOM_7_USART_PARITY 1 +#endif + +// Character Size +// <0x0=>8 bits +// <0x1=>9 bits +// <0x5=>5 bits +// <0x6=>6 bits +// <0x7=>7 bits +// Data character size in USART frame +// usart_character_size +#ifndef CONF_SERCOM_7_USART_CHSIZE +#define CONF_SERCOM_7_USART_CHSIZE 0x0 +#endif + +// Stop Bit +// <0=>One stop bit +// <1=>Two stop bits +// Number of stop bits in USART frame +// usart_stop_bit +#ifndef CONF_SERCOM_7_USART_SBMODE +#define CONF_SERCOM_7_USART_SBMODE 1 +#endif + +// Baud rate <1-3000000> +// USART baud rate setting +// usart_baud_rate +#ifndef CONF_SERCOM_7_USART_BAUD +#define CONF_SERCOM_7_USART_BAUD 6720 +#endif +// + +// ISO7816 configuration +// ISO7816 Protocol Type +// <0x1=> T=0 +// <0x0=> T=1 +// Define ISO7816 protocol type as 0. +// usart_iso7816_type +#ifndef CONF_SERCOM_7_USART_ISO7816_PROTOCOL_T +#define CONF_SERCOM_7_USART_ISO7816_PROTOCOL_T 0x0 +#endif + +// ISO7816 Inhibit Not Acknowledge +// <0x0=> NACK is transmitted when a parity error is received. +// <0x1=> NACK is not transmitted when a parity error is received. +// Define whether a NACK is transmitted when a parity error is received. +// usart_inack +#ifndef CONF_SERCOM_7_USART_INACK +#define CONF_SERCOM_7_USART_INACK 0x0 +#endif + +// ISO7816 Disable Successive Not Acknowledge +// <0x0=> The successive receive NACK is disable. +// <0x1=> The successive receive NACK is enable. +// Define whether NACK will be sent on parity error reception. +// usart_dsnack +#ifndef CONF_SERCOM_7_USART_DSNACK +#define CONF_SERCOM_7_USART_DSNACK 0x0 +#endif + +// ISO7816 Maximum Iterations<0-7> +// Define the maximum number of retransmit iterations. +// usart_maxiter +#ifndef CONF_SERCOM_7_USART_MAXITER +#define CONF_SERCOM_7_USART_MAXITER 0x7 +#endif + +// ISO7816 Guard Time +// <0x2=> 2-bit times +// <0x3=> 3-bit times +// <0x4=> 4-bit times +// <0x5=> 5-bit times +// <0x6=> 6-bit times +// <0x7=> 7-bit times +// Define the guard time. +// usart_gtime +#ifndef CONF_SERCOM_7_USART_GTIME +#define CONF_SERCOM_7_USART_GTIME 0x2 +#endif + +// Inverse transmission and reception enabled +// Define inverse transmission and reception enabled. +// usart_inverse_enabled +#ifndef CONF_SERCOM_7_USART_INVERSE_ENABLED +#define CONF_SERCOM_7_USART_INVERSE_ENABLED 0x0 +#endif + +#if (CONF_SERCOM_7_USART_INVERSE_ENABLED == 1) +#define CONF_SERCOM_7_USART_RXINV 0x1 +#define CONF_SERCOM_7_USART_TXINV 0x1 +#else +#define CONF_SERCOM_7_USART_RXINV 0x0 +#define CONF_SERCOM_7_USART_TXINV 0x0 +#endif + +// + +// Advanced configuration +// usart_advanced +#ifndef CONF_SERCOM_7_USART_ADVANCED_CONFIG +#define CONF_SERCOM_7_USART_ADVANCED_CONFIG 0 +#endif + +// Run in stand-by +// Keep the module running in standby sleep mode +// usart_arch_runstdby +#ifndef CONF_SERCOM_7_USART_RUNSTDBY +#define CONF_SERCOM_7_USART_RUNSTDBY 0 +#endif + +// Immediate Buffer Overflow Notification +// Controls when the BUFOVF status bit is asserted +// usart_arch_ibon +#ifndef CONF_SERCOM_7_USART_IBON +#define CONF_SERCOM_7_USART_IBON 0 +#endif + +// Start of Frame Detection Enable +// Will wake the device from any sleep mode if usart_init and usart_enable was run priort to going to sleep. (receive buffer must be enabled) +// usart_arch_sfde +#ifndef CONF_SERCOM_7_USART_SFDE +#define CONF_SERCOM_7_USART_SFDE 0 +#endif + +// Collision Detection Enable +// Collision detection enable +// usart_arch_cloden +#ifndef CONF_SERCOM_7_USART_CLODEN +#define CONF_SERCOM_7_USART_CLODEN 0 +#endif + +// Operating Mode +// <0x1=>USART with internal clock +// Drive the shift register by an internal clock generated by the baud rate generator. +// usart_arch_clock_mode +#ifndef CONF_SERCOM_7_USART_MODE +#define CONF_SERCOM_7_USART_MODE 0x1 +#endif + +// Data Order +// <0=>MSB is transmitted first +// <1=>LSB is transmitted first +// Data order of the data bits in the frame +// usart_arch_dord +#ifndef CONF_SERCOM_7_USART_DORD +#define CONF_SERCOM_7_USART_DORD 1 +#endif + +// Debug Stop Mode +// Behavior of the baud-rate generator when CPU is halted by external debugger. +// <0=>Keep running +// <1=>Halt +// usart_arch_dbgstop +#ifndef CONF_SERCOM_7_USART_DEBUG_STOP_MODE +#define CONF_SERCOM_7_USART_DEBUG_STOP_MODE 0 +#endif + +// Does not do anything in USRT mode +#define CONF_SERCOM_7_USART_SAMPR 0x0 +#define CONF_SERCOM_7_USART_SAMPA 0x0 +#define CONF_SERCOM_7_USART_FRACTIONAL 0x0 + +// Does not do anything in UART mode +#define CONF_SERCOM_7_USART_CPOL 0 + +// Does not do anything in USRT mode +#define CONF_SERCOM_7_USART_ENC 0 + +// + +#ifndef CONF_SERCOM_7_USART_CMODE +#define CONF_SERCOM_7_USART_CMODE CONF_SERCOM_7_USART_ISO7816_PROTOCOL_T +#endif + +/* RX is on PIN_PC16 */ +#ifndef CONF_SERCOM_7_USART_RXPO +#define CONF_SERCOM_7_USART_RXPO 0 +#endif + +/* TX uses the same pin with RX */ +#ifndef CONF_SERCOM_7_USART_TXPO +#define CONF_SERCOM_7_USART_TXPO 2 +#endif + +/* Set iso7816 mode */ +#define CONF_SERCOM_7_USART_PMODE (CONF_SERCOM_7_USART_PARITY - 1) +#define CONF_SERCOM_7_USART_FORM 7 + +#if CONF_SERCOM_7_USART_CMODE == 0 +// Calculate BAUD register value in UART mode +#if CONF_SERCOM_7_USART_SAMPR == 0 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + 65536 - ((65536 * 16.0f * CONF_SERCOM_7_USART_BAUD) / CONF_GCLK_SERCOM7_CORE_FREQUENCY) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 1 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + ((CONF_GCLK_SERCOM7_CORE_FREQUENCY) / (CONF_SERCOM_7_USART_BAUD * 16)) - (CONF_SERCOM_7_USART_FRACTIONAL / 8) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 2 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + 65536 - ((65536 * 8.0f * CONF_SERCOM_7_USART_BAUD) / CONF_GCLK_SERCOM7_CORE_FREQUENCY) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 3 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + ((CONF_GCLK_SERCOM7_CORE_FREQUENCY) / (CONF_SERCOM_7_USART_BAUD * 8)) - (CONF_SERCOM_7_USART_FRACTIONAL / 8) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#elif CONF_SERCOM_7_USART_SAMPR == 4 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +#define CONF_SERCOM_7_USART_BAUD_RATE \ + 65536 - ((65536 * 3.0f * CONF_SERCOM_7_USART_BAUD) / CONF_GCLK_SERCOM7_CORE_FREQUENCY) +#endif +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#endif + +#elif CONF_SERCOM_7_USART_CMODE == 1 +#ifndef CONF_SERCOM_7_USART_BAUD_RATE +// Calculate BAUD register value in USRT mode +#define CONF_SERCOM_7_USART_BAUD_RATE (CONF_GCLK_SERCOM7_CORE_FREQUENCY) / (2 * CONF_SERCOM_7_USART_BAUD) - 1 +#endif + +#ifndef CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH +#define CONF_SERCOM_7_USART_RECEIVE_PULSE_LENGTH 0 +#endif +#else +#error CMODE value for SERCOM 7 in USART mode not known +#endif + +#endif // <<< end of configuration section >>> #endif // HPL_SERCOM_CONFIG_H diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index c7d29eb..87f5123 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -13,7 +13,11 @@ #include "cuart.h" +#ifndef ENABLE_DBG_UART7 +static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, &SIM7}; +#else static struct usart_async_descriptor* SIM_peripheral_descriptors[] = {&SIM0, &SIM1, &SIM2, &SIM3, &SIM4, &SIM5, &SIM6, NULL}; +#endif extern struct card_uart *cuart4slot_nr(uint8_t slot_nr); diff --git a/sysmoOCTSIM/driver_init.c b/sysmoOCTSIM/driver_init.c index 7071ea5..1cfd8cf 100644 --- a/sysmoOCTSIM/driver_init.c +++ b/sysmoOCTSIM/driver_init.c @@ -33,7 +33,11 @@ #define SIM6_BUFFER_SIZE 512 /*! The buffer size for USART */ +#ifdef ENABLE_DBG_UART7 #define UART_DEBUG_BUFFER_SIZE 4096 +#else +#define SIM7_BUFFER_SIZE 512 +#endif struct usart_async_descriptor SIM0; struct usart_async_descriptor SIM1; @@ -42,6 +46,9 @@ struct usart_async_descriptor SIM4; struct usart_async_descriptor SIM5; struct usart_async_descriptor SIM6; +#ifndef ENABLE_DBG_UART7 +struct usart_async_descriptor SIM7; +#endif static uint8_t SIM0_buffer[SIM0_BUFFER_SIZE]; static uint8_t SIM1_buffer[SIM1_BUFFER_SIZE]; @@ -50,12 +57,14 @@ static uint8_t SIM4_buffer[SIM4_BUFFER_SIZE]; static uint8_t SIM5_buffer[SIM5_BUFFER_SIZE]; static uint8_t SIM6_buffer[SIM6_BUFFER_SIZE]; - +#ifndef ENABLE_DBG_UART7 +static uint8_t SIM7_buffer[SIM7_BUFFER_SIZE]; +#else struct usart_async_rings_descriptor UART_debug; -struct calendar_descriptor CALENDAR_0; - static uint8_t UART_DEBUG_buffer_rx[UART_DEBUG_BUFFER_SIZE]; static uint8_t UART_DEBUG_buffer_tx[UART_DEBUG_BUFFER_SIZE]; +#endif +struct calendar_descriptor CALENDAR_0; void CALENDAR_0_CLOCK_init(void) { @@ -327,6 +336,7 @@ SIM6_PORT_init(); } +#ifdef ENABLE_DBG_UART7 /** * \brief USART Clock initialization function * @@ -365,7 +375,44 @@ usart_async_rings_init(&UART_debug, SERCOM7, UART_DEBUG_buffer_rx, UART_DEBUG_BUFFER_SIZE, UART_DEBUG_buffer_tx, UART_DEBUG_BUFFER_SIZE, (void *)NULL); UART_debug_PORT_init(); } +#else +/** + * \brief USART Clock initialization function + * + * Enables register interface and peripheral clock + */ +void SIM7_CLOCK_init() +{ + hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM7_GCLK_ID_CORE, CONF_GCLK_SERCOM7_CORE_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); + hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM7_GCLK_ID_SLOW, CONF_GCLK_SERCOM7_SLOW_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); + + hri_mclk_set_APBDMASK_SERCOM7_bit(MCLK); +} + +/** + * \brief USART pinmux initialization function + * + * Set each required pin to USART functionality + */ +void SIM7_PORT_init() +{ + + gpio_set_pin_function(SIM7_IO, PINMUX_PB21D_SERCOM7_PAD0); +} + +/** + * \brief USART initialization function + * + * Enables USART peripheral, clocks and initializes USART driver + */ +void SIM7_init(void) +{ + SIM7_CLOCK_init(); + usart_async_init(&SIM7, SERCOM7, SIM7_buffer, SIM7_BUFFER_SIZE, (void *)NULL); + SIM7_PORT_init(); +} +#endif void USB_DEVICE_INSTANCE_PORT_init(void) { @@ -923,8 +970,11 @@ SIM4_init(); SIM5_init(); SIM6_init(); - +#ifndef ENABLE_DBG_UART7 + SIM7_init(); +#else UART_debug_init(); +#endif USB_DEVICE_INSTANCE_init(); } diff --git a/sysmoOCTSIM/driver_init.h b/sysmoOCTSIM/driver_init.h index de5e441..f9d23b7 100644 --- a/sysmoOCTSIM/driver_init.h +++ b/sysmoOCTSIM/driver_init.h @@ -36,7 +36,11 @@ extern struct usart_async_descriptor SIM4; extern struct usart_async_descriptor SIM5; extern struct usart_async_descriptor SIM6; +#ifdef ENABLE_DBG_UART7 extern struct usart_async_rings_descriptor UART_debug; +#else +extern struct usart_async_descriptor SIM7; +#endif void CALENDAR_0_CLOCK_init(void); void CALENDAR_0_init(void); @@ -69,6 +73,10 @@ void SIM6_CLOCK_init(void); void SIM6_init(void); +void SIM7_PORT_init(void); +void SIM7_CLOCK_init(void); +void SIM7_init(void); + void UART_debug_PORT_init(void); void UART_debug_CLOCK_init(void); void UART_debug_init(void); diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 95a582f..7a37036 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -126,7 +126,6 @@ i2c_bitbang.o \ libosmo_emb.o \ main.o \ - manual_test.o \ ncn8025.o \ octsim_i2c.o \ stdio_redirect/gcc/read.o \ diff --git a/sysmoOCTSIM/libosmo_emb.c b/sysmoOCTSIM/libosmo_emb.c index a12c490..81b29e3 100644 --- a/sysmoOCTSIM/libosmo_emb.c +++ b/sysmoOCTSIM/libosmo_emb.c @@ -157,7 +157,7 @@ #endif /* logging */ log_init(&log_info, g_tall_ctx); -#if 0 +#ifdef ENABLE_DBG_UART7 stderr_target = log_target_create_stderr_raw(); log_add_target(stderr_target); log_set_all_filter(stderr_target, 1); diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index c73b715..e3d7034 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -435,7 +435,7 @@ //####################### -#define NUM_OUT_BUF 7 +#define NUM_OUT_BUF 16 int main(void) { @@ -529,7 +529,7 @@ command_try_recv(); poll_card_detect(); submit_next_irq(); - for (int i = 0; i < usb_fs_descs.ccid.class.bMaxSlotIndex; i++){ + for (int i = 0; i <= usb_fs_descs.ccid.class.bMaxSlotIndex; i++){ g_ci.slot_ops->handle_fsm_events(&g_ci.slot[i], true); } feed_ccid(); diff --git a/sysmoOCTSIM/manual_test.c b/sysmoOCTSIM/manual_test.c deleted file mode 100644 index d6852bc..0000000 --- a/sysmoOCTSIM/manual_test.c +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright (C) 2019 Harald Welte - * - * This program is free software; you can redistribute it and/or - * modify 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 "atmel_start.h" -#include "atmel_start_pins.h" - -#include "i2c_bitbang.h" -#include "octsim_i2c.h" -#include "ncn8025.h" - -#include "command.h" - -enum testmode_test { - TEST_USER_LED, - /* test the per-slot LED by blinking it shortly */ - TEST_LED, - /* test the voltages of the SIMVCC */ - TEST_VOLTAGE, - /* test the clock rates of the SIMCLK pin */ - TEST_CLOCK, - /* test the RST line by asserting it low and then back high */ - TEST_RST, - /* test the RST line by asserting it low and then back high */ - TEST_IO, - _NUM_TESTS -}; -static const char *test_names[_NUM_TESTS] = { - [TEST_USER_LED] = "USER_LED", - [TEST_LED] = "LED", - [TEST_VOLTAGE] = "VOLTAGE", - [TEST_CLOCK] = "CLOCK", - [TEST_RST] = "RST", - [TEST_IO] = "IO", -}; - -struct testmode_state { - uint8_t slot; - enum testmode_test test_nr; - int test_int; - struct ncn8025_settings ncn; -}; -static struct testmode_state g_tms; - -#define BLINK_MS 500 - -static void set_slot(uint8_t slot) -{ - printf("changing slot to %u\r\n", slot); - g_tms.slot = slot; - g_tms.ncn = (struct ncn8025_settings) { - .rstin = false, - .cmdvcc = false, - .led = false, - .clkdiv = SIM_CLKDIV_8, - .vsel = SIM_VOLT_3V0, - }; - ncn8025_set(g_tms.slot, &g_tms.ncn); - ncn8025_get(g_tms.slot, &g_tms.ncn); -} - -static void next_test(void) -{ - g_tms.test_nr = (g_tms.test_nr + 1) % _NUM_TESTS; - g_tms.test_int = 0; - printf("changing test to %s\r\n", test_names[g_tms.test_nr]); -} - -static void test_user_led(void) -{ - printf("blinking User LED\r\n"); - - gpio_set_pin_function(PIN_PC26, GPIO_PIN_FUNCTION_OFF); - gpio_set_pin_direction(PIN_PC26, GPIO_DIRECTION_OUT); - gpio_set_pin_level(PIN_PC26, true); - delay_ms(BLINK_MS); - gpio_set_pin_level(PIN_PC26, false); -} - -static void test_led(void) -{ - printf("blinking Slot LED\r\n"); - - g_tms.ncn.led = true; - ncn8025_set(g_tms.slot, &g_tms.ncn); - delay_ms(BLINK_MS); - g_tms.ncn.led = false; - ncn8025_set(g_tms.slot, &g_tms.ncn); -} - -static enum ncn8025_sim_voltage voltage[3] = { SIM_VOLT_1V8, SIM_VOLT_3V0, SIM_VOLT_5V0 }; -static const char *voltage_name[3] = { "1.8", "3.0", "5.0" }; - -static void ncn_change_voltage(enum ncn8025_sim_voltage vsel) -{ - /* first disable the output; VSEL changes require output to be disabled */ - g_tms.ncn.cmdvcc = false; - ncn8025_set(g_tms.slot, &g_tms.ncn); - - /* then re-enable it with the new voltage setting */ - g_tms.ncn.vsel = vsel; - g_tms.ncn.cmdvcc = true; - ncn8025_set(g_tms.slot, &g_tms.ncn); -} - -static void test_voltage(void) -{ - printf("Testing Voltage %s\r\n", voltage_name[g_tms.test_int]); - - ncn_change_voltage(voltage[g_tms.test_int]); - g_tms.test_int = (g_tms.test_int+1) % 3; -} - -static enum ncn8025_sim_clkdiv clk_div[4] = { SIM_CLKDIV_8, SIM_CLKDIV_4, SIM_CLKDIV_2, SIM_CLKDIV_1 }; -static const uint8_t clk_div_val[4] = { 8, 4, 2, 1 }; - -static void test_clock(void) -{ - printf("Testing Clock Divider %u\r\n", clk_div_val[g_tms.test_int]); - g_tms.ncn.cmdvcc = true; - g_tms.ncn.clkdiv = clk_div[g_tms.test_int]; - ncn8025_set(g_tms.slot, &g_tms.ncn); - g_tms.test_int = (g_tms.test_int+1) % 4; -} - -static void test_rst(void) -{ - printf("blinking RST\r\n"); - - /* well-defined voltage for LED brightness */ - ncn_change_voltage(SIM_VOLT_3V0); - - g_tms.ncn.cmdvcc = true; - g_tms.ncn.rstin = true; - ncn8025_set(g_tms.slot, &g_tms.ncn); - - delay_ms(BLINK_MS); - - g_tms.ncn.rstin = false; - ncn8025_set(g_tms.slot, &g_tms.ncn); -} - -#ifndef SIM7_IO -#define SIM7_IO PIN_PB21 -#endif -static const enum gpio_port sim_io_gpio[] = { SIM0_IO, SIM1_IO, SIM2_IO, SIM3_IO, - SIM4_IO, SIM5_IO, SIM6_IO, SIM7_IO }; - -static void test_io(void) -{ - enum gpio_port gpio = sim_io_gpio[g_tms.slot]; - printf("blinking I/O\r\n"); - - /* well-defined voltage for LED brightness */ - ncn_change_voltage(SIM_VOLT_3V0); - - gpio_set_pin_function(gpio, GPIO_PIN_FUNCTION_OFF); - gpio_set_pin_direction(gpio, GPIO_DIRECTION_OUT); - gpio_set_pin_level(gpio, false); - delay_ms(BLINK_MS); - gpio_set_pin_level(gpio, true); - - /* FIXME: restore tack to original function! */ - //gpio_set_pin_function(sim_io_gpio[g_tms.slot], GPIO_PIN_FUNCTION_OFF); -} - -typedef void (*test_fn)(void); -static const test_fn test_functions[_NUM_TESTS] = { - [TEST_USER_LED] = test_user_led, - [TEST_LED] = test_led, - [TEST_VOLTAGE] = test_voltage, - [TEST_CLOCK] = test_clock, - [TEST_RST] = test_rst, - [TEST_IO] = test_io, -}; - -static void execute_test(void) -{ - printf("(%u) %-10s: ", g_tms.slot, test_names[g_tms.test_nr]); - test_functions[g_tms.test_nr](); -} - -static int wait_for_key_and_process(void) -{ - int c; - - do { - } while (!usart_async_rings_is_rx_not_empty(&UART_debug)); - - c = getchar(); - if (c < 0) - return -1; - - switch (c) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - set_slot(c - '0'); - execute_test(); - break; - case 'n': - case 'N': - next_test(); - execute_test(); - break; - case 'Q': - case 'q': - printf("Leaving Test Mode\r\n"); - return -1; - case ' ': - execute_test(); - break; - } - return 0; -} - -DEFUN(testmode_fn, cmd_testmode, - "testmode", "Enter board testing mode (Use `Q` to exit)") -{ - printf("Manual test mode. 'Q': exit, 'N': next test, SPACE: re-run, '0'-'7': slot\r\n"); - - printf("SPACE will start the current test (%s)\r\n", test_names[g_tms.test_nr]); - while (1) { - if (wait_for_key_and_process() < 0) - break; - } -} - -void testmode_init(void) -{ - command_register(&cmd_testmode); -} diff --git a/sysmoOCTSIM/stdio_start.c b/sysmoOCTSIM/stdio_start.c index 8a15c88..63e125d 100644 --- a/sysmoOCTSIM/stdio_start.c +++ b/sysmoOCTSIM/stdio_start.c @@ -9,6 +9,7 @@ #include "atmel_start.h" #include "stdio_start.h" +#ifdef ENABLE_DBG_UART7 static void UART_debug_rx_cb(const struct usart_async_rings_descriptor *const io_descr) { } @@ -19,3 +20,4 @@ usart_async_rings_enable(&UART_debug); stdio_io_init(&UART_debug.io); } +#endif -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I8f3c7c60306941159c35307a5c1e38c2a2bd2fe1 Gerrit-Change-Number: 16294 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:49 +0000 Subject: Change in osmo-ccid-firmware[master]: prettier slot bitmask code In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 ) Change subject: prettier slot bitmask code ...................................................................... prettier slot bitmask code Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2 --- M sysmoOCTSIM/main.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index e3d7034..07c5af8 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -273,8 +273,8 @@ for(int i = 0; i <8; i++) { uint8_t byteidx = i >> 2; - uint8_t old_bit = old_bm & (1 << i); - uint8_t new_bit = new_bm & (1 << i); + uint8_t old_bit = (old_bm >> i) & 1; + uint8_t new_bit = (new_bm >> i) & 1; uint8_t bv; if (old_bit == new_bit && new_bit == 0) bv = 0x00; -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ia70c589c06d8d786afac54063d41e775e8d850c2 Gerrit-Change-Number: 16295 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:23:49 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:23:49 +0000 Subject: Change in osmo-ccid-firmware[master]: reenable firmware build In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16307 ) Change subject: reenable firmware build ...................................................................... reenable firmware build Host build is still disabled until it is fixed Change-Id: Iee56a50c0cd818887a8e9d8f2f660acaef16a8ca --- M contrib/jenkins.sh 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a993645..f19fc35 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,5 +1,5 @@ #!/bin/bash -exit 0 + if ! [ -x "$(command -v osmo-deps.sh)" ]; then echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" exit 2 @@ -13,7 +13,7 @@ inst="$TOPDIR/install" export deps inst - +: ' echo echo "=============== libosmocore hostt build ===========" osmo-build-dep.sh libosmocore "" --disable-doxygen @@ -27,7 +27,7 @@ make clean make $PARALLEL_MAKE make clean - +' # adapted from echo echo "=============== libosmocore cross-build ===========" -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Iee56a50c0cd818887a8e9d8f2f660acaef16a8ca Gerrit-Change-Number: 16307 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:24:11 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:24:11 +0000 Subject: Change in osmo-msc[master]: fix incoming call while Paging In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16298 ) Change subject: fix incoming call while Paging ...................................................................... fix incoming call while Paging Do not free the CC transaction when an MT subscriber is already being Paged. Instead, invoke another paging request, which paging.c will correctly add to the list of pending paging response callbacks to run. A ttcn3 test is linked in the related patch (s.b.). Related: OS#4240 Related: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 Change-Id: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be --- M src/libmsc/gsm_04_08_cc.c 1 file changed, 2 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 4e604e5..8cfb611 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -1935,19 +1935,11 @@ * log it now. */ LOG_TRANS_CAT(trans, DMNCC, LOGL_DEBUG, "rx %s\n", get_mncc_name(msg->msg_type)); - if (vsub->cs.is_paging) { - LOG_TRANS(trans, LOGL_DEBUG, - "rx %s, subscriber not yet connected, paging already started\n", - get_mncc_name(msg->msg_type)); - vlr_subscr_put(vsub, __func__); - trans_free(trans); - return 0; - } - /* store setup information until paging succeeds */ memcpy(&trans->cc.msg, data, sizeof(struct gsm_mncc)); - /* Request a channel */ + /* Request a channel. If Paging already started, paging_request_start() will append the new + * trans to the already ongoing Paging. */ trans->paging_request = paging_request_start(vsub, PAGING_CAUSE_CALL_CONVERSATIONAL, cc_paging_cb, trans, "MNCC: establish call"); if (!trans->paging_request) { -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16298 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be Gerrit-Change-Number: 16298 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:24:15 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:24:15 +0000 Subject: Change in osmo-msc[master]: add sdp_msg API: SDP parsing/composition In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15947 ) Change subject: add sdp_msg API: SDP parsing/composition ...................................................................... add sdp_msg API: SDP parsing/composition Rationale: in order to add full SDP to the MNCC protocol (upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f), we need to parse and compose SDP messages. Obviously, libosmo-mgcp-client already contains similar code, but that is unfortunately heavily glued to the actual MGCP implementation. The simplest solution is to create this separate implementation, copy-pasting from the existing libosmo-mgcp-client code as is convenient. This API is added here to probe whether it works well. When it does, the intention is to "move it up" to osmo-mgw and overhaul the SDP parsing in our MGCP client and MGCP server APIs using this same API. Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 --- M configure.ac M include/osmocom/msc/Makefile.am A include/osmocom/msc/sdp_msg.h M src/libmsc/Makefile.am A src/libmsc/sdp_msg.c M tests/Makefile.am A tests/sdp_msg/Makefile.am A tests/sdp_msg/sdp_msg_test.c A tests/sdp_msg/sdp_msg_test.err A tests/sdp_msg/sdp_msg_test.ok M tests/testsuite.at 11 files changed, 1,846 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, approved pespin: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve diff --git a/configure.ac b/configure.ac index 5aa652d..ee80900 100644 --- a/configure.ac +++ b/configure.ac @@ -254,6 +254,7 @@ tests/db_sms/Makefile tests/sms_queue/Makefile tests/msc_vlr/Makefile + tests/sdp_msg/Makefile doc/Makefile doc/examples/Makefile doc/manuals/Makefile diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am index 0d7d45c..faf1048 100644 --- a/include/osmocom/msc/Makefile.am +++ b/include/osmocom/msc/Makefile.am @@ -39,6 +39,7 @@ rrlp.h \ rtp_stream.h \ sccp_ran.h \ + sdp_msg.h \ sgs_iface.h \ sgs_server.h \ sgs_vty.h \ diff --git a/include/osmocom/msc/sdp_msg.h b/include/osmocom/msc/sdp_msg.h new file mode 100644 index 0000000..7ac6036 --- /dev/null +++ b/include/osmocom/msc/sdp_msg.h @@ -0,0 +1,68 @@ +/* Minimalistic SDP parse/compose API, focused on GSM audio codecs */ +#pragma once + +#include +#include + +extern const struct value_string sdp_msg_payload_type_names[]; +static inline const char *sdp_msg_payload_type_name(unsigned int payload_type) +{ return get_value_string(sdp_msg_payload_type_names, payload_type); } +int sdp_subtype_name_to_payload_type(const char *subtype_name); + +struct sdp_audio_codec { + unsigned int payload_type; + /* Like "GSM", "AMR", "EFR", ... */ + char subtype_name[16]; + unsigned int rate; + char fmtp[64]; +}; + +struct sdp_audio_codecs { + unsigned int count; + struct sdp_audio_codec codec[16]; +}; + +struct sdp_msg { + struct osmo_sockaddr_str rtp; + unsigned int ptime; + struct sdp_audio_codecs audio_codecs; +}; + +#define foreach_sdp_audio_codec(/* struct sdp_audio_codec* */ CODEC, \ + /* struct sdp_audio_codecs* */ AC) \ + for (CODEC = (AC)->codec; \ + (CODEC - (AC)->codec) < OSMO_MIN((AC)->count, ARRAY_SIZE((AC)->codec)); \ + CODEC++) + +const char *sdp_msg_line_end(const char *src); + +int sdp_audio_codec_cmp(const struct sdp_audio_codec *a, const struct sdp_audio_codec *b); + +struct sdp_audio_codec *sdp_audio_codec_add(struct sdp_audio_codecs *ac, unsigned int payload_type, + const char *subtype_name, unsigned int rate, const char *fmtp); +struct sdp_audio_codec *sdp_audio_codec_add_copy(struct sdp_audio_codecs *ac, + const struct sdp_audio_codec *codec); +int sdp_audio_codec_remove(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec); +struct sdp_audio_codec *sdp_audio_codec_by_payload_type(struct sdp_audio_codecs *ac, + unsigned int payload_type, bool create); +struct sdp_audio_codec *sdp_audio_codec_by_descr(struct sdp_audio_codecs *ac, + const struct sdp_audio_codec *codec); + +void sdp_audio_codecs_intersection(struct sdp_audio_codecs *ac_dest, const struct sdp_audio_codecs *ac_other, + bool translate_payload_type_numbers); +void sdp_audio_codecs_select(struct sdp_audio_codecs *ac, struct sdp_audio_codec *codec); + +int sdp_msg_to_str(char *dst, size_t dst_size, const struct sdp_msg *sdp); +int sdp_msg_from_str(struct sdp_msg *sdp, const char *src); + +int sdp_audio_codec_name_buf(char *buf, size_t buflen, const struct sdp_audio_codec *codec); +char *sdp_audio_codec_name_c(void *ctx, const struct sdp_audio_codec *codec); +const char *sdp_audio_codec_name(const struct sdp_audio_codec *codec); + +int sdp_audio_codecs_name_buf(char *buf, size_t buflen, const struct sdp_audio_codecs *ac); +char *sdp_audio_codecs_name_c(void *ctx, const struct sdp_audio_codecs *ac); +const char *sdp_audio_codecs_name(const struct sdp_audio_codecs *ac); + +int sdp_msg_name_buf(char *buf, size_t buflen, const struct sdp_msg *sdp); +char *sdp_msg_name_c(void *ctx, const struct sdp_msg *sdp); +const char *sdp_msg_name(const struct sdp_msg *sdp); diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am index d834896..e6a2dc1 100644 --- a/src/libmsc/Makefile.am +++ b/src/libmsc/Makefile.am @@ -64,6 +64,7 @@ ran_peer.c \ rrlp.c \ rtp_stream.c \ + sdp_msg.c \ silent_call.c \ sms_queue.c \ transaction.c \ diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c new file mode 100644 index 0000000..7880978 --- /dev/null +++ b/src/libmsc/sdp_msg.c @@ -0,0 +1,576 @@ +/* Minimalistic SDP parse/compose implementation, focused on GSM audio codecs */ +/* + * (C) 2019 by sysmocom - s.m.f.c. GmbH + * All Rights Reserved + * + * SPDX-License-Identifier: AGPL-3.0+ + * + * 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 +#include + +/* Compare name, rate and fmtp, returning typical cmp result: 0 on match, and -1 / 1 on mismatch. + * Do *not* compare the payload_type number. + * The fmtp is only string-compared -- e.g. if AMR parameters appear in a different order, it amounts to a mismatch even + * though all parameters are the same. */ +int sdp_audio_codec_cmp(const struct sdp_audio_codec *a, const struct sdp_audio_codec *b) +{ + int rc; + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + rc = strncmp(a->subtype_name, b->subtype_name, sizeof(a->subtype_name)); + if (rc) + return rc; + + if (a->rate < b->rate) + return -1; + if (a->rate > b->rate) + return 1; + + rc = strncmp(a->fmtp, b->fmtp, sizeof(a->fmtp)); + if (rc) + return rc; + + return 0; +} + +/* Given a predefined fixed payload_type number, add an SDP audio codec entry, if not present yet. + * The payload_type must exist in sdp_msg_payload_type_names. + * Return the audio codec created or already existing for this payload type number. + */ +struct sdp_audio_codec *sdp_audio_codec_add(struct sdp_audio_codecs *ac, unsigned int payload_type, + const char *subtype_name, unsigned int rate, const char *fmtp) +{ + struct sdp_audio_codec *codec; + + /* Does an entry already exist? */ + codec = sdp_audio_codec_by_payload_type(ac, payload_type, false); + if (codec) { + /* Already exists, sanity check */ + if (!codec->subtype_name[0]) + OSMO_STRLCPY_ARRAY(codec->subtype_name, subtype_name); + else if (strcmp(codec->subtype_name, subtype_name)) { + /* There already is an entry with this payload_type number but a mismatching subtype_name. That is + * weird, rather abort. */ + return NULL; + } + if (codec->rate != rate + || (fmtp && strcmp(fmtp, codec->fmtp))) { + /* Mismatching details. Rather abort */ + return NULL; + } + return codec; + } + + /* None exists, create codec entry for this payload type number */ + codec = sdp_audio_codec_by_payload_type(ac, payload_type, true); + /* NULL means unable to add an entry */ + if (!codec) + return NULL; + + OSMO_STRLCPY_ARRAY(codec->subtype_name, subtype_name); + if (fmtp) + OSMO_STRLCPY_ARRAY(codec->fmtp, fmtp); + return codec; +} + +struct sdp_audio_codec *sdp_audio_codec_add_copy(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec) +{ + return sdp_audio_codec_add(ac, codec->payload_type, codec->subtype_name, codec->rate, + codec->fmtp[0] ? codec->fmtp : NULL); +} + +struct sdp_audio_codec *sdp_audio_codec_by_payload_type(struct sdp_audio_codecs *ac, unsigned int payload_type, + bool create) +{ + struct sdp_audio_codec *codec; + foreach_sdp_audio_codec(codec, ac) { + if (codec->payload_type == payload_type) + return codec; + } + + if (!create) + return NULL; + + /* Not found; codec points after the last entry now. */ + if ((codec - ac->codec) >= ARRAY_SIZE(ac->codec)) + return NULL; + + *codec = (struct sdp_audio_codec){ + .payload_type = payload_type, + .rate = 8000, + }; + + ac->count = (codec - ac->codec) + 1; + return codec; +} + +/* Return a given sdp_msg's codec entry that matches the subtype_name, rate and fmtp of the given codec, or NULL if no + * match is found. Comparison is made by sdp_audio_codec_cmp(). */ +struct sdp_audio_codec *sdp_audio_codec_by_descr(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec) +{ + struct sdp_audio_codec *i; + foreach_sdp_audio_codec(i, ac) { + if (!sdp_audio_codec_cmp(i, codec)) + return i; + } + return NULL; +} + +/* Remove the codec entry pointed at by 'codec'. 'codec' must point at an entry of 'sdp' (to use an external codec + * instance, use sdp_audio_codec_by_descr()). + * Return 0 on success, -ENOENT if codec does not point at the sdp->codec array. */ +int sdp_audio_codec_remove(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec) +{ + struct sdp_audio_codec *i; + if ((codec < ac->codec) + || ((codec - ac->codec) >= OSMO_MIN(ac->count, ARRAY_SIZE(ac->codec)))) + return -ENOENT; + + /* Move all following entries one up */ + ac->count--; + foreach_sdp_audio_codec(i, ac) { + if (i < codec) + continue; + *i = *(i+1); + } + return 0; +} + +/* Convert struct sdp_msg to the actual SDP protocol representation */ +int sdp_msg_to_str(char *dst, size_t dst_size, const struct sdp_msg *sdp) +{ + const struct sdp_audio_codec *codec; + struct osmo_strbuf sb = { .buf = dst, .len = dst_size }; + const char *ip = sdp->rtp.ip[0] ? sdp->rtp.ip : "0.0.0.0"; + + OSMO_STRBUF_PRINTF(sb, + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 %s\r\n" + "s=GSM Call\r\n" + "c=IN IP4 %s\r\n" + "t=0 0\r\n" + "m=audio %d RTP/AVP", + ip, ip, + sdp->rtp.port); + + /* Append all payload type numbers to 'm=audio RTP/AVP 3 4 112' line */ + foreach_sdp_audio_codec(codec, &sdp->audio_codecs) + OSMO_STRBUF_PRINTF(sb, " %d", codec->payload_type); + OSMO_STRBUF_PRINTF(sb, "\r\n"); + + /* Add details for all codecs */ + foreach_sdp_audio_codec(codec, &sdp->audio_codecs) { + if (codec->subtype_name[0]) { + OSMO_STRBUF_PRINTF(sb, "a=rtpmap:%d %s/%d\r\n", codec->payload_type, codec->subtype_name, + codec->rate > 0? codec->rate : 8000); + } + + if (codec->fmtp[0]) + OSMO_STRBUF_PRINTF(sb, "a=fmtp:%d %s\r\n", codec->payload_type, codec->fmtp); + } + + OSMO_STRBUF_PRINTF(sb, "a=ptime:%d\r\n", sdp->ptime > 0? sdp->ptime : 20); + + return sb.chars_needed; +} + +/* Return the first line ending (or the end of the string) at or after the given string position. */ +const char *sdp_msg_line_end(const char *src) +{ + const char *line_end = strchr(src, '\r'); + if (!line_end) + line_end = strchr(src, '\n'); + if (!line_end) + line_end = src + strlen(src); + return line_end; +} + +/* parse a line like 'a=rtpmap:0 PCMU/8000', 'a=fmtp:112 octet-align=1; mode-set=4', 'a=ptime:20'. + * The src should point at the character after 'a=', e.g. at the start of 'rtpmap', 'fmtp', 'ptime' + */ +int sdp_parse_attrib(struct sdp_msg *sdp, const char *src) +{ + unsigned int payload_type; + struct sdp_audio_codec *codec; +#define A_RTPMAP "rtpmap:" +#define A_FMTP "fmtp:" +#define A_PTIME "ptime:" +#define A_RTCP "rtcp:" +#define A_SENDRECV "sendrecv" +#define A_SENDONLY "sendonly" +#define A_RECVONLY "recvonly" + + if (osmo_str_startswith(src, A_RTPMAP)) { + char *audio_name; + unsigned int channels = 1; + if (sscanf(src, A_RTPMAP "%u", &payload_type) != 1) + return -EINVAL; + + audio_name = strchr(src, ' '); + if (!audio_name || audio_name >= sdp_msg_line_end(src)) + return -EINVAL; + + codec = sdp_audio_codec_by_payload_type(&sdp->audio_codecs, payload_type, true); + if (!codec) + return -ENOSPC; + + if (sscanf(audio_name, " %31[^/]/%u/%u", codec->subtype_name, &codec->rate, &channels) < 1) + return -EINVAL; + + if (channels != 1) + return -ENOTSUP; + } + + else if (osmo_str_startswith(src, A_FMTP)) { + char *fmtp_str; + const char *line_end = sdp_msg_line_end(src); + if (sscanf(src, A_FMTP "%u", &payload_type) != 1) + return -EINVAL; + + fmtp_str = strchr(src, ' '); + if (!fmtp_str) + return -EINVAL; + fmtp_str++; + if (fmtp_str >= line_end) + return -EINVAL; + + codec = sdp_audio_codec_by_payload_type(&sdp->audio_codecs, payload_type, true); + if (!codec) + return -ENOSPC; + + /* (+1 because osmo_strlcpy() interprets it as size including the '\0') */ + osmo_strlcpy(codec->fmtp, fmtp_str, line_end - fmtp_str + 1); + } + + else if (osmo_str_startswith(src, A_PTIME)) { + if (sscanf(src, A_PTIME "%u", &sdp->ptime) != 1) + return -EINVAL; + + } + + else if (osmo_str_startswith(src, A_RTCP)) { + /* TODO? */ + } + + else if (osmo_str_startswith(src, A_SENDRECV)) { + /* TODO? */ + } + + else if (osmo_str_startswith(src, A_SENDONLY)) { + /* TODO? */ + } + + else if (osmo_str_startswith(src, A_RECVONLY)) { + /* TODO? */ + } + + return 0; +} + +const struct value_string sdp_msg_payload_type_names[] = { + { 0, "PCMU" }, + { 3, "GSM" }, + { 8, "PCMA" }, + { 18, "G729" }, + { 110, "GSM-EFR" }, + { 111, "GSM-HR-08" }, + { 112, "AMR" }, + { 113, "AMR-WB" }, + {} +}; + +/* Return payload type number matching given string ("AMR", "GSM", ...) or negative if not found. */ +int sdp_subtype_name_to_payload_type(const char *subtype_name) +{ + return get_string_value(sdp_msg_payload_type_names, subtype_name); +} + +/* Parse a line like 'm=audio 16398 RTP/AVP 0 3 8 96 112', starting after the '=' */ +static int sdp_parse_media_description(struct sdp_msg *sdp, const char *src) +{ + unsigned int port; + int i; + const char *payload_type_str; + const char *line_end = sdp_msg_line_end(src); + if (sscanf(src, "audio %u RTP/AVP", &port) < 1) + return -ENOTSUP; + + if (port < 0 || port > 0xffff) + return -EINVAL; + + sdp->rtp.port = port; + + /* skip "audio 12345 RTP/AVP ", i.e. 3 spaces on */ + payload_type_str = src; + for (i = 0; i < 3; i++) { + payload_type_str = strchr(payload_type_str, ' '); + if (!payload_type_str) + return -EINVAL; + while (*payload_type_str == ' ') + payload_type_str++; + if (payload_type_str >= line_end) + return -EINVAL; + } + + /* Parse listing of payload type numbers after "RTP/AVP" */ + while (payload_type_str < line_end) { + unsigned int payload_type; + struct sdp_audio_codec *codec; + const char *subtype_name; + if (sscanf(payload_type_str, "%u", &payload_type) < 1) + return -EINVAL; + + codec = sdp_audio_codec_by_payload_type(&sdp->audio_codecs, payload_type, true); + if (!codec) + return -ENOSPC; + + /* Fill in subtype name for fixed payload types */ + subtype_name = get_value_string_or_null(sdp_msg_payload_type_names, codec->payload_type); + if (subtype_name) + OSMO_STRLCPY_ARRAY(codec->subtype_name, subtype_name); + + payload_type_str = strchr(payload_type_str, ' '); + if (!payload_type_str) + payload_type_str = line_end; + while (*payload_type_str == ' ') + payload_type_str++; + } + + return 0; +} + +/* parse a line like 'c=IN IP4 192.168.11.151' starting after the '=' */ +static int sdp_parse_connection_info(struct sdp_msg *sdp, const char *src) +{ + char ipv[10]; + char addr_str[INET6_ADDRSTRLEN]; + if (sscanf(src, "IN %s %s", ipv, addr_str) < 2) + return -EINVAL; + + /* supporting only IPv4 */ + if (strcmp(ipv, "IP4")) + return -ENOTSUP; + + osmo_sockaddr_str_from_str(&sdp->rtp, addr_str, sdp->rtp.port); + return 0; +} + +/* Parse SDP string into struct sdp_msg. Return 0 on success, negative on error. */ +int sdp_msg_from_str(struct sdp_msg *sdp, const char *src) +{ + const char *pos; + *sdp = (struct sdp_msg){}; + + for (pos = src; pos && *pos; pos++) { + char attrib; + int rc = 0; + + if (*pos == '\r' || *pos == '\n') + continue; + + /* Expecting only lines starting with 'X='. Not being too strict about it is probably alright. */ + if (pos[1] != '=') + goto next_line; + + attrib = *pos; + pos += 2; + switch (attrib) { + /* a=... */ + case 'a': + rc = sdp_parse_attrib(sdp, pos); + break; + case 'm': + rc = sdp_parse_media_description(sdp, pos); + break; + case 'c': + rc = sdp_parse_connection_info(sdp, pos); + break; + default: + /* ignore any other parameters */ + break; + } + + if (rc) { + size_t line_len; + const char *line_end = sdp_msg_line_end(pos); + pos -= 2; + line_len = line_end - pos; + switch (rc) { + case -EINVAL: + LOGP(DMNCC, LOGL_ERROR, + "Failed to parse SDP: invalid line: %s\n", osmo_quote_str(pos, line_len)); + break; + case -ENOSPC: + LOGP(DMNCC, LOGL_ERROR, + "Failed to parse SDP: no more space for: %s\n", osmo_quote_str(pos, line_len)); + break; + case -ENOTSUP: + LOGP(DMNCC, LOGL_ERROR, + "Failed to parse SDP: not supported: %s\n", osmo_quote_str(pos, line_len)); + break; + default: + LOGP(DMNCC, LOGL_ERROR, + "Failed to parse SDP: %s\n", osmo_quote_str(pos, line_len)); + break; + } + return rc; + } +next_line: + pos = strstr(pos, "\r\n"); + if (!pos) + break; + } + + return 0; +} + +/* Leave only those codecs in 'ac_dest' that are also present in 'ac_other'. + * The matching is made by sdp_audio_codec_cmp(), i.e. payload_type numbers are not compared and fmtp parameters are + * compared 1:1 as plain strings. + * If translate_payload_type_numbers has an effect if ac_dest and ac_other have mismatching payload_type numbers for the + * same SDP codec descriptions. If translate_payload_type_numbers is true, take the payload_type numbers from ac_other. + * If false, keep payload_type numbers in ac_dest unchanged. */ +void sdp_audio_codecs_intersection(struct sdp_audio_codecs *ac_dest, const struct sdp_audio_codecs *ac_other, + bool translate_payload_type_numbers) +{ + int i; + for (i = 0; i < ac_dest->count; i++) { + struct sdp_audio_codec *codec = &ac_dest->codec[i]; + struct sdp_audio_codec *other; + OSMO_ASSERT(i < ARRAY_SIZE(ac_dest->codec)); + + other = sdp_audio_codec_by_descr((struct sdp_audio_codecs*)ac_other, codec); + + if (!other) { + OSMO_ASSERT(sdp_audio_codec_remove(ac_dest, codec) == 0); + i--; + continue; + } + + /* Doing payload_type number translation of part of the intersection because it makes the algorithm + * simpler: we already know ac_dest is a subset of ac_other, and there is no need to resolve payload + * type number conflicts. */ + if (translate_payload_type_numbers) + codec->payload_type = other->payload_type; + } +} + +/* Make sure the given codec is listed as the first codec. 'codec' must be an actual codec entry of the given audio + * codecs list. */ +void sdp_audio_codecs_select(struct sdp_audio_codecs *ac, struct sdp_audio_codec *codec) +{ + struct sdp_audio_codec tmp; + struct sdp_audio_codec *pos; + OSMO_ASSERT((codec >= ac->codec) + && ((codec - ac->codec) < OSMO_MIN(ac->count, ARRAY_SIZE(ac->codec)))); + + /* Already the first? */ + if (codec == ac->codec) + return; + + tmp = *codec; + for (pos = codec - 1; pos >= ac->codec; pos--) + pos[1] = pos[0]; + + ac->codec[0] = tmp; + return; +} + +/* Short single-line representation of an SDP audio codec, convenient for logging. + * Like "AMR/8000:octet-align=1#122" */ +int sdp_audio_codec_name_buf(char *buf, size_t buflen, const struct sdp_audio_codec *codec) +{ + struct osmo_strbuf sb = { .buf = buf, .len = buflen }; + OSMO_STRBUF_PRINTF(sb, "%s", codec->subtype_name); + if (codec->fmtp[0]) + OSMO_STRBUF_PRINTF(sb, ":%s", codec->fmtp); + return sb.chars_needed; +} + +char *sdp_audio_codec_name_c(void *ctx, const struct sdp_audio_codec *codec) +{ + OSMO_NAME_C_IMPL(ctx, 32, "sdp_audio_codec_name_c-ERROR", sdp_audio_codec_name_buf, codec) +} + +const char *sdp_audio_codec_name(const struct sdp_audio_codec *codec) +{ + return sdp_audio_codec_name_c(OTC_SELECT, codec); +} + +/* Short single-line representation of a list of SDP audio codecs, convenient for logging */ +int sdp_audio_codecs_name_buf(char *buf, size_t buflen, const struct sdp_audio_codecs *ac) +{ + struct osmo_strbuf sb = { .buf = buf, .len = buflen }; + const struct sdp_audio_codec *codec; + if (!ac->count) + OSMO_STRBUF_PRINTF(sb, "(no-codecs)"); + foreach_sdp_audio_codec(codec, ac) { + bool first = (codec == ac->codec); + if (!first) + OSMO_STRBUF_PRINTF(sb, ","); + OSMO_STRBUF_APPEND(sb, sdp_audio_codec_name_buf, codec); + } + return sb.chars_needed; +} + +char *sdp_audio_codecs_name_c(void *ctx, const struct sdp_audio_codecs *ac) +{ + OSMO_NAME_C_IMPL(ctx, 128, "sdp_audio_codecs_name_c-ERROR", sdp_audio_codecs_name_buf, ac) +} + +const char *sdp_audio_codecs_name(const struct sdp_audio_codecs *ac) +{ + return sdp_audio_codecs_name_c(OTC_SELECT, ac); +} + +/* Short single-line representation of an SDP message, convenient for logging */ +int sdp_msg_name_buf(char *buf, size_t buflen, const struct sdp_msg *sdp) +{ + struct osmo_strbuf sb = { .buf = buf, .len = buflen }; + if (!sdp) { + OSMO_STRBUF_PRINTF(sb, "NULL"); + return sb.chars_needed; + } + + OSMO_STRBUF_PRINTF(sb, OSMO_SOCKADDR_STR_FMT, OSMO_SOCKADDR_STR_FMT_ARGS(&sdp->rtp)); + OSMO_STRBUF_PRINTF(sb, "{"); + OSMO_STRBUF_APPEND(sb, sdp_audio_codecs_name_buf, &sdp->audio_codecs); + OSMO_STRBUF_PRINTF(sb, "}"); + return sb.chars_needed; +} + +char *sdp_msg_name_c(void *ctx, const struct sdp_msg *sdp) +{ + OSMO_NAME_C_IMPL(ctx, 128, "sdp_msg_name_c-ERROR", sdp_msg_name_buf, sdp) +} + +const char *sdp_msg_name(const struct sdp_msg *sdp) +{ + return sdp_msg_name_c(OTC_SELECT, sdp); +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 27c1205..864ac7c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,6 +2,7 @@ sms_queue \ msc_vlr \ db_sms \ + sdp_msg \ $(NULL) if BUILD_SMPP diff --git a/tests/sdp_msg/Makefile.am b/tests/sdp_msg/Makefile.am new file mode 100644 index 0000000..7d8def9 --- /dev/null +++ b/tests/sdp_msg/Makefile.am @@ -0,0 +1,32 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + -ggdb3 \ + $(LIBOSMOCORE_CFLAGS) \ + $(NULL) + +LDADD = \ + $(top_builddir)/src/libmsc/libmsc.a \ + $(LIBOSMOCORE_LIBS) \ + $(NULL) + +EXTRA_DIST = \ + sdp_msg_test.ok \ + sdp_msg_test.err \ + $(NULL) + +noinst_PROGRAMS = \ + sdp_msg_test \ + $(NULL) + +sdp_msg_test_SOURCES = \ + sdp_msg_test.c \ + $(NULL) + +.PHONY: update_exp +update_exp: + $(builddir)/sdp_msg_test >$(srcdir)/sdp_msg_test.ok 2>$(srcdir)/sdp_msg_test.err diff --git a/tests/sdp_msg/sdp_msg_test.c b/tests/sdp_msg/sdp_msg_test.c new file mode 100644 index 0000000..b97127a --- /dev/null +++ b/tests/sdp_msg/sdp_msg_test.c @@ -0,0 +1,569 @@ +#include +#include +#include +#include + +struct sdp_test_data { + const char *sdp_input; + const char *expect_sdp_str; +}; + +static void dump_sdp(const char *str, const char *prefix) +{ + while (str && *str) { + const char *line_end = sdp_msg_line_end(str); + while (*line_end == '\r' || *line_end == '\n') + line_end++; + printf("%s%s\n", prefix, osmo_escape_str(str, line_end - str)); + str = line_end; + } +} + +struct sdp_test_data sdp_tests[] = { + { + "v=0\r\n" + "o=- 5628250 5628250 IN IP4 192.168.11.121\r\n" + "s=-\r\n" + "c=IN IP4 192.168.11.121\r\n" + "t=0 0\r\n" + "m=audio 10020 RTP/AVP 18 0 2 4 8 96 97 98 100 101\r\n" + "a=rtpmap:18 G729/8000\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:2 G726-32/8000\r\n" + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:8 PCMA/8000\r\n" + "a=rtpmap:96 G726-40/8000\r\n" + "a=rtpmap:97 G726-24/8000\r\n" + "a=rtpmap:98 G726-16/8000\r\n" + "a=rtpmap:100 NSE/8000\r\n" + "a=fmtp:100 192-193\r\n" + "a=rtpmap:101 telephone-event/8000\r\n" + "a=fmtp:101 0-15\r\n" + "a=ptime:20\r\n" + "a=sendrecv\r\n" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 192.168.11.121\r\n" + "s=GSM Call\r\n" + "c=IN IP4 192.168.11.121\r\n" + "t=0 0\r\n" + "m=audio 10020 RTP/AVP 18 0 2 4 8 96 97 98 100 101\r\n" + "a=rtpmap:18 G729/8000\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:2 G726-32/8000\r\n" + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:8 PCMA/8000\r\n" + "a=rtpmap:96 G726-40/8000\r\n" + "a=rtpmap:97 G726-24/8000\r\n" + "a=rtpmap:98 G726-16/8000\r\n" + "a=rtpmap:100 NSE/8000\r\n" + "a=fmtp:100 192-193\r\n" + "a=rtpmap:101 telephone-event/8000\r\n" + "a=fmtp:101 0-15\r\n" + "a=ptime:20\r\n" + , + }, + { + "v=0\r\n" + "o=FooBar 1565090289 1565090290 IN IP4 192.168.11.151\r\n" + "s=FooBar\r\n" + "c=IN IP4 192.168.11.151\r\n" + "t=0 0\r\n" + "m=audio 16398 RTP/AVP 98\r\n" + "a=rtpmap:98 AMR/8000\r\n" + "a=fmtp:98 octet-align=1; mode-set=4\r\n" + "a=ptime:20\r\n" + "a=rtcp:16399 IN IP4 192.168.11.151\r\n" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 192.168.11.151\r\n" + "s=GSM Call\r\n" + "c=IN IP4 192.168.11.151\r\n" + "t=0 0\r\n" + "m=audio 16398 RTP/AVP 98\r\n" + "a=rtpmap:98 AMR/8000\r\n" + "a=fmtp:98 octet-align=1; mode-set=4\r\n" + "a=ptime:20\r\n" + , + }, + { + "v=0\r\n" + "o=FooBar 1565090289 1565090290 IN IP4 192.168.11.151\r\n" + "s=FooBar\r\n" + "c=IN IP4 192.168.11.140\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 18 0 4 8 101\r\n" + "a=rtpmap:18 G729/8000\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:8 PCMA/8000\r\n" + "a=rtpmap:101 telephone-event/8000\r\n" + "a=fmtp:101 0-15\r\n" + "a=sendrecv\r\n" + "a=rtcp:30437\r\n" + "a=ptime:20\r\n" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 192.168.11.140\r\n" /* <- NOTE: loses the 'o=' address, uses only 'c=' */ + "s=GSM Call\r\n" + "c=IN IP4 192.168.11.140\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 18 0 4 8 101\r\n" + "a=rtpmap:18 G729/8000\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:8 PCMA/8000\r\n" + "a=rtpmap:101 telephone-event/8000\r\n" + "a=fmtp:101 0-15\r\n" + "a=ptime:20\r\n" + , + }, +}; + +void test_parse_and_compose() +{ + int i; + bool ok = true; + + printf("\n\n%s\n", __func__); + + for (i = 0; i < ARRAY_SIZE(sdp_tests); i++) { + struct sdp_test_data *t = &sdp_tests[i]; + struct sdp_msg sdp = {}; + char str[1024]; + printf("\n[%d]\n", i); + dump_sdp(t->sdp_input, "sdp input: "); + + sdp_msg_from_str(&sdp, t->sdp_input); + sdp_msg_to_str(str, sizeof(str), &sdp); + + dump_sdp(str, "sdp_msg_to_str: "); + if (strcmp(str, t->expect_sdp_str)) { + int j; + ok = false; + printf("ERROR:\n"); + dump_sdp(t->expect_sdp_str, "expect_sdp_str: "); + for (j = 0; t->expect_sdp_str[j]; j++) { + if (t->expect_sdp_str[j] != str[j]) { + printf("ERROR at position %d, at:\n", j); + dump_sdp(str + j, " mismatch: "); + break; + } + } + } else + printf("[%d] ok\n", i); + } + + OSMO_ASSERT(ok); +} + +struct sdp_intersect_test_data { + const char *descr; + const char *sdp_a; + const char *sdp_b; + const char *expect_intersection; +}; + +#define SDP_1 \ + "v=0\r\n" \ + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" \ + "s=GSM Call\r\n" \ + "c=IN IP4 23.42.23.42\r\n" \ + "t=0 0\r\n" \ + "m=audio 30436 RTP/AVP 112 3 111 110\r\n" \ + "a=rtpmap:112 AMR/8000\r\n" \ + "a=fmtp:112 octet-align=1\r\n" \ + "a=rtpmap:3 GSM/8000\r\n" \ + "a=rtpmap:111 GSM-HR-08/8000\r\n" \ + "a=rtpmap:110 GSM-EFR/8000\r\n" \ + "a=ptime:20\r\n" + +#define SDP_2 \ + "v=0\r\n" \ + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" \ + "s=GSM Call\r\n" \ + "c=IN IP4 23.42.23.42\r\n" \ + "t=0 0\r\n" \ + "m=audio 30436 RTP/AVP 112 110\r\n" \ + "a=rtpmap:112 AMR/8000\r\n" \ + "a=fmtp:112 octet-align=1\r\n" \ + "a=rtpmap:110 GSM-EFR/8000\r\n" \ + "a=ptime:20\r\n" + +#define SDP_3 \ + "v=0\r\n" \ + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" \ + "s=GSM Call\r\n" \ + "c=IN IP4 23.42.23.42\r\n" \ + "t=0 0\r\n" \ + "m=audio 30436 RTP/AVP 3 111\r\n" \ + "a=rtpmap:3 GSM/8000\r\n" \ + "a=rtpmap:111 GSM-HR-08/8000\r\n" \ + "a=ptime:20\r\n" + + +struct sdp_intersect_test_data sdp_intersect_tests[] = { + { + "identical codecs lead to no change" + , + SDP_1 + , + "c=IN IP4 5.6.7.8\r\n" \ + "m=audio 12345 RTP/AVP 112 3 111 110\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + , + SDP_1 + }, + { + "identical codecs in different order also lead to no change" + , + SDP_1 + , + "c=IN IP4 5.6.7.8\r\n" \ + "m=audio 12345 RTP/AVP 3 110 111 112\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + , + SDP_1 + }, + { + "identical codecs with mismatching payload type numbers also lead to no change" + , + SDP_1 + , + "c=IN IP4 5.6.7.8\r\n" \ + "m=audio 12345 RTP/AVP 96 97 98 99\r\n" + "a=rtpmap:96 GSM/8000\r\n" + "a=rtpmap:97 GSM-EFR/8000\r\n" + "a=rtpmap:98 GSM-HR-08/8000\r\n" + "a=rtpmap:99 AMR/8000\r\n" + "a=fmtp:99 octet-align=1\r\n" + , + SDP_1 + }, + { + "identical codecs plus some extra codecs also lead to no change" + , + SDP_1 + , + "c=IN IP4 5.6.7.8\r\n" \ + "m=audio 12345 RTP/AVP 8 0 96 97 98 99\r\n" + "a=rtpmap:8 PCMA/8000\r\n" + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:96 GSM/8000\r\n" + "a=rtpmap:97 GSM-EFR/8000\r\n" + "a=rtpmap:98 GSM-HR-08/8000\r\n" + "a=rtpmap:99 AMR/8000\r\n" + "a=fmtp:99 octet-align=1\r\n" + , + SDP_1 + }, + { + "some codecs removed", + SDP_1, + SDP_2, + SDP_2, + }, + { + "other codecs removed", + SDP_1, + SDP_3, + SDP_3, + }, + { + "all codecs removed", + SDP_1 + , + "s=empty" + , + "v=0\r\n" \ + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" \ + "s=GSM Call\r\n" \ + "c=IN IP4 23.42.23.42\r\n" \ + "t=0 0\r\n" \ + "m=audio 30436 RTP/AVP\r\n" \ + "a=ptime:20\r\n" + }, + { + "some real world test case" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n" + "s=GSM Call\r\n" + "c=IN IP4 0.0.0.0\r\n" + "t=0 0\r\n" + "m=audio 0 RTP/AVP 112 113 110 3 111\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n" + "a=rtpmap:113 AMR-WB/8000\r\n" + "a=fmtp:113 octet-align=1\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=ptime:20\r\n" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n" + "s=GSM Call\r\n" + "c=IN IP4 0.0.0.0\r\n" + "t=0 0\r\n" + "m=audio 0 RTP/AVP 112 113 110 3 111\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n" + "a=rtpmap:113 AMR-WB/8000\r\n" + "a=fmtp:113 octet-align=1\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=ptime:20\r\n" + , + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n" + "s=GSM Call\r\n" + "c=IN IP4 0.0.0.0\r\n" + "t=0 0\r\n" + "m=audio 0 RTP/AVP 112 113 110 3 111\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n" + "a=rtpmap:113 AMR-WB/8000\r\n" + "a=fmtp:113 octet-align=1\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=ptime:20\r\n" + } +}; + +const char *sdp_msg_logstr(const struct sdp_msg *sdp) +{ + static char buf[1024]; + sdp_msg_to_str(buf, sizeof(buf), sdp); + return buf; +} + +static void test_intersect() +{ + int i; + bool ok = true; + int rc; + + printf("\n\n%s\n", __func__); + + for (i = 0; i < ARRAY_SIZE(sdp_intersect_tests); i++) { + struct sdp_intersect_test_data *t = &sdp_intersect_tests[i]; + struct sdp_msg sdp_a = {}; + struct sdp_msg sdp_b = {}; + char str[1024]; + printf("\n[%d] %s\n", i, t->descr); + dump_sdp(t->sdp_a, "SDP A: "); + dump_sdp(t->sdp_b, " SDP B: "); + + rc = sdp_msg_from_str(&sdp_a, t->sdp_a); + if (rc) { + printf("ERROR parsing SDP A: %d\n", rc); + break; + } + dump_sdp(sdp_msg_logstr(&sdp_a), "parsed SDP A: "); + rc = sdp_msg_from_str(&sdp_b, t->sdp_b); + if (rc) { + printf("ERROR parsing SDP A: %d\n", rc); + break; + } + dump_sdp(sdp_msg_logstr(&sdp_b), "parsed SDP B: "); + sdp_audio_codecs_intersection(&sdp_a.audio_codecs, &sdp_b.audio_codecs, false); + sdp_msg_to_str(str, sizeof(str), &sdp_a); + + dump_sdp(str, "sdp_msg_intersection(a,b): "); + if (strcmp(str, t->expect_intersection)) { + int j; + ok = false; + printf("ERROR:\n"); + dump_sdp(t->expect_intersection, "expect_intersection: "); + for (j = 0; t->expect_intersection[j]; j++) { + if (t->expect_intersection[j] != str[j]) { + printf("ERROR at position %d, at:\n", j); + dump_sdp(str + j, " mismatch: "); + break; + } + } + } else + printf("[%d] ok\n", i); + } + + OSMO_ASSERT(ok); +} + +struct sdp_select_test_data { + const char *sdp; + unsigned int select_payload_type; + const char *expect_sdp; +}; + +struct sdp_select_test_data sdp_select_tests[] = { + { + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 112 3 111 110\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + , + 112, + NULL + }, + { + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 112 3 111 110\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + , + 3, + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 3 112 111 110\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + }, + { + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 112 3 111 110\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + , + 111, + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 111 112 3 110\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + }, + { + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 112 3 111 110\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=ptime:20\r\n" + , + 110, + "v=0\r\n" + "o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n" + "s=GSM Call\r\n" + "c=IN IP4 23.42.23.42\r\n" + "t=0 0\r\n" + "m=audio 30436 RTP/AVP 110 112 3 111\r\n" + "a=rtpmap:110 GSM-EFR/8000\r\n" + "a=rtpmap:112 AMR/8000\r\n" + "a=fmtp:112 octet-align=1\r\n" + "a=rtpmap:3 GSM/8000\r\n" + "a=rtpmap:111 GSM-HR-08/8000\r\n" + "a=ptime:20\r\n" + }, + +}; + +static void test_select() +{ + int i; + bool ok = true; + int rc; + + printf("\n\n%s\n", __func__); + + for (i = 0; i < ARRAY_SIZE(sdp_select_tests); i++) { + struct sdp_select_test_data *t = &sdp_select_tests[i]; + struct sdp_msg sdp = {}; + struct sdp_audio_codec *codec; + char buf[1024]; + printf("\n[%d]\n", i); + rc = sdp_msg_from_str(&sdp, t->sdp); + if (rc) { + printf("ERROR parsing SDP: %d\n", rc); + break; + } + printf("SDP: %s\n", sdp_audio_codecs_name(&sdp.audio_codecs)); + codec = sdp_audio_codec_by_payload_type(&sdp.audio_codecs, t->select_payload_type, false); + OSMO_ASSERT(codec); + printf("Select: %s\n", sdp_audio_codec_name(codec)); + + sdp_audio_codecs_select(&sdp.audio_codecs, codec); + + printf("SDP: %s\n", sdp_audio_codecs_name(&sdp.audio_codecs)); + sdp_msg_to_str(buf, sizeof(buf), &sdp); + + if (strcmp(buf, t->expect_sdp ? : t->sdp)) { + int j; + ok = false; + printf("ERROR:\n"); + dump_sdp(buf, "selection result: "); + dump_sdp(t->expect_sdp, "expect result: "); + for (j = 0; t->expect_sdp[j]; j++) { + if (t->expect_sdp[j] != buf[j]) { + printf("ERROR at position %d, at:\n", j); + dump_sdp(buf + j, " mismatch: "); + break; + } + } + } else + printf("[%d] ok\n", i); + } + + OSMO_ASSERT(ok); +} + +int main(void) +{ + test_parse_and_compose(); + test_intersect(); + test_select(); + return 0; +} diff --git a/tests/sdp_msg/sdp_msg_test.err b/tests/sdp_msg/sdp_msg_test.err new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/sdp_msg/sdp_msg_test.err diff --git a/tests/sdp_msg/sdp_msg_test.ok b/tests/sdp_msg/sdp_msg_test.ok new file mode 100644 index 0000000..a7a3d51 --- /dev/null +++ b/tests/sdp_msg/sdp_msg_test.ok @@ -0,0 +1,590 @@ + + +test_parse_and_compose + +[0] +sdp input: v=0\r\n +sdp input: o=- 5628250 5628250 IN IP4 192.168.11.121\r\n +sdp input: s=-\r\n +sdp input: c=IN IP4 192.168.11.121\r\n +sdp input: t=0 0\r\n +sdp input: m=audio 10020 RTP/AVP 18 0 2 4 8 96 97 98 100 101\r\n +sdp input: a=rtpmap:18 G729/8000\r\n +sdp input: a=rtpmap:0 PCMU/8000\r\n +sdp input: a=rtpmap:2 G726-32/8000\r\n +sdp input: a=rtpmap:4 G723/8000\r\n +sdp input: a=rtpmap:8 PCMA/8000\r\n +sdp input: a=rtpmap:96 G726-40/8000\r\n +sdp input: a=rtpmap:97 G726-24/8000\r\n +sdp input: a=rtpmap:98 G726-16/8000\r\n +sdp input: a=rtpmap:100 NSE/8000\r\n +sdp input: a=fmtp:100 192-193\r\n +sdp input: a=rtpmap:101 telephone-event/8000\r\n +sdp input: a=fmtp:101 0-15\r\n +sdp input: a=ptime:20\r\n +sdp input: a=sendrecv\r\n +sdp_msg_to_str: v=0\r\n +sdp_msg_to_str: o=OsmoMSC 0 0 IN IP4 192.168.11.121\r\n +sdp_msg_to_str: s=GSM Call\r\n +sdp_msg_to_str: c=IN IP4 192.168.11.121\r\n +sdp_msg_to_str: t=0 0\r\n +sdp_msg_to_str: m=audio 10020 RTP/AVP 18 0 2 4 8 96 97 98 100 101\r\n +sdp_msg_to_str: a=rtpmap:18 G729/8000\r\n +sdp_msg_to_str: a=rtpmap:0 PCMU/8000\r\n +sdp_msg_to_str: a=rtpmap:2 G726-32/8000\r\n +sdp_msg_to_str: a=rtpmap:4 G723/8000\r\n +sdp_msg_to_str: a=rtpmap:8 PCMA/8000\r\n +sdp_msg_to_str: a=rtpmap:96 G726-40/8000\r\n +sdp_msg_to_str: a=rtpmap:97 G726-24/8000\r\n +sdp_msg_to_str: a=rtpmap:98 G726-16/8000\r\n +sdp_msg_to_str: a=rtpmap:100 NSE/8000\r\n +sdp_msg_to_str: a=fmtp:100 192-193\r\n +sdp_msg_to_str: a=rtpmap:101 telephone-event/8000\r\n +sdp_msg_to_str: a=fmtp:101 0-15\r\n +sdp_msg_to_str: a=ptime:20\r\n +[0] ok + +[1] +sdp input: v=0\r\n +sdp input: o=FooBar 1565090289 1565090290 IN IP4 192.168.11.151\r\n +sdp input: s=FooBar\r\n +sdp input: c=IN IP4 192.168.11.151\r\n +sdp input: t=0 0\r\n +sdp input: m=audio 16398 RTP/AVP 98\r\n +sdp input: a=rtpmap:98 AMR/8000\r\n +sdp input: a=fmtp:98 octet-align=1; mode-set=4\r\n +sdp input: a=ptime:20\r\n +sdp input: a=rtcp:16399 IN IP4 192.168.11.151\r\n +sdp_msg_to_str: v=0\r\n +sdp_msg_to_str: o=OsmoMSC 0 0 IN IP4 192.168.11.151\r\n +sdp_msg_to_str: s=GSM Call\r\n +sdp_msg_to_str: c=IN IP4 192.168.11.151\r\n +sdp_msg_to_str: t=0 0\r\n +sdp_msg_to_str: m=audio 16398 RTP/AVP 98\r\n +sdp_msg_to_str: a=rtpmap:98 AMR/8000\r\n +sdp_msg_to_str: a=fmtp:98 octet-align=1; mode-set=4\r\n +sdp_msg_to_str: a=ptime:20\r\n +[1] ok + +[2] +sdp input: v=0\r\n +sdp input: o=FooBar 1565090289 1565090290 IN IP4 192.168.11.151\r\n +sdp input: s=FooBar\r\n +sdp input: c=IN IP4 192.168.11.140\r\n +sdp input: t=0 0\r\n +sdp input: m=audio 30436 RTP/AVP 18 0 4 8 101\r\n +sdp input: a=rtpmap:18 G729/8000\r\n +sdp input: a=rtpmap:0 PCMU/8000\r\n +sdp input: a=rtpmap:4 G723/8000\r\n +sdp input: a=rtpmap:8 PCMA/8000\r\n +sdp input: a=rtpmap:101 telephone-event/8000\r\n +sdp input: a=fmtp:101 0-15\r\n +sdp input: a=sendrecv\r\n +sdp input: a=rtcp:30437\r\n +sdp input: a=ptime:20\r\n +sdp_msg_to_str: v=0\r\n +sdp_msg_to_str: o=OsmoMSC 0 0 IN IP4 192.168.11.140\r\n +sdp_msg_to_str: s=GSM Call\r\n +sdp_msg_to_str: c=IN IP4 192.168.11.140\r\n +sdp_msg_to_str: t=0 0\r\n +sdp_msg_to_str: m=audio 30436 RTP/AVP 18 0 4 8 101\r\n +sdp_msg_to_str: a=rtpmap:18 G729/8000\r\n +sdp_msg_to_str: a=rtpmap:0 PCMU/8000\r\n +sdp_msg_to_str: a=rtpmap:4 G723/8000\r\n +sdp_msg_to_str: a=rtpmap:8 PCMA/8000\r\n +sdp_msg_to_str: a=rtpmap:101 telephone-event/8000\r\n +sdp_msg_to_str: a=fmtp:101 0-15\r\n +sdp_msg_to_str: a=ptime:20\r\n +[2] ok + + +test_intersect + +[0] identical codecs lead to no change +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: c=IN IP4 5.6.7.8\r\n + SDP B: m=audio 12345 RTP/AVP 112 3 111 110\r\n + SDP B: a=rtpmap:112 AMR/8000\r\n + SDP B: a=fmtp:112 octet-align=1\r\n + SDP B: a=rtpmap:3 GSM/8000\r\n + SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n + SDP B: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 5.6.7.8\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 5.6.7.8\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 12345 RTP/AVP 112 3 111 110\r\n +parsed SDP B: a=rtpmap:112 AMR/8000\r\n +parsed SDP B: a=fmtp:112 octet-align=1\r\n +parsed SDP B: a=rtpmap:3 GSM/8000\r\n +parsed SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP B: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 112 3 111 110\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[0] ok + +[1] identical codecs in different order also lead to no change +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: c=IN IP4 5.6.7.8\r\n + SDP B: m=audio 12345 RTP/AVP 3 110 111 112\r\n + SDP B: a=rtpmap:3 GSM/8000\r\n + SDP B: a=rtpmap:110 GSM-EFR/8000\r\n + SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n + SDP B: a=rtpmap:112 AMR/8000\r\n + SDP B: a=fmtp:112 octet-align=1\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 5.6.7.8\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 5.6.7.8\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 12345 RTP/AVP 3 110 111 112\r\n +parsed SDP B: a=rtpmap:3 GSM/8000\r\n +parsed SDP B: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP B: a=rtpmap:112 AMR/8000\r\n +parsed SDP B: a=fmtp:112 octet-align=1\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 112 3 111 110\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[1] ok + +[2] identical codecs with mismatching payload type numbers also lead to no change +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: c=IN IP4 5.6.7.8\r\n + SDP B: m=audio 12345 RTP/AVP 96 97 98 99\r\n + SDP B: a=rtpmap:96 GSM/8000\r\n + SDP B: a=rtpmap:97 GSM-EFR/8000\r\n + SDP B: a=rtpmap:98 GSM-HR-08/8000\r\n + SDP B: a=rtpmap:99 AMR/8000\r\n + SDP B: a=fmtp:99 octet-align=1\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 5.6.7.8\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 5.6.7.8\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 12345 RTP/AVP 96 97 98 99\r\n +parsed SDP B: a=rtpmap:96 GSM/8000\r\n +parsed SDP B: a=rtpmap:97 GSM-EFR/8000\r\n +parsed SDP B: a=rtpmap:98 GSM-HR-08/8000\r\n +parsed SDP B: a=rtpmap:99 AMR/8000\r\n +parsed SDP B: a=fmtp:99 octet-align=1\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 112 3 111 110\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[2] ok + +[3] identical codecs plus some extra codecs also lead to no change +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: c=IN IP4 5.6.7.8\r\n + SDP B: m=audio 12345 RTP/AVP 8 0 96 97 98 99\r\n + SDP B: a=rtpmap:8 PCMA/8000\r\n + SDP B: a=rtpmap:0 PCMU/8000\r\n + SDP B: a=rtpmap:96 GSM/8000\r\n + SDP B: a=rtpmap:97 GSM-EFR/8000\r\n + SDP B: a=rtpmap:98 GSM-HR-08/8000\r\n + SDP B: a=rtpmap:99 AMR/8000\r\n + SDP B: a=fmtp:99 octet-align=1\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 5.6.7.8\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 5.6.7.8\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 12345 RTP/AVP 8 0 96 97 98 99\r\n +parsed SDP B: a=rtpmap:8 PCMA/8000\r\n +parsed SDP B: a=rtpmap:0 PCMU/8000\r\n +parsed SDP B: a=rtpmap:96 GSM/8000\r\n +parsed SDP B: a=rtpmap:97 GSM-EFR/8000\r\n +parsed SDP B: a=rtpmap:98 GSM-HR-08/8000\r\n +parsed SDP B: a=rtpmap:99 AMR/8000\r\n +parsed SDP B: a=fmtp:99 octet-align=1\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 112 3 111 110\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[3] ok + +[4] some codecs removed +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: v=0\r\n + SDP B: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n + SDP B: s=GSM Call\r\n + SDP B: c=IN IP4 23.42.23.42\r\n + SDP B: t=0 0\r\n + SDP B: m=audio 30436 RTP/AVP 112 110\r\n + SDP B: a=rtpmap:112 AMR/8000\r\n + SDP B: a=fmtp:112 octet-align=1\r\n + SDP B: a=rtpmap:110 GSM-EFR/8000\r\n + SDP B: a=ptime:20\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 23.42.23.42\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 30436 RTP/AVP 112 110\r\n +parsed SDP B: a=rtpmap:112 AMR/8000\r\n +parsed SDP B: a=fmtp:112 octet-align=1\r\n +parsed SDP B: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 112 110\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[4] ok + +[5] other codecs removed +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: v=0\r\n + SDP B: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n + SDP B: s=GSM Call\r\n + SDP B: c=IN IP4 23.42.23.42\r\n + SDP B: t=0 0\r\n + SDP B: m=audio 30436 RTP/AVP 3 111\r\n + SDP B: a=rtpmap:3 GSM/8000\r\n + SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n + SDP B: a=ptime:20\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 23.42.23.42\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 30436 RTP/AVP 3 111\r\n +parsed SDP B: a=rtpmap:3 GSM/8000\r\n +parsed SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP 3 111\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[5] ok + +[6] all codecs removed +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 23.42.23.42\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: s=empty +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 23.42.23.42\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 30436 RTP/AVP 112 3 111 110\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 0.0.0.0\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 0 RTP/AVP\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 23.42.23.42\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 30436 RTP/AVP\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[6] ok + +[7] some real world test case +SDP A: v=0\r\n +SDP A: o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n +SDP A: s=GSM Call\r\n +SDP A: c=IN IP4 0.0.0.0\r\n +SDP A: t=0 0\r\n +SDP A: m=audio 0 RTP/AVP 112 113 110 3 111\r\n +SDP A: a=rtpmap:112 AMR/8000\r\n +SDP A: a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n +SDP A: a=rtpmap:113 AMR-WB/8000\r\n +SDP A: a=fmtp:113 octet-align=1\r\n +SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +SDP A: a=rtpmap:3 GSM/8000\r\n +SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +SDP A: a=ptime:20\r\n + SDP B: v=0\r\n + SDP B: o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n + SDP B: s=GSM Call\r\n + SDP B: c=IN IP4 0.0.0.0\r\n + SDP B: t=0 0\r\n + SDP B: m=audio 0 RTP/AVP 112 113 110 3 111\r\n + SDP B: a=rtpmap:112 AMR/8000\r\n + SDP B: a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n + SDP B: a=rtpmap:113 AMR-WB/8000\r\n + SDP B: a=fmtp:113 octet-align=1\r\n + SDP B: a=rtpmap:110 GSM-EFR/8000\r\n + SDP B: a=rtpmap:3 GSM/8000\r\n + SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n + SDP B: a=ptime:20\r\n +parsed SDP A: v=0\r\n +parsed SDP A: o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n +parsed SDP A: s=GSM Call\r\n +parsed SDP A: c=IN IP4 0.0.0.0\r\n +parsed SDP A: t=0 0\r\n +parsed SDP A: m=audio 0 RTP/AVP 112 113 110 3 111\r\n +parsed SDP A: a=rtpmap:112 AMR/8000\r\n +parsed SDP A: a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n +parsed SDP A: a=rtpmap:113 AMR-WB/8000\r\n +parsed SDP A: a=fmtp:113 octet-align=1\r\n +parsed SDP A: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP A: a=rtpmap:3 GSM/8000\r\n +parsed SDP A: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP A: a=ptime:20\r\n +parsed SDP B: v=0\r\n +parsed SDP B: o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n +parsed SDP B: s=GSM Call\r\n +parsed SDP B: c=IN IP4 0.0.0.0\r\n +parsed SDP B: t=0 0\r\n +parsed SDP B: m=audio 0 RTP/AVP 112 113 110 3 111\r\n +parsed SDP B: a=rtpmap:112 AMR/8000\r\n +parsed SDP B: a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n +parsed SDP B: a=rtpmap:113 AMR-WB/8000\r\n +parsed SDP B: a=fmtp:113 octet-align=1\r\n +parsed SDP B: a=rtpmap:110 GSM-EFR/8000\r\n +parsed SDP B: a=rtpmap:3 GSM/8000\r\n +parsed SDP B: a=rtpmap:111 GSM-HR-08/8000\r\n +parsed SDP B: a=ptime:20\r\n +sdp_msg_intersection(a,b): v=0\r\n +sdp_msg_intersection(a,b): o=OsmoMSC 0 0 IN IP4 0.0.0.0\r\n +sdp_msg_intersection(a,b): s=GSM Call\r\n +sdp_msg_intersection(a,b): c=IN IP4 0.0.0.0\r\n +sdp_msg_intersection(a,b): t=0 0\r\n +sdp_msg_intersection(a,b): m=audio 0 RTP/AVP 112 113 110 3 111\r\n +sdp_msg_intersection(a,b): a=rtpmap:112 AMR/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:112 octet-align=1;mode-set=0,1,2,3\r\n +sdp_msg_intersection(a,b): a=rtpmap:113 AMR-WB/8000\r\n +sdp_msg_intersection(a,b): a=fmtp:113 octet-align=1\r\n +sdp_msg_intersection(a,b): a=rtpmap:110 GSM-EFR/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:3 GSM/8000\r\n +sdp_msg_intersection(a,b): a=rtpmap:111 GSM-HR-08/8000\r\n +sdp_msg_intersection(a,b): a=ptime:20\r\n +[7] ok + + +test_select + +[0] +SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR +Select: AMR:octet-align=1 +SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR +[0] ok + +[1] +SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR +Select: GSM +SDP: GSM,AMR:octet-align=1,GSM-HR-08,GSM-EFR +[1] ok + +[2] +SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR +Select: GSM-HR-08 +SDP: GSM-HR-08,AMR:octet-align=1,GSM,GSM-EFR +[2] ok + +[3] +SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR +Select: GSM-EFR +SDP: GSM-EFR,AMR:octet-align=1,GSM,GSM-HR-08 +[3] ok diff --git a/tests/testsuite.at b/tests/testsuite.at index c0788b9..946d0db 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -107,3 +107,10 @@ cat $abs_srcdir/msc_vlr/msc_vlr_test_ss.err > experr AT_CHECK([$abs_top_builddir/tests/msc_vlr/msc_vlr_test_ss], [], [expout], [experr]) AT_CLEANUP + +AT_SETUP([sdp_msg_test]) +AT_KEYWORDS([sdp_msg_test]) +cat $abs_srcdir/sdp_msg/sdp_msg_test.ok > expout +cat $abs_srcdir/sdp_msg/sdp_msg_test.err > experr +AT_CHECK([$abs_top_builddir/tests/sdp_msg/sdp_msg_test], [], [expout], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 Gerrit-Change-Number: 15947 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:24:28 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:24:28 +0000 Subject: Change in osmo-msc[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... MNCC v6: add optional SDP to the socket protocol Add a char buffer of 1024 characters length as space for SDP to pass to / receive from MNCC. Actually support receiving MNCC without such an SDP tail. The main reason for this is to avoid the need to adjust the ttcn3 implementation of MNCC: it would stop working for older osmo-msc. Older or non-SIP MNCC peers could operate the previous MNCC protocol unchanged (save the protocol number bump) without having to implement SDP. The SDP part in the MNCC protocol will be used in upcoming patch I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f. This patch must be merged at the same time as osmo-sip-connector patch Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925, so that both sides have a matching MNCC protocol version number. Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 --- M configure.ac M include/osmocom/msc/mncc.h M src/libmsc/mncc.c M tests/Makefile.am A tests/mncc/Makefile.am A tests/mncc/mncc_test.c A tests/mncc/mncc_test.err A tests/mncc/mncc_test.ok M tests/testsuite.at 9 files changed, 189 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, approved pespin: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve diff --git a/configure.ac b/configure.ac index ee80900..b5cd594 100644 --- a/configure.ac +++ b/configure.ac @@ -255,6 +255,7 @@ tests/sms_queue/Makefile tests/msc_vlr/Makefile tests/sdp_msg/Makefile + tests/mncc/Makefile doc/Makefile doc/examples/Makefile doc/manuals/Makefile diff --git a/include/osmocom/msc/mncc.h b/include/osmocom/msc/mncc.h index 4414a8d..cf7d7ce 100644 --- a/include/osmocom/msc/mncc.h +++ b/include/osmocom/msc/mncc.h @@ -159,6 +159,9 @@ unsigned char lchan_type; unsigned char lchan_mode; + + /* A buffer to contain SDP ('\0' terminated) */ + char sdp[1024]; }; struct gsm_data_frame { @@ -167,7 +170,7 @@ unsigned char data[0]; }; -#define MNCC_SOCK_VERSION 5 +#define MNCC_SOCK_VERSION 6 struct gsm_mncc_hello { uint32_t msg_type; uint32_t version; @@ -190,6 +193,7 @@ uint16_t port; uint32_t payload_type; uint32_t payload_msg_type; + char sdp[1024]; }; struct gsm_mncc_bridge { @@ -226,6 +230,7 @@ || msg_type == GSM_BAD_FRAME) int mncc_prim_check(const struct gsm_mncc *mncc_prim, unsigned int len); +int mncc_check_sdp_termination(const char *label, const struct gsm_mncc *mncc, unsigned int len, const char *sdp); int mncc_bearer_cap_to_channel_type(struct gsm0808_channel_type *ct, const struct gsm_mncc_bearer_cap *bc); diff --git a/src/libmsc/mncc.c b/src/libmsc/mncc.c index d0b2ff2..0a38997 100644 --- a/src/libmsc/mncc.c +++ b/src/libmsc/mncc.c @@ -235,6 +235,34 @@ return 0; } +/* Make sure that the SDP section has a terminating \0. The MNCC message may end after that \0, and if SDP is omitted it + * must contain at least one \0 byte. */ +int mncc_check_sdp_termination(const char *label, const struct gsm_mncc *mncc, unsigned int len, const char *sdp) +{ + size_t sdp_offset; + size_t sdp_data_len; + size_t sdp_str_len; + + OSMO_ASSERT(((char*)mncc) < sdp); + + sdp_offset = sdp - (char*)mncc; + if (len < sdp_offset) + goto too_short; + + sdp_data_len = len - sdp_offset; + if (sdp_data_len < 1) + goto too_short; + + sdp_str_len = strnlen(sdp, sdp_data_len); + /* There must be a \0, so sdp_str_len must be at most sdp_data_len - 1 */ + if (sdp_str_len >= sdp_data_len) + goto too_short; + return 0; +too_short: + LOGP(DMNCC, LOGL_ERROR, "Short %s\n", label); + return -EINVAL; +} + int mncc_prim_check(const struct gsm_mncc *mncc_prim, unsigned int len) { if (len < sizeof(mncc_prim->msg_type)) { @@ -262,11 +290,7 @@ case MNCC_RTP_FREE: case MNCC_RTP_CONNECT: case MNCC_RTP_CREATE: - if (len < sizeof(struct gsm_mncc_rtp)) { - LOGP(DMNCC, LOGL_ERROR, "Short MNCC RTP\n"); - return -EINVAL; - } - break; + return mncc_check_sdp_termination("MNCC RTP", mncc_prim, len, ((struct gsm_mncc_rtp*)mncc_prim)->sdp); case MNCC_LCHAN_MODIFY: case MNCC_FRAME_DROP: case MNCC_FRAME_RECV: @@ -279,10 +303,8 @@ } break; default: - if (len < sizeof(struct gsm_mncc)) { - LOGP(DMNCC, LOGL_ERROR, "Short MNCC Signalling\n"); + if (mncc_check_sdp_termination("MNCC Signalling", mncc_prim, len, mncc_prim->sdp)) return -EINVAL; - } return mncc_prim_check_sign(mncc_prim); } return 0; diff --git a/tests/Makefile.am b/tests/Makefile.am index 864ac7c..5af80a4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,6 +3,7 @@ msc_vlr \ db_sms \ sdp_msg \ + mncc \ $(NULL) if BUILD_SMPP diff --git a/tests/mncc/Makefile.am b/tests/mncc/Makefile.am new file mode 100644 index 0000000..ae859ab --- /dev/null +++ b/tests/mncc/Makefile.am @@ -0,0 +1,32 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + -ggdb3 \ + $(LIBOSMOCORE_CFLAGS) \ + $(NULL) + +LDADD = \ + $(top_builddir)/src/libmsc/libmsc.a \ + $(LIBOSMOCORE_LIBS) \ + $(NULL) + +EXTRA_DIST = \ + mncc_test.ok \ + mncc_test.err \ + $(NULL) + +noinst_PROGRAMS = \ + mncc_test \ + $(NULL) + +mncc_test_SOURCES = \ + mncc_test.c \ + $(NULL) + +.PHONY: update_exp +update_exp: + $(builddir)/mncc_test >$(srcdir)/mncc_test.ok 2>$(srcdir)/mncc_test.err diff --git a/tests/mncc/mncc_test.c b/tests/mncc/mncc_test.c new file mode 100644 index 0000000..580b479 --- /dev/null +++ b/tests/mncc/mncc_test.c @@ -0,0 +1,79 @@ +#include +#include +#include +#include +#include +#include +#include + +#define _test_sdp_termination(LABEL, MNCC, MNCC_MSG_LEN, RC) do { \ + int sdp_len = ((int)(MNCC_MSG_LEN)) - ((MNCC)->sdp - (char*)MNCC); \ + size_t sdp_strlen = strnlen(MNCC->sdp, sizeof(MNCC->sdp)); \ + int rc = mncc_check_sdp_termination("<" LABEL ">", (struct gsm_mncc*)MNCC, MNCC_MSG_LEN, MNCC->sdp); \ + printf("%s: len=%d sdplen=%d sdp=%s rc=%d\n", \ + LABEL, (int)(MNCC_MSG_LEN), sdp_len, \ + sdp_len > 0? osmo_quote_str((MNCC)->sdp, OSMO_MIN(sdp_len, sdp_strlen+1)) : "-", rc); \ + if (RC != rc) \ + printf("ERROR!\n"); \ + } while (0) + +#define test_sdp_termination_cases(MNCC) \ + _test_sdp_termination("empty SDP", MNCC, sizeof(*MNCC), 0); \ + _test_sdp_termination("empty SDP, shortest possible", MNCC, MNCC->sdp - ((char*)MNCC) + 1, 0); \ + _test_sdp_termination("empty SDP, zero len", MNCC, MNCC->sdp - ((char*)MNCC), -EINVAL); \ + OSMO_STRLCPY_ARRAY(MNCC->sdp, "Privacy is a desirable marketing option"); \ + _test_sdp_termination("terminated SDP str", MNCC, sizeof(*MNCC), 0); \ + _test_sdp_termination("terminated SDP str, shortest possible", MNCC, \ + MNCC->sdp - ((char*)MNCC) + strlen(MNCC->sdp) + 1, 0); \ + _test_sdp_termination("terminated SDP str, but len excludes nul", MNCC, \ + MNCC->sdp - ((char*)MNCC) + strlen(MNCC->sdp), -EINVAL); \ + _test_sdp_termination("terminated SDP str, but len too short", MNCC, \ + MNCC->sdp - ((char*)MNCC) + 23, -EINVAL); \ + _test_sdp_termination("len way too short", MNCC, 10, -EINVAL); \ + _test_sdp_termination("len zero", MNCC, 0, -EINVAL); + + +void test_sdp_termination(void) +{ + struct gsm_mncc _mncc = {}; + struct gsm_mncc_rtp _mncc_rtp = {}; + + struct gsm_mncc *mncc = &_mncc; + struct gsm_mncc_rtp *mncc_rtp = &_mncc_rtp; + + printf("%s()\n", __func__); + printf("\nstruct gsm_mncc:\n"); + test_sdp_termination_cases(mncc); + + _mncc = (struct gsm_mncc){}; + _mncc_rtp = (struct gsm_mncc_rtp){}; + printf("\nstruct gsm_mncc_rtp:\n"); + test_sdp_termination_cases(mncc_rtp); +} + +static const struct log_info_cat default_categories[] = { + [DMNCC] = { + .name = "DMNCC", + .description = "MNCC API for Call Control application", + .color = "\033[1;39m", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, +}; + +const struct log_info log_info = { + .cat = default_categories, + .num_cat = ARRAY_SIZE(default_categories), +}; + +int main(void) +{ + void *ctx = talloc_named_const(NULL, 0, "smpp_test"); + osmo_init_logging2(ctx, &log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); + log_set_print_category_hex(osmo_stderr_target, 0); + + test_sdp_termination(); + return 0; +} diff --git a/tests/mncc/mncc_test.err b/tests/mncc/mncc_test.err new file mode 100644 index 0000000..5ee7e2c --- /dev/null +++ b/tests/mncc/mncc_test.err @@ -0,0 +1,10 @@ +DMNCC Short +DMNCC Short +DMNCC Short +DMNCC Short +DMNCC Short +DMNCC Short +DMNCC Short +DMNCC Short +DMNCC Short +DMNCC Short diff --git a/tests/mncc/mncc_test.ok b/tests/mncc/mncc_test.ok new file mode 100644 index 0000000..807904d --- /dev/null +++ b/tests/mncc/mncc_test.ok @@ -0,0 +1,23 @@ +test_sdp_termination() + +struct gsm_mncc: +empty SDP: len=1860 sdplen=1026 sdp="\0" rc=0 +empty SDP, shortest possible: len=835 sdplen=1 sdp="\0" rc=0 +empty SDP, zero len: len=834 sdplen=0 sdp=- rc=-22 +terminated SDP str: len=1860 sdplen=1026 sdp="Privacy is a desirable marketing option\0" rc=0 +terminated SDP str, shortest possible: len=874 sdplen=40 sdp="Privacy is a desirable marketing option\0" rc=0 +terminated SDP str, but len excludes nul: len=873 sdplen=39 sdp="Privacy is a desirable marketing option" rc=-22 +terminated SDP str, but len too short: len=857 sdplen=23 sdp="Privacy is a desirable " rc=-22 +len way too short: len=10 sdplen=-824 sdp=- rc=-22 +len zero: len=0 sdplen=-834 sdp=- rc=-22 + +struct gsm_mncc_rtp: +empty SDP: len=1048 sdplen=1024 sdp="\0" rc=0 +empty SDP, shortest possible: len=25 sdplen=1 sdp="\0" rc=0 +empty SDP, zero len: len=24 sdplen=0 sdp=- rc=-22 +terminated SDP str: len=1048 sdplen=1024 sdp="Privacy is a desirable marketing option\0" rc=0 +terminated SDP str, shortest possible: len=64 sdplen=40 sdp="Privacy is a desirable marketing option\0" rc=0 +terminated SDP str, but len excludes nul: len=63 sdplen=39 sdp="Privacy is a desirable marketing option" rc=-22 +terminated SDP str, but len too short: len=47 sdplen=23 sdp="Privacy is a desirable " rc=-22 +len way too short: len=10 sdplen=-14 sdp=- rc=-22 +len zero: len=0 sdplen=-24 sdp=- rc=-22 diff --git a/tests/testsuite.at b/tests/testsuite.at index 946d0db..58855f8 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -114,3 +114,10 @@ cat $abs_srcdir/sdp_msg/sdp_msg_test.err > experr AT_CHECK([$abs_top_builddir/tests/sdp_msg/sdp_msg_test], [], [expout], [experr]) AT_CLEANUP + +AT_SETUP([mncc_test]) +AT_KEYWORDS([mncc_test]) +cat $abs_srcdir/mncc/mncc_test.ok > expout +cat $abs_srcdir/mncc/mncc_test.err > experr +AT_CHECK([$abs_top_builddir/tests/mncc/mncc_test], [], [expout], [experr]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:24:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:24:29 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: better err logging for dtap msgs In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15949 ) Change subject: msc_vlr_tests: better err logging for dtap msgs ...................................................................... msc_vlr_tests: better err logging for dtap msgs Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 --- M tests/msc_vlr/msc_vlr_tests.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index de4913a..e00c337 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -254,8 +254,10 @@ /* Mask the sequence number out before comparing */ msg->data[1] &= 0x3f; - if (!msgb_eq_data_print(msg, dtap_tx_expected->data, dtap_tx_expected->len)) + if (!msgb_eq_data_print(msg, dtap_tx_expected->data, dtap_tx_expected->len)) { + btw("Expected %s", osmo_hexdump(dtap_tx_expected->data, dtap_tx_expected->len)); abort(); + } btw("DTAP matches expected message"); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I3edd90be40555dd648e9f16db5b6040665a19a95 Gerrit-Change-Number: 15949 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:24:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:24:29 +0000 Subject: Change in osmo-msc[master]: msc_vlr_test_call.c: add MNCC logging In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15950 ) Change subject: msc_vlr_test_call.c: add MNCC logging ...................................................................... msc_vlr_test_call.c: add MNCC logging Change-Id: I03b25c134553c620d3fa9d23a67ad39414546861 --- M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err 2 files changed, 41 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index 392d38d..dfa3141 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -25,11 +25,13 @@ #include -static void mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc) -{ - mncc->msg_type = msg_type; - mncc_tx_to_cc(net, mncc); -} +#define mncc_sends_to_cc(MSG_TYPE, MNCC) do { \ + (MNCC)->msg_type = MSG_TYPE; \ + log("MSC <-- MNCC: callref 0x%x: %s\n%s", (MNCC)->callref, \ + get_mncc_name((MNCC)->msg_type), \ + (MNCC)->sdp); \ + mncc_tx_to_cc(net, MNCC); \ + } while(0) /* static void on_call_release_mncc_sends_to_cc(uint32_t msg_type, struct gsm_mncc *mncc) diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 7f9940b..07e10a5 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -297,6 +297,8 @@ MSC --> MNCC: callref 0x80000001: MNCC_SETUP_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) - MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN + MSC <-- MNCC: callref 0x80000001: MNCC_RTP_CREATE + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_RTP_CREATE DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated @@ -328,6 +330,8 @@ DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) tx MNCC_RTP_CREATE MSC --> MNCC: callref 0x80000001: MNCC_RTP_CREATE - MNCC says that's fine + MSC <-- MNCC: callref 0x80000001: MNCC_CALL_PROC_REQ + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_CALL_PROC_REQ DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) stopping pending guard timer DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) starting guard timer with 180 seconds @@ -341,6 +345,8 @@ DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - Total time passed: 1.000023 s - The other call leg got established (not shown here), MNCC tells us so + MSC <-- MNCC: callref 0x80000001: MNCC_ALERT_REQ + DMNCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_ALERT_REQ DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) stopping pending guard timer DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) starting guard timer with 180 seconds @@ -351,6 +357,8 @@ - DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_ALERTING: 8301 - DTAP matches expected message DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST + MSC <-- MNCC: callref 0x80000001: MNCC_SETUP_RSP + DMNCC trans(CC:CALL_DELIVERED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_SETUP_RSP DCC trans(CC:CALL_DELIVERED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) stopping pending guard timer DCC trans(CC:CALL_DELIVERED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) starting guard timer with 180 seconds @@ -390,6 +398,8 @@ DMNCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) tx MNCC_DISC_IND MSC --> MNCC: callref 0x80000001: MNCC_DISC_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) + MSC <-- MNCC: callref 0x80000001: MNCC_REL_REQ + DMNCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_REL_REQ DCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) starting guard timer with 180 seconds DCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000001 tid-8) rx MNCC_REL_REQ in state DISCONNECT_IND @@ -661,6 +671,8 @@ - after a while, MNCC asks us to setup a call, causing Paging + MSC <-- MNCC: callref 0x423: MNCC_SETUP_REQ + DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + mncc_tx_to_gsm_cc: now used by 2 (attached,mncc_tx_to_gsm_cc) DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + CC: now used by 3 (attached,mncc_tx_to_gsm_cc,CC) DCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 callref-0x423 tid-255) New transaction @@ -779,6 +791,8 @@ MSC --> MNCC: callref 0x423: MNCC_CALL_CONF_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) - MNCC sends MNCC_RTP_CREATE + MSC <-- MNCC: callref 0x423: MNCC_RTP_CREATE + DMNCC trans(CC:MO_TERM_CALL_CONF IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_RTP_CREATE DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - MGW acknowledges the CRCX to RAN, triggering Assignment @@ -827,6 +841,8 @@ DMNCC trans(CC:CONNECT_REQUEST IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) tx MNCC_SETUP_CNF MSC --> MNCC: callref 0x423: MNCC_SETUP_CNF DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) + MSC <-- MNCC: callref 0x423: MNCC_SETUP_COMPL_REQ + DMNCC trans(CC:CONNECT_REQUEST IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_SETUP_COMPL_REQ DCC trans(CC:CONNECT_REQUEST IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) starting guard timer with 180 seconds DCC trans(CC:CONNECT_REQUEST IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_SETUP_COMPL_REQ in state CONNECT_REQUEST @@ -853,6 +869,8 @@ DMNCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) tx MNCC_DISC_IND MSC --> MNCC: callref 0x423: MNCC_DISC_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) + MSC <-- MNCC: callref 0x423: MNCC_REL_REQ + DMNCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_REL_REQ DCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) starting guard timer with 180 seconds DCC trans(CC:DISCONNECT_IND IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_REL_REQ in state DISCONNECT_IND @@ -1124,6 +1142,8 @@ - after a while, MNCC asks us to setup a call, causing Paging + MSC <-- MNCC: callref 0x423: MNCC_SETUP_REQ + DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + mncc_tx_to_gsm_cc: now used by 2 (attached,mncc_tx_to_gsm_cc) DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + CC: now used by 3 (attached,mncc_tx_to_gsm_cc,CC) DCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 callref-0x423 tid-255) New transaction @@ -1242,6 +1262,8 @@ MSC --> MNCC: callref 0x423: MNCC_CALL_CONF_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) - MNCC sends MNCC_RTP_CREATE + MSC <-- MNCC: callref 0x423: MNCC_RTP_CREATE + DMNCC trans(CC:MO_TERM_CALL_CONF IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) rx MNCC_RTP_CREATE DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - MGW acknowledges the CRCX to RAN, triggering Assignment @@ -1645,6 +1667,8 @@ MSC --> MNCC: callref 0x80000002: MNCC_SETUP_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) - MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN + MSC <-- MNCC: callref 0x80000002: MNCC_RTP_CREATE + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) rx MNCC_RTP_CREATE DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated @@ -1676,6 +1700,8 @@ DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) tx MNCC_RTP_CREATE MSC --> MNCC: callref 0x80000002: MNCC_RTP_CREATE - MNCC says that's fine + MSC <-- MNCC: callref 0x80000002: MNCC_CALL_PROC_REQ + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) rx MNCC_CALL_PROC_REQ DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) stopping pending guard timer DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) starting guard timer with 180 seconds @@ -1688,6 +1714,8 @@ DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - But the other side's MSISDN could not be resolved, MNCC tells us to cancel + MSC <-- MNCC: callref 0x80000002: MNCC_REL_REQ + DMNCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) rx MNCC_REL_REQ DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) stopping pending guard timer DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000002 tid-8) starting guard timer with 180 seconds @@ -2067,6 +2095,8 @@ MSC --> MNCC: callref 0x80000003: MNCC_SETUP_IND DREF msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: - rx_from_ms: now used by 1 (cc) - MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN + MSC <-- MNCC: callref 0x80000003: MNCC_RTP_CREATE + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) rx MNCC_RTP_CREATE DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Starting call assignment DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Allocated @@ -2098,6 +2128,8 @@ DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) tx MNCC_RTP_CREATE MSC --> MNCC: callref 0x80000003: MNCC_RTP_CREATE - MNCC says that's fine + MSC <-- MNCC: callref 0x80000003: MNCC_CALL_PROC_REQ + DMNCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) rx MNCC_CALL_PROC_REQ DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) stopping pending guard timer DCC trans(CC:INITIATED IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) starting guard timer with 180 seconds @@ -2110,6 +2142,8 @@ DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: Assignment for this trans already started earlier - But the other side's MSISDN could not be resolved, MNCC tells us to cancel + MSC <-- MNCC: callref 0x80000003: MNCC_REL_REQ + DMNCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) rx MNCC_REL_REQ DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) stopping pending guard timer DCC trans(CC:MO_CALL_PROC IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ callref-0x80000003 tid-8) starting guard timer with 180 seconds -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I03b25c134553c620d3fa9d23a67ad39414546861 Gerrit-Change-Number: 15950 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:24:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:24:29 +0000 Subject: Change in osmo-msc[master]: msc_vlr_tests: log descriptions in color with -v In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15951 ) Change subject: msc_vlr_tests: log descriptions in color with -v ...................................................................... msc_vlr_tests: log descriptions in color with -v Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d --- M tests/msc_vlr/msc_vlr_tests.h 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index 57022b4..88f80b4 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -35,9 +35,12 @@ #include extern bool _log_lines; +#define LOG_COLOR "\033[1;33m" +#define LOG_COLOR_OFF "\033[0;m" + #define _log(fmt, args...) do { \ if (_log_lines) \ - fprintf(stderr, " %4d:%s: " fmt "\n", \ + fprintf(stderr, LOG_COLOR " %4d:%s: " fmt LOG_COLOR_OFF "\n", \ __LINE__, __FILE__, ## args ); \ else \ fprintf(stderr, fmt "\n", ## args ); \ -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15951 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2b28a94a5b27932e343952ba82e7e11c46f5e87d Gerrit-Change-Number: 15951 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:24:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:24:29 +0000 Subject: Change in osmo-msc[master]: msc_vlr_test_call: rename lu_utran_tmsi In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15952 ) Change subject: msc_vlr_test_call: rename lu_utran_tmsi ...................................................................... msc_vlr_test_call: rename lu_utran_tmsi Change-Id: I46a41321e6d1be3672a56a6e3cc36f013fdcd396 --- M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err 2 files changed, 16 insertions(+), 16 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index dfa3141..339233c 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -43,7 +43,7 @@ #define IMSI "901700000010650" -static void standard_lu() +static void lu_utran_tmsi() { struct vlr_subscr *vsub; @@ -173,7 +173,7 @@ fake_time_start(); - standard_lu(); + lu_utran_tmsi(); BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector"); auth_request_sent = false; @@ -291,7 +291,7 @@ fake_time_start(); - standard_lu(); + lu_utran_tmsi(); BTW("after a while, MNCC asks us to setup a call, causing Paging"); @@ -394,7 +394,7 @@ fake_time_start(); - standard_lu(); + lu_utran_tmsi(); BTW("after a while, MNCC asks us to setup a call, causing Paging"); @@ -489,7 +489,7 @@ fake_time_start(); - standard_lu(); + lu_utran_tmsi(); BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector"); auth_request_sent = false; @@ -585,7 +585,7 @@ fake_time_start(); - standard_lu(); + lu_utran_tmsi(); BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector"); auth_request_sent = false; diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index 07e10a5..8c394d0 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -189,11 +189,11 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations - msub gone llist_count(&msub_list) == 0 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + standard_lu: now used by 2 (attached,standard_lu) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + lu_utran_tmsi: now used by 2 (attached,lu_utran_tmsi) vsub != NULL == 1 strcmp(vsub->imsi, IMSI) == 0 LAC == 23 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - standard_lu: now used by 1 (attached) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - lu_utran_tmsi: now used by 1 (attached) - after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector @@ -663,11 +663,11 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations - msub gone llist_count(&msub_list) == 0 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + standard_lu: now used by 2 (attached,standard_lu) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + lu_utran_tmsi: now used by 2 (attached,lu_utran_tmsi) vsub != NULL == 1 strcmp(vsub->imsi, IMSI) == 0 LAC == 23 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - standard_lu: now used by 1 (attached) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - lu_utran_tmsi: now used by 1 (attached) - after a while, MNCC asks us to setup a call, causing Paging @@ -1134,11 +1134,11 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations - msub gone llist_count(&msub_list) == 0 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + standard_lu: now used by 2 (attached,standard_lu) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + lu_utran_tmsi: now used by 2 (attached,lu_utran_tmsi) vsub != NULL == 1 strcmp(vsub->imsi, IMSI) == 0 LAC == 23 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - standard_lu: now used by 1 (attached) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - lu_utran_tmsi: now used by 1 (attached) - after a while, MNCC asks us to setup a call, causing Paging @@ -1559,11 +1559,11 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations - msub gone llist_count(&msub_list) == 0 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + standard_lu: now used by 2 (attached,standard_lu) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + lu_utran_tmsi: now used by 2 (attached,lu_utran_tmsi) vsub != NULL == 1 strcmp(vsub->imsi, IMSI) == 0 LAC == 23 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - standard_lu: now used by 1 (attached) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - lu_utran_tmsi: now used by 1 (attached) - after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector @@ -1987,11 +1987,11 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations - msub gone llist_count(&msub_list) == 0 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + standard_lu: now used by 2 (attached,standard_lu) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + lu_utran_tmsi: now used by 2 (attached,lu_utran_tmsi) vsub != NULL == 1 strcmp(vsub->imsi, IMSI) == 0 LAC == 23 -DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - standard_lu: now used by 1 (attached) +DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - lu_utran_tmsi: now used by 1 (attached) - after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15952 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I46a41321e6d1be3672a56a6e3cc36f013fdcd396 Gerrit-Change-Number: 15952 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:24:52 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 15:24:52 +0000 Subject: Change in osmo-sip-connector[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 ) Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... Patch Set 2: Code-Review+2 this is basically the same patch as https://gerrit.osmocom.org/c/osmo-msc/+/15948. Taking the liberty to apply that +2 here as well, because they should be merged together. -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 Gerrit-Change-Number: 16221 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Thu, 28 Nov 2019 15:24:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:24:52 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:24:52 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sip: add osmo-sip-connector.cfg In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16313 ) Change subject: sip: add osmo-sip-connector.cfg ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16313 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I820a6573fafea9990eabcf40f1b7745558717cc7 Gerrit-Change-Number: 16313 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 15:24:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:25:22 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:25:22 +0000 Subject: Change in osmo-sip-connector[master]: mncc.c: fix gsm_mncc_rtp size checks In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16312 ) Change subject: mncc.c: fix gsm_mncc_rtp size checks ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16312 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: I522ce7f206932a816a64f03d916799c3215bb8c7 Gerrit-Change-Number: 16312 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 15:25:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:25:28 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:25:28 +0000 Subject: Change in osmo-sip-connector[master]: mncc.c: fix gsm_mncc_rtp size checks In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16312 ) Change subject: mncc.c: fix gsm_mncc_rtp size checks ...................................................................... mncc.c: fix gsm_mncc_rtp size checks Verify is the parsed data is at least the size of the struct, not exactly the size. Make it accept messages with additional data, like the SDP information the TTCN-3 testsuite is sending since Ic9568c8927507e161aadfad1a4d20aa896d8ae30. This change makes the size checks consistent with the two other size checks in the file: if (rc < sizeof(*rtp)) { if (rc < sizeof(**mncc)) { Related: OS#4282 Change-Id: I522ce7f206932a816a64f03d916799c3215bb8c7 --- M src/mncc.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/mncc.c b/src/mncc.c index f2e2579..16eed96 100644 --- a/src/mncc.c +++ b/src/mncc.c @@ -472,7 +472,7 @@ struct call *call; struct mncc_call_leg *leg; - if (rc != sizeof(*data)) { + if (rc < sizeof(*data)) { LOGP(DMNCC, LOGL_ERROR, "gsm_mncc of wrong size %d vs. %zu\n", rc, sizeof(*data)); return close_connection(conn); @@ -548,7 +548,7 @@ { struct mncc_call_leg *leg; - if (rc != sizeof(**mncc)) { + if (rc < sizeof(**mncc)) { LOGP(DMNCC, LOGL_ERROR, "gsm_mncc of wrong size %d vs. %zu\n", rc, sizeof(**mncc)); close_connection(conn); -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16312 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: I522ce7f206932a816a64f03d916799c3215bb8c7 Gerrit-Change-Number: 16312 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:26:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:26:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/MNCC_Types: fix sdp in tr_MNCC_* In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 ) Change subject: library/MNCC_Types: fix sdp in tr_MNCC_* ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic7a2df0b6faeaa88682880f816518618ced79a7e Gerrit-Change-Number: 16314 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 15:26:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:26:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:26:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sip: add osmo-sip-connector.cfg In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16313 ) Change subject: sip: add osmo-sip-connector.cfg ...................................................................... sip: add osmo-sip-connector.cfg Add config that works with SIP_Tests.default. Change-Id: I820a6573fafea9990eabcf40f1b7745558717cc7 --- A sip/osmo-sip-connector.cfg 1 file changed, 25 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/sip/osmo-sip-connector.cfg b/sip/osmo-sip-connector.cfg new file mode 100644 index 0000000..59f89db --- /dev/null +++ b/sip/osmo-sip-connector.cfg @@ -0,0 +1,25 @@ +! +! OsmoMNCC (1.1.0-dirty) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging print file basename + logging level all debug +! +stats interval 5 +! +line vty + no login + bind 127.0.0.1 +! +sip + local 127.0.0.1 5060 + remote 127.0.0.2 5060 +mncc + socket-path /tmp/mncc +app -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16313 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I820a6573fafea9990eabcf40f1b7745558717cc7 Gerrit-Change-Number: 16313 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 15:26:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 15:26:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/MNCC_Types: fix sdp in tr_MNCC_* In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 ) Change subject: library/MNCC_Types: fix sdp in tr_MNCC_* ...................................................................... library/MNCC_Types: fix sdp in tr_MNCC_* Make sure it is * everywhere, not "". Partially fix the SIP tests, where tr_MNCC_RTP_CONNECT did not match anymore: 13:15:27.516387 5 SIP_Tests.ttcn:219 Message enqueued on MNCC from SIP_Test-MNCC(3) @MNCC_Types.MNCC_PDU : { msg_type := MNCC_RTP_CONNECT (517), u := { rtp := { callref := 5001, ip := 0, rtp_port := 0, payload_type := 0, payload_msg_type := 0, sdp := "0" } } } id 3 13:15:27.516604 5 SIP_Tests.ttcn:221 Matching on port MNCC .u.rtp.sdp := "0" with "" unmatched: First message in the queue does not match the template: Together with I522ce7f206932a816a64f03d916799c3215bb8c7 in osmo-sip-connector.git, this makes the testsuite work again for osmo-sip-connector master. In order to fix the TTCN-3 tests for the latest release, we would need to add a second code path to the TTCN-3 code, that does not send the sdp data based on a configuration option. Considering that I've spent quite some time already to fix this up, it does not seem worth the effort. Related: OS#4282 Fixes: 06b859ca314f53a902329ed95848dbafef1d4f87 ("msc: add sdp to MNCC") Change-Id: Ic7a2df0b6faeaa88682880f816518618ced79a7e --- M library/MNCC_Types.ttcn 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn index 5296579..0a8e7d9 100644 --- a/library/MNCC_Types.ttcn +++ b/library/MNCC_Types.ttcn @@ -1478,7 +1478,7 @@ imsi := ?, lchan_type := 0, lchan_mode := 0, - sdp := "" + sdp := * } } } @@ -1856,7 +1856,7 @@ imsi := "", lchan_type := 0, lchan_mode := 0, - sdp := "" + sdp := * } } } @@ -1977,7 +1977,7 @@ rtp_port := rtp_port, payload_type := pt, payload_msg_type := 0, - sdp := "" + sdp := * } } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16314 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic7a2df0b6faeaa88682880f816518618ced79a7e Gerrit-Change-Number: 16314 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:04:10 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 28 Nov 2019 16:04:10 +0000 Subject: Change in libosmocore[master]: Introduce fields related to DTAP DLCI In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16259 ) Change subject: Introduce fields related to DTAP DLCI ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561 Gerrit-Change-Number: 16259 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 16:04:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:10:08 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 16:10:08 +0000 Subject: Change in osmo-pcu[master]: doc: vty: Update osmo-pcu_vty_reference.xml References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16316 ) Change subject: doc: vty: Update osmo-pcu_vty_reference.xml ...................................................................... doc: vty: Update osmo-pcu_vty_reference.xml Change-Id: I287893cabf0468f0c110eb751eb887f58ff238c0 --- M doc/manuals/vty/osmo-pcu_vty_reference.xml 1 file changed, 10 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/16/16316/1 diff --git a/doc/manuals/vty/osmo-pcu_vty_reference.xml b/doc/manuals/vty/osmo-pcu_vty_reference.xml index 4584ad8..eed4d83 100644 --- a/doc/manuals/vty/osmo-pcu_vty_reference.xml +++ b/doc/manuals/vty/osmo-pcu_vty_reference.xml @@ -18,10 +18,11 @@ - + + @@ -1823,18 +1824,6 @@ - - - - - - - - - - - - @@ -1846,19 +1835,7 @@ - - - - - - - - - - - - - + @@ -1867,14 +1844,17 @@ + + + - + @@ -1884,11 +1864,14 @@ + + + -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16316 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I287893cabf0468f0c110eb751eb887f58ff238c0 Gerrit-Change-Number: 16316 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:10:08 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 16:10:08 +0000 Subject: Change in osmo-pcu[master]: Clarify (M)CS related VTY attributes References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16317 ) Change subject: Clarify (M)CS related VTY attributes ...................................................................... Clarify (M)CS related VTY attributes Some are used to control (M)CS values for downlink while some do it for uplink. Let's make clear which one is used for what. Take the chance to document the fields a bit better than they were. Related: OS#4286 Change-Id: I4e890e924b094a1937fbd3794de96704cf0421a8 --- M doc/manuals/vty/osmo-pcu_vty_reference.xml M src/bts.h M src/pcu_vty.c 3 files changed, 17 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/17/16317/1 diff --git a/doc/manuals/vty/osmo-pcu_vty_reference.xml b/doc/manuals/vty/osmo-pcu_vty_reference.xml index eed4d83..da6c76c 100644 --- a/doc/manuals/vty/osmo-pcu_vty_reference.xml +++ b/doc/manuals/vty/osmo-pcu_vty_reference.xml @@ -1536,7 +1536,7 @@ - + @@ -1545,13 +1545,13 @@ - + - + @@ -1559,13 +1559,13 @@ - + - + @@ -1581,7 +1581,7 @@ - + diff --git a/src/bts.h b/src/bts.h index 54a29cb..7ef5a3f 100644 --- a/src/bts.h +++ b/src/bts.h @@ -142,12 +142,15 @@ /* 0 to support resegmentation in DL, 1 for no reseg */ uint8_t dl_arq_type; - uint8_t cs_adj_enabled; - uint8_t cs_adj_upper_limit; - uint8_t cs_adj_lower_limit; + uint8_t cs_adj_enabled; /* whether cs_adj_{upper,lower}_limit are used to adjust DL CS */ + uint8_t cs_adj_upper_limit; /* downgrade DL CS if error rate above its value */ + uint8_t cs_adj_lower_limit; /* upgrade DL CS if error rate below its value */ + /* downgrade DL CS when less than specified octets are left in tx queue. Optimization, see paper: + "Theoretical Analysis of GPRS Throughput and Delay" */ + uint16_t cs_downgrade_threshold; + /* Link quality range for each UL (M)CS. Below or above, next/prev (M)CS is selected. */ struct {int16_t low; int16_t high; } cs_lqual_ranges[MAX_GPRS_CS]; struct {int16_t low; int16_t high; } mcs_lqual_ranges[MAX_EDGE_MCS]; - uint16_t cs_downgrade_threshold; /* downgrade if less packets left (DL) */ uint16_t ws_base; uint16_t ws_pdch; /* increase WS by this value per PDCH */ diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 996ce61..2fd57d0 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -938,7 +938,7 @@ return CMD_SUCCESS; } -#define CS_ERR_LIMITS_STR "set thresholds for error rate based CS adjustment\n" +#define CS_ERR_LIMITS_STR "set thresholds for error rate based downlink (M)CS adjustment\n" DEFUN(cfg_pcu_cs_err_limits, cfg_pcu_cs_err_limits_cmd, "cs threshold <0-100> <0-100>", @@ -977,7 +977,7 @@ return CMD_SUCCESS; } -#define CS_DOWNGRADE_STR "set threshold for data size based CS downgrade\n" +#define CS_DOWNGRADE_STR "set threshold for data size based downlink (M)CS downgrade\n" DEFUN(cfg_pcu_cs_downgrade_thrsh, cfg_pcu_cs_downgrade_thrsh_cmd, "cs downgrade-threshold <1-10000>", @@ -1006,7 +1006,7 @@ DEFUN(cfg_pcu_cs_lqual_ranges, cfg_pcu_cs_lqual_ranges_cmd, "cs link-quality-ranges cs1 <0-35> cs2 <0-35> <0-35> cs3 <0-35> <0-35> cs4 <0-35>", - CS_STR "Set link quality ranges\n" + CS_STR "Set link quality ranges for each uplink CS\n" "Set quality range for CS-1 (high value only)\n" "CS-1 high (dB)\n" "Set quality range for CS-2\n" @@ -1040,7 +1040,7 @@ DEFUN(cfg_pcu_mcs_lqual_ranges, cfg_pcu_mcs_lqual_ranges_cmd, "mcs link-quality-ranges mcs1 <0-35> mcs2 <0-35> <0-35> mcs3 <0-35> <0-35> mcs4 <0-35> <0-35> mcs5 <0-35> <0-35> mcs6 <0-35> <0-35> mcs7 <0-35> <0-35> mcs8 <0-35> <0-35> mcs9 <0-35>", - CS_STR "Set link quality ranges\n" + CS_STR "Set link quality ranges for each uplink MCS\n" "Set quality range for MCS-1 (high value only)\n" "MCS-1 high (dB)\n" "Set quality range for MCS-2\n" -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16317 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4e890e924b094a1937fbd3794de96704cf0421a8 Gerrit-Change-Number: 16317 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:10:55 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 16:10:55 +0000 Subject: Change in libosmocore[master]: Introduce fields related to DTAP DLCI In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16259 ) Change subject: Introduce fields related to DTAP DLCI ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561 Gerrit-Change-Number: 16259 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 16:10:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:11:02 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 16:11:02 +0000 Subject: Change in libosmocore[master]: Introduce fields related to DTAP DLCI In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16259 ) Change subject: Introduce fields related to DTAP DLCI ...................................................................... Introduce fields related to DTAP DLCI Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561 --- M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/libosmogsm.map 3 files changed, 36 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index a540609..e791b07 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -7,6 +7,7 @@ #include #include #include +#include /* * this is from GSM 03.03 CGI but is copied in GSM 08.08 @@ -40,11 +41,37 @@ } __attribute__((packed)); struct dtap_header { +#if OSMO_IS_LITTLE_ENDIAN uint8_t type; - uint8_t link_id; + union { + uint8_t link_id; /* Backward compatibility */ + struct { + uint8_t dlci_cc:2, + dlci_spare:3, + dlci_sapi:3; /* enum gsm0406_dlc_sapi */ + }; + }; uint8_t length; +#elif OSMO_IS_BIG_ENDIAN + uint8_t type; + union { + uint8_t link_id; + struct { + uint8_t dlci_sapi:3, dlci_spare:3, dlci_cc:2; + }; + }; + uint8_t length; +#endif } __attribute__((packed)); +/* Data Link Control SAPI, GSM 08.06 ? 6.3.2, GSM 04.06 ? 3.3.3 */ +enum gsm0406_dlci_sapi { + DLCI_SAPI_RR_MM_CC = 0x0, + DLCI_SAPI_SMS = 0x3, +}; +extern const struct value_string gsm0406_dlci_sapi_names[]; +static inline const char *gsm0406_dlci_sapi_name(enum gsm0406_dlci_sapi val) +{ return get_value_string(gsm0406_dlci_sapi_names, val); } enum BSS_MAP_MSG_TYPE { BSS_MAP_MSG_RESERVED_0 = 0, diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 514d7f2..f9f7b58 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -1399,6 +1399,12 @@ return &bss_att_tlvdef; } +const struct value_string gsm0406_dlci_sapi_names[] = { + { DLCI_SAPI_RR_MM_CC, "RR/MM/CC" }, + { DLCI_SAPI_SMS, "SMS" }, + { 0, NULL } +}; + static const struct value_string gsm0808_msgt_names[] = { { BSS_MAP_MSG_ASSIGMENT_RQST, "ASSIGNMENT REQ" }, { BSS_MAP_MSG_ASSIGMENT_COMPLETE, "ASSIGNMENT COMPL" }, diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a0e3b32..efca0a5 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -86,6 +86,8 @@ gsm0341_build_msg; +gsm0406_dlci_sapi_names; + gsm0480_create_notifySS; gsm0480_create_unstructuredSS_Notify; gsm0480_create_ussd_resp; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561 Gerrit-Change-Number: 16259 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:12:44 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 16:12:44 +0000 Subject: Change in osmo-pcu[master]: Clarify (M)CS related VTY attributes In-Reply-To: References: Message-ID: pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-pcu/+/16317 ) Change subject: Clarify (M)CS related VTY attributes ...................................................................... Clarify (M)CS related VTY attributes Some are used to control (M)CS values for downlink while some do it for uplink. Let's make clear which one is used for what. Take the chance to document the fields a bit better than they were. Some more information about the origin of cs_downgrade_threshold can be found in the commit introducing it: 70b96aa232bd9784a94247bf7b193cb2147ada9d. Related: OS#4286 Change-Id: I4e890e924b094a1937fbd3794de96704cf0421a8 --- M doc/manuals/vty/osmo-pcu_vty_reference.xml M src/bts.h M src/pcu_vty.c 3 files changed, 17 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/17/16317/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16317 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4e890e924b094a1937fbd3794de96704cf0421a8 Gerrit-Change-Number: 16317 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:32:05 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 16:32:05 +0000 Subject: Change in osmo-ccid-firmware[master]: add the talloc ctx to struct ccid_instance References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 ) Change subject: add the talloc ctx to struct ccid_instance ...................................................................... add the talloc ctx to struct ccid_instance We need it anyway, and relying on global vars is ugly. I'd still like to keep them for debug purposes tho. Change-Id: I3b73e68d0347d74f68018614613fcc802f3fdfe7 --- M ccid_common/ccid_device.h M ccid_common/ccid_slot_fsm.c M ccid_host/ccid_main_functionfs.c M sysmoOCTSIM/libosmo_emb.c M sysmoOCTSIM/main.c 5 files changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/18/16318/1 diff --git a/ccid_common/ccid_device.h b/ccid_common/ccid_device.h index f364f72..d00bc54 100644 --- a/ccid_common/ccid_device.h +++ b/ccid_common/ccid_device.h @@ -105,6 +105,7 @@ /* array of permitted clock frequencies; length: bNumClockSupported */ const uint32_t *clock_freqs; const char *name; + void *talloc_ctx; /* user-supplied opaque data */ void *priv; }; diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 3a591d7..29bffa0 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -323,10 +323,9 @@ return 0; } -extern void *g_tall_ctx; static int iso_fsm_slot_init(struct ccid_slot *cs) { - void *ctx = g_tall_ctx; /* FIXME */ + void *ctx = cs->ci->talloc_ctx; struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct card_uart *cuart = talloc_zero(ctx, struct card_uart); char id_buf[16] = "SIM0"; diff --git a/ccid_host/ccid_main_functionfs.c b/ccid_host/ccid_main_functionfs.c index 8e95c73..cd53a09 100644 --- a/ccid_host/ccid_main_functionfs.c +++ b/ccid_host/ccid_main_functionfs.c @@ -526,6 +526,7 @@ tall_main_ctx = talloc_named_const(NULL, 0, "ccid_main_functionfs"); msgb_talloc_ctx_init(tall_main_ctx, 0); osmo_init_logging2(tall_main_ctx, &log_info); + g_ci.talloc_ctx = tall_main_ctx; signal(SIGUSR1, &signal_handler); diff --git a/sysmoOCTSIM/libosmo_emb.c b/sysmoOCTSIM/libosmo_emb.c index 81b29e3..40b7f5f 100644 --- a/sysmoOCTSIM/libosmo_emb.c +++ b/sysmoOCTSIM/libosmo_emb.c @@ -145,7 +145,7 @@ return target; } -void libosmo_emb_init(void) +void libosmo_emb_init(void* talloc_ctx) { struct log_target *stderr_target; @@ -156,7 +156,7 @@ msgb_talloc_ctx_init(g_msgb_ctx, 0); #endif /* logging */ - log_init(&log_info, g_tall_ctx); + log_init(&log_info, talloc_ctx); #ifdef ENABLE_DBG_UART7 stderr_target = log_target_create_stderr_raw(); log_add_target(stderr_target); diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 07c5af8..4770868 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -325,13 +325,13 @@ extern void testmode_init(void); -extern void libosmo_emb_init(void); +extern void libosmo_emb_init(void* talloc_ctx); extern void libosmo_emb_mainloop(void); #include "talloc.h" #include "logging.h" -void *g_tall_ctx; +static void *g_tall_ctx; /* Section 9.6 of SAMD5x/E5x Family Data Sheet */ @@ -491,11 +491,12 @@ talloc_enable_null_tracking(); g_tall_ctx = talloc_named_const(NULL, 0, "global"); printf("g_tall_ctx=%p\r\n", g_tall_ctx); + g_ci.talloc_ctx = g_tall_ctx; //FIXME osmo_emb has a pool? msgb_talloc_ctx_init(g_tall_ctx, 0); - libosmo_emb_init(); + libosmo_emb_init(g_tall_ctx); LOGP(DUSB, LOGL_ERROR, "foobar usb\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3b73e68d0347d74f68018614613fcc802f3fdfe7 Gerrit-Change-Number: 16318 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:32:06 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 16:32:06 +0000 Subject: Change in osmo-ccid-firmware[master]: fix the host/emulation build References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 ) Change subject: fix the host/emulation build ...................................................................... fix the host/emulation build Going for __ARM__ to distinguish host and firmware builds is not sufficient here, since we might be building on a ARM host, so there is now a OCTSIMFWBUILD define. Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e --- M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_3.c M ccid_common/iso7816_fsm.c M ccid_host/Makefile M sysmoOCTSIM/gcc/Makefile 5 files changed, 32 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/19/16319/1 diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 29bffa0..0993cfc 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -98,7 +98,11 @@ osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_POWER_UP_IND, NULL); cs->icc_powered = true; card_uart_ctrl(ss->cuart, CUART_CTL_CLOCK, true); +#ifdef OCTSIMFWBUILD delay_us(10000); +#else + usleep(10000); +#endif osmo_fsm_inst_dispatch(ss->fi, ISO7816_E_RESET_REL_IND, NULL); card_uart_ctrl(ss->cuart, CUART_CTL_RST, false); @@ -119,7 +123,9 @@ case ISO7816_E_PPS_DONE_IND: case ISO7816_E_PPS_FAILED_IND: cs->event_data = data; +#ifdef OCTSIMFWBUILD asm volatile("dmb st": : :"memory"); +#endif cs->event = event; break; default: @@ -328,35 +334,38 @@ void *ctx = cs->ci->talloc_ctx; struct iso_fsm_slot *ss = ccid_slot2iso_fsm_slot(cs); struct card_uart *cuart = talloc_zero(ctx, struct card_uart); - char id_buf[16] = "SIM0"; - char devname[] = "foobar"; + char id_buf[3+2+1]; + char devname[2+1]; + char *devnamep = 0; + char *drivername = "asf4"; int rc; LOGPCS(cs, LOGL_DEBUG, "%s\n", __func__); - /* HACK: make this in some way configurable so it works both in the firmware - * and on the host (functionfs) */ -// if (cs->slot_nr == 0) { -// cs->icc_present = true; -// devname = "/dev/ttyUSB5"; -// } - devname[0] = cs->slot_nr +0x30; - devname[1] = 0; - //sprintf(devname, "%d", cs->slot_nr); + snprintf(id_buf, sizeof(id_buf), "SIM%d", cs->slot_nr); +#ifdef OCTSIMFWBUILD + snprintf(devname, sizeof(devname), "%d", cs->slot_nr); + devnamep = devname; +#else + if (cs->slot_nr == 0) { + cs->icc_present = true; + devnamep = "/dev/ttyUSB5"; + } + drivername = "tty"; +#endif if (!cuart) return -ENOMEM; - //snprintf(id_buf, sizeof(id_buf), "SIM%d", cs->slot_nr); - id_buf[3] = cs->slot_nr +0x30; - if (devname) { - rc = card_uart_open(cuart, "asf4", devname); + if (devnamep) { + rc = card_uart_open(cuart, drivername, devnamep); if (rc < 0) { LOGPCS(cs, LOGL_ERROR, "Cannot open UART %s: %d\n", devname, rc); talloc_free(cuart); return rc; } } + ss->fi = iso7816_fsm_alloc(ctx, LOGL_DEBUG, id_buf, cuart, iso_fsm_clot_user_cb, ss); if (!ss->fi) { LOGPCS(cs, LOGL_ERROR, "Cannot allocate ISO FSM\n"); diff --git a/ccid_common/iso7816_3.c b/ccid_common/iso7816_3.c index f7262fb..e4273bd 100644 --- a/ccid_common/iso7816_3.c +++ b/ccid_common/iso7816_3.c @@ -18,7 +18,7 @@ #include #include -#include "utils.h" +#include "osmocom/core/utils.h" #include "iso7816_3.h" const uint16_t iso7816_3_fi_table[16] = { diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c index 412bea7..399c321 100644 --- a/ccid_common/iso7816_fsm.c +++ b/ccid_common/iso7816_fsm.c @@ -1193,7 +1193,7 @@ } } -#include + static void tpdu_s_tx_hdr_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct osmo_fsm_inst *parent_fi = fi->proc.parent; @@ -1213,7 +1213,9 @@ } - +#if 0 +#include +#endif static void tpdu_s_procedure_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct tpdu_fsm_priv *tfp = get_tpdu_fsm_priv(fi); diff --git a/ccid_host/Makefile b/ccid_host/Makefile index e9f34cc..7625177 100644 --- a/ccid_host/Makefile +++ b/ccid_host/Makefile @@ -11,6 +11,7 @@ ../ccid_common/ccid_proto.o \ ../ccid_common/ccid_device.o \ ../ccid_common/ccid_slot_fsm.o \ + ../ccid_common/iso7816_3.o \ ../ccid_common/iso7816_fsm.o $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -laio @@ -28,6 +29,7 @@ cuart_driver_tty.o \ utils_ringbuffer.o \ ../ccid_common/iso7816_fsm.o \ + ../ccid_common/iso7816_3.o \ ../ccid_common/cuart.o $(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(shell pkg-config --libs libosmosim) diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 7a37036..6c0974f 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -9,7 +9,7 @@ CFLAGS_CPU=-D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 CFLAGS=-x c -mthumb -DDEBUG -Os -ffunction-sections -fdata-sections -mlong-calls \ - -g3 -Wall -c -std=gnu99 $(CFLAGS_CPU) + -g3 -Wall -c -std=gnu99 $(CFLAGS_CPU) -DOCTSIMFWBUILD CC = $(CROSS_COMPILE)gcc LD = $(CROSS_COMPILE)ld -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e Gerrit-Change-Number: 16319 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:32:06 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 16:32:06 +0000 Subject: Change in osmo-ccid-firmware[master]: reenable host builds References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16320 ) Change subject: reenable host builds ...................................................................... reenable host builds Change-Id: Ie00468b7abcd1e9a3efe85b52f08a708430426fe --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/20/16320/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index f19fc35..f3a0169 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -13,7 +13,7 @@ inst="$TOPDIR/install" export deps inst -: ' + echo echo "=============== libosmocore hostt build ===========" osmo-build-dep.sh libosmocore "" --disable-doxygen @@ -27,7 +27,7 @@ make clean make $PARALLEL_MAKE make clean -' + # adapted from echo echo "=============== libosmocore cross-build ===========" -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16320 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie00468b7abcd1e9a3efe85b52f08a708430426fe Gerrit-Change-Number: 16320 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:34:08 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 28 Nov 2019 16:34:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pps exchange after power on In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16311 ) Change subject: pps exchange after power on ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16311 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ibe289de5134eec4f7ba26c75ceb4714ad523f0da Gerrit-Change-Number: 16311 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Thu, 28 Nov 2019 16:34:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 16:52:51 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 16:52:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Remove unneeded cfg files References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 ) Change subject: pcu: Remove unneeded cfg files ...................................................................... pcu: Remove unneeded cfg files Change-Id: Ie862a1525e9f4f9a3f2427ac3898810e3d044d2f --- D pcu/osmo-bsc.cfg D pcu/osmo-bts.cfg 2 files changed, 0 insertions(+), 277 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/16321/1 diff --git a/pcu/osmo-bsc.cfg b/pcu/osmo-bsc.cfg deleted file mode 100644 index c561955..0000000 --- a/pcu/osmo-bsc.cfg +++ /dev/null @@ -1,194 +0,0 @@ -! -! OsmoBSC (1.1.2.236-5f22) configuration saved from vty -!! -password foo -! -log gsmtap 127.0.0.1 - logging level set-all debug -! - -log stderr - logging color 1 - logging filter all 1 - logging print level 1 - logging print category 1 - logging print category-hex 0 - logging print file basename last - logging print extended-timestamp 1 - logging level set-all debug - #~ logging level hodec info - #~ logging level ho info - #~ logging level nm info - #~ logging level meas info - #~ logging level lmi info - #~ logging level linp notice - #~ logging level lss7 notice - #~ logging level lsccp notice - #~ logging level lsua notice - #~ logging level lm3ua notice - -stats interval 5 -! -line vty - no login - bind 127.0.0.1 -! -e1_input - e1_line 0 driver ipa - e1_line 0 port 0 - no e1_line 0 keepalive - ipa bind 127.0.0.1 -cs7 instance 0 - point-code 0.23.3 - asp asp-clnt-msc-0 2905 0 m3ua - as as-clnt-msc-0 m3ua - asp asp-clnt-msc-0 - routing-key 2 0.23.3 -network - network country code 262 - mobile network code 42 - encryption a5 0 - neci 1 - paging any use tch 0 - handover 0 - handover1 window rxlev averaging 10 - handover1 window rxqual averaging 1 - handover1 window rxlev neighbor averaging 10 - handover1 power budget interval 6 - handover1 power budget hysteresis 3 - handover1 maximum distance 9999 - periodic location update 30 - bts 0 - type sysmobts - band DCS1800 - cell_identity 20960 - location_area_code 13135 - dtx uplink force - dtx downlink - 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 1234 0 - ip.access rsl-ip 127.0.0.1 - oml ip.access stream_id 255 line 0 - neighbor-list mode manual-si5 - neighbor-list add arfcn 100 - neighbor-list add arfcn 200 - si5 neighbor-list add arfcn 10 - si5 neighbor-list add arfcn 20 - codec-support fr - gprs mode gprs - gprs 11bit_rach_support_for_egprs 0 - gprs routing area 0 - gprs network-control-order nc0 - gprs cell bvci 1234 - 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 1234 - 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 1234 - gprs nsvc 0 local udp port 22000 - gprs nsvc 0 remote udp port 23000 - gprs nsvc 0 remote ip 127.0.0.1 - no force-combined-si - trx 0 - rf_locked 0 - arfcn 871 - nominal power 23 - max_power_red 20 - rsl e1 tei 0 - timeslot 0 - phys_chan_config CCCH+SDCCH4 - hopping enabled 0 - timeslot 1 - phys_chan_config TCH/H - hopping enabled 0 - timeslot 2 - phys_chan_config TCH/H - hopping enabled 0 - timeslot 3 - phys_chan_config TCH/H - hopping enabled 0 - timeslot 4 - phys_chan_config TCH/H - hopping enabled 0 - timeslot 5 - phys_chan_config TCH/H - hopping enabled 0 - timeslot 6 - phys_chan_config TCH/H - hopping enabled 0 - timeslot 7 - phys_chan_config PDCH - hopping enabled 0 - #~ timeslot 1 - #~ phys_chan_config TCH/F - #~ hopping enabled 0 - #~ timeslot 2 - #~ phys_chan_config TCH/F - #~ hopping enabled 0 - #~ timeslot 3 - #~ phys_chan_config TCH/F_PDCH - #~ hopping enabled 0 - #~ timeslot 4 - #~ phys_chan_config TCH/F_TCH/H_PDCH - #~ hopping enabled 0 - #~ timeslot 5 - #~ phys_chan_config TCH/H - #~ hopping enabled 0 - #~ timeslot 6 - #~ phys_chan_config SDCCH8 - #~ hopping enabled 0 - #~ timeslot 7 - #~ phys_chan_config PDCH - #~ hopping enabled 0 -msc 0 - core-location-area-code 666 - core-cell-identity 333 - ip.access rtp-base 4000 - timeout-ping 12 - timeout-pong 14 - no timeout-ping advanced - no bsc-welcome-text - no bsc-msc-lost-text - no bsc-grace-text - codec-list fr1 fr2 fr3 - type normal - allow-emergency allow - amr-config 12_2k forbidden - amr-config 10_2k forbidden - amr-config 7_95k forbidden - amr-config 7_40k forbidden - amr-config 6_70k forbidden - amr-config 5_90k allowed - amr-config 5_15k forbidden - amr-config 4_75k forbidden -bsc - mid-call-timeout 0 - no missing-msc-text - access-list-name bsc-list diff --git a/pcu/osmo-bts.cfg b/pcu/osmo-bts.cfg deleted file mode 100644 index 7f36f87..0000000 --- a/pcu/osmo-bts.cfg +++ /dev/null @@ -1,83 +0,0 @@ -! -! OsmoBTS (0.4.0.446-e0fb) configuration saved from vty -!! -! -log gsmtap 127.0.0.1 - logging level set-all debug -! -log stderr - logging filter all 1 - logging color 1 - logging print category 1 - logging timestamp 1 - logging print extended-timestamp 1 - logging level rsl info - logging level oml info - logging level rll notice - logging level rr notice - logging level meas info - logging level pag info - logging level l1c info - logging level l1p notice - logging level dsp info - logging level pcu debug - logging level ho notice - logging level trx info - logging level loop notice - logging level abis notice - logging level rtp notice - logging level sum notice - logging level lglobal notice - logging level llapd notice - logging level linp notice - logging level lmux notice - logging level lmi notice - logging level lmib debug - logging level lsms notice - logging level lctrl notice - logging level lgtp notice - 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 -! -line vty - no login - bind 127.0.0.1 -! -e1_input - e1_line 0 driver ipa - e1_line 0 port 0 - no e1_line 0 keepalive -phy 0 - !virtual-um ms-multicast-group 239.193.23.1 - !virtual-um bts-multicast-group 239.193.23.2 - instance 0 -bts 0 - band DCS1800 - ipa unit-id 1234 0 - oml remote-ip 127.0.0.1 - rtp jitter-buffer 100 - paging queue-size 200 - paging lifetime 0 - uplink-power-target -75 - gsmtap-sapi rach - gsmtap-sapi agch - gsmtap-sapi bcch - gsmtap-sapi pch - gsmtap-sapi sdcch - gsmtap-sapi sacch - min-qual-rach 50 - min-qual-norm -5 - pcu-socket /tmp/pcu_bts - trx 0 - power-ramp max-initial 0 mdBm - power-ramp step-size 2000 mdB - power-ramp step-interval 1 - ms-power-control dsp - phy 0 instance 0 -ctrl - bind 127.0.0.1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie862a1525e9f4f9a3f2427ac3898810e3d044d2f Gerrit-Change-Number: 16321 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 17:01:35 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 28 Nov 2019 17:01:35 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup abstract client In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup abstract client ...................................................................... Patch Set 15: (12 comments) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup.c at 128 PS15, Line 128: strncmp(a->msisdn, b->msisdn, sizeof(a->msisdn)); What if a->msisdn is e.g. '900' while b->msisdn is '900369'? They are not equal, but strncmp() would return 0. I think you either need to compare strlen() too, or just use regular strcmp(). https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup.c at 130 PS15, Line 130: return 0; Rather assert() here. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup.c at 211 PS15, Line 211: if (result->rc == OSMO_MSLOOKUP_RC_RESULT) Cosmetic: this can be replaced by '} else {'. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup.c at 232 PS15, Line 232: 64 Given that IPv6 addresses can be quite long, I would use at least 128... https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup.c at 253 PS15, Line 253: 10 EINVAL https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup.c at 256 PS15, Line 256: 11 ENOMEM https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup.c at 266 PS15, Line 266: struct osmo_mslookup_query *q Parameters need to be documented. At least I would like to know whether it's a pointer to a caller-allocated structure, or do we allocate it here? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup.c at 274 PS15, Line 274: *q = (struct osmo_mslookup_query){}; So this is a fancy way to initialize a caller-allocated structure, right? IMHO, memset(q, 0x00, sizeof(*q)) looks way more cleaner... I would also place this after all checks below (compiler would do this for us). If we return rc != 0, the caller shall consider *q uninitialized. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup_client.c File src/mslookup/mslookup_client.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup_client.c at 45 PS15, Line 45: struct const https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup_client.c at 59 PS15, Line 59: talloc_zero I would avoid zero-initialization here, because 2/3 fields are explicitly initialized below. Just add 'next_request_handle = 0', so we would avoid a redundant write cycle. https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup_client_fake.c File src/mslookup/mslookup_client_fake.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup_client_fake.c at 59 PS15, Line 59: talloc_zero Zero-initialization is redundant here (see the next line). https://gerrit.osmocom.org/c/osmo-hlr/+/16202/15/src/mslookup/mslookup_client_fake.c at 136 PS15, Line 136: talloc_zero same -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 15 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 17:01:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 17:04:21 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 28 Nov 2019 17:04:21 +0000 Subject: Change in osmo-pcu[master]: doc: vty: Update osmo-pcu_vty_reference.xml In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16316 ) Change subject: doc: vty: Update osmo-pcu_vty_reference.xml ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16316 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I287893cabf0468f0c110eb751eb887f58ff238c0 Gerrit-Change-Number: 16316 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Thu, 28 Nov 2019 17:04:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 17:12:15 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 28 Nov 2019 17:12:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Remove unneeded cfg files In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 ) Change subject: pcu: Remove unneeded cfg files ...................................................................... Patch Set 1: Code-Review-1 I think they're needed for the old test case architecture that involves osmo-bts-trx and virt-phy. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie862a1525e9f4f9a3f2427ac3898810e3d044d2f Gerrit-Change-Number: 16321 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Thu, 28 Nov 2019 17:12:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 17:22:02 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 17:22:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Remove unneeded cfg files In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 ) Change subject: pcu: Remove unneeded cfg files ...................................................................... Patch Set 1: grep shows nothing indicating they are used in docker-playground.git/ttcn3-pcu-test matching "bts" or "bsc"... :/ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie862a1525e9f4f9a3f2427ac3898810e3d044d2f Gerrit-Change-Number: 16321 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 17:22:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 17:34:18 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 17:34:18 +0000 Subject: Change in osmo-pcu[master]: doc: vty: Update osmo-pcu_vty_reference.xml In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16316 ) Change subject: doc: vty: Update osmo-pcu_vty_reference.xml ...................................................................... doc: vty: Update osmo-pcu_vty_reference.xml Change-Id: I287893cabf0468f0c110eb751eb887f58ff238c0 --- M doc/manuals/vty/osmo-pcu_vty_reference.xml 1 file changed, 10 insertions(+), 27 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/doc/manuals/vty/osmo-pcu_vty_reference.xml b/doc/manuals/vty/osmo-pcu_vty_reference.xml index 4584ad8..eed4d83 100644 --- a/doc/manuals/vty/osmo-pcu_vty_reference.xml +++ b/doc/manuals/vty/osmo-pcu_vty_reference.xml @@ -18,10 +18,11 @@ - + + @@ -1823,18 +1824,6 @@ - - - - - - - - - - - - @@ -1846,19 +1835,7 @@ - - - - - - - - - - - - - + @@ -1867,14 +1844,17 @@ + + + - + @@ -1884,11 +1864,14 @@ + + + -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16316 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I287893cabf0468f0c110eb751eb887f58ff238c0 Gerrit-Change-Number: 16316 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 19:57:48 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 19:57:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: introduce MNCC_Emulation mp_mncc_version References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16322 ) Change subject: introduce MNCC_Emulation mp_mncc_version ...................................................................... introduce MNCC_Emulation mp_mncc_version Default the MNCC version to the current osmo-sip-connector's master branch MNCC version. As soon as the new version (6) is merged, we can bump it here to make tests for master work again. For 'latest' builds, we can adjust osmo-ttcn3-hacks to use version 5, and also see those tests still passing. Change-Id: I3eb6e0132dc99ebe41a98cc5c329ed4864b770d6 --- M library/MNCC_Emulation.ttcn M sip/SIP_Tests.default 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/22/16322/1 diff --git a/library/MNCC_Emulation.ttcn b/library/MNCC_Emulation.ttcn index ee9b58e..9522e72 100644 --- a/library/MNCC_Emulation.ttcn +++ b/library/MNCC_Emulation.ttcn @@ -37,6 +37,10 @@ import from MNCC_Types all; import from UD_Types all; +modulepar { + int mp_mncc_version := 5; +} + /* General "base class" component definition, of which specific implementations * derive themselves by means of the "extends" feature */ type component MNCC_ConnHdlr { @@ -264,7 +268,7 @@ if (role_server) { f_listen(sock); - MNCC.send(t_SD_MNCC(g_mncc_ud_id, ts_MNCC_HELLO)); + MNCC.send(t_SD_MNCC(g_mncc_ud_id, ts_MNCC_HELLO(version := mp_mncc_version))); } else { f_connect(sock); } diff --git a/sip/SIP_Tests.default b/sip/SIP_Tests.default index 4434a1a..9fcd387 100644 --- a/sip/SIP_Tests.default +++ b/sip/SIP_Tests.default @@ -25,6 +25,7 @@ [MODULE_PARAMETERS] Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoSIPcon"; +MNCC_Emulation.mp_mncc_version := 5; [MAIN_CONTROLLER] -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16322 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3eb6e0132dc99ebe41a98cc5c329ed4864b770d6 Gerrit-Change-Number: 16322 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 19:57:48 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 19:57:48 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sip: bump MNCC version sent to sipcon to 6 References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16323 ) Change subject: sip: bump MNCC version sent to sipcon to 6 ...................................................................... sip: bump MNCC version sent to sipcon to 6 Match commit Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 in osmo-sip-connector. Change-Id: I39d55432776926a385e1b85b21bcdea8180a8946 --- M library/MNCC_Emulation.ttcn M sip/SIP_Tests.default 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/23/16323/1 diff --git a/library/MNCC_Emulation.ttcn b/library/MNCC_Emulation.ttcn index 9522e72..be087ec 100644 --- a/library/MNCC_Emulation.ttcn +++ b/library/MNCC_Emulation.ttcn @@ -38,7 +38,7 @@ import from UD_Types all; modulepar { - int mp_mncc_version := 5; + int mp_mncc_version := 6; } /* General "base class" component definition, of which specific implementations diff --git a/sip/SIP_Tests.default b/sip/SIP_Tests.default index 9fcd387..faf87c8 100644 --- a/sip/SIP_Tests.default +++ b/sip/SIP_Tests.default @@ -25,7 +25,7 @@ [MODULE_PARAMETERS] Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoSIPcon"; -MNCC_Emulation.mp_mncc_version := 5; +MNCC_Emulation.mp_mncc_version := 6; [MAIN_CONTROLLER] -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16323 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I39d55432776926a385e1b85b21bcdea8180a8946 Gerrit-Change-Number: 16323 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 19:58:49 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 19:58:49 +0000 Subject: Change in docker-playground[master]: for sip-latest tests, use MNCC version 5 References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/16324 ) Change subject: for sip-latest tests, use MNCC version 5 ...................................................................... for sip-latest tests, use MNCC version 5 osmo-sip-connector master and the ttcn3 tests have moved to protocol version 6. While the extension is gracefully handled by the ttcn templates to make do with both protocol versions, the actual protocol version number sent to osmo-sip-connector breaks the tests if it doesn't match. So that master can still run v6 yet also pass 'latest', configure v5 when the version is not 'master'. When 'latest' also moves to v6, we of course can revert this again. Related: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 (osmo-sip-connector) Related: I39d55432776926a385e1b85b21bcdea8180a8946 (osmo-ttcn3-hacks) Change-Id: I2174e90bdea32f06cd3e8298696b93027e7906bc --- M ttcn3-sip-test/SIP_Tests.cfg M ttcn3-sip-test/jenkins.sh 2 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/24/16324/1 diff --git a/ttcn3-sip-test/SIP_Tests.cfg b/ttcn3-sip-test/SIP_Tests.cfg index 2904e76..1ced5c3 100644 --- a/ttcn3-sip-test/SIP_Tests.cfg +++ b/ttcn3-sip-test/SIP_Tests.cfg @@ -13,6 +13,7 @@ SIP_Tests.mp_local_host := "172.18.11.103" SIP_Tests.mp_osmosip_host := "172.18.11.10" SIP_Tests.mp_mncc := "/data/unix/mncc" +MNCC_Emulation.mp_mncc_version := 6 [MAIN_CONTROLLER] diff --git a/ttcn3-sip-test/jenkins.sh b/ttcn3-sip-test/jenkins.sh index 0bc0357..3d7d523 100755 --- a/ttcn3-sip-test/jenkins.sh +++ b/ttcn3-sip-test/jenkins.sh @@ -14,6 +14,10 @@ mkdir $VOL_BASE_DIR/sip-tester/unix cp SIP_Tests.cfg $VOL_BASE_DIR/sip-tester/ +if [ "x${IMAGE_SUFFIX}" != "xmaster" ]; then + sed -i 's/mp_mncc_version := [0-9]*/mp_mncc_version:= 5/' "$VOL_BASE_DIR/sip-tester/SIP_Tests.cfg" +fi + mkdir $VOL_BASE_DIR/sip mkdir $VOL_BASE_DIR/sip/unix cp osmo-sip-connector.cfg $VOL_BASE_DIR/sip/ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16324 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I2174e90bdea32f06cd3e8298696b93027e7906bc Gerrit-Change-Number: 16324 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:04:21 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 20:04:21 +0000 Subject: Change in osmo-msc[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15948 ) Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... Patch Set 6: whoa it is already merged?? I was working towards a smooth transition and adjusting the test suites before I was going to merge. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ie16f0804c4d99760cd4a0c544d0889b6313eebb7 Gerrit-Change-Number: 15948 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 20:04:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:10:00 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 20:10:00 +0000 Subject: Change in osmo-sip-connector[master]: MNCC v6: add optional SDP to the socket protocol In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 ) Change subject: MNCC v6: add optional SDP to the socket protocol ...................................................................... MNCC v6: add optional SDP to the socket protocol Add the new SDP section to the MNCC socket protocol, but do not yet implement forwarding SDP from SIP. Implementing SDP forwarding follows in a subsequent patch. It is still possible to establish a call with empty SDP: the new osmo-msc on the MT side, receiving an MNCC_SETUP_REQ, will hit an error log: "Got no information of remote audio codecs: neither SDP nor Bearer Capability. Trying anyway." and then hold thumbs to hit a codec match, analogous to previous behavior. Note that osmo-sip-connector should actually always have encoded a Bearer Capability in the MNCC protocol in the MT MNCC_SETUP_REQ message, but never has. Now we are ready to leapfrog from zero codec info to full SDP. This patch must be merged at the same time as osmo-msc patch Ie16f0804c4d99760cd4a0c544d0889b6313eebb7, so that both sides have a matching MNCC protocol version number. Change-Id: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 --- M src/call.h M src/mncc_protocol.h 2 files changed, 10 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve neels: Looks good to me, approved diff --git a/src/call.h b/src/call.h index bc772a4..7f67066 100644 --- a/src/call.h +++ b/src/call.h @@ -54,6 +54,11 @@ uint32_t payload_type; uint32_t payload_msg_type; + /* SDP as received for this call leg. If this is an MNCC call leg, contains the SDP most recently received in an + * MNCC message; if this is a SIP call leg, contains the SDP most recently received in a SIP message. If no SDP + * was received yet, this string is empty. Otherwise a nul terminated string. */ + char sdp[1024]; + /** * Remote started to ring/alert */ diff --git a/src/mncc_protocol.h b/src/mncc_protocol.h index 4950a77..b6f6635 100644 --- a/src/mncc_protocol.h +++ b/src/mncc_protocol.h @@ -158,6 +158,9 @@ unsigned char lchan_type; unsigned char lchan_mode; + + /* A buffer to contain SDP ('\0' terminated) */ + char sdp[1024]; }; struct gsm_data_frame { @@ -166,7 +169,7 @@ unsigned char data[0]; }; -#define MNCC_SOCK_VERSION 5 +#define MNCC_SOCK_VERSION 6 struct gsm_mncc_hello { uint32_t msg_type; uint32_t version; @@ -189,6 +192,7 @@ uint16_t port; uint32_t payload_type; uint32_t payload_msg_type; + char sdp[1024]; }; struct gsm_mncc_bridge { -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 Gerrit-Change-Number: 16221 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:17:28 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 20:17:28 +0000 Subject: Change in osmo-sip-connector[master]: logging from sofia: add missing newline In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 ) Change subject: logging from sofia: add missing newline ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220/1/src/sip.c File src/sip.c: https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220/1/src/sip.c at 674 PS1, Line 674: char *end = log_line + OSMO_MIN(strlen(log_line), sizeof(log_line) - 2); > No need to strlen(log_line) here, you should have available information from return of vsnprintf abo [?] Because of the OSMO_MIN() with the sizeof, you are actually correct. Just to make sure for future patches: vsnprintf() returns the strlen that *would* be written if the buffer were large enough. If that OSMO_MIN() weren't there, vsnprintf's rc would *not* qualify to ensure staying inside the buf. -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Ia26c0b57a0166cf7de87c49471ce6f528a366dd5 Gerrit-Change-Number: 16220 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 20:17:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:25:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 20:25:05 +0000 Subject: Change in osmo-sip-connector[master]: logging from sofia: add missing newline In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 to look at the new patch set (#2). Change subject: logging from sofia: add missing newline ...................................................................... logging from sofia: add missing newline Sometimes, logging from sofia lacks the final newline character, messing up log output. First snprintf() to a buffer, add '\n' if necessary and then log. Change-Id: Ia26c0b57a0166cf7de87c49471ce6f528a366dd5 --- M src/sip.c 1 file changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/20/16220/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Ia26c0b57a0166cf7de87c49471ce6f528a366dd5 Gerrit-Change-Number: 16220 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:27:17 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 20:27:17 +0000 Subject: Change in docker-playground[master]: for sip-latest tests, use MNCC version 5 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16324 ) Change subject: for sip-latest tests, use MNCC version 5 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16324 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I2174e90bdea32f06cd3e8298696b93027e7906bc Gerrit-Change-Number: 16324 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 20:27:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:27:54 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 20:27:54 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Remove unneeded cfg files In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 ) Change subject: pcu: Remove unneeded cfg files ...................................................................... Patch Set 1: Code-Review-1 Iwould ssume they are used if you want to run the testsuite outside of docker :) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie862a1525e9f4f9a3f2427ac3898810e3d044d2f Gerrit-Change-Number: 16321 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 20:27:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:28:23 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 20:28:23 +0000 Subject: Change in osmo-ttcn3-hacks[master]: introduce MNCC_Emulation mp_mncc_version In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16322 ) Change subject: introduce MNCC_Emulation mp_mncc_version ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16322 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3eb6e0132dc99ebe41a98cc5c329ed4864b770d6 Gerrit-Change-Number: 16322 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 20:28:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:28:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 20:28:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sip: bump MNCC version sent to sipcon to 6 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16323 ) Change subject: sip: bump MNCC version sent to sipcon to 6 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16323 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I39d55432776926a385e1b85b21bcdea8180a8946 Gerrit-Change-Number: 16323 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 20:28:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:31:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 20:31:42 +0000 Subject: Change in osmo-ccid-firmware[master]: add the talloc ctx to struct ccid_instance In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 ) Change subject: add the talloc ctx to struct ccid_instance ...................................................................... Patch Set 1: It's a bit of a question of taste. I would state we typically don't put talloc contexts in objects that are themselves not talloc-allocated (like g_ci which is statically allocated). Also, having the same talloc context (or really any information) stored twice seems a bit odd to me. But if you insist, go ahead... -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3b73e68d0347d74f68018614613fcc802f3fdfe7 Gerrit-Change-Number: 16318 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 20:31:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:32:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 20:32:44 +0000 Subject: Change in osmo-ccid-firmware[master]: fix the host/emulation build In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 ) Change subject: fix the host/emulation build ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/1/ccid_common/iso7816_3.c File ccid_common/iso7816_3.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/1/ccid_common/iso7816_3.c at 22 PS1, Line 22: #include "iso7816_3.h" that should probably be put in <> ? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e Gerrit-Change-Number: 16319 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 20:32:44 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:33:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 20:33:06 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: attempt to use iso7816_fsm + Cuart from firmware In-Reply-To: References: Message-ID: laforge has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16263 ) Change subject: WIP: attempt to use iso7816_fsm + Cuart from firmware ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9d65428edbd3e6c978024a255a65d4531f556f62 Gerrit-Change-Number: 16263 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:33:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 20:33:33 +0000 Subject: Change in osmo-ccid-firmware[master]: reenable host builds In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16320 ) Change subject: reenable host builds ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16320 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ie00468b7abcd1e9a3efe85b52f08a708430426fe Gerrit-Change-Number: 16320 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 20:33:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:34:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 20:34:56 +0000 Subject: Change in osmo-bsc[master]: bssap: Use new DTAP DLCI helper fields from libosmocore In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16260 ) Change subject: bssap: Use new DTAP DLCI helper fields from libosmocore ...................................................................... Patch Set 1: is that really worth it [which also means we require libosmocore master vs. some older tags]? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16260 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib72e2bda46e39d1075e4270ac5fa51df2f418164 Gerrit-Change-Number: 16260 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 28 Nov 2019 20:34:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 20:35:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 28 Nov 2019 20:35:05 +0000 Subject: Change in libosmo-sccp[master]: Skip dynamic ASPs when writing the list of ASPs in an AS In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16305 ) Change subject: Skip dynamic ASPs when writing the list of ASPs in an AS ...................................................................... Skip dynamic ASPs when writing the list of ASPs in an AS we handle this correctly in not writing the actual "asp" configuration, but we have a bug when writing the list of asps within one "as". Let's make sure to skip the dynamically-created ASPs there, too. Change-Id: I1a184f3ddec2e91ced8c95ada224da8b490407a8 Closes: OS#4284 --- M src/osmo_ss7_vty.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index ebae5a5..591254e 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1044,6 +1044,9 @@ struct osmo_ss7_asp *asp = as->cfg.asps[i]; if (!asp) continue; + /* skip any dynamically created ASPs (e.g. auto-created at connect time) */ + if (asp->dyn_allocated || asp->simple_client_allocated) + continue; vty_out(vty, " asp %s%s", asp->cfg.name, VTY_NEWLINE); } if (as->cfg.mode_set_by_vty) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16305 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I1a184f3ddec2e91ced8c95ada224da8b490407a8 Gerrit-Change-Number: 16305 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:00:30 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 21:00:30 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16189 ) Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... Patch Set 3: (3 comments) https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c File src/gsm/gsup.c: https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 910 PS3, Line 910: * Note: after calling this function, fields in the reply may reference the same memory as rx and are not deep-copied. > Ack that is what the osmo_gsup_req is for: it keeps the incoming message's state. This non-deep copying of gsup messages is happening all over the osmo-hlr and gsup client code base. We always keep the msgb around until the contents no longer matter. Note that a struct osmo_gsup_message is so far never dynamically allocated, anywhere. So if we wanted to deep-copy with dynamic allocations, we would open up a whole new refactoring slur all over the place. It's one of the things we should have designed better from the start, too late now in my opinion. The solution to allow caching (decoded) GSUP messages also asynchronously is the osmo_gsup_req API added in osmo-hlr.git, in libosmo-gsupclient. So far we never kept decoded GSUP asynchronously, but will do for D-GSM, and btw also strictly require this in order for proxy routing to be guaranteed to work: to copy the right routing information back to the response. Given that it's close to the IE layer, I thought here is the best place, but I'm going to move this into osmo_gsup_req now. You (I?) have just convinced me. https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 943 PS3, Line 943: if (!reply->imsi[0]) > Ack We almost nowhere do explicit '\0' char matching. I used to do that everywhere some years ago, but the million places where we just use '!' made me lose interest. I'd prefer to spend my time differently than reworking many patches for cosmetics. Functional flaws are much nicer to discuss, like above. https://gerrit.osmocom.org/c/libosmocore/+/16189/3/src/gsm/gsup.c at 985 PS3, Line 985: osmo_gsup_message_name_buf > _stringify()? _tostr() _sprint() ? [?] I do see what you mean. (for me '_name' turned out to be the API naming for "convert to human readable string", compare also OSMO_NAME_C_IMPL(), which then could have been OSMO_STR_C_IMPL() instead... I think we can still rename it, not released yet, is it? I'm fairly sure there are many places where I called functions foo_name even though they produce more than just a short name, so keep an eye out. OTOH this is another minor cosmetic up for interpretation...) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 21:00:30 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:49:38 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 21:49:38 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Remove unneeded cfg files In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 ) Change subject: pcu: Remove unneeded cfg files ...................................................................... Patch Set 1: > Patch Set 1: Code-Review-1 > > Iwould ssume they are used if you want to run the testsuite outside of docker :) I am sorry but I'm not understanding the rationale here. So osmo-bsc and osmo-bts are not run in the docker setup but they are run ins the non-docker one? I don't get that. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie862a1525e9f4f9a3f2427ac3898810e3d044d2f Gerrit-Change-Number: 16321 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 21:49:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:51:28 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 21:51:28 +0000 Subject: Change in osmo-sip-connector[master]: logging from sofia: add missing newline In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 ) Change subject: logging from sofia: add missing newline ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220/1/src/sip.c File src/sip.c: https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220/1/src/sip.c at 674 PS1, Line 674: char *end = log_line + OSMO_MIN(strlen(log_line), sizeof(log_line) - 2); > Because of the OSMO_MIN() with the sizeof, you are actually correct. [?] sure, you need to of course trim it to the size f the buffer if it's bigger, but still that's one comparison instead of counting 256 times :) -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Ia26c0b57a0166cf7de87c49471ce6f528a366dd5 Gerrit-Change-Number: 16220 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 21:51:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:53:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 21:53:05 +0000 Subject: Change in libosmocore[master]: add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16325 ) Change subject: add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req ...................................................................... add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req Related: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 --- M include/osmocom/gsm/gsup.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/16325/1 diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index c883dfb..eecbafb 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -203,6 +203,7 @@ #define OSMO_GSUP_IS_MSGT_REQUEST(msgt) (((msgt) & 0b00000011) == 0b00) #define OSMO_GSUP_IS_MSGT_ERROR(msgt) (((msgt) & 0b00000011) == 0b01) +#define OSMO_GSUP_TO_MSGT_RESULT(msgt) (((msgt) & 0b11111100) | 0b10) #define OSMO_GSUP_TO_MSGT_ERROR(msgt) (((msgt) & 0b11111100) | 0b01) extern const struct value_string osmo_gsup_message_type_names[]; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16325 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 Gerrit-Change-Number: 16325 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:53:30 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 21:53:30 +0000 Subject: Change in osmo-sip-connector[master]: logging from sofia: add missing newline In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 ) Change subject: logging from sofia: add missing newline ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Ia26c0b57a0166cf7de87c49471ce6f528a366dd5 Gerrit-Change-Number: 16220 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 21:53:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:53:39 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 21:53:39 +0000 Subject: Change in libosmocore[master]: add osmo_gsup_make_response() and osmo_gsup_message_name_*() In-Reply-To: References: Message-ID: neels has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16189 ) Change subject: add osmo_gsup_make_response() and osmo_gsup_message_name_*() ...................................................................... Abandoned absorbed in osmo_gsup_req.c in osmo-hlr -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16189 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id9692880079ea0f219f52d81b1923a76fc640566 Gerrit-Change-Number: 16189 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:53:57 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 21:53:57 +0000 Subject: Change in libosmocore[master]: add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16325 ) Change subject: add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16325 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 Gerrit-Change-Number: 16325 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 28 Nov 2019 21:53:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:54:45 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 21:54:45 +0000 Subject: Change in libosmocore[master]: add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req In-Reply-To: References: Message-ID: Hello pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16325 to look at the new patch set (#2). Change subject: add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req ...................................................................... add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req Related: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 --- M include/osmocom/gsm/gsup.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/16325/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16325 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 Gerrit-Change-Number: 16325 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:56:31 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 21:56:31 +0000 Subject: Change in libosmocore[master]: add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16325 ) Change subject: add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16325 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 Gerrit-Change-Number: 16325 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 28 Nov 2019 21:56:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:56:58 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 21:56:58 +0000 Subject: Change in libosmocore[master]: add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req In-Reply-To: References: Message-ID: Hello pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16325 to look at the new patch set (#3). Change subject: add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req ...................................................................... add OSMO_GSUP_TO_MSGT_RESULT(), needed by osmo-hlr: osmo_gsup_req Related: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 --- M include/osmocom/gsm/gsup.h 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/16325/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16325 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 Gerrit-Change-Number: 16325 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:58:31 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 21:58:31 +0000 Subject: Change in libosmocore[master]: add all missing OSMO_GSUP_TO_MSGT_*() macros In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16325 to look at the new patch set (#4). Change subject: add all missing OSMO_GSUP_TO_MSGT_*() macros ...................................................................... add all missing OSMO_GSUP_TO_MSGT_*() macros OSMO_GSUP_TO_MSGT_RESULT() is needed by osmo-hlr for osmo_gsup_req. The others are added for completeness' sake. Related: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 --- M include/osmocom/gsm/gsup.h 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/16325/4 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16325 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 Gerrit-Change-Number: 16325 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:59:11 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 21:59:11 +0000 Subject: Change in libosmocore[master]: add all missing OSMO_GSUP_TO_MSGT_*() macros In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16325 ) Change subject: add all missing OSMO_GSUP_TO_MSGT_*() macros ...................................................................... Patch Set 4: Code-Review+2 triviality +2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16325 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 Gerrit-Change-Number: 16325 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 21:59:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 21:59:17 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 28 Nov 2019 21:59:17 +0000 Subject: Change in docker-playground[master]: for sip-latest tests, use MNCC version 5 In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16324 ) Change subject: for sip-latest tests, use MNCC version 5 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16324 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I2174e90bdea32f06cd3e8298696b93027e7906bc Gerrit-Change-Number: 16324 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 21:59:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 22:01:35 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 22:01:35 +0000 Subject: Change in osmo-hlr[master]: refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 to look at the new patch set (#17). Change subject: refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt ...................................................................... refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt These are seemingly orthogonal changes in one patch, because they are in fact sufficiently intertwined that we are not willing to spend the time to separate them. They are also refactoring changes, unlikely to make sense on their own. ** lu_fsm: Attempting to make luop.c keep state about incoming GSUP requests made me find shortcomings in several places: - since it predates osmo_fsm, it is a state machine that does not strictly enforce the order of state transitions or the right sequence of incoming events. - several places OSMO_ASSERT() on data received from the network. - modifies the subscriber state before a LU is accepted. - dead code about canceling a subscriber in a previous VLR. That would be a good thing to actually do, which should also be trivial now that we record vlr_name and sgsn_name, but I decided to remove the dead code for now. To both step up the LU game *and* make it easier for me to integrate osmo_gsup_req handling, I decided to create a lu_fsm, drawing from my, by now, ample experience of writing osmo_fsms. ** osmo_gsup_req: Prepare for D-GSM, where osmo-hlr will do proxy routing for remote HLRs / communicate with remote MSCs via a proxy: a) It is important that a response that osmo-hlr generates and that is sent back to a requesting MSC contains all IEs that are needed to route it back to the requester. Particularly source_name must become destination_name in the response to be able to even reach the requesting MSC. Other fields are also necessary to match, which were so far taken care of in individual numerous code paths. b) For some operations, the response to a GSUP request is generated asynchronously (like Update Location Request -> Response, or taking the response from an EUSE, or the upcoming proxying to a remote HLR). To be able to feed a request message's information back into the response, we must thus keep the request data around. Since struct osmo_gsup_message references a lot of external data, usually with pointers directly into the received msgb, it is not so trivial to pass GSUP message data around asynchronously, on its own. osmo_gsup_req is the combined solution for both a and b: it keeps all data for a GSUP message by taking ownership of the incoming msgb, and it provides an explicit API "forcing" callers to respond with osmo_gsup_req_respond(), so that all code paths trivially are definitely responding with the correct IEs set to match the request's routing (by using osmo_gsup_make_response() recently added to libosmocore). Adjust all osmo-hlr code paths to use *only* osmo_gsup_req to respond to incoming requests received on the GSUP server (above LU code being one of them). In fact, the same should be done on the client side. Hence osmo_gsup_req is implemented in a server/client agnostic way, and is placed in libosmo-gsupclient. As soon as we see routing errors in complex GSUP setups, using osmo_gsup_req in the related GSUP client is likely to resolve those problems without much thinking required beyond making all code paths use it. libosmo-gsupclient is hence added to osmo-hlr binary's own library dependencies. It would have been added by the D-GSM proxy routing anyway, we are just doing it a little sooner. ** global_title.c / osmo_gt: We so far handle a Global Title a.k.a. an IPA unit name as pointer + size, or as just pointer with implicit talloc size. To ease working with GSUP peer identification data, I require: - a non-allocated storage of a Global Title. It brings the drawback of being size limited, but our current implementation is anyway only able to handle MSC and SGSN names of 31 characters (see struct hlr_subscriber). - a single-argument handle for Global Title, - easy to use utility functions like osmo_gt_name(), osmo_gt_cmp(), and copying by simple assignment, a = b. Hence this patch adds a osmo_gt in global_title.h and global_title.c. Heavily used in LU and osmo_gsup_req. Depends: libosmocore Id9692880079ea0f219f52d81b1923a76fc640566 Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 --- M configure.ac M include/Makefile.am A include/osmocom/gsupclient/global_title.h A include/osmocom/gsupclient/gsup_req.h M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/db.h M include/osmocom/hlr/gsup_router.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_ussd.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/lu_fsm.h D include/osmocom/hlr/luop.h M src/Makefile.am M src/db.c M src/db_hlr.c M src/gsup_router.c M src/gsup_send.c M src/gsup_server.c M src/gsupclient/Makefile.am A src/gsupclient/global_title.c M src/gsupclient/gsup_client.c A src/gsupclient/gsup_req.c M src/hlr.c M src/hlr_ussd.c M src/logging.c A src/lu_fsm.c D src/luop.c M tests/Makefile.am M tests/db/Makefile.am M tests/db/db_test.c M tests/db/db_test.err A tests/gsup/Makefile.am A tests/gsup/gsup_test.c A tests/gsup/gsup_test.err A tests/gsup/gsup_test.ok M tests/gsup_server/Makefile.am M tests/test_nodes.vty M tests/testsuite.at 39 files changed, 1,628 insertions(+), 904 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/05/16205/17 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 17 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 22:02:01 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 22:02:01 +0000 Subject: Change in libosmocore[master]: add all missing OSMO_GSUP_TO_MSGT_*() macros In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16325 ) Change subject: add all missing OSMO_GSUP_TO_MSGT_*() macros ...................................................................... add all missing OSMO_GSUP_TO_MSGT_*() macros OSMO_GSUP_TO_MSGT_RESULT() is needed by osmo-hlr for osmo_gsup_req. The others are added for completeness' sake. Related: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 --- M include/osmocom/gsm/gsup.h 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: neels: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index c883dfb..285bc0c 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -203,7 +203,10 @@ #define OSMO_GSUP_IS_MSGT_REQUEST(msgt) (((msgt) & 0b00000011) == 0b00) #define OSMO_GSUP_IS_MSGT_ERROR(msgt) (((msgt) & 0b00000011) == 0b01) +#define OSMO_GSUP_IS_MSGT_RESULT(msgt) (((msgt) & 0b00000011) == 0b10) +#define OSMO_GSUP_TO_MSGT_REQUEST(msgt) (((msgt) & 0b11111100)) #define OSMO_GSUP_TO_MSGT_ERROR(msgt) (((msgt) & 0b11111100) | 0b01) +#define OSMO_GSUP_TO_MSGT_RESULT(msgt) (((msgt) & 0b11111100) | 0b10) extern const struct value_string osmo_gsup_message_type_names[]; static inline const char * -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16325 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6e38a3bb8447f8f212f8d6f5b10a5d0df59323d7 Gerrit-Change-Number: 16325 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 22:06:44 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 22:06:44 +0000 Subject: Change in osmo-hlr[master]: add keepalive for gsup client/server, osmo-hlr In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/14741 ) Change subject: add keepalive for gsup client/server, osmo-hlr ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/14741/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-hlr/+/14741/2//COMMIT_MSG at 7 PS2, Line 7: add keepalive for gsup client/server, osmo-hlr a rationale / reason why would be interesting. For NAT? -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14741 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I01654d4a023e76a2b9245817a0096148c8bd44c1 Gerrit-Change-Number: 14741 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-CC: neels Gerrit-Comment-Date: Thu, 28 Nov 2019 22:06:44 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 22:30:31 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 22:30:31 +0000 Subject: Change in osmo-hlr[master]: D-GSM 2/n: implement mDNS method of mslookup server In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16257 to look at the new patch set (#7). Change subject: D-GSM 2/n: implement mDNS method of mslookup server ...................................................................... D-GSM 2/n: implement mDNS method of mslookup server Implement the mslookup server's mDNS responder, to actually service remote mslookup requests: - VTY mslookup/server config with service names, - the mslookup_mdns_server listening for mslookup requests, For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: I5cae6459090588b4dd292be90a5e8903432669d2 --- M include/osmocom/hlr/Makefile.am M include/osmocom/hlr/hlr.h M include/osmocom/hlr/hlr_vty.h M include/osmocom/hlr/mslookup_server.h A include/osmocom/hlr/mslookup_server_mdns.h M src/Makefile.am A src/dgsm_vty.c M src/hlr.c A src/mslookup_server_mdns.c M tests/test_nodes.vty M tests/test_subscriber.vty 11 files changed, 571 insertions(+), 66 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/57/16257/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5cae6459090588b4dd292be90a5e8903432669d2 Gerrit-Change-Number: 16257 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 22:39:50 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 22:39:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: introduce MNCC_Emulation mp_mncc_version In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16322 ) Change subject: introduce MNCC_Emulation mp_mncc_version ...................................................................... introduce MNCC_Emulation mp_mncc_version Default the MNCC version to the current osmo-sip-connector's master branch MNCC version. As soon as the new version (6) is merged, we can bump it here to make tests for master work again. For 'latest' builds, we can adjust osmo-ttcn3-hacks to use version 5, and also see those tests still passing. Change-Id: I3eb6e0132dc99ebe41a98cc5c329ed4864b770d6 --- M library/MNCC_Emulation.ttcn M sip/SIP_Tests.default 2 files changed, 6 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/library/MNCC_Emulation.ttcn b/library/MNCC_Emulation.ttcn index ee9b58e..9522e72 100644 --- a/library/MNCC_Emulation.ttcn +++ b/library/MNCC_Emulation.ttcn @@ -37,6 +37,10 @@ import from MNCC_Types all; import from UD_Types all; +modulepar { + int mp_mncc_version := 5; +} + /* General "base class" component definition, of which specific implementations * derive themselves by means of the "extends" feature */ type component MNCC_ConnHdlr { @@ -264,7 +268,7 @@ if (role_server) { f_listen(sock); - MNCC.send(t_SD_MNCC(g_mncc_ud_id, ts_MNCC_HELLO)); + MNCC.send(t_SD_MNCC(g_mncc_ud_id, ts_MNCC_HELLO(version := mp_mncc_version))); } else { f_connect(sock); } diff --git a/sip/SIP_Tests.default b/sip/SIP_Tests.default index 4434a1a..9fcd387 100644 --- a/sip/SIP_Tests.default +++ b/sip/SIP_Tests.default @@ -25,6 +25,7 @@ [MODULE_PARAMETERS] Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoSIPcon"; +MNCC_Emulation.mp_mncc_version := 5; [MAIN_CONTROLLER] -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16322 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3eb6e0132dc99ebe41a98cc5c329ed4864b770d6 Gerrit-Change-Number: 16322 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 22:39:50 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 22:39:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: sip: bump MNCC version sent to sipcon to 6 In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16323 ) Change subject: sip: bump MNCC version sent to sipcon to 6 ...................................................................... sip: bump MNCC version sent to sipcon to 6 Match commit Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 in osmo-sip-connector. Change-Id: I39d55432776926a385e1b85b21bcdea8180a8946 --- M library/MNCC_Emulation.ttcn M sip/SIP_Tests.default 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/library/MNCC_Emulation.ttcn b/library/MNCC_Emulation.ttcn index 9522e72..be087ec 100644 --- a/library/MNCC_Emulation.ttcn +++ b/library/MNCC_Emulation.ttcn @@ -38,7 +38,7 @@ import from UD_Types all; modulepar { - int mp_mncc_version := 5; + int mp_mncc_version := 6; } /* General "base class" component definition, of which specific implementations diff --git a/sip/SIP_Tests.default b/sip/SIP_Tests.default index 9fcd387..faf87c8 100644 --- a/sip/SIP_Tests.default +++ b/sip/SIP_Tests.default @@ -25,7 +25,7 @@ [MODULE_PARAMETERS] Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoSIPcon"; -MNCC_Emulation.mp_mncc_version := 5; +MNCC_Emulation.mp_mncc_version := 6; [MAIN_CONTROLLER] -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16323 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I39d55432776926a385e1b85b21bcdea8180a8946 Gerrit-Change-Number: 16323 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 22:45:22 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 22:45:22 +0000 Subject: Change in osmo-hlr[master]: D-GSM 3/n: implement roaming by mslookup in osmo-hlr In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16258 to look at the new patch set (#8). Change subject: D-GSM 3/n: implement roaming by mslookup in osmo-hlr ...................................................................... D-GSM 3/n: implement roaming by mslookup in osmo-hlr Add mslookup client to find remote home HLRs of unknown IMSIs, and proxy/forward GSUP for those to the right remote HLR instances. Add remote_hlr.c to manage one GSUP client per remote HLR GSUP address. Add proxy.c to keep state about remotely handled IMSIs (remote GSUP address, MSISDN, and probably more in future patches). The mslookup_server that determines whether a given MSISDN is attached locally now also needs to look in the proxy record: it is always the osmo-hlr immediately peering for the MSC that should respond to mslookup service address queries like SIP and SMPP. (Only gsup.hlr service is always answered by the home HLR.) Add dgsm.c to set up an mdns mslookup client, ask for IMSI homes, and to decide which GSUP is handled locally and which needs to go to a remote HLR. Add full VTY config and VTY tests. For a detailed overview of the D-GSM and mslookup related files, please see the elaborate comment at the top of mslookup.c (already added in an earlier patch). Change-Id: I2fe453553c90e6ee527ed13a13089900efd488aa --- M include/osmocom/hlr/Makefile.am A include/osmocom/hlr/dgsm.h M include/osmocom/hlr/gsup_server.h M include/osmocom/hlr/hlr.h M include/osmocom/hlr/logging.h A include/osmocom/hlr/proxy.h A include/osmocom/hlr/remote_hlr.h M src/Makefile.am A src/dgsm.c M src/dgsm_vty.c M src/hlr.c M src/hlr_vty.c M src/logging.c M src/mslookup_server.c M src/mslookup_server_mdns.c A src/proxy.c A src/remote_hlr.c M tests/test_nodes.vty 18 files changed, 1,847 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/58/16258/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I2fe453553c90e6ee527ed13a13089900efd488aa Gerrit-Change-Number: 16258 Gerrit-PatchSet: 8 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 23:05:19 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 23:05:19 +0000 Subject: Change in docker-playground[master]: for sip-latest tests, use MNCC version 5 In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16324 ) Change subject: for sip-latest tests, use MNCC version 5 ...................................................................... Patch Set 1: Verified+1 fake V+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16324 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I2174e90bdea32f06cd3e8298696b93027e7906bc Gerrit-Change-Number: 16324 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 28 Nov 2019 23:05:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Nov 28 23:05:24 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Thu, 28 Nov 2019 23:05:24 +0000 Subject: Change in docker-playground[master]: for sip-latest tests, use MNCC version 5 In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16324 ) Change subject: for sip-latest tests, use MNCC version 5 ...................................................................... for sip-latest tests, use MNCC version 5 osmo-sip-connector master and the ttcn3 tests have moved to protocol version 6. While the extension is gracefully handled by the ttcn templates to make do with both protocol versions, the actual protocol version number sent to osmo-sip-connector breaks the tests if it doesn't match. So that master can still run v6 yet also pass 'latest', configure v5 when the version is not 'master'. When 'latest' also moves to v6, we of course can revert this again. Related: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925 (osmo-sip-connector) Related: I39d55432776926a385e1b85b21bcdea8180a8946 (osmo-ttcn3-hacks) Change-Id: I2174e90bdea32f06cd3e8298696b93027e7906bc --- M ttcn3-sip-test/SIP_Tests.cfg M ttcn3-sip-test/jenkins.sh 2 files changed, 5 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved neels: Verified diff --git a/ttcn3-sip-test/SIP_Tests.cfg b/ttcn3-sip-test/SIP_Tests.cfg index 2904e76..1ced5c3 100644 --- a/ttcn3-sip-test/SIP_Tests.cfg +++ b/ttcn3-sip-test/SIP_Tests.cfg @@ -13,6 +13,7 @@ SIP_Tests.mp_local_host := "172.18.11.103" SIP_Tests.mp_osmosip_host := "172.18.11.10" SIP_Tests.mp_mncc := "/data/unix/mncc" +MNCC_Emulation.mp_mncc_version := 6 [MAIN_CONTROLLER] diff --git a/ttcn3-sip-test/jenkins.sh b/ttcn3-sip-test/jenkins.sh index 0bc0357..3d7d523 100755 --- a/ttcn3-sip-test/jenkins.sh +++ b/ttcn3-sip-test/jenkins.sh @@ -14,6 +14,10 @@ mkdir $VOL_BASE_DIR/sip-tester/unix cp SIP_Tests.cfg $VOL_BASE_DIR/sip-tester/ +if [ "x${IMAGE_SUFFIX}" != "xmaster" ]; then + sed -i 's/mp_mncc_version := [0-9]*/mp_mncc_version:= 5/' "$VOL_BASE_DIR/sip-tester/SIP_Tests.cfg" +fi + mkdir $VOL_BASE_DIR/sip mkdir $VOL_BASE_DIR/sip/unix cp osmo-sip-connector.cfg $VOL_BASE_DIR/sip/ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16324 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I2174e90bdea32f06cd3e8298696b93027e7906bc Gerrit-Change-Number: 16324 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Fri Nov 29 01:59:43 2019 From: admin at opensuse.org (OBS Notification) Date: Fri, 29 Nov 2019 01:59:43 +0000 Subject: Build failure of network:osmocom:nightly/osmo-ggsn in Debian_Unstable/x86_64 In-Reply-To: References: Message-ID: <5de07ba3e1f7_5fe12b0d88b705f0244334@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-ggsn/Debian_Unstable/x86_64 Package network:osmocom:nightly/osmo-ggsn failed to build in Debian_Unstable/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly osmo-ggsn Last lines of build log: [ 735s] [398/399] could not open tmpfile [ 735s] installing [ 735s] dpkg: error: unable to access the dpkg database directory /var/lib/dpkg: Read-only file system [ 735s] touch: cannot touch '//exit': Read-only file system [ 735s] rm: cannot remove '//.init_b_cache/asciidoc-dblatex.deb': Read-only file system [ 735s] /.build/init_buildsystem: line 990: //installed-pkg/asciidoc-dblatex: Read-only file system [ 735s] [399/399] could not open tmpfile [ 735s] installing [ 735s] dpkg: error: unable to access the dpkg database directory /var/lib/dpkg: Read-only file system [ 735s] touch: cannot touch '//exit': Read-only file system [ 735s] rm: cannot remove '//.init_b_cache/osmo-gsm-manuals-dev.deb': Read-only file system [ 735s] /.build/init_buildsystem: line 990: //installed-pkg/osmo-gsm-manuals-dev: Read-only file system [ 735s] configuring all installed packages... [ 735s] dpkg: error: unable to access the dpkg database directory /var/lib/dpkg: Read-only file system [ 735s] first configure attempt failed, trying again... [ 735s] dpkg: error: unable to access the dpkg database directory /var/lib/dpkg: Read-only file system [ 735s] chown: changing ownership of '/': Read-only file system [ 735s] [ 735s] cloud106 failed "build osmo-ggsn_1.4.0.27.1bf4.dsc" at Fri Nov 29 01:58:02 UTC 2019. [ 735s] [ 735s] /.build/build: line 428: /.build/_exitcode: Read-only file system [ 735s] chown: changing ownership of '/': Read-only file system [ 735s] ### VM INTERACTION START ### [ 739s] [ 511.600465] sysrq: SysRq : Power Off [ 739s] [ 511.618383] reboot: Power down [ 739s] ### VM INTERACTION END ### [ 739s] [ 739s] cloud106 failed "build osmo-ggsn_1.4.0.27.1bf4.dsc" at Fri Nov 29 01:59:32 UTC 2019. [ 739s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Fri Nov 29 06:04:41 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 06:04:41 +0000 Subject: Change in libosmocore[master]: Add code coverage support In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13496 ) Change subject: Add code coverage support ...................................................................... Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/13496 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6f4ffb91bd7f3dd070aa09dd16d5ad1faf130a4c Gerrit-Change-Number: 13496 Gerrit-PatchSet: 7 Gerrit-Owner: vvvelichkov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Reviewer: vvvelichkov Gerrit-Comment-Date: Fri, 29 Nov 2019 06:04:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 06:05:57 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 06:05:57 +0000 Subject: Change in osmo-trx[master]: Transceiver: Fix wrong response upon CMD HANDOVER failure In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/16261 ) Change subject: Transceiver: Fix wrong response upon CMD HANDOVER failure ...................................................................... Patch Set 1: Feel free to merge this change. I have no CR+2 rights on this project. -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I9d3f120b1696a9ce92c81097d04e81dbb717287d Gerrit-Change-Number: 16261 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 29 Nov 2019 06:05:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 07:21:09 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 07:21:09 +0000 Subject: Change in osmo-bsc[master]: bssap: Use new DTAP DLCI helper fields from libosmocore In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16260 ) Change subject: bssap: Use new DTAP DLCI helper fields from libosmocore ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-bsc/+/16260/1/src/osmo-bsc/osmo_bsc_bssap.c File src/osmo-bsc/osmo_bsc_bssap.c: https://gerrit.osmocom.org/c/osmo-bsc/+/16260/1/src/osmo-bsc/osmo_bsc_bssap.c at 1112 PS1, Line 1112: LOGP(DMSC, LOGL_INFO, "Rx MSC DTAP, SAPI: %s CHAN: %u\n", gsm0406_dlci_sapi_name(header->dlci_sapi), header->dlci_cc); I believe this is not the only place where you could use the new API. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16260 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib72e2bda46e39d1075e4270ac5fa51df2f418164 Gerrit-Change-Number: 16260 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 29 Nov 2019 07:21:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 07:41:06 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 07:41:06 +0000 Subject: Change in osmo-bts[master]: logging: remame category DSUM to DBTS, update description In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16145 ) Change subject: logging: remame category DSUM to DBTS, update description ...................................................................... Patch Set 1: > I think some other programs have DMAIN, maybe use that if a category is needed. OsmoHLR has DMAIN, while OsmoMSC and OsmoBSC use DMSC and DBSC respectively. > I wonder if we can completely remove that category. In general, yes. We don't have that much generic logging at the moment. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia9db783bc92b23ba87b4fdf1e4ed07d59ea6bbce Gerrit-Change-Number: 16145 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 29 Nov 2019 07:41:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 08:52:23 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 29 Nov 2019 08:52:23 +0000 Subject: Change in libosmocore[master]: Add code coverage support In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13496 ) Change subject: Add code coverage support ...................................................................... Patch Set 7: Code-Review+2 Cool feature! > It seems the Docker containers are not used for this build. This has changed, docker is now used for building almost everything: https://gerrit.osmocom.org/c/osmo-ci/+/15584 If enabling it by default in jenkins.sh is still desired, it could be done in a separate patch as this one is ready to get merged. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/13496 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6f4ffb91bd7f3dd070aa09dd16d5ad1faf130a4c Gerrit-Change-Number: 13496 Gerrit-PatchSet: 7 Gerrit-Owner: vvvelichkov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Reviewer: vvvelichkov Gerrit-Comment-Date: Fri, 29 Nov 2019 08:52:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 09:04:05 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 29 Nov 2019 09:04:05 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Remove unneeded cfg files In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 ) Change subject: pcu: Remove unneeded cfg files ...................................................................... Patch Set 1: > I am sorry but I'm not understanding the rationale here. So osmo-bsc and osmo-bts are not run in the docker setup but they are run ins the non-docker one? I don't get that. There is PCU_Tests.ttcn and PCU_Tests_RAW.ttcn. osmo-bsc and osmo-bts are needed for PCU_Tests.ttcn, which are not running in jenkins and are not working properly anymore, due to incompatibilities. I looked into this and was able to fix a few things up, but it was still not possible to run multiple tests after another. I had added the configs for PCU_Tests.ttcn. Instead of only deleting the configs, I think it would make more sense to delete PCU_Tests.ttcn along with the configs, since that is broken and we are only adding new tests to PCU_Tests_RAW.ttcn. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie862a1525e9f4f9a3f2427ac3898810e3d044d2f Gerrit-Change-Number: 16321 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 29 Nov 2019 09:04:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 09:25:42 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 29 Nov 2019 09:25:42 +0000 Subject: Change in osmo-hlr[master]: add mDNS lookup method to libosmo-mslookup In-Reply-To: References: Message-ID: osmith has uploaded a new patch set (#6) to the change originally created by neels. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16256 ) Change subject: add mDNS lookup method to libosmo-mslookup ...................................................................... add mDNS lookup method to libosmo-mslookup Add the first actually useful lookup method to the mslookup library: multicast DNS. The server side is added in a subsequent commit, when the mslookup server is implemented for the osmo-hlr program. Use custom DNS encoding instead of libc-ares (which we use in OsmoSGSN already), because libc-ares is only a DNS client implementation and we will need both client and server. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 --- M .gitignore M configure.ac M include/Makefile.am M include/osmocom/Makefile.am A include/osmocom/mslookup/Makefile.am A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_msg.h A include/osmocom/mslookup/mdns_rfc.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup_client_mdns.h M src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_rfc.c A src/mslookup/mdns_sock.c A src/mslookup/mslookup_client_mdns.c M tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err M tests/testsuite.at 22 files changed, 2,779 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/56/16256/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 Gerrit-Change-Number: 16256 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 09:27:59 2019 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 29 Nov 2019 09:27:59 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup abstract client In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup abstract client ...................................................................... Patch Set 15: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c File src/mslookup/mdns.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/9/src/mslookup/mdns.c at 127 PS9, Line 127: osmo_sockaddr_str_from_32(sockaddr_str, *(uint32_t *)rec->data, 0); > pespin's point here is that the beginning of the uint32_t may be at a memory address that doesn't ma [?] Fixed in "add mDNS lookup method to libosmo-mslookup" patch: https://gerrit.osmocom.org/c/osmo-hlr/+/16256/5..6 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 15 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 29 Nov 2019 09:27:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: neels Comment-In-Reply-To: osmith Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 10:29:47 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 10:29:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Remove unneeded cfg files In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 ) Change subject: pcu: Remove unneeded cfg files ...................................................................... Patch Set 1: > Instead of only deleting the configs, I think it would make more sense to delete PCU_Tests.ttcn along with the configs, since that is broken and we are only adding new tests to PCU_Tests_RAW.ttcn. Fine with me, any more opinions on this? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16321 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie862a1525e9f4f9a3f2427ac3898810e3d044d2f Gerrit-Change-Number: 16321 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 29 Nov 2019 10:29:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 10:31:29 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 10:31:29 +0000 Subject: Change in osmo-trx[master]: Transceiver: Fix wrong response upon CMD HANDOVER failure In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/16261 ) Change subject: Transceiver: Fix wrong response upon CMD HANDOVER failure ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I9d3f120b1696a9ce92c81097d04e81dbb717287d Gerrit-Change-Number: 16261 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 29 Nov 2019 10:31:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 10:31:32 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 10:31:32 +0000 Subject: Change in osmo-trx[master]: Transceiver: Fix wrong response upon CMD HANDOVER failure In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/16261 ) Change subject: Transceiver: Fix wrong response upon CMD HANDOVER failure ...................................................................... Transceiver: Fix wrong response upon CMD HANDOVER failure Change-Id: I9d3f120b1696a9ce92c81097d04e81dbb717287d --- M Transceiver52M/Transceiver.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index 9697bb3..27049b9 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -794,7 +794,7 @@ unsigned ts = 0, ss = 0; sscanf(params, "%u %u", &ts, &ss); if (ts > 7 || ss > 7) { - sprintf(response, "RSP NOHANDOVER 1 %u %u", ts, ss); + sprintf(response, "RSP HANDOVER 1 %u %u", ts, ss); } else { mHandover[ts][ss] = true; sprintf(response, "RSP HANDOVER 0 %u %u", ts, ss); -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I9d3f120b1696a9ce92c81097d04e81dbb717287d Gerrit-Change-Number: 16261 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 11:56:54 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 29 Nov 2019 11:56:54 +0000 Subject: Change in osmo-hlr[master]: add mslookup_manual_test In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16210 ) Change subject: add mslookup_manual_test ...................................................................... Patch Set 20: we don't really need to merge this, it is a candidate for code rot -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I80473528c9524263b60fc3ba37ba246c80bfe452 Gerrit-Change-Number: 16210 Gerrit-PatchSet: 20 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 29 Nov 2019 11:56:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 12:43:45 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 12:43:45 +0000 Subject: Change in osmo-pcu[master]: Remove dash from name used in VTY cmd prompt References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16326 ) Change subject: Remove dash from name used in VTY cmd prompt ...................................................................... Remove dash from name used in VTY cmd prompt Others projects don't contain a dash in there, and it seems to cause problems with TTCN3 VTY expectations. Change-Id: I3430abb5fc622dec293457466e760de95fa3a05c --- M osmoappdesc.py M src/pcu_vty.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/26/16326/1 diff --git a/osmoappdesc.py b/osmoappdesc.py index b3938f5..3bd418e 100644 --- a/osmoappdesc.py +++ b/osmoappdesc.py @@ -18,7 +18,7 @@ "osmo-pcu": ["doc/examples/osmo-pcu.cfg"] } -apps = [(4240, "src/osmo-pcu", "Osmo-PCU", "osmo-pcu"), +apps = [(4240, "src/osmo-pcu", "OsmoPCU", "osmo-pcu"), ] vty_command = ["src/osmo-pcu", "-c", "doc/examples/osmo-pcu.cfg"] diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 2fd57d0..555d48f 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -1216,7 +1216,7 @@ "There is NO WARRANTY, to the extent permitted by law.\r\n"; struct vty_app_info pcu_vty_info = { - .name = "Osmo-PCU", + .name = "OsmoPCU", .version = PACKAGE_VERSION, .copyright = pcu_copyright, .go_parent_cb = pcu_vty_go_parent, -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16326 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3430abb5fc622dec293457466e760de95fa3a05c Gerrit-Change-Number: 16326 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 12:46:08 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 12:46:08 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Add VTY support and use it to set (M)CS lqual thresholds References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16327 ) Change subject: pcu: Add VTY support and use it to set (M)CS lqual thresholds ...................................................................... pcu: Add VTY support and use it to set (M)CS lqual thresholds Requires osmo-pcu.git I3430abb5fc622dec293457466e760de95fa3a05c, before that commit OsmoPCU cmd prompt contained a dash which resulted in TTCN3 being unable to match it. Change-Id: I221675721b65b3ab44179e9657da70ba4004d7de --- M pcu/PCU_Tests.default M pcu/PCU_Tests_RAW.ttcn M pcu/gen_links.sh M pcu/regen_makefile.sh 4 files changed, 91 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/27/16327/1 diff --git a/pcu/PCU_Tests.default b/pcu/PCU_Tests.default index 2a87345..537744f 100644 --- a/pcu/PCU_Tests.default +++ b/pcu/PCU_Tests.default @@ -21,10 +21,20 @@ }, sgsn_role := true } +Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoPCU"; [TESTPORT_PARAMETERS] *.*.udpReuseAddress := "yes"; *.PCU.socket_type := "SEQPACKET" +*.PCUVTY.CTRL_MODE := "client" +*.PCUVTY.CTRL_HOSTNAME := "127.0.0.1" +*.PCUVTY.CTRL_PORTNUM := "4240" +*.PCUVTY.CTRL_LOGIN_SKIPPED := "yes" +*.PCUVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes" +*.PCUVTY.CTRL_READMODE := "buffered" +*.PCUVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes" +*.PCUVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes" +*.PCUVTY.PROMPT1 := "OsmoPCU> " [MAIN_CONTROLLER] diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 6129831..5bb5fa7 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -21,6 +21,9 @@ import from GSM_Types all; import from GSM_RR_Types all; +import from Osmocom_VTY_Functions all; +import from TELNETasp_PortType all; + import from RLCMAC_CSN1_Types all; import from RLCMAC_Types all; @@ -456,11 +459,42 @@ setverdict(pass); } +type record lqual_range { + /* component reference to the IPA_Client component used for RSL */ + uint8_t low, + uint8_t high +} + type component RAW_PCU_Test_CT extends bssgp_CT { /* Connection to the BTS component (one for now) */ port RAW_PCU_MSG_PT BTS; /* Connection to the PCUIF component */ port RAW_PCU_MSG_PT PCUIF; + /* VTY connection to the PCU */ + port TELNETasp_PT PCUVTY; + + /* Uplink CS/MCS thresholds, default from pcu_main.c: */ + var lqual_range g_cs_lqual_ranges[4] := {{low := 0, high := 6}, + {low := 5, high := 8}, + {low := 7, high := 13}, + {low := 12,high := 35}}; + var lqual_range g_mcs_lqual_ranges[9] := {{low := 0, high := 6}, + {low := 5, high := 8}, + {low := 7, high := 13}, + {low := 12,high := 15}, + {low := 14, high := 17}, + {low := 16, high := 18}, + {low := 17,high := 20}, + {low := 19, high := 24}, + {low := 23,high := 35}}; + var uint8_t g_cs_initial_dl := 1; + var uint8_t g_cs_initial_ul := 1; + var uint8_t g_mcs_initial_dl := 1; + var uint8_t g_mcs_initial_ul := 1; + var uint8_t g_cs_max_dl := 4; + var uint8_t g_cs_max_ul := 4; + var uint8_t g_mcs_max_dl := 9; + var uint8_t g_mcs_max_ul := 9; /* Guard timeout */ timer g_T_guard := 60.0; @@ -473,6 +507,43 @@ } } +private function f_pcuvty_set_allowed_cs_mcs() runs on RAW_PCU_Test_CT { + f_vty_config2(PCUVTY, {"pcu"}, "cs " & int2str(g_cs_initial_dl) & " " & int2str(g_cs_initial_ul)); + f_vty_config2(PCUVTY, {"pcu"}, "cs max " & int2str(g_cs_max_dl) & " " & int2str(g_cs_max_ul)); + + f_vty_config2(PCUVTY, {"pcu"}, "mcs " & int2str(g_mcs_initial_dl) & " " & int2str(g_mcs_initial_ul)); + f_vty_config2(PCUVTY, {"pcu"}, "mcs max " & int2str(g_mcs_max_dl) & " " & int2str(g_mcs_max_ul)); +} + +private function f_pcuvty_set_link_quality_ranges() runs on RAW_PCU_Test_CT { + var charstring cmd; + + cmd := "cs link-quality-ranges" & + " cs1 " & int2str(g_cs_lqual_ranges[0].high) & + " cs2 " & int2str(g_cs_lqual_ranges[1].low) & " " & int2str(g_cs_lqual_ranges[1].high) & + " cs3 " & int2str(g_cs_lqual_ranges[2].low) & " " & int2str(g_cs_lqual_ranges[2].high) & + " cs4 " & int2str(g_cs_lqual_ranges[3].low); + f_vty_config2(PCUVTY, {"pcu"}, cmd); + + cmd := "mcs link-quality-ranges" & + " mcs1 " & int2str(g_mcs_lqual_ranges[0].high) & + " mcs2 " & int2str(g_mcs_lqual_ranges[1].low) & " " & int2str(g_mcs_lqual_ranges[1].high) & + " mcs3 " & int2str(g_mcs_lqual_ranges[2].low) & " " & int2str(g_mcs_lqual_ranges[2].high) & + " mcs4 " & int2str(g_mcs_lqual_ranges[3].low) & " " & int2str(g_mcs_lqual_ranges[3].high) & + " mcs5 " & int2str(g_mcs_lqual_ranges[4].low) & " " & int2str(g_mcs_lqual_ranges[4].high) & + " mcs6 " & int2str(g_mcs_lqual_ranges[5].low) & " " & int2str(g_mcs_lqual_ranges[5].high) & + " mcs7 " & int2str(g_mcs_lqual_ranges[6].low) & " " & int2str(g_mcs_lqual_ranges[6].high) & + " mcs8 " & int2str(g_mcs_lqual_ranges[7].low) & " " & int2str(g_mcs_lqual_ranges[7].high) & + " mcs9 " & int2str(g_mcs_lqual_ranges[8].low); + f_vty_config2(PCUVTY, {"pcu"}, cmd); +} + +private function f_init_vty(charstring id) runs on RAW_PCU_Test_CT { + map(self:PCUVTY, system:PCUVTY); + f_vty_set_prompts(PCUVTY); + f_vty_transceive(PCUVTY, "enable"); +} + private function f_init_raw(charstring id, template (value) PCUIF_info_ind info_ind := ts_PCUIF_INFO_default) runs on RAW_PCU_Test_CT { var RAW_PCUIF_CT vc_PCUIF; @@ -492,6 +563,8 @@ connect(vc_BTS:PCUIF, vc_PCUIF:BTS); connect(vc_BTS:TC, self:BTS); + f_init_vty(id); + vc_PCUIF.start(f_PCUIF_CT_handler(mp_pcu_sock_path)); vc_BTS.start(f_BTS_CT_handler(0, valueof(info_ind))); @@ -967,6 +1040,9 @@ /* Initialize the PCU interface abstraction */ f_init_raw(testcasename()); + f_pcuvty_set_allowed_cs_mcs(); + f_pcuvty_set_link_quality_ranges(); + /* Establish an Uplink TBF */ ok := f_establish_tbf(rr_imm_ass); if (not ok) { diff --git a/pcu/gen_links.sh b/pcu/gen_links.sh index f9f6dd5..9ad318c 100755 --- a/pcu/gen_links.sh +++ b/pcu/gen_links.sh @@ -44,9 +44,12 @@ FILES="SNDCP_Types.ttcn" gen_links $DIR $FILES +DIR=$BASEDIR/titan.TestPorts.TELNETasp/src +FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" +gen_links $DIR $FILES DIR=../library -FILES="Misc_Helpers.ttcn General_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn L1CTL_PortType_CtrlFunct.ttcn L1CTL_PortType_CtrlFunctDef.cc LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn " +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn L1CTL_PortType_CtrlFunct.ttcn L1CTL_PortType_CtrlFunctDef.cc LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn " FILES+="NS_Emulation.ttcn NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc " FILES+="BSSGP_Emulation.ttcn Osmocom_Gb_Types.ttcn " FILES+="LLC_Templates.ttcn L3_Templates.ttcn L3_Common.ttcn " diff --git a/pcu/regen_makefile.sh b/pcu/regen_makefile.sh index ff712dc..c2f636d 100755 --- a/pcu/regen_makefile.sh +++ b/pcu/regen_makefile.sh @@ -1,5 +1,5 @@ #!/bin/sh -FILES="*.ttcn BSSGP_EncDec.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc UD_PT.cc RLCMAC_EncDec.cc LLC_EncDec.cc L1CTL_PortType_CtrlFunctDef.cc Native_FunctionDefs.cc" +FILES="*.ttcn BSSGP_EncDec.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc UD_PT.cc RLCMAC_EncDec.cc LLC_EncDec.cc L1CTL_PortType_CtrlFunctDef.cc TELNETasp_PT.cc Native_FunctionDefs.cc" ../regen-makefile.sh PCU_Tests.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16327 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I221675721b65b3ab44179e9657da70ba4004d7de Gerrit-Change-Number: 16327 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 12:48:11 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 12:48:11 +0000 Subject: Change in docker-playground[master]: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/16328 ) Change subject: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg ...................................................................... ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg Now that osmo-ttcn3-hacks.git I221675721b65b3ab44179e9657da70ba4004d7de introduced VTY support for PCU_Tests_RAW, we need to use the correct addr here. Change-Id: I6807dafd79e58750ffa953da30eb34671aa25808 --- M ttcn3-pcu-test/PCU_Tests.cfg 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/28/16328/1 diff --git a/ttcn3-pcu-test/PCU_Tests.cfg b/ttcn3-pcu-test/PCU_Tests.cfg index 07af661..2502fd2 100644 --- a/ttcn3-pcu-test/PCU_Tests.cfg +++ b/ttcn3-pcu-test/PCU_Tests.cfg @@ -5,6 +5,7 @@ [LOGGING] [TESTPORT_PARAMETERS] +*.PCUVTY.CTRL_HOSTNAME := "172.18.13.101" [MODULE_PARAMETERS] PCU_Tests_RAW.mp_pcu_sock_path := "/data/unix/pcu_bts" -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16328 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I6807dafd79e58750ffa953da30eb34671aa25808 Gerrit-Change-Number: 16328 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 13:30:21 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 29 Nov 2019 13:30:21 +0000 Subject: Change in osmo-hlr[master]: add mDNS lookup method to libosmo-mslookup In-Reply-To: References: Message-ID: Hello osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16256 to look at the new patch set (#7). Change subject: add mDNS lookup method to libosmo-mslookup ...................................................................... add mDNS lookup method to libosmo-mslookup Add the first actually useful lookup method to the mslookup library: multicast DNS. The server side is added in a subsequent commit, when the mslookup server is implemented for the osmo-hlr program. Use custom DNS encoding instead of libc-ares (which we use in OsmoSGSN already), because libc-ares is only a DNS client implementation and we will need both client and server. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 --- M .gitignore M configure.ac M include/Makefile.am M include/osmocom/Makefile.am A include/osmocom/mslookup/Makefile.am A include/osmocom/mslookup/mdns.h A include/osmocom/mslookup/mdns_msg.h A include/osmocom/mslookup/mdns_rfc.h A include/osmocom/mslookup/mdns_sock.h A include/osmocom/mslookup/mslookup_client_mdns.h M src/mslookup/Makefile.am A src/mslookup/mdns.c A src/mslookup/mdns_msg.c A src/mslookup/mdns_rfc.c A src/mslookup/mdns_sock.c A src/mslookup/mslookup_client_mdns.c M tests/mslookup/Makefile.am A tests/mslookup/mdns_test.c A tests/mslookup/mdns_test.err A tests/mslookup/mslookup_client_mdns_test.c A tests/mslookup/mslookup_client_mdns_test.err M tests/testsuite.at 22 files changed, 2,779 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/56/16256/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 Gerrit-Change-Number: 16256 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 13:30:21 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 29 Nov 2019 13:30:21 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup abstract client In-Reply-To: References: Message-ID: Hello fixeria, pespin, laforge, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 to look at the new patch set (#16). Change subject: add libosmo-mslookup abstract client ...................................................................... add libosmo-mslookup abstract client mslookup is a key concept in Distributed GSM, which allows querying the current location of a subscriber in a number of cooperating but independent core network sites, by arbitrary service names and by MSISDN/IMSI. Add the abstract mslookup client library. An actual lookup method (besides mslookup_client_fake.c) is added in a subsequent patch. For a detailed overview of this and upcoming patches, please see the elaborate comment at the top of mslookup.c. Add as separate library, libosmo-mslookup, to allow adding D-GSM capability to arbitrary client programs. osmo-hlr will be the only mslookup server implementation, added in a subsequent patch. osmo-hlr itself will also use this library and act as an mslookup client, when requesting the home HLR for locally unknown IMSIs. Related: OS#4237 Patch-by: osmith, nhofmeyr Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 --- M .gitignore M configure.ac M debian/control A debian/libosmo-mslookup-dev.install A debian/libosmo-mslookup0.install M include/Makefile.am M include/osmocom/hlr/logging.h A include/osmocom/mslookup/mslookup.h A include/osmocom/mslookup/mslookup_client.h A include/osmocom/mslookup/mslookup_client_fake.h A libosmo-mslookup.pc.in M src/Makefile.am A src/mslookup/Makefile.am A src/mslookup/mslookup.c A src/mslookup/mslookup_client.c A src/mslookup/mslookup_client_fake.c M tests/Makefile.am A tests/mslookup/Makefile.am A tests/mslookup/mslookup_client_test.c A tests/mslookup/mslookup_client_test.err A tests/mslookup/mslookup_test.c A tests/mslookup/mslookup_test.err M tests/testsuite.at 23 files changed, 1,620 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/02/16202/16 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 16 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 13:30:22 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 29 Nov 2019 13:30:22 +0000 Subject: Change in osmo-hlr[master]: mdns: properly zero initialize result data References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16335 ) Change subject: mdns: properly zero initialize result data ...................................................................... mdns: properly zero initialize result data Otherwise, if a response contained only one IP address version, the other one is random data. DDGSM DEBUG (IMSI-901700000014706) Resolved remote HLR, sending spooled GSUP messages: gsup.hlr.901700000014706.imsi -> ipv4: 127.0.0.1:4222 -> ipv6: ?`:0 (age=0) (last) (dgsm.c:93) Change-Id: Ie58ccc01e107cd2939ca782ab6fa5f6e16195433 --- M src/mslookup/mdns.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/35/16335/1 diff --git a/src/mslookup/mdns.c b/src/mslookup/mdns.c index 9eac7c6..198cebf 100644 --- a/src/mslookup/mdns.c +++ b/src/mslookup/mdns.c @@ -269,6 +269,8 @@ bool found_ip_v6 = false; struct osmo_sockaddr_str *expect_port_for = NULL; + *result = (struct osmo_mslookup_result){}; + result->rc = OSMO_MSLOOKUP_RC_NONE; llist_for_each_entry(rec, &ans->records, list) { -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16335 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie58ccc01e107cd2939ca782ab6fa5f6e16195433 Gerrit-Change-Number: 16335 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 13:30:23 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Fri, 29 Nov 2019 13:30:23 +0000 Subject: Change in osmo-hlr[master]: gsup_server: send routing error back to the correct peer References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16336 ) Change subject: gsup_server: send routing error back to the correct peer ...................................................................... gsup_server: send routing error back to the correct peer If a peer attempts to add a route to an ipa-name that we already have in the routing system, don't send the routing error to the peer that already has the name, but to the peer that attempts to re-use it and would cause the collision. This is fixing a situation where for example a locally attached MSC has name 'MSC-1', and a remote site is proxying GSUP here for a remote MSC that also has the name 'MSC-1'. Send the routing error back to the proxy, not local 'MSC-1'. Change-Id: Icafaedc11b5925149d338bdcb987ae985a7323d6 --- M src/gsup_server.c 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/36/16336/1 diff --git a/src/gsup_server.c b/src/gsup_server.c index 0071827..5c5f917 100644 --- a/src/gsup_server.c +++ b/src/gsup_server.c @@ -69,7 +69,15 @@ struct msgb *msg = osmo_gsup_msgb_alloc("GSUP Tx"); int rc; - conn = gsup_route_find_gt(server, &req->source_name); + if (response->message_type == OSMO_GSUP_MSGT_ROUTING_ERROR + && req->via_proxy.len) { + /* If a routing error occured, we need to route back via the immediate sending peer, not via the + * intended final recipient -- because one source of routing errors is a duplicate name for a recipient. + * If we resolve to req->source_name, we may send to a completely unrelated recipient. */ + conn = gsup_route_find_gt(server, &req->via_proxy); + } else { + conn = gsup_route_find_gt(server, &req->source_name); + } if (!conn) { LOG_GSUP_REQ(req, LOGL_ERROR, "GSUP client that sent this request was disconnected, cannot respond\n"); msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16336 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Icafaedc11b5925149d338bdcb987ae985a7323d6 Gerrit-Change-Number: 16336 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 15:07:59 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Fri, 29 Nov 2019 15:07:59 +0000 Subject: Change in osmo-hlr[master]: add keepalive for gsup client/server, osmo-hlr In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/14741 to look at the new patch set (#3). Change subject: add keepalive for gsup client/server, osmo-hlr ...................................................................... add keepalive for gsup client/server, osmo-hlr Related: OS#4069 Change-Id: I01654d4a023e76a2b9245817a0096148c8bd44c1 Depends: (libosmo-abis) Ie453fdee8bfd7fc1a3f1ed67ef0331f0abb1d59b --- M doc/manuals/vty/hlr_vty_reference.xml M include/osmocom/gsupclient/gsup_client.h M src/gsup_server.c M src/gsup_server.h M src/gsupclient/gsup_client.c M src/gsupclient/gsup_test_client.c M src/hlr.c M src/hlr.h M src/hlr_vty.c M src/osmo-euse-demo.c 10 files changed, 110 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/41/14741/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14741 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I01654d4a023e76a2b9245817a0096148c8bd44c1 Gerrit-Change-Number: 14741 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-CC: neels Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 15:14:24 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 15:14:24 +0000 Subject: Change in osmo-ttcn3-hacks[master]: WIP References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337 ) Change subject: WIP ...................................................................... WIP Change-Id: I3aa654e6f678698e5b8cb4914f1ca5b39fc08568 --- M pcu/PCU_Tests_RAW.ttcn 1 file changed, 153 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/16337/1 diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 5bb5fa7..b4692bd 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -1111,6 +1111,157 @@ } } +/* Test the max UL CS set by VTY works fine */ +testcase TC_cs_initial_ul() runs on RAW_PCU_Test_CT { + var GsmRrMessage rr_imm_ass; + var PacketUlAssign ul_tbf_ass; + var RlcmacDlBlock dl_block; + var boolean ok; + var integer lqual_cb := 0; + var ChCodingCommand last_ch_coding; + var template ChCodingCommand ch_coding_cs1 := CH_CODING_CS1; + var template ChCodingCommand ch_coding_cs3 := CH_CODING_CS3; + + /* Initialize the PCU interface abstraction */ + f_init_raw(testcasename()); + + /* Set initial UL CS to 3 */ + g_cs_initial_ul := 3; + f_pcuvty_set_allowed_cs_mcs(); + f_pcuvty_set_link_quality_ranges(); + + /* Take lqual (dB->cB) so that we stay in that CS */ + lqual_cb := g_cs_lqual_ranges[2].low * 10; + + /* Establish an Uplink TBF */ + ok := f_establish_tbf(rr_imm_ass); + if (not ok) { + setverdict(fail, "Failed to establish TBF"); + mtc.stop; + } + + ok := f_imm_ass_verify_ul_tbf_ass(rr_imm_ass, ul_tbf_ass); + if (not ok) { + setverdict(fail, "Immediate Assignment not an Uplink TBF"); + mtc.stop; + } + + var template (value) RlcmacUlBlock ul_data := t_RLCMAC_UL_DATA( + tfi := ul_tbf_ass.dynamic.tfi_assignment, + cv := 3, /* 8 UL blocks to be sent (to be overridden in loop) */ + bsn := 0, /* TODO: what should be here? */ + blocks := { /* To be generated in loop */ }); + + /* HACK: patch missing TLLI; otherwise OsmoPCU rejects DATA.req */ + ul_data.data.tlli := '00000001'O; + + /* 3 UL blocks, check we are in same initial CS: */ + for (var integer i := 0; i < 3; i := i + 1) { + /* Prepare a new UL block (CV, random payload) */ + ul_data.data.mac_hdr.countdown := (7 - i); + ul_data.data.blocks := { valueof(t_RLCMAC_LLCBLOCK(f_rnd_octstring(10))) }; + + /* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */ + f_tx_rlcmac_ul_block(ul_data, lqual_cb); + + /* Enqueue RTS.req, expect DATA.req with UL ACK from the PCU */ + f_rx_rlcmac_dl_block_exp_ack_nack(dl_block); + last_ch_coding := dl_block.ctrl.payload.u.ul_ack_nack.gprs.ch_coding_cmd; + } + + if (not match(last_ch_coding, ch_coding_cs3)) { + setverdict(fail, "Channel Coding does not match our expectations (CS-3): ", last_ch_coding); + mtc.stop; + } + + setverdict(pass); + + /* Remaining UL blocks are used to make sure regardless of initial + /* lqual, we can go lower at any time */ + + /* 5 UL blocks, check we are in same initial CS: */ + for (var integer i := 3; i < 8; i := i + 1) { + /* Prepare a new UL block (CV, random payload) */ + ul_data.data.mac_hdr.countdown := (7 - i); + ul_data.data.blocks := { valueof(t_RLCMAC_LLCBLOCK(f_rnd_octstring(10))) }; + + /* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */ + f_tx_rlcmac_ul_block(ul_data, 0); /* 0 dB, make sure we downgrade CS */ + + /* Enqueue RTS.req, expect DATA.req with UL ACK from the PCU */ + f_rx_rlcmac_dl_block_exp_ack_nack(dl_block); + + last_ch_coding := dl_block.ctrl.payload.u.ul_ack_nack.gprs.ch_coding_cmd; + } + + if (not match(last_ch_coding, ch_coding_cs1)) { + setverdict(fail, "Channel Coding does not match our expectations (CS-1): ", last_ch_coding); + } else { + setverdict(pass); + } +} + +/* Test the max UL CS set by VTY works fine */ +testcase TC_cs_max_ul() runs on RAW_PCU_Test_CT { + var GsmRrMessage rr_imm_ass; + var PacketUlAssign ul_tbf_ass; + var RlcmacDlBlock dl_block; + var boolean ok; + var ChCodingCommand last_ch_coding; + var template ChCodingCommand ch_coding_cs3 := CH_CODING_CS3; + + /* Initialize the PCU interface abstraction */ + f_init_raw(testcasename()); + + /* Set maximum allowed UL CS to 3 */ + g_cs_max_ul := 3; + f_pcuvty_set_allowed_cs_mcs(); + f_pcuvty_set_link_quality_ranges(); + + /* Establish an Uplink TBF */ + ok := f_establish_tbf(rr_imm_ass); + if (not ok) { + setverdict(fail, "Failed to establish TBF"); + mtc.stop; + } + + ok := f_imm_ass_verify_ul_tbf_ass(rr_imm_ass, ul_tbf_ass); + if (not ok) { + setverdict(fail, "Immediate Assignment not an Uplink TBF"); + mtc.stop; + } + + var template (value) RlcmacUlBlock ul_data := t_RLCMAC_UL_DATA( + tfi := ul_tbf_ass.dynamic.tfi_assignment, + cv := 15, /* 15 UL blocks to be sent (to be overridden in loop) */ + bsn := 0, /* TODO: what should be here? */ + blocks := { /* To be generated in loop */ }); + + /* HACK: patch missing TLLI; otherwise OsmoPCU rejects DATA.req */ + ul_data.data.tlli := '00000001'O; + + /* 16 UL blocks */ + for (var integer i := 0; i < 16; i := i + 1) { + /* Prepare a new UL block (CV, random payload) */ + ul_data.data.mac_hdr.countdown := (15 - i); + ul_data.data.blocks := { valueof(t_RLCMAC_LLCBLOCK(f_rnd_octstring(10))) }; + + /* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */ + f_tx_rlcmac_ul_block(ul_data, 40*10); /* 40 dB */ + + /* Enqueue RTS.req, expect DATA.req with UL ACK from the PCU */ + f_rx_rlcmac_dl_block_exp_ack_nack(dl_block); + + last_ch_coding := dl_block.ctrl.payload.u.ul_ack_nack.gprs.ch_coding_cmd; + } + + if (not match(last_ch_coding, ch_coding_cs3)) { + setverdict(fail, "Channel Coding does not match our expectations (CS-3): ", last_ch_coding); + } else { + setverdict(pass); + } +} + /* Verify PCU drops TBF after some time of inactivity. */ testcase TC_t3169() runs on RAW_PCU_Test_CT { var PCUIF_info_ind info_ind; @@ -1233,6 +1384,8 @@ execute( TC_ta_rach_imm_ass() ); execute( TC_ta_ptcch_ul_multi_tbf() ); execute( TC_cs_lqual_ul_tbf() ); + execute( TC_cs_initial_ul() ); + execute( TC_cs_max_ul() ); execute( TC_t3169() ); execute( TC_mo_ping_pong() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3aa654e6f678698e5b8cb4914f1ca5b39fc08568 Gerrit-Change-Number: 16337 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 15:15:25 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 15:15:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Introduce tests to check UL CS initial and max In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337 to look at the new patch set (#2). Change subject: pcu: Introduce tests to check UL CS initial and max ...................................................................... pcu: Introduce tests to check UL CS initial and max Related: OS#4286 Change-Id: I3aa654e6f678698e5b8cb4914f1ca5b39fc08568 --- M pcu/PCU_Tests_RAW.ttcn 1 file changed, 153 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/16337/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3aa654e6f678698e5b8cb4914f1ca5b39fc08568 Gerrit-Change-Number: 16337 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 15:17:20 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 15:17:20 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... Patch Set 3: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 29 Nov 2019 15:17:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 15:17:35 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 15:17:35 +0000 Subject: Change in docker-playground[master]: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16328 ) Change subject: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16328 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I6807dafd79e58750ffa953da30eb34671aa25808 Gerrit-Change-Number: 16328 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 29 Nov 2019 15:17:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 15:22:06 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 15:22:06 +0000 Subject: Change in osmo-gsm-tester[master]: WIP In-Reply-To: References: Message-ID: pespin has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16173 ) Change subject: WIP ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/16173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I15da34c9467e46ae92adbce5f671b344bea5ee5a Gerrit-Change-Number: 16173 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 16:51:40 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 16:51:40 +0000 Subject: Change in libosmo-abis[master]: add ipa pingp/pong keepalive for OML/RSL links between bts and bsc In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/14743 ) Change subject: add ipa pingp/pong keepalive for OML/RSL links between bts and bsc ...................................................................... Patch Set 7: (8 comments) https://gerrit.osmocom.org/c/libosmo-abis/+/14743/7/src/e1_input_vty.c File src/e1_input_vty.c: https://gerrit.osmocom.org/c/libosmo-abis/+/14743/7/src/e1_input_vty.c at 175 PS7, Line 175: Enable If there is a way to enable this feature, shouldn't there be a way to disable it? https://gerrit.osmocom.org/c/libosmo-abis/+/14743/7/src/e1_input_vty.c at 195 PS7, Line 195: line->driver->name, VTY_NEWLINE); Cosmetic: alignment. https://gerrit.osmocom.org/c/libosmo-abis/+/14743/7/src/e1_input_vty.c at 282 PS7, Line 282: line->ipa_kap->interval, line->ipa_kap->wait_for_resp, Cosmetic: alignment. https://gerrit.osmocom.org/c/libosmo-abis/+/14743/7/src/input/ipaccess.c File src/input/ipaccess.c: https://gerrit.osmocom.org/c/libosmo-abis/+/14743/7/src/input/ipaccess.c at 65 PS7, Line 65: Please use tabs. https://gerrit.osmocom.org/c/libosmo-abis/+/14743/7/src/input/ipaccess.c at 65 PS7, Line 65: int bool? https://gerrit.osmocom.org/c/libosmo-abis/+/14743/7/src/input/ipaccess.c at 103 PS7, Line 103: { coding style https://gerrit.osmocom.org/c/libosmo-abis/+/14743/7/src/input/ipaccess.c at 105 PS7, Line 105: send Cosmetic (not a merge blocker): send() without flags equals to write(). https://gerrit.osmocom.org/c/libosmo-abis/+/14743/7/src/input/ipaccess.c at 109 PS7, Line 109: { coding style -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/14743 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I30e3bd601e55355aaf738ee2f2c44c1ec2c46c6a Gerrit-Change-Number: 14743 Gerrit-PatchSet: 7 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 29 Nov 2019 16:51:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 16:52:47 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 16:52:47 +0000 Subject: Change in osmo-pcu[master]: Clarify (M)CS related VTY attributes In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16317 ) Change subject: Clarify (M)CS related VTY attributes ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16317 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4e890e924b094a1937fbd3794de96704cf0421a8 Gerrit-Change-Number: 16317 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 29 Nov 2019 16:52:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 16:56:04 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 16:56:04 +0000 Subject: Change in osmo-pcu[master]: Remove dash from name used in VTY cmd prompt In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16326 ) Change subject: Remove dash from name used in VTY cmd prompt ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/16326/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-pcu/+/16326/1//COMMIT_MSG at 9 PS1, Line 9: Others Other -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16326 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3430abb5fc622dec293457466e760de95fa3a05c Gerrit-Change-Number: 16326 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 29 Nov 2019 16:56:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 17:01:25 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 17:01:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Add VTY support and use it to set (M)CS lqual thresholds In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16327 ) Change subject: pcu: Add VTY support and use it to set (M)CS lqual thresholds ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16327 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I221675721b65b3ab44179e9657da70ba4004d7de Gerrit-Change-Number: 16327 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 29 Nov 2019 17:01:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 17:17:53 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 17:17:53 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Introduce tests to check UL CS initial and max In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337 ) Change subject: pcu: Introduce tests to check UL CS initial and max ...................................................................... Patch Set 2: Code-Review+1 (5 comments) Fine in general, just a few cosmetic comments. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337/2/pcu/PCU_Tests_RAW.ttcn File pcu/PCU_Tests_RAW.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337/2/pcu/PCU_Tests_RAW.ttcn at 1120 PS2, Line 1120: lqual_cb := 0; No need to initialize it here. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337/2/pcu/PCU_Tests_RAW.ttcn at 1172 PS2, Line 1172: match Can we just compare them like: last_ch_coding == CH_CODING_CS3? https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337/2/pcu/PCU_Tests_RAW.ttcn at 1197 PS2, Line 1197: match Can we just compare them like: last_ch_coding == CH_CODING_CS1? https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337/2/pcu/PCU_Tests_RAW.ttcn at 1236 PS2, Line 1236: 15 Cosmetic: actually, 16 (I also made this mistake in TC_cs_lqual_ul_tbf). https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337/2/pcu/PCU_Tests_RAW.ttcn at 1258 PS2, Line 1258: match same here -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3aa654e6f678698e5b8cb4914f1ca5b39fc08568 Gerrit-Change-Number: 16337 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 29 Nov 2019 17:17:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 17:19:31 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 17:19:31 +0000 Subject: Change in docker-playground[master]: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16328 ) Change subject: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16328 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I6807dafd79e58750ffa953da30eb34671aa25808 Gerrit-Change-Number: 16328 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 29 Nov 2019 17:19:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 17:20:02 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 17:20:02 +0000 Subject: Change in docker-playground[master]: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16328 ) Change subject: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16328 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I6807dafd79e58750ffa953da30eb34671aa25808 Gerrit-Change-Number: 16328 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 29 Nov 2019 17:20:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 17:34:23 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Fri, 29 Nov 2019 17:34:23 +0000 Subject: Change in osmo-ccid-firmware[master]: add the talloc ctx to struct ccid_instance In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 ) Change subject: add the talloc ctx to struct ccid_instance ...................................................................... Patch Set 1: > Patch Set 1: > > It's a bit of a question of taste. I would state we typically don't put talloc contexts in objects that are themselves not talloc-allocated (like g_ci which is statically allocated). > > Also, having the same talloc context (or really any information) stored twice seems a bit odd to me. But if you insist, go ahead... There is unfortunately no really pretty way of sharing the global context between host and fw builds, a global variable that is globally accessible is not really better, and now that it is part of the struct the global var can be removed later if it's no necessary for convenient debugging. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3b73e68d0347d74f68018614613fcc802f3fdfe7 Gerrit-Change-Number: 16318 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 29 Nov 2019 17:34:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 17:36:21 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Fri, 29 Nov 2019 17:36:21 +0000 Subject: Change in osmo-ccid-firmware[master]: fix the host/emulation build In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 to look at the new patch set (#2). Change subject: fix the host/emulation build ...................................................................... fix the host/emulation build Going for __ARM__ to distinguish host and firmware builds is not sufficient here, since we might be building on a ARM host, so there is now a OCTSIMFWBUILD define. Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e --- M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_3.c M ccid_common/iso7816_fsm.c M ccid_host/Makefile M sysmoOCTSIM/gcc/Makefile 5 files changed, 32 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/19/16319/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e Gerrit-Change-Number: 16319 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 17:36:50 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Fri, 29 Nov 2019 17:36:50 +0000 Subject: Change in osmo-ccid-firmware[master]: fix the host/emulation build In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 ) Change subject: fix the host/emulation build ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/1/ccid_common/iso7816_3.c File ccid_common/iso7816_3.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/1/ccid_common/iso7816_3.c at 22 PS1, Line 22: #include "iso7816_3.h" > that should probably be put in <> ? Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e Gerrit-Change-Number: 16319 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 29 Nov 2019 17:36:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 18:45:50 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 29 Nov 2019 18:45:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Introduce tests to check UL CS initial and max In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337 to look at the new patch set (#3). Change subject: pcu: Introduce tests to check UL CS initial and max ...................................................................... pcu: Introduce tests to check UL CS initial and max Related: OS#4286 Change-Id: I3aa654e6f678698e5b8cb4914f1ca5b39fc08568 --- M pcu/PCU_Tests_RAW.ttcn 1 file changed, 151 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/16337/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3aa654e6f678698e5b8cb4914f1ca5b39fc08568 Gerrit-Change-Number: 16337 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Nov 29 20:42:22 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 29 Nov 2019 20:42:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Introduce tests to check UL CS initial and max In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337 ) Change subject: pcu: Introduce tests to check UL CS initial and max ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16337 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3aa654e6f678698e5b8cb4914f1ca5b39fc08568 Gerrit-Change-Number: 16337 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 29 Nov 2019 20:42:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 02:04:17 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sat, 30 Nov 2019 02:04:17 +0000 Subject: Change in osmo-pcu[master]: Remove dash from name used in VTY cmd prompt In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16326 ) Change subject: Remove dash from name used in VTY cmd prompt ...................................................................... Patch Set 1: Code-Review+2 (because this ttcn3 pattern expects only \w word characters: [] pt.receive(pattern "\w+\(*\)\# ") { }; in osmo-ttcn3-hacks/library/Osmocom_VTY_Functions.ttcn) But writing OsmoPCU without a dash is a consistency fix in itself. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16326 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3430abb5fc622dec293457466e760de95fa3a05c Gerrit-Change-Number: 16326 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 02:04:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 02:07:05 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sat, 30 Nov 2019 02:07:05 +0000 Subject: Change in osmo-pcu[master]: Clarify (M)CS related VTY attributes In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16317 ) Change subject: Clarify (M)CS related VTY attributes ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16317 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4e890e924b094a1937fbd3794de96704cf0421a8 Gerrit-Change-Number: 16317 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 02:07:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 02:08:16 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sat, 30 Nov 2019 02:08:16 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Add VTY support and use it to set (M)CS lqual thresholds In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16327 ) Change subject: pcu: Add VTY support and use it to set (M)CS lqual thresholds ...................................................................... Patch Set 1: Code-Review+1 i don't understand the subject matter but code wise looks fine -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16327 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I221675721b65b3ab44179e9657da70ba4004d7de Gerrit-Change-Number: 16327 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 02:08:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 02:17:23 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sat, 30 Nov 2019 02:17:23 +0000 Subject: Change in libosmocore[master]: Add code coverage support In-Reply-To: References: Message-ID: neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13496 ) Change subject: Add code coverage support ...................................................................... Add code coverage support The coverage report shows what code is covered by tests and what is not and the ratio could be tracked over time. These reports will allow us to identify code that is not being tested and improve the test suites. To enable the reports configure with --enable-code-coverage and execute "make check-code-coverage". The HTML report will be generated in a subdirectory with name libosmocore-$(PACKAGE_VERSION)-coverage/index.html The report is generated using gcov, lcov and lcov_cobertura tools and the OSMO_AC_CODE_COVERAGE macro. The osmo_ax_code_coverage.m4 is a copy of ax_code_coverage.m4 taken from autoconf-archive v2018.03.13. It was copied to avoid the additional external dependency and renamed to avoid overwriting it in case autoconf-archive is already installed as we are going to install it in $(datadir)/aclocal in order to be reused in other osmocom's projects. Closes: OS#1987 Change-Id: I6f4ffb91bd7f3dd070aa09dd16d5ad1faf130a4c --- M .gitignore M Makefile.am M configure.ac M debian/libosmocore-dev.install A m4/osmo_ac_code_coverage.m4 A m4/osmo_ax_code_coverage.m4 6 files changed, 330 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index 51c443f..5224233 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,7 @@ # vi files *.sw? /tests/libsercomstub.a + +# code coverage reports +libosmocore-*-coverage* +coverage-cobertura.xml diff --git a/Makefile.am b/Makefile.am index 2e73f72..7b6ba0a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,12 @@ pkgconfig_DATA = libosmocore.pc libosmocodec.pc libosmovty.pc libosmogsm.pc \ libosmogb.pc libosmoctrl.pc libosmocoding.pc libosmosim.pc +aclocaldir = $(datadir)/aclocal +dist_aclocal_DATA = m4/osmo_ac_code_coverage.m4 \ + m4/osmo_ax_code_coverage.m4 + @RELMAKE@ + at CODE_COVERAGE_RULES@ relengdir = $(includedir) releng_DATA = osmo-release.mk diff --git a/configure.ac b/configure.ac index 6c54e66..060d081 100644 --- a/configure.ac +++ b/configure.ac @@ -357,6 +357,8 @@ AM_CONDITIONAL(HAVE_SSE4_1, false) fi +OSMO_AC_CODE_COVERAGE + dnl Check if the compiler supports specified GCC's built-in function AC_DEFUN([CHECK_BUILTIN_SUPPORT], [ AC_CACHE_CHECK( diff --git a/debian/libosmocore-dev.install b/debian/libosmocore-dev.install index 944a7bf..4a7e0af 100644 --- a/debian/libosmocore-dev.install +++ b/debian/libosmocore-dev.install @@ -4,3 +4,4 @@ usr/lib/*/lib*.la usr/lib/*/pkgconfig/* usr/bin/osmo-release.sh +usr/share/aclocal/osmo*.m4 diff --git a/m4/osmo_ac_code_coverage.m4 b/m4/osmo_ac_code_coverage.m4 new file mode 100644 index 0000000..7921db5 --- /dev/null +++ b/m4/osmo_ac_code_coverage.m4 @@ -0,0 +1,51 @@ +AC_DEFUN([OSMO_AC_CODE_COVERAGE],[ + dnl Check for --enable-code-coverage + AC_REQUIRE([OSMO_AX_CODE_COVERAGE]) + AC_REQUIRE([AX_CHECK_COMPILE_FLAG]) + + AS_IF([ test "x$enable_code_coverage" = "xyes" ], [ + # Check whether --coverage flags is supported and add it to CFLAGS + # When it is not supported add CODE_COVERAGE_CFLAGS to CFLAGS instead + AX_CHECK_COMPILE_FLAG([--coverage], + [CFLAGS="$CFLAGS -O0 -g --coverage"], + [CFLAGS="$CFLAGS $CODE_COVERAGE_CFLAGS"]) + + # Add both the absolute source and build directories to the coverage directories. + CODE_COVERAGE_DIRECTORY='$(abspath $(abs_top_srcdir)) $(abspath $(abs_top_builddir))' + AC_SUBST(CODE_COVERAGE_DIRECTORY) + + # Enable branch coverage by default + CODE_COVERAGE_BRANCH_COVERAGE='1' + AC_SUBST(CODE_COVERAGE_BRANCH_COVERAGE) + + # Exclude external files by default + CODE_COVERAGE_LCOV_OPTIONS='$(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) --no-external' + AC_SUBST(CODE_COVERAGE_LCOV_OPTIONS) + + # Exclude tests sources from the coverage report + CODE_COVERAGE_IGNORE_PATTERN='"$(abspath $(abs_top_srcdir))/tests/*"' + AC_SUBST(CODE_COVERAGE_IGNORE_PATTERN) + + # lcov_cobertura is needed only when you want to export the coverage report in + # the Cobertura's XML format supported by Jenkin's Cobertura plugin + AC_CHECK_PROG([LCOV_COBERTURA], [lcov_cobertura], [lcov_cobertura]) + AS_IF([test "x$LCOV_COBERTURA" != "xno"], [m4_pattern_allow([AM_V_GEN]) CODE_COVERAGE_RULES+=' +coverage-cobertura.xml: $(CODE_COVERAGE_OUTPUT_FILE) + $(AM_V_GEN)$(LCOV_COBERTURA) -b $(top_srcdir) -o $$@@ $(CODE_COVERAGE_OUTPUT_FILE) + +.PHONY: code-coverage-cobertura +code-coverage-cobertura: code-coverage-capture coverage-cobertura.xml +' + ], [CODE_COVERAGE_RULES+=' +.PHONY: code-coverage-cobertura +code-coverage-cobertura: + @echo "Need to install lcov_cobertura" +' + ]) + ], [CODE_COVERAGE_RULES+=' +.PHONY: code-coverage-cobertura +code-coverage-cobertura: + @echo "Need to and reconfigure with --enable-code-coverage" +' + ]) +]) diff --git a/m4/osmo_ax_code_coverage.m4 b/m4/osmo_ax_code_coverage.m4 new file mode 100644 index 0000000..23cebb0 --- /dev/null +++ b/m4/osmo_ax_code_coverage.m4 @@ -0,0 +1,267 @@ +# +# Renamed version of AX_CODE_COVERAGE macro from autoconf-archive v2018.03.13 +# +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html +# =========================================================================== +# +# SYNOPSIS +# +# OSMO_AX_CODE_COVERAGE() +# +# DESCRIPTION +# +# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, +# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included +# in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every +# build target (program or library) which should be built with code +# coverage support. Also defines CODE_COVERAGE_RULES which should be +# substituted in your Makefile; and $enable_code_coverage which can be +# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined +# and substituted, and corresponds to the value of the +# --enable-code-coverage option, which defaults to being disabled. +# +# Test also for gcov program and create GCOV variable that could be +# substituted. +# +# Note that all optimization flags in CFLAGS must be disabled when code +# coverage is enabled. +# +# Usage example: +# +# configure.ac: +# +# OSMO_AX_CODE_COVERAGE +# +# Makefile.am: +# +# @CODE_COVERAGE_RULES@ +# my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ... +# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... +# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... +# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... +# +# This results in a "check-code-coverage" rule being added to any +# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module +# has been configured with --enable-code-coverage). Running `make +# check-code-coverage` in that directory will run the module's test suite +# (`make check`) and build a code coverage report detailing the code which +# was touched, then print the URI for the report. +# +# In earlier versions of this macro, CODE_COVERAGE_LDFLAGS was defined +# instead of CODE_COVERAGE_LIBS. They are both still defined, but use of +# CODE_COVERAGE_LIBS is preferred for clarity; CODE_COVERAGE_LDFLAGS is +# deprecated. They have the same value. +# +# This code was derived from Makefile.decl in GLib, originally licenced +# under LGPLv2.1+. +# +# LICENSE +# +# Copyright (c) 2012, 2016 Philip Withnall +# Copyright (c) 2012 Xan Lopez +# Copyright (c) 2012 Christian Persch +# Copyright (c) 2012 Paolo Borelli +# Copyright (c) 2012 Dan Winship +# Copyright (c) 2015 Bastien ROUCARIES +# +# 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 2.1 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 program. If not, see . + +#serial 25 + +AC_DEFUN([OSMO_AX_CODE_COVERAGE],[ + dnl Check for --enable-code-coverage + AC_REQUIRE([AC_PROG_SED]) + + # allow to override gcov location + AC_ARG_WITH([gcov], + [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) + + AC_MSG_CHECKING([whether to build with code coverage support]) + AC_ARG_ENABLE([code-coverage], + AS_HELP_STRING([--enable-code-coverage], + [Whether to enable code coverage support]),, + enable_code_coverage=no) + + AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) + AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) + AC_MSG_RESULT($enable_code_coverage) + + AS_IF([ test "$enable_code_coverage" = "yes" ], [ + # check for gcov + AC_CHECK_TOOL([GCOV], + [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], + [:]) + AS_IF([test "X$GCOV" = "X:"], + [AC_MSG_ERROR([gcov is needed to do coverage])]) + AC_SUBST([GCOV]) + + dnl Check if gcc is being used + AS_IF([ test "$GCC" = "no" ], [ + AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) + ]) + + AC_CHECK_PROG([LCOV], [lcov], [lcov]) + AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) + + AS_IF([ test -z "$LCOV" ], [ + AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed]) + ]) + + AS_IF([ test -z "$GENHTML" ], [ + AC_MSG_ERROR([Could not find genhtml from the lcov package]) + ]) + + dnl Build the code coverage flags + dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_LIBS="-lgcov" + CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" + + AC_SUBST([CODE_COVERAGE_CPPFLAGS]) + AC_SUBST([CODE_COVERAGE_CFLAGS]) + AC_SUBST([CODE_COVERAGE_CXXFLAGS]) + AC_SUBST([CODE_COVERAGE_LIBS]) + AC_SUBST([CODE_COVERAGE_LDFLAGS]) + + [CODE_COVERAGE_RULES_CHECK=' + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +'] + [CODE_COVERAGE_RULES_CAPTURE=' + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + - at rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +'] + [CODE_COVERAGE_RULES_CLEAN=' +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +'] + ], [ + [CODE_COVERAGE_RULES_CHECK=' + @echo "Need to reconfigure with --enable-code-coverage" +'] + CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK" + CODE_COVERAGE_RULES_CLEAN='' + ]) + +[CODE_COVERAGE_RULES=' +# Code coverage +# +# Optional: +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. +# (Default: $(top_builddir)) +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated +# by lcov for code coverage. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage +# reports to be created. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore +# +# The generated report will be titled using the $(PACKAGE_NAME) and +# $(PACKAGE_VERSION). In order to add the current git hash to the title, +# use the git-version-gen script, available online. + +# Optional variables +CODE_COVERAGE_DIRECTORY ?= $(top_builddir) +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +CODE_COVERAGE_IGNORE_PATTERN ?= + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) + +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); +code_coverage_quiet = $(code_coverage_quiet_$(V)) +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) +code_coverage_quiet_0 = --quiet + +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + +# Use recursive makes in order to ignore errors during check +check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"' + +# Capture code coverage data +code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"' + +# Hook rule executed before code-coverage-capture, overridable by the user +code-coverage-capture-hook: + +'"$CODE_COVERAGE_RULES_CLEAN"' + +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage + +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean +'] + + AC_SUBST([CODE_COVERAGE_RULES]) + m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])]) +]) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/13496 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6f4ffb91bd7f3dd070aa09dd16d5ad1faf130a4c Gerrit-Change-Number: 13496 Gerrit-PatchSet: 8 Gerrit-Owner: vvvelichkov Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Reviewer: vvvelichkov Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 02:23:38 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sat, 30 Nov 2019 02:23:38 +0000 Subject: Change in libosmocore[master]: core/defs.h: introduce and use OSMO_DEPRECATED_OUTSIDE In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14864 ) Change subject: core/defs.h: introduce and use OSMO_DEPRECATED_OUTSIDE ...................................................................... Patch Set 3: (2 comments) This change is ready for review. https://gerrit.osmocom.org/c/libosmocore/+/14864/3/include/osmocom/core/defs.h File include/osmocom/core/defs.h: https://gerrit.osmocom.org/c/libosmocore/+/14864/3/include/osmocom/core/defs.h at 46 PS3, Line 46: # define OSMO_DEPRECATED_OUTSIDE(text) > It's more clear if you keep and extend older name: [?] since this macro is by definition only used within libosmocore, we don't need to keep the older variant around. We can simply replace all occurences of it and use the new text version everywhere. https://gerrit.osmocom.org/c/libosmocore/+/14864/3/include/osmocom/gsm/gsm48_ie.h File include/osmocom/gsm/gsm48_ie.h: https://gerrit.osmocom.org/c/libosmocore/+/14864/3/include/osmocom/gsm/gsm48_ie.h at 18 PS3, Line 18: OSMO_DEPRECATED_OUTSIDE("Use gsm48_decode_bcd_number2() for improved bounds checking"); > Why shouldn't libosmocore use gsm48_decode_bcd_number2? [?] probably for unit tests. It should still be deprecated in libosmocore, just not in unit tests, right? I think I've used switch-off-deprecation pragmas before somewhere for that purpose... a drawback might be that those aren't compiler portable, IIUC. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14864 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1b0eff1396776900c1286e41da3aee3ff78b326e Gerrit-Change-Number: 14864 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 02:23:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 02:28:20 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sat, 30 Nov 2019 02:28:20 +0000 Subject: Change in osmo-ccid-firmware[master]: add the talloc ctx to struct ccid_instance In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 ) Change subject: add the talloc ctx to struct ccid_instance ...................................................................... Patch Set 1: (common usage wise, we often have talloc ctx as globals, or use a dynamically allocated struct as talloc ctx, or most often pass the talloc ctx as function argument. This is the first instance I'm seeing where a ctx is stored as a struct member) -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3b73e68d0347d74f68018614613fcc802f3fdfe7 Gerrit-Change-Number: 16318 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-CC: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 02:28:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 02:35:02 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sat, 30 Nov 2019 02:35:02 +0000 Subject: Change in osmo-ccid-firmware[master]: fix the host/emulation build In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 ) Change subject: fix the host/emulation build ...................................................................... Patch Set 2: (3 comments) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/2/ccid_common/ccid_slot_fsm.c File ccid_common/ccid_slot_fsm.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/2/ccid_common/ccid_slot_fsm.c at 337 PS2, Line 337: char id_buf[3+2+1]; (a comment explaining magic nrs could be nice) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/2/ccid_common/ccid_slot_fsm.c at 344 PS2, Line 344: I'm not sure if it is at all realistic, but code wise this could verify that cs->slot_nr is < 100 (2 digits) or alternatively check snprintf() return value? https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/2/ccid_common/iso7816_fsm.c File ccid_common/iso7816_fsm.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/2/ccid_common/iso7816_fsm.c at 1216 PS2, Line 1216: #if 0 never? then just drop it? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e Gerrit-Change-Number: 16319 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 02:35:02 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 02:40:58 2019 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Sat, 30 Nov 2019 02:40:58 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ci/+/16226/3/ansible/roles/gsm-tester-network/templates/etc/iptables-ogt File ansible/roles/gsm-tester-network/templates/etc/iptables-ogt: https://gerrit.osmocom.org/c/osmo-ci/+/16226/3/ansible/roles/gsm-tester-network/templates/etc/iptables-ogt at 7 PS3, Line 7: if [ "x$($IPT -t nat -S | grep "\-A POSTROUTING -o {{ gw_interface }} -j MASQUERADE" -c)" = "x0" ]; then (slightly easier to read could be if [ -z "$($IPT... | grep "...") ]; then ) -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 02:40:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:26:48 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:26:48 +0000 Subject: Change in osmo-ccid-firmware[master]: add the talloc ctx to struct ccid_instance In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 ) Change subject: add the talloc ctx to struct ccid_instance ...................................................................... Patch Set 1: I agreed with heels. Let's try to be consistent within the osmocom universe, no problem to have some global variables for talloc contexts. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3b73e68d0347d74f68018614613fcc802f3fdfe7 Gerrit-Change-Number: 16318 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-CC: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 09:26:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:28:12 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:28:12 +0000 Subject: Change in osmo-ccid-firmware[master]: fix the host/emulation build In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 ) Change subject: fix the host/emulation build ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e Gerrit-Change-Number: 16319 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 09:28:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:29:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:29:42 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Enable ip forwarding and masquerading on boot In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/16226 ) Change subject: ansible: gsm-tester: Enable ip forwarding and masquerading on boot ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927 Gerrit-Change-Number: 16226 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 09:29:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:32:00 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:32:00 +0000 Subject: Change in osmo-pcu[master]: Remove dash from name used in VTY cmd prompt In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16326 ) Change subject: Remove dash from name used in VTY cmd prompt ...................................................................... Patch Set 1: Code-Review+1 Isnt there also some parts of the manual that quote the vty in asciidoc (and hence needs updates?) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16326 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3430abb5fc622dec293457466e760de95fa3a05c Gerrit-Change-Number: 16326 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 09:32:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:33:06 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:33:06 +0000 Subject: Change in osmo-ttcn3-hacks[master]: pcu: Add VTY support and use it to set (M)CS lqual thresholds In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16327 ) Change subject: pcu: Add VTY support and use it to set (M)CS lqual thresholds ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16327 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I221675721b65b3ab44179e9657da70ba4004d7de Gerrit-Change-Number: 16327 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 09:33:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:34:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:34:03 +0000 Subject: Change in osmo-pcu[master]: Clarify (M)CS related VTY attributes In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16317 ) Change subject: Clarify (M)CS related VTY attributes ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16317 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4e890e924b094a1937fbd3794de96704cf0421a8 Gerrit-Change-Number: 16317 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 09:34:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:34:10 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:34:10 +0000 Subject: Change in osmo-pcu[master]: Clarify (M)CS related VTY attributes In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16317 ) Change subject: Clarify (M)CS related VTY attributes ...................................................................... Clarify (M)CS related VTY attributes Some are used to control (M)CS values for downlink while some do it for uplink. Let's make clear which one is used for what. Take the chance to document the fields a bit better than they were. Some more information about the origin of cs_downgrade_threshold can be found in the commit introducing it: 70b96aa232bd9784a94247bf7b193cb2147ada9d. Related: OS#4286 Change-Id: I4e890e924b094a1937fbd3794de96704cf0421a8 --- M doc/manuals/vty/osmo-pcu_vty_reference.xml M src/bts.h M src/pcu_vty.c 3 files changed, 17 insertions(+), 14 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve neels: Looks good to me, approved laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/manuals/vty/osmo-pcu_vty_reference.xml b/doc/manuals/vty/osmo-pcu_vty_reference.xml index eed4d83..da6c76c 100644 --- a/doc/manuals/vty/osmo-pcu_vty_reference.xml +++ b/doc/manuals/vty/osmo-pcu_vty_reference.xml @@ -1536,7 +1536,7 @@ - + @@ -1545,13 +1545,13 @@ - + - + @@ -1559,13 +1559,13 @@ - + - + @@ -1581,7 +1581,7 @@ - + diff --git a/src/bts.h b/src/bts.h index 54a29cb..7ef5a3f 100644 --- a/src/bts.h +++ b/src/bts.h @@ -142,12 +142,15 @@ /* 0 to support resegmentation in DL, 1 for no reseg */ uint8_t dl_arq_type; - uint8_t cs_adj_enabled; - uint8_t cs_adj_upper_limit; - uint8_t cs_adj_lower_limit; + uint8_t cs_adj_enabled; /* whether cs_adj_{upper,lower}_limit are used to adjust DL CS */ + uint8_t cs_adj_upper_limit; /* downgrade DL CS if error rate above its value */ + uint8_t cs_adj_lower_limit; /* upgrade DL CS if error rate below its value */ + /* downgrade DL CS when less than specified octets are left in tx queue. Optimization, see paper: + "Theoretical Analysis of GPRS Throughput and Delay" */ + uint16_t cs_downgrade_threshold; + /* Link quality range for each UL (M)CS. Below or above, next/prev (M)CS is selected. */ struct {int16_t low; int16_t high; } cs_lqual_ranges[MAX_GPRS_CS]; struct {int16_t low; int16_t high; } mcs_lqual_ranges[MAX_EDGE_MCS]; - uint16_t cs_downgrade_threshold; /* downgrade if less packets left (DL) */ uint16_t ws_base; uint16_t ws_pdch; /* increase WS by this value per PDCH */ diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 996ce61..2fd57d0 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -938,7 +938,7 @@ return CMD_SUCCESS; } -#define CS_ERR_LIMITS_STR "set thresholds for error rate based CS adjustment\n" +#define CS_ERR_LIMITS_STR "set thresholds for error rate based downlink (M)CS adjustment\n" DEFUN(cfg_pcu_cs_err_limits, cfg_pcu_cs_err_limits_cmd, "cs threshold <0-100> <0-100>", @@ -977,7 +977,7 @@ return CMD_SUCCESS; } -#define CS_DOWNGRADE_STR "set threshold for data size based CS downgrade\n" +#define CS_DOWNGRADE_STR "set threshold for data size based downlink (M)CS downgrade\n" DEFUN(cfg_pcu_cs_downgrade_thrsh, cfg_pcu_cs_downgrade_thrsh_cmd, "cs downgrade-threshold <1-10000>", @@ -1006,7 +1006,7 @@ DEFUN(cfg_pcu_cs_lqual_ranges, cfg_pcu_cs_lqual_ranges_cmd, "cs link-quality-ranges cs1 <0-35> cs2 <0-35> <0-35> cs3 <0-35> <0-35> cs4 <0-35>", - CS_STR "Set link quality ranges\n" + CS_STR "Set link quality ranges for each uplink CS\n" "Set quality range for CS-1 (high value only)\n" "CS-1 high (dB)\n" "Set quality range for CS-2\n" @@ -1040,7 +1040,7 @@ DEFUN(cfg_pcu_mcs_lqual_ranges, cfg_pcu_mcs_lqual_ranges_cmd, "mcs link-quality-ranges mcs1 <0-35> mcs2 <0-35> <0-35> mcs3 <0-35> <0-35> mcs4 <0-35> <0-35> mcs5 <0-35> <0-35> mcs6 <0-35> <0-35> mcs7 <0-35> <0-35> mcs8 <0-35> <0-35> mcs9 <0-35>", - CS_STR "Set link quality ranges\n" + CS_STR "Set link quality ranges for each uplink MCS\n" "Set quality range for MCS-1 (high value only)\n" "MCS-1 high (dB)\n" "Set quality range for MCS-2\n" -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16317 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I4e890e924b094a1937fbd3794de96704cf0421a8 Gerrit-Change-Number: 16317 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:34:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:34:56 +0000 Subject: Change in docker-playground[master]: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16328 ) Change subject: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16328 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I6807dafd79e58750ffa953da30eb34671aa25808 Gerrit-Change-Number: 16328 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 09:34:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:34:59 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:34:59 +0000 Subject: Change in docker-playground[master]: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16328 ) Change subject: ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg ...................................................................... ttcn3-pcu: Set correct VTY listen addr in PCU_Tests.cfg Now that osmo-ttcn3-hacks.git I221675721b65b3ab44179e9657da70ba4004d7de introduced VTY support for PCU_Tests_RAW, we need to use the correct addr here. Change-Id: I6807dafd79e58750ffa953da30eb34671aa25808 --- M ttcn3-pcu-test/PCU_Tests.cfg 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, approved pespin: Verified diff --git a/ttcn3-pcu-test/PCU_Tests.cfg b/ttcn3-pcu-test/PCU_Tests.cfg index 07af661..2502fd2 100644 --- a/ttcn3-pcu-test/PCU_Tests.cfg +++ b/ttcn3-pcu-test/PCU_Tests.cfg @@ -5,6 +5,7 @@ [LOGGING] [TESTPORT_PARAMETERS] +*.PCUVTY.CTRL_HOSTNAME := "172.18.13.101" [MODULE_PARAMETERS] PCU_Tests_RAW.mp_pcu_sock_path := "/data/unix/pcu_bts" -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16328 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I6807dafd79e58750ffa953da30eb34671aa25808 Gerrit-Change-Number: 16328 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:47:10 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:47:10 +0000 Subject: Change in osmo-hlr[master]: add libosmo-mslookup abstract client In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16202 ) Change subject: add libosmo-mslookup abstract client ...................................................................... Patch Set 16: Code-Review-1 (4 comments) https://gerrit.osmocom.org/c/osmo-hlr/+/16202/16/include/osmocom/mslookup/mslookup.h File include/osmocom/mslookup/mslookup.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/16/include/osmocom/mslookup/mslookup.h at 16 PS16, Line 16: * along with this program. If not, see . We may want to consider more permissive licensing for the library. libosmo-gsupclient is under GPLv2+, and I would go at least for that here, maybe even LGPL for both libraries (,that could be a future change). https://gerrit.osmocom.org/c/osmo-hlr/+/16202/16/include/osmocom/mslookup/mslookup_client.h File include/osmocom/mslookup/mslookup_client.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/16/include/osmocom/mslookup/mslookup_client.h at 64 PS16, Line 64: uint32_t min_delay_milliseconds; Delay somehow impkies busy waiting. let's call it wait or possibly sleep? https://gerrit.osmocom.org/c/osmo-hlr/+/16202/16/src/mslookup/mslookup.c File src/mslookup/mslookup.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16202/16/src/mslookup/mslookup.c at 89 PS16, Line 89: */ Very complete docs! https://gerrit.osmocom.org/c/osmo-hlr/+/16202/16/src/mslookup/mslookup.c at 197 PS16, Line 197: size_t osmo_mslookup_result_name_buf(char *buf, size_t buflen, On a again (just had this with another patch): the name of a message is what we have in value_str. You are generating a description or a string representation here, so _descr or _strrep or _stringify might be more appropriate. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I83487ab8aad1611eb02e997dafbcb8344da13df1 Gerrit-Change-Number: 16202 Gerrit-PatchSet: 16 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 09:47:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:51:46 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:51:46 +0000 Subject: Change in osmo-hlr[master]: add mDNS lookup method to libosmo-mslookup In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16256 ) Change subject: add mDNS lookup method to libosmo-mslookup ...................................................................... Patch Set 7: (3 comments) https://gerrit.osmocom.org/c/osmo-hlr/+/16256/7/include/osmocom/mslookup/mdns.h File include/osmocom/mslookup/mdns.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16256/7/include/osmocom/mslookup/mdns.h at 15 PS7, Line 15: * You should have received a copy of the GNU Affero General Public License See my license comment on the other patch https://gerrit.osmocom.org/c/osmo-hlr/+/16256/7/src/mslookup/mdns.c File src/mslookup/mdns.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16256/7/src/mslookup/mdns.c at 117 PS7, Line 117: case OSMO_MDNS_RFC_RECORD_TYPE_A: Typically no indent of case in switch, but not critical https://gerrit.osmocom.org/c/osmo-hlr/+/16256/7/src/mslookup/mdns_msg.c File src/mslookup/mdns_msg.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16256/7/src/mslookup/mdns_msg.c at 67 PS7, Line 67: ret = talloc(ctx, struct osmo_mdns_msg_request); We rarely ose talloc without _zero as a safeguard. What if somebody adds some fields in the future ? -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I03a0ffa1d4dc1b24ac78a5ad0975bca90a49c728 Gerrit-Change-Number: 16256 Gerrit-PatchSet: 7 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 09:51:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:52:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:52:21 +0000 Subject: Change in osmo-hlr[master]: mdns: properly zero initialize result data In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16335 ) Change subject: mdns: properly zero initialize result data ...................................................................... Patch Set 1: Can probably be squashed? -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16335 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie58ccc01e107cd2939ca782ab6fa5f6e16195433 Gerrit-Change-Number: 16335 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 09:52:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:54:25 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:54:25 +0000 Subject: Change in osmo-hlr[master]: add osmo-mslookup-client program In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16203 ) Change subject: add osmo-mslookup-client program ...................................................................... Patch Set 18: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16203/18/src/mslookup/osmo-mslookup-client.c File src/mslookup/osmo-mslookup-client.c: https://gerrit.osmocom.org/c/osmo-hlr/+/16203/18/src/mslookup/osmo-mslookup-client.c at 50 PS18, Line 50: "This program is free software; you can redistribute it and/or modify\n" License violation if the lib is not changed from agpl -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie68a5c1db04fb4dff00dc3c774a1162f5b9fabf7 Gerrit-Change-Number: 16203 Gerrit-PatchSet: 18 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 09:54:25 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 09:55:46 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 09:55:46 +0000 Subject: Change in osmo-hlr[master]: contrib/dgsm/ add example esme and dialplan In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16204 ) Change subject: contrib/dgsm/ add example esme and dialplan ...................................................................... Patch Set 18: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16204/18/contrib/dgsm/esme_dgsm.py File contrib/dgsm/esme_dgsm.py: https://gerrit.osmocom.org/c/osmo-hlr/+/16204/18/contrib/dgsm/esme_dgsm.py at 4 PS18, Line 4: Copyright 2019 sysmocom s.f.m.c GmbH No need to AGPL here, imho -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I26e8dd8d9a08187fccb3e74ee91366bc24f6c608 Gerrit-Change-Number: 16204 Gerrit-PatchSet: 18 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 09:55:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:07:23 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 10:07:23 +0000 Subject: Change in osmo-hlr[master]: refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16205 ) Change subject: refactor: add and use lu_fsm, osmo_gsup_req, osmo_gt ...................................................................... Patch Set 19: (2 comments) Please add an osmocom issue about the missing cancel to old vlr/sgsn https://gerrit.osmocom.org/c/osmo-hlr/+/16205/19/include/osmocom/gsupclient/global_title.h File include/osmocom/gsupclient/global_title.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16205/19/include/osmocom/gsupclient/global_title.h at 13 PS19, Line 13: * GNU Affero General Public License for more details. gsupclient is not agpl so far, please don't change it https://gerrit.osmocom.org/c/osmo-hlr/+/16205/19/include/osmocom/gsupclient/global_title.h at 30 PS19, Line 30: struct osmo_gt { Please don't cdall it osmo_gt. We already have real global titles in libosmo-sccp, and given that we still don't handle them here just causes more confusio. Maybe something like osmo_gsup_id with a union that only contains the opaque buffer for now? -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3a8dff3d4a1cbe10d6ab08257a0138d6b2a082d9 Gerrit-Change-Number: 16205 Gerrit-PatchSet: 19 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 10:07:23 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:09:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 10:09:53 +0000 Subject: Change in osmo-hlr[master]: gsup client: add up_down_cb(), add osmo_gsup_client_create3() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16206 ) Change subject: gsup client: add up_down_cb(), add osmo_gsup_client_create3() ...................................................................... Patch Set 19: (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16206/19/include/osmocom/gsupclient/gsup_client.h File include/osmocom/gsupclient/gsup_client.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16206/19/include/osmocom/gsupclient/gsup_client.h at 67 PS19, Line 67: struct osmo_oap_client_config *oapc_config, At some point it makes sense to pass a strict instead of dozens of arguments -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I6f181e42b678465bc9945f192559dc57d2083c6d Gerrit-Change-Number: 16206 Gerrit-PatchSet: 19 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 10:09:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:10:45 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 10:10:45 +0000 Subject: Change in osmo-hlr[master]: db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16207 ) Change subject: db v5: prep for D-GSM: add vlr_via_proxy and sgsn_via_proxy ...................................................................... Patch Set 19: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I98c7b3870559ede84adf56e4bf111f53c7487745 Gerrit-Change-Number: 16207 Gerrit-PatchSet: 19 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Sat, 30 Nov 2019 10:10:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:11:16 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 10:11:16 +0000 Subject: Change in osmo-hlr[master]: enlarge the GSUP message headroom In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16208 ) Change subject: enlarge the GSUP message headroom ...................................................................... Patch Set 19: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I7d86f2dadcae29fe1550ea2c9773394ab31a837b Gerrit-Change-Number: 16208 Gerrit-PatchSet: 19 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 10:11:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:13:13 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 10:13:13 +0000 Subject: Change in osmo-hlr[master]: D-GSM 1/n: add mslookup server in osmo-hlr In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16209 ) Change subject: D-GSM 1/n: add mslookup server in osmo-hlr ...................................................................... Patch Set 19: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-hlr/+/16209/19/include/osmocom/hlr/hlr_ussd.h File include/osmocom/hlr/hlr_ussd.h: https://gerrit.osmocom.org/c/osmo-hlr/+/16209/19/include/osmocom/hlr/hlr_ussd.h at 12 PS19, Line 12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the This looks unrelated -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ife4a61d71926d08f310a1aeed9d9f1974f64178b Gerrit-Change-Number: 16209 Gerrit-PatchSet: 19 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Sat, 30 Nov 2019 10:13:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:13:20 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 10:13:20 +0000 Subject: Change in osmo-bts[master]: common/vty.c: get rid of generic exit / end commands References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16338 ) Change subject: common/vty.c: get rid of generic exit / end commands ...................................................................... common/vty.c: get rid of generic exit / end commands Change-Id: I425f9058ae15de929e2ba0283d4057bdf767aeeb --- M src/common/vty.c 1 file changed, 0 insertions(+), 42 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/38/16338/1 diff --git a/src/common/vty.c b/src/common/vty.c index 8b947a7..b2c8cf2 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -125,48 +125,6 @@ } } -gDEFUN(ournode_exit, ournode_exit_cmd, "exit", - "Exit current node, go down to provious node") -{ - switch (vty->node) { - case PHY_INST_NODE: - vty->node = PHY_NODE; - { - struct phy_instance *pinst = vty->index; - vty->index = pinst->phy_link; - } - break; - case PHY_NODE: - vty->node = CONFIG_NODE; - vty->index = NULL; - break; - case TRX_NODE: - vty->node = BTS_NODE; - { - struct gsm_bts_trx *trx = vty->index; - vty->index = trx->bts; - } - break; - default: - break; - } - return CMD_SUCCESS; -} - -gDEFUN(ournode_end, ournode_end_cmd, "end", - "End current mode and change to enable mode") -{ - switch (vty->node) { - default: - vty_config_unlock(vty); - vty->node = ENABLE_NODE; - vty->index = NULL; - vty->index_sub = NULL; - break; - } - return CMD_SUCCESS; -} - static const char osmobts_copyright[] = "Copyright (C) 2010, 2011 by Harald Welte, Andreas Eversberg and On-Waves\r\n" "License AGPLv3+: GNU AGPL version 3 or later \r\n" -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16338 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I425f9058ae15de929e2ba0283d4057bdf767aeeb Gerrit-Change-Number: 16338 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:13:21 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 10:13:21 +0000 Subject: Change in osmo-bts[master]: common/abis.c: pass gsm_bts_trx to e1inp_sign_link_create() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16339 ) Change subject: common/abis.c: pass gsm_bts_trx to e1inp_sign_link_create() ...................................................................... common/abis.c: pass gsm_bts_trx to e1inp_sign_link_create() Change-Id: I8a6242d3e02f9bd19d287ecad18e001a5991175f --- M src/common/abis.c 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/39/16339/1 diff --git a/src/common/abis.c b/src/common/abis.c index 24eb8a1..e18e8d9 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -108,12 +108,11 @@ e1inp_ts_config_sign(&line->ts[E1INP_SIGN_OML-1], line); sign_link = g_bts->oml_link = e1inp_sign_link_create(&line->ts[E1INP_SIGN_OML-1], - E1INP_SIGN_OML, NULL, 255, 0); + E1INP_SIGN_OML, g_bts->c0, 255, 0); if (clock_gettime(CLOCK_MONOTONIC, &g_bts->oml_conn_established_timestamp) != 0) memset(&g_bts->oml_conn_established_timestamp, 0, sizeof(g_bts->oml_conn_established_timestamp)); drain_oml_queue(g_bts); - sign_link->trx = g_bts->c0; bts_link_estab(g_bts); break; default: @@ -129,8 +128,7 @@ e1inp_ts_config_sign(&line->ts[type-1], line); sign_link = trx->rsl_link = e1inp_sign_link_create(&line->ts[type-1], - E1INP_SIGN_RSL, NULL, 0, 0); - sign_link->trx = trx; + E1INP_SIGN_RSL, trx, 0, 0); trx_link_estab(trx); break; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16339 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I8a6242d3e02f9bd19d287ecad18e001a5991175f Gerrit-Change-Number: 16339 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:13:21 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 10:13:21 +0000 Subject: Change in osmo-bts[master]: common/abis.c: make use of RSL TEI from OML IPA RSL Connect References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16340 ) Change subject: common/abis.c: make use of RSL TEI from OML IPA RSL Connect ...................................................................... common/abis.c: make use of RSL TEI from OML IPA RSL Connect Change-Id: I5927f59a49724170a63e87be604973f7c9d5d8be --- M src/common/abis.c M src/common/oml.c 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/40/16340/1 diff --git a/src/common/abis.c b/src/common/abis.c index e18e8d9..9aa6afa 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -129,6 +129,7 @@ sign_link = trx->rsl_link = e1inp_sign_link_create(&line->ts[type-1], E1INP_SIGN_RSL, trx, 0, 0); + trx->rsl_tei, 0); trx_link_estab(trx); break; } diff --git a/src/common/oml.c b/src/common/oml.c index 3defa49..7a62faa 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -1323,8 +1323,10 @@ if (trx->bts->variant == BTS_OSMO_OMLDUMMY) { rc = 0; LOGP(DOML, LOGL_NOTICE, "%s: Not connecting RSL in OML-DUMMY!\n", trx_name); - } else + } else { + trx->rsl_tei = stream_id; rc = e1inp_ipa_bts_rsl_connect_n(oml_link->ts->line, inet_ntoa(in), port, trx->nr); + } if (rc < 0) { LOGP(DOML, LOGL_ERROR, "%s: Error in abis_open(RSL): %d\n", trx_name, rc); return oml_fom_ack_nack(msg, NM_NACK_CANT_PERFORM); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I5927f59a49724170a63e87be604973f7c9d5d8be Gerrit-Change-Number: 16340 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:16:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 10:16:24 +0000 Subject: Change in osmo-hlr[master]: D-GSM 2/n: implement mDNS method of mslookup server In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16257 ) Change subject: D-GSM 2/n: implement mDNS method of mslookup server ...................................................................... Patch Set 9: As the vty is introduced here, shouldn't we also add vty_runner tests with it? -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I5cae6459090588b4dd292be90a5e8903432669d2 Gerrit-Change-Number: 16257 Gerrit-PatchSet: 9 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 10:16:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:19:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 10:19:35 +0000 Subject: Change in osmo-hlr[master]: D-GSM 3/n: implement roaming by mslookup in osmo-hlr In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16258 ) Change subject: D-GSM 3/n: implement roaming by mslookup in osmo-hlr ...................................................................... Patch Set 10: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I2fe453553c90e6ee527ed13a13089900efd488aa Gerrit-Change-Number: 16258 Gerrit-PatchSet: 10 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Sat, 30 Nov 2019 10:19:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:23:38 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 10:23:38 +0000 Subject: Change in osmo-bts[master]: common/abis.c: make use of RSL TEI from OML IPA RSL Connect In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16340 ) Change subject: common/abis.c: make use of RSL TEI from OML IPA RSL Connect ...................................................................... Patch Set 1: I am not really sure about this change. I have been playing around with a multi-TRX setup, and noticed that using a different (than 0x00) 'rsl e1 tei' value in osmo-bsc.cfg makes osmo-bts-trx fail to start. I figured out that this value is being sent in the (BSC originated) OML IPA RSL Connect message as 'Stream ID', but osmo-bts does not use it at all. This value also appears in the IPA header as the protocol type. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16340 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I5927f59a49724170a63e87be604973f7c9d5d8be Gerrit-Change-Number: 16340 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 10:23:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 10:26:47 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 10:26:47 +0000 Subject: Change in osmo-msc[master]: libmsc/gsm_04_11.c: fix: include the length byte in SM-RP-DA References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/16341 ) Change subject: libmsc/gsm_04_11.c: fix: include the length byte in SM-RP-DA ...................................................................... libmsc/gsm_04_11.c: fix: include the length byte in SM-RP-DA Change-Id: I64f47fb68e8123f47d7770b7cb194c57acef1e8f --- 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/41/16341/1 diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 367cc6f..7a5e263 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -759,7 +759,8 @@ LOG_TRANS(trans, LOGL_DEBUG, "DST(%u,%s)\n", dst_len, osmo_hexdump(dst, dst_len)); - return gsm411_rx_rp_ud(msg, trans, rph, dst, dst_len); + /* Include the L part, so we can use gsm48_decode_bcd_number() */ + return gsm411_rx_rp_ud(msg, trans, rph, dst - 1, dst_len + 1); } static struct gsm_sms *sms_report_alloc(struct gsm_sms *sms, struct gsm_trans *trans) -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16341 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I64f47fb68e8123f47d7770b7cb194c57acef1e8f Gerrit-Change-Number: 16341 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 12:10:57 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 12:10:57 +0000 Subject: Change in libosmocore[master]: prbs-tool: Add error simulation capabilities References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16343 ) Change subject: prbs-tool: Add error simulation capabilities ...................................................................... prbs-tool: Add error simulation capabilities The tool can now simulate: * lost bursts on the TRX->BTS interface * zeroed/overwritten bursts on the TRX->BTS interface * errors in the TCH codec frames before passing them to the encoder Change-Id: I0b52c2af6d973669ac233bf9868400e497496460 TODO: Ability to introduce errors in certain classes of the bits only. --- M utils/prbs-tool.c 1 file changed, 79 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/43/16343/1 diff --git a/utils/prbs-tool.c b/utils/prbs-tool.c index f765531..26d4aa2 100644 --- a/utils/prbs-tool.c +++ b/utils/prbs-tool.c @@ -55,7 +55,7 @@ uint32_t fn; uint8_t rssi; uint16_t t_offs; - sbit_t bits[148]; + uint8_t bits[148]; /* 0..255, *NOT* sbit_t */ } __attribute__((packed)); struct trx_dl_msg { @@ -134,6 +134,26 @@ unsigned int burst_nr; /* training sequence code */ unsigned int tsc; + + /* loose 'count' bursts every 'nth_mframe' on TRX-BTS interface */ + struct { + unsigned int count; + unsigned int nth_mframe; + } sim_lost_bursts; + + /* zero 'count' bursts every 'nth_mframe' on TRX-BTS interface */ + struct { + unsigned int count; + unsigned int nth_mframe; + } sim_zero_bursts; + + /* flip every 'nth_bit' of the PRNG oudput before encoding */ + struct { + unsigned int nth_bit; + unsigned int i; + } sim_flip_codec_bits; + + unsigned int i; }; struct ts_data { @@ -164,6 +184,18 @@ } } +/* apply any intentional errors to the output of the PRBS sequence */ +static void apply_errors_prbs(struct pchan_data *pchan) +{ + for (int i = 0; i < sizeof(pchan->prbs_u)-4; i++) { + pchan->sim_flip_codec_bits.i++; + if (pchan->sim_flip_codec_bits.i == pchan->sim_flip_codec_bits.nth_bit) { + pchan->sim_flip_codec_bits.i = 0; + pchan->prbs_u[4+i] ^= 0x01; + } + } +} + /*! obtain the next to-be-transmitted burst for the given pchan * \param pchan physical channel on which we operate * \param[in] fn frame number @@ -188,6 +220,9 @@ osmo_pbit2ubit(pchan->prbs_u, prefix, 4); rc = osmo_prbs_get_ubits(pchan->prbs_u+4, sizeof(pchan->prbs_u)-4, &pchan->st); OSMO_ASSERT(rc == sizeof(pchan->prbs_u)-4); + + apply_errors_prbs(pchan); + /* pack to PBIT format */ rc = osmo_ubit2pbit(pchan->tch_data, pchan->prbs_u, sizeof(pchan->prbs_u)); //memset(pchan->tch_data, 0xff, sizeof(pchan->tch_data)); @@ -201,16 +236,17 @@ /* encode block (codec frame) into four bursts */ rc = gsm0503_tch_fr_encode(pchan->bursts, pchan->tch_data, GSM_FR_BYTES, 1); OSMO_ASSERT(rc == 0); - +#if 0 for (int i = 0; i < sizeof(pchan->bursts); i += GSM_BURST_BITS) printf("\t%s\n", osmo_ubit_dump(pchan->bursts + i, GSM_BURST_BITS)); -// dec(pchan->bursts); + dec(pchan->bursts); +#endif } /* for all bursts: format 148 symbols from 116 input bits */ ubit_t *burst = pchan->bursts + pchan->burst_nr * GSM_BURST_BITS; - printf("TX(%u): %s\n", pchan->burst_nr, osmo_ubit_dump(burst, GSM_BURST_BITS)); +// printf("TX(%u): %s\n", pchan->burst_nr, osmo_ubit_dump(burst, GSM_BURST_BITS)); memset(burst_out, 0, 3); /* guard bits */ memcpy(burst_out+3, burst, 58); /* firrst half */ memcpy(burst_out+61, _sched_tsc[pchan->tsc], 26); /* midamble */ @@ -219,10 +255,6 @@ /* increment burst number for next call */ pchan->burst_nr += 1; -#if 0 - if (pchan->burst_nr == 4) - pchan->burst_nr = 0; -#endif return GSM_BURST_LEN; } @@ -252,6 +284,7 @@ struct trx_ul_msg *ul_msg = (struct trx_ul_msg *) tx_ul_buf; /* other variables */ struct pchan_data *pchan; + uint32_t fn; uint8_t rc; /* do a blocking read on the socket and receive DL from BTS */ @@ -259,7 +292,7 @@ if (rc < sizeof(*dl_msg)) return rc; - dl_msg->fn = ntohl(dl_msg->fn); + fn = ntohl(dl_msg->fn); if (dl_msg->ts >= ARRAY_SIZE(g_trx_data.ts)) return -ENODEV; @@ -267,18 +300,48 @@ if (dl_msg->ts != 2) return 0; - printf("FN=%s TS=%u\n", gsm_fn_as_gsmtime_str(dl_msg->fn), dl_msg->ts); + printf("FN=%s TS=%u\n", gsm_fn_as_gsmtime_str(fn), dl_msg->ts); /* FIXME: second pchan for TCH/H */ pchan = &g_trx_data.ts[dl_msg->ts].pchan[0]; - rc = pchan_process_ts_fn(pchan, dl_msg->fn, ul_msg->bits); + rc = pchan_process_ts_fn(pchan, fn, ul_msg->bits); OSMO_ASSERT(rc == sizeof(ul_msg->bits)); /* copy over timeslot and frame number */ - ul_msg->fn = htonl(dl_msg->fn); + ul_msg->fn = htonl(fn); ul_msg->ts = dl_msg->ts; + /* simulate lost frames on TRX <-> BTS interface */ + if (pchan->sim_lost_bursts.count) { + /* count number of 26-multiframes */ + static int count = 0; + if (fn % 26 == 0) + count++; + + /* every 10th multiframe, drop two entire block of 8 bursts */ + if (count % pchan->sim_lost_bursts.nth_mframe == 0 && + (fn % 26) <= pchan->sim_lost_bursts.count) { + printf("===> SKIPPING BURST\n"); + return 0; + } + } + + /* simulate zero-ed frames on TRX <-> BTS interface */ + if (pchan->sim_zero_bursts.count) { + /* count number of 26-multiframes */ + static int count = 0; + if (fn % 26 == 0) + count++; + + /* every 10th multiframe, drop two entire block of 8 bursts */ + if (count % pchan->sim_zero_bursts.nth_mframe == 0 && + (fn % 26) <= pchan->sim_zero_bursts.count) { + memset(ul_msg->bits, 0, sizeof(ul_msg->bits)); + printf("===> ZEROING BURST\n"); + } + } + /* write uplink message towards BTS */ rc = write(fd, tx_ul_buf, sizeof(*ul_msg)); if (rc < sizeof(*ul_msg)) @@ -304,6 +367,10 @@ trx_data_init(&g_trx_data); + //g_trx_data.ts[2].pchan[0].sim_zero_bursts.count = 8; + //g_trx_data.ts[2].pchan[0].sim_zero_bursts.nth_mframe = 10; + g_trx_data.ts[2].pchan[0].sim_flip_codec_bits.nth_bit = 260*4; + fd = open_trx_data_sock(0, "127.0.0.1"); if (fd < 0) exit(1); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16343 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0b52c2af6d973669ac233bf9868400e497496460 Gerrit-Change-Number: 16343 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 12:10:56 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 12:10:56 +0000 Subject: Change in libosmocore[master]: PRBS tool sending PRBS sequence to TRX References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16342 ) Change subject: PRBS tool sending PRBS sequence to TRX ...................................................................... PRBS tool sending PRBS sequence to TRX Change-Id: I2300f909bbfda10a7053320edfd1deaea763759a --- M utils/Makefile.am A utils/prbs-tool.c 2 files changed, 322 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/42/16342/1 diff --git a/utils/Makefile.am b/utils/Makefile.am index 653b719..0caab2d 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -6,6 +6,7 @@ EXTRA_DIST = conv_gen.py conv_codes_gsm.py bin_PROGRAMS = osmo-arfcn osmo-auc-gen osmo-config-merge +noinst_PROGRAMS = osmo-prbs-tool osmo_arfcn_SOURCES = osmo-arfcn.c @@ -15,8 +16,12 @@ osmo_config_merge_LDADD = $(LDADD) $(TALLOC_LIBS) osmo_config_merge_CFLAGS = $(TALLOC_CFLAGS) +osmo_prbs_tool_SOURCES = prbs-tool.c +osmo_prbs_tool_LDADD = $(LDADD) $(top_builddir)/src/coding/libosmocoding.la + + if ENABLE_PCSC -noinst_PROGRAMS = osmo-sim-test +noinst_PROGRAMS += osmo-sim-test osmo_sim_test_SOURCES = osmo-sim-test.c osmo_sim_test_LDADD = $(LDADD) $(top_builddir)/src/sim/libosmosim.la $(PCSC_LIBS) osmo_sim_test_CFLAGS = $(PCSC_CFLAGS) diff --git a/utils/prbs-tool.c b/utils/prbs-tool.c new file mode 100644 index 0000000..f765531 --- /dev/null +++ b/utils/prbs-tool.c @@ -0,0 +1,316 @@ +/* Dummy TRX for sening PRBS test sequences into osmo-bts-trx to test + * the decoder/receiver processing in osmo-bts-trx as well as any + * additional PRBS testing code. + * + * The purpose of this program is to use it as a mock dummy MS-side + * transmitter of GSM bursts that contain encoded PRBS sequences, + * similar to what one would normally do with an arbitrary + * function/waveform generator or BERT tester in hardware. + * + * (C) 2017 by Harald Welte + * All Rights Reserved + * + * Licensed under terms of the GNU Generral Public License, Version 2, + * or (at your option) any later version. + */ + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +/*********************************************************************** + * GSM Constants + ***********************************************************************/ + +#define GSM_FR_BYTES 33 +#define GSM_BURST_BITS 116 +#define GSM_4BURST_BITS (GSM_BURST_BITS*4) +#define GSM_BURST_LEN 148 + + +/*********************************************************************** + * TRX Interface / Protocol + ***********************************************************************/ + +#define TRX_BASE_PORT 5700 +/* DATA port on the TRX side */ +#define TRX_PORT_CTRL_TRX(C) (TRX_BASE_PORT+(2*(C))+1) +#define TRX_PORT_DATA_TRX(C) (TRX_BASE_PORT+(2*(C))+2) +#define TRX_PORT_CTRL_BTS(C) (TRX_PORT_CTRL_TRX(C)+100) +#define TRX_PORT_DATA_BTS(C) (TRX_PORT_DATA_TRX(C)+100) + +struct trx_ul_msg { + uint8_t ts; + uint32_t fn; + uint8_t rssi; + uint16_t t_offs; + sbit_t bits[148]; +} __attribute__((packed)); + +struct trx_dl_msg { + uint8_t ts; + uint32_t fn; + uint8_t att_db; + ubit_t bits[148]; +} __attribute__((packed)); + + +/*********************************************************************** + * Helper Functions + ***********************************************************************/ + +static int ubits2trxbits(uint8_t *sbits, const ubit_t *ubits, unsigned int count) +{ + unsigned int i; + + for (i = 0; i < count; i++) { + if ((*ubits++) & 1) { + *sbits++ = 255; + } else { + *sbits++ = 0; + } + } + + return count; +} + +static int dec(const ubit_t *bursts_u) +{ + sbit_t bursts_s[GSM_4BURST_BITS*2]; + uint8_t dec_tch_data[GSM_FR_BYTES]; + int n_errors, n_bits_total; + int rc; + + /* convert from u_bit (tx) to s_bit (rx) */ + osmo_ubit2sbit(bursts_s, bursts_u, sizeof(bursts_s)); + + rc = gsm0503_tch_fr_decode(dec_tch_data, bursts_s, 1, 0, &n_errors, &n_bits_total); + printf("rc=%d, n_errors=%d, n_bits_total=%d: %s\n", rc, n_errors, n_bits_total, + osmo_hexdump(dec_tch_data, sizeof(dec_tch_data))); + + return rc; +} + +/*! \brief Training Sequences (TS 05.02 Chapter 5.2.3) */ +static const ubit_t _sched_tsc[8][26] = { + { 0,0,1,0,0,1,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,0,1,1,1, }, + { 0,0,1,0,1,1,0,1,1,1,0,1,1,1,1,0,0,0,1,0,1,1,0,1,1,1, }, + { 0,1,0,0,0,0,1,1,1,0,1,1,1,0,1,0,0,1,0,0,0,0,1,1,1,0, }, + { 0,1,0,0,0,1,1,1,1,0,1,1,0,1,0,0,0,1,0,0,0,1,1,1,1,0, }, + { 0,0,0,1,1,0,1,0,1,1,1,0,0,1,0,0,0,0,0,1,1,0,1,0,1,1, }, + { 0,1,0,0,1,1,1,0,1,0,1,1,0,0,0,0,0,1,0,0,1,1,1,0,1,0, }, + { 1,0,1,0,0,1,1,1,1,1,0,1,1,0,0,0,1,0,1,0,0,1,1,1,1,1, }, + { 1,1,1,0,1,1,1,1,0,0,0,1,0,0,1,0,1,1,1,0,1,1,1,1,0,0, }, +}; + +/*********************************************************************** + * state + processing functions + ***********************************************************************/ + +/* state we have to keep for one physical channel */ +struct pchan_data { + /* PRBS state */ + struct osmo_prbs_state st; + /* unpacked PRBS bits, generated from PRBS */ + ubit_t prbs_u[4+260]; + /* packed frame (to be sent) */ + uint8_t tch_data[GSM_FR_BYTES]; + /* burst bits (ubit) to be transmitted */ + ubit_t bursts[GSM_4BURST_BITS*2]; /* 116 * 8 */ + /* burst bits (sbit) 'as if received' */ + sbit_t bursts_s[GSM_4BURST_BITS*2]; + /* next to-be transmitted burst number */ + unsigned int burst_nr; + /* training sequence code */ + unsigned int tsc; +}; + +struct ts_data { + struct pchan_data pchan[2]; +}; + +struct trx_data { + struct ts_data ts[8]; +}; + +static struct trx_data g_trx_data; + +/* initialize the state for one TRX */ +static void trx_data_init(struct trx_data *trx) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(trx->ts); i++) { + struct ts_data *ts = &trx->ts[i]; + int j; + for (j = 0; j < ARRAY_SIZE(ts->pchan); j++) { + struct pchan_data *pchan = &ts->pchan[j]; + + memset(pchan, 0, sizeof(*pchan)); + osmo_prbs_state_init(&pchan->st, &osmo_prbs9); + pchan->tsc = 7; + } + } +} + +/*! obtain the next to-be-transmitted burst for the given pchan + * \param pchan physical channel on which we operate + * \param[in] fn frame number + * \param[out] burst_out caller-provided buffer for 148 unpacked output bits + * \retruns number of bits stored in \a burst_out */ +static int pchan_get_next_burst(struct pchan_data *pchan, uint32_t fn, ubit_t *burst_out) +{ + uint32_t fn26 = fn % 26; + int rc; + + if (fn26 == 0 || fn26 == 4 || fn26 == 8 || fn26 == 13 || fn26 == 17 || fn26 == 21) + pchan->burst_nr = 0; + + if (fn26 == 12 || fn26 == 25) { + memset(burst_out, 0, GSM_BURST_LEN); + return GSM_BURST_LEN; + } + + if (pchan->burst_nr == 0) { + /* generate PRBS output in ubit format, skipping first nibble for 260-264 padding */ + const uint8_t prefix[] = { 0xd0 }; + osmo_pbit2ubit(pchan->prbs_u, prefix, 4); + rc = osmo_prbs_get_ubits(pchan->prbs_u+4, sizeof(pchan->prbs_u)-4, &pchan->st); + OSMO_ASSERT(rc == sizeof(pchan->prbs_u)-4); + /* pack to PBIT format */ + rc = osmo_ubit2pbit(pchan->tch_data, pchan->prbs_u, sizeof(pchan->prbs_u)); + //memset(pchan->tch_data, 0xff, sizeof(pchan->tch_data)); + + printf("%s\n", osmo_hexdump(pchan->tch_data, GSM_FR_BYTES)); + + /* shift buffer by 4 bursts for interleaving */ + memcpy(pchan->bursts, pchan->bursts + GSM_4BURST_BITS, GSM_4BURST_BITS); + memset(pchan->bursts + GSM_4BURST_BITS, 0, GSM_4BURST_BITS); + + /* encode block (codec frame) into four bursts */ + rc = gsm0503_tch_fr_encode(pchan->bursts, pchan->tch_data, GSM_FR_BYTES, 1); + OSMO_ASSERT(rc == 0); + + for (int i = 0; i < sizeof(pchan->bursts); i += GSM_BURST_BITS) + printf("\t%s\n", osmo_ubit_dump(pchan->bursts + i, GSM_BURST_BITS)); + +// dec(pchan->bursts); + } + + /* for all bursts: format 148 symbols from 116 input bits */ + ubit_t *burst = pchan->bursts + pchan->burst_nr * GSM_BURST_BITS; + printf("TX(%u): %s\n", pchan->burst_nr, osmo_ubit_dump(burst, GSM_BURST_BITS)); + memset(burst_out, 0, 3); /* guard bits */ + memcpy(burst_out+3, burst, 58); /* firrst half */ + memcpy(burst_out+61, _sched_tsc[pchan->tsc], 26); /* midamble */ + memcpy(burst_out+87, burst+58, 58); /* second half */ + memset(burst_out+145, 0, 3); /* guard bits */ + + /* increment burst number for next call */ + pchan->burst_nr += 1; +#if 0 + if (pchan->burst_nr == 4) + pchan->burst_nr = 0; +#endif + + return GSM_BURST_LEN; +} + +static int pchan_process_ts_fn(struct pchan_data *pchan, uint32_t fn, uint8_t *burst_t) +{ + ubit_t burst_u[GSM_BURST_LEN]; + int rc; + + rc = pchan_get_next_burst(pchan, fn, burst_u); + OSMO_ASSERT(rc == sizeof(burst_u)); + + /* convert from u_bit (tx) to s_bit (rx) */ + ubits2trxbits(burst_t, burst_u, GSM_BURST_LEN); + + return GSM_BURST_LEN; +} + +/* read TRX DL data from BTS, write TRX UL data to BTS */ +static int read_and_process(int fd) +{ + /* receive (downlink) buffer */ + uint8_t rx_dl_buf[1024]; + struct trx_dl_msg *dl_msg = (struct trx_dl_msg *) rx_dl_buf; + /* transmit (uplink) buffer */ + uint8_t tx_ul_buf[1024]; + struct trx_ul_msg *ul_msg = (struct trx_ul_msg *) tx_ul_buf; + /* other variables */ + struct pchan_data *pchan; + uint8_t rc; + + /* do a blocking read on the socket and receive DL from BTS */ + rc = read(fd, rx_dl_buf, sizeof(rx_dl_buf)); + if (rc < sizeof(*dl_msg)) + return rc; + + dl_msg->fn = ntohl(dl_msg->fn); + + if (dl_msg->ts >= ARRAY_SIZE(g_trx_data.ts)) + return -ENODEV; + + if (dl_msg->ts != 2) + return 0; + + printf("FN=%s TS=%u\n", gsm_fn_as_gsmtime_str(dl_msg->fn), dl_msg->ts); + + /* FIXME: second pchan for TCH/H */ + pchan = &g_trx_data.ts[dl_msg->ts].pchan[0]; + + rc = pchan_process_ts_fn(pchan, dl_msg->fn, ul_msg->bits); + OSMO_ASSERT(rc == sizeof(ul_msg->bits)); + + /* copy over timeslot and frame number */ + ul_msg->fn = htonl(dl_msg->fn); + ul_msg->ts = dl_msg->ts; + + /* write uplink message towards BTS */ + rc = write(fd, tx_ul_buf, sizeof(*ul_msg)); + if (rc < sizeof(*ul_msg)) + return -EIO; + + return 0; +} + +static int open_trx_data_sock(unsigned int trx_nr, const char *bts_host) +{ + int rc; + + rc = osmo_sock_init2(AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, TRX_PORT_DATA_TRX(trx_nr), + bts_host, TRX_PORT_DATA_BTS(trx_nr), + OSMO_SOCK_F_CONNECT | OSMO_SOCK_F_BIND); + return rc; +} + + +int main(int argc, char **argv) +{ + int fd; + + trx_data_init(&g_trx_data); + + fd = open_trx_data_sock(0, "127.0.0.1"); + if (fd < 0) + exit(1); + + while (1) { + read_and_process(fd); + } + + return 0; +} -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16342 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2300f909bbfda10a7053320edfd1deaea763759a Gerrit-Change-Number: 16342 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 12:12:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 12:12:02 +0000 Subject: Change in libosmocore[master]: 04.80: Deprecate gsm0480_create_ussd_resp() References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16344 ) Change subject: 04.80: Deprecate gsm0480_create_ussd_resp() ...................................................................... 04.80: Deprecate gsm0480_create_ussd_resp() Change-Id: Iff4c91b5b98a73d9a30aa42f6b2a1ebcc8a45343 --- M src/gsm/gsm0480.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/16344/1 diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c index 3ae591a..1d5cde9 100644 --- a/src/gsm/gsm0480.c +++ b/src/gsm/gsm0480.c @@ -821,6 +821,7 @@ * not only the FACILITY value, but the full L3 message including message header * and FACILITY IE Tag+Length. */ +OSMO_DEPRECATED("Use gsm0480_gen_ussd_resp_7bit() instead") struct msgb *gsm0480_create_ussd_resp(uint8_t invoke_id, uint8_t trans_id, const char *text) { struct msgb *msg; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16344 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iff4c91b5b98a73d9a30aa42f6b2a1ebcc8a45343 Gerrit-Change-Number: 16344 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 12:36:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 12:36:30 +0000 Subject: Change in libosmocore[master]: PRBS tool sending PRBS sequence to TRX In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16342 to look at the new patch set (#2). Change subject: PRBS tool sending PRBS sequence to TRX ...................................................................... PRBS tool sending PRBS sequence to TRX Change-Id: I2300f909bbfda10a7053320edfd1deaea763759a --- M utils/Makefile.am A utils/prbs-tool.c 2 files changed, 322 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/42/16342/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16342 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2300f909bbfda10a7053320edfd1deaea763759a Gerrit-Change-Number: 16342 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 12:36:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 12:36:30 +0000 Subject: Change in libosmocore[master]: prbs-tool: Add error simulation capabilities In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16343 to look at the new patch set (#2). Change subject: prbs-tool: Add error simulation capabilities ...................................................................... prbs-tool: Add error simulation capabilities The tool can now simulate: * lost bursts on the TRX->BTS interface * zeroed/overwritten bursts on the TRX->BTS interface * errors in the TCH codec frames before passing them to the encoder Change-Id: I0b52c2af6d973669ac233bf9868400e497496460 TODO: Ability to introduce errors in certain classes of the bits only. --- M utils/prbs-tool.c 1 file changed, 79 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/43/16343/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16343 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0b52c2af6d973669ac233bf9868400e497496460 Gerrit-Change-Number: 16343 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 12:37:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 12:37:05 +0000 Subject: Change in libosmocore[master]: PRBS tool sending PRBS sequence to TRX In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16342 ) Change subject: PRBS tool sending PRBS sequence to TRX ...................................................................... Patch Set 1: this might be a bit of a weird commit, given all the commented-out code portions, etc. - however, I think it's still useful to keep this in master rather than in some obscure branch that nobody knows about. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16342 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2300f909bbfda10a7053320edfd1deaea763759a Gerrit-Change-Number: 16342 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 12:37:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 12:39:41 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 12:39:41 +0000 Subject: Change in libosmocore[master]: 04.80: Deprecate gsm0480_create_ussd_resp() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/16344 to look at the new patch set (#2). Change subject: 04.80: Deprecate gsm0480_create_ussd_resp() ...................................................................... 04.80: Deprecate gsm0480_create_ussd_resp() In July 2018 in commit Ide240279240322f643e142229eb7829f538c6314 we introduced the successor gsm0480_gen_ussd_resp_7bit(), which is also what both libosmogsm-internal code as well as osmo-hlr have been ported to. For some reason it wasn't marked deprecated back then. Change-Id: Iff4c91b5b98a73d9a30aa42f6b2a1ebcc8a45343 --- M src/gsm/gsm0480.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/16344/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16344 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iff4c91b5b98a73d9a30aa42f6b2a1ebcc8a45343 Gerrit-Change-Number: 16344 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 12:39:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 12:39:53 +0000 Subject: Change in libosmocore[master]: 04.80: Deprecate gsm0480_create_ussd_resp() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16344 ) Change subject: 04.80: Deprecate gsm0480_create_ussd_resp() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16344 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iff4c91b5b98a73d9a30aa42f6b2a1ebcc8a45343 Gerrit-Change-Number: 16344 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 12:39:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 12:39:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 12:39:55 +0000 Subject: Change in libosmocore[master]: 04.80: Deprecate gsm0480_create_ussd_resp() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16344 ) Change subject: 04.80: Deprecate gsm0480_create_ussd_resp() ...................................................................... 04.80: Deprecate gsm0480_create_ussd_resp() In July 2018 in commit Ide240279240322f643e142229eb7829f538c6314 we introduced the successor gsm0480_gen_ussd_resp_7bit(), which is also what both libosmogsm-internal code as well as osmo-hlr have been ported to. For some reason it wasn't marked deprecated back then. Change-Id: Iff4c91b5b98a73d9a30aa42f6b2a1ebcc8a45343 --- M src/gsm/gsm0480.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c index 3ae591a..1d5cde9 100644 --- a/src/gsm/gsm0480.c +++ b/src/gsm/gsm0480.c @@ -821,6 +821,7 @@ * not only the FACILITY value, but the full L3 message including message header * and FACILITY IE Tag+Length. */ +OSMO_DEPRECATED("Use gsm0480_gen_ussd_resp_7bit() instead") struct msgb *gsm0480_create_ussd_resp(uint8_t invoke_id, uint8_t trans_id, const char *text) { struct msgb *msg; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16344 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iff4c91b5b98a73d9a30aa42f6b2a1ebcc8a45343 Gerrit-Change-Number: 16344 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 12:43:06 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 12:43:06 +0000 Subject: Change in libosmocore[master]: 04.80: Deprecate gsm0480_create_ussd_resp() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16344 ) Change subject: 04.80: Deprecate gsm0480_create_ussd_resp() ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/16344/2/src/gsm/gsm0480.c File src/gsm/gsm0480.c: https://gerrit.osmocom.org/c/libosmocore/+/16344/2/src/gsm/gsm0480.c at 824 PS2, Line 824: OSMO_DEPRECATED Header file is a better place for this macro. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16344 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iff4c91b5b98a73d9a30aa42f6b2a1ebcc8a45343 Gerrit-Change-Number: 16344 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Comment-Date: Sat, 30 Nov 2019 12:43:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 13:27:52 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 13:27:52 +0000 Subject: Change in osmo-pcu[master]: VTY: add warning about changing PCU socket path at run-time References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16345 ) Change subject: VTY: add warning about changing PCU socket path at run-time ...................................................................... VTY: add warning about changing PCU socket path at run-time Change-Id: I7cee2d782bd3dfc2cc8d2febc16dca905dcc294e --- M src/pcu_vty.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/16345/1 diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 2fd57d0..1f46707 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -1097,12 +1097,13 @@ { struct gprs_rlcmac_bts *bts = bts_main_data(); + if (vty->type != VTY_FILE) + vty_out(vty, "Changing PCU socket path at run-time has no effect%s", VTY_NEWLINE); + if (bts->pcu_sock_path) { - /* FIXME: close the interface? */ talloc_free(bts->pcu_sock_path); } bts->pcu_sock_path = talloc_strdup(tall_pcu_ctx, argv[0]); - /* FIXME: re-open the interface? */ return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16345 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7cee2d782bd3dfc2cc8d2febc16dca905dcc294e Gerrit-Change-Number: 16345 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 13:27:53 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 13:27:53 +0000 Subject: Change in osmo-pcu[master]: VTY: cosmetic: use osmo_talloc_replace_string() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16346 ) Change subject: VTY: cosmetic: use osmo_talloc_replace_string() ...................................................................... VTY: cosmetic: use osmo_talloc_replace_string() Change-Id: Id09c7d24b48ddecfa96404c3e75330465a11f830 --- M src/pcu_vty.c 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/46/16346/1 diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 1f46707..afc8a9b 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -1100,10 +1101,7 @@ if (vty->type != VTY_FILE) vty_out(vty, "Changing PCU socket path at run-time has no effect%s", VTY_NEWLINE); - if (bts->pcu_sock_path) { - talloc_free(bts->pcu_sock_path); - } - bts->pcu_sock_path = talloc_strdup(tall_pcu_ctx, argv[0]); + osmo_talloc_replace_string(tall_pcu_ctx, &bts->pcu_sock_path, argv[0]); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16346 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id09c7d24b48ddecfa96404c3e75330465a11f830 Gerrit-Change-Number: 16346 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 13:27:53 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 13:27:53 +0000 Subject: Change in osmo-pcu[master]: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16347 ) Change subject: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() ...................................................................... VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() Since I2b32b4fe20732728db6e9cdac7e484d96ab86dc5, go_parent_cb() is completely optional. It no longer has the task to determine the correct parent node. The is_config_node() callback is no longer needed too. Get rid of them. Change-Id: Id7ce8c4e1ac43747ad40a06d01433c366da07b42 --- M src/pcu_vty.c 1 file changed, 0 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/47/16347/1 diff --git a/src/pcu_vty.c b/src/pcu_vty.c index afc8a9b..d716a9a 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -91,35 +91,6 @@ return CMD_SUCCESS; } - -int pcu_vty_go_parent(struct vty *vty) -{ - switch (vty->node) { -#if 0 - case TRX_NODE: - vty->node = PCU_NODE; - { - struct gsm_bts_trx *trx = vty->index; - vty->index = trx->bts; - } - break; -#endif - default: - vty->node = CONFIG_NODE; - } - return (enum node_type) vty->node; -} - -int pcu_vty_is_config_node(struct vty *vty, int node) -{ - switch (node) { - case PCU_NODE: - return 1; - default: - return 0; - } -} - static struct cmd_node pcu_node = { (enum node_type) PCU_NODE, "%s(config-pcu)# ", @@ -1218,8 +1189,6 @@ .name = "Osmo-PCU", .version = PACKAGE_VERSION, .copyright = pcu_copyright, - .go_parent_cb = pcu_vty_go_parent, - .is_config_node = pcu_vty_is_config_node, }; int pcu_vty_init(void) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id7ce8c4e1ac43747ad40a06d01433c366da07b42 Gerrit-Change-Number: 16347 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 13:35:09 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 13:35:09 +0000 Subject: Change in libosmocore[master]: PRBS tool sending PRBS sequence to TRX In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16342 ) Change subject: PRBS tool sending PRBS sequence to TRX ...................................................................... Patch Set 2: This tool has very specific use cases... do we really need it in libosmocore? Maybe rather move it to osmo-trx or even trxcon repository? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16342 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2300f909bbfda10a7053320edfd1deaea763759a Gerrit-Change-Number: 16342 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Comment-Date: Sat, 30 Nov 2019 13:35:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 14:27:21 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Sat, 30 Nov 2019 14:27:21 +0000 Subject: Change in osmo-ccid-firmware[master]: add the talloc ctx to struct ccid_instance In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 ) Change subject: add the talloc ctx to struct ccid_instance ...................................................................... Patch Set 1: Fine by me, then we'll just go back to global variables with external linkage spread across a bunch of files and hope for the best. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16318 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3b73e68d0347d74f68018614613fcc802f3fdfe7 Gerrit-Change-Number: 16318 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-CC: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 14:27:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:03:03 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 15:03:03 +0000 Subject: Change in osmo-ccid-firmware[master]: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16348 ) Change subject: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git ...................................................................... jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git Change-Id: Ife4cd90ab856f06d4026a9e7ee67da94517379be --- M contrib/jenkins.sh 1 file changed, 25 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/48/16348/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index f19fc35..4ba1f19 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -9,6 +9,7 @@ TOPDIR=`pwd` +publish="$1" deps="$TOPDIR/deps" inst="$TOPDIR/install" export deps inst @@ -53,6 +54,29 @@ echo "=============== sysmoOCTSIM firmware build ===========" cd $TOPDIR/sysmoOCTSIM cd gcc -make clean +make mrproper make SYSTEM_PREFIX="$inst" $PARALLEL_MAKE + +if [ "x$publish" = "x--publish" ]; then + echo + echo "=============== UPLOAD BUILD ==============" + + cat > "/build/known_hosts" < Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:19:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 15:19:24 +0000 Subject: Change in libosmocore[master]: PRBS tool sending PRBS sequence to TRX In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16342 ) Change subject: PRBS tool sending PRBS sequence to TRX ...................................................................... Patch Set 2: > This tool has very specific use cases... do we really need it in > libosmocore? > Maybe rather move it to osmo-trx or even trxcon repository? fine with me moving it there. I just want to make sure it's somewhere in master. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16342 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2300f909bbfda10a7053320edfd1deaea763759a Gerrit-Change-Number: 16342 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Comment-Date: Sat, 30 Nov 2019 15:19:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:19:32 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 15:19:32 +0000 Subject: Change in osmo-ccid-firmware[master]: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16348 ) Change subject: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16348 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ife4cd90ab856f06d4026a9e7ee67da94517379be Gerrit-Change-Number: 16348 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 15:19:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:19:34 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 15:19:34 +0000 Subject: Change in osmo-ccid-firmware[master]: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16348 ) Change subject: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git ...................................................................... jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git Change-Id: Ife4cd90ab856f06d4026a9e7ee67da94517379be --- M contrib/jenkins.sh 1 file changed, 25 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index f19fc35..4ba1f19 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -9,6 +9,7 @@ TOPDIR=`pwd` +publish="$1" deps="$TOPDIR/deps" inst="$TOPDIR/install" export deps inst @@ -53,6 +54,29 @@ echo "=============== sysmoOCTSIM firmware build ===========" cd $TOPDIR/sysmoOCTSIM cd gcc -make clean +make mrproper make SYSTEM_PREFIX="$inst" $PARALLEL_MAKE + +if [ "x$publish" = "x--publish" ]; then + echo + echo "=============== UPLOAD BUILD ==============" + + cat > "/build/known_hosts" < Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:19:50 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 15:19:50 +0000 Subject: Change in osmo-asf4-dfu[master]: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16349 ) Change subject: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git ...................................................................... jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git Binaries will be on https://ftp.osmocom.org/binaries/osmo-asf4-dfu/ Change-Id: Idc27a3d7d2bd7cbee1061ce778ace280eff17bf4 --- M contrib/jenkins.sh M gcc/Makefile 2 files changed, 36 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-asf4-dfu refs/changes/49/16349/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 0965bf5..24bfdc1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,5 +1,10 @@ #!/bin/sh +if ! [ -x "$(command -v osmo-deps.sh)" ]; then + echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" + exit 2 +fi + set -ex if [ -z "$MAKE" ]; then @@ -8,10 +13,37 @@ exit 1 fi +TOPDIR=`pwd` + +publish="$1" + osmo-clean-workspace.sh verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") -cd gcc && $MAKE $PARALLEL_MAKE +cd gcc +$MAKE mrproper +$MAKE $PARALLEL_MAKE +$MAKE $PARALLEL_MAKE BOARD=SYSMOOCTSIM + +if [ "x$publish" = "x--publish" ]; then + echo + echo "=============== UPLOAD BUILD ==============" + + cat > "/build/known_hosts" < Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:20:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 15:20:42 +0000 Subject: Change in osmo-asf4-dfu[master]: create bootloader-$(BOARD).{elf, bin} symlinks In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16027 ) Change subject: create bootloader-$(BOARD).{elf,bin} symlinks ...................................................................... create bootloader-$(BOARD).{elf,bin} symlinks Change-Id: I3a1eb038e51f4b38ae2e2154bd53c615d98db517 --- M gcc/Makefile 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/gcc/Makefile b/gcc/Makefile index 86d199c..06404ad 100644 --- a/gcc/Makefile +++ b/gcc/Makefile @@ -180,7 +180,7 @@ vpath %.S ../ # All Target -all: $(SUB_DIRS) $(OUTPUT_FILE_PATH) +all: $(SUB_DIRS) $(OUTPUT_FILE_PATH) symlink # Linker target @@ -203,7 +203,10 @@ "arm-none-eabi-objdump" -h -S "$(OUTPUT_FILE_NAME).elf" > "$(OUTPUT_FILE_NAME).lss" "arm-none-eabi-size" "$(OUTPUT_FILE_NAME).elf" - +.PHONY: symlink +symlink: $(OUTPUT_FILE_PATH) + ln -sf $(OUTPUT_FILE_NAME).bin bootloader-$(BOARD_LC).bin + ln -sf $(OUTPUT_FILE_NAME).elf bootloader-$(BOARD_LC).elf # Compiler targets @@ -253,4 +256,4 @@ rm -f $(DEPS_AS_ARGS) rm -f $(OUTPUT_FILE_NAME).a $(OUTPUT_FILE_NAME).hex $(OUTPUT_FILE_NAME).bin \ $(OUTPUT_FILE_NAME).lss $(OUTPUT_FILE_NAME).eep $(OUTPUT_FILE_NAME).map \ - $(OUTPUT_FILE_NAME).srec + $(OUTPUT_FILE_NAME).srec bootloader-$(BOARD_LC).bin bootloader-$(BOARD_LC).elf -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16027 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: I3a1eb038e51f4b38ae2e2154bd53c615d98db517 Gerrit-Change-Number: 16027 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:20:42 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 15:20:42 +0000 Subject: Change in osmo-asf4-dfu[master]: include board (target) in filename, files are now called like In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16026 ) Change subject: include board (target) in filename, files are now called like ...................................................................... include board (target) in filename, files are now called like bootloader-sysmooctsim-0.1.1-5554-dirty.elf Change-Id: Ibdde1c02d5dd3bcd714bae1d374397d9596fede0 --- M README.md M gcc/Makefile 2 files changed, 4 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/README.md b/README.md index dd61824..e63565e 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The board name can be set in 'gcc/Makefile' *BOARD* variable, or provided while compiling (e.g. `make BOARD=SAME54_XPLAINED_PRO`). *SAME54_XPLAINED_PRO* is the default value. -The resulting firmware binary is `bootloader.bin`. +The resulting firmware binary is `bootloader-$(BOARD)-$(GIT_VERSION).bin`. Flashing ======== @@ -66,7 +66,7 @@ To flash the USB DFU bootloader, perform the following actions: * remove reserved bootloader space so we can erase it: `edbg --target atmel_cm4v2 --fuse wv,29:26,15` * erase the whole flash: `edbg --target atmel_cm4v2 --fuse v,29:26,15 --erase` -* program the bootloader: `edbg --target atmel_cm4v2 --fuse v,29:26,15 --program --verify --file bootloader.bin` +* program the bootloader: `edbg --target atmel_cm4v2 --fuse v,29:26,15 --program --verify --file bootloader-BOARD-XXXX.bin` * reserve bootloader space: `edbg --target atmel_cm4v2 --fuse wv,29:26,13` SWJ diff --git a/gcc/Makefile b/gcc/Makefile index 41779c3..86d199c 100644 --- a/gcc/Makefile +++ b/gcc/Makefile @@ -169,7 +169,8 @@ "gcc/system_same54.d" \ "atmel_start.d" -OUTPUT_FILE_NAME := bootloader-$(GIT_VERSION) +BOARD_LC := $(shell echo $(BOARD) | tr A-Z a-z) +OUTPUT_FILE_NAME := bootloader-$(BOARD_LC)-$(GIT_VERSION) QUOTE := " OUTPUT_FILE_PATH +=$(OUTPUT_FILE_NAME).elf OUTPUT_FILE_PATH_AS_ARGS +=$(OUTPUT_FILE_NAME).elf -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: Ibdde1c02d5dd3bcd714bae1d374397d9596fede0 Gerrit-Change-Number: 16026 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:20:49 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Sat, 30 Nov 2019 15:20:49 +0000 Subject: Change in osmo-ccid-firmware[master]: fix the host/emulation build In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 to look at the new patch set (#3). Change subject: fix the host/emulation build ...................................................................... fix the host/emulation build Going for __ARM__ to distinguish host and firmware builds is not sufficient here, since we might be building on a ARM host, so there is now a OCTSIMFWBUILD define. Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e --- M ccid_common/ccid_slot_fsm.c M ccid_common/iso7816_3.c M ccid_common/iso7816_fsm.c M ccid_host/Makefile M sysmoOCTSIM/gcc/Makefile 5 files changed, 32 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/19/16319/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e Gerrit-Change-Number: 16319 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: neels Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:20:55 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 15:20:55 +0000 Subject: Change in osmo-asf4-dfu[master]: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16349 ) Change subject: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16349 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: Idc27a3d7d2bd7cbee1061ce778ace280eff17bf4 Gerrit-Change-Number: 16349 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 15:20:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:20:58 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 15:20:58 +0000 Subject: Change in osmo-asf4-dfu[master]: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16349 ) Change subject: jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git ...................................................................... jenkins.sh: Add --publish to publish binaries, similar to simtrace2.git Binaries will be on https://ftp.osmocom.org/binaries/osmo-asf4-dfu/ Change-Id: Idc27a3d7d2bd7cbee1061ce778ace280eff17bf4 --- M contrib/jenkins.sh M gcc/Makefile 2 files changed, 36 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 0965bf5..24bfdc1 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,5 +1,10 @@ #!/bin/sh +if ! [ -x "$(command -v osmo-deps.sh)" ]; then + echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" + exit 2 +fi + set -ex if [ -z "$MAKE" ]; then @@ -8,10 +13,37 @@ exit 1 fi +TOPDIR=`pwd` + +publish="$1" + osmo-clean-workspace.sh verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") -cd gcc && $MAKE $PARALLEL_MAKE +cd gcc +$MAKE mrproper +$MAKE $PARALLEL_MAKE +$MAKE $PARALLEL_MAKE BOARD=SYSMOOCTSIM + +if [ "x$publish" = "x--publish" ]; then + echo + echo "=============== UPLOAD BUILD ==============" + + cat > "/build/known_hosts" < Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 15:21:27 2019 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Sat, 30 Nov 2019 15:21:27 +0000 Subject: Change in osmo-ccid-firmware[master]: fix the host/emulation build In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 ) Change subject: fix the host/emulation build ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/2/ccid_common/iso7816_fsm.c File ccid_common/iso7816_fsm.c: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319/2/ccid_common/iso7816_fsm.c at 1216 PS2, Line 1216: #if 0 > never? then just drop it? This is necessary for the equally ifdef0ed debug code below that is useful for measuring the pin/uart timing using a oscilloscope and should only be removed with the other debug code if we are certain that we won't have to look at the timings again. -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16319 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib07a58b6102b1709f295d08a764c6f118a2d0b9e Gerrit-Change-Number: 16319 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 15:21:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Sat Nov 30 15:29:51 2019 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 30 Nov 2019 15:29:51 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_mast?= =?UTF-8?Q?er-osmo-asf4-dfu_=C2=BB_a1=3Ddefault,?= =?UTF-8?Q?a2=3Ddefault,a3=3Ddefault,a4=3Ddefau?= =?UTF-8?Q?lt,osmocom-master-debian9_#332?= Message-ID: <453511656.278.1575127791085.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 18.66 KB...] -MD -MP -MF "gcc/system_same54.d" -MT"gcc/system_same54.d" -MT"gcc/system_same54.o" -o "gcc/system_same54.o" "../gcc/system_same54.c" Finished building: ../hal/utils/src/utils_syscalls.c Building file: ../hal/src/hal_delay.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_delay.d" -MT"hal/src/hal_delay.d" -MT"hal/src/hal_delay.o" -o "hal/src/hal_delay.o" "../hal/src/hal_delay.c" Finished building: ../gcc/system_same54.c Building file: ../hpl/pm/hpl_pm.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/pm/hpl_pm.d" -MT"hpl/pm/hpl_pm.d" -MT"hpl/pm/hpl_pm.o" -o "hpl/pm/hpl_pm.o" "../hpl/pm/hpl_pm.c" Finished building: ../hpl/dmac/hpl_dmac.c Building file: ../hpl/core/hpl_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/core/hpl_init.d" -MT"hpl/core/hpl_init.d" -MT"hpl/core/hpl_init.o" -o "hpl/core/hpl_init.o" "../hpl/core/hpl_init.c" Finished building: ../hal/src/hal_io.c Building file: ../hpl/gclk/hpl_gclk.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/gclk/hpl_gclk.d" -MT"hpl/gclk/hpl_gclk.d" -MT"hpl/gclk/hpl_gclk.o" -o "hpl/gclk/hpl_gclk.o" "../hpl/gclk/hpl_gclk.c" Finished building: ../hpl/core/hpl_core_m4.c Building file: ../hal/utils/src/utils_list.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_list.d" -MT"hal/utils/src/utils_list.d" -MT"hal/utils/src/utils_list.o" -o "hal/utils/src/utils_list.o" "../hal/utils/src/utils_list.c" Finished building: ../hpl/nvmctrl/hpl_nvmctrl.c Building file: ../hal/utils/src/utils_assert.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_assert.d" -MT"hal/utils/src/utils_assert.d" -MT"hal/utils/src/utils_assert.o" -o "hal/utils/src/utils_assert.o" "../hal/utils/src/utils_assert.c" Finished building: ../usb/class/dfu/device/dfudf.c Building file: ../usb_start.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb_start.d" -MT"usb_start.d" -MT"usb_start.o" -o "usb_start.o" "../usb_start.c" Finished building: ../hal/src/hal_delay.c Building file: ../hpl/oscctrl/hpl_oscctrl.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/oscctrl/hpl_oscctrl.d" -MT"hpl/oscctrl/hpl_oscctrl.d" -MT"hpl/oscctrl/hpl_oscctrl.o" -o "hpl/oscctrl/hpl_oscctrl.o" "../hpl/oscctrl/hpl_oscctrl.c" Finished building: ../hpl/pm/hpl_pm.c Building file: ../hpl/mclk/hpl_mclk.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/mclk/hpl_mclk.d" -MT"hpl/mclk/hpl_mclk.d" -MT"hpl/mclk/hpl_mclk.o" -o "hpl/mclk/hpl_mclk.o" "../hpl/mclk/hpl_mclk.c" Finished building: ../hpl/usb/hpl_usb.c Building file: ../hpl/ramecc/hpl_ramecc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/ramecc/hpl_ramecc.d" -MT"hpl/ramecc/hpl_ramecc.d" -MT"hpl/ramecc/hpl_ramecc.o" -o "hpl/ramecc/hpl_ramecc.o" "../hpl/ramecc/hpl_ramecc.c" Finished building: ../hpl/core/hpl_init.c Building file: ../usb/usb_protocol.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb/usb_protocol.d" -MT"usb/usb_protocol.d" -MT"usb/usb_protocol.o" -o "usb/usb_protocol.o" "../usb/usb_protocol.c" Finished building: ../hal/utils/src/utils_list.c Building file: ../hal/src/hal_flash.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_flash.d" -MT"hal/src/hal_flash.d" -MT"hal/src/hal_flash.o" -o "hal/src/hal_flash.o" "../hal/src/hal_flash.c" Finished building: ../hpl/gclk/hpl_gclk.c Building file: ../hal/src/hal_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_init.d" -MT"hal/src/hal_init.d" -MT"hal/src/hal_init.o" -o "hal/src/hal_init.o" "../hal/src/hal_init.c" Finished building: ../hal/utils/src/utils_assert.c Building file: ../gcc/gcc/startup_same54.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "gcc/gcc/startup_same54.d" -MT"gcc/gcc/startup_same54.d" -MT"gcc/gcc/startup_same54.o" -o "gcc/gcc/startup_same54.o" "../gcc/gcc/startup_same54.c" Finished building: ../usb_start.c Building file: ../hal/src/hal_usb_device.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_usb_device.d" -MT"hal/src/hal_usb_device.d" -MT"hal/src/hal_usb_device.o" -o "hal/src/hal_usb_device.o" "../hal/src/hal_usb_device.c" Finished building: ../hpl/oscctrl/hpl_oscctrl.c Building file: ../hpl/osc32kctrl/hpl_osc32kctrl.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/osc32kctrl/hpl_osc32kctrl.d" -MT"hpl/osc32kctrl/hpl_osc32kctrl.d" -MT"hpl/osc32kctrl/hpl_osc32kctrl.o" -o "hpl/osc32kctrl/hpl_osc32kctrl.o" "../hpl/osc32kctrl/hpl_osc32kctrl.c" Finished building: ../hpl/mclk/hpl_mclk.c Building file: ../driver_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "driver_init.d" -MT"driver_init.d" -MT"driver_init.o" -o "driver_init.o" "../driver_init.c" Finished building: ../gcc/gcc/startup_same54.c Building file: ../hal/src/hal_gpio.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_gpio.d" -MT"hal/src/hal_gpio.d" -MT"hal/src/hal_gpio.o" -o "hal/src/hal_gpio.o" "../hal/src/hal_gpio.c" Finished building: ../hpl/ramecc/hpl_ramecc.c Building file: ../hal/utils/src/utils_event.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_event.d" -MT"hal/utils/src/utils_event.d" -MT"hal/utils/src/utils_event.o" -o "hal/utils/src/utils_event.o" "../hal/utils/src/utils_event.c" Finished building: ../usb/usb_protocol.c Building file: ../hal/src/hal_sleep.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_sleep.d" -MT"hal/src/hal_sleep.d" -MT"hal/src/hal_sleep.o" -o "hal/src/hal_sleep.o" "../hal/src/hal_sleep.c" Finished building: ../hal/src/hal_init.c Building file: ../hal/src/hal_cache.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_cache.d" -MT"hal/src/hal_cache.d" -MT"hal/src/hal_cache.o" -o "hal/src/hal_cache.o" "../hal/src/hal_cache.c" Finished building: ../hal/src/hal_flash.c Building file: ../hpl/cmcc/hpl_cmcc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/cmcc/hpl_cmcc.d" -MT"hpl/cmcc/hpl_cmcc.d" -MT"hpl/cmcc/hpl_cmcc.o" -o "hpl/cmcc/hpl_cmcc.o" "../hpl/cmcc/hpl_cmcc.c" Finished building: ../hpl/osc32kctrl/hpl_osc32kctrl.c Building file: ../atmel_start.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "atmel_start.d" -MT"atmel_start.d" -MT"atmel_start.o" -o "atmel_start.o" "../atmel_start.c" Finished building: ../hal/src/hal_usb_device.c Building file: ../usb_dfu_main.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb_dfu_main.d" -MT"usb_dfu_main.d" -MT"usb_dfu_main.o" -o "usb_dfu_main.o" "../usb_dfu_main.c" Finished building: ../hal/src/hal_gpio.c Building file: ../usb/device/usbdc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb/device/usbdc.d" -MT"usb/device/usbdc.d" -MT"usb/device/usbdc.o" -o "usb/device/usbdc.o" "../usb/device/usbdc.c" Finished building: ../driver_init.c Building file: ../hal/src/hal_atomic.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_atomic.d" -MT"hal/src/hal_atomic.d" -MT"hal/src/hal_atomic.o" -o "hal/src/hal_atomic.o" "../hal/src/hal_atomic.c" Finished building: ../hal/utils/src/utils_event.c Finished building: ../hal/src/hal_cache.c Finished building: ../hal/src/hal_sleep.c Finished building: ../hpl/cmcc/hpl_cmcc.c Finished building: ../atmel_start.c Finished building: ../usb_dfu_main.c Finished building: ../hal/src/hal_atomic.c Finished building: ../usb/device/usbdc.c Building target: bootloader-same54_xplained_pro-0.1.4-ed36.elf Invoking: ARM/GNU Linker "arm-none-eabi-gcc" -o bootloader-same54_xplained_pro-0.1.4-ed36.elf "hal/src/hal_io.o" "hpl/core/hpl_core_m4.o" "usb/class/dfu/device/dfudf.o" "hal/utils/src/utils_syscalls.o" "hpl/dmac/hpl_dmac.o" "hpl/nvmctrl/hpl_nvmctrl.o" "gcc/system_same54.o" "hpl/usb/hpl_usb.o" "hal/src/hal_delay.o" "hpl/pm/hpl_pm.o" "hpl/core/hpl_init.o" "hpl/gclk/hpl_gclk.o" "hal/utils/src/utils_list.o" "hal/utils/src/utils_assert.o" "usb_start.o" "hpl/oscctrl/hpl_oscctrl.o" "hpl/mclk/hpl_mclk.o" "hpl/ramecc/hpl_ramecc.o" "usb/usb_protocol.o" "hal/src/hal_flash.o" "hal/src/hal_init.o" "gcc/gcc/startup_same54.o" "hal/src/hal_usb_device.o" "hpl/osc32kctrl/hpl_osc32kctrl.o" "driver_init.o" "hal/src/hal_gpio.o" "hal/utils/src/utils_event.o" "hal/src/hal_sleep.o" "hal/src/hal_cache.o" "hpl/cmcc/hpl_cmcc.o" "atmel_start.o" "usb_dfu_main.o" "usb/device/usbdc.o" "hal/src/hal_atomic.o" -Wl,--start-group -lm -Wl,--end-group -mthumb \ -Wl,-Map="bootloader-same54_xplained_pro-0.1.4-ed36.map" --specs=nano.specs -Wl,--gc-sections -mcpu=cortex-m4 \ \ -T"../gcc/gcc/same54p20a_flash.ld" \ -L"../gcc/gcc" Finished building target: bootloader-same54_xplained_pro-0.1.4-ed36.elf "arm-none-eabi-objcopy" -O binary "bootloader-same54_xplained_pro-0.1.4-ed36.elf" "bootloader-same54_xplained_pro-0.1.4-ed36.bin" "arm-none-eabi-objcopy" -O ihex -R .eeprom -R .fuse -R .lock -R .signature \ "bootloader-same54_xplained_pro-0.1.4-ed36.elf" "bootloader-same54_xplained_pro-0.1.4-ed36.hex" "arm-none-eabi-objcopy" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma \ .eeprom=0 --no-change-warnings -O binary "bootloader-same54_xplained_pro-0.1.4-ed36.elf" \ "bootloader-same54_xplained_pro-0.1.4-ed36.eep" || exit 0 "arm-none-eabi-objdump" -h -S "bootloader-same54_xplained_pro-0.1.4-ed36.elf" > "bootloader-same54_xplained_pro-0.1.4-ed36.lss" "arm-none-eabi-size" "bootloader-same54_xplained_pro-0.1.4-ed36.elf" text data bss dec hex filename 10832 192 66460 77484 12eac bootloader-same54_xplained_pro-0.1.4-ed36.elf ln -sf bootloader-same54_xplained_pro-0.1.4-ed36.bin bootloader-same54_xplained_pro.bin ln -sf bootloader-same54_xplained_pro-0.1.4-ed36.elf bootloader-same54_xplained_pro.elf + make -j 8 BOARD=SYSMOOCTSIM Building target: bootloader-sysmooctsim-0.1.4-ed36.elf Invoking: ARM/GNU Linker "arm-none-eabi-gcc" -o bootloader-sysmooctsim-0.1.4-ed36.elf "hal/src/hal_io.o" "hpl/core/hpl_core_m4.o" "usb/class/dfu/device/dfudf.o" "hal/utils/src/utils_syscalls.o" "hpl/dmac/hpl_dmac.o" "hpl/nvmctrl/hpl_nvmctrl.o" "gcc/system_same54.o" "hpl/usb/hpl_usb.o" "hal/src/hal_delay.o" "hpl/pm/hpl_pm.o" "hpl/core/hpl_init.o" "hpl/gclk/hpl_gclk.o" "hal/utils/src/utils_list.o" "hal/utils/src/utils_assert.o" "usb_start.o" "hpl/oscctrl/hpl_oscctrl.o" "hpl/mclk/hpl_mclk.o" "hpl/ramecc/hpl_ramecc.o" "usb/usb_protocol.o" "hal/src/hal_flash.o" "hal/src/hal_init.o" "gcc/gcc/startup_same54.o" "hal/src/hal_usb_device.o" "hpl/osc32kctrl/hpl_osc32kctrl.o" "driver_init.o" "hal/src/hal_gpio.o" "hal/utils/src/utils_event.o" "hal/src/hal_sleep.o" "hal/src/hal_cache.o" "hpl/cmcc/hpl_cmcc.o" "atmel_start.o" "usb_dfu_main.o" "usb/device/usbdc.o" "hal/src/hal_atomic.o" -Wl,--start-group -lm -Wl,--end-group -mthumb \ -Wl,-Map="bootloader-sysmooctsim-0.1.4-ed36.map" --specs=nano.specs -Wl,--gc-sections -mcpu=cortex-m4 \ \ -T"../gcc/gcc/same54p20a_flash.ld" \ -L"../gcc/gcc" Finished building target: bootloader-sysmooctsim-0.1.4-ed36.elf "arm-none-eabi-objcopy" -O binary "bootloader-sysmooctsim-0.1.4-ed36.elf" "bootloader-sysmooctsim-0.1.4-ed36.bin" "arm-none-eabi-objcopy" -O ihex -R .eeprom -R .fuse -R .lock -R .signature \ "bootloader-sysmooctsim-0.1.4-ed36.elf" "bootloader-sysmooctsim-0.1.4-ed36.hex" "arm-none-eabi-objcopy" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma \ .eeprom=0 --no-change-warnings -O binary "bootloader-sysmooctsim-0.1.4-ed36.elf" \ "bootloader-sysmooctsim-0.1.4-ed36.eep" || exit 0 "arm-none-eabi-objdump" -h -S "bootloader-sysmooctsim-0.1.4-ed36.elf" > "bootloader-sysmooctsim-0.1.4-ed36.lss" "arm-none-eabi-size" "bootloader-sysmooctsim-0.1.4-ed36.elf" text data bss dec hex filename 10832 192 66460 77484 12eac bootloader-sysmooctsim-0.1.4-ed36.elf ln -sf bootloader-sysmooctsim-0.1.4-ed36.bin bootloader-sysmooctsim.bin ln -sf bootloader-sysmooctsim-0.1.4-ed36.elf bootloader-sysmooctsim.elf + [ x--publish = x--publish ] + echo =============== UPLOAD BUILD ============== + echo =============== UPLOAD BUILD ============== + cat + SSH_COMMAND=ssh -o 'UserKnownHostsFile=/build/known_hosts' -p 48 + rsync --archive --copy-links --verbose --compress --delete --rsh ssh -o 'UserKnownHostsFile=/build/known_hosts' -p 48 /build/gcc/bootloader-sysmooctsim.{bin,elf} binaries at rita.osmocom.org:web-files/osmo-asf4-dfu/latest/ Warning: Permanently added the ECDSA host key for IP address '[144.76.43.76]:48' to the list of known hosts. rsync: link_stat "/build/gcc/bootloader-sysmooctsim.{bin,elf}" failed: No such file or directory (2) sending incremental file list sent 22 bytes received 12 bytes 68.00 bytes/sec total size is 0 speedup is 0.00 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2] Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:43:18 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:43:18 +0000 Subject: Change in osmo-pcu[master]: VTY: add warning about changing PCU socket path at run-time In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16345 ) Change subject: VTY: add warning about changing PCU socket path at run-time ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16345 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7cee2d782bd3dfc2cc8d2febc16dca905dcc294e Gerrit-Change-Number: 16345 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 18:43:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:43:29 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:43:29 +0000 Subject: Change in osmo-pcu[master]: VTY: cosmetic: use osmo_talloc_replace_string() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16346 ) Change subject: VTY: cosmetic: use osmo_talloc_replace_string() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16346 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id09c7d24b48ddecfa96404c3e75330465a11f830 Gerrit-Change-Number: 16346 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 18:43:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:44:24 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:44:24 +0000 Subject: Change in osmo-pcu[master]: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16347 ) Change subject: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() ...................................................................... Patch Set 1: not sure if we should be all that quick with merging these types of changes. It would mean that we require master-libosmocore and cannot build even against the latest tag. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id7ce8c4e1ac43747ad40a06d01433c366da07b42 Gerrit-Change-Number: 16347 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 18:44:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:44:28 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:44:28 +0000 Subject: Change in osmo-pcu[master]: VTY: add warning about changing PCU socket path at run-time In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16345 ) Change subject: VTY: add warning about changing PCU socket path at run-time ...................................................................... VTY: add warning about changing PCU socket path at run-time Change-Id: I7cee2d782bd3dfc2cc8d2febc16dca905dcc294e --- M src/pcu_vty.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 2fd57d0..1f46707 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -1097,12 +1097,13 @@ { struct gprs_rlcmac_bts *bts = bts_main_data(); + if (vty->type != VTY_FILE) + vty_out(vty, "Changing PCU socket path at run-time has no effect%s", VTY_NEWLINE); + if (bts->pcu_sock_path) { - /* FIXME: close the interface? */ talloc_free(bts->pcu_sock_path); } bts->pcu_sock_path = talloc_strdup(tall_pcu_ctx, argv[0]); - /* FIXME: re-open the interface? */ return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16345 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7cee2d782bd3dfc2cc8d2febc16dca905dcc294e Gerrit-Change-Number: 16345 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:44:28 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:44:28 +0000 Subject: Change in osmo-pcu[master]: VTY: cosmetic: use osmo_talloc_replace_string() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16346 ) Change subject: VTY: cosmetic: use osmo_talloc_replace_string() ...................................................................... VTY: cosmetic: use osmo_talloc_replace_string() Change-Id: Id09c7d24b48ddecfa96404c3e75330465a11f830 --- M src/pcu_vty.c 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 1f46707..afc8a9b 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -1100,10 +1101,7 @@ if (vty->type != VTY_FILE) vty_out(vty, "Changing PCU socket path at run-time has no effect%s", VTY_NEWLINE); - if (bts->pcu_sock_path) { - talloc_free(bts->pcu_sock_path); - } - bts->pcu_sock_path = talloc_strdup(tall_pcu_ctx, argv[0]); + osmo_talloc_replace_string(tall_pcu_ctx, &bts->pcu_sock_path, argv[0]); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16346 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id09c7d24b48ddecfa96404c3e75330465a11f830 Gerrit-Change-Number: 16346 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:45:19 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:45:19 +0000 Subject: Change in osmo-bts[master]: common/vty.c: get rid of generic exit / end commands In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16338 ) Change subject: common/vty.c: get rid of generic exit / end commands ...................................................................... Patch Set 1: Code-Review+1 might be worth noticing that they are already unused/dead code? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16338 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I425f9058ae15de929e2ba0283d4057bdf767aeeb Gerrit-Change-Number: 16338 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 18:45:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:46:30 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:46:30 +0000 Subject: Change in osmo-bts[master]: common/abis.c: pass gsm_bts_trx to e1inp_sign_link_create() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16339 ) Change subject: common/abis.c: pass gsm_bts_trx to e1inp_sign_link_create() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16339 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I8a6242d3e02f9bd19d287ecad18e001a5991175f Gerrit-Change-Number: 16339 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 18:46:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:48:57 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:48:57 +0000 Subject: Change in libosmocore[master]: libosmovty: properly initialize vty->fd in vty_new() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16148 ) Change subject: libosmovty: properly initialize vty->fd in vty_new() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16148 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec15649781317a23e13d2c2840a8f672050f76c1 Gerrit-Change-Number: 16148 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 18:48:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:49:31 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:49:31 +0000 Subject: Change in libosmocore[master]: libosmovty: simplify condition checking vty->fd in vty_close() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16149 ) Change subject: libosmovty: simplify condition checking vty->fd in vty_close() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 Gerrit-Change-Number: 16149 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Sat, 30 Nov 2019 18:49:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:49:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:49:33 +0000 Subject: Change in libosmocore[master]: libosmovty: properly initialize vty->fd in vty_new() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16148 ) Change subject: libosmovty: properly initialize vty->fd in vty_new() ...................................................................... libosmovty: properly initialize vty->fd in vty_new() Since we're using talloc_zero(), vty->fd is initialized with 0, which corresponds to stdin. Let's set an invalid value to prevent potential bugs like the one fixed by the recent change [1]. [1] Icdeaea67a06da3a2f07b252e455629559ecc1829 Change-Id: Iec15649781317a23e13d2c2840a8f672050f76c1 --- M src/vty/vty.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/vty/vty.c b/src/vty/vty.c index cd252ad..8cc2a3a 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -128,6 +128,7 @@ goto out_obuf; new->max = VTY_BUFSIZ; + new->fd = -1; return new; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16148 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iec15649781317a23e13d2c2840a8f672050f76c1 Gerrit-Change-Number: 16148 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:49:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:49:33 +0000 Subject: Change in libosmocore[master]: libosmovty: simplify condition checking vty->fd in vty_close() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16149 ) Change subject: libosmovty: simplify condition checking vty->fd in vty_close() ...................................................................... libosmovty: simplify condition checking vty->fd in vty_close() On POSIX systems, standard I/O streams - stdin, stdout, and stderr, always have default file descriptors 0, 1, and 2 respectively. Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 --- M src/vty/vty.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/vty/vty.c b/src/vty/vty.c index 8cc2a3a..ebdf9fc 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -231,8 +231,8 @@ /* Unset vector. */ vector_unset(vtyvec, vty->fd); - /* Close socket. */ - if (vty->fd > 0 && vty->fd != fileno(stderr)) { + /* Close socket (ignore standard I/O streams). */ + if (vty->fd > 2) { close(vty->fd); vty->fd = -1; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ied35d142af0ba0f5ad78975b8f22c35b32d6ff71 Gerrit-Change-Number: 16149 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:49:44 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:49:44 +0000 Subject: Change in osmo-bts[master]: bts-trx: Drop low layer MS Power Control Loop algo In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16072 ) Change subject: bts-trx: Drop low layer MS Power Control Loop algo ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0d8b0c981d9ead91d93999df6e45fb06e426aeb9 Gerrit-Change-Number: 16072 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 18:49:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:50:05 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:50:05 +0000 Subject: Change in osmo-bts[master]: bts-trx: Drop low layer MS Power Control Loop algo In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16072 ) Change subject: bts-trx: Drop low layer MS Power Control Loop algo ...................................................................... bts-trx: Drop low layer MS Power Control Loop algo Let's drop it instead of having code duplication from common code in a lower layer, and maintain only the one in l1sap for all BTS models. As a result, osmo-bts-trx loses feature BTS_FEAT_MS_PWR_CTRL_DSP and will only be able to use "ms-power-control osmo" in VTY, which will be enabled by default (meaning: change of behavior, now MS Power Control is enabled by default in osmo-bts-trx and can only by disabled by BSC). Old bts-trx specific VTY command "(no) osmotrx ms-power-loop" is marked as deprecated but still working for more usual case (1 TRX configured) to avoid breaking backward compatibility. TA low level loop is still kept in loops.c and will be moved to l1sap at some point too. Related: OS#1851 Change-Id: I0d8b0c981d9ead91d93999df6e45fb06e426aeb9 --- M include/osmo-bts/phy_link.h M include/osmo-bts/scheduler.h M src/osmo-bts-trx/loops.c M src/osmo-bts-trx/loops.h M src/osmo-bts-trx/main.c M src/osmo-bts-trx/scheduler_trx.c M src/osmo-bts-trx/trx_vty.c 7 files changed, 9 insertions(+), 214 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 316a1ba..b2e7c0e 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -45,8 +45,6 @@ uint16_t base_port_remote; struct osmo_fd trx_ofd_clk; bool trx_ta_loop; - bool trx_ms_power_loop; - int8_t trx_target_rssi; uint32_t clock_advance; uint32_t rts_advance; bool use_legacy_setbsic; diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h index 3100a1d..fed3f04 100644 --- a/include/osmo-bts/scheduler.h +++ b/include/osmo-bts/scheduler.h @@ -121,11 +121,6 @@ /* measurements */ struct { - uint8_t clock; /* cyclic clock counter */ - int8_t rssi[32]; /* last RSSI values */ - int rssi_count; /* received RSSI values */ - int rssi_valid_count; /* number of stored value */ - int rssi_got_burst; /* any burst received so far */ int32_t toa256_sum; /* sum of TOA values (1/256 symbol) */ int toa_num; /* number of TOA value */ } meas; diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c index 47e9cf3..eb25f64 100644 --- a/src/osmo-bts-trx/loops.c +++ b/src/osmo-bts-trx/loops.c @@ -36,162 +36,12 @@ #include "loops.h" /* - * MS Power loop + * Timing Advance loop */ -/*! compute the new MS POWER LEVEL communicated to the MS and store it in lchan. - * \param lchan logical channel for which to compute (and in which to store) new power value. - * \param[in] diff input delta value (in dB). How many dBs measured power - * should be increased (+) or decreased (-) to reach expected power. - */ -static void ms_power_diff(struct gsm_lchan *lchan, int8_t diff) -{ - struct gsm_bts_trx *trx = lchan->ts->trx; - enum gsm_band band = trx->bts->band; - int8_t new_power; /* TS 05.05 power level */ - int8_t new_dbm, current_dbm, bsc_max_dbm; - - /* power levels change in steps of 2 dB, so a smaller diff will end up in no change */ - if (diff < 2 && diff > -2) - return; - - current_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.current); - if (current_dbm < 0) { - LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, - "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", - lchan->ms_power_ctrl.current, gsm_band_name(band)); - return; - } - bsc_max_dbm = ms_pwr_dbm(band, lchan->ms_power_ctrl.max); - if (bsc_max_dbm < 0) { - LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, - "Failed to calculate dBm for power ctl level %" PRIu8 " on band %s\n", - lchan->ms_power_ctrl.max, gsm_band_name(band)); - return; - } - - /* don't ever change more than MS_{LOWER,RAISE}_MAX_DBM during one loop iteration, i.e. - * reduce the speed at which the MS transmit power can change */ - /* a higher value means a lower level (and vice versa) */ - if (diff > MS_RAISE_MAX_DB) - diff = MS_RAISE_MAX_DB; - else if (diff < -MS_LOWER_MAX_DB) - diff = -MS_LOWER_MAX_DB; - - new_dbm = current_dbm + diff; - - /* Make sure new_dbm is never negative. ms_pwr_ctl_lvl() can later on - cope with any unsigned dbm value, regardless of band minimal value. */ - if (new_dbm < 0) - new_dbm = 0; - - /* Don't ask for smaller ms power level than the one set by BSC upon RSL CHAN ACT */ - if (new_dbm > bsc_max_dbm) - new_dbm = bsc_max_dbm; - - new_power = ms_pwr_ctl_lvl(band, new_dbm); - if (new_power < 0) { - LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, - "Failed to retrieve power level for %" PRId8 " dBm on band %d\n", - new_dbm, band); - return; - } - - if (lchan->ms_power_ctrl.current == new_power) { - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "Keeping MS new_power at control level %d (%d dBm)\n", - new_power, ms_pwr_dbm(band, new_power)); - } else { - LOGPLCHAN(lchan, DLOOP, LOGL_INFO, "%s MS new_power from control level %d (%d dBm) to %d (%d dBm)\n", - (diff > 0) ? "Raising" : "Lowering", - lchan->ms_power_ctrl.current, ms_pwr_dbm(band, lchan->ms_power_ctrl.current), - new_power, ms_pwr_dbm(band, new_power)); - - /* store the resulting new MS power level in the lchan */ - lchan->ms_power_ctrl.current = new_power; - } -} - -/*! Input a new RSSI value into the MS power control loop for the given logical channel. - * \param lchan logical channel - * \param chan_state L1 channel state of the logical channel. - * \param rssi Received Signal Strength Indication (in dBm) */ -static void ms_power_val(struct gsm_lchan *lchan, struct l1sched_chan_state *chan_state, int8_t rssi) -{ - /* ignore inserted dummy frames, treat as lost frames */ - if (rssi < -127) - return; - - LOGPLCHAN(lchan, DLOOP, LOGL_DEBUG, "Got RSSI value of %d\n", rssi); - - chan_state->meas.rssi_count++; - - chan_state->meas.rssi_got_burst = 1; - - /* store and process RSSI */ - if (chan_state->meas.rssi_valid_count == ARRAY_SIZE(chan_state->meas.rssi)) - return; - chan_state->meas.rssi[chan_state->meas.rssi_valid_count++] = rssi; -} - -/*! Process a single clock tick of the MS power control loop. - * \param lchan Logical channel to which the clock tick applies */ -static void ms_power_clock(struct gsm_lchan *lchan, struct l1sched_chan_state *chan_state) -{ - struct gsm_bts_trx *trx = lchan->ts->trx; - struct phy_instance *pinst = trx_phy_instance(trx); - int rssi; - int i; - - /* skip every second clock, to prevent oscillating due to roundtrip - * delay */ - if (!(chan_state->meas.clock & 1)) - return; - - LOGPLCHAN(lchan, DLOOP, LOGL_DEBUG, "Got SACCH master clock at RSSI count %d\n", - chan_state->meas.rssi_count); - - /* wait for initial burst */ - if (!chan_state->meas.rssi_got_burst) - return; - - /* if no burst was received from MS at clock */ - if (chan_state->meas.rssi_count == 0) { - LOGPLCHAN(lchan, DLOOP, LOGL_NOTICE, "LOST SACCH frame, so we raise MS power output\n"); - ms_power_diff(lchan, MS_RAISE_MAX_DB); - return; - } - - /* reset total counter */ - chan_state->meas.rssi_count = 0; - - /* check the minimum level received after MS acknowledged the ordered - * power level */ - if (chan_state->meas.rssi_valid_count == 0) - return; - for (rssi = 999, i = 0; i < chan_state->meas.rssi_valid_count; i++) { - if (rssi > chan_state->meas.rssi[i]) - rssi = chan_state->meas.rssi[i]; - } - - /* reset valid counter */ - chan_state->meas.rssi_valid_count = 0; - - /* change RSSI */ - LOGPLCHAN(lchan, DLOOP, LOGL_DEBUG, "Lowest RSSI: %d Target RSSI: %d Current " - "MS power: %d (%d dBm)\n", rssi, - pinst->phy_link->u.osmotrx.trx_target_rssi, lchan->ms_power_ctrl.current, - ms_pwr_dbm(trx->bts->band, lchan->ms_power_ctrl.current)); - ms_power_diff(lchan, pinst->phy_link->u.osmotrx.trx_target_rssi - rssi); -} - - /* 90% of one bit duration in 1/256 symbols: 256*0.9 */ #define TOA256_9OPERCENT 230 -/* - * Timing Advance loop - */ - void ta_val(struct gsm_lchan *lchan, struct l1sched_chan_state *chan_state, int16_t toa256) { /* check if the current L1 header acks to the current ordered TA */ @@ -231,42 +81,17 @@ * \param[in] rssi Receive Signal Strength Indication * \param[in] toa256 Time of Arrival in 1/256 symbol periods */ void trx_loop_sacch_input(struct l1sched_trx *l1t, uint8_t chan_nr, - struct l1sched_chan_state *chan_state, int8_t rssi, int16_t toa256) + struct l1sched_chan_state *chan_state, int16_t toa256) { struct gsm_lchan *lchan = &l1t->trx->ts[L1SAP_CHAN2TS(chan_nr)] .lchan[l1sap_chan2ss(chan_nr)]; struct phy_instance *pinst = trx_phy_instance(l1t->trx); - /* if common upper layer MS power control loop is disabled - and lower layer MS power control loop is enabled, handle it */ - if (!l1t->trx->ms_pwr_ctl_soft && pinst->phy_link->u.osmotrx.trx_ms_power_loop) - ms_power_val(lchan, chan_state, rssi); - /* if TA loop is enabled, handle it */ if (pinst->phy_link->u.osmotrx.trx_ta_loop) ta_val(lchan, chan_state, toa256); } -/*! Called once every downlink SACCH block needs to be sent. */ -void trx_loop_sacch_clock(struct l1sched_trx *l1t, uint8_t chan_nr, - struct l1sched_chan_state *chan_state) -{ - struct gsm_lchan *lchan = &l1t->trx->ts[L1SAP_CHAN2TS(chan_nr)] - .lchan[l1sap_chan2ss(chan_nr)]; - struct phy_instance *pinst = trx_phy_instance(l1t->trx); - - if (lchan->ms_power_ctrl.fixed) - return; - - /* if common upper layer MS power control loop is disabled - and lower layer MS power control loop is enabled, handle it */ - if (!l1t->trx->ms_pwr_ctl_soft && pinst->phy_link->u.osmotrx.trx_ms_power_loop) - ms_power_clock(lchan, chan_state); - - /* count the number of SACCH clocks */ - chan_state->meas.clock++; -} - void trx_loop_amr_input(struct l1sched_trx *l1t, uint8_t chan_nr, struct l1sched_chan_state *chan_state, int n_errors, int n_bits_total) diff --git a/src/osmo-bts-trx/loops.h b/src/osmo-bts-trx/loops.h index 978cb7e..bc87860 100644 --- a/src/osmo-bts-trx/loops.h +++ b/src/osmo-bts-trx/loops.h @@ -7,19 +7,12 @@ * calibration of loops */ -/* how much power levels do we raise/lower as maximum (1 level = 2 dB) */ -#define MS_RAISE_MAX_DB 4 -#define MS_LOWER_MAX_DB 8 - /* * loops api */ void trx_loop_sacch_input(struct l1sched_trx *l1t, uint8_t chan_nr, - struct l1sched_chan_state *chan_state, int8_t rssi, int16_t toa); - -void trx_loop_sacch_clock(struct l1sched_trx *l1t, uint8_t chan_nr, - struct l1sched_chan_state *chan_state); + struct l1sched_chan_state *chan_state, int16_t toa); void trx_loop_amr_input(struct l1sched_trx *l1t, uint8_t chan_nr, struct l1sched_chan_state *chan_state, diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index 9a29b3b..00280ce 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -116,7 +116,6 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); gsm_bts_set_feature(bts, BTS_FEAT_CBCH); - gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); bts_model_vty_init(bts); @@ -137,8 +136,6 @@ plink->u.osmotrx.clock_advance = 20; plink->u.osmotrx.rts_advance = 5; plink->u.osmotrx.trx_ta_loop = true; - plink->u.osmotrx.trx_ms_power_loop = false; - plink->u.osmotrx.trx_target_rssi = -10; /* attempt use newest TRXD version by default: */ plink->u.osmotrx.trxd_hdr_ver_max = TRX_DATA_FORMAT_VER; } diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 07ee9da..c3608bf 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -148,8 +148,6 @@ { struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn); struct gsm_bts_trx_ts *ts = &l1t->trx->ts[tn]; - uint8_t link_id = trx_chan_desc[chan].link_id; - uint8_t chan_nr = trx_chan_desc[chan].chan_nr | tn; struct msgb *msg = NULL; /* make GCC happy */ ubit_t *burst, **bursts_p = &l1ts->chan_state[chan].dl_bursts; static ubit_t bits[GSM_BURST_LEN]; @@ -161,10 +159,6 @@ goto send_burst; } - /* send clock information to loops process */ - if (L1SAP_IS_LINK_SACCH(link_id)) - trx_loop_sacch_clock(l1t, chan_nr, &l1ts->chan_state[chan]); - /* get mac block from queue */ msg = _sched_dequeue_prim(l1t, tn, fn, chan); if (msg) @@ -959,7 +953,7 @@ /* send burst information to loops process */ if (L1SAP_IS_LINK_SACCH(trx_chan_desc[chan].link_id)) { trx_loop_sacch_input(l1t, trx_chan_desc[chan].chan_nr | bi->tn, - chan_state, bi->rssi, bi->toa256); + chan_state, bi->toa256); } /* wait until complete set of bursts */ diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c index 86f5712..5c5e477 100644 --- a/src/osmo-bts-trx/trx_vty.c +++ b/src/osmo-bts-trx/trx_vty.c @@ -160,26 +160,23 @@ return CMD_SUCCESS; } -DEFUN(cfg_phy_ms_power_loop, cfg_phy_ms_power_loop_cmd, +DEFUN_DEPRECATED(cfg_phy_ms_power_loop, cfg_phy_ms_power_loop_cmd, "osmotrx ms-power-loop <-127-127>", OSMOTRX_STR "Enable MS power control loop\nTarget RSSI value (transceiver specific, " "should be 6dB or more above noise floor)\n") { - struct phy_link *plink = vty->index; + vty_out (vty, "'osmotrx ms-power-loop' is deprecated, use 'uplink-power-target' instead%s", VTY_NEWLINE); - plink->u.osmotrx.trx_target_rssi = atoi(argv[0]); - plink->u.osmotrx.trx_ms_power_loop = true; + vty_bts->ul_power_target = atoi(argv[0]); return CMD_SUCCESS; } -DEFUN(cfg_phy_no_ms_power_loop, cfg_phy_no_ms_power_loop_cmd, +DEFUN_DEPRECATED(cfg_phy_no_ms_power_loop, cfg_phy_no_ms_power_loop_cmd, "no osmotrx ms-power-loop", NO_STR OSMOTRX_STR "Disable MS power control loop\n") { - struct phy_link *plink = vty->index; - - plink->u.osmotrx.trx_ms_power_loop = false; + vty_out (vty, "'no osmotrx ms-power-loop' is deprecated, use of BTS control loop is managed by BSC%s", VTY_NEWLINE); return CMD_SUCCESS; } @@ -525,10 +522,6 @@ vty_out(vty, " osmotrx ip remote %s%s", plink->u.osmotrx.remote_ip, VTY_NEWLINE); - if (plink->u.osmotrx.trx_ms_power_loop) - vty_out(vty, " osmotrx ms-power-loop %d%s", plink->u.osmotrx.trx_target_rssi, VTY_NEWLINE); - else - vty_out(vty, " no osmotrx ms-power-loop%s", VTY_NEWLINE); vty_out(vty, " %sosmotrx timing-advance-loop%s", (plink->u.osmotrx.trx_ta_loop) ? "" : "no ", VTY_NEWLINE); if (plink->u.osmotrx.base_port_local) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I0d8b0c981d9ead91d93999df6e45fb06e426aeb9 Gerrit-Change-Number: 16072 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:50:47 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:50:47 +0000 Subject: Change in osmo-sgsn[master]: LLC: Don't use hard-coded N201-U / N201-I values in XID In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/13624 ) Change subject: LLC: Don't use hard-coded N201-U / N201-I values in XID ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/13624 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I447a3c6dd85311772a6e219c62dc820d2726857f Gerrit-Change-Number: 13624 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 18:50:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:50:51 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:50:51 +0000 Subject: Change in osmo-sgsn[master]: LLC: Don't use hard-coded N201-U / N201-I values in XID In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/13624 ) Change subject: LLC: Don't use hard-coded N201-U / N201-I values in XID ...................................................................... LLC: Don't use hard-coded N201-U / N201-I values in XID The N201 values are negotiated per SAPI, and there are default values per each SAPI. Let's use those rather than hard-coded values. Closes: OS#3954 Change-Id: I447a3c6dd85311772a6e219c62dc820d2726857f --- M src/sgsn/gprs_llc.c 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sgsn/gprs_llc.c b/src/sgsn/gprs_llc.c index ed5d55e..6e22e65 100644 --- a/src/sgsn/gprs_llc.c +++ b/src/sgsn/gprs_llc.c @@ -69,17 +69,20 @@ struct gprs_llc_xid_field xid_version; struct gprs_llc_xid_field xid_n201u; struct gprs_llc_xid_field xid_n201i; + uint16_t n201_u, n201_i; xid_version.type = GPRS_LLC_XID_T_VERSION; xid_version.data = (uint8_t *) "\x00"; xid_version.data_len = 1; + n201_u = htons(lle->params.n201_u); xid_n201u.type = GPRS_LLC_XID_T_N201_U; - xid_n201u.data = (uint8_t *) "\x05\xf0"; + xid_n201u.data = (uint8_t *) &n201_u; xid_n201u.data_len = 2; + n201_i = htons(lle->params.n201_i); xid_n201i.type = GPRS_LLC_XID_T_N201_I; - xid_n201i.data = (uint8_t *) "\x05\xf0"; + xid_n201i.data = (uint8_t *) &n201_i; xid_n201i.data_len = 2; /* Add locally managed XID Fields */ -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/13624 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I447a3c6dd85311772a6e219c62dc820d2726857f Gerrit-Change-Number: 13624 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:51:21 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:51:21 +0000 Subject: Change in osmo-sgsn[master]: WIP: OsmoGbPROXY user manual In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/13763 ) Change subject: WIP: OsmoGbPROXY user manual ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/13763 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I80d4ea016376c59995ccfcd8685c7c0e86745bd2 Gerrit-Change-Number: 13763 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Sat, 30 Nov 2019 18:51:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:51:53 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:51:53 +0000 Subject: Change in osmo-msc[master]: Fix duplicate SMS when SMPP returns to same MSC In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16217 ) Change subject: Fix duplicate SMS when SMPP returns to same MSC ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c9b61dc05bda6f2b09cbc1890de1f2702f7abc8 Gerrit-Change-Number: 16217 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 18:51:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 18:52:02 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 18:52:02 +0000 Subject: Change in osmo-msc[master]: sms log tweak In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16219 ) Change subject: sms log tweak ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I77e7a1501f74b9045f032c5b6c2322025a11fd59 Gerrit-Change-Number: 16219 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 18:52:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 19:50:16 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 19:50:16 +0000 Subject: Change in osmo-bsc[master]: abis_nm.c: fix RSL connection temeout for trx->nr > 0 References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16350 ) Change subject: abis_nm.c: fix RSL connection temeout for trx->nr > 0 ...................................................................... abis_nm.c: fix RSL connection temeout for trx->nr > 0 After sending of NM_MT_IPACC_RSL_CONNECT message, we start a timer, and stop it on receipt of NM_MT_IPACC_RSL_CONNECT_{ACK,NACK}. When running a multi-trx setup, one can see the following warnings: DRSL NOTICE abis_nm.c:2852 (bts=0,trx=1) RSL connection request timed out DRSL NOTICE abis_nm.c:2852 (bts=0,trx=2) RSL connection request timed out even despite NM_MT_IPACC_RSL_CONNECT is actually being acknowledged. The problem is in abis_nm_rx_ipacc(): we cannot just use sign_link->trx, because the message itself was received over the OML link, so this pointer always gives us C0/TRX0. Instead, we must find a TRX by its number from the FOH header using gsm_bts_trx_by_nr(). Change-Id: Ib4b9a198da11c88a51cfa78ffb7e7235a6365ef4 --- M src/osmo-bsc/abis_nm.c 1 file changed, 18 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/16350/1 diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index ca0df68..81f09ce 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -2699,8 +2699,10 @@ struct tlv_parsed tp; struct ipacc_ack_signal_data signal; struct e1inp_sign_link *sign_link = msg->dst; + struct gsm_bts_trx *trx; foh = (struct abis_om_fom_hdr *) (oh->data + 1 + idstrlen); + trx = gsm_bts_trx_by_nr(sign_link->trx->bts, foh->obj_inst.trx_nr); if (strncmp((char *)&oh->data[1], abis_nm_ipa_magic, idstrlen)) { LOGPFOH(DNM, LOGL_ERROR, foh, "id string is not com.ipaccess !?!\n"); @@ -2727,7 +2729,9 @@ DEBUGPC(DNM, "STREAM=0x%02x ", *TLVP_VAL(&tp, NM_ATT_IPACC_STREAM_ID)); DEBUGPC(DNM, "\n"); - osmo_timer_del(&sign_link->trx->rsl_connect_timeout); + if (trx == NULL) + goto obj_inst_error; + osmo_timer_del(&trx->rsl_connect_timeout); break; case NM_MT_IPACC_RSL_CONNECT_NACK: LOGPFOH(DNM, LOGL_ERROR, foh, "RSL CONNECT NACK "); @@ -2736,7 +2740,9 @@ abis_nm_nack_cause_name(*TLVP_VAL(&tp, NM_ATT_NACK_CAUSES))); else LOGPC(DNM, LOGL_ERROR, "\n"); - osmo_timer_del(&sign_link->trx->rsl_connect_timeout); + if (trx == NULL) + goto obj_inst_error; + osmo_timer_del(&trx->rsl_connect_timeout); break; case NM_MT_IPACC_SET_NVATTR_ACK: DEBUGPFOH(DNM, foh, "SET NVATTR ACK\n"); @@ -2783,12 +2789,16 @@ case NM_MT_IPACC_RSL_CONNECT_NACK: case NM_MT_IPACC_SET_NVATTR_NACK: case NM_MT_IPACC_GET_NVATTR_NACK: - signal.trx = gsm_bts_trx_by_nr(sign_link->trx->bts, foh->obj_inst.trx_nr); + if (trx == NULL) + goto obj_inst_error; + signal.trx = trx; signal.msg_type = foh->msg_type; osmo_signal_dispatch(SS_NM, S_NM_IPACC_NACK, &signal); break; case NM_MT_IPACC_SET_NVATTR_ACK: - signal.trx = gsm_bts_trx_by_nr(sign_link->trx->bts, foh->obj_inst.trx_nr); + if (trx == NULL) + goto obj_inst_error; + signal.trx = trx; signal.msg_type = foh->msg_type; osmo_signal_dispatch(SS_NM, S_NM_IPACC_ACK, &signal); break; @@ -2797,6 +2807,10 @@ } return 0; + +obj_inst_error: + LOGPFOH(DNM, LOGL_ERROR, foh, "Unknown object instance\n"); + return -EINVAL; } /* send an ip-access manufacturer specific message */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16350 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib4b9a198da11c88a51cfa78ffb7e7235a6365ef4 Gerrit-Change-Number: 16350 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 20:48:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 20:48:08 +0000 Subject: Change in libosmocore[master]: make use of OTC_GLOBAL when allocating library-internal contexts In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13338 ) Change subject: make use of OTC_GLOBAL when allocating library-internal contexts ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/13338 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I48f475efd3ee0d5120b8fc30861e852d1a6920b1 Gerrit-Change-Number: 13338 Gerrit-PatchSet: 18 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 20:48:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 20:50:55 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 20:50:55 +0000 Subject: Change in libosmocore[master]: make use of OTC_GLOBAL when allocating library-internal contexts In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13338 ) Change subject: make use of OTC_GLOBAL when allocating library-internal contexts ...................................................................... Patch Set 18: Code-Review+1 (2 comments) https://gerrit.osmocom.org/c/libosmocore/+/13338/18/src/logging.c File src/logging.c: https://gerrit.osmocom.org/c/libosmocore/+/13338/18/src/logging.c at 1021 PS18, Line 1021: egacy legacy https://gerrit.osmocom.org/c/libosmocore/+/13338/18/src/vty/telnet_interface.c File src/vty/telnet_interface.c: https://gerrit.osmocom.org/c/libosmocore/+/13338/18/src/vty/telnet_interface.c at 78 PS18, Line 78: nly only -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/13338 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I48f475efd3ee0d5120b8fc30861e852d1a6920b1 Gerrit-Change-Number: 13338 Gerrit-PatchSet: 18 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 20:50:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Sat Nov 30 20:58:57 2019 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 30 Nov 2019 20:58:57 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_mast?= =?UTF-8?Q?er-osmo-asf4-dfu_=C2=BB_a1=3Ddefault,?= =?UTF-8?Q?a2=3Ddefault,a3=3Ddefault,a4=3Ddefau?= =?UTF-8?Q?lt,osmocom-master-debian9_#333?= In-Reply-To: <453511656.278.1575127791085.JavaMail.jenkins@jenkins.osmocom.org> References: <453511656.278.1575127791085.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <1329943493.280.1575147537785.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 19.86 KB...] -MD -MP -MF "hpl/usb/hpl_usb.d" -MT"hpl/usb/hpl_usb.d" -MT"hpl/usb/hpl_usb.o" -o "hpl/usb/hpl_usb.o" "../hpl/usb/hpl_usb.c" Finished building: ../hal/utils/src/utils_syscalls.c Building file: ../hal/src/hal_delay.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_delay.d" -MT"hal/src/hal_delay.d" -MT"hal/src/hal_delay.o" -o "hal/src/hal_delay.o" "../hal/src/hal_delay.c" Finished building: ../gcc/system_same54.c Building file: ../hpl/pm/hpl_pm.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/pm/hpl_pm.d" -MT"hpl/pm/hpl_pm.d" -MT"hpl/pm/hpl_pm.o" -o "hpl/pm/hpl_pm.o" "../hpl/pm/hpl_pm.c" Finished building: ../hpl/dmac/hpl_dmac.c Building file: ../hpl/core/hpl_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/core/hpl_init.d" -MT"hpl/core/hpl_init.d" -MT"hpl/core/hpl_init.o" -o "hpl/core/hpl_init.o" "../hpl/core/hpl_init.c" Finished building: ../hal/src/hal_delay.c Building file: ../hpl/gclk/hpl_gclk.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/gclk/hpl_gclk.d" -MT"hpl/gclk/hpl_gclk.d" -MT"hpl/gclk/hpl_gclk.o" -o "hpl/gclk/hpl_gclk.o" "../hpl/gclk/hpl_gclk.c" Finished building: ../hal/src/hal_io.c Building file: ../hal/utils/src/utils_list.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_list.d" -MT"hal/utils/src/utils_list.d" -MT"hal/utils/src/utils_list.o" -o "hal/utils/src/utils_list.o" "../hal/utils/src/utils_list.c" Finished building: ../hpl/core/hpl_core_m4.c Building file: ../hal/utils/src/utils_assert.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_assert.d" -MT"hal/utils/src/utils_assert.d" -MT"hal/utils/src/utils_assert.o" -o "hal/utils/src/utils_assert.o" "../hal/utils/src/utils_assert.c" Finished building: ../usb/class/dfu/device/dfudf.c Building file: ../usb_start.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb_start.d" -MT"usb_start.d" -MT"usb_start.o" -o "usb_start.o" "../usb_start.c" Finished building: ../hpl/nvmctrl/hpl_nvmctrl.c Building file: ../hpl/oscctrl/hpl_oscctrl.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/oscctrl/hpl_oscctrl.d" -MT"hpl/oscctrl/hpl_oscctrl.d" -MT"hpl/oscctrl/hpl_oscctrl.o" -o "hpl/oscctrl/hpl_oscctrl.o" "../hpl/oscctrl/hpl_oscctrl.c" Finished building: ../hpl/pm/hpl_pm.c Building file: ../hpl/mclk/hpl_mclk.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/mclk/hpl_mclk.d" -MT"hpl/mclk/hpl_mclk.d" -MT"hpl/mclk/hpl_mclk.o" -o "hpl/mclk/hpl_mclk.o" "../hpl/mclk/hpl_mclk.c" Finished building: ../hpl/usb/hpl_usb.c Building file: ../hpl/ramecc/hpl_ramecc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/ramecc/hpl_ramecc.d" -MT"hpl/ramecc/hpl_ramecc.d" -MT"hpl/ramecc/hpl_ramecc.o" -o "hpl/ramecc/hpl_ramecc.o" "../hpl/ramecc/hpl_ramecc.c" Finished building: ../hal/utils/src/utils_list.c Building file: ../usb/usb_protocol.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb/usb_protocol.d" -MT"usb/usb_protocol.d" -MT"usb/usb_protocol.o" -o "usb/usb_protocol.o" "../usb/usb_protocol.c" Finished building: ../hpl/mclk/hpl_mclk.c Building file: ../hal/src/hal_flash.c Finished building: ../hpl/oscctrl/hpl_oscctrl.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_flash.d" -MT"hal/src/hal_flash.d" -MT"hal/src/hal_flash.o" -o "hal/src/hal_flash.o" "../hal/src/hal_flash.c" Building file: ../hal/src/hal_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_init.d" -MT"hal/src/hal_init.d" -MT"hal/src/hal_init.o" -o "hal/src/hal_init.o" "../hal/src/hal_init.c" Finished building: ../hpl/core/hpl_init.c Finished building: ../hal/utils/src/utils_assert.c Building file: ../gcc/gcc/startup_same54.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "gcc/gcc/startup_same54.d" -MT"gcc/gcc/startup_same54.d" -MT"gcc/gcc/startup_same54.o" -o "gcc/gcc/startup_same54.o" "../gcc/gcc/startup_same54.c" Building file: ../hal/src/hal_usb_device.c ARM/GNU C Compiler Finished building: ../hpl/gclk/hpl_gclk.c "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_usb_device.d" -MT"hal/src/hal_usb_device.d" -MT"hal/src/hal_usb_device.o" -o "hal/src/hal_usb_device.o" "../hal/src/hal_usb_device.c" Building file: ../hpl/osc32kctrl/hpl_osc32kctrl.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/osc32kctrl/hpl_osc32kctrl.d" -MT"hpl/osc32kctrl/hpl_osc32kctrl.d" -MT"hpl/osc32kctrl/hpl_osc32kctrl.o" -o "hpl/osc32kctrl/hpl_osc32kctrl.o" "../hpl/osc32kctrl/hpl_osc32kctrl.c" Finished building: ../usb_start.c Building file: ../driver_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "driver_init.d" -MT"driver_init.d" -MT"driver_init.o" -o "driver_init.o" "../driver_init.c" Finished building: ../hpl/ramecc/hpl_ramecc.c Building file: ../hal/src/hal_gpio.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_gpio.d" -MT"hal/src/hal_gpio.d" -MT"hal/src/hal_gpio.o" -o "hal/src/hal_gpio.o" "../hal/src/hal_gpio.c" Finished building: ../gcc/gcc/startup_same54.c Building file: ../hal/utils/src/utils_event.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_event.d" -MT"hal/utils/src/utils_event.d" -MT"hal/utils/src/utils_event.o" -o "hal/utils/src/utils_event.o" "../hal/utils/src/utils_event.c" Finished building: ../hal/src/hal_init.c Building file: ../hal/src/hal_sleep.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_sleep.d" -MT"hal/src/hal_sleep.d" -MT"hal/src/hal_sleep.o" -o "hal/src/hal_sleep.o" "../hal/src/hal_sleep.c" Finished building: ../usb/usb_protocol.c Building file: ../hal/src/hal_cache.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_cache.d" -MT"hal/src/hal_cache.d" -MT"hal/src/hal_cache.o" -o "hal/src/hal_cache.o" "../hal/src/hal_cache.c" Finished building: ../hpl/osc32kctrl/hpl_osc32kctrl.c Building file: ../hpl/cmcc/hpl_cmcc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/cmcc/hpl_cmcc.d" -MT"hpl/cmcc/hpl_cmcc.d" -MT"hpl/cmcc/hpl_cmcc.o" -o "hpl/cmcc/hpl_cmcc.o" "../hpl/cmcc/hpl_cmcc.c" Finished building: ../hal/src/hal_flash.c Building file: ../atmel_start.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "atmel_start.d" -MT"atmel_start.d" -MT"atmel_start.o" -o "atmel_start.o" "../atmel_start.c" Finished building: ../hal/src/hal_usb_device.c Building file: ../usb_dfu_main.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb_dfu_main.d" -MT"usb_dfu_main.d" -MT"usb_dfu_main.o" -o "usb_dfu_main.o" "../usb_dfu_main.c" Finished building: ../driver_init.c Building file: ../usb/device/usbdc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb/device/usbdc.d" -MT"usb/device/usbdc.d" -MT"usb/device/usbdc.o" -o "usb/device/usbdc.o" "../usb/device/usbdc.c" Finished building: ../hal/src/hal_gpio.c Building file: ../hal/src/hal_atomic.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSAME54_XPLAINED_PRO -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_atomic.d" -MT"hal/src/hal_atomic.d" -MT"hal/src/hal_atomic.o" -o "hal/src/hal_atomic.o" "../hal/src/hal_atomic.c" Finished building: ../hal/utils/src/utils_event.c Finished building: ../hal/src/hal_sleep.c Finished building: ../hal/src/hal_cache.c Finished building: ../atmel_start.c Finished building: ../hpl/cmcc/hpl_cmcc.c Finished building: ../usb_dfu_main.c Finished building: ../usb/device/usbdc.c Finished building: ../hal/src/hal_atomic.c Building target: bootloader-same54_xplained_pro-0.1.4-ed36.elf Invoking: ARM/GNU Linker "arm-none-eabi-gcc" -o bootloader-same54_xplained_pro-0.1.4-ed36.elf "hal/src/hal_io.o" "hpl/core/hpl_core_m4.o" "usb/class/dfu/device/dfudf.o" "hal/utils/src/utils_syscalls.o" "hpl/dmac/hpl_dmac.o" "hpl/nvmctrl/hpl_nvmctrl.o" "gcc/system_same54.o" "hpl/usb/hpl_usb.o" "hal/src/hal_delay.o" "hpl/pm/hpl_pm.o" "hpl/core/hpl_init.o" "hpl/gclk/hpl_gclk.o" "hal/utils/src/utils_list.o" "hal/utils/src/utils_assert.o" "usb_start.o" "hpl/oscctrl/hpl_oscctrl.o" "hpl/mclk/hpl_mclk.o" "hpl/ramecc/hpl_ramecc.o" "usb/usb_protocol.o" "hal/src/hal_flash.o" "hal/src/hal_init.o" "gcc/gcc/startup_same54.o" "hal/src/hal_usb_device.o" "hpl/osc32kctrl/hpl_osc32kctrl.o" "driver_init.o" "hal/src/hal_gpio.o" "hal/utils/src/utils_event.o" "hal/src/hal_sleep.o" "hal/src/hal_cache.o" "hpl/cmcc/hpl_cmcc.o" "atmel_start.o" "usb_dfu_main.o" "usb/device/usbdc.o" "hal/src/hal_atomic.o" -Wl,--start-group -lm -Wl,--end-group -mthumb \ -Wl,-Map="bootloader-same54_xplained_pro-0.1.4-ed36.map" --specs=nano.specs -Wl,--gc-sections -mcpu=cortex-m4 \ \ -T"../gcc/gcc/same54p20a_flash.ld" \ -L"../gcc/gcc" Finished building target: bootloader-same54_xplained_pro-0.1.4-ed36.elf "arm-none-eabi-objcopy" -O binary "bootloader-same54_xplained_pro-0.1.4-ed36.elf" "bootloader-same54_xplained_pro-0.1.4-ed36.bin" "arm-none-eabi-objcopy" -O ihex -R .eeprom -R .fuse -R .lock -R .signature \ "bootloader-same54_xplained_pro-0.1.4-ed36.elf" "bootloader-same54_xplained_pro-0.1.4-ed36.hex" "arm-none-eabi-objcopy" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma \ .eeprom=0 --no-change-warnings -O binary "bootloader-same54_xplained_pro-0.1.4-ed36.elf" \ "bootloader-same54_xplained_pro-0.1.4-ed36.eep" || exit 0 "arm-none-eabi-objdump" -h -S "bootloader-same54_xplained_pro-0.1.4-ed36.elf" > "bootloader-same54_xplained_pro-0.1.4-ed36.lss" "arm-none-eabi-size" "bootloader-same54_xplained_pro-0.1.4-ed36.elf" text data bss dec hex filename 10832 192 66460 77484 12eac bootloader-same54_xplained_pro-0.1.4-ed36.elf ln -sf bootloader-same54_xplained_pro-0.1.4-ed36.bin bootloader-same54_xplained_pro.bin ln -sf bootloader-same54_xplained_pro-0.1.4-ed36.elf bootloader-same54_xplained_pro.elf + make -j 8 BOARD=SYSMOOCTSIM Building target: bootloader-sysmooctsim-0.1.4-ed36.elf Invoking: ARM/GNU Linker "arm-none-eabi-gcc" -o bootloader-sysmooctsim-0.1.4-ed36.elf "hal/src/hal_io.o" "hpl/core/hpl_core_m4.o" "usb/class/dfu/device/dfudf.o" "hal/utils/src/utils_syscalls.o" "hpl/dmac/hpl_dmac.o" "hpl/nvmctrl/hpl_nvmctrl.o" "gcc/system_same54.o" "hpl/usb/hpl_usb.o" "hal/src/hal_delay.o" "hpl/pm/hpl_pm.o" "hpl/core/hpl_init.o" "hpl/gclk/hpl_gclk.o" "hal/utils/src/utils_list.o" "hal/utils/src/utils_assert.o" "usb_start.o" "hpl/oscctrl/hpl_oscctrl.o" "hpl/mclk/hpl_mclk.o" "hpl/ramecc/hpl_ramecc.o" "usb/usb_protocol.o" "hal/src/hal_flash.o" "hal/src/hal_init.o" "gcc/gcc/startup_same54.o" "hal/src/hal_usb_device.o" "hpl/osc32kctrl/hpl_osc32kctrl.o" "driver_init.o" "hal/src/hal_gpio.o" "hal/utils/src/utils_event.o" "hal/src/hal_sleep.o" "hal/src/hal_cache.o" "hpl/cmcc/hpl_cmcc.o" "atmel_start.o" "usb_dfu_main.o" "usb/device/usbdc.o" "hal/src/hal_atomic.o" -Wl,--start-group -lm -Wl,--end-group -mthumb \ -Wl,-Map="bootloader-sysmooctsim-0.1.4-ed36.map" --specs=nano.specs -Wl,--gc-sections -mcpu=cortex-m4 \ \ -T"../gcc/gcc/same54p20a_flash.ld" \ -L"../gcc/gcc" Finished building target: bootloader-sysmooctsim-0.1.4-ed36.elf "arm-none-eabi-objcopy" -O binary "bootloader-sysmooctsim-0.1.4-ed36.elf" "bootloader-sysmooctsim-0.1.4-ed36.bin" "arm-none-eabi-objcopy" -O ihex -R .eeprom -R .fuse -R .lock -R .signature \ "bootloader-sysmooctsim-0.1.4-ed36.elf" "bootloader-sysmooctsim-0.1.4-ed36.hex" "arm-none-eabi-objcopy" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma \ .eeprom=0 --no-change-warnings -O binary "bootloader-sysmooctsim-0.1.4-ed36.elf" \ "bootloader-sysmooctsim-0.1.4-ed36.eep" || exit 0 "arm-none-eabi-objdump" -h -S "bootloader-sysmooctsim-0.1.4-ed36.elf" > "bootloader-sysmooctsim-0.1.4-ed36.lss" "arm-none-eabi-size" "bootloader-sysmooctsim-0.1.4-ed36.elf" text data bss dec hex filename 10832 192 66460 77484 12eac bootloader-sysmooctsim-0.1.4-ed36.elf ln -sf bootloader-sysmooctsim-0.1.4-ed36.bin bootloader-sysmooctsim.bin ln -sf bootloader-sysmooctsim-0.1.4-ed36.elf bootloader-sysmooctsim.elf =============== UPLOAD BUILD ============== + [ x--publish = x--publish ] + echo + echo =============== UPLOAD BUILD ============== + cat + SSH_COMMAND=ssh -o 'UserKnownHostsFile=/build/known_hosts' -p 48 + rsync --archive --copy-links --verbose --compress --delete --rsh ssh -o 'UserKnownHostsFile=/build/known_hosts' -p 48 /build/gcc/bootloader-sysmooctsim.{bin,elf} binaries at rita.osmocom.org:web-files/osmo-asf4-dfu/latest/ Warning: Permanently added the ECDSA host key for IP address '[144.76.43.76]:48' to the list of known hosts. sending incremental file list rsync: link_stat "/build/gcc/bootloader-sysmooctsim.{bin,elf}" failed: No such file or directory (2) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2] sent 22 bytes received 12 bytes 22.67 bytes/sec total size is 0 speedup is 0.00 Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From gerrit-no-reply at lists.osmocom.org Sat Nov 30 21:01:08 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 21:01:08 +0000 Subject: Change in osmo-asf4-dfu[master]: contrib/jenkins.sh: move to /bin/bash References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16351 ) Change subject: contrib/jenkins.sh: move to /bin/bash ...................................................................... contrib/jenkins.sh: move to /bin/bash We need this in order to support constructs like foobar.{bin,elf} to expand properly. Change-Id: I3d12795da7ab29d1bd0f7371c3365c54c79ae09a --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-asf4-dfu refs/changes/51/16351/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 24bfdc1..a3700eb 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash if ! [ -x "$(command -v osmo-deps.sh)" ]; then echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16351 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: I3d12795da7ab29d1bd0f7371c3365c54c79ae09a Gerrit-Change-Number: 16351 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 21:01:33 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 21:01:33 +0000 Subject: Change in osmo-asf4-dfu[master]: contrib/jenkins.sh: move to /bin/bash In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16351 ) Change subject: contrib/jenkins.sh: move to /bin/bash ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16351 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: I3d12795da7ab29d1bd0f7371c3365c54c79ae09a Gerrit-Change-Number: 16351 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 30 Nov 2019 21:01:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 21:01:35 2019 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 30 Nov 2019 21:01:35 +0000 Subject: Change in osmo-asf4-dfu[master]: contrib/jenkins.sh: move to /bin/bash In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16351 ) Change subject: contrib/jenkins.sh: move to /bin/bash ...................................................................... contrib/jenkins.sh: move to /bin/bash We need this in order to support constructs like foobar.{bin,elf} to expand properly. Change-Id: I3d12795da7ab29d1bd0f7371c3365c54c79ae09a --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 24bfdc1..a3700eb 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash if ! [ -x "$(command -v osmo-deps.sh)" ]; then echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/16351 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: I3d12795da7ab29d1bd0f7371c3365c54c79ae09a Gerrit-Change-Number: 16351 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Sat Nov 30 21:03:30 2019 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 30 Nov 2019 21:03:30 +0000 (UTC) Subject: =?UTF-8?Q?Jenkins_build_is_back_to_normal_?= =?UTF-8?Q?:_master-osmo-asf4-dfu_=C2=BB_a1=3Ddefa?= =?UTF-8?Q?ult,a2=3Ddefault,a3=3Ddefault,a4=3Ddef?= =?UTF-8?Q?ault,osmocom-master-debian9_#334?= In-Reply-To: <1329943493.280.1575147537785.JavaMail.jenkins@jenkins.osmocom.org> References: <1329943493.280.1575147537785.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <101582966.281.1575147810480.JavaMail.jenkins@jenkins.osmocom.org> See From gerrit-no-reply at lists.osmocom.org Sat Nov 30 21:52:08 2019 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 30 Nov 2019 21:52:08 +0000 Subject: Change in osmo-bsc[master]: fix inp_sig_cb(): notify all timeslots of all TRXes on OML S_L_INP_TE... References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16352 ) Change subject: fix inp_sig_cb(): notify all timeslots of all TRXes on OML S_L_INP_TEI_DN ...................................................................... fix inp_sig_cb(): notify all timeslots of all TRXes on OML S_L_INP_TEI_DN When running a multi-trx setup, upon stopping osmo-bts one can see: DCHAN ERROR lchan_fsm.c:80 lchan(0-1-7-TCH_F-0)[0x612000010120]{UNUSED}: (type=NONE) lchan allocation failed in state UNUSED: LCHAN_EV_TS_ERROR DCHAN ERROR lchan_fsm.c:144 lchan(0-1-7-TCH_F-0)[0x612000010120]{UNUSED}: (type=NONE) lchan activation failed (lchan allocation failed in state UNUSED: LCHAN_EV_TS_ERROR) These messages appear only for trx->nr > 0, and the problem is in inp_sig_cb(): when the main OML link goes down, we should notify all timeslots *of all TRXes*, not only TRX0. FIXME: how can we distinguish the main OML link from per-TRX ones? Change-Id: I3dc657ac5a2c5334747bd4f4db1a658acb323942 --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/16352/1 diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index da2914d..5c65c4c 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -333,6 +333,7 @@ { struct input_signal_data *isd = signal_data; struct gsm_bts_trx *trx = isd->trx; + struct gsm_bts_trx *cur_trx; /* N. B: we rely on attribute order when parsing response in abis_nm_rx_get_attr_resp() */ const uint8_t bts_attr[] = { NM_ATT_MANUF_ID, NM_ATT_SW_CONFIG, }; const uint8_t trx_attr[] = { NM_ATT_MANUF_STATE, NM_ATT_SW_CONFIG, }; @@ -351,7 +352,6 @@ if (isd->link_type == E1INP_SIGN_OML) { /* TODO: this is required for the Nokia BTS, hopping is configured during OML, other MA is not set. */ - struct gsm_bts_trx *cur_trx; /* was static in system_information.c */ extern int generate_cell_chan_list(uint8_t *chan_list, struct gsm_bts *bts); uint8_t ca[20]; @@ -379,7 +379,10 @@ if (isd->link_type == E1INP_SIGN_OML) { rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_OML_FAIL]); - all_ts_dispatch_event(trx, TS_EV_OML_DOWN); + /* Notify all timeslots of all TRXes that the OML link is gone. + * FIXME: what about per-TRX OML links? */ + llist_for_each_entry(cur_trx, &trx->bts->trx_list, list) + all_ts_dispatch_event(cur_trx, TS_EV_OML_DOWN); } else if (isd->link_type == E1INP_SIGN_RSL) { rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL]); acc_ramp_abort(&trx->bts->acc_ramp); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16352 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3dc657ac5a2c5334747bd4f4db1a658acb323942 Gerrit-Change-Number: 16352 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Nov 30 23:31:16 2019 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sat, 30 Nov 2019 23:31:16 +0000 Subject: Change in osmo-bsc[master]: abis_nm.c: fix RSL connection temeout for trx->nr > 0 In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16350 ) Change subject: abis_nm.c: fix RSL connection temeout for trx->nr > 0 ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/c/osmo-bsc/+/16350/1/src/osmo-bsc/abis_nm.c File src/osmo-bsc/abis_nm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/16350/1/src/osmo-bsc/abis_nm.c at 2705 PS1, Line 2705: trx = gsm_bts_trx_by_nr(sign_link->trx->bts, foh->obj_inst.trx_nr); Probably better deferring using foh stuff after the verifications done in line 2707. https://gerrit.osmocom.org/c/osmo-bsc/+/16350/1/src/osmo-bsc/abis_nm.c at 2743 PS1, Line 2743: if (trx == NULL) Usually better using !trx for pointers. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/16350 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib4b9a198da11c88a51cfa78ffb7e7235a6365ef4 Gerrit-Change-Number: 16350 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 30 Nov 2019 23:31:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: