libosmovty 1.13.1.1-afb4 Osmocom VTY library

Macros | Functions | Variables
vty.c File Reference
`#include <stdio.h>`
`#include <stdarg.h>`
`#include <stdlib.h>`
`#include <unistd.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <ctype.h>`
`#include <termios.h>`
`#include <sys/utsname.h>`
`#include <sys/param.h>`
`#include <arpa/telnet.h>`
`#include <osmocom/vty/vty.h>`
`#include <osmocom/vty/command.h>`
`#include <osmocom/vty/buffer.h>`
`#include <osmocom/vty/vty_internal.h>`
`#include <osmocom/core/talloc.h>`
`#include <osmocom/core/timer.h>`
`#include <osmocom/core/utils.h>`

## Macros
#define | MAXPATHLEN 4096
#define | SYSCONFDIR "/usr/local/etc"
#define | VTY_BIND_ADDR_DEFAULT "127.0.0.1"
#define | CONTROL(X) ((X) - '@')
#define | VTY_NORMAL 0
#define | VTY_PRE_ESCAPE 1
#define | VTY_ESCAPE 2

## Functions
void | vty_event (enum event event, int sock, struct vty *vty)
| callback from core VTY code about VTY related events More...
static void | vty_clear_buf (struct vty *vty)
struct vty * | vty_new (void)
| Allocate a new vty interface structure. More...
static void | vty_auth (struct vty *vty)
void | vty_flush (struct vty *vty)
void | vty_close (struct vty *vty)
| Close a given vty interface. More...
int | vty_shell (struct vty *vty)
| Return if this VTY is a shell or not. More...
int | vty_out_va (struct vty *vty, const char *format, va_list ap)
int | vty_out (struct vty *vty, const char *format,...)
| VTY standard output function. More...
int | vty_out_newline (struct vty *vty)
| print a newline on the given VTY More...
int | vty_out_uptime (struct vty *vty, const struct timespec *starttime)
| calculates the time difference of a give timespec to the current time and prints in a human readable format (days, hours, minutes, seconds). More...
void * | vty_current_index (struct vty *vty)
| return the current index of a given VTY More...
int | vty_current_node (struct vty *vty)
| return the current node of a given VTY More...
int | vty_config_lock (struct vty *vty)
| Lock the configuration to a given VTY. More...
int | vty_config_unlock (struct vty *vty)
| Unlock the configuration from a given VTY. More...
void | vty_hello (struct vty *vty)
static void | vty_prompt (struct vty *vty)
static int | vty_command (struct vty *vty)
static void | vty_write (struct vty *vty, const char *buf, size_t nbytes)
static void | vty_ensure (struct vty *vty, int length)
static void | vty_self_insert (struct vty *vty, char c)
static void | vty_self_insert_overwrite (struct vty *vty, char c)
static void | vty_insert_word_overwrite (struct vty *vty, char *str)
static void | vty_forward_char (struct vty *vty)
static void | vty_backward_char (struct vty *vty)
static void | vty_beginning_of_line (struct vty *vty)
static void | vty_end_of_line (struct vty *vty)
static void | vty_hist_add (struct vty *vty)
static int | vty_telnet_option (struct vty *vty, unsigned char *buf, int nbytes)
static int | vty_execute (struct vty *vty)
static void | vty_will_echo (struct vty *vty)
static void | vty_will_suppress_go_ahead (struct vty *vty)
static void | vty_dont_linemode (struct vty *vty)
static void | vty_do_window_size (struct vty *vty)
static void | vty_kill_line_from_beginning (struct vty *)
static void | vty_redraw_line (struct vty *)
static void | vty_history_print (struct vty *vty)
static void | vty_next_line (struct vty *vty)
static void | vty_previous_line (struct vty *vty)
static void | vty_forward_word (struct vty *vty)
static void | vty_backward_pure_word (struct vty *vty)
static void | vty_backward_word (struct vty *vty)
static void | vty_down_level (struct vty *vty)
static void | vty_clear_screen (struct vty *vty)
static void | vty_end_config (struct vty *vty)
static void | vty_delete_char (struct vty *vty)
static void | vty_delete_backward_char (struct vty *vty)
static void | vty_kill_line (struct vty *vty)
static void | vty_forward_kill_word (struct vty *vty)
static void | vty_backward_kill_word (struct vty *vty)
static void | vty_transpose_chars (struct vty *vty)
static void | vty_complete_command (struct vty *vty)
static void | vty_describe_fold (struct vty *vty, int cmd_width, unsigned int desc_width, struct desc *desc)
static void | vty_describe_command (struct vty *vty)
static void | vty_stop_input (struct vty *vty)
static void | vty_escape_map (unsigned char c, struct vty *vty)
static void | vty_buffer_reset (struct vty *vty)
int | vty_read (struct vty *vty)
| Read data via vty socket. More...
int | vty_read_config_filep (FILE *confp, void *priv)
| Read up VTY configuration from a file stream. More...
struct vty * | vty_create (int vty_sock, void *priv)
| Create new vty structure. More...
| DEFUN (config_who, config_who_cmd, "who", "Display who is on vty\n")
| DEFUN (line_vty, line_vty_cmd, "line vty", "Configure a terminal line\n" "Virtual terminal\n")
| DEFUN (vty_login, vty_login_cmd, "login", "Enable password checking\n")
| DEFUN (no_vty_login, no_vty_login_cmd, "no login", NO_STR "Enable password checking\n")
| DEFUN (vty_bind, vty_bind_cmd, "bind A.B.C.D [<0-65535>]", "Accept VTY telnet connections on local interface\n" "Local interface IP address (default: " VTY_BIND_ADDR_DEFAULT ")\n" "Local TCP port number\n")
const char * | vty_get_bind_addr (void)
int | vty_get_bind_port (int default_port)
| Returns configured port passed to the 'line vty'/'bind' command or default_port. More...
| DEFUN (service_advanced_vty, service_advanced_vty_cmd, "service advanced-vty", "Set up miscellaneous service\n" "Enable advanced mode vty interface\n")
| DEFUN (no_service_advanced_vty, no_service_advanced_vty_cmd, "no service advanced-vty", NO_STR "Set up miscellaneous service\n" "Enable advanced mode vty interface\n")
| DEFUN (terminal_monitor, terminal_monitor_cmd, "terminal monitor", "Set terminal line parameters\n" "Copy debug output to the current terminal line\n")
| DEFUN (terminal_no_monitor, terminal_no_monitor_cmd, "terminal no monitor", "Set terminal line parameters\n" NO_STR "Copy debug output to the current terminal line\n")
| DEFUN (show_history, show_history_cmd, "show history", SHOW_STR "Display the session command history\n")
static int | vty_config_write (struct vty *vty)
void | vty_reset (void)
| Reset all VTY status. More...
static void | vty_save_cwd (void)
char * | vty_get_cwd (void)
int | vty_shell_serv (struct vty *vty)
void | vty_init_vtysh (void)
void | vty_init (struct vty_app_info *app_info)
| Initialize VTY layer. More...
int | vty_read_config_file (const char *file_name, void *priv)
| Read the configuration file using the VTY code. More...

## Variables
struct host | host
static vector | vtyvec
vector | Vvty_serv_thread
char * | vty_cwd = NULL
static const char * | vty_bind_addr = NULL
static int | vty_bind_port = -1
static int | vty_config
static int | password_check
void * | tall_vty_ctx
static const char | telnet_backward_char = 0x08
static const char | telnet_space_char = ' '
static const char | telnet_escape_char = 0x1B
struct cmd_node | vty_node

## Macro Definition Documentation

## ◆ CONTROL

#define CONTROL | ( |  | X | ) | ((X) - '@')

## ◆ MAXPATHLEN

#define MAXPATHLEN 4096

## ◆ SYSCONFDIR

#define SYSCONFDIR "/usr/local/etc"

## ◆ VTY_BIND_ADDR_DEFAULT

#define VTY_BIND_ADDR_DEFAULT "127.0.0.1"

## ◆ VTY_ESCAPE

#define VTY_ESCAPE 2

## ◆ VTY_NORMAL

#define VTY_NORMAL 0

## ◆ VTY_PRE_ESCAPE

#define VTY_PRE_ESCAPE 1

## Function Documentation

## ◆ DEFUN() [1/10]

DEFUN | ( | config_who | ,
|  | config_who_cmd | ,
|  | "who" | ,
|  | "Display who is on vty\n" |
| ) |  |

References CMD_SUCCESS, vty::config, vector_active, vector_slot, VTY_NEWLINE, vty_out(), and vtyvec.

## ◆ DEFUN() [2/10]

DEFUN | ( | line_vty | ,
|  | line_vty_cmd | ,
|  | "line vty" | ,
|  | "Configure a terminal line\n" "Virtual terminal\n" |
| ) |  |

References CMD_SUCCESS, vty::node, and VTY_NODE.

## ◆ DEFUN() [3/10]

DEFUN | ( | no_service_advanced_vty | ,
|  | no_service_advanced_vty_cmd | ,
|  | "no service advanced-vty" | ,
|  | NO_STR "Set up miscellaneous service\n" "Enable advanced mode vty interface\n" |
| ) |  |

References host::advanced, and CMD_SUCCESS.

## ◆ DEFUN() [4/10]

DEFUN | ( | no_vty_login | ,
|  | no_vty_login_cmd | ,
|  | "no login" | ,
|  | NO_STR "Enable password checking\n" |
| ) |  |

References CMD_SUCCESS, and password_check.

## ◆ DEFUN() [5/10]

DEFUN | ( | service_advanced_vty | ,
|  | service_advanced_vty_cmd | ,
|  | "service advanced-vty" | ,
|  | "Set up miscellaneous service\n" "Enable advanced mode vty interface\n" |
| ) |  |

References host::advanced, and CMD_SUCCESS.

## ◆ DEFUN() [6/10]

DEFUN | ( | show_history | ,
|  | show_history_cmd | ,
|  | "show history" | ,
|  | SHOW_STR "Display the session command history\n" |
| ) |  |

References CMD_SUCCESS, vty::hindex, vty::hist, vty::index, VTY_MAXHIST, VTY_NEWLINE, and vty_out().

## ◆ DEFUN() [7/10]

DEFUN | ( | terminal_monitor | ,
|  | terminal_monitor_cmd | ,
|  | "terminal monitor" | ,
|  | "Set terminal line parameters\n" "Copy debug output to the current terminal line\n" |
| ) |  |

References CMD_SUCCESS, and vty::monitor.

## ◆ DEFUN() [8/10]

DEFUN | ( | terminal_no_monitor | ,
|  | terminal_no_monitor_cmd | ,
|  | "terminal no monitor" | ,
|  | "Set terminal line parameters\n" NO_STR "Copy debug output to the current terminal line\n" |
| ) |  |

References CMD_SUCCESS, and vty::monitor.

## ◆ DEFUN() [9/10]

DEFUN | ( | vty_bind | ,
|  | vty_bind_cmd | ,
|  | "bind A.B.C.D " | [< 0-65535 >],
|  | "Accept VTY telnet connections on local interface\n" "Local interface IP address (default: " VTY_BIND_ADDR_DEFAULT ")\n" "Local TCP port number\n" |
| ) |  |

References argc, argv, CMD_SUCCESS, tall_vty_ctx, vty_bind_addr, and vty_bind_port.

## ◆ DEFUN() [10/10]

DEFUN | ( | vty_login | ,
|  | vty_login_cmd | ,
|  | "login" | ,
|  | "Enable password checking\n" |
| ) |  |

References CMD_SUCCESS, and password_check.

## ◆ vty_auth()

static void vty_auth | ( | struct vty * | vty | ) |
| static

References host::advanced, AUTH_ENABLE_NODE, AUTH_NODE, vty::buf, host::enable, host::enable_encrypt, ENABLE_NODE, host::encrypt, vty::fail, vty::node, host::password, host::password_encrypt, vty::status, VIEW_NODE, vty::VTY_CLOSE, VTY_NEWLINE, and vty_out().

Referenced by vty_execute().

## ◆ vty_backward_char()

static void vty_backward_char | ( | struct vty * | vty | ) |
| static

References vty::cp, telnet_backward_char, and vty_write().

Referenced by vty_backward_pure_word(), vty_backward_word(), vty_beginning_of_line(), vty_delete_backward_char(), vty_escape_map(), vty_read(), and vty_transpose_chars().

## ◆ vty_backward_kill_word()

static void vty_backward_kill_word | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::cp, and vty_delete_backward_char().

Referenced by vty_read().

## ◆ vty_backward_pure_word()

static void vty_backward_pure_word | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::cp, and vty_backward_char().

Referenced by vty_complete_command().

## ◆ vty_backward_word()

static void vty_backward_word | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::cp, and vty_backward_char().

Referenced by vty_read().

## ◆ vty_beginning_of_line()

static void vty_beginning_of_line | ( | struct vty * | vty | ) |
| static

References vty::cp, and vty_backward_char().

Referenced by vty_kill_line_from_beginning(), and vty_read().

## ◆ vty_buffer_reset()

static void vty_buffer_reset | ( | struct vty * | vty | ) |
| static

References buffer_reset(), vty::obuf, vty_prompt(), and vty_redraw_line().

Referenced by vty_read().

## ◆ vty_clear_buf()

static void vty_clear_buf | ( | struct vty * | vty | ) |
| static

References vty::buf, and vty::max.

Referenced by vty_create(), vty_execute(), and vty_stop_input().

## ◆ vty_clear_screen()

static void vty_clear_screen | ( | struct vty * | vty | ) |
| static

References telnet_escape_char, vty_out(), vty_prompt(), and vty_redraw_line().

Referenced by vty_read().

## ◆ vty_command()

static int vty_command | ( | struct vty * | vty | ) |
| static

References vty::buf, CMD_ERR_AMBIGUOUS, CMD_ERR_INCOMPLETE, CMD_ERR_NO_MATCH, cmd_execute_command(), cmd_free_strvec(), cmd_make_strvec(), CMD_SUCCESS, CMD_WARNING, vty::type, VTY_FILE, VTY_NEWLINE, and vty_out().

Referenced by vty_execute().

## ◆ vty_complete_command()

static void vty_complete_command | ( | struct vty * | vty | ) |
| static

References AUTH_ENABLE_NODE, AUTH_NODE, vty::buf, cmd_complete_command(), CMD_COMPLETE_FULL_MATCH, CMD_COMPLETE_LIST_MATCH, CMD_COMPLETE_MATCH, CMD_ERR_AMBIGUOUS, CMD_ERR_NO_MATCH, CMD_ERR_NOTHING_TODO, cmd_free_strvec(), cmd_make_strvec(), vty::length, vty::node, vector_only_index_free(), vector_set(), vty_backward_pure_word(), vty_insert_word_overwrite(), VTY_NEWLINE, vty_out(), vty_prompt(), vty_redraw_line(), and vty_self_insert().

Referenced by vty_read().

## ◆ vty_config_write()

static int vty_config_write | ( | struct vty * | vty | ) |
| static

References CMD_SUCCESS, password_check, vty_bind_addr, VTY_BIND_ADDR_DEFAULT, vty_bind_port, VTY_NEWLINE, and vty_out().

Referenced by vty_init().

## ◆ vty_delete_backward_char()

static void vty_delete_backward_char | ( | struct vty * | vty | ) |
| static

References vty::cp, vty_backward_char(), and vty_delete_char().

Referenced by vty_backward_kill_word(), and vty_read().

## ◆ vty_delete_char()

static void vty_delete_char | ( | struct vty * | vty | ) |
| static

References AUTH_ENABLE_NODE, AUTH_NODE, vty::buf, vty::cp, vty::length, vty::node, telnet_backward_char, telnet_space_char, vty_down_level(), and vty_write().

Referenced by vty_delete_backward_char(), vty_forward_kill_word(), and vty_read().

## ◆ vty_describe_command()

static void vty_describe_command | ( | struct vty * | vty | ) |
| static

References vty::buf, desc::cmd, cmd_describe_command(), CMD_ERR_AMBIGUOUS, CMD_ERR_NO_MATCH, cmd_free_strvec(), cmd_make_strvec(), len(), vty::length, desc::str, vector_active, vector_free(), vector_init(), vector_set(), vector_slot, vty_describe_fold(), VTY_NEWLINE, vty_out(), vty_prompt(), vty_redraw_line(), and vty::width.

Referenced by vty_read().

## ◆ vty_describe_fold()

static void vty_describe_fold | ( | struct vty * | vty,
|  | int | cmd_width,
|  | unsigned int | desc_width,
|  | struct desc * | desc
| ) |  |
| static

References desc::cmd, desc::str, VTY_NEWLINE, and vty_out().

Referenced by vty_describe_command().

## ◆ vty_do_window_size()

static void vty_do_window_size | ( | struct vty * | vty | ) |
| static

References vty_out().

Referenced by vty_create().

## ◆ vty_dont_linemode()

static void vty_dont_linemode | ( | struct vty * | vty | ) |
| static

References vty_out().

Referenced by vty_create().

## ◆ vty_down_level()

static void vty_down_level | ( | struct vty * | vty | ) |
| static

References config_exit_cmd, CONFIG_NODE, vty::cp, cmd_element::func, vty::node, vty, vty_go_parent(), VTY_NEWLINE, vty_out(), and vty_prompt().

Referenced by vty_delete_char().

## ◆ vty_end_config()

static void vty_end_config | ( | struct vty * | vty | ) |
| static

References CFG_LOG_NODE, CONFIG_NODE, vty::cp, ENABLE_NODE, vty::node, VIEW_NODE, vty_config_unlock(), VTY_NEWLINE, VTY_NODE, vty_out(), and vty_prompt().

Referenced by vty_read().

## ◆ vty_end_of_line()

static void vty_end_of_line | ( | struct vty * | vty | ) |
| static

References vty::cp, vty::length, and vty_forward_char().

Referenced by vty_read().

## ◆ vty_ensure()

static void vty_ensure | ( | struct vty * | vty,
|  | int | length
| ) |  |
| static

References vty::buf, length, and vty::max.

Referenced by vty_self_insert(), and vty_self_insert_overwrite().

## ◆ vty_escape_map()

static void vty_escape_map | ( | unsigned char | c,
|  | struct vty * | vty
| ) |  |
| static

References c, vty::escape, vty_backward_char(), vty_forward_char(), vty_next_line(), VTY_NORMAL, and vty_previous_line().

Referenced by vty_read().

## ◆ vty_event()

void vty_event | ( | enum event | event,
|  | int | sock,
|  | struct vty * | vty
| ) |  |

callback from core VTY code about VTY related events

References vty_signal_data::event, telnet_connection::fd, osmo_fd_read_enable(), osmo_fd_write_enable(), osmo_signal_dispatch(), vty::priv, S_VTY_EVENT, vty_signal_data::sock, SS_L_VTY, telnet_close_client(), vty::type, vty_signal_data::vty, vty, VTY_CLOSED, VTY_READ, VTY_TERM, and VTY_WRITE.

Referenced by vty_close(), vty_create(), vty_out_va(), and vty_read().

## ◆ vty_execute()

static int vty_execute | ( | struct vty * | vty | ) |
| static

References AUTH_ENABLE_NODE, AUTH_NODE, CMD_SUCCESS, vty::cp, vty::length, vty::node, vty::status, vty::type, vty_auth(), vty_clear_buf(), vty_command(), vty_hist_add(), vty_prompt(), and VTY_TERM.

Referenced by vty_read().

## ◆ vty_forward_char()

static void vty_forward_char | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::cp, vty::length, and vty_write().

Referenced by vty_end_of_line(), vty_escape_map(), vty_forward_word(), and vty_read().

## ◆ vty_forward_kill_word()

static void vty_forward_kill_word | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::cp, vty::length, and vty_delete_char().

Referenced by vty_read().

## ◆ vty_forward_word()

static void vty_forward_word | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::cp, vty::length, and vty_forward_char().

Referenced by vty_read().

## ◆ vty_hist_add()

static void vty_hist_add | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::hindex, vty::hist, vty::hp, vty::length, and VTY_MAXHIST.

Referenced by vty_execute().

## ◆ vty_history_print()

static void vty_history_print | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::cp, vty::hist, vty::hp, length, vty::length, vty_kill_line_from_beginning(), and vty_redraw_line().

Referenced by vty_next_line(), and vty_previous_line().

## ◆ vty_insert_word_overwrite()

static void vty_insert_word_overwrite | ( | struct vty * | vty,
|  | char * | str
| ) |  |
| static

References vty::buf, vty::cp, len(), vty::length, and vty_write().

Referenced by vty_complete_command().

## ◆ vty_kill_line()

static void vty_kill_line | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::cp, vty::length, telnet_backward_char, telnet_space_char, and vty_write().

Referenced by vty_kill_line_from_beginning(), and vty_read().

## ◆ vty_kill_line_from_beginning()

static void vty_kill_line_from_beginning | ( | struct vty * | vty | ) |
| static

References vty_beginning_of_line(), and vty_kill_line().

Referenced by vty_history_print(), and vty_read().

## ◆ vty_next_line()

static void vty_next_line | ( | struct vty * | vty | ) |
| static

References vty::hindex, vty::hist, vty::hp, vty_history_print(), and VTY_MAXHIST.

Referenced by vty_escape_map(), and vty_read().

## ◆ vty_out()

int vty_out | ( | struct vty * | vty,
|  | const char * | format,
|  |  | ...
| ) |  |

VTY standard output function.

Parameters

  [in] | vty | VTY to which we should print
  [in] | format | variable-length format string

References vty_out_va().

Referenced by DEFUN(), vty_auth(), vty_clear_screen(), vty_command(), vty_complete_command(), vty_config_write(), vty_create(), vty_describe_command(), vty_describe_fold(), vty_do_window_size(), vty_dont_linemode(), vty_down_level(), vty_end_config(), vty_hello(), vty_out_uptime(), vty_prompt(), vty_read(), vty_stop_input(), vty_telnet_option(), vty_will_echo(), and vty_will_suppress_go_ahead().

## ◆ vty_previous_line()

static void vty_previous_line | ( | struct vty * | vty | ) |
| static

References vty::hist, vty::hp, vty_history_print(), and VTY_MAXHIST.

Referenced by vty_escape_map(), and vty_read().

## ◆ vty_prompt()

static void vty_prompt | ( | struct vty * | vty | ) |
| static

References host::app_info, cmd_prompt(), vty_app_info::name, vty::node, vty::type, vty_out(), and VTY_TERM.

Referenced by vty_buffer_reset(), vty_clear_screen(), vty_complete_command(), vty_create(), vty_describe_command(), vty_down_level(), vty_end_config(), vty_execute(), and vty_stop_input().

## ◆ vty_redraw_line()

static void vty_redraw_line | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::cp, vty::length, and vty_write().

Referenced by vty_buffer_reset(), vty_clear_screen(), vty_complete_command(), vty_describe_command(), and vty_history_print().

## ◆ vty_save_cwd()

static void vty_save_cwd | ( | void |  | ) |
| static

References c, MAXPATHLEN, SYSCONFDIR, tall_vty_ctx, and vty_cwd.

Referenced by vty_init().

## ◆ vty_self_insert()

static void vty_self_insert | ( | struct vty * | vty,
|  | char | c
| ) |  |
| static

References vty::buf, c, vty::cp, length, vty::length, telnet_backward_char, vty_ensure(), and vty_write().

Referenced by vty_complete_command(), and vty_read().

## ◆ vty_self_insert_overwrite()

static void vty_self_insert_overwrite | ( | struct vty * | vty,
|  | char | c
| ) |  |
| static

References AUTH_ENABLE_NODE, AUTH_NODE, vty::buf, c, vty::cp, vty::length, vty::node, vty_ensure(), and vty_write().

Referenced by vty_transpose_chars().

## ◆ vty_stop_input()

static void vty_stop_input | ( | struct vty * | vty | ) |
| static

References vty::cp, vty::hindex, vty::hp, vty::length, vty_clear_buf(), VTY_NEWLINE, vty_out(), and vty_prompt().

Referenced by vty_read().

## ◆ vty_telnet_option()

static int vty_telnet_option | ( | struct vty * | vty,
|  | unsigned char * | buf,
|  | int | nbytes
| ) |  |
| static

References vty::height, vty::iac_sb_in_progress, vty::sb_buf, vty::sb_len, TELNET_NAWS_SB_LEN, VTY_NEWLINE, vty_out(), and vty::width.

Referenced by vty_read().

## ◆ vty_transpose_chars()

static void vty_transpose_chars | ( | struct vty * | vty | ) |
| static

References vty::buf, vty::cp, vty::length, vty_backward_char(), and vty_self_insert_overwrite().

Referenced by vty_read().

## ◆ vty_will_echo()

static void vty_will_echo | ( | struct vty * | vty | ) |
| static

References vty_out().

Referenced by vty_create().

## ◆ vty_will_suppress_go_ahead()

static void vty_will_suppress_go_ahead | ( | struct vty * | vty | ) |
| static

References vty_out().

Referenced by vty_create().

## ◆ vty_write()

static void vty_write | ( | struct vty * | vty,
|  | const char * | buf,
|  | size_t | nbytes
| ) |  |
| static

References AUTH_ENABLE_NODE, AUTH_NODE, buffer_put(), vty::node, and vty::obuf.

Referenced by vty_backward_char(), vty_delete_char(), vty_forward_char(), vty_insert_word_overwrite(), vty_kill_line(), vty_redraw_line(), vty_self_insert(), and vty_self_insert_overwrite().

## Variable Documentation

## ◆ password_check

int password_check
| static

Referenced by DEFUN(), vty_config_write(), and vty_create().

## ◆ telnet_backward_char

const char telnet_backward_char = 0x08
| static

Referenced by vty_backward_char(), vty_delete_char(), vty_kill_line(), and vty_self_insert().

## ◆ telnet_escape_char

const char telnet_escape_char = 0x1B
| static

Referenced by vty_clear_screen().

## ◆ telnet_space_char

const char telnet_space_char = ' '
| static

Referenced by vty_delete_char(), and vty_kill_line().

## ◆ vty_bind_addr

const char* vty_bind_addr = NULL
| static

Referenced by DEFUN(), vty_config_write(), and vty_get_bind_addr().

## ◆ vty_bind_port

int vty_bind_port = -1
| static

Referenced by DEFUN(), vty_config_write(), and vty_get_bind_port().

## ◆ vty_config

int vty_config
| static

Referenced by vty_config_lock(), and vty_config_unlock().

## ◆ vty_cwd

char* vty_cwd = NULL

Referenced by vty_get_cwd(), and vty_save_cwd().

## ◆ vty_node

struct cmd_node vty_node

Initial value:
= {
VTY_NODE,
"%s(config-line)# ",
1,
}
VTY_NODE
@ VTY_NODE
Vty node.
Definition: command.h:84

Referenced by vty_init().

## ◆ vtyvec

vector vtyvec
| static

Referenced by DEFUN(), vty_close(), vty_create(), vty_init(), vty_init_vtysh(), and vty_reset().

## ◆ Vvty_serv_thread

vector Vvty_serv_thread

Referenced by vty_reset().