libosmovty  UNKNOWN
Osmocom VTY library
Telnet Interface

Files

file  telnet_interface.h
 
file  telnet_interface.c
 

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
 
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
 

Variables

static void * tall_telnet_ctx
 
static struct osmo_fd server_socket
 
struct host host
 

Detailed Description

Function Documentation

◆ telnet_init()

int telnet_init ( void *  tall_ctx,
void *  priv,
int  port 
)

Initialize telnet based VTY interface listening to 127.0.0.1.

Parameters
[in]tall_ctxtalloc context
[in]privprivate data to be passed to callback
[in]portUDP port number

References telnet_init_dynif().

◆ telnet_init_dynif()

int telnet_init_dynif ( void *  tall_ctx,
void *  priv,
const char *  ip,
int  port 
)

Initialize telnet based VTY interface.

Parameters
[in]tall_ctxtalloc context
[in]privprivate data to be passed to callback
[in]ipIP to listen to ('::1' for localhost, '::0' for all, ...)
[in]portUDP port number

Referenced by telnet_init().

Variable Documentation

◆ server_socket

struct osmo_fd server_socket
static
Initial value:
= {
.when = BSC_FD_READ,
.cb = telnet_new_connection,
.priv_nr = 0,
}