I have some questions:
1) When I start bsc_hack bsc_init.c first establishes OML link and
initializes the bts then it establishes RSL link and bts starts
broadcasting. However, it takes so much time to start the bts. Instead of
this I want to do the following: it establishes OML link at the beginning
and only once, then when i want to start broadcasting it establishes just
the RSL link and bts will start faster since i don't have to wait for OML
link. What should be done for this?
2) If i send one or two word messages from telnet interface it is okay. But
if i send a longer message the phone could't receive the end of the message
correctly(last words may be incomplete). Did any one encounter with this
problem? What is wrong with me?
3) Could I send SMS in which extension of the sender is text not integer.
For example, i want to send an information SMS that this is a test network.
For this purpose i want to send an SMS from 'OpenBSC'. I set the extension
of the first subscriber in database as text and tried to send the SMS but
SMS wasn't delivered. What should i do?
4) Can i add SMS externally to SMS table of database?
Thanks.
Jason
Hi all,
i compiled and configured all (mISDN, lcr, asterisk, etc...), unfortunately, when i try to place a call from the softphone to the MS, i can ear only the voice originated from the laptop to the MS and not viceversa.
I'm using it on an Ubuntu 10.4, Asterisk 1.6.2.5 and the others sources from "last git".
Configurations:
- extension.conf: http://pastebin.com/mHH46HbQ
- sip.conf: http://pastebin.com/SkPN3z6q
- gsm.conf: http://pastebin.com/C1Eckdgh
- interface.conf: http://pastebin.com/ctGapa1F
- options.conf: http://pastebin.com/6xhgL0P1
- routing.conf: http://pastebin.com/TVNvwTEB
Logs:
- osmo-nitb's log: http://pastebin.com/X10B5NjE
- lcr's log: http://pastebin.com/uLY9VAiB
- Asterisk's log: http://pastebin.com/8qzw6aMn
As you can see from Asterisk, there is a mismatch:
"NOTICE[2315]: channel.c:2960 __ast_read: Dropping incompatible voice frame on lcr/1 of format alaw since our native format has changed to 0x0 (nothing) "
I tried to set alaw / ulaw on the configurations, to change efr, fr and amr, but it didn't change nothing.
Ideas or hints for further investigations are welcome.
Regards,
Luca
Hi Jolly, all,
I spent some time figuring out why LCR and OpenBSC wouldn't want to work with
each other. The reason was the addition of an element to the MNCC structure. I
propose to send a hello packet down the MNCC socket and leave it to the client
to decide if the version is acceptable.
I will need to move the mncc header to libosmocore as osmocomBB is currently
using a copy of the OpenBSC header.
comments
holger
Dear Sir or Madam,
We are students from Poznan University of Technology in Poland.We want to
develop our GUI enhancement for OpenBSC project.It's about adding and
deleting users registered in network. We have already implemented adding
logged users, but we couldn't make this part of program, which is
responsible for deleting users when they have already logged out. Could you
give some advice, where to find appropriate place in the source code in
OpenBSC.
Thanks in advance.
Best regards
Marek Świąder
Hi all,
Does anyone know a good C/C++ library for CSN.1 bitstream
reading/writing? We're working on a GPRS implementation for OpenBTS
and we don't want to code all those RLC/MAC messages by hands when we
can do this automatically. Right now we think that the easiest way is
to re-purpose csn1 "library" from Wireshark - adopt it to OpenBTS
bitstream operations and add support for writing to bitstream. Then we
can even re-use those RLC/MAC messages already converted to macros'
for Wireshark's rlcmac dissector. But we would appreciate if someone
points us to a better way of doing this.
--
Regards,
Alexander Chemeris.
Hi all,
I want to know how to know GPRS channel coding. GPRS using PDCH, both
MAC/RLC data block and MAC/RLC control block is
transmitted on PDCH, although there is PACCH, PTCH, PTCCH and so on it
still PDCH. then the MAC/RLC control block is coded
with cs-1 channel coding scheme and MAC/RLC data block may be coded with
other channel coding scheme. so when received a
burst how to know what kind of MAC/RLC block it belong to and which channel
coding scheme it used?
Thanks!
Hi All,
Wondering if there is a way to create pdp request for multple imsi or msisdn.
Currently there is an option to emulate more than one pdp context, can we do the same for different imsi's or msisdn via sgsnemu as an input to sgsnemu.conf file?
Thank you in advance.
Anish
Hi,
I've just pushed a couples of changes to a branch sylvain/pending that
need to be tested. They alter the startup process for the nanoBTS
(fixing the issues some people had with starting GPRS support, when
the bts was not connecting to the SGSN). And also a fix for the Nokia
InSite startup sequence where the reset command was not sent due to
missing initialization of .do_reset.
Since I know initialization sequence can be a rather fragile process,
if people could test this didn't break anything for them, it'd be
nice.
Cheers,
Sylvain
Hi,
> That’s all I get, and it never bootstraps.
In libosmo-abis, in src/input/lapd.c line 90, try replacing 0,240000,
by 0,480000,
Also, make sure you plugged the power like 10 min before trying.
Cheers,
Sylvain
hello list,
I found some some where in openbts archives that authentication and encryption has been implemented in openbsc, kindly advise how can i add these features in openbts???, i studied libosmocore libraby, but unable to figure out, how it can be done, please advise!!!
Hello Sylvain,
On Mon, 17 Oct 2011 16:11:25 +0200, "Sylvain Munaut" <246tnt(a)gmail.com> wrote:
>
> Actually to get it to start I have to:
> - After powering it, wait for like 10 min. (If I try to start openbsc
> any sooner, it will never bootstrap)
If I remember, I never had to wait longer than half a minute after
power on. But this was with the version from August, so some changes
in the code might cause this behaviour.
> But I could add this 'reset' process as an nokia specific option to
> the vty (i.e. reset_on_start or something ).
A configuration option is fine, I would set the default to "always
reset" and only if someone know what he does, he can turn the reset
off (I think I had strange effects while changing the configuration
and not doing a reset, so this situation should be avoided).
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hi,
we own a frequency usage licence from the Bundesnetzagentur and ran our
network with auth policy token. So every new phone trying to attach to our
network will receive a SMS with information how to register and a token.
Thereafter, the phone is kicked out and will no longer be able to register
again.
Now there was a problem with some phones from Cupertino which, as I heard,
registered to our network, received the SMS, were kicked out again but did not
try to re-register with their home network. So some "nice" guys threaten to
call the Bundesnetzagentur if we will not shut down the network immediately.
As a quick solution, we changed the registration procedure from Token-Input to
IMEI-Input.
My question is: Are there really legal problems when using the "Auth Token"
policy?
Many Thanks,
Lennart
Hi,
I've just pushed a libosmosdr sublibrary in a sylvain/sdr branch in
the libosmocore git.
Currently it contains mostly a complex vector 'class' along with
various math functions used on them (convolution / correlation / ...).
Some aspects the the API along with some of the underlying math are
inspired by the code from openbts, but it is a complete rewrite in
pure C with some aspects simplified, and some others extended.
If anybody has comments before I merge it in master, they're welcome.
The doxygen doc should be clear enough (and even includes fancy latex
equation :P)
Cheers,
Sylvain
From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
Hi!
This patch reworks the timer insfrastructure of libosmocore to
make it more scalable. I remember some discussion with Harald while
I was in Berlin that this can be of interest.
It also reworks the timer torture test, the current list-based
timer seems to have problem with it.
You can find this changes in the pablo/timer branch.
Pablo Neira Ayuso (3):
add rb-tree implementation to libosmocore
timer: add scalable RB-tree based timer infrastructure
tests: add new torture test for timer infrastructure
include/osmocom/core/Makefile.am | 2 +-
include/osmocom/core/linuxrbtree.h | 160 +++++++++++++++
include/osmocom/core/timer.h | 6 +-
src/Makefile.am | 2 +-
src/rbtree.c | 389 ++++++++++++++++++++++++++++++++++++
src/timer.c | 176 +++++++++--------
tests/timer/timer_test.c | 141 ++++++++++---
7 files changed, 757 insertions(+), 119 deletions(-)
create mode 100644 include/osmocom/core/linuxrbtree.h
create mode 100644 src/rbtree.c
--
1.7.2.5
Fix to small spelling error.
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index
cc9d297..ff2069a 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -1055,7 +1055,7 @@ static int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx,
struct msgb *msg,
break;
case GSM48_MT_GMM_RA_UPD_COMPL:
/* only in case SGSN offered new P-TMSI */
- DEBUGP(DMM, "-> ROUTEING AREA UPDATE COMPLETE\n");
+ DEBUGP(DMM, "-> ROUTING AREA UPDATE COMPLETE\n");
mmctx_timer_stop(mmctx, 3350);
mmctx->p_tmsi_old = 0;
/* Unassign the old TLLI */
Hello Sylvain,
On Mon, 17 Oct 2011 14:11:58 +0200, "Sylvain Munaut" <246tnt(a)gmail.com> wrote:
> And also a fix for the Nokia InSite startup sequence where the reset
> command was not sent due to missing initialization of .do_reset.
The Reset command was enabled in my initial version. As far as I know
it was intentionally disabled during the CCC camp to get faster
turnaround times while setting up the camp network.
Its possible to skip the reset if nothing has changed in the configuration,
however if for example the ARFCN is changed, the reset is required (it
might be possible to do a TRX-only reset but I never tested it).
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hi,
> The Reset command was enabled in my initial version. As far as I know
> it was intentionally disabled during the CCC camp to get faster
> turnaround times while setting up the camp network.
>
> Its possible to skip the reset if nothing has changed in the configuration,
> however if for example the ARFCN is changed, the reset is required (it
> might be possible to do a TRX-only reset but I never tested it).
Mmm, I'll retry tonight but at least with the new LAPD code I had
trouble when the reset wasn't there.
Actually to get it to start I have to:
- After powering it, wait for like 10 min. (If I try to start openbsc
any sooner, it will never bootstrap)
- Then start openbsc with the 'reset' part in it.
But I could add this 'reset' process as an nokia specific option to
the vty (i.e. reset_on_start or something ).
Cheers,
Sylvain
Hi all,
this is just a heads-up: The ABI of the osmo_timer has just changed (due
to merging pablo's rb_tree based timer implementation instead of our
linked list one). The API has not changed, so simply recompiling the
programs against the new library header files will work.
As a result, I have bumped the major library version, resulting in
libosmocore-3.0.0.so. There is also a new version tag to mark this
change: 0.4.0
Regards,
Harald
--
- Harald Welte <laforge(a)gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
First Osmocom GMR code release
As some of the readers may already know, a couple of Osmocom developers
have been working on a new sub-project: OsmocomGMR.
The primary goal of this project is to provide a reusable and clean
implementation of the various layers of GMR-1.
What is GMR-1 ? Well, it stands for "GEO Mobile Radio" and it's a set of
specifications describing a satellite based mobile phone network heavily
inspired from GSM. One of the major commercial operators of GMR-1
technology is "Thuraya", providing coverage over
Europe/Africa/Asia/Australia.
So far the implementation focused on the lowest layers:
* Physical layer with FCCH sync and demodulation support for
* pi4-CBPSK and pi4-CQPSK bursts.
* Channel coding layer (scrambling/puncturing/convolutional
coding/crc/interleaving/...)
And some ancillary tools to exploit those:
* A good capture tool to listen to particular ARFCN(s) and
channelize them properly
* Wireshark support (BCCH only so far)
The first 'demo application' using all of the above provides
functionalities similar to what airprobe is for GSM: An air interface
protocol analyzer that goes all the way from capturing data off-the-air
to sending packets to wireshark for analysis. Limited to BCCH only
currently but this will evolve with time.
Development was mainly done by Sylvain Munaut, with help from Dimitri
Stolnikov (early signal captures and his great capture tool), Harald
Welte (initiating the project) and Steve Margraf (testing different
setup and antenna ideas).
If you'd like to know more, you are encourated to read the wiki
(http://gmr.osmocom.org/) and join the mailing list
(http://lists.osmocom.org/mailman/listinfo/gmr)
--
- Harald Welte <laforge(a)gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
Hello all,
Looking for ideas. I have a NanoBTS Model 140 which doesn't seem to
work with GPRS. It never connects to the SGSN. The openbsc/sgsn
environment is ok - I can swap in another nano and it works fine.
I've taken some log captures:
Hi All,
I'm getting the following error "Received packet without a valid source address!!!" on sgsnemu 0.84
[root@n003-000-000-000 openggsn-0.84]# sgsnemu --listen 7.7.7.7 --remote 7.7.7.1 --timelimit 10 --contexts 1 --apn internet --imsi 2400112 34567890 --msisdn 46702123456 -u root -p nsil --createif --defaultroute
Using default DNS server
Local IP address is: 7.7.7.7 (7.7.7.7)
Remote IP address is: 7.7.7.1 (7.7.7.1)
IMSI is: 240011234567890 (0xf098765432110042)
Using NSAPI: 0
Using GTP version: 1
Using APN: internet
Using selection mode: 1
Using MSISDN: 46702123456
Initialising GTP library
openggsn[4597]: GTP: gtp_newgsn() started
Setting up interface
Done initialising GTP library
Sending off echo request
Setting up PDP context #0
Waiting for response from ggsn........
Received echo response
Received create PDP context response. IP address: 218.59.100.38
Disconnecting PDP context #0
Received packet without a valid source address!!!
[root@n003-000-000-000 openggsn-0.84]#
The error I get on GGSN (Cisco 7200) on debugging is "Mandatory info element out of sequence"
*Oct 13 17:01:42.444: GTP IE:4200113254769800:rcvd 0 out of order previous IE 0
*Oct 13 17:01:42.448: %GTP-2-PDPACTIVATIONFAIL: GTP PDP activation/update failed, GSN: 0.0.0.0, TID: 00, Reason: Mandatory info element out of sequence
I'm sticking with 0.84 as 0.91 has a bug while sending echo " Mandatory IE invalid" . Any help on this is greatly appreciated.
Thank you,
Anish
Hi all, but especially Harald,
We're looking for a good library with complex arithmetic, bit
functions and other RF processing stuff to be used as a base for
porting of our WiMAX stuff to C/C++. I'm looking at libosmocore as a
perfect candidate for that, but we're going to release our work under
LGPL and thus we want an LGPL base library. I wonder, is it possible
to re-license libosmocore under LGPL instead of GPL? I know that
Sylvain has no strong objections about that. Harald, Holger and other
contributors - what would you say?
In general, I believe that LGPL is much better suited for libraries
then GPL and many widely used libraries, like ffmpeg, use it with
great success. And I wish libosmocore to be as successful as those
LGPL libraries.
PS Our WiMAX effort is to create an open-source receiver for Mobile WiMAX:
http://code.google.com/p/wimax-scanner/
We have written somewhat working Matlab code and we're going to port
it to something more real-time now.
--
Regards,
Alexander Chemeris.
Hi all,
in the above method there are paths were rc will never be initialized. I think
initializing rc = 0 or -EINVAL would be cheating, instead we should consider
splitting it into manageable pieces.
holger
In case the control interface on TCP port 4249 is used in an unintended way,
a SIGABRT can be caused because of a missing initialization of a msgb*.
The upcoming patch fixes this bug.
If the patch seems useful, please feel free to merge it.
Kind regards,
-Alexander Huemer
Alexander Huemer(1):
libctrl: only free() msgb if it was alloc()ed
openbsc/src/libctrl/control_if.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
In case the control interface on TCP port 4249 is used in an unintended way,
a SIGABRT can be caused because of a double talloc_free() call on a msgb*.
The upcoming patch fixes this bug.
If the patch seems useful, please feel free to merge it.
Kind regards,
-Alexander Huemer
Alexander Huemer(1):
libctrl: only free() msgb if it was alloc()ed
openbsc/src/libctrl/control_if.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Hi All,
Finally I got the setup up and running using Openggsn 0.84, seems like there is a bug in version 0.91 which was causing the earlier reported issue.
I've sgsnemu sending packets to Cisco 7200 gprs code emulated on dynmips now which inturn is configured to authenticate via FreeRadius. Everything works now, i'm able to get sgnsemu send packets with username password for the apn to get it authenticated via AAA.
My next challenge are:
1. To get sgsnemu read configuration file. Can anyone help me with a sample to do this, would like to see a configuration file where i can have multiple packets with different apn, qos ,imsi being sent out with having to manually type via cli. At this point , i see that there is a limitation of binding only one sgsnemu instance to local interface, is there a way to have multiple instances running?
2. Also would want to setup charging gateway if possible, i couldnt find a live download link to open charging gateway .
Would greatly appreciate any inputs on the same.
Thank you,
Anish
________________________________
From: anish achenkunju <anish_achenkunju(a)yahoo.com>
To: "openbsc(a)lists.osmocom.org" <openbsc(a)lists.osmocom.org>
Sent: Wednesday, September 21, 2011 4:57 PM
Subject: Fw: Mandatory info element invalid
Dear All,
I'm using sgsnemu of openggsn 0.91 to send traffic to Cisco 7200 GGSN code running on dynamips.
[root@localhost ~]# sgsnemu -l 3.3.3.3 -r 3.3.3.1
Using default DNS server
Local IP address is: 3.3.3.3 (3.3.3.3)
Remote IP address is: 3.3.3.1 (3.3.3.1)
IMSI is: 240010123456789 (0xf987654321010042)
Using NSAPI: 0
Using GTP version: 1
Using APN: internet
Using selection mode: 1
Using MSISDN: 46702123456
Initialising GTP library
openggsn[24632]: GTP: gtp_newgsn() started
Done initialising GTP library
Sending off echo request
Setting up PDP context #0
Waiting for response from ggsn........
I'm getting the following error on GGSN:
*Sep 19 20:45:35.487: %GTP-2-PDPACTIVATIONFAIL: GTP PDP activation/update failed, GSN: 0.0.0.0, TID: 00, Reason: Mandatory info element invalid
*Sep 19 20:45:35.491: %GTP-0-GTPv1PACKETPARSINGERROR: GSN: 3.3.3.1, TEID: 1, APN: NULL, Reason: Mandatory ie incorrect Mandatory info element invalid
And the following cause value on sgsnemu:
Received echo response
Received create PDP context response. Cause value: 201
Seems like the GSN adddr 0.0.0.0 ,TID: 00 generated by sgsnemu are invalid. Looking forward for a workaround fix to help me move forward, any help is greatly appreciated.
Thank you in advance,
Anish
Hi all,
Does anyone know how should we fill PDCH when no downlink transmission
is present? I can't find any mention about this in the standard. If
someone have traces from existing networks, I would very much
appreciate this.
Some background - we've recently started working on GPRS
implementation for OpenBTS, and we're stuck at the very beginning -
mobile sends RACH, but doesn't respond to our Packet Channel Immediate
Assignment. After spending quite some time tweaking Immediate
Assignment message, our conclusion is that mobile may want to see some
"filler" date at the idle PDCH and we don't do this yet.
I know that OpenBSC has GPRS working, so I hope someone here may help us.
--
Regards,
Alexander Chemeris.
Hi!
I've finally taken some time to re-write the gen_ladder tool in order to
avoid the stupid 'bent arrow' problem that was caused by using 'dot'.
I'm now drawing bitmap images directly from Perl using 'GD', rendering
PNG images. Support for printing a title and automati scaling of the
font size has been added.
However, this new version doesn't yet support the bi-directional arrows
and dashed lines. Patches are welcome ;)
I tried to use GD::SVG at some earlier version, and it seemed to work
too, i.e. we will have an easy path to still generate vector graphics,
if required.
There are also way more *.lad files in the repository now for various
protocol transaction, including supplementary services, roaming calls,
etc.
Regards,
Harald
--
- Harald Welte <laforge(a)gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
Hello list,
I would like to be able to send a TRAP over the control interface
for certain signals. For this it would be nice if the signals have a
text representation of their name as is the case with the (rate)
counters.
I want to propose a different API where you register the signals (and
maybe even the subsystems) and provide a name for them.
The function register_signal would then return the numeric
representation of the signal. The performance hit would only be during
registering, not during dispatch.
The callback function would still be called with the numeric
representation in order to avoid resolving the name to the number every
time.
Inside the callback you would have to resolve the name of the signal to
the actual number, but using static variables you'll only have to do it
the first time:
void signal_cb(unsigned int subsysnum, unsigned int signalnum,
void *signal_data, void *handler_data)
{
static unsigned int foosig, barsig;
if (foosig == 0) {
foosig = osmo_signal_get_by_name("foo");
}
if (barsig == 0) {
barsig = osmo_signal_get_by_name("bar");
}
switch (signalnum) {
case foosig:
do_stuff;
break;
case barsig:
do_other_stuff;
break;
}
}
The functions that dispatch the signals would have to do something
similar.
Ideas? Is this too complex?
Do we gain enough from registering signals at runtime or should we
rather keep the enums and add a value_string for the name/description?
Regards,
Daniel Willmann
Hi,
I am looking for some help debugging a nanoBTS setup with OpenBSC/SGSN/GGSN as I am struggling getting GPRS to work.
I am seeing the following error in the SGSN output:
debian4:/opt/openbsc/openbsc/src/gprs# ./osmo-sgsn -c osmo_sgsn.cfg
<0011> gprs_ns.c:151 NSVCI=65534 Creating NS-VC
<0011> gprs_ns.c:151 NSVCI=65535 Creating NS-VC
<0011> gprs_ns.c:738 Creating NS-VC for BSS at 192.168.60.200:23000
<0011> gprs_ns.c:620 NSEI=65535 Rx NS RESET (NSVCI=0, cause=O&M intervention)
<0011> gprs_ns.c:488 NSEI=101 Tx NS RESET ACK (NSVCI=101)
<0011> gprs_ns.c:797 NSEI=101 Rx NS UNBLOCK
<0012> gprs_bssgp.c:246 BSSGP BVCI=0 Rx RESET cause=Transmission capacity modified
<0012> gprs_bssgp.c:246 BSSGP BVCI=2 Rx RESET cause=Transmission capacity modified
<0012> gprs_bssgp.c:269 Cell 1-1-1-0 CI 0 on BVCI 2
<0012> gprs_bssgp.c:322 BSSGP BVCI=2 Rx BVC-UNBLOCK
<0012> gprs_bssgp.c:322 BSSGP BVCI=2 Rx BVC-UNBLOCK
<0012> gprs_bssgp.c:462 BSSGP BVCI=2 Rx Flow Control BVC
<0012> gprs_bssgp.c:346 BSSGP TLLI=0x7f60277f Rx UPLINK-UNITDATA
<0013> gprs_llc.c:428 LLC SAPI=1 C FCS=0x447ea5CMD=UI DATA
<0013> gprs_llc.c:700 LLC RX: unknown TLLI 0x7f60277f, creating LLME on the fly
I came across this thread http://comments.gmane.org/gmane.comp.mobile.openbsc.general/687 which talks about a similar error but hasn't helped resolve the problem.
I have a second hand nanoBTS unit, are there any configuration settings I need to change on the unit itself to make it work with the example configs from OpenBSC?
Any help/advice much appreciated
Thanks
Jon
_______________________
Jon Southall
Technical Operations Manager
E: jon.southall(a)boku.com<mailto:jon.southall@boku.com>
M: +14153427958
[cid:image001.png@01CC82AD.3D217E20]
_______________________
Hi,
my goal is to generate our wiki pages (or docbook, or...) for the config
formats from the VTY commands directly. We might also want/need to add
additional docs inside the command.
My current hack is this:
diff --git a/src/vty/command.c b/src/vty/command.c
index ab1eaca..bcf72d0 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -426,6 +426,20 @@ void install_element(enum node_type ntype, struct
cmd_element *cmd)
cmd->strvec = cmd_make_descvec(cmd->string, cmd->doc);
cmd->cmdsize = cmd_cmdsize(cmd->strvec);
+
+ printf("NODE: %d\n", ntype);
+
+ int j;
+ for (j = 0; j < vector_count(cmd->strvec); ++j) {
+ vector descvec = vector_slot(cmd->strvec, j);
+ int i;
+ for (i = 0; i < vector_active(descvec); i++) {
+ struct desc *desc = vector_slot(descvec, i);
+ if (desc == NULL)
+ continue;
+ printf(" %s %s\n", desc->cmd, desc->str);
+ }
+ }
Output:
NODE: 1
show Show running system information
version Displays program version
NODE: 1
list Print command list
NODE: 1
exit Exit current mode and down to previous mode
NODE: 1
help Description of the interactive help system
NODE: 1
enable Turn on privileged mode command
NODE: 1
terminal Set terminal line parameters
length Set number of lines on a screen
<0-512> Number of lines on screen (0 for no pausing)
NODE: 1
Problems:
The goal would to have a VTY command to introspect all vty commands, one of
the problems is to do it recursively. E.g. we have commands that move to
another node but this is via code and can not be seen from the outside. The
other problem is we can not get the name from the node number...
PS: Can we move VTY to AGPL code, bit by bit? Remove one public function and
reimplement to make OpenBSC work again? E.g. the vector in vectors is a bit
crazy...