summaryrefslogtreecommitdiffstats
path: root/src/vty/vty.c
Commit message (Collapse)AuthorAgeFilesLines
* remove references to u_long type, use 'unsigned long' insteadHarald Welte2014-11-141-2/+2
| | | | .. Nuttx doesn't know u_long
* remove references to u_char type, use 'unsigned char' insteadHarald Welte2014-11-141-1/+1
| | | | ... u_char not being defined on Nuttx.
* write_queue: Use EBADF instead of EBABDFD for portabilityHolger Hans Peter Freyther2014-07-011-1/+1
| | | | | EBADFD is linux specific while EBADF is POSIX. Fix the build on FreeBSD and use EBADF throughout the file.
* vty: Avoid use-after-free in VTY telnet interfaceDaniel Willmann2014-06-221-2/+3
| | | | | | If the read callback closes the connection conn is already freed so we can't derefernce it. Instead return -EBADFD in the read function if it closed the connection and check for that.
* vty: Add vty_install_default() and use for the vty nodesJacob Erlbeck2013-09-081-1/+1
| | | | | | | | | | | This adds the vty_install_default() function that is basically the install_default() function plus the registration of the commands 'exit' and 'end'. The latter is only provided in subnodes of ENABLED_NODE and CONFIG_NONE. The VTY test program is extended to check these commands. Ticket: OW#952
* vty: Address compiler warning about the const qualifierHolger Hans Peter Freyther2012-09-111-1/+1
| | | | | vty.c: In function 'vty_out_newline': vty.c:294:12: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
* vty: Print the string using "%s", string to avoid security issuesHolger Hans Peter Freyther2012-08-021-1/+1
| | | | | | The Mandriva GCC is more strict about handling format strings, the copyright string might contain escape sequences and then any memory could be read.
* correct inverted logic from commit f3ba8aAlexander Huemer2012-07-111-1/+1
|
* vty: avoid using a .data variable.Diego Elio Pettenò2012-06-301-7/+7
| | | | | | | | no_password_check was the only initialized, non-relocated data in the set of libraries, inverting its logic let us keep it in .bss (non-initialized data, which is mapped to the zero page). Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
* add additional newline in vty welcome messageHarald Welte2012-06-161-2/+2
|
* VTY: safe version of printing VTY welcome messageHarald Welte2012-06-031-0/+11
| | | | | | | | | | | | | | | | | | | | The old method used raw writes to the telnet FD, which is bad for several reasons: a) we don't know if we can actually write that many bytes to the socket at the given time b) the socket is still in blocking mode, so we could stall the entire process c) there may be weird interaction with the buffered writes of the vty_out Now, the print_welcome() functionality has moved to vty_hello() instead, where we can use normal vty_out() in buffered mode. This commit is expected to fix the garbled welcome message on arm-eglibc targets. It might still be a good idea to migrate the entire telnet interface to libtelnet - but at some later time ;)
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-181-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* vty: Fixed vty_down_level to move down from config nodesAndreas.Eversberg2011-11-121-3/+5
| | | | | | | | | When using ^D at config nodes above the CONFIG_NODE, the go_parent_cb function is used to go down by one node. This is equivalent to "exit" command. Written-by: Andreas.Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* doxygen: Add main page for all three librariesHarald Welte2011-08-301-0/+38
|
* doxygen: Add (partial) VTY API documentationHarald Welte2011-08-171-6/+39
|
* get rid of non-ANSI function declarations missing (void)Harald Welte2011-07-161-4/+4
| | | | Detected by Smatch
* include: reorganize headers file to include/osmocom/[gsm|core]Pablo Neira Ayuso2011-03-231-1/+1
| | | | | | | | | | | | This patch moves all GSM-specific definitions to include/osmocom/gsm. Moreover, the headers in include/osmocore/ have been moved to include/osmocom/core. This has been proposed by Harald Welte and Sylvain Munaunt. Tested with `make distcheck'. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
* LOGGING: configure logging from the vtyHarald Welte2011-02-181-0/+6
| | | | | We can now configure logging to (multiple) files, stderr and syslog from the vty command line in a persistent way (config file)
* Use the app_info->name instead of the hostnameHarald Welte2010-12-241-1/+1
| | | | | | This makes more sense in case you run BCS, SGSN and other components on the same host. Having multiple telnet sessions with the same prompt can otherwise be confusing.
* vty: Add functions to access index and nodeHolger Hans Peter Freyther2010-09-141-0/+9
| | | | | | It is easier to call these two functions from bindings than wrapping the vty structure and figuring out the alignment of the enum on all different ABIs.
* [VTY] Introduce "struct vty_app_info" for vty_init() functionHarald Welte2010-05-251-5/+3
|
* Create libosmovty as library from OpenBSC VTY functionsHarald Welte2010-05-251-0/+1685