libosmovty 1.9.0.192-1c24
Osmocom VTY library
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...
 
bool expert_mode
 Whether the expert mode is enabled. More...
 

Detailed Description

Internal representation of a single VTY.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Current vty status.

Enumerator
VTY_NORMAL 
VTY_CLOSE 
VTY_MORE 
VTY_MORELINE 

Field Documentation

◆ buf

◆ config

int vty::config

In configure mode.

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

◆ cp

◆ escape

unsigned char vty::escape

For escape character.

Referenced by vty_escape_map(), and vty_read().

◆ expert_mode

bool vty::expert_mode

Whether the expert mode is enabled.

Referenced by cmd_describe_command_real(), DEFUN(), gDEFUN(), and vty_dump_xml_ref_to_vty().

◆ fail

int vty::fail

Failure count.

Referenced by vty_auth(), and vty_create().

◆ fd

int vty::fd

◆ file

FILE* vty::file

underlying file (if any)

◆ height

int vty::height

Widnow height.

Referenced by vty_telnet_option().

◆ hindex

int vty::hindex

History insert end point.

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

◆ hist

◆ hp

int vty::hp

◆ iac

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().

◆ iac_sb_in_progress

unsigned char vty::iac_sb_in_progress

IAC SB (option subnegotiation) handling.

Referenced by vty_read(), and vty_telnet_option().

◆ indent

char* vty::indent

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

Referenced by cmd_execute_command_real(), config_from_file(), and vty_pop_parent().

◆ index

void* vty::index

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

Referenced by cmd_execute_command_real(), config_from_file(), config_write_log(), DEFUN(), gDEFUN(), osmo_log_vty2tgt(), osmo_stats_vty2srep(), vty_current_index(), and vty_pop_parent().

◆ index_sub

void* vty::index_sub

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

Referenced by gDEFUN().

◆ length

◆ lines

int vty::lines

Configure lines.

Referenced by DEFUN(), and vty_create().

◆ max

int vty::max

Command max length.

Referenced by vty_clear_buf(), and vty_ensure().

◆ monitor

int vty::monitor

Referenced by DEFUN().

◆ node

◆ obuf

◆ parent_nodes

struct llist_head vty::parent_nodes

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

Referenced by cmd_execute_command_real(), config_from_file(), and vty_parent().

◆ priv

◆ sb_buf

unsigned char vty::sb_buf[TELNET_NAWS_SB_LEN]

sub-negotiation buffer

Referenced by vty_read(), and vty_telnet_option().

◆ sb_len

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().

◆ type

◆ width

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: