Bug #5085
closedns2: improve vty `show ns` to show if a NSVC is locally blocked or by the remote
100%
Description
When a NSVC has been blocked, the vty doesn't show if it's blocked because a local O&M blocked it (by vty) or because the other side has blocked it.
Related issues
Updated by pespin almost 2 years ago
- Related to Bug #4797: vty: the output of 'show ns' command is confusing added
Updated by laforge over 1 year ago
- Tags set to simple
- Assignee changed from lynxis to arehbein
Updated by arehbein over 1 year ago
(Note: The following comment may or may not be out of date, I'll leave it here for now)
So, I'm currently working on this while waiting for a reply on #5208 , and while I'm not stuck, I wonder if it might be very easy for someone more experienced with this codebase to give me a good pointer...
I'm looking at the code for `show ns` in `libosmocore/src/gb/gprs_ns2_vty.c` and as of now my problem is that from what I can tell the closest to the information we want to print out is a pointer to a `struct gprs_ns2_vc_bind`.
However what we really want is information from the `struct osmo_fsm_inst` field `priv`, which - only in `src/gb/gprs_ns2_vc_fsm.c` - is accessible as a pointer to `struct gprs_ns2_vc_priv`.
There we can find `om_blocked`, and the `state` field telling us if the NSVC is blocked can be found in the `struct osmo_fsm_inst` it came from.
Now my approach would be to find the lines of code where the `nsi` field from the `struct gprs_ns2_vc_bind` is set - based on the assumption, that there, the `struct osmo_fsm_inst` it came from, must be referenced - maybe I'll find it quickly but maybe somebody already knows where it is set so I can save some time.-+
Updated by arehbein over 1 year ago
I've gone for a new approach (very briefly: Make the 'om_blocked' field part of the FSM struct, don't hide it in 'priv')
Updated by arehbein over 1 year ago
lynxis, I have a patch, do you have any recommendations on where to find/how to quickly set up a multicomponent setup, that includes NSVCs (and an easy way to block them), so I can try the 'show ns' output?
I can get the BSC alone to run, but then 'show ns' has nothing to print.
Updated by lynxis over 1 year ago
@arehbein I would recommend using the osmo-nsdummy utility. You have to compile libosmocore with --enable-external-tests.
libosmocore/src/utils/osmo-ns-dummy (it won't be installed).
Then you can start 2x osmo-ns-dummy and configure to connect to each other. I would recommend using ip.access style configuration.
(Taken from ttcn3 tests)
(-p vty port)
./osmo-ns-dummy -p 4240 ./config-a.cfg
./osmo-ns-dummy -p 4241 ./config-b.cfg
ns bind udp local listen 127.0.0.1 23000 accept-ipaccess bind udp local2 listen 127.0.0.1 23001 accept-ipaccess
ns bind udp local listen 127.0.0.1 22000 bind udp local2 listen 127.0.0.1 22001 nse 1234 nsvc ipa local 127.0.0.1 23000 nsvci 1234 nsvc ipa local2 127.0.0.1 23001 nsvci 1235
Updated by laforge over 1 year ago
arehbein wrote in #note-7:
I can get the BSC alone to run, but then 'show ns' has nothing to print.
The BSC is not involved in NS. osmo-pcu, osmo-sgsn and osmo-gbproxy are the network elements implementing NS (well, all using libosmogb for doing that in reality).
Updated by arehbein over 1 year ago
- Status changed from New to Feedback
- % Done changed from 80 to 100