libosmovty  1.0.1
Osmocom VTY library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vty Struct Reference

Internal representation of a single VTY. More...

#include <vty.h>

Public Types

enum  {
  VTY_NORMAL,
  VTY_CLOSE,
  VTY_MORE,
  VTY_MORELINE
}
 Current vty status. More...
 

Data Fields

FILE * file
 underlying file (if any) More...
 
void * priv
 private data, specified by creator More...
 
int fd
 File descripter of this vty. More...
 
enum vty_type type
 Is this vty connect to file or not. More...
 
int node
 Node status of this vty. More...
 
int fail
 Failure count. More...
 
struct bufferobuf
 Output buffer. More...
 
char * buf
 Command input buffer. More...
 
int cp
 Command cursor point. More...
 
int length
 Command length. More...
 
int max
 Command max length. More...
 
char * hist [VTY_MAXHIST]
 Histry of command. More...
 
int hp
 History lookup current point. More...
 
int hindex
 History insert end point. More...
 
void * index
 For current referencing point of interface, route-map, access-list etc... More...
 
void * index_sub
 For multiple level index treatment such as key chain and key. More...
 
unsigned char escape
 For escape character. More...
 
enum vty:: { ... }  status
 Current vty status. More...
 
unsigned char iac
 IAC handling. More...
 
unsigned char iac_sb_in_progress
 IAC SB (option subnegotiation) handling. More...
 
unsigned char sb_buf [TELNET_NAWS_SB_LEN]
 sub-negotiation buffer More...
 
size_t sb_len
 How many subnegotiation characters have we received? More...
 
int width
 Window width. More...
 
int height
 Widnow height. More...
 
int lines
 Configure lines. More...
 
int monitor
 
int config
 In configure mode. More...
 
struct llist_head parent_nodes
 List of parent nodes, last item is the outermost parent. More...
 
char * indent
 When reading from a config file, these are the indenting characters expected for children of the current VTY node. More...
 

Detailed Description

Internal representation of a single VTY.

Field Documentation

int vty::config

In configure mode.

Referenced by DEFUN(), vty_config_lock(), and vty_config_unlock().

unsigned char vty::escape

For escape character.

Referenced by vty_escape_map(), and vty_read().

int vty::fail

Failure count.

Referenced by vty_auth(), and vty_create().

int vty::fd

File descripter of this vty.

Referenced by vty_close(), vty_create(), vty_out(), vty_read(), vty_read_file(), and write_config_file().

FILE* vty::file

underlying file (if any)

int vty::height

Widnow height.

Referenced by vty_telnet_option().

int vty::hindex

History insert end point.

Referenced by DEFUN(), vty_create(), vty_hist_add(), vty_next_line(), and vty_stop_input().

int vty::hp
unsigned char vty::iac

IAC handling.

IAC handling: was the last character received the IAC (interpret-as-command) escape character (and therefore the next character will be the command code)? Refer to Telnet RFC 854.

Referenced by vty_read().

unsigned char vty::iac_sb_in_progress

IAC SB (option subnegotiation) handling.

Referenced by vty_read(), and vty_telnet_option().

char* vty::indent

When reading from a config file, these are the indenting characters expected for children of the current VTY node.

Referenced by config_from_file(), and vty_pop_parent().

void* vty::index

For current referencing point of interface, route-map, access-list etc...

Referenced by _cfg_log_syslog(), config_write_log(), DEFUN(), gDEFUN(), osmo_log_vty2tgt(), osmo_stats_vty2srep(), and vty_current_index().

void* vty::index_sub

For multiple level index treatment such as key chain and key.

Referenced by gDEFUN().

int vty::lines

Configure lines.

Referenced by DEFUN(), and vty_create().

int vty::max

Command max length.

Referenced by vty_clear_buf(), and vty_ensure().

int vty::monitor

Referenced by DEFUN().

struct llist_head vty::parent_nodes

List of parent nodes, last item is the outermost parent.

Referenced by config_from_file(), and vty_parent().

void* vty::priv

private data, specified by creator

Referenced by config_from_file(), DEFUN(), osmo_log_vty2tgt(), vty_create(), vty_event(), vty_pop_parent(), and vty_read_file().

unsigned char vty::sb_buf[TELNET_NAWS_SB_LEN]

sub-negotiation buffer

Referenced by vty_read(), and vty_telnet_option().

size_t vty::sb_len

How many subnegotiation characters have we received?

We just drop those that do not fit in the buffer.

Referenced by vty_read(), and vty_telnet_option().

enum { ... } vty::status

Current vty status.

Referenced by gDEFUN(), vty_auth(), vty_create(), vty_execute(), vty_read(), and vty_reset().

int vty::width

Window width.

Referenced by vty_describe_command(), and vty_telnet_option().


The documentation for this struct was generated from the following file: