Build failure of network:osmocom:nightly/osmo-msc in Debian_9.0/armv7l

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_9.0/armv7l

Package network:osmocom:nightly/osmo-msc failed to build in Debian_9.0/armv7l

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  874s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[  874s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[  874s]   ^
[  874s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[  874s] make[4]: *** [msc_ifaces.o] Error 1
[  874s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[  874s] Makefile:424: recipe for target 'all-recursive' failed
[  874s] make[3]: *** [all-recursive] Error 1
[  874s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  874s] Makefile:460: recipe for target 'all-recursive' failed
[  874s] make[2]: *** [all-recursive] Error 1
[  874s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  874s] Makefile:392: recipe for target 'all' failed
[  874s] make[1]: *** [all] Error 2
[  874s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  874s] dh_auto_build: make -j1 returned exit code 2
[  874s] debian/rules:45: recipe for target 'build' failed
[  874s] make: *** [build] Error 2
[  874s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  874s] 
[  874s] armbuild22 failed "build osmo-msc_1.1.2.20171201.dsc" at Sat Dec  2 
00:30:12 UTC 2017.
[  874s] 
[  874s] ### VM INTERACTION START ###
[  877s] [  820.383096] SysRq : Power Off
[  878s] [  820.459759] reboot: Power down
[  878s] ### VM INTERACTION END ###
[  878s] 
[  878s] armbuild22 failed "build osmo-msc_1.1.2.20171201.dsc" at Sat Dec  2 
00:30:16 UTC 2017.
[  878s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in Debian_9.0/aarch64

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_9.0/aarch64

Package network:osmocom:nightly/osmo-msc failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  619s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[  619s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[  619s]   ^
[  619s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[  619s] make[4]: *** [msc_ifaces.o] Error 1
[  619s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[  619s] Makefile:424: recipe for target 'all-recursive' failed
[  619s] make[3]: *** [all-recursive] Error 1
[  619s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  619s] Makefile:460: recipe for target 'all-recursive' failed
[  619s] make[2]: *** [all-recursive] Error 1
[  619s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  619s] Makefile:392: recipe for target 'all' failed
[  619s] make[1]: *** [all] Error 2
[  619s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  619s] dh_auto_build: make -j1 returned exit code 2
[  619s] debian/rules:45: recipe for target 'build' failed
[  619s] make: *** [build] Error 2
[  619s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  619s] 
[  619s] obs-arm-1 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
21:34:09 UTC 2017.
[  619s] 
[  619s] ### VM INTERACTION START ###
[  622s] [  570.332968] sysrq: SysRq : Power Off
[  623s] [  570.357059] reboot: Power down
[  623s] ### VM INTERACTION END ###
[  623s] 
[  623s] obs-arm-1 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
21:34:12 UTC 2017.
[  623s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_16.04/i586

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_16.04/i586

Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_16.04/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  141s]  from msc_ifaces.c:24:
[  141s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[  141s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[  141s]   ^
[  141s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[  141s] make[4]: *** [msc_ifaces.o] Error 1
[  141s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[  141s] Makefile:424: recipe for target 'all-recursive' failed
[  141s] make[3]: *** [all-recursive] Error 1
[  141s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  141s] Makefile:460: recipe for target 'all-recursive' failed
[  141s] make[2]: *** [all-recursive] Error 1
[  141s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  141s] Makefile:392: recipe for target 'all' failed
[  141s] make[1]: *** [all] Error 2
[  141s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  141s] dh_auto_build: make -j1 returned exit code 2
[  141s] debian/rules:45: recipe for target 'build' failed
[  141s] make: *** [build] Error 2
[  141s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  141s] 
[  141s] lamb26 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:26:28 UTC 2017.
[  141s] 
[  141s] ### VM INTERACTION START ###
[  145s] [  138.463474] reboot: Power down
[  145s] ### VM INTERACTION END ###
[  145s] 
[  145s] lamb26 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:26:31 UTC 2017.
[  145s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_17.04/x86_64

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_17.04/x86_64

Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_17.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[   86s]  from msc_ifaces.c:24:
[   86s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[   86s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[   86s]   ^
[   86s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[   86s] make[4]: *** [msc_ifaces.o] Error 1
[   86s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[   86s] Makefile:424: recipe for target 'all-recursive' failed
[   86s] make[3]: *** [all-recursive] Error 1
[   86s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[   86s] Makefile:460: recipe for target 'all-recursive' failed
[   86s] make[2]: *** [all-recursive] Error 1
[   86s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[   86s] Makefile:392: recipe for target 'all' failed
[   86s] make[1]: *** [all] Error 2
[   86s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[   86s] dh_auto_build: make -j1 returned exit code 2
[   86s] debian/rules:45: recipe for target 'build' failed
[   86s] make: *** [build] Error 2
[   86s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[   86s] 
[   86s] lamb06 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:25:28 UTC 2017.
[   86s] 
[   86s] ### VM INTERACTION START ###
[   89s] [   81.544327] reboot: Power down
[   89s] ### VM INTERACTION END ###
[   89s] 
[   89s] lamb06 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:25:31 UTC 2017.
[   89s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_16.04/x86_64

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_16.04/x86_64

Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_16.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  204s]  from msc_ifaces.c:24:
[  204s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[  204s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[  204s]   ^
[  204s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[  204s] make[4]: *** [msc_ifaces.o] Error 1
[  204s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[  204s] Makefile:424: recipe for target 'all-recursive' failed
[  204s] make[3]: *** [all-recursive] Error 1
[  204s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  204s] Makefile:460: recipe for target 'all-recursive' failed
[  204s] make[2]: *** [all-recursive] Error 1
[  204s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  204s] Makefile:392: recipe for target 'all' failed
[  204s] make[1]: *** [all] Error 2
[  204s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  204s] dh_auto_build: make -j1 returned exit code 2
[  204s] debian/rules:45: recipe for target 'build' failed
[  204s] make: *** [build] Error 2
[  204s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  204s] 
[  204s] lamb14 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:23:43 UTC 2017.
[  204s] 
[  204s] ### VM INTERACTION START ###
[  208s] [  194.340213] reboot: Power down
[  208s] ### VM INTERACTION END ###
[  208s] 
[  208s] lamb14 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:23:47 UTC 2017.
[  208s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_17.04/i586

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_17.04/i586

Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_17.04/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  124s]  from msc_ifaces.c:24:
[  124s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[  124s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[  124s]   ^
[  124s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[  124s] make[4]: *** [msc_ifaces.o] Error 1
[  124s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[  124s] Makefile:424: recipe for target 'all-recursive' failed
[  124s] make[3]: *** [all-recursive] Error 1
[  124s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  124s] Makefile:460: recipe for target 'all-recursive' failed
[  124s] make[2]: *** [all-recursive] Error 1
[  124s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  124s] Makefile:392: recipe for target 'all' failed
[  124s] make[1]: *** [all] Error 2
[  124s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  124s] dh_auto_build: make -j1 returned exit code 2
[  124s] debian/rules:45: recipe for target 'build' failed
[  124s] make: *** [build] Error 2
[  124s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  124s] 
[  124s] cloud112 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:23:02 UTC 2017.
[  124s] 
[  124s] ### VM INTERACTION START ###
[  127s] [  107.108360] reboot: Power down
[  128s] ### VM INTERACTION END ###
[  128s] 
[  128s] cloud112 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:23:07 UTC 2017.
[  128s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in Debian_9.0/i586

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_9.0/i586

Package network:osmocom:nightly/osmo-msc failed to build in Debian_9.0/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[   82s]  from msc_ifaces.c:24:
[   82s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[   82s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[   82s]   ^
[   82s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[   82s] make[4]: *** [msc_ifaces.o] Error 1
[   82s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[   82s] Makefile:424: recipe for target 'all-recursive' failed
[   82s] make[3]: *** [all-recursive] Error 1
[   82s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[   82s] Makefile:460: recipe for target 'all-recursive' failed
[   82s] make[2]: *** [all-recursive] Error 1
[   82s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[   82s] Makefile:392: recipe for target 'all' failed
[   82s] make[1]: *** [all] Error 2
[   82s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[   82s] dh_auto_build: make -j1 returned exit code 2
[   82s] debian/rules:45: recipe for target 'build' failed
[   82s] make: *** [build] Error 2
[   82s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[   82s] 
[   82s] build79 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:23:18 UTC 2017.
[   82s] 
[   82s] ### VM INTERACTION START ###
[   85s] [   75.760318] reboot: Power down
[   85s] ### VM INTERACTION END ###
[   85s] 
[   85s] build79 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:23:21 UTC 2017.
[   85s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_16.10/i586

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_16.10/i586

Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_16.10/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  124s]  from msc_ifaces.c:24:
[  124s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[  124s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[  124s]   ^
[  124s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[  124s] make[4]: *** [msc_ifaces.o] Error 1
[  124s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[  124s] Makefile:424: recipe for target 'all-recursive' failed
[  124s] make[3]: *** [all-recursive] Error 1
[  124s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  124s] Makefile:460: recipe for target 'all-recursive' failed
[  124s] make[2]: *** [all-recursive] Error 1
[  124s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  124s] Makefile:392: recipe for target 'all' failed
[  124s] make[1]: *** [all] Error 2
[  124s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  124s] dh_auto_build: make -j1 returned exit code 2
[  124s] debian/rules:45: recipe for target 'build' failed
[  124s] make: *** [build] Error 2
[  124s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  124s] 
[  124s] cloud107 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:20:29 UTC 2017.
[  124s] 
[  124s] ### VM INTERACTION START ###
[  127s] [  103.788655] reboot: Power down
[  130s] ### VM INTERACTION END ###
[  132s] 
[  132s] cloud107 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:20:37 UTC 2017.
[  132s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in Debian_9.0/x86_64

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_9.0/x86_64

Package network:osmocom:nightly/osmo-msc failed to build in Debian_9.0/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  136s]  from msc_ifaces.c:24:
[  136s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[  136s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[  136s]   ^
[  136s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[  136s] make[4]: *** [msc_ifaces.o] Error 1
[  136s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[  136s] Makefile:424: recipe for target 'all-recursive' failed
[  136s] make[3]: *** [all-recursive] Error 1
[  136s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  136s] Makefile:460: recipe for target 'all-recursive' failed
[  136s] make[2]: *** [all-recursive] Error 1
[  136s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  136s] Makefile:392: recipe for target 'all' failed
[  136s] make[1]: *** [all] Error 2
[  136s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  136s] dh_auto_build: make -j1 returned exit code 2
[  136s] debian/rules:45: recipe for target 'build' failed
[  136s] make: *** [build] Error 2
[  136s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  136s] 
[  136s] cloud120 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:19:10 UTC 2017.
[  136s] 
[  136s] ### VM INTERACTION START ###
[  140s] [  111.258730] reboot: Power down
[  141s] ### VM INTERACTION END ###
[  141s] 
[  141s] cloud120 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:19:14 UTC 2017.
[  141s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_17.10/x86_64

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_17.10/x86_64

Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_17.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  171s]  from msc_ifaces.c:24:
[  171s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[  171s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[  171s]   ^
[  171s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[  171s] make[4]: *** [msc_ifaces.o] Error 1
[  171s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[  171s] Makefile:424: recipe for target 'all-recursive' failed
[  171s] make[3]: *** [all-recursive] Error 1
[  171s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  171s] Makefile:460: recipe for target 'all-recursive' failed
[  171s] make[2]: *** [all-recursive] Error 1
[  171s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  171s] Makefile:392: recipe for target 'all' failed
[  171s] make[1]: *** [all] Error 2
[  171s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  171s] dh_auto_build: make -j1 returned exit code 2
[  171s] debian/rules:45: recipe for target 'build' failed
[  171s] make: *** [build] Error 2
[  171s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  171s] 
[  171s] lamb22 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:19:51 UTC 2017.
[  171s] 
[  171s] ### VM INTERACTION START ###
[  174s] [  148.102880] reboot: Power down
[  174s] ### VM INTERACTION END ###
[  174s] 
[  174s] lamb22 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:19:55 UTC 2017.
[  174s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in xUbuntu_16.10/x86_64

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/xUbuntu_16.10/x86_64

Package network:osmocom:nightly/osmo-msc failed to build in xUbuntu_16.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[   56s]  from msc_ifaces.c:24:
[   56s] /usr/include/osmocom/mgcp_client/mgcp_client.h:108:14: note: declared 
here
[   56s]  struct msgb *mgcp_msg_dlcx(struct mgcp_client *mgcp, uint16_t 
rtp_endpoint,
[   56s]   ^
[   56s] Makefile:508: recipe for target 'msc_ifaces.o' failed
[   56s] make[4]: *** [msc_ifaces.o] Error 1
[   56s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[   56s] Makefile:424: recipe for target 'all-recursive' failed
[   56s] make[3]: *** [all-recursive] Error 1
[   56s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[   56s] Makefile:460: recipe for target 'all-recursive' failed
[   56s] make[2]: *** [all-recursive] Error 1
[   56s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[   56s] Makefile:392: recipe for target 'all' failed
[   56s] make[1]: *** [all] Error 2
[   56s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[   56s] dh_auto_build: make -j1 returned exit code 2
[   56s] debian/rules:45: recipe for target 'build' failed
[   56s] make: *** [build] Error 2
[   56s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[   56s] 
[   56s] build79 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:17:08 UTC 2017.
[   56s] 
[   56s] ### VM INTERACTION START ###
[   60s] [   53.436831] reboot: Power down
[   60s] ### VM INTERACTION END ###
[   60s] 
[   60s] build79 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:17:12 UTC 2017.
[   60s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in Debian_8.0/i586

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_8.0/i586

Package network:osmocom:nightly/osmo-msc failed to build in Debian_8.0/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  111s] msc_ifaces.c:417:2: warning: 'mgcp_msg_dlcx' is deprecated (declared 
at /usr/include/osmocom/mgcp_client/mgcp_client.h:108): Use mgcp_msg_gen() 
instead [-Wdeprecated-declarations]
[  111s]   msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint,
[  111s]   ^
[  111s] Makefile:496: recipe for target 'msc_ifaces.o' failed
[  111s] make[4]: *** [msc_ifaces.o] Error 1
[  111s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[  111s] Makefile:412: recipe for target 'all-recursive' failed
[  111s] make[3]: *** [all-recursive] Error 1
[  111s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  111s] Makefile:448: recipe for target 'all-recursive' failed
[  111s] make[2]: *** [all-recursive] Error 1
[  111s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  111s] Makefile:379: recipe for target 'all' failed
[  111s] make[1]: *** [all] Error 2
[  111s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  111s] dh_auto_build: make -j1 returned exit code 2
[  111s] debian/rules:45: recipe for target 'build' failed
[  111s] make: *** [build] Error 2
[  111s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  111s] 
[  111s] lamb61 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:14:33 UTC 2017.
[  111s] 
[  111s] ### VM INTERACTION START ###
[  112s] Powering off.
[  112s] [  104.303299] reboot: Power down
[  112s] ### VM INTERACTION END ###
[  112s] 
[  112s] lamb61 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:14:35 UTC 2017.
[  112s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-msc in Debian_8.0/x86_64

2017-12-01 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-msc/Debian_8.0/x86_64

Package network:osmocom:nightly/osmo-msc failed to build in Debian_8.0/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-msc

Last lines of build log:
[  102s] msc_ifaces.c:417:2: warning: 'mgcp_msg_dlcx' is deprecated (declared 
at /usr/include/osmocom/mgcp_client/mgcp_client.h:108): Use mgcp_msg_gen() 
instead [-Wdeprecated-declarations]
[  102s]   msg = mgcp_msg_dlcx(mgcp, conn->rtp.mgcp_rtp_endpoint,
[  102s]   ^
[  102s] Makefile:496: recipe for target 'msc_ifaces.o' failed
[  102s] make[4]: *** [msc_ifaces.o] Error 1
[  102s] make[4]: Leaving directory '/usr/src/packages/BUILD/src/libmsc'
[  102s] Makefile:412: recipe for target 'all-recursive' failed
[  102s] make[3]: *** [all-recursive] Error 1
[  102s] make[3]: Leaving directory '/usr/src/packages/BUILD/src'
[  102s] Makefile:448: recipe for target 'all-recursive' failed
[  102s] make[2]: *** [all-recursive] Error 1
[  102s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  102s] Makefile:379: recipe for target 'all' failed
[  102s] make[1]: *** [all] Error 2
[  102s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  102s] dh_auto_build: make -j1 returned exit code 2
[  102s] debian/rules:45: recipe for target 'build' failed
[  102s] make: *** [build] Error 2
[  102s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  102s] 
[  102s] lamb58 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:13:18 UTC 2017.
[  102s] 
[  102s] ### VM INTERACTION START ###
[  104s] Powering off.
[  104s] [   95.950347] reboot: Power down
[  104s] ### VM INTERACTION END ###
[  104s] 
[  104s] lamb58 failed "build osmo-msc_1.1.2.20171201.dsc" at Fri Dec  1 
20:13:20 UTC 2017.
[  104s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[PATCH] osmo-msc[master]: Remove unneeded .py scripts

2017-12-01 Thread Max
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/4991

to look at the new patch set (#3).

Remove unneeded .py scripts

The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for
vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py
are not MSC-specific: leftovers from repository split which are now
available in osmo-python-tests as well.

Change-Id: Ia3ab77846c9beae7eca32a81079a4a9bfa4dcc75
---
M Makefile.am
M configure.ac
D contrib/Makefile.am
D contrib/ipa.py
D contrib/soap.py
D contrib/twisted_ipa.py
M tests/ctrl_test_runner.py
M tests/vty_test_runner.py
8 files changed, 2 insertions(+), 863 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/91/4991/3

diff --git a/Makefile.am b/Makefile.am
index 690deae..2f0a786 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,6 @@
include \
src \
tests \
-   contrib \
$(NULL)
 
 BUILT_SOURCES = $(top_srcdir)/.version
diff --git a/configure.ac b/configure.ac
index 5766fd0..6434869 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,5 +196,4 @@
 tests/msc_vlr/Makefile
 doc/Makefile
 doc/examples/Makefile
-contrib/Makefile
 Makefile)
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
deleted file mode 100644
index db6d0f5..000
--- a/contrib/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = ipa.py
diff --git a/contrib/ipa.py b/contrib/ipa.py
deleted file mode 100755
index 71cbf45..000
--- a/contrib/ipa.py
+++ /dev/null
@@ -1,278 +0,0 @@
-#!/usr/bin/python3
-# -*- mode: python-mode; py-indent-tabs-mode: nil -*-
-"""
-/*
- * Copyright (C) 2016 sysmocom s.f.m.c. GmbH
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-"""
-
-import struct, random, sys
-
-class IPA(object):
-"""
-Stateless IPA protocol multiplexer: add/remove/parse (extended) header
-"""
-version = "0.0.5"
-TCP_PORT_OML = 3002
-TCP_PORT_RSL = 3003
-# OpenBSC extensions: OSMO, MGCP_OLD
-PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, 
MGCP_OLD=0xFC)
-# ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol
-EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6)
-# OpenBSC extension: SCCP_OLD
-MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, 
SCCP_OLD=0xFF)
-_IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, 
SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8)
-CTRL_GET = 'GET'
-CTRL_SET = 'SET'
-CTRL_REP = 'REPLY'
-CTRL_ERR = 'ERR'
-CTRL_TRAP = 'TRAP'
-
-def _l(self, d, p):
-"""
-Reverse dictionary lookup: return key for a given value
-"""
-if p is None:
-return 'UNKNOWN'
-return list(d.keys())[list(d.values()).index(p)]
-
-def _tag(self, t, v):
-"""
-Create TAG as TLV data
-"""
-return struct.pack(">HB", len(v) + 1, t) + v
-
-def proto(self, p):
-"""
-Lookup protocol name
-"""
-return self._l(self.PROTO, p)
-
-def ext(self, p):
-"""
-Lookup protocol extension name
-"""
-return self._l(self.EXT, p)
-
-def msgt(self, p):
-"""
-Lookup message type name
-"""
-return self._l(self.MSGT, p)
-
-def idtag(self, p):
-"""
-Lookup ID tag name
-"""
-return self._l(self._IDTAG, p)
-
-def ext_name(self, proto, exten):
-"""
-Return proper extension byte name depending on the protocol used
-"""
-if self.PROTO['CCM'] == proto:
-return self.msgt(exten)
-if self.PROTO['OSMO'] == proto:
-return self.ext(exten)
-return None
-
-def add_header(self, data, proto, ext=None):
-"""
-Add IPA header (with extension if necessary), data must be represented 
as bytes
-"""
-if ext is None:
-return struct.pack(">HB", len(data) + 1, proto) + data
-return struct.pack(">HBB", len(data) + 1, proto, ext) + data
-
-def del_header(self, data):
-"""
-Strip IPA protocol header correctly removing extension if present
-Returns dat

libosmocore[master]: Add functions for extended RACH coding

2017-12-01 Thread Vadim Yanitskiy

Patch Set 16: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/5062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 16
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 
Gerrit-HasComments: No


[PATCH] libosmocore[master]: embedded: fix tests

2017-12-01 Thread Max

Review at  https://gerrit.osmocom.org/5123

embedded: fix tests

In case of embedded build some tests are failing to link properly. Fix
it:

* do not run fsm_test unless CTRL is enabled
* do not run fr_test unless GB is enabled
* do not link loggingrb_test with libosmovty

Change-Id: Icedad5ba3ed311ccdb97fa3ccd3002f5fda8be68
---
M tests/Makefile.am
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/23/5123/1

diff --git a/tests/Makefile.am b/tests/Makefile.am
index c609d6a..78542b2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,12 +8,12 @@
  conv/conv_test auth/milenage_test lapd/lapd_test  \
  gsm0808/gsm0808_test gsm0408/gsm0408_test \
 gprs/gprs_test kasumi/kasumi_test gea/gea_test \
-logging/logging_test fr/fr_test codec/codec_test   \
+logging/logging_test codec/codec_test  \
 loggingrb/loggingrb_test strrb/strrb_test  \
 comp128/comp128_test smscb/gsm0341_test\
 bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test\
 bits/bitfield_test \
-tlv/tlv_test gsup/gsup_test oap/oap_test fsm/fsm_test  \
+tlv/tlv_test gsup/gsup_test oap/oap_test   \
 write_queue/wqueue_test socket/socket_test \
 coding/coding_test conv/conv_gsm0503_test  \
 abis/abis_test endian/endian_test sercomm/sercomm_test \
@@ -36,11 +36,11 @@
 endif
 
 if ENABLE_CTRL
-check_PROGRAMS += ctrl/ctrl_test
+check_PROGRAMS += ctrl/ctrl_test fsm/fsm_test
 endif
 
 if ENABLE_GB
-check_PROGRAMS += gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test
+check_PROGRAMS += gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test 
fr/fr_test
 endif
 
 utils_utils_test_SOURCES = utils/utils_test.c
@@ -137,7 +137,7 @@
 codec_codec_test_LDADD = $(LDADD) $(top_builddir)/src/codec/libosmocodec.la
 
 loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c
-loggingrb_loggingrb_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la
+loggingrb_loggingrb_test_LDADD = $(LDADD)
 
 strrb_strrb_test_SOURCES = strrb/strrb_test.c
 

-- 
To view, visit https://gerrit.osmocom.org/5123
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icedad5ba3ed311ccdb97fa3ccd3002f5fda8be68
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] libosmocore[master]: Add functions for extended RACH coding

2017-12-01 Thread Max
Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/5062

to look at the new patch set (#16).

Add functions for extended RACH coding

Add support for extended RACH (11 bit) according 3GPP TS 45.003 §5.3.2:

* convolutional code with puncturing
* encoding/decoding routines
* corresponding tests

Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Related: OS#1548
---
M TODO-RELEASE
M include/osmocom/coding/gsm0503_coding.h
M src/coding/gsm0503_coding.c
M src/coding/libosmocoding.map
M src/gsm/libosmogsm.map
M tests/coding/coding_test.c
M tests/coding/coding_test.ok
M tests/conv/conv_gsm0503_test.ok
M utils/conv_codes_gsm.py
9 files changed, 30,850 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/16


-- 
To view, visit https://gerrit.osmocom.org/5062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 16
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 


libosmocore[master]: Add functions for extended RACH coding

2017-12-01 Thread Vadim Yanitskiy

Patch Set 15: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/5062/15/include/osmocom/coding/gsm0503_coding.h
File include/osmocom/coding/gsm0503_coding.h:

Line 69: int gsm0503_rach_encode(ubit_t *burst, const uint8_t *ra, uint8_t 
bsic) OSMO_DEPRECATED("Use gsm0503_rach_encode_ext() instead");
> Use gsm0503_rach_encode_ext() instead

Now gsm0503_rach_ext_encode().


-- 
To view, visit https://gerrit.osmocom.org/5062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 15
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 
Gerrit-HasComments: Yes


[PATCH] libosmocore[master]: Fix embedded build

2017-12-01 Thread Max

Review at  https://gerrit.osmocom.org/5122

Fix embedded build

Do not attempt to load auth plugins - this does not make sense on
embedded target anyway.

Change-Id: Ie92d2eea21e19e499b3f3bb4d5a82e31fbbea3f0
---
M src/gsm/auth_core.c
M src/gsm/gprs_cipher_core.c
2 files changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/22/5122/1

diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c
index 9e3b2c0..400708f 100644
--- a/src/gsm/auth_core.c
+++ b/src/gsm/auth_core.c
@@ -20,6 +20,8 @@
  *
  */
 
+#include "config.h"
+
 #include 
 #include 
 #include 
@@ -71,7 +73,11 @@
 int osmo_auth_load(const char *path)
 {
/* load all plugins available from path */
+#if !defined(EMBEDDED)
return osmo_plugin_load_all(path);
+#else
+   return -1;
+#endif
 }
 
 /*! Determine if a given authentication algorithm is supported
diff --git a/src/gsm/gprs_cipher_core.c b/src/gsm/gprs_cipher_core.c
index 6fa25d6..7f2b1a5 100644
--- a/src/gsm/gprs_cipher_core.c
+++ b/src/gsm/gprs_cipher_core.c
@@ -23,6 +23,8 @@
  *
  */
 
+#include "config.h"
+
 #include 
 #include 
 
@@ -68,9 +70,11 @@
 /* load all available GPRS cipher plugins */
 int gprs_cipher_load(const char *path)
 {
+#if !defined(EMBEDDED)
/* load all plugins available from path */
if (path)
return osmo_plugin_load_all(path);
+#endif
return 0;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/5122
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie92d2eea21e19e499b3f3bb4d5a82e31fbbea3f0
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] libosmocore[master]: Add function to estimate elapsed time

2017-12-01 Thread Max
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/5103

to look at the new patch set (#4).

Add function to estimate elapsed time

It uses monotonic clock for proper time estimation.

Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277
Related: OS#2586
---
M TODO-RELEASE
M include/osmocom/core/timer.h
M src/timer.c
3 files changed, 70 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/5103/4

diff --git a/TODO-RELEASE b/TODO-RELEASE
index 99865c6..5861956 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -8,3 +8,4 @@
 # If any interfaces have been removed or changed since the last public 
release: c:r:0.
 #library   whatdescription / commit summary line
 core   msgb_queue_free()   add inline func to msgb.h
+core   osmo_time_elapsed() add function to estimate elapsed time
diff --git a/include/osmocom/core/timer.h b/include/osmocom/core/timer.h
index 4958efb..7df01ce 100644
--- a/include/osmocom/core/timer.h
+++ b/include/osmocom/core/timer.h
@@ -50,6 +50,18 @@
 #define OSMO_SEC2HRS(sec) ((sec % (60 * 60 * 24)) / (60 * 60))
 #define OSMO_SEC2DAY(sec) ((sec % (60 * 60 * 24 * 365)) / (60 * 60 * 24)) /* 
we ignore leap year for simplicity */
 
+#define OSMO_SEC2MS(sec) (sec * 1000)
+#define OSMO_SEC2CS(sec) (sec * 100)
+
+#define OSMO_NSEC2MS(ns) (ns / 100)
+#define OSMO_NSEC2CS(ns) (ns / 1000)
+
+enum osmo_elapsed {
+   T_SECS,
+   T_MILLIS,
+   T_CENTIS,
+};
+
 /*! A structure representing a single instance of a timer */
 struct osmo_timer_list {
struct rb_node node;  /*!< rb-tree node header */
@@ -61,6 +73,8 @@
void *data;   /*!< user data for callback */
 };
 
+time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind);
+
 /*
  * timer management
  */
diff --git a/src/timer.c b/src/timer.c
index 9ec7a00..2b4e100 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -25,6 +25,7 @@
  *
  */
 
+#include "config.h"
 
 /*! \addtogroup timer
  *  @{
@@ -35,6 +36,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+
+#include 
 #include 
 #include 
 #include 
@@ -168,6 +173,56 @@
return 0;
 }
 
+#if !defined(EMBEDDED)
+
+/* isolated nanoseconds clock difference */
+static inline long t_diff_nsec(const struct timespec *from, const struct 
timespec *to)
+{
+   return from->tv_nsec - to->tv_nsec;
+}
+
+/* isolated seconds clock difference */
+static inline time_t t_diff_sec(const struct timespec *from, const struct 
timespec *to)
+{
+   return from->tv_sec - to->tv_sec;
+}
+
+/*! Determine the time difference between now and the given time point
+ *  \returns time difference
+ *
+ *  \param[in] from timespec of a reference time point
+ *  \param[in] kind expected return value type: milliseconds, centiseconds etc.
+ */
+time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind)
+{
+   struct timespec t_now;
+   long ns;
+   time_t sec;
+
+   if (clock_gettime(CLOCK_MONOTONIC, &t_now) != 0) {
+   LOGP(DLGLOBAL, LOGL_ERROR, "Failed to get time for elapsed 
computation: %s\n", strerror(errno));
+   return 0;
+   }
+
+   ns = t_diff_nsec(from, &t_now);
+   sec = t_diff_sec(from, &t_now);
+
+   switch (kind) {
+   case T_SECS:
+   return sec;
+   case T_MILLIS:
+   return OSMO_SEC2MS(sec) + OSMO_NSEC2MS(ns);
+   case T_CENTIS:
+   return OSMO_SEC2CS(sec) + OSMO_NSEC2CS(ns);
+   default:
+   LOGP(DLGLOBAL, LOGL_ERROR, "Unhandled kind in elapsed time 
computation: %u\n", kind);
+   }
+
+   return 0;
+}
+
+#endif /* !EMBEDDED */
+
 /*! Determine time between now and the nearest timer
  *  \returns pointer to timeval of nearest timer, NULL if there is none
  *

-- 
To view, visit https://gerrit.osmocom.org/5103
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277
Gerrit-PatchSet: 4
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 


[PATCH] libosmocore[master]: Add functions for extended RACH coding

2017-12-01 Thread Max
Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/5062

to look at the new patch set (#15).

Add functions for extended RACH coding

Add support for extended RACH (11 bit) according 3GPP TS 45.003 §5.3.2:

* convolutional code with puncturing
* encoding/decoding routines
* corresponding tests

Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Related: OS#1548
---
M TODO-RELEASE
M include/osmocom/coding/gsm0503_coding.h
M src/coding/gsm0503_coding.c
M src/coding/libosmocoding.map
M src/gsm/libosmogsm.map
M tests/coding/coding_test.c
M tests/coding/coding_test.ok
M tests/conv/conv_gsm0503_test.ok
M utils/conv_codes_gsm.py
9 files changed, 30,850 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/15


-- 
To view, visit https://gerrit.osmocom.org/5062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 15
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 


[PATCH] libosmocore[master]: Add functions for extended RACH coding

2017-12-01 Thread Max
Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/5062

to look at the new patch set (#14).

Add functions for extended RACH coding

Add support for extended RACH (11 bit) according 3GPP TS 45.003 §5.3.2:

* convolutional code with puncturing
* encoding/decoding routines
* corresponding tests

Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Related: OS#1548
---
M TODO-RELEASE
M include/osmocom/coding/gsm0503_coding.h
M src/coding/gsm0503_coding.c
M src/coding/libosmocoding.map
M src/gsm/libosmogsm.map
M tests/coding/coding_test.c
M tests/coding/coding_test.ok
M tests/conv/conv_gsm0503_test.ok
M utils/conv_codes_gsm.py
9 files changed, 30,850 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/14


-- 
To view, visit https://gerrit.osmocom.org/5062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 14
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 


[PATCH] libosmocore[master]: Add functions for extended RACH coding

2017-12-01 Thread Max
Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/5062

to look at the new patch set (#13).

Add functions for extended RACH coding

Add support for extended RACH (11 bit) according 3GPP TS 45.003 §5.3.2:

* convolutional code with puncturing
* encoding/decoding routines
* corresponding tests

Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Related: OS#1548
---
M TODO-RELEASE
M include/osmocom/coding/gsm0503_coding.h
M src/coding/gsm0503_coding.c
M src/coding/libosmocoding.map
M src/gsm/libosmogsm.map
M tests/coding/coding_test.c
M tests/coding/coding_test.ok
M tests/conv/conv_gsm0503_test.ok
M utils/conv_codes_gsm.py
9 files changed, 30,850 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/13


-- 
To view, visit https://gerrit.osmocom.org/5062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 13
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 


libosmocore[master]: Add function to estimate elapsed time

2017-12-01 Thread Vadim Yanitskiy

Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/5103/3/src/timer.c
File src/timer.c:

Line 203:   return 0;
Would it possible to distinguish between a result or error?

For example, when kind == T_SECS and at the moment only 500 ms
elapsed, the result will be 0. And on error it could be 0.


-- 
To view, visit https://gerrit.osmocom.org/5103
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: Yes


[PATCH] libosmocore[master]: Add functions for extended RACH coding

2017-12-01 Thread Max
Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/5062

to look at the new patch set (#12).

Add functions for extended RACH coding

Add support for extended RACH (11 bit) according 3GPP TS 45.003 §5.3.2:

* convolutional code with puncturing
* encoding/decoding routines
* corresponding tests

Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Related: OS#1548
---
M TODO-RELEASE
M include/osmocom/coding/gsm0503_coding.h
M src/coding/gsm0503_coding.c
M src/coding/libosmocoding.map
M src/gsm/libosmogsm.map
M tests/coding/coding_test.c
M tests/coding/coding_test.ok
M tests/conv/conv_gsm0503_test.ok
M utils/conv_codes_gsm.py
9 files changed, 30,850 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/5062/12


-- 
To view, visit https://gerrit.osmocom.org/5062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 12
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 


[PATCH] libosmocore[master]: Add function to estimate elapsed time

2017-12-01 Thread Max
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/5103

to look at the new patch set (#3).

Add function to estimate elapsed time

It uses monotonic clock for proper time estimation.

Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277
Related: OS#2586
---
M TODO-RELEASE
M include/osmocom/core/timer.h
M src/timer.c
3 files changed, 69 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/5103/3

diff --git a/TODO-RELEASE b/TODO-RELEASE
index 99865c6..5861956 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -8,3 +8,4 @@
 # If any interfaces have been removed or changed since the last public 
release: c:r:0.
 #library   whatdescription / commit summary line
 core   msgb_queue_free()   add inline func to msgb.h
+core   osmo_time_elapsed() add function to estimate elapsed time
diff --git a/include/osmocom/core/timer.h b/include/osmocom/core/timer.h
index 4958efb..7df01ce 100644
--- a/include/osmocom/core/timer.h
+++ b/include/osmocom/core/timer.h
@@ -50,6 +50,18 @@
 #define OSMO_SEC2HRS(sec) ((sec % (60 * 60 * 24)) / (60 * 60))
 #define OSMO_SEC2DAY(sec) ((sec % (60 * 60 * 24 * 365)) / (60 * 60 * 24)) /* 
we ignore leap year for simplicity */
 
+#define OSMO_SEC2MS(sec) (sec * 1000)
+#define OSMO_SEC2CS(sec) (sec * 100)
+
+#define OSMO_NSEC2MS(ns) (ns / 100)
+#define OSMO_NSEC2CS(ns) (ns / 1000)
+
+enum osmo_elapsed {
+   T_SECS,
+   T_MILLIS,
+   T_CENTIS,
+};
+
 /*! A structure representing a single instance of a timer */
 struct osmo_timer_list {
struct rb_node node;  /*!< rb-tree node header */
@@ -61,6 +73,8 @@
void *data;   /*!< user data for callback */
 };
 
+time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind);
+
 /*
  * timer management
  */
diff --git a/src/timer.c b/src/timer.c
index 9ec7a00..a504d79 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -35,6 +35,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+
+#include 
 #include 
 #include 
 #include 
@@ -168,6 +172,56 @@
return 0;
 }
 
+#ifndef EMBEDDED
+
+/* isolated nanoseconds clock difference */
+static inline long t_diff_nsec(const struct timespec *from, const struct 
timespec *to)
+{
+   return from->tv_nsec - to->tv_nsec;
+}
+
+/* isolated seconds clock difference */
+static inline time_t t_diff_sec(const struct timespec *from, const struct 
timespec *to)
+{
+   return from->tv_sec - to->tv_sec;
+}
+
+/*! Determine the time difference between now and the given time point
+ *  \returns time difference
+ *
+ *  \param[in] from timespec of a reference time point
+ *  \param[in] kind expected return value type: milliseconds, centiseconds etc.
+ */
+time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind)
+{
+   struct timespec t_now;
+   long ns;
+   time_t sec;
+
+   if (clock_gettime(CLOCK_MONOTONIC, &t_now) != 0) {
+   LOGP(DLGLOBAL, LOGL_ERROR, "Failed to get time for elapsed 
computation: %s\n", strerror(errno));
+   return 0;
+   }
+
+   ns = t_diff_nsec(from, &t_now);
+   sec = t_diff_sec(from, &t_now);
+
+   switch (kind) {
+   case T_SECS:
+   return sec;
+   case T_MILLIS:
+   return OSMO_SEC2MS(sec) + OSMO_NSEC2MS(ns);
+   case T_CENTIS:
+   return OSMO_SEC2CS(sec) + OSMO_NSEC2CS(ns);
+   default:
+   LOGP(DLGLOBAL, LOGL_ERROR, "Unhandled kind in elapsed time 
computation: %u\n", kind);
+   }
+
+   return 0;
+}
+
+#endif /* !EMBEDDED */
+
 /*! Determine time between now and the nearest timer
  *  \returns pointer to timeval of nearest timer, NULL if there is none
  *

-- 
To view, visit https://gerrit.osmocom.org/5103
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 


osmo-ggsn[master]: Add configure flag to disable ipv6 support

2017-12-01 Thread Pau Espin Pedrol

Patch Set 1:

Another TODO:

Check following fields from structure apn, as I think they can be disabled in 
case we build without ipv6 support:
apn->v6_lladdr
apn->v6.*

-- 
To view, visit https://gerrit.osmocom.org/5121
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


libosmocore[master]: Add functions for extended RACH coding

2017-12-01 Thread Vadim Yanitskiy

Patch Set 11: Code-Review-1

(2 comments)

Hi Max! I like this change very much, and wish to move it forward.
But I insist to keep the API as similar and easy to use as possible.

https://gerrit.osmocom.org/#/c/5062/11/include/osmocom/coding/gsm0503_coding.h
File include/osmocom/coding/gsm0503_coding.h:

Line 72: int gsm0503_rach_ext_decode(uint16_t *ra, const sbit_t *burst, uint8_t 
bsic);
I don't like the mix of both '_encode_ext' and '_ext_decode'.
Let's use the common 'gsm0503_CODE_(en/de)code' style.


https://gerrit.osmocom.org/#/c/5062/11/utils/conv_codes_gsm.py
File utils/conv_codes_gsm.py:

Line 57:name = "ext_rach",
Here we have 'ext_rach', while the coding API provides 'rach_ext'.
It may cause potential API users to confuse between different names.

I suggest to use 'rach_ext' everywhere.


-- 
To view, visit https://gerrit.osmocom.org/5062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 11
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 
Gerrit-HasComments: Yes


osmo-ggsn[master]: Add configure flag to disable ipv6 support

2017-12-01 Thread Pau Espin Pedrol

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/5121/1/ggsn/ggsn_vty.c
File ggsn/ggsn_vty.c:

Line 729:   memcpy(&in46.v4, in->v, in->l);
I'm not entirely sure if this change is fine. I think it is, as v4 and v6 are 
fields in the same union, and so its address should be the same.


-- 
To view, visit https://gerrit.osmocom.org/5121
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-ggsn[master]: Add configure flag to disable ipv6 support

2017-12-01 Thread Pau Espin Pedrol

Patch Set 1: Code-Review-1

-- 
To view, visit https://gerrit.osmocom.org/5121
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-ggsn[master]: Add configure flag to disable ipv6 support

2017-12-01 Thread Pau Espin Pedrol

Patch Set 1:

I forgot to add to the TODO list:
- Modify osmo-ggsn gerrit job to build with and without ipv6 support.

-- 
To view, visit https://gerrit.osmocom.org/5121
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-ggsn[master]: Add configure flag to disable ipv6 support

2017-12-01 Thread Pau Espin Pedrol

Patch Set 1:

WIP, submited for early comments (RFC).

Works:
- building with IPv6 support and building without

TODO:
- Tests don't pass with IPv6 disabled, probably because the output doesn't 
match. I need to see how to fix it. I'll probably move IPv6 specific tests to 
their own testsuite and run it only if IPv6 is enabled.
- Check that everything's fine running osmo-ggsn in my laptop.

-- 
To view, visit https://gerrit.osmocom.org/5121
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[PATCH] osmo-ggsn[master]: Add configure flag to disable ipv6 support

2017-12-01 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/5121

Add configure flag to disable ipv6 support

Some users may want to disable ipv6 related features in case they are
not needed. It can also be used as a workaround to build libgtp and
osmo-ggsn in systems where ipv6 supports fails to build due to header
struct definition conflicts between kernel and libc.

Related: SYS#3815

Change-Id: I651a12d63d025bde61dcbc3c6b949cd0fed43580
---
M configure.ac
M ggsn/Makefile.am
M ggsn/ggsn.c
M ggsn/ggsn_vty.c
M lib/in46_addr.c
M lib/in46_addr.h
M lib/ippool.c
M lib/tun.c
M sgsnemu/sgsnemu.c
M tests/lib/in46a_test.c
10 files changed, 189 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/21/5121/1

diff --git a/configure.ac b/configure.ac
index 4fd0132..f4661b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,9 +39,9 @@
 
 
 case "${host}" in
-  i*86-*-linux-gnu*) 
+  i*86-*-linux-gnu*)
 EXEC_LDADD="" ;;
-  *solaris*) 
+  *solaris*)
 EXEC_LDADD="-lresolv -lsocket -lnsl" ;;
 esac
 
@@ -64,12 +64,19 @@
 AC_ARG_ENABLE([gtp-linux],
AS_HELP_STRING([--enable-gtp-linux], [Build GTP tunneling Linux 
kernel]),
[enable_gtp_linux="$enableval"], [enable_gtp_linux="no"])
-
 AS_IF([test "x$enable_gtp_linux" = "xyes"], [
PKG_CHECK_MODULES([LIBGTPNL], [libgtpnl >= 1.0.0])
 ])
-
 AM_CONDITIONAL([ENABLE_GTP_KERNEL], [test "$enable_gtp_linux" = "yes"])
+
+# Enable/disable IPv6 support
+AC_ARG_ENABLE([ipv6], [AS_HELP_STRING([--enable-ipv6], [Build IPv6 support])],
+[enable_ipv6="$enableval"],[enable_ipv6="yes"])
+if test "x$enable_ipv6" = "xyes" ; then
+AC_DEFINE(BUILD_IPv6, 1, [Define if we want to build IPv6 support])
+fi
+AM_CONDITIONAL(BUILD_IPv6, test "x$enable_ipv6" = "xyes")
+#AC_SUBST(enable_ipv6)
 
 # Checks for header files.
 AC_HEADER_STDC
@@ -127,7 +134,7 @@
 # Checks for library functions.
 AC_PROG_GCC_TRADITIONAL
 # AC_FUNC_MALLOC
-# AC_FUNC_MEMCMP 
+# AC_FUNC_MEMCMP
 AC_CHECK_FUNCS([gethostbyname inet_ntoa memset select socket strdup strerror 
strtol])
 AC_CHECK_FUNCS(inet_aton inet_addr, break)
 
@@ -170,4 +177,5 @@
 
 echo "
 osmo-ggsn Configuration:
-  GTP Linux kernel support:${enable_gtp_linux}"
+  GTP Linux kernel support:${enable_gtp_linux}
+  IPv6 support:${enable_ipv6}"
diff --git a/ggsn/Makefile.am b/ggsn/Makefile.am
index 8a468a9..07adf80 100644
--- a/ggsn/Makefile.am
+++ b/ggsn/Makefile.am
@@ -12,7 +12,10 @@
 endif
 
 osmo_ggsn_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a
-osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h icmpv6.c icmpv6.h 
checksum.c checksum.h
+osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h checksum.c checksum.h
+if BUILD_IPv6
+osmo_ggsn_SOURCES += icmpv6.c icmpv6.h
+endif
 
 if ENABLE_GTP_KERNEL
 osmo_ggsn_SOURCES += gtp-kernel.c
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 0beaef7..3018af4 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -65,7 +65,9 @@
 #include "../gtp/pdp.h"
 #include "../gtp/gtp.h"
 #include "gtp-kernel.h"
+#if defined(BUILD_IPv6)
 #include "icmpv6.h"
+#endif
 #include "ggsn.h"
 
 void *tall_ggsn_ctx;
@@ -115,7 +117,9 @@
LOGPAPN(LOGL_NOTICE, apn, "%sStopping\n", force ? "FORCED " : "");
/* check if pools have any active PDP contexts and bail out */
pool_close_all_pdp(apn->v4.pool);
+#if defined(BUILD_IPv6)
pool_close_all_pdp(apn->v6.pool);
+#endif
 
/* shutdown whatever old state might be left */
if (apn->tun.tun) {
@@ -137,12 +141,13 @@
ippool_free(apn->v4.pool);
apn->v4.pool = NULL;
}
+#if defined(BUILD_IPv6)
if (apn->v6.pool) {
LOGPAPN(LOGL_INFO, apn, "Releasing IPv6 pool\n");
ippool_free(apn->v6.pool);
apn->v6.pool = NULL;
}
-
+#endif
apn->started = false;
return 0;
 }
@@ -155,9 +160,11 @@
 
*blacklist = NULL;
 
+#if defined(BUILD_IPv6)
if (ipv6)
flags = IP_TYPE_IPv6_NONLINK;
else
+#endif
flags = IP_TYPE_IPv4;
 
while (1) {
@@ -191,7 +198,9 @@
 int apn_start(struct apn_ctx *apn)
 {
int ippool_flags = IPPOOL_NONETWORK | IPPOOL_NOBROADCAST;
+#if defined(BUILD_IPv6)
struct in46_prefix ipv6_tun_linklocal_ip;
+#endif
struct in46_prefix *blacklist;
int blacklist_size;
 
@@ -226,7 +235,7 @@
return -1;
}
}
-
+#if defined(BUILD_IPv6)
if (apn->v6.cfg.ifconfig_prefix.addr.len) {
LOGPAPN(LOGL_INFO, apn, "Setting tun IPv6 address %s\n",
in46p_ntoa(&apn->v6.cfg.ifconfig_prefix));
@@ -239,13 +248,13 @@
return -1;
}
}
-
+#endif
if (apn->tun.cfg.ipup_script) {
LOGPAPN(LOGL_INFO, apn, "Running ip-up

[PATCH] osmo-pcu[master]: TBF: fix compiler warning in test

2017-12-01 Thread Max

Review at  https://gerrit.osmocom.org/5119

TBF: fix compiler warning in test

tbf/TbfTest.cpp: In function ‘void egprs_spb_to_normal_validation(BTS*, 
unsigned int, unsigned int)’:
tbf/TbfTest.cpp:2788:26: warning: ‘<<’ in boolean context, did you mean ‘<’ ? 
[-Wint-in-bool-context]
  bsn1 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1)
 ~^
tbf/TbfTest.cpp:2788:53: warning: ‘<<’ in boolean context, did you mean ‘<’ ? 
[-Wint-in-bool-context]
  bsn1 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1)
   ~~^
tbf/TbfTest.cpp:2825:26: warning: ‘<<’ in boolean context, did you mean ‘<’ ? 
[-Wint-in-bool-context]
  bsn2 = (egprs3->bsn1_hi << 9) || (egprs3->bsn1_mid << 1) ||
 ~^
tbf/TbfTest.cpp:2825:53: warning: ‘<<’ in boolean context, did you mean ‘<’ ? 
[-Wint-in-bool-context]
  bsn2 = (egprs3->bsn1_hi << 9) || (egprs3->bsn1_mid << 1) ||
   ~~^
tbf/TbfTest.cpp:2844:26: warning: ‘<<’ in boolean context, did you mean ‘<’ ? 
[-Wint-in-bool-context]
  bsn3 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ||
 ~^
tbf/TbfTest.cpp:2844:53: warning: ‘<<’ in boolean context, did you mean ‘<’ ? 
[-Wint-in-bool-context]
  bsn3 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ||
   ~~^

Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545
---
M tests/tbf/TbfTest.cpp
1 file changed, 3 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/5119/1

diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 195bec5..d4b51fe 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -2785,8 +2785,7 @@
== mcs);
 
egprs2 = (struct gprs_rlc_dl_header_egprs_2 *) msg->data;
-   bsn1 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1)
-   || (egprs2->bsn1_lo);
+   bsn1 = (egprs2->bsn1_hi << 9) | (egprs2->bsn1_mid << 1) | 
(egprs2->bsn1_lo);
dl_tbf->m_window.m_v_b.mark_nacked(0);
OSMO_ASSERT(dl_tbf->m_window.m_v_b.is_nacked(0));
OSMO_ASSERT(bsn1 == 0);
@@ -2822,8 +2821,7 @@
egprs3 = (struct gprs_rlc_dl_header_egprs_3 *) msg->data;
/* Table 10.4.8a.3.1 of 44.060 */
OSMO_ASSERT(egprs3->spb == 3);
-   bsn2 = (egprs3->bsn1_hi << 9) || (egprs3->bsn1_mid << 1) ||
-   (egprs3->bsn1_lo);
+   bsn2 = (egprs3->bsn1_hi << 9) | (egprs3->bsn1_mid << 1) | 
(egprs3->bsn1_lo);
OSMO_ASSERT(bsn2 == bsn1);
 
/* Table 10.4.8a.3.1 of 44.060 */
@@ -2841,8 +2839,7 @@
 
/* Table 10.4.8a.3.1 of 44.060 */
OSMO_ASSERT(egprs2->cps == 0);
-   bsn3 = (egprs2->bsn1_hi << 9) || (egprs2->bsn1_mid << 1) ||
-   (egprs2->bsn1_lo);
+   bsn3 = (egprs2->bsn1_hi << 9) | (egprs2->bsn1_mid << 1) | 
(egprs2->bsn1_lo);
OSMO_ASSERT(bsn3 == bsn2);
 
tbf_cleanup(dl_tbf);

-- 
To view, visit https://gerrit.osmocom.org/5119
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf9e5f15faa7810411ed9d68ed43cf907eea2545
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-pcu[master]: Fix compiler warning

2017-12-01 Thread Max

Review at  https://gerrit.osmocom.org/5118

Fix compiler warning

Move function declarations which use gprs_rlcmac_ul_tbf into tbf.h to
avoid compiler warning:

In file included from pcu_vty.c:15:0:
bts.h:166:27: warning: ‘struct gprs_rlcmac_ul_tbf’ declared inside parameter 
list will not be visible outside of this definition or declaration
 void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta);
   ^~
bts.h:167:24: warning: ‘struct gprs_rlcmac_ul_tbf’ declared inside parameter 
list will not be visible outside of this definition or declaration
 void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta);
^~

Change-Id: Ic34c72c8bff6d7c775f56bb6026fec5425f7dcb4
---
M src/bts.h
M src/tbf.h
2 files changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/18/5118/1

diff --git a/src/bts.h b/src/bts.h
index aaf81cf..a32e87d 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -163,8 +163,6 @@
 extern "C" {
 #endif
 void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, 
int8_t ta, bool is_rach);
-void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta);
-void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta);
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/tbf.h b/src/tbf.h
index 95e1e89..e9d8df8 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -562,6 +562,15 @@
void maybe_schedule_uplink_acknack(const gprs_rlc_data_info *rlc);
 };
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta);
+void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta);
+#ifdef __cplusplus
+}
+#endif
+
 inline enum gprs_rlcmac_tbf_direction reverse(enum gprs_rlcmac_tbf_direction 
dir)
 {
return (enum gprs_rlcmac_tbf_direction)

-- 
To view, visit https://gerrit.osmocom.org/5118
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic34c72c8bff6d7c775f56bb6026fec5425f7dcb4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 


[MERGED] osmo-bsc[master]: mgcp: add missing switch case

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: mgcp: add missing switch case
..


mgcp: add missing switch case

In the beginning of the CRCX phase for the network does not distinguish
between EV_MDCX_BTS_RES and EV_TEARDOWN, so a Teardown due to an error
could be misinterpreted as a successful MGW response.

Add missing case statement to distinguish CV_MDCX_BTS_RES from
EV_TEARDOWN.

Change-Id: I9bf49df167d94b33ad65d8b9382a01f160b5aec0
---
M src/osmo-bsc/osmo_bsc_mgcp.c
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index a7d1f94..be6c7de 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -456,6 +456,14 @@
 "fsm-state: %s, fsm-event: %s\n",
 get_value_string(fsm_bsc_mgcp_state_names, fi->state), 
get_value_string(fsm_evt_names, event));
 
+   switch (event) {
+   case EV_MDCX_BTS_RESP:
+   break;
+   default:
+   handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN);
+   return;
+   }
+
rtp_endpoint = mgcp_ctx->rtp_endpoint;
 
LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG,

-- 
To view, visit https://gerrit.osmocom.org/4983
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9bf49df167d94b33ad65d8b9382a01f160b5aec0
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bsc[master]: cosmetic: remove duplicate logging

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: remove duplicate logging
..


cosmetic: remove duplicate logging

The log output of the reset FSM duplicates lots of the built in
FSM log output.

Remove duplicate logging, use more expressive log messages where
needed.

Change-Id: Ia5af309207476291f88af47878dc1d32b2dada06
---
M src/libcommon-cs/a_reset.c
1 file changed, 2 insertions(+), 24 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index 5e45b09..797f8e5 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -38,23 +38,10 @@
ST_CONN,/* We have a confirmed connection */
 };
 
-static const struct value_string fsm_state_names[] = {
-   {ST_DISC, "ST_DISC (disconnected)"},
-   {ST_CONN, "ST_CONN (connected)"},
-   {0, NULL},
-};
-
 enum fsm_evt {
EV_RESET_ACK,   /* got reset acknowlegement from remote end */
EV_N_DISCONNECT,/* lost a connection */
EV_N_CONNECT,   /* made a successful connection */
-};
-
-static const struct value_string fsm_evt_names[] = {
-   {EV_RESET_ACK, "EV_RESET_ACK"},
-   {EV_N_DISCONNECT, "EV_N_DISCONNECT"},
-   {EV_N_CONNECT, "EV_N_CONNECT"},
-   {0, NULL},
 };
 
 /* Disconnected state */
@@ -63,9 +50,7 @@
struct a_reset_ctx *reset = (struct a_reset_ctx *)data;
OSMO_ASSERT(reset);
OSMO_ASSERT(reset->fsm);
-
-   LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, 
fsm-event: %s\n",
-get_value_string(fsm_state_names, ST_CONN), 
get_value_string(fsm_evt_names, event));
+   LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection succeded.\n");
 
reset->conn_loss_counter = 0;
osmo_fsm_inst_state_chg(fi, ST_CONN, 0, 0);
@@ -76,9 +61,6 @@
 {
struct a_reset_ctx *reset = (struct a_reset_ctx *)data;
OSMO_ASSERT(reset);
-
-   LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, 
fsm-event: %s\n",
-get_value_string(fsm_state_names, ST_CONN), 
get_value_string(fsm_evt_names, event));
 
switch (event) {
case EV_N_DISCONNECT:
@@ -100,8 +82,7 @@
struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv;
OSMO_ASSERT(reset->fsm);
 
-   LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, 
resending...\n", fi->T,
-get_value_string(fsm_state_names, fi->state));
+   LOGPFSML(reset->fsm, LOGL_NOTICE, "(re)sending BSSMAP RESET 
message...\n");
 
reset->cb(reset->priv);
 
@@ -153,7 +134,6 @@
reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name);
OSMO_ASSERT(reset->fsm);
reset->fsm->priv = reset;
-   LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n");
 
/* kick off reset-ack sending mechanism */
osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, 
RESET_RESEND_TIMER_NO);
@@ -172,8 +152,6 @@
 
memset(reset, 0, sizeof(*reset));
talloc_free(reset);
-
-   LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n");
 }
 
 /* Confirm that we sucessfully received a reset acknowlege message */

-- 
To view, visit https://gerrit.osmocom.org/5074
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5af309207476291f88af47878dc1d32b2dada06
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bsc[master]: mgcp: use mgw assigned connection identifiers

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: mgcp: use mgw assigned connection identifiers
..


mgcp: use mgw assigned connection identifiers

osmo-mgw assigns connection identifiers which are returned with
the response to the CRCX.

store the assigned connection identifiers and use them to identify
the connections.

Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c

Closes: OS#2648
Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab
---
M include/osmocom/bsc/osmo_bsc_mgcp.h
M src/osmo-bsc/osmo_bsc_mgcp.c
2 files changed, 20 insertions(+), 11 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h 
b/include/osmocom/bsc/osmo_bsc_mgcp.h
index dd26d40..df18524 100644
--- a/include/osmocom/bsc/osmo_bsc_mgcp.h
+++ b/include/osmocom/bsc/osmo_bsc_mgcp.h
@@ -20,6 +20,8 @@
 
 #pragma once
 
+#include 
+
 /* MGCP state handler context (fsm etc..) */
 struct mgcp_ctx {
/* FSM instance, which handles the connection switching procedure */
@@ -28,6 +30,10 @@
/* RTP endpoint number */
uint16_t rtp_endpoint;
 
+   /* RTP connection identifiers */
+   char conn_id_bts[MGCP_CONN_ID_LENGTH];
+   char conn_id_net[MGCP_CONN_ID_LENGTH];
+
/* Copy of the pointer and the data with context information
 * needed to process the AoIP and MGCP requests (system data) */
struct mgcp_client *mgcp;
diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index 0f35a46..a7d1f94 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -31,9 +31,6 @@
 #include 
 #include 
 
-#define CONN_ID_BTS 1
-#define CONN_ID_NET 2
-
 #define MGCP_MGW_TIMEOUT 4 /* in seconds */
 #define MGCP_MGW_TIMEOUT_TIMER_NR 1
 #define MGCP_BSS_TIMEOUT 4 /* in seconds */
@@ -201,10 +198,8 @@
/* Generate MGCP message string */
mgcp_msg = (struct mgcp_msg) {
.verb = MGCP_VERB_CRCX,
-   .presence = (MGCP_MSG_PRESENCE_ENDPOINT | 
MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID |
-MGCP_MSG_PRESENCE_CONN_MODE),
+   .presence = (MGCP_MSG_PRESENCE_ENDPOINT | 
MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE),
.call_id = conn->conn_id,
-   .conn_id = CONN_ID_BTS,
.conn_mode = MGCP_CONN_LOOPBACK
};
if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, 
MGCP_ENDPOINT_FORMAT, rtp_endpoint) >=
@@ -249,6 +244,10 @@
handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL);
return;
}
+
+   /* memorize connection identifier */
+   osmo_strlcpy(mgcp_ctx->conn_id_bts, r->head.conn_id, 
sizeof(mgcp_ctx->conn_id_bts));
+   LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with CI: 
%s\n", mgcp_ctx->conn_id_bts);
 
rc = mgcp_response_parse_params(r);
if (rc) {
@@ -364,7 +363,7 @@
.presence = (MGCP_MSG_PRESENCE_ENDPOINT | 
MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID |
 MGCP_MSG_PRESENCE_CONN_MODE | 
MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT),
.call_id = conn->conn_id,
-   .conn_id = CONN_ID_BTS,
+   .conn_id = mgcp_ctx->conn_id_bts,
.conn_mode = MGCP_CONN_RECV_SEND,
.audio_ip = inet_ntoa(addr),
.audio_port = lchan->abis_ip.bound_port
@@ -484,10 +483,9 @@
/* Generate MGCP message string */
mgcp_msg = (struct mgcp_msg) {
.verb = MGCP_VERB_CRCX,
-   .presence = (MGCP_MSG_PRESENCE_ENDPOINT | 
MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID |
-MGCP_MSG_PRESENCE_CONN_MODE | 
MGCP_MSG_PRESENCE_AUDIO_IP | MGCP_MSG_PRESENCE_AUDIO_PORT),
+   .presence = (MGCP_MSG_PRESENCE_ENDPOINT | 
MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE |
+MGCP_MSG_PRESENCE_AUDIO_IP | 
MGCP_MSG_PRESENCE_AUDIO_PORT),
.call_id = conn->conn_id,
-   .conn_id = CONN_ID_NET,
.conn_mode = MGCP_CONN_RECV_SEND,
.audio_ip = addr,
.audio_port = port
@@ -538,6 +536,10 @@
handle_error(mgcp_ctx, MGCP_ERR_MGW_FAIL);
return;
}
+
+   /* memorize connection identifier */
+   osmo_strlcpy(mgcp_ctx->conn_id_net, r->head.conn_id, 
sizeof(mgcp_ctx->conn_id_net));
+   LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with CI: 
%s\n", mgcp_ctx->conn_id_net);
 
rc = mgcp_response_parse_params(r);
if (rc) {
@@ -683,7 +685,8 @@
.verb = MGCP_VERB_MDCX,
.presence = (MGCP_MSG_PRESENCE_ENDPOINT | 
MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_ID |
  

[MERGED] osmo-bsc[master]: mgcp: do not fail silently on snprintf()

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: mgcp: do not fail silently on snprintf()
..


mgcp: do not fail silently on snprintf()

The snprintf() that is used to compose the fsm name on an assignment
request may cause a silent failure. The buffer is large enough to
take the string under all circumstances. If snprintf() fails, this
would mean we have some other serious problem.

use OSMO_ASSERT in case the snprintf() fails, so the failure
gets noticed.

Change-Id: I3c36df8cfd0880c524244048a993cd136be41f56
---
M src/osmo-bsc/osmo_bsc_mgcp.c
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index be6c7de..81a4093 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -1015,8 +1015,7 @@
OSMO_ASSERT(mgcp);
OSMO_ASSERT(conn);
 
-   if(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) >= 
sizeof(name))
-   return NULL;
+   OSMO_ASSERT(snprintf(name, sizeof(name), "MGW_%i", conn->conn_id) < 
sizeof(name));
 
/* Register the fsm description (if not already done) */
if (fsm_registered == false) {

-- 
To view, visit https://gerrit.osmocom.org/5073
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c36df8cfd0880c524244048a993cd136be41f56
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ggsn[master]: cosmetic: Reorder tun_addaddr to get rid of decl of tun_seta...

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: Reorder tun_addaddr to get rid of decl of tun_setaddr4
..


cosmetic: Reorder tun_addaddr to get rid of decl of tun_setaddr4

In any case, if we add support for ipv6 in tun_addaddr we will need
tun_setaddr (and also change the API of tun_addaddr to use in46_addr).

Change-Id: Iadf51379455174a642b477040ec96f28022c24c7
---
M lib/tun.c
1 file changed, 169 insertions(+), 172 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/lib/tun.c b/lib/tun.c
index 5960197..d8e4b62 100644
--- a/lib/tun.c
+++ b/lib/tun.c
@@ -60,9 +60,6 @@
 #include "tun.h"
 #include "syserr.h"
 
-static int tun_setaddr4(struct tun_t *this, struct in_addr *addr,
-   struct in_addr *dstaddr, struct in_addr *netmask);
-
 #if defined(__linux__)
 
 #include 
@@ -103,175 +100,6 @@
}
close(fd);
return 0;
-}
-
-int tun_addaddr(struct tun_t *this,
-   struct in_addr *addr,
-   struct in_addr *dstaddr, struct in_addr *netmask)
-{
-
-#if defined(__linux__)
-   struct {
-   struct nlmsghdr n;
-   struct ifaddrmsg i;
-   char buf[TUN_NLBUFSIZE];
-   } req;
-
-   struct sockaddr_nl local;
-   socklen_t addr_len;
-   int fd;
-   int status;
-
-   struct sockaddr_nl nladdr;
-   struct iovec iov;
-   struct msghdr msg;
-
-   if (!this->addrs)   /* Use ioctl for first addr to make ping work */
-   return tun_setaddr4(this, addr, dstaddr, netmask);
-
-   memset(&req, 0, sizeof(req));
-   req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg));
-   req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE;
-   req.n.nlmsg_type = RTM_NEWADDR;
-   req.i.ifa_family = AF_INET;
-   req.i.ifa_prefixlen = 32;   /* 32 FOR IPv4 */
-   req.i.ifa_flags = 0;
-   req.i.ifa_scope = RT_SCOPE_HOST;/* TODO or 0 */
-   req.i.ifa_index = if_nametoindex(this->devname);
-   if (!req.i.ifa_index) {
-   SYS_ERR(DTUN, LOGL_ERROR, errno, "Unable to get ifindex for 
%s", this->devname);
-   return -1;
-   }
-
-   tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(addr));
-   tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(dstaddr));
-
-   if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) {
-   SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed");
-   return -1;
-   }
-
-   memset(&local, 0, sizeof(local));
-   local.nl_family = AF_NETLINK;
-   local.nl_groups = 0;
-
-   if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) {
-   SYS_ERR(DTUN, LOGL_ERROR, errno, "bind() failed");
-   close(fd);
-   return -1;
-   }
-
-   addr_len = sizeof(local);
-   if (getsockname(fd, (struct sockaddr *)&local, &addr_len) < 0) {
-   SYS_ERR(DTUN, LOGL_ERROR, errno,
-   "getsockname() failed");
-   close(fd);
-   return -1;
-   }
-
-   if (addr_len != sizeof(local)) {
-   SYS_ERR(DTUN, LOGL_ERROR, 0,
-   "Wrong address length %d", addr_len);
-   close(fd);
-   return -1;
-   }
-
-   if (local.nl_family != AF_NETLINK) {
-   SYS_ERR(DTUN, LOGL_ERROR, 0,
-   "Wrong address family %d", local.nl_family);
-   close(fd);
-   return -1;
-   }
-
-   iov.iov_base = (void *)&req.n;
-   iov.iov_len = req.n.nlmsg_len;
-
-   msg.msg_name = (void *)&nladdr;
-   msg.msg_namelen = sizeof(nladdr);
-   msg.msg_iov = &iov;
-   msg.msg_iovlen = 1;
-   msg.msg_control = NULL;
-   msg.msg_controllen = 0;
-   msg.msg_flags = 0;
-
-   memset(&nladdr, 0, sizeof(nladdr));
-   nladdr.nl_family = AF_NETLINK;
-   nladdr.nl_pid = 0;
-   nladdr.nl_groups = 0;
-
-   req.n.nlmsg_seq = 0;
-   req.n.nlmsg_flags |= NLM_F_ACK;
-
-   status = sendmsg(fd, &msg, 0);
-   if (status != req.n.nlmsg_len) {
-   SYS_ERR(DTUN, LOGL_ERROR, errno, "sendmsg() failed, returned 
%d", status);
-   close(fd);
-   return -1;
-   }
-
-   status = tun_sifflags(this, IFF_UP | IFF_RUNNING);
-   if (status == -1) {
-   close(fd);
-   return -1;
-   }
-
-
-   close(fd);
-   this->addrs++;
-   return 0;
-
-#elif defined (__FreeBSD__) || defined (__APPLE__)
-
-   int fd;
-   struct ifaliasreq areq;
-
-   /* TODO: Is this needed on FreeBSD? */
-   if (!this->addrs)   /* Use ioctl for first addr to make ping work */
-   return tun_setaddr4(this, addr, dstaddr, netmask);  /* TODO 
dstaddr */
-
-   memset(&areq, 0, sizeo

osmo-ggsn[master]: cosmetic: Reorder tun_addaddr to get rid of decl of tun_seta...

2017-12-01 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5117
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iadf51379455174a642b477040ec96f28022c24c7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ggsn[master]: tun_setaddr6: Fix log typo

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: tun_setaddr6: Fix log typo
..


tun_setaddr6: Fix log typo

Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163
---
M lib/tun.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/lib/tun.c b/lib/tun.c
index fcd04f3..5960197 100644
--- a/lib/tun.c
+++ b/lib/tun.c
@@ -401,7 +401,7 @@
if (errno != EEXIST) {
SYS_ERR(DTUN, LOGL_ERROR, 0, 
"ioctl(SIOCSIFADDR) failed");
} else {
-   SYS_ERR(DTUN, LOGL_NOTICE, 0, 
"ioctl(SIOCSIFADDR): Address alreadsy exists");
+   SYS_ERR(DTUN, LOGL_NOTICE, 0, 
"ioctl(SIOCSIFADDR): Address already exists");
}
close(fd);
return -1;

-- 
To view, visit https://gerrit.osmocom.org/5116
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


[MERGED] osmo-bsc[master]: mgcp: use hexadecimal digits in endpoint names

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: mgcp: use hexadecimal digits in endpoint names
..


mgcp: use hexadecimal digits in endpoint names

The current implementation of osmo-mgw parses the numerical
digit inside the endpoint name as hexadecimal number.

also use hexadecimal numbers in endpoint names.

Change-Id: I64a970d300b7290d50ec84b0640d5a321d903f5e
---
M src/osmo-bsc/osmo_bsc_mgcp.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index f0c31df..0f35a46 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -39,7 +39,7 @@
 #define MGCP_BSS_TIMEOUT 4 /* in seconds */
 #define MGCP_BSS_TIMEOUT_TIMER_NR 2
 
-#define MGCP_ENDPOINT_FORMAT "%i@mgw"
+#define MGCP_ENDPOINT_FORMAT "%x@mgw"
 
 /* Some internal cause codes to indicate fault
  * condition inside the FSM */

-- 
To view, visit https://gerrit.osmocom.org/5072
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I64a970d300b7290d50ec84b0640d5a321d903f5e
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ggsn[master]: tun_setaddr6: Fix log typo

2017-12-01 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5116
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


osmo-ggsn[master]: tun_setaddr6: Fix log typo

2017-12-01 Thread Max

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/5116
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


[PATCH] osmo-ggsn[master]: tun_setaddr6: Fix log typo

2017-12-01 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/5116

tun_setaddr6: Fix log typo

Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163
---
M lib/tun.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/16/5116/1

diff --git a/lib/tun.c b/lib/tun.c
index fcd04f3..5960197 100644
--- a/lib/tun.c
+++ b/lib/tun.c
@@ -401,7 +401,7 @@
if (errno != EEXIST) {
SYS_ERR(DTUN, LOGL_ERROR, 0, 
"ioctl(SIOCSIFADDR) failed");
} else {
-   SYS_ERR(DTUN, LOGL_NOTICE, 0, 
"ioctl(SIOCSIFADDR): Address alreadsy exists");
+   SYS_ERR(DTUN, LOGL_NOTICE, 0, 
"ioctl(SIOCSIFADDR): Address already exists");
}
close(fd);
return -1;

-- 
To view, visit https://gerrit.osmocom.org/5116
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7f7d33a33730d57c5ecf7ebf5612f4744cf5163
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] osmo-ggsn[master]: cosmetic: Reorder tun_addaddr to get rid of decl of tun_seta...

2017-12-01 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/5117

cosmetic: Reorder tun_addaddr to get rid of decl of tun_setaddr4

In any case, if we add support for ipv6 in tun_addaddr we will need
tun_setaddr (and also change the API of tun_addaddr to use in46_addr).

Change-Id: Iadf51379455174a642b477040ec96f28022c24c7
---
M lib/tun.c
1 file changed, 169 insertions(+), 172 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/17/5117/1

diff --git a/lib/tun.c b/lib/tun.c
index 5960197..d8e4b62 100644
--- a/lib/tun.c
+++ b/lib/tun.c
@@ -60,9 +60,6 @@
 #include "tun.h"
 #include "syserr.h"
 
-static int tun_setaddr4(struct tun_t *this, struct in_addr *addr,
-   struct in_addr *dstaddr, struct in_addr *netmask);
-
 #if defined(__linux__)
 
 #include 
@@ -103,175 +100,6 @@
}
close(fd);
return 0;
-}
-
-int tun_addaddr(struct tun_t *this,
-   struct in_addr *addr,
-   struct in_addr *dstaddr, struct in_addr *netmask)
-{
-
-#if defined(__linux__)
-   struct {
-   struct nlmsghdr n;
-   struct ifaddrmsg i;
-   char buf[TUN_NLBUFSIZE];
-   } req;
-
-   struct sockaddr_nl local;
-   socklen_t addr_len;
-   int fd;
-   int status;
-
-   struct sockaddr_nl nladdr;
-   struct iovec iov;
-   struct msghdr msg;
-
-   if (!this->addrs)   /* Use ioctl for first addr to make ping work */
-   return tun_setaddr4(this, addr, dstaddr, netmask);
-
-   memset(&req, 0, sizeof(req));
-   req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg));
-   req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE;
-   req.n.nlmsg_type = RTM_NEWADDR;
-   req.i.ifa_family = AF_INET;
-   req.i.ifa_prefixlen = 32;   /* 32 FOR IPv4 */
-   req.i.ifa_flags = 0;
-   req.i.ifa_scope = RT_SCOPE_HOST;/* TODO or 0 */
-   req.i.ifa_index = if_nametoindex(this->devname);
-   if (!req.i.ifa_index) {
-   SYS_ERR(DTUN, LOGL_ERROR, errno, "Unable to get ifindex for 
%s", this->devname);
-   return -1;
-   }
-
-   tun_nlattr(&req.n, sizeof(req), IFA_ADDRESS, addr, sizeof(addr));
-   tun_nlattr(&req.n, sizeof(req), IFA_LOCAL, dstaddr, sizeof(dstaddr));
-
-   if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) {
-   SYS_ERR(DTUN, LOGL_ERROR, errno, "socket() failed");
-   return -1;
-   }
-
-   memset(&local, 0, sizeof(local));
-   local.nl_family = AF_NETLINK;
-   local.nl_groups = 0;
-
-   if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) {
-   SYS_ERR(DTUN, LOGL_ERROR, errno, "bind() failed");
-   close(fd);
-   return -1;
-   }
-
-   addr_len = sizeof(local);
-   if (getsockname(fd, (struct sockaddr *)&local, &addr_len) < 0) {
-   SYS_ERR(DTUN, LOGL_ERROR, errno,
-   "getsockname() failed");
-   close(fd);
-   return -1;
-   }
-
-   if (addr_len != sizeof(local)) {
-   SYS_ERR(DTUN, LOGL_ERROR, 0,
-   "Wrong address length %d", addr_len);
-   close(fd);
-   return -1;
-   }
-
-   if (local.nl_family != AF_NETLINK) {
-   SYS_ERR(DTUN, LOGL_ERROR, 0,
-   "Wrong address family %d", local.nl_family);
-   close(fd);
-   return -1;
-   }
-
-   iov.iov_base = (void *)&req.n;
-   iov.iov_len = req.n.nlmsg_len;
-
-   msg.msg_name = (void *)&nladdr;
-   msg.msg_namelen = sizeof(nladdr);
-   msg.msg_iov = &iov;
-   msg.msg_iovlen = 1;
-   msg.msg_control = NULL;
-   msg.msg_controllen = 0;
-   msg.msg_flags = 0;
-
-   memset(&nladdr, 0, sizeof(nladdr));
-   nladdr.nl_family = AF_NETLINK;
-   nladdr.nl_pid = 0;
-   nladdr.nl_groups = 0;
-
-   req.n.nlmsg_seq = 0;
-   req.n.nlmsg_flags |= NLM_F_ACK;
-
-   status = sendmsg(fd, &msg, 0);
-   if (status != req.n.nlmsg_len) {
-   SYS_ERR(DTUN, LOGL_ERROR, errno, "sendmsg() failed, returned 
%d", status);
-   close(fd);
-   return -1;
-   }
-
-   status = tun_sifflags(this, IFF_UP | IFF_RUNNING);
-   if (status == -1) {
-   close(fd);
-   return -1;
-   }
-
-
-   close(fd);
-   this->addrs++;
-   return 0;
-
-#elif defined (__FreeBSD__) || defined (__APPLE__)
-
-   int fd;
-   struct ifaliasreq areq;
-
-   /* TODO: Is this needed on FreeBSD? */
-   if (!this->addrs)   /* Use ioctl for first addr to make ping work */
-   return tun_setaddr4(this, addr, dstaddr, netmask);  /* TODO 
dstaddr */
-
-   memset(&areq, 0, sizeof(areq));
-
-   /* Set up interface name */
-   strncpy(areq.ifra_name, this->devname, IFNAMSIZ);
-   areq.ifra_name[IFNAMSIZ - 1] = 0;   /* Make sure to termin

[PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams

2017-12-01 Thread dexter
Hello Neels Hofmeyr, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/4980

to look at the new patch set (#8).

mgcp: use osmo-mgw to switch rtp streams

in the current implementation we still use osmo-bsc_mgcp, which
has many problems and is also obsoleted by osmo-mgw.

integrate osmo-mgw and re-implement the current switching using
an osmo fsm.

Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c
Closes: OS#2605
Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538
---
M include/osmocom/msc/Makefile.am
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/iucs.h
M include/osmocom/msc/msc_ifaces.h
A include/osmocom/msc/msc_mgcp.h
M src/libmsc/Makefile.am
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08.c
M src/libmsc/iucs.c
M src/libmsc/msc_ifaces.c
A src/libmsc/msc_mgcp.c
12 files changed, 1,087 insertions(+), 309 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/8

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 1419e8e..052d830 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -39,6 +39,7 @@
mncc.h \
mncc_int.h \
msc_ifaces.h \
+   msc_mgcp.h \
network_listen.h \
oap_client.h \
openbscdefines.h \
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 696cef1..9106421 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -196,9 +196,17 @@
struct gsm_encr encr;
 
struct {
+   struct mgcp_ctx *mgcp_ctx;
unsigned int mgcp_rtp_endpoint;
-   uint16_t port_subscr;
-   uint16_t port_cn;
+
+   uint16_t local_port_ran;
+   char local_addr_ran[INET_ADDRSTRLEN];
+   uint16_t remote_port_ran;
+   char remote_addr_ran[INET_ADDRSTRLEN];
+   uint16_t local_port_cn;
+   char local_addr_cn[INET_ADDRSTRLEN];
+   uint16_t remote_port_cn;
+   char remote_addr_cn[INET_ADDRSTRLEN];
} rtp;
 
/* which Iu-CS connection, if any. */
diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h
index b7d6064..2f3905e 100644
--- a/include/osmocom/msc/iucs.h
+++ b/include/osmocom/msc/iucs.h
@@ -5,3 +5,5 @@
 
 struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network 
*network,
struct 
ranap_ue_conn_ctx *ue);
+struct gsm_trans;
+int iu_rab_act_cs(struct gsm_trans *trans);
diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h
index 0592c07..ca25e9d 100644
--- a/include/osmocom/msc/msc_ifaces.h
+++ b/include/osmocom/msc/msc_ifaces.h
@@ -37,7 +37,3 @@
 enum gsm48_reject_value value);
 
 int msc_tx_common_id(struct gsm_subscriber_connection *conn);
-int msc_call_assignment(struct gsm_trans *trans);
-int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2);
-void msc_call_release(struct gsm_trans *trans);
-int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip);
diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h
new file mode 100644
index 000..907e303
--- /dev/null
+++ b/include/osmocom/msc/msc_mgcp.h
@@ -0,0 +1,47 @@
+/* (C) 2017 by sysmocom - s.f.m.c. GmbH 
+ * All Rights Reserved
+ *
+ * Author: Philipp Maier
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see .
+ *
+ */
+
+#pragma once
+
+/* MGCP state handler context (fsm etc..) */
+struct mgcp_ctx {
+   /* FSM instance, which handles the connection switching procedure */
+   struct osmo_fsm_inst *fsm;
+
+   /* RTP endpoint number */
+   uint16_t rtp_endpoint;
+
+   /* Set to true, when the context information is no longer
+* needed */
+   bool free_ctx;
+
+   /* RTP connection identifiers */
+   char conn_id_ran[MGCP_CONN_ID_LENGTH];
+   char conn_id_cn[MGCP_CONN_ID_LENGTH];
+
+   /* Copy of the pointer and the data with context information
+* needed to process the AoIP and MGCP requests (system data) */
+   struct mgcp_client *mgcp;
+   struct gsm_trans *trans;
+};
+
+int msc_mgcp_call_assignment(struct gsm_trans *trans);
+int msc_m

[MERGED] osmocom-bb[master]: mobile: Use enum and not magic value in the VTY

2017-12-01 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: mobile: Use enum and not magic value in the VTY
..


mobile: Use enum and not magic value in the VTY

Change-Id: I8a1d975997e592344327e6b0783bd0c5d2534b02
---
M src/host/layer23/src/mobile/vty_interface.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/host/layer23/src/mobile/vty_interface.c 
b/src/host/layer23/src/mobile/vty_interface.c
index 5a47736..eafed6e 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -2703,7 +2703,7 @@
return CMD_SUCCESS;
 
llist_for_each_entry(tmp, &ms_list, entity) {
-   if (tmp->shutdown == 3)
+   if (tmp->shutdown == MS_SHUTDOWN_COMPL)
continue;
if (!strcmp(ms->settings.layer2_socket_path,
tmp->settings.layer2_socket_path)) {

-- 
To view, visit https://gerrit.osmocom.org/5099
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a1d975997e592344327e6b0783bd0c5d2534b02
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] osmocom-bb[master]: mobile: Re-introduce msg_ref in struct gsm_sms

2017-12-01 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: mobile: Re-introduce msg_ref in struct gsm_sms
..


mobile: Re-introduce msg_ref in struct gsm_sms

In I4bac5f06921b5fd85a98d97770d42d4858ca1c42 I have removed the
msg_ref field. But in case we delete a transaction with a pending
SMS we need to get the msg_ref from somewhere. This is a partial
revert but for RX SMS it makes sure that msg_ref will be set (it
wasn't set before).

Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded
---
M src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h
M src/host/layer23/src/mobile/gsm411_sms.c
2 files changed, 10 insertions(+), 7 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h 
b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h
index 0d0578a..a94d1aa 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/gsm411_sms.h
@@ -11,6 +11,7 @@
uint8_t ud_hdr_ind;
uint8_t protocol_id;
uint8_t data_coding_scheme;
+   uint8_t msg_ref;
char address[20+1]; /* DA LV is 12 bytes max, i.e. 10 bytes
 * BCD == 20 bytes string */
time_t time;
diff --git a/src/host/layer23/src/mobile/gsm411_sms.c 
b/src/host/layer23/src/mobile/gsm411_sms.c
index f09d7a1..eb09854 100644
--- a/src/host/layer23/src/mobile/gsm411_sms.c
+++ b/src/host/layer23/src/mobile/gsm411_sms.c
@@ -232,6 +232,7 @@
int rc = 0;
 
gsms = sms_alloc();
+   gsms->msg_ref = msg_ref;
 
/* invert those fields where 0 means active/present */
sms_mti = *smsp & 0x03;
@@ -296,7 +297,7 @@
LOGP(DLSMS, LOGL_INFO, "RX SMS: MTI: 0x%02x, "
 "MR: 0x%02x PID: 0x%02x, DCS: 0x%02x, OA: %s, "
 "UserDataLength: 0x%02x, UserData: \"%s\"\n",
-sms_mti, msg_ref,
+sms_mti, gsms->msg_ref,
 gsms->protocol_id, gsms->data_coding_scheme, gsms->address,
 gsms->user_data_len,
sms_alphabet == DCS_7BIT_DEFAULT ? gsms->text :
@@ -528,7 +529,7 @@
 
 /* generate a msgb containing a TPDU derived from struct gsm_sms,
  * returns total size of TPDU */
-static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms, uint8_t 
msg_ref)
+static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms)
 {
uint8_t *smsp;
uint8_t da[12]; /* max len per 03.40 */
@@ -559,7 +560,7 @@
 
/* generate message ref */
smsp = msgb_put(msg, 1);
-   *smsp = msg_ref;
+   *smsp = sms->msg_ref;
 
/* generate destination address */
if (sms->address[0] == '+')
@@ -620,7 +621,7 @@
 
 /* Take a SMS in gsm_sms structure and send it. */
 static int gsm411_tx_sms_submit(struct osmocom_ms *ms, const char *sms_sca,
-   struct gsm_sms *sms, uint8_t msg_ref)
+   struct gsm_sms *sms)
 {
struct msgb *msg;
struct gsm_trans *trans;
@@ -688,14 +689,14 @@
rp_ud_len = (uint8_t *)msgb_put(msg, 1);
 
/* generate the 03.40 TPDU */
-   rc = gsm340_gen_tpdu(msg, sms, msg_ref);
+   rc = gsm340_gen_tpdu(msg, sms);
if (rc < 0)
goto error;
*rp_ud_len = rc;
 
LOGP(DLSMS, LOGL_INFO, "TX: SMS DELIVER\n");
 
-   gsm411_push_rp_header(msg, GSM411_MT_RP_DATA_MO, msg_ref);
+   gsm411_push_rp_header(msg, GSM411_MT_RP_DATA_MO, sms->msg_ref);
return gsm411_smr_send(&trans->sms.smr_inst, GSM411_SM_RL_DATA_REQ,
msg);
 }
@@ -709,7 +710,8 @@
if (!sms)
return -ENOMEM;
 
-   return gsm411_tx_sms_submit(ms, sms_sca, sms, msg_ref);
+   sms->msg_ref = msg_ref;
+   return gsm411_tx_sms_submit(ms, sms_sca, sms);
 }
 
 /*

-- 
To view, visit https://gerrit.osmocom.org/5098
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[PATCH] osmo-mgw[master]: conn: remove assertions

2017-12-01 Thread dexter
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/5107

to look at the new patch set (#2).

conn: remove assertions

the assertions in the code that handles the connection
lists introduce a lot of unnecessary bloat.

Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0
---
M src/libosmo-mgcp/mgcp_conn.c
1 file changed, 0 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/07/5107/2

diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c
index ae3f026..4090a9f 100644
--- a/src/libosmo-mgcp/mgcp_conn.c
+++ b/src/libosmo-mgcp/mgcp_conn.c
@@ -124,10 +124,6 @@
struct mgcp_conn *conn;
int rc;
 
-   OSMO_ASSERT(endp);
-   OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-   OSMO_ASSERT(strlen(name) < sizeof(conn->name));
-
/* Do not allow more then two connections */
if (llist_count(&endp->conns) >= endp->type->max_conns)
return NULL;
@@ -170,11 +166,6 @@
  *  \returns pointer to allocated connection, NULL if not found */
 struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id)
 {
-   OSMO_ASSERT(endp);
-   OSMO_ASSERT(id);
-   OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH);
-   OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-
struct mgcp_conn *conn;
 
llist_for_each_entry(conn, &endp->conns, entry) {
@@ -192,11 +183,6 @@
 struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp,
const char *id)
 {
-   OSMO_ASSERT(endp);
-   OSMO_ASSERT(id);
-   OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH);
-   OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-
struct mgcp_conn *conn;
 
conn = mgcp_conn_get(endp, id);
@@ -214,11 +200,6 @@
  *  \param[in] id identification number of the connection */
 void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id)
 {
-   OSMO_ASSERT(endp);
-   OSMO_ASSERT(id);
-   OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH);
-   OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-
struct mgcp_conn *conn;
 
conn = mgcp_conn_get(endp, id);
@@ -246,9 +227,6 @@
  *  \param[in] endp associated endpoint */
 void mgcp_conn_free_oldest(struct mgcp_endpoint *endp)
 {
-   OSMO_ASSERT(endp);
-   OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-
struct mgcp_conn *conn;
 
if (llist_empty(&endp->conns))
@@ -265,9 +243,6 @@
  *  \param[in] endp associated endpoint */
 void mgcp_conn_free_all(struct mgcp_endpoint *endp)
 {
-   OSMO_ASSERT(endp);
-   OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-
struct mgcp_conn *conn;
struct mgcp_conn *conn_tmp;
 

-- 
To view, visit https://gerrit.osmocom.org/5107
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0
Gerrit-PatchSet: 2
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmocom-bb[master]: mobile: Create "ms" singleton for struct osmocom_ms

2017-12-01 Thread Holger Freyther

Patch Set 6:

> might be a good idea to state a small example in the commit log how
 > it would look like when used from the LUA side.

chicken/egg. I do have a table+examples in the OsmocomBB manual (commit 
pending). Maybe I should just point to the manual in the commit message? And 
later of course put examples into into the contrib directory.

-- 
To view, visit https://gerrit.osmocom.org/4840
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d6334a58
Gerrit-PatchSet: 6
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[ABANDON] osmocom-bb[master]: mobile: Pass the msg_ref from outside

2017-12-01 Thread Holger Freyther
Holger Freyther has abandoned this change.

Change subject: mobile: Pass the msg_ref from outside
..


Abandoned

I squashed this into another patch.

-- 
To view, visit https://gerrit.osmocom.org/4910
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I70ad2aa7e6dd756bf53e61ac983139d35d1ada8d
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


python/osmo-python-tests[master]: Improve python3 compatibility

2017-12-01 Thread Harald Welte

Patch Set 2: Code-Review+1

looks fine to me, but I'm not the python guru. Pau? Neels?

-- 
To view, visit https://gerrit.osmocom.org/5038
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121
Gerrit-PatchSet: 2
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[MERGED] osmo-hlr[master]: Remove unused ipa.py

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Remove unused ipa.py
..


Remove unused ipa.py

Change-Id: I0a6c22f38480ae75ae9efb452e4eeacb39ae4f42
---
D contrib/ipa.py
1 file changed, 0 insertions(+), 278 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/contrib/ipa.py b/contrib/ipa.py
deleted file mode 100755
index 71cbf45..000
--- a/contrib/ipa.py
+++ /dev/null
@@ -1,278 +0,0 @@
-#!/usr/bin/python3
-# -*- mode: python-mode; py-indent-tabs-mode: nil -*-
-"""
-/*
- * Copyright (C) 2016 sysmocom s.f.m.c. GmbH
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-"""
-
-import struct, random, sys
-
-class IPA(object):
-"""
-Stateless IPA protocol multiplexer: add/remove/parse (extended) header
-"""
-version = "0.0.5"
-TCP_PORT_OML = 3002
-TCP_PORT_RSL = 3003
-# OpenBSC extensions: OSMO, MGCP_OLD
-PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, 
MGCP_OLD=0xFC)
-# ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol
-EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6)
-# OpenBSC extension: SCCP_OLD
-MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, 
SCCP_OLD=0xFF)
-_IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, 
SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8)
-CTRL_GET = 'GET'
-CTRL_SET = 'SET'
-CTRL_REP = 'REPLY'
-CTRL_ERR = 'ERR'
-CTRL_TRAP = 'TRAP'
-
-def _l(self, d, p):
-"""
-Reverse dictionary lookup: return key for a given value
-"""
-if p is None:
-return 'UNKNOWN'
-return list(d.keys())[list(d.values()).index(p)]
-
-def _tag(self, t, v):
-"""
-Create TAG as TLV data
-"""
-return struct.pack(">HB", len(v) + 1, t) + v
-
-def proto(self, p):
-"""
-Lookup protocol name
-"""
-return self._l(self.PROTO, p)
-
-def ext(self, p):
-"""
-Lookup protocol extension name
-"""
-return self._l(self.EXT, p)
-
-def msgt(self, p):
-"""
-Lookup message type name
-"""
-return self._l(self.MSGT, p)
-
-def idtag(self, p):
-"""
-Lookup ID tag name
-"""
-return self._l(self._IDTAG, p)
-
-def ext_name(self, proto, exten):
-"""
-Return proper extension byte name depending on the protocol used
-"""
-if self.PROTO['CCM'] == proto:
-return self.msgt(exten)
-if self.PROTO['OSMO'] == proto:
-return self.ext(exten)
-return None
-
-def add_header(self, data, proto, ext=None):
-"""
-Add IPA header (with extension if necessary), data must be represented 
as bytes
-"""
-if ext is None:
-return struct.pack(">HB", len(data) + 1, proto) + data
-return struct.pack(">HBB", len(data) + 1, proto, ext) + data
-
-def del_header(self, data):
-"""
-Strip IPA protocol header correctly removing extension if present
-Returns data length, IPA protocol, extension (or None if not defined 
for a give protocol) and the data without header
-"""
-if not len(data):
-return None, None, None, None
-(dlen, proto) = struct.unpack('>HB', data[:3])
-if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # 
there's extension which we have to unpack
-return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, 
protocol, extension, data
-return dlen, proto, None, data[3:] # length, protocol, _, data
-
-def split_combined(self, data):
-"""
-Split the data which contains multiple concatenated IPA messages into 
tuple (first, rest) where rest contains remaining messages, first is the single 
IPA message
-"""
-(length, _, _, _) = self.del_header(data)
-return data[:(length + 3)], data[(length + 3):]
-
-def tag_serial(self, data):
-"""
-Make TAG for serial number
-"""
-return self._tag(self._IDTAG['SERNR'], data)
-
-de

osmo-hlr[master]: Remove unused ipa.py

2017-12-01 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/4994
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0a6c22f38480ae75ae9efb452e4eeacb39ae4f42
Gerrit-PatchSet: 2
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


python/osmo-python-tests[master]: Use python3 for osmo_ctrl.py

2017-12-01 Thread Harald Welte

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/5061
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2461dd9af67771beed5306116e8a1b0ee2285aa8
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[MERGED] osmo-msc[master]: cosmetic: remove duplicate logging

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: remove duplicate logging
..


cosmetic: remove duplicate logging

The log output of the reset FSM duplicates lots of the built in
FSM log output.

Remove duplicate logging, use more expressive log messages where
needed.

Change-Id: Ie031d947a5b8097bd656c0271081af215605ba02
---
M src/libcommon-cs/a_reset.c
1 file changed, 2 insertions(+), 24 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libcommon-cs/a_reset.c b/src/libcommon-cs/a_reset.c
index 32c00ae..3ee0058 100644
--- a/src/libcommon-cs/a_reset.c
+++ b/src/libcommon-cs/a_reset.c
@@ -38,23 +38,10 @@
ST_CONN,/* We have a confirmed connection */
 };
 
-static const struct value_string fsm_state_names[] = {
-   {ST_DISC, "ST_DISC (disconnected)"},
-   {ST_CONN, "ST_CONN (connected)"},
-   {0, NULL},
-};
-
 enum fsm_evt {
EV_RESET_ACK,   /* got reset acknowlegement from remote end */
EV_N_DISCONNECT,/* lost a connection */
EV_N_CONNECT,   /* made a successful connection */
-};
-
-static const struct value_string fsm_evt_names[] = {
-   {EV_RESET_ACK, "EV_RESET_ACK"},
-   {EV_N_DISCONNECT, "EV_N_DISCONNECT"},
-   {EV_N_CONNECT, "EV_N_CONNECT"},
-   {0, NULL},
 };
 
 /* Disconnected state */
@@ -63,9 +50,7 @@
struct a_reset_ctx *reset = (struct a_reset_ctx *)data;
OSMO_ASSERT(reset);
OSMO_ASSERT(reset->fsm);
-
-   LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, 
fsm-event: %s\n",
-get_value_string(fsm_state_names, ST_CONN), 
get_value_string(fsm_evt_names, event));
+   LOGPFSML(reset->fsm, LOGL_NOTICE, "SIGTRAN connection succeded.\n");
 
reset->conn_loss_counter = 0;
osmo_fsm_inst_state_chg(fi, ST_CONN, 0, 0);
@@ -76,9 +61,6 @@
 {
struct a_reset_ctx *reset = (struct a_reset_ctx *)data;
OSMO_ASSERT(reset);
-
-   LOGPFSML(reset->fsm, LOGL_NOTICE, "fsm-state (msc-reset): %s, 
fsm-event: %s\n",
-get_value_string(fsm_state_names, ST_CONN), 
get_value_string(fsm_evt_names, event));
 
switch (event) {
case EV_N_DISCONNECT:
@@ -100,8 +82,7 @@
struct a_reset_ctx *reset = (struct a_reset_ctx *)fi->priv;
OSMO_ASSERT(reset->fsm);
 
-   LOGPFSML(reset->fsm, LOGL_NOTICE, "reset-ack timeout (T%i) in state %s, 
resending...\n", fi->T,
-get_value_string(fsm_state_names, fi->state));
+   LOGPFSML(reset->fsm, LOGL_NOTICE, "(re)sending BSSMAP RESET 
message...\n");
 
reset->cb(reset->priv);
 
@@ -153,7 +134,6 @@
reset->fsm = osmo_fsm_inst_alloc(&fsm, NULL, NULL, LOGL_DEBUG, name);
OSMO_ASSERT(reset->fsm);
reset->fsm->priv = reset;
-   LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm created.\n");
 
/* kick off reset-ack sending mechanism */
osmo_fsm_inst_state_chg(reset->fsm, ST_DISC, RESET_RESEND_INTERVAL, 
RESET_RESEND_TIMER_NO);
@@ -172,8 +152,6 @@
 
memset(reset, 0, sizeof(*reset));
talloc_free(reset);
-
-   LOGPFSML(reset->fsm, LOGL_NOTICE, "reset handler fsm destroyed.\n");
 }
 
 /* Confirm that we sucessfully received a reset acknowlege message */

-- 
To view, visit https://gerrit.osmocom.org/5031
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie031d947a5b8097bd656c0271081af215605ba02
Gerrit-PatchSet: 4
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and...

2017-12-01 Thread Harald Welte

Patch Set 7: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/4915
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842
Gerrit-PatchSet: 7
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[MERGED] libosmocore[master]: logging: Extend the LOGPSRC macro to put cont in it as well

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: logging: Extend the LOGPSRC macro to put cont in it as well
..


logging: Extend the LOGPSRC macro to put cont in it as well

For the lua console printing I need to print several values with
continuation but also specify the filename. Add a "C" for continue
and forward arguments.

Change-Id: I1d6dcb2567b9ed2c8767f661737b979bc3d1377e
---
M include/osmocom/core/logging.h
1 file changed, 18 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index 86a6977..922cbf6 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -71,12 +71,28 @@
  *  \param[in] args variable argument list
  */
 #define LOGPSRC(ss, level, caller_file, caller_line, fmt, args...) \
+   LOGPSRCC(ss, level, caller_file, caller_line, 0, fmt, ##args)
+
+/*! Log through the Osmocom logging framework with explicit source.
+ *  If caller_file is passed as NULL, __BASE_FILE__ and __LINE__ are used
+ *  instead of caller_file and caller_line (so that this macro here defines
+ *  both cases in the same place, and to catch cases where callers fail to pass
+ *  a non-null filename string).
+ *  \param[in] ss logging subsystem (e.g. \ref DLGLOBAL)
+ *  \param[in] level logging level (e.g. \ref LOGL_NOTICE)
+ *  \param[in] caller_file caller's source file string (e.g. __BASE_FILE__)
+ *  \param[in] caller_line caller's source line nr (e.g. __LINE__)
+ *  \param[in] cont continuation (1) or new line (0)
+ *  \param[in] fmt format string
+ *  \param[in] args variable argument list
+ */
+#define LOGPSRCC(ss, level, caller_file, caller_line, cont, fmt, args...) \
do { \
if (log_check_level(ss, level)) {\
if (caller_file) \
-   logp2(ss, level, caller_file, caller_line, 0, 
fmt, ##args); \
+   logp2(ss, level, caller_file, caller_line, 
cont, fmt, ##args); \
else \
-   logp2(ss, level, __BASE_FILE__, __LINE__, 0, 
fmt, ##args); \
+   logp2(ss, level, __BASE_FILE__, __LINE__, cont, 
fmt, ##args); \
}\
} while(0)
 

-- 
To view, visit https://gerrit.osmocom.org/5080
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d6dcb2567b9ed2c8767f661737b979bc3d1377e
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ggsn[master]: sanitize build: ensure uint16/32 alignment in gtpie_test and...

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: sanitize build: ensure uint16/32 alignment in gtpie_test and 
in46a_test
..


sanitize build: ensure uint16/32 alignment in gtpie_test and in46a_test

Fixes sanitize build failures:

  Testing gtpie_tlv()
  ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:30:2: runtime error: load of 
misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte 
alignment
  0x55c0a0830f21: note: pointer points here
   00 00 00  17 00 06 01 02 03 04 05  06 00 00 00 00 00 00 00  00 00 00 00 00 
00 00 00  00 00 00 00 00
^
  Testing gtpie_tv0()
  Testing gtpie_tv1()
  Testing gtpie_tv2()
  ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:76:2: runtime error: load of 
misaligned address 0x55c0a0830f21 for type 'uint16_t', which requires 2 byte 
alignment
  0x55c0a0830f21: note: pointer points here
   00 00 00  2a ab cd 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 
00 00 00  00 00 00 00 00
^
  Testing gtpie_tv4()
  ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:90:2: runtime error: load of 
misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte 
alignment
  0x55c0a0830f21: note: pointer points here
   00 00 00  2a ab cd 01 23 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 
00 00 00  00 00 00 00 00
^
  Testing gtpie_tv8()
  ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:104:2: runtime error: load 
of misaligned address 0x55c0a0830f21 for type 'uint32_t', which requires 4 byte 
alignment
  0x55c0a0830f21: note: pointer points here
   00 00 00  2a 00 01 02 03 04 05 06  07 00 00 00 00 00 00 00  00 00 00 00 00 
00 00 00  00 00 00 00 00
^
  ../../../../src/osmo-ggsn/tests/gtp/gtpie_test.c:105:2: runtime error: load 
of misaligned address 0x55c0a0830f25 for type 'uint32_t', which requires 4 byte 
alignment
  0x55c0a0830f25: note: pointer points here
   00 01 02 03 04 05 06  07 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 
00 00 00 00 00 00 00  00
   ^

Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842
---
M tests/gtp/gtpie_test.c
M tests/lib/in46a_test.c
2 files changed, 8 insertions(+), 6 deletions(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/gtp/gtpie_test.c b/tests/gtp/gtpie_test.c
index 8d87dcc..e3bc2e0 100644
--- a/tests/gtp/gtpie_test.c
+++ b/tests/gtp/gtpie_test.c
@@ -7,6 +7,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "../../lib/syserr.h"
 #include "../../gtp/gtpie.h"
@@ -27,7 +28,7 @@
OSMO_ASSERT(rc == 0);
OSMO_ASSERT(len == sizeof(in) + 3);
OSMO_ASSERT(buf[0] == 23);
-   OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == sizeof(in));
+   OSMO_ASSERT(osmo_load16be(&buf[1]) == sizeof(in));
OSMO_ASSERT(!memcmp(buf+3, in, sizeof(in)));
 
/* overflow */
@@ -73,7 +74,7 @@
OSMO_ASSERT(rc == 0);
OSMO_ASSERT(len == 3);
OSMO_ASSERT(buf[0] == 42);
-   OSMO_ASSERT(ntohs(*(uint16_t *) &buf[1]) == 0xABCD);
+   OSMO_ASSERT(osmo_load16be(&buf[1]) == 0xABCD);
 }
 
 static void test_gtpie_tv4()
@@ -87,7 +88,7 @@
OSMO_ASSERT(rc == 0);
OSMO_ASSERT(len == 5);
OSMO_ASSERT(buf[0] == 42);
-   OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0xABCD0123);
+   OSMO_ASSERT(osmo_load32be(&buf[1]) == 0xABCD0123);
 }
 
 static void test_gtpie_tv8()
@@ -101,8 +102,8 @@
OSMO_ASSERT(rc == 0);
OSMO_ASSERT(len == 9);
OSMO_ASSERT(buf[0] == 42);
-   OSMO_ASSERT(ntohl(*(uint32_t *) &buf[1]) == 0x00010203);
-   OSMO_ASSERT(ntohl(*(uint32_t *) &buf[5]) == 0x04050607);
+   OSMO_ASSERT(osmo_load32be(&buf[1]) == 0x00010203);
+   OSMO_ASSERT(osmo_load32be(&buf[5]) == 0x04050607);
 }
 
 int main(int argc, char **argv)
diff --git a/tests/lib/in46a_test.c b/tests/lib/in46a_test.c
index ab7156f..d4a5dbc 100644
--- a/tests/lib/in46a_test.c
+++ b/tests/lib/in46a_test.c
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "../../lib/in46_addr.h"
 #include "../../lib/syserr.h"
@@ -171,7 +172,7 @@
OSMO_ASSERT(in46a_to_eua(&g_ia4, &eua) == 0);
OSMO_ASSERT(eua.v[0] == PDP_EUA_ORG_IETF);
OSMO_ASSERT(eua.v[1] == PDP_EUA_TYPE_v4);
-   OSMO_ASSERT(*(uint32_t *) &eua.v[2] == g_ia4.v4.s_addr);
+   OSMO_ASSERT(osmo_load32le(&eua.v[2]) == g_ia4.v4.s_addr);
 
/* IPv6 address */
OSMO_ASSERT(in46a_to_eua(&g_ia6, &eua) == 0);

-- 
To view, visit https://gerrit.osmocom.org/4915
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9eb16450af942d6464211e190f6a4d5a1d814842
Gerrit-PatchSet: 7
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
G

[MERGED] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Move pdp ctx specific CDR fields to...

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoSGSN: configuration: Move pdp ctx specific CDR fields to 
its own table
..


OsmoSGSN: configuration: Move pdp ctx specific CDR fields to its own table

Change-Id: I056f278b64ab426b9455b6a667abf2fe7fc94022
---
M OsmoSGSN/chapters/configuration.adoc
1 file changed, 10 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoSGSN/chapters/configuration.adoc 
b/OsmoSGSN/chapters/configuration.adoc
index 22d28dd..c46a23c 100644
--- a/OsmoSGSN/chapters/configuration.adoc
+++ b/OsmoSGSN/chapters/configuration.adoc
@@ -198,7 +198,16 @@
 |lac|Location Area Code in which the MS was registered last
 |hlr|HLR of the subscriber
 |event|Possible events are explained below in <>
-|pdp|
+|===
+
+If the _event_ field describes a pdp context related action (starts with
+_pdp-_), then the following extra CSV fields are appended to the line:
+
+[[sgsn-cdr-pdp]]
+.Description of extra CSV fields for pdp context related events
+[options="header",cols="15%,85%"]
+|===
+|Field Name|Description
 |pdp_duration|duration of the PDP context so far
 |ggsn_addr|GGSN related to the PDP context
 |sgsn_addr|SGSN related to the PDP context

-- 
To view, visit https://gerrit.osmocom.org/5113
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I056f278b64ab426b9455b6a667abf2fe7fc94022
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Document CDR CTRL interface

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoSGSN: configuration: Document CDR CTRL interface
..


OsmoSGSN: configuration: Document CDR CTRL interface

Change-Id: Ib729e2fc4898c20d27e95fc0f13abe9c0656dda5
---
M OsmoSGSN/chapters/configuration.adoc
1 file changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoSGSN/chapters/configuration.adoc 
b/OsmoSGSN/chapters/configuration.adoc
index f995bc7..2828987 100644
--- a/OsmoSGSN/chapters/configuration.adoc
+++ b/OsmoSGSN/chapters/configuration.adoc
@@ -175,7 +175,7 @@
 OsmoSGSN can write a text log file containing CDR (call data records),
 which are commonly used for accounting/billing purpose.
 
-.Example: CDR configuration
+.Example: CDR log file configuration
 
 OsmoSGSN(config-sgsn)# cdr filename /var/log/osmosgsn.cdr
 OsmoSGSN(config-sgsn)# cdr interval 600 <1>
@@ -185,6 +185,20 @@
 The CDR file is a simple CSV file including a header line naming the
 individual fields of each CSV line.
 
+ CDR CTRL interface
+
+Independently of whether logging CDR to a file is enabled or not, OsmoSGSN can
+also provide delivery of CDR through the CTRL interface. CDR are sent by means
+of TRAP messages with variable name _cdr-v1_, and its value is filled using the
+same CSV line format as in the log file, but without CSV header line.
+
+.Example: CDR delivery through CTRL TRAP messages
+
+OsmoSGSN(config-sgsn)# cdr trap
+
+
+ CDR Format
+
 [[sgsn-cdr]]
 .Description of CSV fields in OsmoSGSN CDR file
 [options="header",cols="15%,85%"]

-- 
To view, visit https://gerrit.osmocom.org/5115
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib729e2fc4898c20d27e95fc0f13abe9c0656dda5
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Add missing pdp-periodic event

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoSGSN: configuration: Add missing pdp-periodic event
..


OsmoSGSN: configuration: Add missing pdp-periodic event

Change-Id: I2d8b11496e75abd23a42efab8eabba2b5b0912e9
---
M OsmoSGSN/chapters/configuration.adoc
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoSGSN/chapters/configuration.adoc 
b/OsmoSGSN/chapters/configuration.adoc
index c46a23c..f995bc7 100644
--- a/OsmoSGSN/chapters/configuration.adoc
+++ b/OsmoSGSN/chapters/configuration.adoc
@@ -231,6 +231,7 @@
 |pdp-deact|GTP DELETE PDP CONTEXT CONFIRM received from GGSN
 |pdp-terminate|Forced PDP context termination during MM context release
 |pdp-free|Release of the PDP context memory
+|pdp-periodic|Triggered by periodic timer, see VTY cmd _cdr interval_
 |===
 
 

-- 
To view, visit https://gerrit.osmocom.org/5114
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d8b11496e75abd23a42efab8eabba2b5b0912e9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bsc[master]: mgcp: use mgw assigned connection identifiers

2017-12-01 Thread Harald Welte

Patch Set 4: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/4964
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib379a6f40875bb8f2cf29038a5b5b7a40a21adab
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-mgw[master]: client: use osmo_strlcpy instead of strncpy

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: client: use osmo_strlcpy instead of strncpy
..


client: use osmo_strlcpy instead of strncpy

simplify \nul termination of the ip_addr string

Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8
---
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp/mgcp_conn.c
M src/libosmo-mgcp/mgcp_network.c
M tests/mgcp_client/mgcp_client_test.c
4 files changed, 10 insertions(+), 10 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index 7e83f95..5cd14f7 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -200,8 +200,7 @@
goto response_parse_failure;
 
/* Extract IP-Address */
-   strncpy(r->audio_ip, line + 9, sizeof(r->audio_ip));
-   r->audio_ip[sizeof(r->audio_ip) - 1] = '\0';
+   osmo_strlcpy(r->audio_ip, line + 9, sizeof(r->audio_ip));
 
/* Check IP-Address */
if (inet_aton(r->audio_ip, &ip_test) == 0)
@@ -397,7 +396,7 @@
unsigned int l = msg->len < sizeof(strbuf) ? msg->len : sizeof(strbuf);
unsigned int i;
 
-   strncpy(strbuf, (const char*)msg->data, l);
+   osmo_strlcpy(strbuf, (const char*)msg->data, l);
for (i = 0; i < sizeof(strbuf); i++) {
if (strbuf[i] == '\n' || strbuf[i] == '\r') {
strbuf[i] = '\0';
diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c
index e33596d..dcfc2ff 100644
--- a/src/libosmo-mgcp/mgcp_conn.c
+++ b/src/libosmo-mgcp/mgcp_conn.c
@@ -29,7 +29,8 @@
 #include 
 
 /* Allocate a new connection identifier. According to RFC3435, they must
- * be unique only within the scope of the endpoint. */
+ * be unique only within the scope of the endpoint. (Caller must provide
+ * memory for id) */
 static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id)
 {
int i;
@@ -140,7 +141,7 @@
conn->mode = MGCP_CONN_NONE;
conn->mode_orig = MGCP_CONN_NONE;
conn->u.rtp.conn = conn;
-   strcpy(conn->name, name);
+   osmo_strlcpy(conn->name, name, sizeof(conn->name));
rc = mgcp_alloc_id(endp, conn->id);
if (rc < 0) {
talloc_free(conn);
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index a02b0d1..816f16b 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -88,7 +88,7 @@
if (endp->cfg->net_ports.bind_addr) {
/* Check there is a bind IP for the RTP traffic configured,
 * if so, use that IP-Address */
-   strncpy(addr, endp->cfg->net_ports.bind_addr, INET_ADDRSTRLEN);
+   osmo_strlcpy(addr, endp->cfg->net_ports.bind_addr, 
INET_ADDRSTRLEN);
LOGP(DRTP, LOGL_DEBUG,
 "endpoint:%x CI:%s using configured rtp bind ip as local 
bind ip %s\n",
 ENDPOINT_NUMBER(endp), conn->conn->id, addr);
@@ -96,7 +96,7 @@
/* No specific bind IP is configured for the RTP traffic, so
 * assume the IP where we listen for incoming MGCP messages
 * as bind IP */
-   strncpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN);
+   osmo_strlcpy(addr, endp->cfg->source_addr, INET_ADDRSTRLEN);
LOGP(DRTP, LOGL_DEBUG,
 "endpoint:%x CI:%s using mgcp bind ip as local rtp bind 
ip: %s\n",
 ENDPOINT_NUMBER(endp), conn->conn->id, addr);
diff --git a/tests/mgcp_client/mgcp_client_test.c 
b/tests/mgcp_client/mgcp_client_test.c
index 5fd59e9..37fe0b8 100644
--- a/tests/mgcp_client/mgcp_client_test.c
+++ b/tests/mgcp_client/mgcp_client_test.c
@@ -46,14 +46,14 @@
l = strlen(head);
msg->l2h = msgb_put(msg, l);
data = (char*)msgb_l2(msg);
-   strncpy(data, head, l);
+   osmo_strlcpy(data, head, l);
 
data = (char*)msgb_put(msg, 1);
*data = '\n';
 
l = strlen(params);
data = (char*)msgb_put(msg, l);
-   strncpy(data, params, l);
+   osmo_strlcpy(data, params, l);
 
return msg;
 }
@@ -66,7 +66,7 @@
char *data;
msg->l2h = msgb_put(msg, l);
data = (char*)msgb_l2(msg);
-   strncpy(data, str, l);
+   osmo_strlcpy(data, str, l);
return msg;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/5024
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I94e3815f45d08e0d40faf41e580547de937c4ce8
Gerrit-PatchSet: 7
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 


[MERGED] osmo-mgw[master]: MGCP: Connection Identifiers are hex strings

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: MGCP: Connection Identifiers are hex strings
..


MGCP: Connection Identifiers are hex strings

The MGCP spec in RFC3435 is quite clear: Connection Identifiers are
hexadecimal strings of up to 32 characters. We should not print and
parse them as integers on either client or server.

Change the internal uint32_t representation of connection identifiers
to a string representation in the client and also in the server.

Closes: OS#2649
Change-Id: I0531a1b670d00cec50078423a2868207135b2436
---
M TODO-RELEASE
M include/osmocom/mgcp/mgcp_common.h
M include/osmocom/mgcp/mgcp_conn.h
M include/osmocom/mgcp/mgcp_internal.h
M include/osmocom/mgcp/mgcp_msg.h
M include/osmocom/mgcp_client/mgcp_client.h
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp/mgcp_conn.c
M src/libosmo-mgcp/mgcp_msg.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_osmux.c
M src/libosmo-mgcp/mgcp_protocol.c
M src/libosmo-mgcp/mgcp_sdp.c
M src/libosmo-mgcp/mgcp_vty.c
M tests/mgcp/mgcp_test.c
M tests/mgcp_client/mgcp_client_test.c
16 files changed, 106 insertions(+), 102 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/TODO-RELEASE b/TODO-RELEASE
index d198b97..917c995 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -24,3 +24,4 @@
 # If any interfaces have been removed or changed since the last public 
release, a=0.
 #
 #library   whatdescription / commit summary line
+libosmo-mgcp   API/ABI change  parse and represent connection identifiers as 
hex strings
\ No newline at end of file
diff --git a/include/osmocom/mgcp/mgcp_common.h 
b/include/osmocom/mgcp/mgcp_common.h
index 0eb1388..29dc458 100644
--- a/include/osmocom/mgcp/mgcp_common.h
+++ b/include/osmocom/mgcp/mgcp_common.h
@@ -68,4 +68,8 @@
return 0;
 }
 
+/* String length of Connection Identifiers
+ * (see also RFC3435 2.1.3.2 Names of Connections) */
+#define MGCP_CONN_ID_LENGTH 32+1
+
 #endif
diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h
index e0ae021..982a311 100644
--- a/include/osmocom/mgcp/mgcp_conn.h
+++ b/include/osmocom/mgcp/mgcp_conn.h
@@ -28,12 +28,12 @@
 #include 
 
 struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp,
- uint32_t id, enum mgcp_conn_type type,
+ const char *id, enum mgcp_conn_type type,
  char *name);
-struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, uint32_t id);
+struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id);
 struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp,
-   uint32_t id);
-void mgcp_conn_free(struct mgcp_endpoint *endp, uint32_t id);
+   const char *id);
+void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id);
 void mgcp_conn_free_oldest(struct mgcp_endpoint *endp);
 void mgcp_conn_free_all(struct mgcp_endpoint *endp);
 char *mgcp_conn_dump(struct mgcp_conn *conn);
diff --git a/include/osmocom/mgcp/mgcp_internal.h 
b/include/osmocom/mgcp/mgcp_internal.h
index b9c1731..c3f9ba1 100644
--- a/include/osmocom/mgcp/mgcp_internal.h
+++ b/include/osmocom/mgcp/mgcp_internal.h
@@ -30,8 +30,10 @@
 
 #define CI_UNUSED 0
 
-#define CONN_ID_BTS 0
-#define CONN_ID_NET 1
+/* FIXME: This this is only needed to compile the currently
+ * broken OSMUX support. Remove when fixed */
+#define CONN_ID_BTS "0"
+#define CONN_ID_NET "1"
 
 enum mgcp_trunk_type {
MGCP_TRUNK_VIRTUAL,
@@ -203,7 +205,7 @@
enum mgcp_connection_mode mode_orig;
 
/*!< connection id to identify the conntion */
-   uint32_t id;
+   char id[MGCP_CONN_ID_LENGTH];
 
/*!< human readable name (vty, logging) */
char name[256];
diff --git a/include/osmocom/mgcp/mgcp_msg.h b/include/osmocom/mgcp/mgcp_msg.h
index b7d52bb..7732865 100644
--- a/include/osmocom/mgcp/mgcp_msg.h
+++ b/include/osmocom/mgcp/mgcp_msg.h
@@ -43,7 +43,7 @@
 
 int mgcp_verify_call_id(struct mgcp_endpoint *endp, const char *callid);
 
-int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *ci);
+int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id);
 
 char *mgcp_strline(char *str, char **saveptr);
 
@@ -54,5 +54,3 @@
 #define for_each_non_empty_line(line, save)\
for (line = strtok_r(NULL, "\r\n", &save); line;\
 line = strtok_r(NULL, "\r\n", &save))
-
-int mgcp_parse_ci(uint32_t *conn_id, const char *ci);
diff --git a/include/osmocom/mgcp_client/mgcp_client.h 
b/include/osmocom/mgcp_client/mgcp_client.h
index 8a2c404..b649abd 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -29,6 +29,7 @@
int response_code;
mgcp_trans_id_t trans_id;
const char *comment;

[MERGED] osmo-mgw[master]: cosmetic: clearly mark endpoint numbers as hex

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: clearly mark endpoint numbers as hex
..


cosmetic: clearly mark endpoint numbers as hex

The log prints the endpoint numbers as hexadecimal numbers, but
it does not prefix them with "0x".

Add "0x" prefixes to all endpoint number outputs in the log

Change-Id: I284627de02cd140a894445375e9152ff007a71e6
---
M src/libosmo-mgcp/mgcp_conn.c
M src/libosmo-mgcp/mgcp_msg.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_protocol.c
4 files changed, 83 insertions(+), 83 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c
index dcfc2ff..ae3f026 100644
--- a/src/libosmo-mgcp/mgcp_conn.c
+++ b/src/libosmo-mgcp/mgcp_conn.c
@@ -61,7 +61,7 @@
}
}
 
-   LOGP(DLMGCP, LOGL_ERROR, "endpoint:%x, unable to generate a unique 
connectionIdentifier\n",
+   LOGP(DLMGCP, LOGL_ERROR, "endpoint:0x%x, unable to generate a unique 
connectionIdentifier\n",
 ENDPOINT_NUMBER(endp));
 
return -1;
diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c
index 9803921..17b1026 100644
--- a/src/libosmo-mgcp/mgcp_msg.c
+++ b/src/libosmo-mgcp/mgcp_msg.c
@@ -82,7 +82,7 @@
 
if (!mode) {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x missing connection mode\n",
+"endpoint:0x%x missing connection mode\n",
 ENDPOINT_NUMBER(endp));
return -1;
}
@@ -101,7 +101,7 @@
conn->mode = MGCP_CONN_LOOPBACK;
else {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x unknown connection mode: '%s'\n",
+"endpoint:0x%x unknown connection mode: '%s'\n",
 ENDPOINT_NUMBER(endp), mode);
ret = -1;
}
@@ -113,16 +113,16 @@
}
 
LOGP(DLMGCP, LOGL_DEBUG,
-"endpoint:%x conn:%s\n",
+"endpoint:0x%x conn:%s\n",
 ENDPOINT_NUMBER(endp), mgcp_conn_dump(conn));
 
LOGP(DLMGCP, LOGL_DEBUG,
-"endpoint:%x connection mode '%s' %d\n",
+"endpoint:0x%x connection mode '%s' %d\n",
 ENDPOINT_NUMBER(endp), mode, conn->mode);
 
/* Special handling für RTP connections */
if (conn->type == MGCP_CONN_TYPE_RTP) {
-   LOGP(DLMGCP, LOGL_DEBUG, "endpoint:%x output_enabled %d\n",
+   LOGP(DLMGCP, LOGL_DEBUG, "endpoint:0x%x output_enabled %d\n",
 ENDPOINT_NUMBER(endp), conn->u.rtp.end.output_enabled);
}
 
@@ -318,7 +318,7 @@
 
if (strcmp(endp->callid, callid) != 0) {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x CallIDs does not match '%s' != '%s'\n",
+"endpoint:0x%x CallIDs does not match '%s' != '%s'\n",
 ENDPOINT_NUMBER(endp), endp->callid, callid);
return -1;
}
@@ -335,7 +335,7 @@
/* Check for null identifiers */
if (!conn_id) {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x invalid ConnectionIdentifier (missing)\n",
+"endpoint:0x%x invalid ConnectionIdentifier (missing)\n",
 ENDPOINT_NUMBER(endp));
return -1;
}
@@ -343,7 +343,7 @@
/* Check for empty connection identifiers */
if (strlen(conn_id) == 0) {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x invalid ConnectionIdentifier (empty)\n",
+"endpoint:0x%x invalid ConnectionIdentifier (empty)\n",
 ENDPOINT_NUMBER(endp));
return -1;
}
@@ -351,7 +351,7 @@
/* Check for over long connection identifiers */
if (strlen(conn_id) > MGCP_CONN_ID_LENGTH) {
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x invalid ConnectionIdentifier (too long) 
0x%s\n",
+"endpoint:0x%x invalid ConnectionIdentifier (too long) 
0x%s\n",
 ENDPOINT_NUMBER(endp), conn_id);
return -1;
}
@@ -361,7 +361,7 @@
return 0;
 
LOGP(DLMGCP, LOGL_ERROR,
-"endpoint:%x no connection found under ConnectionIdentifier 
0x%s\n",
+"endpoint:0x%x no connection found under ConnectionIdentifier 
0x%s\n",
 ENDPOINT_NUMBER(endp), conn_id);
 
return -1;
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 816f16b..eb44f9b 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -73,11 +73,11 @@
rc = osmo_sock_local_ip(addr, inet_ntoa(conn->end.addr));
if (rc < 0)
LOGP(DRTP, LOGL_ERROR,
-  

[MERGED] osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n...

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: libosmo-mgcp: Connection Identifiers are allocated by MGW, not 
CA
..


libosmo-mgcp: Connection Identifiers are allocated by MGW, not CA

The MGCP connection identifier is allocated by the MGW while processing
the CRCX, see RFC3435 2.1.3.2:. Including/Accepting a connection
identifier in CRCX is "forbidden" as per RFC3435 Section 3.2.2.

So the MGW side must *reject* a CRCX message with 'I' parameter, and
allocate a connection identifier which is subsequently returned in the
response.

Closes: OS#2648
Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c
---
M TODO-RELEASE
M configure.ac
M include/osmocom/mgcp/mgcp_conn.h
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp/Makefile.am
M src/libosmo-mgcp/mgcp_conn.c
M src/libosmo-mgcp/mgcp_protocol.c
M tests/mgcp/mgcp_test.c
M tests/mgcp/mgcp_test.ok
9 files changed, 970 insertions(+), 168 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/TODO-RELEASE b/TODO-RELEASE
index 917c995..9d0e0dc 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -23,5 +23,7 @@
 # If any interfaces have been added since the last public release, a++;
 # If any interfaces have been removed or changed since the last public 
release, a=0.
 #
-#library   whatdescription / commit summary line
-libosmo-mgcp   API/ABI change  parse and represent connection identifiers as 
hex strings
\ No newline at end of file
+#library   whatdescription / commit summary line
+libosmo-mgcp   API/ABI change  parse and represent connection 
identifiers as hex strings
+libosmo-mgcp   API/ABI change  connection identifiers are assigned by 
the server, not CA
+libosmo-mgcp-clientAPI/ABI change  parse and store connection identifier 
in response
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
index f72b9e1..606f404 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,7 @@
 
 
 PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.0)
+PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.10.0)
 PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0)
 PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.1.0)
 
diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h
index 982a311..e2a423f 100644
--- a/include/osmocom/mgcp/mgcp_conn.h
+++ b/include/osmocom/mgcp/mgcp_conn.h
@@ -28,8 +28,7 @@
 #include 
 
 struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp,
- const char *id, enum mgcp_conn_type type,
- char *name);
+ enum mgcp_conn_type type, char *name);
 struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id);
 struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp,
const char *id);
diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index a89da99..7e83f95 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -257,6 +257,58 @@
return 0;
 }
 
+/* Parse a line like "I: 0cedfd5a19542d197af9afe5231f1d61" */
+static int mgcp_parse_conn_id(struct mgcp_response *r, const char *line)
+{
+   if (strlen(line) < 4)
+   goto response_parse_failure;
+
+   if (memcmp("I: ", line, 3) != 0)
+   goto response_parse_failure;
+
+   osmo_strlcpy(r->head.conn_id, line + 3, sizeof(r->head.conn_id));
+   return 0;
+
+response_parse_failure:
+   LOGP(DLMGCP, LOGL_ERROR,
+"Failed to parse MGCP response (connectionIdentifier)\n");
+   return -EINVAL;
+}
+
+/* Parse MGCP parameters of the response */
+static int parse_head_params(struct mgcp_response *r)
+{
+   char *line;
+   int rc = 0;
+   OSMO_ASSERT(r->body);
+   char *data = r->body;
+   char *data_end = strstr(r->body, "\n\n");
+
+   /* Protect SDP body, for_each_non_empty_line() will
+* only parse until it hits \0 mark. */
+   if (data_end)
+   *data_end = '\0';
+
+   for_each_non_empty_line(line, data) {
+   switch (line[0]) {
+   case 'I':
+   rc = mgcp_parse_conn_id(r, line);
+   if (rc)
+   goto exit;
+   break;
+   default:
+   /* skip unhandled parameters */
+   break;
+   }
+   }
+exit:
+   /* Restore original state */
+   if (data_end)
+   *data_end = '\n';
+
+   return rc;
+}
+
 static struct mgcp_response_pending *mgcp_client_response_pending_get(
 struct mgcp_client *mgcp,
 struct mgcp_response *r)
@@ -287,7 +33

[MERGED] osmo-mgw[master]: cosmetic: fix sourcecode formatting

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: fix sourcecode formatting
..


cosmetic: fix sourcecode formatting

Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149
---
M include/osmocom/mgcp_client/mgcp_client.h
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/mgcp_client/mgcp_client.h 
b/include/osmocom/mgcp_client/mgcp_client.h
index b649abd..19abaf3 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -26,9 +26,9 @@
 typedef unsigned int mgcp_trans_id_t;
 
 struct mgcp_response_head {
-   int response_code;
-   mgcp_trans_id_t trans_id;
-   const char *comment;
+   int response_code;
+   mgcp_trans_id_t trans_id;
+   const char *comment;
char conn_id[MGCP_CONN_ID_LENGTH];
 };
 

-- 
To view, visit https://gerrit.osmocom.org/5034
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a4eda30986e07237bb7b496704f36f03d25a149
Gerrit-PatchSet: 6
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-mgw[master]: MGCP: Connection Identifiers are hex strings

2017-12-01 Thread Harald Welte

Patch Set 8: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/4906
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0531a1b670d00cec50078423a2868207135b2436
Gerrit-PatchSet: 8
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


osmo-mgw[master]: libosmo-mgcp: Connection Identifiers are allocated by MGW, n...

2017-12-01 Thread Harald Welte

Patch Set 8: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/4905
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iab6a6038e7610c62f34e642cd49c93d11151252c
Gerrit-PatchSet: 8
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


osmo-mgw[master]: conn: remove assertions

2017-12-01 Thread Harald Welte

Patch Set 1:

would be good to have a rationale stated in the commit message

-- 
To view, visit https://gerrit.osmocom.org/5107
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-mgw[master]: mgcp_client: don't configure "bts base"

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: mgcp_client: don't configure "bts base"
..


mgcp_client: don't configure "bts base"

There should not be any BTS base port to be configured at an MGCP client.

Possibly this is related to the legacy behavior of libosmo-legacy-mgcp, and
certainly has no place in libosmo-mgcp-client.

Further changes may be needed to follow up on removal of the BTS base port
concept, at least drop it from the VTY for now.

Change-Id: I36e46208d7b75611e5ade3c74d8e1c25870de511
---
M include/osmocom/mgcp_client/mgcp_client.h
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp-client/mgcp_client_vty.c
3 files changed, 0 insertions(+), 31 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/mgcp_client/mgcp_client.h 
b/include/osmocom/mgcp_client/mgcp_client.h
index 1a6cbce..8a2c404 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -21,7 +21,6 @@
int remote_port;
uint16_t first_endpoint;
uint16_t last_endpoint;
-   uint16_t bts_base;
 };
 
 typedef unsigned int mgcp_trans_id_t;
diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index 2047637..a35ad6f 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -45,7 +45,6 @@
.remote_port = -1,
.first_endpoint = 0,
.last_endpoint = 0,
-   .bts_base = 0,
};
 }
 
@@ -383,7 +382,6 @@
 
mgcp->actual.first_endpoint = conf->first_endpoint > 0 ? 
(uint16_t)conf->first_endpoint : 0;
mgcp->actual.last_endpoint = conf->last_endpoint > 0 ? 
(uint16_t)conf->last_endpoint : 0;
-   mgcp->actual.bts_base = conf->bts_base > 0 ? (uint16_t)conf->bts_base : 
4000;
 
return mgcp;
 }
diff --git a/src/libosmo-mgcp-client/mgcp_client_vty.c 
b/src/libosmo-mgcp-client/mgcp_client_vty.c
index f8129c0..1d58bb5 100644
--- a/src/libosmo-mgcp-client/mgcp_client_vty.c
+++ b/src/libosmo-mgcp-client/mgcp_client_vty.c
@@ -123,32 +123,12 @@
   "set first useable endpoint identifier\n"
   "set the last useable endpoint identifier\n")
 
-#define BTS_START_STR "First UDP port allocated for the BTS side\n"
-#define UDP_PORT_STR "UDP Port number\n"
-DEFUN(cfg_mgw_rtp_bts_base_port,
-  cfg_mgw_rtp_bts_base_port_cmd,
-  "mgw bts-base <0-65534>",
-  MGW_STR
-  BTS_START_STR
-  UDP_PORT_STR)
-{
-   global_mgcp_client_conf->bts_base = atoi(argv[0]);
-   return CMD_SUCCESS;
-}
-ALIAS_DEPRECATED(cfg_mgw_rtp_bts_base_port,
-  cfg_mgcpgw_rtp_bts_base_port_cmd,
-  "mgcpgw bts-base <0-65534>",
-  MGW_STR
-  BTS_START_STR
-  UDP_PORT_STR)
-
 int mgcp_client_config_write(struct vty *vty, const char *indent)
 {
const char *addr;
int port;
uint16_t first_endpoint;
uint16_t last_endpoint;
-   uint16_t bts_base;
 
addr = global_mgcp_client_conf->local_addr;
if (addr)
@@ -175,12 +155,6 @@
first_endpoint, last_endpoint, VTY_NEWLINE);
}
 
-   bts_base = global_mgcp_client_conf->bts_base;
-   if (bts_base) {
-   vty_out(vty, "%smgw bts-base %u%s", indent,
-   bts_base, VTY_NEWLINE);
-   }
-
return CMD_SUCCESS;
 }
 
@@ -194,7 +168,6 @@
install_element(node, &cfg_mgw_remote_ip_cmd);
install_element(node, &cfg_mgw_remote_port_cmd);
install_element(node, &cfg_mgw_endpoint_range_cmd);
-   install_element(node, &cfg_mgw_rtp_bts_base_port_cmd);
 
/* deprecated 'mgcpgw' commands */
install_element(node, &cfg_mgcpgw_local_ip_cmd);
@@ -202,5 +175,4 @@
install_element(node, &cfg_mgcpgw_remote_ip_cmd);
install_element(node, &cfg_mgcpgw_remote_port_cmd);
install_element(node, &cfg_mgcpgw_endpoint_range_cmd);
-   install_element(node, &cfg_mgcpgw_rtp_bts_base_port_cmd);
 }

-- 
To view, visit https://gerrit.osmocom.org/4701
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I36e46208d7b75611e5ade3c74d8e1c25870de511
Gerrit-PatchSet: 2
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-mgw[master]: mgcp_client: don't configure "bts base"

2017-12-01 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/4701
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I36e46208d7b75611e5ade3c74d8e1c25870de511
Gerrit-PatchSet: 2
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-pcu[master]: TBF: log timer override

2017-12-01 Thread Harald Welte

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/5109/1/src/tbf.cpp
File src/tbf.cpp:

Line 538:   LOGP(DRLCMAC, LOGL_ERROR, "%s restarting timer %u "
shouldn't this only be an ERROR if T != tbf->T ?


-- 
To view, visit https://gerrit.osmocom.org/5109
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes


[MERGED] libosmocore[master]: coding test: use OSMO_ASSERT

2017-12-01 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: coding test: use OSMO_ASSERT
..


coding test: use OSMO_ASSERT

Change-Id: I896d6aaae3c36b87243b7dc270267090dcb44afe
---
M tests/coding/coding_test.c
1 file changed, 10 insertions(+), 17 deletions(-)

Approvals:
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/coding/coding_test.c b/tests/coding/coding_test.c
index 9a8cdb3..b77410f 100644
--- a/tests/coding/coding_test.c
+++ b/tests/coding/coding_test.c
@@ -30,13 +30,6 @@
 
 #include 
 
-#define ASSERT_TRUE(rc) \
-   if (!(rc)) { \
-   printf("Assert failed in %s:%d.\n",  \
-  __FILE__, __LINE__);  \
-   abort(); \
-   }
-
 #define DUMP_U_AT(b, x, u) do {
\
printf("%s %02x  %02x  ", osmo_ubit_dump(b + x, 57), b[57 + x], 
b[58 + x]); \
printf("%s\n",osmo_ubit_dump(b + 59 + x, 57)); \
@@ -103,8 +96,8 @@
printf("xcch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n",
n_errors, n_bits_total, (float) n_errors / n_bits_total);
 
-   ASSERT_TRUE(n_bits_total == 456);
-   ASSERT_TRUE(!memcmp(l2, result, 23));
+   OSMO_ASSERT(n_bits_total == 456);
+   OSMO_ASSERT(!memcmp(l2, result, 23));
 
printf("\n");
 }
@@ -133,7 +126,7 @@
gsm0503_rach_decode(&result, bursts_s, bsic);
printf("Decoded: %02x\n", result);
 
-   ASSERT_TRUE(ra == result);
+   OSMO_ASSERT(ra == result);
 
printf("\n");
 }
@@ -166,7 +159,7 @@
gsm0503_sch_decode(result, bursts_s);
printf("Decoded: %s\n", osmo_hexdump(result, 4));
 
-   ASSERT_TRUE(!memcmp(info, result, 4));
+   OSMO_ASSERT(!memcmp(info, result, 4));
 
printf("\n");
 }
@@ -202,8 +195,8 @@
printf("tch_fr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n",
n_errors, n_bits_total, (float)n_errors/n_bits_total);
 
-   ASSERT_TRUE(rc == len);
-   ASSERT_TRUE(!memcmp(speech, result, len));
+   OSMO_ASSERT(rc == len);
+   OSMO_ASSERT(!memcmp(speech, result, len));
 
printf("\n");
 }
@@ -239,8 +232,8 @@
printf("tch_hr_decode: n_errors=%d n_bits_total=%d ber=%.2f\n",
n_errors, n_bits_total, (float)n_errors/n_bits_total);
 
-   ASSERT_TRUE(rc == len);
-   ASSERT_TRUE(!memcmp(speech, result, len));
+   OSMO_ASSERT(rc == len);
+   OSMO_ASSERT(!memcmp(speech, result, len));
 
printf("\n");
 }
@@ -283,8 +276,8 @@
printf("pdtch_decode: n_errors=%d n_bits_total=%d ber=%.2f\n",
n_errors, n_bits_total, (float)n_errors/n_bits_total);
 
-   ASSERT_TRUE(rc == len);
-   ASSERT_TRUE(!memcmp(l2, result, len));
+   OSMO_ASSERT(rc == len);
+   OSMO_ASSERT(!memcmp(l2, result, len));
 
printf("\n");
 }

-- 
To view, visit https://gerrit.osmocom.org/5078
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I896d6aaae3c36b87243b7dc270267090dcb44afe
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 


libosmocore[master]: coding test: use OSMO_ASSERT

2017-12-01 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5078
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I896d6aaae3c36b87243b7dc270267090dcb44afe
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-HasComments: No


libosmocore[master]: Add functions for extended RACH coding

2017-12-01 Thread Harald Welte

Patch Set 11: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/5062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Gerrit-PatchSet: 11
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: tnt 
Gerrit-HasComments: No


osmo-mgw[master]: mgcp_client_test makefile: add update_exp target

2017-12-01 Thread Harald Welte

Patch Set 1:

would be nice to have this in a generic rule that would work for each of the 
autotest tests, avoiding the need to replicate it all over the place by 
copy+paste

-- 
To view, visit https://gerrit.osmocom.org/5111
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cda082c46ab5734873cbb39b313037d86777589
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-mgw[master]: mgcp_client_test makefile: add update_exp target

2017-12-01 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5111
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cda082c46ab5734873cbb39b313037d86777589
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-mgw[master]: mgcp_client: add transaction cleanup

2017-12-01 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5110
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I16811e168a46a82a05943252a737b3434143f4bd
Gerrit-PatchSet: 2
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmocom-bb[master]: mobile: Create "ms" singleton for struct osmocom_ms

2017-12-01 Thread Harald Welte

Patch Set 6: Code-Review+2

might be a good idea to state a small example in the commit log how it would 
look like when used from the LUA side.

-- 
To view, visit https://gerrit.osmocom.org/4840
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia3ace33d6ba4e904b1ff8e271a02d6334a58
Gerrit-PatchSet: 6
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmocom-bb[master]: mobile: Use new LOGPSRCC macro to print multiple values

2017-12-01 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5102
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id8491fa949768f170a8c74ab554cb1166afda1b7
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmocom-bb[master]: mobile: Add initial support for scripting support

2017-12-01 Thread Harald Welte

Patch Set 8: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/4737
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I456f6b6b5e1a14ed6c8cb0dcc5140093d3c61ef6
Gerrit-PatchSet: 8
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmocom-bb[master]: mobile: Move starting/stopping a MS into a separate function

2017-12-01 Thread Harald Welte

Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/5100/2/src/host/layer23/src/mobile/app_mobile.c
File src/host/layer23/src/mobile/app_mobile.c:

Line 262:   "use the same layer2-socket.\nPlease 
shutdown "
> sure about \n in the middle of a LOGP? Makes sense in VTY output but "corru
the old code used VTY_NEWLINE instead of \n, which isn't any better either.  I 
think OsmocomBB needs a thorough clean up of such invalid use of libosmocore 
logging, but that shouldn't be mixed with this completely unrelated patch which 
just moves code around in this case.


-- 
To view, visit https://gerrit.osmocom.org/5100
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib4aa5ff212fa6bead8f620abaecc6a0b51a99fec
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmocom-bb[master]: mobile: Use enum and not magic value in the VTY

2017-12-01 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5099
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8a1d975997e592344327e6b0783bd0c5d2534b02
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmocom-bb[master]: mobile: Re-introduce msg_ref in struct gsm_sms

2017-12-01 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5098
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmocom-bb[master]: mobile: Notify MM status changes and generate primitive op ind

2017-12-01 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5101
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e9dcf7fd9116985aa060ba027ba74107a19223a
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoSGSN: configuration: Move pdp ctx specific CDR fields to...

2017-12-01 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5113
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I056f278b64ab426b9455b6a667abf2fe7fc94022
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoSGSN: configuration: Document CDR CTRL interface

2017-12-01 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5115
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib729e2fc4898c20d27e95fc0f13abe9c0656dda5
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoSGSN: configuration: Add missing pdp-periodic event

2017-12-01 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/5114
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2d8b11496e75abd23a42efab8eabba2b5b0912e9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Add missing pdp-periodic event

2017-12-01 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/5114

OsmoSGSN: configuration: Add missing pdp-periodic event

Change-Id: I2d8b11496e75abd23a42efab8eabba2b5b0912e9
---
M OsmoSGSN/chapters/configuration.adoc
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/14/5114/1

diff --git a/OsmoSGSN/chapters/configuration.adoc 
b/OsmoSGSN/chapters/configuration.adoc
index c46a23c..f995bc7 100644
--- a/OsmoSGSN/chapters/configuration.adoc
+++ b/OsmoSGSN/chapters/configuration.adoc
@@ -231,6 +231,7 @@
 |pdp-deact|GTP DELETE PDP CONTEXT CONFIRM received from GGSN
 |pdp-terminate|Forced PDP context termination during MM context release
 |pdp-free|Release of the PDP context memory
+|pdp-periodic|Triggered by periodic timer, see VTY cmd _cdr interval_
 |===
 
 

-- 
To view, visit https://gerrit.osmocom.org/5114
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d8b11496e75abd23a42efab8eabba2b5b0912e9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Move pdp ctx specific CDR fields to...

2017-12-01 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/5113

OsmoSGSN: configuration: Move pdp ctx specific CDR fields to its own table

Change-Id: I056f278b64ab426b9455b6a667abf2fe7fc94022
---
M OsmoSGSN/chapters/configuration.adoc
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/13/5113/1

diff --git a/OsmoSGSN/chapters/configuration.adoc 
b/OsmoSGSN/chapters/configuration.adoc
index 22d28dd..c46a23c 100644
--- a/OsmoSGSN/chapters/configuration.adoc
+++ b/OsmoSGSN/chapters/configuration.adoc
@@ -198,7 +198,16 @@
 |lac|Location Area Code in which the MS was registered last
 |hlr|HLR of the subscriber
 |event|Possible events are explained below in <>
-|pdp|
+|===
+
+If the _event_ field describes a pdp context related action (starts with
+_pdp-_), then the following extra CSV fields are appended to the line:
+
+[[sgsn-cdr-pdp]]
+.Description of extra CSV fields for pdp context related events
+[options="header",cols="15%,85%"]
+|===
+|Field Name|Description
 |pdp_duration|duration of the PDP context so far
 |ggsn_addr|GGSN related to the PDP context
 |sgsn_addr|SGSN related to the PDP context

-- 
To view, visit https://gerrit.osmocom.org/5113
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I056f278b64ab426b9455b6a667abf2fe7fc94022
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] osmo-gsm-manuals[master]: OsmoSGSN: configuration: Document CDR CTRL interface

2017-12-01 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/5115

OsmoSGSN: configuration: Document CDR CTRL interface

Change-Id: Ib729e2fc4898c20d27e95fc0f13abe9c0656dda5
---
M OsmoSGSN/chapters/configuration.adoc
1 file changed, 15 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/15/5115/1

diff --git a/OsmoSGSN/chapters/configuration.adoc 
b/OsmoSGSN/chapters/configuration.adoc
index f995bc7..2828987 100644
--- a/OsmoSGSN/chapters/configuration.adoc
+++ b/OsmoSGSN/chapters/configuration.adoc
@@ -175,7 +175,7 @@
 OsmoSGSN can write a text log file containing CDR (call data records),
 which are commonly used for accounting/billing purpose.
 
-.Example: CDR configuration
+.Example: CDR log file configuration
 
 OsmoSGSN(config-sgsn)# cdr filename /var/log/osmosgsn.cdr
 OsmoSGSN(config-sgsn)# cdr interval 600 <1>
@@ -185,6 +185,20 @@
 The CDR file is a simple CSV file including a header line naming the
 individual fields of each CSV line.
 
+ CDR CTRL interface
+
+Independently of whether logging CDR to a file is enabled or not, OsmoSGSN can
+also provide delivery of CDR through the CTRL interface. CDR are sent by means
+of TRAP messages with variable name _cdr-v1_, and its value is filled using the
+same CSV line format as in the log file, but without CSV header line.
+
+.Example: CDR delivery through CTRL TRAP messages
+
+OsmoSGSN(config-sgsn)# cdr trap
+
+
+ CDR Format
+
 [[sgsn-cdr]]
 .Description of CSV fields in OsmoSGSN CDR file
 [options="header",cols="15%,85%"]

-- 
To view, visit https://gerrit.osmocom.org/5115
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib729e2fc4898c20d27e95fc0f13abe9c0656dda5
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol