libosmovty 1.13.1.1-afb4 Osmocom VTY library

Public Types | Data Fields
vty Struct Reference
VTY (Virtual TTY) interface

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 buffer * | obuf
| 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

char* vty::buf

Command input buffer.

Referenced by config_from_file(), vty_auth(), vty_backward_kill_word(), vty_backward_pure_word(), vty_backward_word(), vty_clear_buf(), vty_close(), vty_command(), vty_complete_command(), vty_delete_char(), vty_describe_command(), vty_ensure(), vty_forward_char(), vty_forward_kill_word(), vty_forward_word(), vty_hist_add(), vty_history_print(), vty_insert_word_overwrite(), vty_kill_line(), vty_out_va(), vty_read(), vty_read_config_filep(), vty_redraw_line(), vty_self_insert(), vty_self_insert_overwrite(), and vty_transpose_chars().

## ◆ config

int vty::config

In configure mode.

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

## ◆ cp

int vty::cp

Command cursor point.

Referenced by vty_backward_char(), vty_backward_kill_word(), vty_backward_pure_word(), vty_backward_word(), vty_beginning_of_line(), vty_create(), vty_delete_backward_char(), vty_delete_char(), vty_down_level(), vty_end_config(), vty_end_of_line(), vty_execute(), vty_forward_char(), vty_forward_kill_word(), vty_forward_word(), vty_history_print(), vty_insert_word_overwrite(), vty_kill_line(), vty_redraw_line(), vty_self_insert(), vty_self_insert_overwrite(), vty_stop_input(), and vty_transpose_chars().

## ◆ 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 descripter of this vty.

Referenced by vty_close(), vty_create(), vty_flush(), vty_out_va(), vty_read(), vty_read_config_filep(), and write_config_file().

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

char* vty::hist[VTY_MAXHIST]

Histry of command.

Referenced by DEFUN(), vty_close(), vty_create(), vty_hist_add(), vty_history_print(), vty_next_line(), and vty_previous_line().

## ◆ hp

int vty::hp

History lookup current point.

Referenced by vty_create(), vty_hist_add(), vty_history_print(), vty_next_line(), vty_previous_line(), and vty_stop_input().

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

int vty::length

Command length.

Referenced by vty_complete_command(), vty_create(), vty_delete_char(), vty_describe_command(), vty_end_of_line(), vty_execute(), vty_forward_char(), vty_forward_kill_word(), vty_forward_word(), vty_hist_add(), vty_history_print(), vty_insert_word_overwrite(), vty_kill_line(), vty_read(), vty_redraw_line(), vty_self_insert(), vty_self_insert_overwrite(), vty_stop_input(), and vty_transpose_chars().

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

int vty::node

Node status of this vty.

Referenced by cmd_complete_command(), cmd_complete_command_real(), cmd_describe_command(), cmd_describe_command_real(), cmd_execute_command(), cmd_execute_command_real(), cmd_execute_command_strict(), config_from_file(), DEFUN(), gDEFUN(), osmo_log_vty2tgt(), osmo_stats_vty2srep(), vty_auth(), vty_complete_command(), vty_create(), vty_current_node(), vty_delete_char(), vty_down_level(), vty_end_config(), vty_execute(), vty_go_parent(), vty_pop_parent(), vty_prompt(), vty_read(), vty_read_config_filep(), vty_self_insert_overwrite(), and vty_write().

## ◆ obuf

struct buffer* vty::obuf

Output buffer.

Referenced by client_data(), vty_buffer_reset(), vty_close(), vty_flush(), vty_out_newline(), vty_out_va(), vty_read(), vty_reset(), and vty_write().

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

void* vty::priv

private data, specified by creator

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

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

enum vty_type vty::type

Is this vty connect to file or not.

Referenced by DEFUN(), vty_command(), vty_create(), vty_event(), vty_execute(), vty_prompt(), vty_read_config_filep(), vty_shell(), vty_shell_serv(), and write_config_file().

## ◆ 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:

- include/osmocom/vty/vty.h