libosmovty 0.9.6-23.20170220git32ee5af8.fc42
Osmocom VTY library
Loading...
Searching...
No Matches
vty.h File Reference
#include <stdio.h>
#include <stdarg.h>

Go to the source code of this file.

Data Structures

struct  vty
 
struct  vty_app_info
 
struct  vty_signal_data
 

Macros

#define VTY_PRINTF_ATTRIBUTE(a, b)
 
#define ERRNO_IO_RETRY(EN)
 
#define VTY_READ_BUFSIZ   512
 
#define VTY_BUFSIZ   512
 
#define VTY_MAXHIST   20
 
#define TELNET_NAWS_SB_LEN   5
 
#define VTY_NEWLINE   ((vty->type == VTY_TERM) ? "\r\n" : "\n")
 

Enumerations

enum  event {
  VTY_SERV , VTY_READ , VTY_WRITE , VTY_CLOSED ,
  VTY_TIMEOUT_RESET
}
 VTY events.
 
enum  vty_type { VTY_TERM , VTY_FILE , VTY_SHELL , VTY_SHELL_SERV }
 
enum  signal_vty { S_VTY_EVENT }
 

Functions

static const char * vty_newline (struct vty *vty)
 
void vty_init (struct vty_app_info *app_info)
 Initialize VTY layer.
 
int vty_read_config_file (const char *file_name, void *priv)
 Read the configuration file using the VTY code.
 
void vty_init_vtysh (void)
 
void vty_reset (void)
 Reset all VTY status.
 
struct vtyvty_new (void)
 Allocate a new vty interface structure.
 
struct vtyvty_create (int vty_sock, void *priv)
 Create new vty structure.
 
int vty_out (struct vty *, const char *,...) VTY_PRINTF_ATTRIBUTE(2
 
int int vty_out_newline (struct vty *)
 print a newline on the given VTY
 
int vty_read (struct vty *vty)
 Read data via vty socket.
 
void vty_close (struct vty *)
 Close a given vty interface.
 
char * vty_get_cwd (void)
 
void vty_log (const char *level, const char *proto, const char *fmt, va_list)
 
int vty_config_lock (struct vty *)
 Lock the configuration to a given VTY.
 
int vty_config_unlock (struct vty *)
 Unlock the configuration from a given VTY.
 
int vty_shell (struct vty *)
 Return if this VTY is a shell or not.
 
int vty_shell_serv (struct vty *)
 
void vty_hello (struct vty *)
 
void * vty_current_index (struct vty *)
 return the current index of a given VTY
 
int vty_current_node (struct vty *vty)
 return the current node of a given VTY
 
int vty_go_parent (struct vty *vty)
 
const char * vty_get_bind_addr (void)
 

Variables

void * tall_vty_ctx
 
struct cmd_element cfg_description_cmd
 
struct cmd_element cfg_no_description_cmd