lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

June 2022

  • 3 participants
  • 1374 discussions
Build failure of network:osmocom:nightly/open5gs in xUbuntu_18.04/i586
by OBS Notification 10 Jun '22

10 Jun '22
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/o… Package network:osmocom:nightly/open5gs failed to build in xUbuntu_18.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly open5gs Last lines of build log: [ 278s] ../lib/sbi/mhd-server.c: In function ‘server_send_response’: [ 278s] ../lib/sbi/mhd-server.c:333:24: error: implicit declaration of function ‘MHD_create_response_from_buffer_with_free_callback’; did you mean ‘MHD_create_response_from_callback’? [-Werror=implicit-function-declaration] [ 278s] mhd_response = MHD_create_response_from_buffer_with_free_callback( [ 278s] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 278s] MHD_create_response_from_callback [ 278s] ../lib/sbi/mhd-server.c:333:24: warning: nested extern declaration of ‘MHD_create_response_from_buffer_with_free_callback’ [-Wnested-externs] [ 278s] ../lib/sbi/mhd-server.c:333:22: warning: assignment makes pointer from integer without a cast [-Wint-conversion] [ 278s] mhd_response = MHD_create_response_from_buffer_with_free_callback( [ 278s] ^ [ 278s] cc1: some warnings being treated as errors [ 278s] [2767/3227] cc -Isrc/mme/mme@sta -Isrc/mme -I../src/mme -Ilib/app -I../lib/app -Ilib -I../lib -Ilib/core -I../lib/core -Ilib/metrics -I../lib/metrics -Ilib/sctp -I../lib/sctp -Ilib/s1ap -I../lib/s1ap -Ilib/asn1c/s1ap -I../lib/asn1c/s1ap -Ilib/asn1c/common -I../lib/asn1c/common -Ilib/asn1c/util -I../lib/asn1c/util -Ilib/nas/eps -I../lib/nas/eps -Ilib/nas/common -I../lib/nas/common -Ilib/crypt -I../lib/crypt -Ilib/diameter/s6a -I../lib/diameter/s6a -Ilib/diameter/common -I../lib/diameter/common -Isubprojects/freeDiameter -I../subprojects/freeDiameter -Isubprojects/freeDiameter/include -I../subprojects/freeDiameter/include -Ilib/gtp -I../lib/gtp -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu89 -Wextra -Wlogical-op -Werror=missing-include-dirs -Werror=pointer-arith -Werror=init-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=missing-declarations -Werror=implicit-function-declaration -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wimplicit-fallthrough=5 -Wendif-labels -Wstrict-aliasing=3 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wunused -Wduplicated-branches -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter -ffast-math -fdiagnostics-show-option -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ 'src/mme/mme(a)sta/mme-event.c.o' -MF 'src/mme/mme(a)sta/mme-event.c.o.d' -o 'src/mme/mme(a)sta/mme-event.c.o' -c ../src/mme/mme-event.c [ 278s] [2768/3227] cc -Ilib/sbi/ogssbi@sha -Ilib/sbi -I../lib/sbi -Ilib -I../lib -Ilib/core -I../lib/core -Ilib/crypt -I../lib/crypt -Ilib/app -I../lib/app -Ilib/sbi/openapi -I../lib/sbi/openapi -I/usr/include/p11-kit-1 -I/usr/include/i386-linux-gnu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu89 -Wextra -Wlogical-op -Werror=missing-include-dirs -Werror=pointer-arith -Werror=init-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=missing-declarations -Werror=implicit-function-declaration -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wimplicit-fallthrough=5 -Wendif-labels -Wstrict-aliasing=3 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wunused -Wduplicated-branches -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter -ffast-math -fdiagnostics-show-option -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DOGS_SBI_COMPILATION -MD -MQ 'lib/sbi/ogssbi(a)sha/nnrf-build.c.o' -MF 'lib/sbi/ogssbi(a)sha/nnrf-build.c.o.d' -o 'lib/sbi/ogssbi(a)sha/nnrf-build.c.o' -c ../lib/sbi/nnrf-build.c [ 278s] [2769/3227] cc -Ilib/sbi/ogssbi@sha -Ilib/sbi -I../lib/sbi -Ilib -I../lib -Ilib/core -I../lib/core -Ilib/crypt -I../lib/crypt -Ilib/app -I../lib/app -Ilib/sbi/openapi -I../lib/sbi/openapi -I/usr/include/p11-kit-1 -I/usr/include/i386-linux-gnu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu89 -Wextra -Wlogical-op -Werror=missing-include-dirs -Werror=pointer-arith -Werror=init-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=missing-declarations -Werror=implicit-function-declaration -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wimplicit-fallthrough=5 -Wendif-labels -Wstrict-aliasing=3 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wunused -Wduplicated-branches -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter -ffast-math -fdiagnostics-show-option -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DOGS_SBI_COMPILATION -MD -MQ 'lib/sbi/ogssbi(a)sha/nnrf-handler.c.o' -MF 'lib/sbi/ogssbi(a)sha/nnrf-handler.c.o.d' -o 'lib/sbi/ogssbi(a)sha/nnrf-handler.c.o' -c ../lib/sbi/nnrf-handler.c [ 278s] [2770/3227] cc -Ilib/sbi/ogssbi@sha -Ilib/sbi -I../lib/sbi -Ilib -I../lib -Ilib/core -I../lib/core -Ilib/crypt -I../lib/crypt -Ilib/app -I../lib/app -Ilib/sbi/openapi -I../lib/sbi/openapi -I/usr/include/p11-kit-1 -I/usr/include/i386-linux-gnu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu89 -Wextra -Wlogical-op -Werror=missing-include-dirs -Werror=pointer-arith -Werror=init-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=missing-declarations -Werror=implicit-function-declaration -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wimplicit-fallthrough=5 -Wendif-labels -Wstrict-aliasing=3 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wunused -Wduplicated-branches -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter -ffast-math -fdiagnostics-show-option -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DOGS_SBI_COMPILATION -MD -MQ 'lib/sbi/ogssbi(a)sha/nghttp2-server.c.o' -MF 'lib/sbi/ogssbi(a)sha/nghttp2-server.c.o.d' -o 'lib/sbi/ogssbi(a)sha/nghttp2-server.c.o' -c ../lib/sbi/nghttp2-server.c [ 278s] [2771/3227] cc -Ilib/sbi/ogssbi@sha -Ilib/sbi -I../lib/sbi -Ilib -I../lib -Ilib/core -I../lib/core -Ilib/crypt -I../lib/crypt -Ilib/app -I../lib/app -Ilib/sbi/openapi -I../lib/sbi/openapi -I/usr/include/p11-kit-1 -I/usr/include/i386-linux-gnu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu89 -Wextra -Wlogical-op -Werror=missing-include-dirs -Werror=pointer-arith -Werror=init-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=missing-declarations -Werror=implicit-function-declaration -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wimplicit-fallthrough=5 -Wendif-labels -Wstrict-aliasing=3 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wunused -Wduplicated-branches -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter -ffast-math -fdiagnostics-show-option -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DOGS_SBI_COMPILATION -MD -MQ 'lib/sbi/ogssbi(a)sha/client.c.o' -MF 'lib/sbi/ogssbi(a)sha/client.c.o.d' -o 'lib/sbi/ogssbi(a)sha/client.c.o' -c ../lib/sbi/client.c [ 278s] [2772/3227] cc -Ilib/sbi/ogssbi@sha -Ilib/sbi -I../lib/sbi -Ilib -I../lib -Ilib/core -I../lib/core -Ilib/crypt -I../lib/crypt -Ilib/app -I../lib/app -Ilib/sbi/openapi -I../lib/sbi/openapi -I/usr/include/p11-kit-1 -I/usr/include/i386-linux-gnu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu89 -Wextra -Wlogical-op -Werror=missing-include-dirs -Werror=pointer-arith -Werror=init-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=missing-declarations -Werror=implicit-function-declaration -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wimplicit-fallthrough=5 -Wendif-labels -Wstrict-aliasing=3 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wunused -Wduplicated-branches -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter -ffast-math -fdiagnostics-show-option -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DOGS_SBI_COMPILATION -MD -MQ 'lib/sbi/ogssbi(a)sha/message.c.o' -MF 'lib/sbi/ogssbi(a)sha/message.c.o.d' -o 'lib/sbi/ogssbi(a)sha/message.c.o' -c ../lib/sbi/message.c [ 278s] [2773/3227] cc -Ilib/sbi/ogssbi@sha -Ilib/sbi -I../lib/sbi -Ilib -I../lib -Ilib/core -I../lib/core -Ilib/crypt -I../lib/crypt -Ilib/app -I../lib/app -Ilib/sbi/openapi -I../lib/sbi/openapi -I/usr/include/p11-kit-1 -I/usr/include/i386-linux-gnu -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu89 -Wextra -Wlogical-op -Werror=missing-include-dirs -Werror=pointer-arith -Werror=init-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=missing-declarations -Werror=implicit-function-declaration -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wimplicit-fallthrough=5 -Wendif-labels -Wstrict-aliasing=3 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wunused -Wduplicated-branches -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter -ffast-math -fdiagnostics-show-option -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DOGS_SBI_COMPILATION -MD -MQ 'lib/sbi/ogssbi(a)sha/context.c.o' -MF 'lib/sbi/ogssbi(a)sha/context.c.o.d' -o 'lib/sbi/ogssbi(a)sha/context.c.o' -c ../lib/sbi/context.c [ 278s] ninja: build stopped: subcommand failed. [ 278s] dh_auto_build: cd obj-i686-linux-gnu && LC_ALL=C.UTF-8 ninja -j8 -v returned exit code 1 [ 278s] debian/rules:11: recipe for target 'binary' failed [ 278s] make: *** [binary] Error 1 [ 278s] dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 [ 278s] ### VM INTERACTION START ### [ 279s] [ 265.240665][ T1] sysrq: Power Off [ 279s] [ 265.245835][ T16] reboot: Power down [ 279s] ### VM INTERACTION END ### [ 279s] [ 279s] lamb08 failed "build open5gs_2.4.7.202206100026.dsc" at Fri Jun 10 00:36:24 UTC 2022. [ 279s] -- Configure notifications at https://build.opensuse.org/my/subscriptions openSUSE Build Service (https://build.opensuse.org/)
1 0
0 0
Change in osmo-upf[master]: add pfcp_endpoint
by neels 09 Jun '22

09 Jun '22
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-upf/+/28244 to look at the new patch set (#4). Change subject: add pfcp_endpoint ...................................................................... add pfcp_endpoint Related: SYS#5599 Change-Id: Ic8d42e201b63064a71b40ca45a5a40e29941e8ac --- M include/osmocom/pfcp/Makefile.am A include/osmocom/pfcp/pfcp_endpoint.h M include/osmocom/pfcp/pfcp_msg.h M src/libosmo-pfcp/Makefile.am A src/libosmo-pfcp/pfcp_endpoint.c 5 files changed, 585 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/44/28244/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ic8d42e201b63064a71b40ca45a5a40e29941e8ac Gerrit-Change-Number: 28244 Gerrit-PatchSet: 4 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-upf[master]: add pfcp_endpoint
by neels 09 Jun '22

09 Jun '22
Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/28244 ) Change subject: add pfcp_endpoint ...................................................................... Patch Set 3: (12 comments) File include/osmocom/pfcp/pfcp_endpoint.h: https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/93090be2_bb694c9f PS3, Line 46: * \param req If m is a PFCP Response to an earlier Request, req is that request message. */ > otherwise NULL? ACK https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/b26326e0_b8dbcd82 PS3, Line 51: struct osmo_pfcp_endpoint { > osmo_pfcp_endp seems like it's going to be a typing/reading change worth it ;) you mean the name should change to "osmo_pfcp_endp"? Can we focus on functional code review please? https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/8a4acdbf_c118bd79 PS3, Line 104: > In general I'm missing some APIs to set callbaks, local_node_id, etc. Do you mean add getters and setters? I'm not going to add API bloat for each struct member. File src/libosmo-pfcp/pfcp_endpoint.c: https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/acdc991e_d2e57507 PS3, Line 42: struct osmo_pfcp_msg *m; > Doesn't m already have a backpointer to ep? May make more sense to just have that one. no, osmo_pfcp_msg has no pointer to an endpoint. Also it shouldn't. https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/5742e43e_b272eaa5 PS3, Line 44: struct osmo_timer_list t1; > This can be probably optimized to be only 1 timer per list, by moving them to the end of the list wh […] that's the point of the osmo_timer API: it keeps a list and waits for the first entry, later timers untouched behind it in the list. (Recently I was surprised to see load caused by timers triggering every 10th of a second; then again that was multiplied by number of active lchans. PFCP messages are more like 5 seconds timeouts, and not firing continuously. I see no need to optimize here.) https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/56b3267e_a26eaee5 PS3, Line 73: int osmo_pfcp_queue_destructor(struct osmo_pfcp_queue_entry *qe) > why is the destructor not static? don't know why. it should be static, thanks. https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/3b53c02e_acea9681 PS3, Line 81: { .T = -19, .default_val = 15, .unit = OSMO_TDEF_S, > why some timers have names and some don't? there is no reason why. We use magic numbers for T = N almost everywhere in osmocom. But setting names made me notice a mistake, 27 should be 21, thx https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/c96a3198_e3edf700 PS3, Line 122: /* time() returns seconds since 1970 (UNIX epoch), but the recovery_time_stamp is coded in the NTP format, which is > you can check open5gs code, iirc some stuff exists to handle ntp timestamps and I also added some bi […] i'm pretty unsure about this timestamp coding, just know that wireshark ended up showing the expected date. do you have more specific code pointers? Or even, is there API I can call instead of re-implementing? OTOH the accuracy of the timestamp isn't really important AFAICT, the point of this is to have a unique value per application restart, for peers to detect that the peer has lost its state since last time. It's not critical to get this perfectly accurate, at least not until someone complains about it. https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/06ddc0a1_198c168d PS3, Line 139: unsigned int ep_t1(struct osmo_pfcp_endpoint *ep) > static thx https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/73368fa8_8cb857ce PS3, Line 144: unsigned int ep_keep_resp(struct osmo_pfcp_endpoint *ep) > static thx (I'm dreaming of a tool that tells us which unused #includes we have in .c and .h files, and which functions should be made static because used only in a single .c file... something like this should exist right? maybe the linter has such features??) https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/50760e6b_8c5b55fb PS3, Line 177: static void pfcp_queue_timer_cb(void *data) > Maybe rename to contain "expiry" in it? "timer_cb" is consistent: for example in osmo_fsm, the name is timer_cb, and it means that a timer has expired https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/7cb87127_da5b2dd2 PS3, Line 182: if (qe->m->is_response) { > I see you are basically putting together in the same list 2 different things: […] Let me rephrase your comment: It would be more optimal to have separate lists for requests and responses. You're right, thanks -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ic8d42e201b63064a71b40ca45a5a40e29941e8ac Gerrit-Change-Number: 28244 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 09 Jun 2022 21:46:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-upf[master]: install libosmo-gtlv, libosmo-pfcp
by neels 09 Jun '22

09 Jun '22
Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/28245 ) Change subject: install libosmo-gtlv, libosmo-pfcp ...................................................................... Patch Set 3: (1 comment) Patchset: PS1: > We already discussed some of this and I think it was already agreed we definetly didn't want to move […] Personally, I don't see a need to spend time on moving code between repositories. I also think we have enough separate git repositories already. I am still asking: what is the motivation for a separate repos? It is effort, what is the reward? Why is it important to be discussed now? libosmo-pfcp: comparing to libosmo-mgcp being part of osmo-mgw.git and osmo-stp being part of libosmo-sccp.git. Should those also move? IMHO it is fine in osmo-upf.git. libosmo-tlv: it only makes sense to move it apart from libosmo-pfcp at the time when we start using it for something else than libosmo-pfcp. When that time comes I'd vote for libosmocore.git. If the result of this discussion ends up to create libosmo-pfcp.git, I'd wait until after Harald's vacation. -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I9f4651b6bee457583aba99052dc82bbf675515e6 Gerrit-Change-Number: 28245 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 09 Jun 2022 20:13:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: cbsp: Add enum and value string for Cause
by pespin 09 Jun '22

09 Jun '22
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/libosmocore/+/28258 ) Change subject: cbsp: Add enum and value string for Cause ...................................................................... cbsp: Add enum and value string for Cause Change-Id: I35592bb4fff2e7b442d0e0cd537b66687862baf2 --- M TODO-RELEASE M include/osmocom/gsm/cbsp.h M src/gsm/cbsp.c 3 files changed, 47 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/58/28258/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I35592bb4fff2e7b442d0e0cd537b66687862baf2 Gerrit-Change-Number: 28258 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
Change in libosmocore[master]: cbsp: Add enum and value string for Cause
by pespin 09 Jun '22

09 Jun '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/28258 ) Change subject: cbsp: Add enum and value string for Cause ...................................................................... cbsp: Add enum and value string for Cause Change-Id: I35592bb4fff2e7b442d0e0cd537b66687862baf2 --- M TODO-RELEASE M include/osmocom/gsm/cbsp.h M src/gsm/cbsp.c 3 files changed, 47 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/58/28258/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 9f9f9d9..5f9d6e8 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -12,3 +12,4 @@ libosmogb ABI BREAKAGE Add reset_ack_notification function pointer to struct bssgp_bvc_fsm_ops libosmogsm add API Add rach_tx_integer_raw2val() in gsm_utils.h libosmogsm add API iuup.h +libosmogsm add API cbsp.h enum osmo_cbsp_cause, osmo_cbsp_cause_name(s) diff --git a/include/osmocom/gsm/cbsp.h b/include/osmocom/gsm/cbsp.h index 30a0ec9..49ce245 100644 --- a/include/osmocom/gsm/cbsp.h +++ b/include/osmocom/gsm/cbsp.h @@ -241,6 +241,31 @@ enum cbsp_channel_ind *channel_ind; }; +/* 8.2.13 Cause */ + +enum osmo_cbsp_cause { + OSMO_CBSP_CAUSE_PARAM_NOT_RECOGNISED = 0, + OSMO_CBSP_CAUSE_PARAM_VALUE_INVALID, + OSMO_CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED, + OSMO_CBSP_CAUSE_CELL_ID_NOT_VALID, + OSMO_CBSP_CAUSE_UNRECOGNISED_MESSAGE, + OSMO_CBSP_CAUSE_MISSING_MANDATORY_ELEMENT, + OSMO_CBSP_CAUSE_BSC_CAPACITY_EXCEEDED, + OSMO_CBSP_CAUSE_CELL_MEMORY_EXCEEDED, + OSMO_CBSP_CAUSE_BSC_MEMORY_EXCEEDED, + OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_SUPPORTED, + OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL, + OSMO_CBSP_CAUSE_INCOMPATIBLE_DRX_PARAM, + OSMO_CBSP_CAUSE_EXT_CHAN_NOT_SUPPORTED, + OSMO_CBSP_CAUSE_MSG_REF_ALREADY_USED, + OSMO_CBSP_CAUSE_UNSPECIFIED_ERROR, + OSMO_CBSP_CAUSE_LAI_OR_LAC_NOT_VALID, +}; +extern const struct value_string osmo_cbsp_cause_names[]; +static inline const char *osmo_cbsp_cause_name(enum osmo_cbsp_cause cause) +{ + return get_value_string(osmo_cbsp_cause_names, cause); +} /* decoded CBSP message */ struct osmo_cbsp_decoded { diff --git a/src/gsm/cbsp.c b/src/gsm/cbsp.c index e340ebe..2095003 100644 --- a/src/gsm/cbsp.c +++ b/src/gsm/cbsp.c @@ -1477,4 +1477,25 @@ return rc; } +/*! value_string[] for enum osmo_cbsp_cause. */ +const struct value_string osmo_cbsp_cause_names[] = { + { OSMO_CBSP_CAUSE_PARAM_NOT_RECOGNISED, "Parameter-not-recognised" }, + { OSMO_CBSP_CAUSE_PARAM_VALUE_INVALID, "Parameter-value-invalid" }, + { OSMO_CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED, "Message-reference-not-identified" }, + { OSMO_CBSP_CAUSE_CELL_ID_NOT_VALID, "Cell-identity-not-valid" }, + { OSMO_CBSP_CAUSE_UNRECOGNISED_MESSAGE, "Unrecognised-message" }, + { OSMO_CBSP_CAUSE_MISSING_MANDATORY_ELEMENT, "Missing-mandatory-element" }, + { OSMO_CBSP_CAUSE_BSC_CAPACITY_EXCEEDED, "BSC-capacity-exceeded" }, + { OSMO_CBSP_CAUSE_CELL_MEMORY_EXCEEDED, "Cell-memory-exceeded" }, + { OSMO_CBSP_CAUSE_BSC_MEMORY_EXCEEDED, "BSC-memory-exceeded" }, + { OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_SUPPORTED, "Cell-broadcast-not-supported" }, + { OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL, "Cell-broadcast-not-operational" }, + { OSMO_CBSP_CAUSE_INCOMPATIBLE_DRX_PARAM, "Incompatible-DRX-parameter:"}, + { OSMO_CBSP_CAUSE_EXT_CHAN_NOT_SUPPORTED, "Extended-channel-not-supported"}, + { OSMO_CBSP_CAUSE_MSG_REF_ALREADY_USED, "Message-reference-already-used"}, + { OSMO_CBSP_CAUSE_UNSPECIFIED_ERROR, "Unspecified-error"}, + { OSMO_CBSP_CAUSE_LAI_OR_LAC_NOT_VALID, "LAI-or-LAC-not-valid"}, + { 0, NULL } +}; + #endif /* HAVE_SYS_SOCKET_H */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I35592bb4fff2e7b442d0e0cd537b66687862baf2 Gerrit-Change-Number: 28258 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: src/osmo-bsc/bsc_vty.c: tweak msc pooling strings
by osmith 09 Jun '22

09 Jun '22
Attention is currently required from: osmith. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/28257 to look at the new patch set (#2). Change subject: src/osmo-bsc/bsc_vty.c: tweak msc pooling strings ...................................................................... src/osmo-bsc/bsc_vty.c: tweak msc pooling strings Drop "to this MSC" from the NRI_STR, as it is not only used for MSC specific configuration, but also in cfg_net_nri_* which affect all MSCs. Drop "for this MSC" from the description of cfg_net_nri_null_del, it affects all MSCs (unlike cfg_msc_nri_del). Change-Id: Ic8888775a965b6d607af51b9359bd8ffc2834e16 --- M src/osmo-bsc/bsc_vty.c M tests/nri_cfg.vty 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/57/28257/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic8888775a965b6d607af51b9359bd8ffc2834e16 Gerrit-Change-Number: 28257 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-bsc[master]: src/osmo-bsc/bsc_vty.c: tweak msc pooling strings
by osmith 09 Jun '22

09 Jun '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28257 ) Change subject: src/osmo-bsc/bsc_vty.c: tweak msc pooling strings ...................................................................... src/osmo-bsc/bsc_vty.c: tweak msc pooling strings Drop "to this MSC" from the NRI_STR, as it is not only used for MSC specific configuration, but also in cfg_net_nri_* which affect all MSCs. Drop "for this MSC" from the description of cfg_net_nri_null_del, it affects all MSCs (unlike cfg_msc_nri_del). Change-Id: Ic8888775a965b6d607af51b9359bd8ffc2834e16 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/57/28257/1 diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index fc03c78..fb03d6f 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -1148,7 +1148,7 @@ return CMD_SUCCESS; } -#define NRI_STR "Mapping of Network Resource Indicators to this MSC, for MSC pooling\n" +#define NRI_STR "Mapping of Network Resource Indicators, for MSC pooling\n" #define NULL_NRI_STR "Define NULL-NRI values that cause re-assignment of an MS to a different MSC, for MSC pooling.\n" #define NRI_FIRST_LAST_STR "First value of the NRI value range, should not surpass the configured 'nri bitlen'.\n" \ "Last value of the NRI value range, should not surpass the configured 'nri bitlen' and be larger than the" \ @@ -1195,7 +1195,7 @@ DEFUN_ATTR(cfg_net_nri_null_del, cfg_net_nri_null_del_cmd, "nri null del <0-32767> [<0-32767>]", - NRI_STR NULL_NRI_STR "Remove NRI value or range from the NRI mapping for this MSC\n" + NRI_STR NULL_NRI_STR "Remove NRI value or range from the NRI mapping\n" NRI_FIRST_LAST_STR, CMD_ATTR_IMMEDIATE) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic8888775a965b6d607af51b9359bd8ffc2834e16 Gerrit-Change-Number: 28257 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: Move all SMSCB/CBC vty code to its own file
by pespin 09 Jun '22

09 Jun '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28256 ) Change subject: Move all SMSCB/CBC vty code to its own file ...................................................................... Move all SMSCB/CBC vty code to its own file This way we separate all the VTY boilerplate from the actual logic, as we usually do in all other subsystems. Change-Id: Ifc7d1693d745dd2a3c31e3ee9610d8c634b50812 --- M include/osmocom/bsc/smscb.h M src/osmo-bsc/Makefile.am M src/osmo-bsc/cbsp_link.c M src/osmo-bsc/smscb.c A src/osmo-bsc/smscb_vty.c 5 files changed, 426 insertions(+), 395 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/56/28256/1 diff --git a/include/osmocom/bsc/smscb.h b/include/osmocom/bsc/smscb.h index 0e157c6..03c3bb0 100644 --- a/include/osmocom/bsc/smscb.h +++ b/include/osmocom/bsc/smscb.h @@ -18,7 +18,6 @@ const char *bts_smscb_chan_state_name(const struct bts_smscb_chan_state *cstate); unsigned int bts_smscb_chan_load_percent(const struct bts_smscb_chan_state *cstate); unsigned int bts_smscb_chan_page_count(const struct bts_smscb_chan_state *cstate); -void smscb_vty_init(void); /* cbch_scheduler.c */ int bts_smscb_gen_sched_arr(struct bts_smscb_chan_state *cstate, struct bts_smscb_page ***arr_out); @@ -61,9 +60,12 @@ struct msgb *msg; } client; }; -void cbc_vty_init(void); int bsc_cbc_link_restart(void); int cbsp_tx_decoded(struct bsc_cbc_link *cbc, struct osmo_cbsp_decoded *decoded); void bts_etws_init(struct gsm_bts *bts); void bts_etws_bootstrap(struct gsm_bts *bts); + +/* smscb_vty.c: */ +void smscb_vty_init(void); +void cbc_vty_init(void); diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index 583fb79..557178e 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -106,6 +106,7 @@ system_information.c \ timeslot_fsm.c \ smscb.c \ + smscb_vty.c \ cbch_scheduler.c \ cbsp_link.c \ power_control.c \ diff --git a/src/osmo-bsc/cbsp_link.c b/src/osmo-bsc/cbsp_link.c index 4926799..39798df 100644 --- a/src/osmo-bsc/cbsp_link.c +++ b/src/osmo-bsc/cbsp_link.c @@ -21,7 +21,6 @@ #include <osmocom/bsc/gsm_data.h> -#include <osmocom/bsc/vty.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/smscb.h> #include <osmocom/bsc/bsc_msc_data.h> @@ -320,341 +319,3 @@ talloc_free(cbsp); return 0; } - -static struct bsc_cbc_link *vty_cbc_data(struct vty *vty) -{ - return bsc_gsmnet->cbc; -} - -/********************************************************************************* - * VTY Interface (Configuration + Introspection) - *********************************************************************************/ - -DEFUN(cfg_cbc, cfg_cbc_cmd, - "cbc", "Configure CBSP Link to Cell Broadcast Centre\n") -{ - vty->node = CBC_NODE; - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_mode, cfg_cbc_mode_cmd, - "mode (server|client|disabled)", - "Set OsmoBSC as CBSP server or client\n" - "CBSP Server: listen for inbound TCP connections from a remote Cell Broadcast Centre\n" - "CBSP Client: establish outbound TCP connection to a remote Cell Broadcast Centre\n" - "Disable CBSP link\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - cbc->mode = get_string_value(bsc_cbc_link_mode_names, argv[0]); - OSMO_ASSERT(cbc->mode >= 0); - - /* Immediately restart/stop CBSP only when coming from a telnet session. The settings from the config file take - * effect in osmo_bsc_main.c's invocation of bsc_cbc_link_restart(). */ - if (vty->type != VTY_FILE) - bsc_cbc_link_restart(); - - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_server, cfg_cbc_server_cmd, - "server", "Configure OsmoBSC's CBSP server role\n") -{ - vty->node = CBC_SERVER_NODE; - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_server_local_ip, cfg_cbc_server_local_ip_cmd, - "local-ip " VTY_IPV46_CMD, - "Set IP Address to listen on for inbound CBSP from a Cell Broadcast Centre\n" - "IPv4 address\n" "IPv6 address\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - osmo_sockaddr_str_from_str(&cbc->server.local_addr, argv[0], cbc->server.local_addr.port); - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_server_local_port, cfg_cbc_server_local_port_cmd, - "local-port <1-65535>", - "Set TCP port to listen on for inbound CBSP from a Cell Broadcast Centre\n" - "CBSP port number (Default: " OSMO_STRINGIFY_VAL(CBSP_TCP_PORT) ")\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - cbc->server.local_addr.port = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_client, cfg_cbc_client_cmd, - "client", "Configure OsmoBSC's CBSP client role\n") -{ - vty->node = CBC_CLIENT_NODE; - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_client_remote_ip, cfg_cbc_client_remote_ip_cmd, - "remote-ip " VTY_IPV46_CMD, - "Set IP Address of the Cell Broadcast Centre, to establish CBSP link to\n" - "IPv4 address\n" "IPv6 address\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - osmo_sockaddr_str_from_str(&cbc->client.remote_addr, argv[0], cbc->client.remote_addr.port); - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_client_remote_port, cfg_cbc_client_remote_port_cmd, - "remote-port <1-65535>", - "Set TCP port of the Cell Broadcast Centre, to establish CBSP link to\n" - "CBSP port number (Default: " OSMO_STRINGIFY_VAL(CBSP_TCP_PORT) ")\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - cbc->client.remote_addr.port = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_client_local_ip, cfg_cbc_client_local_ip_cmd, - "local-ip " VTY_IPV46_CMD, - "Set local bind address for the outbound CBSP link to the Cell Broadcast Centre\n" - "IPv4 address\n" "IPv6 address\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - osmo_sockaddr_str_from_str(&cbc->client.local_addr, argv[0], cbc->client.local_addr.port); - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_client_local_port, cfg_cbc_client_local_port_cmd, - "local-port <1-65535>", - "Set local bind port for the outbound CBSP link to the Cell Broadcast Centre\n" - "port number\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - cbc->client.local_addr.port = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_client_no_local_ip, cfg_cbc_client_no_local_ip_cmd, - "no local-ip", - NO_STR "Remove local IP address bind config for the CBSP client mode\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - cbc->client.local_addr = (struct osmo_sockaddr_str){ .port = cbc->client.local_addr.port }; - return CMD_SUCCESS; -} - -DEFUN(cfg_cbc_client_no_local_port, cfg_cbc_client_no_local_port_cmd, - "no local-port", - NO_STR "Remove local TCP port bind config for the CBSP client mode\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - cbc->client.local_addr.port = 0; - return CMD_SUCCESS; -} - -static struct cmd_node cbc_node = { - CBC_NODE, - "%s(config-cbc)# ", - 1, -}; - -static struct cmd_node cbc_server_node = { - CBC_SERVER_NODE, - "%s(config-cbc-server)# ", - 1, -}; - -static struct cmd_node cbc_client_node = { - CBC_CLIENT_NODE, - "%s(config-cbc-client)# ", - 1, -}; - -static int config_write_cbc(struct vty *vty) -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - - bool default_server_local; - bool default_client_remote; - bool default_client_local; - - default_server_local = !osmo_sockaddr_str_cmp(&cbc->server.local_addr, - &bsc_cbc_default_server_local_addr); - default_client_remote = !osmo_sockaddr_str_is_set(&cbc->client.remote_addr); - default_client_local = !osmo_sockaddr_str_is_set(&cbc->client.local_addr); - - /* If all reflects default values, skip the 'cbc' section */ - if (cbc->mode == BSC_CBC_LINK_MODE_DISABLED - && default_server_local - && default_client_remote && default_client_local) - return 0; - - vty_out(vty, "cbc%s", VTY_NEWLINE); - vty_out(vty, " mode %s%s", bsc_cbc_link_mode_name(cbc->mode), VTY_NEWLINE); - - if (!default_server_local) { - vty_out(vty, " server%s", VTY_NEWLINE); - - if (strcmp(cbc->server.local_addr.ip, bsc_cbc_default_server_local_addr.ip)) - vty_out(vty, " local-ip %s%s", cbc->server.local_addr.ip, VTY_NEWLINE); - if (cbc->server.local_addr.port != bsc_cbc_default_server_local_addr.port) - vty_out(vty, " local-port %u%s", cbc->server.local_addr.port, VTY_NEWLINE); - } - - if (!(default_client_remote && default_client_local)) { - vty_out(vty, " client%s", VTY_NEWLINE); - - if (osmo_sockaddr_str_is_set(&cbc->client.remote_addr)) { - vty_out(vty, " remote-ip %s%s", cbc->client.remote_addr.ip, VTY_NEWLINE); - if (cbc->client.remote_addr.port != CBSP_TCP_PORT) - vty_out(vty, " remote-port %u%s", cbc->client.remote_addr.port, VTY_NEWLINE); - } - - if (cbc->client.local_addr.ip[0]) - vty_out(vty, " local-ip %s%s", cbc->client.local_addr.ip, VTY_NEWLINE); - if (cbc->client.local_addr.port) - vty_out(vty, " local-port %u%s", cbc->client.local_addr.port, VTY_NEWLINE); - } - - return 0; -} - -DEFUN(show_cbc, show_cbc_cmd, - "show cbc", - SHOW_STR "Display state of CBC / CBSP\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - - switch (cbc->mode) { - case BSC_CBC_LINK_MODE_DISABLED: - vty_out(vty, "CBSP link is disabled%s", VTY_NEWLINE); - break; - - case BSC_CBC_LINK_MODE_SERVER: - vty_out(vty, "OsmoBSC is configured as CBSP Server on " OSMO_SOCKADDR_STR_FMT "%s", - OSMO_SOCKADDR_STR_FMT_ARGS(&cbc->server.local_addr), VTY_NEWLINE); - vty_out(vty, "CBSP Server Connection: %s%s", - cbc->server.sock_name ? cbc->server.sock_name : "Disconnected", VTY_NEWLINE); - break; - - case BSC_CBC_LINK_MODE_CLIENT: - vty_out(vty, "OsmoBSC is configured as CBSP Client to remote CBC at " OSMO_SOCKADDR_STR_FMT "%s", - OSMO_SOCKADDR_STR_FMT_ARGS(&cbc->client.remote_addr), VTY_NEWLINE); - vty_out(vty, "CBSP Client Connection: %s%s", - cbc->client.sock_name ? cbc->client.sock_name : "Disconnected", VTY_NEWLINE); - break; - } - return CMD_SUCCESS; -} - -/* --- Deprecated 'cbc' commands for backwards compat --- */ - -DEFUN_DEPRECATED(cfg_cbc_remote_ip, cfg_cbc_remote_ip_cmd, - "remote-ip A.B.C.D", - "IP Address of the Cell Broadcast Centre\n" - "IP Address of the Cell Broadcast Centre\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - vty_out(vty, "%% cbc/remote-ip config is deprecated, instead use cbc/client/remote-ip and cbc/ mode%s", - VTY_NEWLINE); - osmo_sockaddr_str_from_str(&cbc->client.remote_addr, argv[0], cbc->client.remote_addr.port); - cbc->mode = BSC_CBC_LINK_MODE_CLIENT; - if (vty->type != VTY_FILE) - bsc_cbc_link_restart(); - return CMD_SUCCESS; -} -DEFUN_DEPRECATED(cfg_cbc_no_remote_ip, cfg_cbc_no_remote_ip_cmd, - "no remote-ip", - NO_STR "Remove IP address of CBC; disables outbound CBSP connections\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - vty_out(vty, "%% cbc/remote-ip config is deprecated, instead use cbc/client/remote-ip and cbc/mode%s", - VTY_NEWLINE); - if (cbc->mode == BSC_CBC_LINK_MODE_CLIENT) { - cbc->mode = BSC_CBC_LINK_MODE_DISABLED; - if (vty->type != VTY_FILE) - bsc_cbc_link_restart(); - } - return CMD_SUCCESS; -} - -DEFUN_DEPRECATED(cfg_cbc_remote_port, cfg_cbc_remote_port_cmd, - "remote-port <1-65535>", - "TCP Port number of the Cell Broadcast Centre (Default: 48049)\n" - "TCP Port number of the Cell Broadcast Centre (Default: 48049)\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - vty_out(vty, "%% cbc/remote-port config is deprecated, instead use cbc/client/remote-port%s", - VTY_NEWLINE); - cbc->client.remote_addr.port = atoi(argv[0]); - return CMD_SUCCESS; -} - -DEFUN_DEPRECATED(cfg_cbc_listen_port, cfg_cbc_listen_port_cmd, - "listen-port <1-65535>", - "Local TCP port at which BSC listens for incoming CBSP connections from CBC\n" - "Local TCP port at which BSC listens for incoming CBSP connections from CBC\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - vty_out(vty, "%% cbc/listen-port config is deprecated, instead use cbc/server/local-port and cbc/mode%s", - VTY_NEWLINE); - cbc->mode = BSC_CBC_LINK_MODE_SERVER; - cbc->server.local_addr.port = atoi(argv[0]); - if (vty->type != VTY_FILE) - bsc_cbc_link_restart(); - return CMD_SUCCESS; -} - -DEFUN_DEPRECATED(cfg_cbc_no_listen_port, cfg_cbc_no_listen_port_cmd, - "no listen-port", - NO_STR "Remove CBSP Listen Port; disables inbound CBSP connections\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - vty_out(vty, "%% cbc/listen-port config is deprecated, instead use cbc/server/local-port and cbc/mode%s", - VTY_NEWLINE); - if (cbc->mode == BSC_CBC_LINK_MODE_SERVER) { - cbc->mode = BSC_CBC_LINK_MODE_DISABLED; - if (vty->type != VTY_FILE) - bsc_cbc_link_restart(); - } - return CMD_SUCCESS; -} - -DEFUN_DEPRECATED(cfg_cbc_listen_ip, cfg_cbc_listen_ip_cmd, - "listen-ip A.B.C.D", - "Local IP Address where BSC listens for incoming CBC connections (Default: 127.0.0.1)\n" - "Local IP Address where BSC listens for incoming CBC connections\n") -{ - struct bsc_cbc_link *cbc = vty_cbc_data(vty); - vty_out(vty, "%% cbc/listen-ip config is deprecated, instead use cbc/server/local-ip%s", - VTY_NEWLINE); - osmo_sockaddr_str_from_str(&cbc->server.local_addr, argv[0], cbc->server.local_addr.port); - return CMD_SUCCESS; -} - -void cbc_vty_init(void) -{ - install_element_ve(&show_cbc_cmd); - - install_element(CONFIG_NODE, &cfg_cbc_cmd); - install_node(&cbc_node, config_write_cbc); - install_element(CBC_NODE, &cfg_cbc_mode_cmd); - - install_element(CBC_NODE, &cfg_cbc_server_cmd); - install_node(&cbc_server_node, NULL); - install_element(CBC_SERVER_NODE, &cfg_cbc_server_local_ip_cmd); - install_element(CBC_SERVER_NODE, &cfg_cbc_server_local_port_cmd); - - install_element(CBC_NODE, &cfg_cbc_client_cmd); - install_node(&cbc_client_node, NULL); - install_element(CBC_CLIENT_NODE, &cfg_cbc_client_remote_ip_cmd); - install_element(CBC_CLIENT_NODE, &cfg_cbc_client_remote_port_cmd); - install_element(CBC_CLIENT_NODE, &cfg_cbc_client_local_ip_cmd); - install_element(CBC_CLIENT_NODE, &cfg_cbc_client_local_port_cmd); - install_element(CBC_CLIENT_NODE, &cfg_cbc_client_no_local_ip_cmd); - install_element(CBC_CLIENT_NODE, &cfg_cbc_client_no_local_port_cmd); - - /* Deprecated, for backwards compat */ - install_element(CBC_NODE, &cfg_cbc_remote_ip_cmd); - install_element(CBC_NODE, &cfg_cbc_no_remote_ip_cmd); - install_element(CBC_NODE, &cfg_cbc_remote_port_cmd); - install_element(CBC_NODE, &cfg_cbc_listen_port_cmd); - install_element(CBC_NODE, &cfg_cbc_no_listen_port_cmd); - install_element(CBC_NODE, &cfg_cbc_listen_ip_cmd); -} diff --git a/src/osmo-bsc/smscb.c b/src/osmo-bsc/smscb.c index 8e2eb0c..193dc4e 100644 --- a/src/osmo-bsc/smscb.c +++ b/src/osmo-bsc/smscb.c @@ -38,7 +38,6 @@ #include <osmocom/bsc/debug.h> #include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/smscb.h> -#include <osmocom/bsc/vty.h> #include <osmocom/bsc/gsm_04_08_rr.h> #include <osmocom/bsc/lchan_fsm.h> #include <osmocom/bsc/abis_rsl.h> @@ -1026,59 +1025,6 @@ return rc; } -/********************************************************************************* - * VTY Interface (Introspection) - *********************************************************************************/ - -static void vty_dump_smscb_chan_state(struct vty *vty, const struct bts_smscb_chan_state *cs) -{ - const struct bts_smscb_message *sm; - - vty_out(vty, "%s CBCH:%s", cs == &cs->bts->cbch_basic ? "BASIC" : "EXTENDED", VTY_NEWLINE); - - vty_out(vty, " MsgId | SerNo | Pg | Category | Perd | #Tx | #Req | DCS%s", VTY_NEWLINE); - vty_out(vty, "-------|-------|----|---------------|------|------|------|----%s", VTY_NEWLINE); - llist_for_each_entry(sm, &cs->messages, list) { - vty_out(vty, " %04x | %04x | %2u | %13s | %4u | %4u | %4u | %02x%s", - sm->input.msg_id, sm->input.serial_nr, sm->num_pages, - get_value_string(cbsp_category_names, sm->input.category), - sm->input.rep_period, sm->bcast_count, sm->input.num_bcast_req, - sm->input.dcs, VTY_NEWLINE); - } - vty_out(vty, "%s", VTY_NEWLINE); -} - -DEFUN(bts_show_cbs, bts_show_cbs_cmd, - "show bts <0-255> smscb [(basic|extended)]", - SHOW_STR "Display information about a BTS\n" "BTS number\n" - "SMS Cell Broadcast State\n" - "Show only information related to CBCH BASIC\n" - "Show only information related to CBCH EXTENDED\n") -{ - struct gsm_network *net = gsmnet_from_vty(vty); - int bts_nr = atoi(argv[0]); - struct gsm_bts *bts; - - if (bts_nr >= net->num_bts) { - vty_out(vty, "%% can't find BTS '%s'%s", argv[0], VTY_NEWLINE); - return CMD_WARNING; - } - bts = gsm_bts_num(net, bts_nr); - - if (argc < 2 || !strcmp(argv[1], "basic")) - vty_dump_smscb_chan_state(vty, &bts->cbch_basic); - if (argc < 2 || !strcmp(argv[1], "extended")) - vty_dump_smscb_chan_state(vty, &bts->cbch_extended); - - return CMD_SUCCESS; -} - -void smscb_vty_init(void) -{ - install_element_ve(&bts_show_cbs_cmd); -} - - /* initialize the ETWS state of a BTS */ void bts_etws_init(struct gsm_bts *bts) { diff --git a/src/osmo-bsc/smscb_vty.c b/src/osmo-bsc/smscb_vty.c new file mode 100644 index 0000000..b13d2db --- /dev/null +++ b/src/osmo-bsc/smscb_vty.c @@ -0,0 +1,421 @@ +/* CBSP (Cell Broadcast Service Protocol) Handling for OsmoBSC */ +/* + * (C) 2019 by Harald Welte <laforge(a)gnumonks.org> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + +#include <osmocom/bsc/gsm_data.h> +#include <osmocom/bsc/vty.h> +#include <osmocom/bsc/debug.h> +#include <osmocom/bsc/smscb.h> +#include <osmocom/bsc/bsc_msc_data.h> +#include <osmocom/bsc/bts.h> + +#include <osmocom/core/talloc.h> +#include <osmocom/core/socket.h> +#include <osmocom/gsm/cbsp.h> + +/********************************************************************************* + * cbc + *********************************************************************************/ +static struct bsc_cbc_link *vty_cbc_data(struct vty *vty) +{ + return bsc_gsmnet->cbc; +} + +DEFUN(cfg_cbc, cfg_cbc_cmd, + "cbc", "Configure CBSP Link to Cell Broadcast Centre\n") +{ + vty->node = CBC_NODE; + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_mode, cfg_cbc_mode_cmd, + "mode (server|client|disabled)", + "Set OsmoBSC as CBSP server or client\n" + "CBSP Server: listen for inbound TCP connections from a remote Cell Broadcast Centre\n" + "CBSP Client: establish outbound TCP connection to a remote Cell Broadcast Centre\n" + "Disable CBSP link\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + cbc->mode = get_string_value(bsc_cbc_link_mode_names, argv[0]); + OSMO_ASSERT(cbc->mode >= 0); + + /* Immediately restart/stop CBSP only when coming from a telnet session. The settings from the config file take + * effect in osmo_bsc_main.c's invocation of bsc_cbc_link_restart(). */ + if (vty->type != VTY_FILE) + bsc_cbc_link_restart(); + + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_server, cfg_cbc_server_cmd, + "server", "Configure OsmoBSC's CBSP server role\n") +{ + vty->node = CBC_SERVER_NODE; + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_server_local_ip, cfg_cbc_server_local_ip_cmd, + "local-ip " VTY_IPV46_CMD, + "Set IP Address to listen on for inbound CBSP from a Cell Broadcast Centre\n" + "IPv4 address\n" "IPv6 address\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + osmo_sockaddr_str_from_str(&cbc->server.local_addr, argv[0], cbc->server.local_addr.port); + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_server_local_port, cfg_cbc_server_local_port_cmd, + "local-port <1-65535>", + "Set TCP port to listen on for inbound CBSP from a Cell Broadcast Centre\n" + "CBSP port number (Default: " OSMO_STRINGIFY_VAL(CBSP_TCP_PORT) ")\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + cbc->server.local_addr.port = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_client, cfg_cbc_client_cmd, + "client", "Configure OsmoBSC's CBSP client role\n") +{ + vty->node = CBC_CLIENT_NODE; + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_client_remote_ip, cfg_cbc_client_remote_ip_cmd, + "remote-ip " VTY_IPV46_CMD, + "Set IP Address of the Cell Broadcast Centre, to establish CBSP link to\n" + "IPv4 address\n" "IPv6 address\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + osmo_sockaddr_str_from_str(&cbc->client.remote_addr, argv[0], cbc->client.remote_addr.port); + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_client_remote_port, cfg_cbc_client_remote_port_cmd, + "remote-port <1-65535>", + "Set TCP port of the Cell Broadcast Centre, to establish CBSP link to\n" + "CBSP port number (Default: " OSMO_STRINGIFY_VAL(CBSP_TCP_PORT) ")\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + cbc->client.remote_addr.port = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_client_local_ip, cfg_cbc_client_local_ip_cmd, + "local-ip " VTY_IPV46_CMD, + "Set local bind address for the outbound CBSP link to the Cell Broadcast Centre\n" + "IPv4 address\n" "IPv6 address\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + osmo_sockaddr_str_from_str(&cbc->client.local_addr, argv[0], cbc->client.local_addr.port); + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_client_local_port, cfg_cbc_client_local_port_cmd, + "local-port <1-65535>", + "Set local bind port for the outbound CBSP link to the Cell Broadcast Centre\n" + "port number\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + cbc->client.local_addr.port = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_client_no_local_ip, cfg_cbc_client_no_local_ip_cmd, + "no local-ip", + NO_STR "Remove local IP address bind config for the CBSP client mode\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + cbc->client.local_addr = (struct osmo_sockaddr_str){ .port = cbc->client.local_addr.port }; + return CMD_SUCCESS; +} + +DEFUN(cfg_cbc_client_no_local_port, cfg_cbc_client_no_local_port_cmd, + "no local-port", + NO_STR "Remove local TCP port bind config for the CBSP client mode\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + cbc->client.local_addr.port = 0; + return CMD_SUCCESS; +} + +static struct cmd_node cbc_node = { + CBC_NODE, + "%s(config-cbc)# ", + 1, +}; + +static struct cmd_node cbc_server_node = { + CBC_SERVER_NODE, + "%s(config-cbc-server)# ", + 1, +}; + +static struct cmd_node cbc_client_node = { + CBC_CLIENT_NODE, + "%s(config-cbc-client)# ", + 1, +}; + +static int config_write_cbc(struct vty *vty) +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + + bool default_server_local; + bool default_client_remote; + bool default_client_local; + + default_server_local = !osmo_sockaddr_str_cmp(&cbc->server.local_addr, + &bsc_cbc_default_server_local_addr); + default_client_remote = !osmo_sockaddr_str_is_set(&cbc->client.remote_addr); + default_client_local = !osmo_sockaddr_str_is_set(&cbc->client.local_addr); + + /* If all reflects default values, skip the 'cbc' section */ + if (cbc->mode == BSC_CBC_LINK_MODE_DISABLED + && default_server_local + && default_client_remote && default_client_local) + return 0; + + vty_out(vty, "cbc%s", VTY_NEWLINE); + vty_out(vty, " mode %s%s", bsc_cbc_link_mode_name(cbc->mode), VTY_NEWLINE); + + if (!default_server_local) { + vty_out(vty, " server%s", VTY_NEWLINE); + + if (strcmp(cbc->server.local_addr.ip, bsc_cbc_default_server_local_addr.ip)) + vty_out(vty, " local-ip %s%s", cbc->server.local_addr.ip, VTY_NEWLINE); + if (cbc->server.local_addr.port != bsc_cbc_default_server_local_addr.port) + vty_out(vty, " local-port %u%s", cbc->server.local_addr.port, VTY_NEWLINE); + } + + if (!(default_client_remote && default_client_local)) { + vty_out(vty, " client%s", VTY_NEWLINE); + + if (osmo_sockaddr_str_is_set(&cbc->client.remote_addr)) { + vty_out(vty, " remote-ip %s%s", cbc->client.remote_addr.ip, VTY_NEWLINE); + if (cbc->client.remote_addr.port != CBSP_TCP_PORT) + vty_out(vty, " remote-port %u%s", cbc->client.remote_addr.port, VTY_NEWLINE); + } + + if (cbc->client.local_addr.ip[0]) + vty_out(vty, " local-ip %s%s", cbc->client.local_addr.ip, VTY_NEWLINE); + if (cbc->client.local_addr.port) + vty_out(vty, " local-port %u%s", cbc->client.local_addr.port, VTY_NEWLINE); + } + + return 0; +} + +DEFUN(show_cbc, show_cbc_cmd, + "show cbc", + SHOW_STR "Display state of CBC / CBSP\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + + switch (cbc->mode) { + case BSC_CBC_LINK_MODE_DISABLED: + vty_out(vty, "CBSP link is disabled%s", VTY_NEWLINE); + break; + + case BSC_CBC_LINK_MODE_SERVER: + vty_out(vty, "OsmoBSC is configured as CBSP Server on " OSMO_SOCKADDR_STR_FMT "%s", + OSMO_SOCKADDR_STR_FMT_ARGS(&cbc->server.local_addr), VTY_NEWLINE); + vty_out(vty, "CBSP Server Connection: %s%s", + cbc->server.sock_name ? cbc->server.sock_name : "Disconnected", VTY_NEWLINE); + break; + + case BSC_CBC_LINK_MODE_CLIENT: + vty_out(vty, "OsmoBSC is configured as CBSP Client to remote CBC at " OSMO_SOCKADDR_STR_FMT "%s", + OSMO_SOCKADDR_STR_FMT_ARGS(&cbc->client.remote_addr), VTY_NEWLINE); + vty_out(vty, "CBSP Client Connection: %s%s", + cbc->client.sock_name ? cbc->client.sock_name : "Disconnected", VTY_NEWLINE); + break; + } + return CMD_SUCCESS; +} + +/* --- Deprecated 'cbc' commands for backwards compat --- */ + +DEFUN_DEPRECATED(cfg_cbc_remote_ip, cfg_cbc_remote_ip_cmd, + "remote-ip A.B.C.D", + "IP Address of the Cell Broadcast Centre\n" + "IP Address of the Cell Broadcast Centre\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + vty_out(vty, "%% cbc/remote-ip config is deprecated, instead use cbc/client/remote-ip and cbc/ mode%s", + VTY_NEWLINE); + osmo_sockaddr_str_from_str(&cbc->client.remote_addr, argv[0], cbc->client.remote_addr.port); + cbc->mode = BSC_CBC_LINK_MODE_CLIENT; + if (vty->type != VTY_FILE) + bsc_cbc_link_restart(); + return CMD_SUCCESS; +} +DEFUN_DEPRECATED(cfg_cbc_no_remote_ip, cfg_cbc_no_remote_ip_cmd, + "no remote-ip", + NO_STR "Remove IP address of CBC; disables outbound CBSP connections\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + vty_out(vty, "%% cbc/remote-ip config is deprecated, instead use cbc/client/remote-ip and cbc/mode%s", + VTY_NEWLINE); + if (cbc->mode == BSC_CBC_LINK_MODE_CLIENT) { + cbc->mode = BSC_CBC_LINK_MODE_DISABLED; + if (vty->type != VTY_FILE) + bsc_cbc_link_restart(); + } + return CMD_SUCCESS; +} + +DEFUN_DEPRECATED(cfg_cbc_remote_port, cfg_cbc_remote_port_cmd, + "remote-port <1-65535>", + "TCP Port number of the Cell Broadcast Centre (Default: 48049)\n" + "TCP Port number of the Cell Broadcast Centre (Default: 48049)\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + vty_out(vty, "%% cbc/remote-port config is deprecated, instead use cbc/client/remote-port%s", + VTY_NEWLINE); + cbc->client.remote_addr.port = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN_DEPRECATED(cfg_cbc_listen_port, cfg_cbc_listen_port_cmd, + "listen-port <1-65535>", + "Local TCP port at which BSC listens for incoming CBSP connections from CBC\n" + "Local TCP port at which BSC listens for incoming CBSP connections from CBC\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + vty_out(vty, "%% cbc/listen-port config is deprecated, instead use cbc/server/local-port and cbc/mode%s", + VTY_NEWLINE); + cbc->mode = BSC_CBC_LINK_MODE_SERVER; + cbc->server.local_addr.port = atoi(argv[0]); + if (vty->type != VTY_FILE) + bsc_cbc_link_restart(); + return CMD_SUCCESS; +} + +DEFUN_DEPRECATED(cfg_cbc_no_listen_port, cfg_cbc_no_listen_port_cmd, + "no listen-port", + NO_STR "Remove CBSP Listen Port; disables inbound CBSP connections\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + vty_out(vty, "%% cbc/listen-port config is deprecated, instead use cbc/server/local-port and cbc/mode%s", + VTY_NEWLINE); + if (cbc->mode == BSC_CBC_LINK_MODE_SERVER) { + cbc->mode = BSC_CBC_LINK_MODE_DISABLED; + if (vty->type != VTY_FILE) + bsc_cbc_link_restart(); + } + return CMD_SUCCESS; +} + +DEFUN_DEPRECATED(cfg_cbc_listen_ip, cfg_cbc_listen_ip_cmd, + "listen-ip A.B.C.D", + "Local IP Address where BSC listens for incoming CBC connections (Default: 127.0.0.1)\n" + "Local IP Address where BSC listens for incoming CBC connections\n") +{ + struct bsc_cbc_link *cbc = vty_cbc_data(vty); + vty_out(vty, "%% cbc/listen-ip config is deprecated, instead use cbc/server/local-ip%s", + VTY_NEWLINE); + osmo_sockaddr_str_from_str(&cbc->server.local_addr, argv[0], cbc->server.local_addr.port); + return CMD_SUCCESS; +} + +void cbc_vty_init(void) +{ + install_element_ve(&show_cbc_cmd); + + install_element(CONFIG_NODE, &cfg_cbc_cmd); + install_node(&cbc_node, config_write_cbc); + install_element(CBC_NODE, &cfg_cbc_mode_cmd); + + install_element(CBC_NODE, &cfg_cbc_server_cmd); + install_node(&cbc_server_node, NULL); + install_element(CBC_SERVER_NODE, &cfg_cbc_server_local_ip_cmd); + install_element(CBC_SERVER_NODE, &cfg_cbc_server_local_port_cmd); + + install_element(CBC_NODE, &cfg_cbc_client_cmd); + install_node(&cbc_client_node, NULL); + install_element(CBC_CLIENT_NODE, &cfg_cbc_client_remote_ip_cmd); + install_element(CBC_CLIENT_NODE, &cfg_cbc_client_remote_port_cmd); + install_element(CBC_CLIENT_NODE, &cfg_cbc_client_local_ip_cmd); + install_element(CBC_CLIENT_NODE, &cfg_cbc_client_local_port_cmd); + install_element(CBC_CLIENT_NODE, &cfg_cbc_client_no_local_ip_cmd); + install_element(CBC_CLIENT_NODE, &cfg_cbc_client_no_local_port_cmd); + + /* Deprecated, for backwards compat */ + install_element(CBC_NODE, &cfg_cbc_remote_ip_cmd); + install_element(CBC_NODE, &cfg_cbc_no_remote_ip_cmd); + install_element(CBC_NODE, &cfg_cbc_remote_port_cmd); + install_element(CBC_NODE, &cfg_cbc_listen_port_cmd); + install_element(CBC_NODE, &cfg_cbc_no_listen_port_cmd); + install_element(CBC_NODE, &cfg_cbc_listen_ip_cmd); +} + + +/********************************************************************************* + * smscb + *********************************************************************************/ +static void vty_dump_smscb_chan_state(struct vty *vty, const struct bts_smscb_chan_state *cs) +{ + const struct bts_smscb_message *sm; + + vty_out(vty, "%s CBCH:%s", cs == &cs->bts->cbch_basic ? "BASIC" : "EXTENDED", VTY_NEWLINE); + + vty_out(vty, " MsgId | SerNo | Pg | Category | Perd | #Tx | #Req | DCS%s", VTY_NEWLINE); + vty_out(vty, "-------|-------|----|---------------|------|------|------|----%s", VTY_NEWLINE); + llist_for_each_entry(sm, &cs->messages, list) { + vty_out(vty, " %04x | %04x | %2u | %13s | %4u | %4u | %4u | %02x%s", + sm->input.msg_id, sm->input.serial_nr, sm->num_pages, + get_value_string(cbsp_category_names, sm->input.category), + sm->input.rep_period, sm->bcast_count, sm->input.num_bcast_req, + sm->input.dcs, VTY_NEWLINE); + } + vty_out(vty, "%s", VTY_NEWLINE); +} + +DEFUN(bts_show_cbs, bts_show_cbs_cmd, + "show bts <0-255> smscb [(basic|extended)]", + SHOW_STR "Display information about a BTS\n" "BTS number\n" + "SMS Cell Broadcast State\n" + "Show only information related to CBCH BASIC\n" + "Show only information related to CBCH EXTENDED\n") +{ + struct gsm_network *net = gsmnet_from_vty(vty); + int bts_nr = atoi(argv[0]); + struct gsm_bts *bts; + + if (bts_nr >= net->num_bts) { + vty_out(vty, "%% can't find BTS '%s'%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + bts = gsm_bts_num(net, bts_nr); + + if (argc < 2 || !strcmp(argv[1], "basic")) + vty_dump_smscb_chan_state(vty, &bts->cbch_basic); + if (argc < 2 || !strcmp(argv[1], "extended")) + vty_dump_smscb_chan_state(vty, &bts->cbch_extended); + + return CMD_SUCCESS; +} + +void smscb_vty_init(void) +{ + install_element_ve(&bts_show_cbs_cmd); +} -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ifc7d1693d745dd2a3c31e3ee9610d8c634b50812 Gerrit-Change-Number: 28256 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: hnodeb: Update primitives to audio SAPI version 1
by pespin 09 Jun '22

09 Jun '22
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28253 to look at the new patch set (#2). Change subject: hnodeb: Update primitives to audio SAPI version 1 ...................................................................... hnodeb: Update primitives to audio SAPI version 1 Audio SAPI version 1 has been added recently in osmo-hnodeb.git I860d18b80c1041bf63a1570d435e0568c0f6b01b. Let's update our HNBLLIF emulation to support and use it. Related: SYS#5516 Change-Id: I9af56f5e6a70b350f2fffa2e04be384d101b52ed --- M hnodeb/HNBGW_ConnectionHandler.ttcn M library/HNBLLIF_Templates.ttcn M library/HNBLLIF_Types.ttcn 3 files changed, 19 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/53/28253/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9af56f5e6a70b350f2fffa2e04be384d101b52ed Gerrit-Change-Number: 28253 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • ...
  • 138
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.