| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ice0688ac9847524cb546f6d41547090b6a3cb3d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add VTY command
line vty
bind A.B.C.D
The command merely stores the configured IP-address, which can then be used by
the calling main program to set the telnet port of the VTY line. (Commits in
openbsc and osmo-iuh will follow up on this.)
Add function vty_get_bind_addr() to publish the address in the vty.h API.
Add static vty_bind_addr to store.
For allocation/freeing reasons, a NULL address defaults to 127.0.0.1.
BTW, I decided against allowing keywords 'any' and 'localhost' in place of an
actual IP address to make sure a written config is always identical to the
parsed config.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'\0' gets translated to zero but the argument to vector_set is
a pointer and it gets converted to a pointer.
vty.c:985:21: warning: expression which evaluates to zero treated as a null pointer constant of type
'void *' [-Wnon-literal-null-conversion]
vector_set(vline, '\0');
^~~~
vty.c:1095:21: warning: expression which evaluates to zero treated as a null pointer constant of type
'void *' [-Wnon-literal-null-conversion]
vector_set(vline, '\0');
^~~~
vty.c:1097:21: warning: expression which evaluates to zero treated as a null pointer constant of type
'void *' [-Wnon-literal-null-conversion]
vector_set(vline, '\0');
^~~~
|
|
|
|
| |
.. Nuttx doesn't know u_long
|
|
|
|
| |
... u_char not being defined on Nuttx.
|
|
|
|
|
| |
EBADFD is linux specific while EBADF is POSIX. Fix the build on
FreeBSD and use EBADF throughout the file.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.c: In function 'vty_out_newline':
vty.c:294:12: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
|
|
|
|
|
|
| |
The Mandriva GCC is more strict about handling format strings, the
copyright string might contain escape sequences and then any memory
could be read.
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ;)
|
|
|
|
| |
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
| |
Detected by Smatch
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
We can now configure logging to (multiple) files, stderr and syslog
from the vty command line in a persistent way (config file)
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|