libosmovty
0.9.6.311-c977
Osmocom VTY library
|
Telnet interface towards Osmocom VTY. More...
Files | |
file | telnet_interface.h |
minimalistic telnet/network interface it might turn into a wire interface | |
file | telnet_interface.c |
minimalistic telnet/network interface it might turn into a wire interface | |
Data Structures | |
struct | telnet_connection |
A telnet connection. More... | |
Functions | |
int | telnet_init (void *tall_ctx, void *priv, int port) |
Initialize telnet based VTY interface listening to 127.0.0.1. More... | |
int | telnet_init_dynif (void *tall_ctx, void *priv, const char *ip, int port) |
Initialize telnet based VTY interface. More... | |
void | telnet_exit (void) |
LLIST_HEAD (active_connections) | |
static int | telnet_new_connection (struct osmo_fd *fd, unsigned int what) |
int | telnet_close_client (struct osmo_fd *fd) |
close a telnet connection More... | |
static int | client_data (struct osmo_fd *fd, unsigned int what) |
void | vty_event (enum event event, int sock, struct vty *vty) |
callback from core VTY code about VTY related events More... | |
Variables | |
static void * | tall_telnet_ctx |
static struct osmo_fd | server_socket |
struct host | host |
Telnet interface towards Osmocom VTY.
This module contains the code implementing a telnet server for VTY access. This telnet server gets linked into each libosmovty-using process in order to enable interactive command-line introspection, interaction and configuration.
|
static |
References BUFFER_EMPTY, buffer_flush_all(), telnet_connection::fd, vty::obuf, telnet_connection::vty, and vty_read().
Referenced by telnet_new_connection().
LLIST_HEAD | ( | active_connections | ) |
int telnet_close_client | ( | struct osmo_fd * | fd | ) |
close a telnet connection
References telnet_connection::dbg, and telnet_connection::entry.
Referenced by telnet_exit(), and vty_event().
void telnet_exit | ( | void | ) |
References telnet_connection::entry, telnet_connection::fd, server_socket, tall_telnet_ctx, and telnet_close_client().
int telnet_init | ( | void * | tall_ctx, |
void * | priv, | ||
int | port | ||
) |
Initialize telnet based VTY interface listening to 127.0.0.1.
[in] | tall_ctx | talloc context |
[in] | priv | private data to be passed to callback |
[in] | port | UDP port number |
References telnet_init_dynif().
int telnet_init_dynif | ( | void * | tall_ctx, |
void * | priv, | ||
const char * | ip, | ||
int | port | ||
) |
Initialize telnet based VTY interface.
[in] | tall_ctx | talloc context |
[in] | priv | private data to be passed to callback |
[in] | ip | IP to listen to ('::1' for localhost, '::0' for all, ...) |
[in] | port | UDP port number |
References server_socket, and tall_telnet_ctx.
Referenced by telnet_init().
|
static |
callback from core VTY code about VTY related events
References vty_signal_data::event, telnet_connection::fd, vty::priv, S_VTY_EVENT, vty_signal_data::sock, telnet_close_client(), vty::type, vty_signal_data::vty, VTY_CLOSED, VTY_READ, VTY_TERM, and VTY_WRITE.
Referenced by vty_close(), vty_create(), vty_out(), and vty_read().
|
static |
Referenced by telnet_exit(), and telnet_init_dynif().
|
static |
Referenced by telnet_exit(), telnet_init_dynif(), and telnet_new_connection().