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

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

◆ index_sub

void* vty::index_sub

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

Referenced by gDEFUN(), gDEFUN(), and gDEFUN().

◆ length

◆ lines

int vty::lines

Configure lines.

Referenced by DEFUN(), 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(), and 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: