Commit Graph

34 Commits

Author SHA1 Message Date
Harald Welte 62ab20c5dd [VTY] Remove OpenBSC specific node-exit handling from src/vty
The idea is to move the VTY code into libosmocore at some point,
and for that we need to eliminate OpenBSC specifics from it
2010-05-14 18:59:17 +02:00
Harald Welte 89deee9b99 Add missing file vty/utils.c 2010-05-13 11:53:52 +02:00
Harald Welte b4d5b17a8d Ensure all 'view' commands are availalbe from 'enable' too 2010-05-12 18:28:00 +02:00
Harald Welte 1194b584be NS: Add support for persistent NS-VC configuration
With persistent NS-VC configuration (configured through VTY),
we can respond properly to BSS with a somewhat strange NS
implementation Such as the BSplus.  It enables us to respond
with a proper NS-RESET (including NSVCI/NSEI) when receiving
a NS-ALIVE or other PDU for a BLOCKED/DEAD NS-VC after our
end of the connection is rebooted.
2010-05-12 18:28:00 +02:00
Harald Welte a67cbd6f06 [gpprs] Add VTY node for SGSN 2010-05-04 07:20:43 +02:00
Harald Welte a977b3d1ee gbproxy: add VTY node 2010-05-04 07:20:42 +02:00
Harald Welte f32cc4bee5 VTY: ensure all cmd_elements are declared 'static'
While doing 'nm' on a VTY-using object file I noticed that all
cmd_elements are global symbols, which is not good.

Unfortuantely there are some vty-internal cmd_elements that need
to span across object files, so I had to introduce gDEFUN()
and gALIAS().  The old macros now all declare static structures.
2010-05-01 12:07:41 +02:00
Holger Hans Peter Freyther a4b446b459 [vty] Free the matched at the end of the routine.
Remove the return from the case labels and cleanup at
the end matched array at the end of the routine.
2010-04-30 13:29:34 +08:00
Holger Hans Peter Freyther f1af306c94 [vty] Plug memory leak on auto completion.
I assume the original code crashed with a double free as we
have a cleanup at the end of the method. Return from the routine
like the case label below. This is fixing a memory leak I am
experimenting.
2010-04-30 13:29:34 +08:00
Holger Hans Peter Freyther 1700c933f2 [vty] Allow to create a buffer in a given context.
Stop using the global vty context for all allocations
and allow to embed the buffer into a given context, and
allocate sub buffers with the context of its parent.
2010-04-30 13:29:34 +08:00
Holger Hans Peter Freyther 9e282de7c8 [vty] Move some allocations into the context of the vty. 2010-04-30 13:29:34 +08:00
Holger Hans Peter Freyther 22ca95cf9a [vty] Remove FIXME as it appears to do the right thing. 2010-04-30 13:29:33 +08:00
Holger Hans Peter Freyther 1ea8dbec90 [mgcp] Fix navigation in the vty hierachy (make exit work)
Make exit from the MGCP node work properly.
2010-04-07 23:01:08 +02:00
Holger Hans Peter Freyther acf8a0c59f [misc] Remove whitespace from the end of the line. 2010-03-29 08:47:44 +02:00
Harald Welte 5a29c7fa89 automatically include program version and print it from vty and --version 2010-03-23 00:09:32 +08:00
Harald Welte dfe6c7d910 split 'libosmocore' from openbsc codebase
This library is intended to collect all generic/common funcitionality
of all Osmocom.org projects, including OpenBSC but also OsmocomBB

The library currently includes the following modules:

bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer,
tlv_parse, linuxlist

msgb allocation error debugging had to be temporarily disabled as it depends on
'debug.c' functionality which at the moment remains in OpenBSC
2010-02-20 16:27:23 +01:00
Harald Welte 3cefa9aaa0 vty: sub-divide talloc contexts and include them in talloc report
The VTY code makes so many allocations that a full report is
simply too long to provide any useful information.  So we sub-divide
it in multiple contexts, and report only one level deep at SIGURS1.

We also introduce SIGUSR2 for the full detailed VTY report.
2009-12-24 10:51:56 +01:00
Harald Welte 7cb7a73b4f [vty] ensure we mark fd in writefd once we vty_out() something 2009-12-17 21:59:28 +01:00
Harald Welte (local) d19e58b13c move talloc context creation out of on_dso / constructors
the various constructors get called in a non-obvious, linker determined
order, which makes certain objects disappear from the talloc report.

This change moves the talloc context creation into a new talloc_ctx.c file
2009-08-15 02:30:58 +02:00
Stefan Schmidt a29216b1e1 vty/command: Use CONFIGFILE_MASK as mask in chmod and not as mode. 2009-08-12 20:52:35 +02:00
Holger Hans Peter Freyther 6d30a35d21 vty: Avoid implicit declaration warning and check result code 2009-08-10 08:26:15 +02:00
Holger Hans Peter Freyther c423a12392 vty: Fix format string issue 2009-08-10 08:26:15 +02:00
Holger Hans Peter Freyther 656b129812 vty: Make the argument const 2009-08-10 08:26:14 +02:00
Harald Welte 42581829ec the actual config file code (not just config files)
this was missing from commit a08a9acdb6
2009-08-08 16:12:58 +02:00
Harald Welte 5013b2ad42 introduce new GSMNET node for the GSM network 2009-08-07 13:29:14 +02:00
Harald Welte c7c19822fd add support for reading of configuration file to VTY 2009-08-07 13:28:08 +02:00
Harald Welte fc1c3e58ac ensure vty code uses talloc_strdup() rather than regular strdup 2009-08-07 13:26:28 +02:00
Harald Welte 0224e4d051 use one talloc context for entire vty code 2009-08-07 13:25:41 +02:00
Harald Welte 2477d93c6e switch vty implementation over to talloc 2009-08-07 00:32:41 +02:00
Harald Welte b1f21d4844 don't define zencrypt function if VTY_CRYPT is not defined 2009-08-06 18:51:23 +02:00
Harald Welte 4a3023df12 re-enable config file handling of vty layer 2009-08-06 18:50:10 +02:00
Holger Hans Peter Freyther 430b59ce64 vty/command.c: Fix compile warning by including gsm_subsriber.h 2009-07-29 06:44:31 +02:00
Harald Welte 678bdeac1f add FIXME about memory leak every time we close telnet 2009-06-26 19:42:14 +02:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00