libosmovty  0.12.0
Osmocom VTY library
buffer.h File Reference
#include <sys/types.h>

Go to the source code of this file.

Enumerations

enum  buffer_status_t {
  BUFFER_ERROR = -1,
  BUFFER_EMPTY = 0,
  BUFFER_PENDING = 1
}
 

Functions

struct bufferbuffer_new (void *ctx, size_t)
 
void buffer_reset (struct buffer *)
 
void buffer_free (struct buffer *)
 
void buffer_put (struct buffer *, const void *, size_t)
 
void buffer_putc (struct buffer *, unsigned char)
 
void buffer_putstr (struct buffer *, const char *)
 
char * buffer_getstr (struct buffer *)
 
int buffer_empty (struct buffer *)
 
buffer_status_t buffer_write (struct buffer *, int fd, const void *, size_t)
 
buffer_status_t buffer_flush_available (struct buffer *, int fd)
 
buffer_status_t buffer_flush_all (struct buffer *, int fd)
 
buffer_status_t buffer_flush_window (struct buffer *, int fd, int width, int height, int erase, int no_more)
 

Detailed Description

Buffering to output and input.

Enumeration Type Documentation

◆ buffer_status_t

Enumerator
BUFFER_ERROR 
BUFFER_EMPTY 
BUFFER_PENDING 

Function Documentation

◆ buffer_empty()

int buffer_empty ( struct buffer )

References buffer::head.

◆ buffer_flush_all()

buffer_status_t buffer_flush_all ( struct buffer ,
int  fd 
)

◆ buffer_flush_available()

◆ buffer_flush_window()

buffer_status_t buffer_flush_window ( struct buffer ,
int  fd,
int  width,
int  height,
int  erase,
int  no_more 
)

◆ buffer_free()

void buffer_free ( struct buffer )

References buffer_reset().

Referenced by vty_close(), and vty_new().

◆ buffer_getstr()

char* buffer_getstr ( struct buffer )

◆ buffer_new()

struct buffer* buffer_new ( void *  ctx,
size_t   
)

References BUFFER_SIZE_DEFAULT, and buffer::size.

Referenced by vty_new().

◆ buffer_put()

void buffer_put ( struct buffer ,
const void *  ,
size_t   
)

◆ buffer_putc()

void buffer_putc ( struct buffer ,
unsigned char   
)

References buffer_put().

◆ buffer_putstr()

void buffer_putstr ( struct buffer ,
const char *   
)

References buffer_put().

◆ buffer_reset()

◆ buffer_write()

buffer_status_t buffer_write ( struct buffer ,
int  fd,
const void *  ,
size_t   
)
cmd_node_vector
static vector cmd_node_vector(vector v, enum node_type ntype)
Definition: command.c:851
vty_go_parent
int vty_go_parent(struct vty *vty)
Definition: command.c:2147
cmd_execute_command_real
static int cmd_execute_command_real(vector vline, struct vty *vty, struct cmd_element **cmd)
Definition: command.c:2189
vty::index
void * index
For current referencing point of interface, route-map, access-list etc...
Definition: vty.h:110
log_target_create_vty
struct log_target * log_target_create_vty(struct vty *vty)
Definition: logging_vty.c:73
vararg_match
@ vararg_match
Definition: command.c:867
vty::sb_len
size_t sb_len
How many subnegotiation characters have we received?
Definition: vty.h:139
vty_command
static int vty_command(struct vty *vty, char *buf)
Definition: vty.c:414
cmd_describe_command_real
static vector cmd_describe_command_real(vector vline, struct vty *vty, int *status)
Definition: command.c:1725
SHOW_STATS_STR
#define SHOW_STATS_STR
Definition: stats_vty.c:44
VTY_BIND_ADDR_DEFAULT
#define VTY_BIND_ADDR_DEFAULT
Definition: vty.c:97
client_data
static int client_data(struct osmo_fd *fd, unsigned int what)
Definition: telnet_interface.c:128
buffer::size
size_t size
Definition: buffer.c:45
_vector
Definition: vector.h:27
BASE_CMD_STR
#define BASE_CMD_STR
Definition: talloc_ctx_vty.c:169
vty_do_window_size
static void vty_do_window_size(struct vty *vty)
Definition: vty.c:731
telnet_close_client
int telnet_close_client(struct osmo_fd *fd)
close a telnet connection
Definition: telnet_interface.c:111
vty_shell
int vty_shell(struct vty *vty)
Return if this VTY is a shell or not.
Definition: vty.c:248
vector_set_index
int vector_set_index(vector v, unsigned int i, void *val)
Definition: vector.c:149
NO_STR
#define NO_STR
Definition: command.h:310
vty_app_info::tall_ctx
void * tall_ctx
talloc context
Definition: vty.h:179
enable_node
struct cmd_node enable_node
Definition: command.c:91
cmd_node::node
int node
Node index.
Definition: command.h:115
vty_delete_char
static void vty_delete_char(struct vty *vty)
Definition: vty.c:878
telnet_backward_char
static const char telnet_backward_char
Definition: vty.c:447
tall_vty_cmd_ctx
void * tall_vty_cmd_ctx
Definition: command.c:63
telnet_connection::dbg
struct log_target * dbg
logging target associated with this telnet connection
Definition: telnet_interface.h:45
host::advanced
int advanced
Flags for services.
Definition: command.h:59
telnet_new_connection
static int telnet_new_connection(struct osmo_fd *fd, unsigned int what)
Definition: telnet_interface.c:151
rate_ctr_handler_fmt
static int rate_ctr_handler_fmt(struct rate_ctr_group *ctrg, struct rate_ctr *ctr, const struct rate_ctr_desc *desc, void *vctx_)
Definition: utils.c:103
vty::length
int length
Command length.
Definition: vty.h:94
cmd_node::func
int(* func)(struct vty *)
Node's configuration write function.
Definition: command.h:124
vty::indent
char * indent
When reading from a config file, these are the indenting characters expected for children of the curr...
Definition: vty.h:159
vty_app_info::name
const char * name
name of the application
Definition: vty.h:173
CMD_COMPLETE_FULL_MATCH
#define CMD_COMPLETE_FULL_MATCH
Definition: command.h:167
install_node_bare
static void install_node_bare(struct cmd_node *node, int(*func)(struct vty *))
Install top node of command vector, without adding basic node commands.
Definition: command.c:170
CMD_VARARG
#define CMD_VARARG(S)
Definition: command.h:298
CMD_ERR_NO_MATCH
#define CMD_ERR_NO_MATCH
Definition: command.h:162
len
static size_t len(const char *str)
Definition: command.c:2446
vty_stop_input
static void vty_stop_input(struct vty *vty)
Definition: vty.c:1216
install_default
void install_default(int node_type) OSMO_DEPRECATED("Now happens implicitly with install_node()")
Deprecated, now happens implicitly when calling install_node().
Definition: command.c:3687
cmd_execute_command
int cmd_execute_command(vector, struct vty *, struct cmd_element **, int)
Definition: command.c:2302
CFG_REPORTER_STR
#define CFG_REPORTER_STR
Definition: stats_vty.c:42
cmd_element::doc
const char * doc
Documentation of this command.
Definition: command.h:144
n
write Write running configuration to or terminal n Write configuration to the copy running config startup Copy configuration n Copy running config to n Copy running config to startup write Write running configuration to or terminal n Write to terminal n
Definition: command.c:2942
vty_pop_parent
static bool vty_pop_parent(struct vty *vty)
Definition: command.c:2112
vty_backward_pure_word
static void vty_backward_pure_word(struct vty *vty)
Definition: vty.c:818
cmd_entry_function
static const char * cmd_entry_function(const char *src, const char *dst)
Definition: command.c:1608
ipv4_prefix_match
@ ipv4_prefix_match
Definition: command.c:862
vty_beginning_of_line
static void vty_beginning_of_line(struct vty *vty)
Definition: vty.c:533
VTY_CLOSED
@ VTY_CLOSED
Definition: vty.h:34
vty::hist
char * hist[VTY_MAXHIST]
Histry of command.
Definition: vty.h:100
Vvty_serv_thread
vector Vvty_serv_thread
Definition: vty.c:89
BUFFER_PENDING
@ BUFFER_PENDING
Definition: buffer.h:68
telnet_connection::priv
void * priv
private data pointer passed through
Definition: telnet_interface.h:39
config_write_log_single
static int config_write_log_single(struct vty *vty, struct log_target *tgt)
Definition: logging_vty.c:748
vty_bind_addr
static const char * vty_bind_addr
Definition: vty.c:96
cfg_stats_node
struct cmd_node cfg_stats_node
Definition: stats_vty.c:59
vty_signal_data::event
enum event event
Definition: vty.h:228
server_socket
static struct osmo_fd server_socket
Definition: telnet_interface.c:61
write_config_file
static int write_config_file(const char *config_file, char **outpath)
Definition: command.c:2742
cmp_node
static int cmp_node(const void *p, const void *q)
Definition: command.c:187
xml_escape
static char * xml_escape(const char *inp)
Definition: command.c:549
vty_kill_line_from_beginning
static void vty_kill_line_from_beginning(struct vty *)
Definition: vty.c:938
vty::iac_sb_in_progress
unsigned char iac_sb_in_progress
IAC SB (option subnegotiation) handling.
Definition: vty.h:129
set_srep_parameter_str
static int set_srep_parameter_str(struct vty *vty, int(*fun)(struct osmo_stats_reporter *, const char *), const char *val, const char *param_name)
Definition: stats_vty.c:80
config_end_cmd
struct cmd_element config_end_cmd
vector_active
#define vector_active(V)
Definition: vector.h:44
MAXPATHLEN
#define MAXPATHLEN
Definition: command.c:51
telnet_interface.h
osmo_talloc_vty_add_cmds
void osmo_talloc_vty_add_cmds(void)
Install VTY commands for talloc context introspection.
Definition: talloc_ctx_vty.c:276
desc::cmd
const char * cmd
Command string.
Definition: command.h:155
cmd_complete_command
char ** cmd_complete_command(vector vline, struct vty *vty, int *status)
Definition: command.c:2075
config
write Write running configuration to or terminal n Write configuration to the copy running config startup config
Definition: command.c:2931
buffer_getstr
char * buffer_getstr(struct buffer *b)
Definition: buffer.c:100
DEFUN
DEFUN(show_talloc_ctx, show_talloc_ctx_cmd, BASE_CMD_STR, BASE_CMD_DESCR)
Definition: talloc_ctx_vty.c:180
vty_hist_add
static void vty_hist_add(struct vty *vty)
Definition: vty.c:547
cmd_free_strvec
void cmd_free_strvec(vector)
Free allocated string vector.
Definition: command.c:334
buffer_reset
void buffer_reset(struct buffer *b)
Definition: buffer.c:127
VTY_NEWLINE
#define VTY_NEWLINE
Definition: vty.h:163
cmd_element
Structure of a command element.
Definition: command.h:141
node_type
node_type
There are some command levels which called from command node.
Definition: command.h:71
vector_only_wrapper_free
void vector_only_wrapper_free(vector v)
Definition: vector.c:63
DEFUN
DEFUN(config_who, config_who_cmd, "who", "Display who is on vty\n")
Definition: vty.c:1582
any_match
@ any_match
Definition: command.c:860
vty_cwd
char * vty_cwd
Definition: vty.c:91
osmo_vty_write_config_file
int osmo_vty_write_config_file(const char *filename)
Write the current running config to a given file.
Definition: command.c:3746
telnet_connection::entry
struct llist_head entry
linked list header for internal management
Definition: telnet_interface.h:37
vty::cp
int cp
Command cursor point.
Definition: vty.h:91
WALK_FILTER_TREE
@ WALK_FILTER_TREE
Definition: talloc_ctx_vty.c:40
buffer::tail
struct buffer_data * tail
Definition: buffer.c:42
vector_lookup
void * vector_lookup(vector, unsigned int)
Definition: vector.c:162
MAX_CHUNKS
#define MAX_CHUNKS
CMD_ERR_NOTHING_TODO
#define CMD_ERR_NOTHING_TODO
Definition: command.h:166
host::password
char * password
Password for vty interface.
Definition: command.h:42
vty_get_bind_addr
const char * vty_get_bind_addr(void)
Definition: vty.c:1627
vty_end_config
static void vty_end_config(struct vty *vty)
Definition: vty.c:849
config_list_cmd
struct cmd_element config_list_cmd
range_match
@ range_match
Definition: command.c:866
vty_config_unlock
int vty_config_unlock(struct vty *)
Unlock the configuration from a given VTY.
Definition: vty.c:353
VECTOR_MIN_SIZE
#define VECTOR_MIN_SIZE
Definition: vector.h:34
cmd_element::cmdsize
unsigned int cmdsize
Command index count.
Definition: command.h:147
vector_empty_slot
int vector_empty_slot(vector v)
Definition: vector.c:118
tall_vty_vec_ctx
void * tall_vty_vec_ctx
Definition: vector.c:39
vty_out_fsm
void vty_out_fsm(struct vty *vty, struct osmo_fsm *fsm)
Print information about a FSM [class] to the given VTY.
Definition: fsm_vty.c:56
vty_execute
static int vty_execute(struct vty *vty)
Definition: vty.c:677
CFG_STATS_NODE
@ CFG_STATS_NODE
Configure the statistics.
Definition: command.h:80
CONFIGFILE_MASK
#define CONFIGFILE_MASK
Definition: command.c:61
vty_out_statistics_full
void vty_out_statistics_full(struct vty *vty, const char *prefix)
Definition: utils.c:336
cmd_node::name
char name[64]
Human-readable ID of this node.
Definition: command.h:132
vty_out_rate_ctr_group
void vty_out_rate_ctr_group(struct vty *vty, const char *prefix, struct rate_ctr_group *ctrg)
print a rate counter group to given VTY
Definition: utils.c:77
vty_save_cwd
static void vty_save_cwd(void)
Definition: vty.c:1741
vty_forward_kill_word
static void vty_forward_kill_word(struct vty *vty)
Definition: vty.c:945
CMD_ERR_AMBIGUOUS
#define CMD_ERR_AMBIGUOUS
Definition: command.h:163
partly_match
@ partly_match
Definition: command.c:868
vty_new
struct vty * vty_new(void)
Allocate a new vty interface structure.
Definition: vty.c:112
vty::lines
int lines
Configure lines.
Definition: vty.h:147
CMD_IPV4_PREFIX
#define CMD_IPV4_PREFIX(S)
Definition: command.h:302
osmo_fsm_vty_add_cmds
void osmo_fsm_vty_add_cmds(void)
Install VTY commands for FSM introspection This installs a couple of VTY commands for introspection o...
Definition: fsm_vty.c:186
vty.h
ALIAS
ALIAS(config_write_file, config_write_cmd, "write", "Write running configuration to memory, network, or terminal\n") ALIAS(config_write_file
exact_match
@ exact_match
Definition: command.c:869
vty_dont_linemode
static void vty_dont_linemode(struct vty *vty)
Definition: vty.c:723
buffer_free
void buffer_free(struct buffer *b)
Definition: buffer.c:93
vty_forward_char
static void vty_forward_char(struct vty *vty)
Definition: vty.c:515
vty_kill_line
static void vty_kill_line(struct vty *vty)
Definition: vty.c:918
MAXPATHLEN
#define MAXPATHLEN
Definition: vty.c:71
vty_init_vtysh
void vty_init_vtysh(void)
Definition: vty.c:1769
vty_telnet_option
static int vty_telnet_option(struct vty *vty, unsigned char *buf, int nbytes)
Definition: vty.c:578
log_deprecated_func
static int log_deprecated_func(struct cmd_element *cmd, struct vty *vty, int argc, const char *argv[])
Definition: logging_vty.c:833
telnet_space_char
static const char telnet_space_char
Definition: vty.c:448
vty_backward_char
static void vty_backward_char(struct vty *vty)
Definition: vty.c:524
buffer_put
void buffer_put(struct buffer *b, const void *p, size_t size)
Definition: buffer.c:162
vector_lookup_ensure
void * vector_lookup_ensure(vector v, unsigned int i)
Definition: vector.c:170
VTY_WRITE
@ VTY_WRITE
Definition: vty.h:33
vty_clear_buf
static void vty_clear_buf(struct vty *vty)
Definition: vty.c:106
vty_complete_command
static void vty_complete_command(struct vty *vty)
Definition: vty.c:992
vty::fd
int fd
File descripter of this vty.
Definition: vty.h:73
SH_FSMI_STR
#define SH_FSMI_STR
Definition: fsm_vty.c:111
LLIST_HEAD
LLIST_HEAD(active_connections)
cmd_node
Node which has some commands and prompt string and configuration function pointer .
Definition: command.h:113
install_element_ve
void install_element_ve(struct cmd_element *cmd)
Definition: command.c:775
DEFUN
DEFUN(show_fsms, show_fsms_cmd, "show fsm all", SH_FSM_STR "Display a list of all registered finite state machines\n")
Definition: fsm_vty.c:113
vty_dump_nodes
static int vty_dump_nodes(struct vty *vty)
Definition: command.c:662
DEFUN
DEFUN(cfg_stats_reporter_local_ip, cfg_stats_reporter_local_ip_cmd, "local-ip ADDR", "Set the IP address to which we bind locally\n" "IP Address\n")
Definition: stats_vty.c:119
extend_match
@ extend_match
Definition: command.c:861
vty_escape_map
static void vty_escape_map(unsigned char c, struct vty *vty)
Definition: vty.c:1251
network
write Write running configuration to network
Definition: command.c:2926
CONF_BACKUP_EXT
#define CONF_BACKUP_EXT
Definition: command.h:341
VTY_FILE
@ VTY_FILE
Definition: vty.h:45
osmo_asciidoc_escape
char * osmo_asciidoc_escape(const char *inp)
escape all special asciidoc symbols
Definition: command.c:501
asciidoc_counter_generate
static void asciidoc_counter_generate(struct vty *vty)
Definition: stats_vty.c:394
DEFUN
DEFUN(config_terminal, config_terminal_cmd, "configure terminal", "Configuration from vty interface\n" "Configuration terminal\n")
Definition: command.c:2602
buffer_flush_all
buffer_status_t buffer_flush_all(struct buffer *b, int fd)
Definition: buffer.c:199
vty::priv
void * priv
private data, specified by creator
Definition: vty.h:70
host_config_set
void host_config_set(const char *)
Definition: command.c:3679
buffer_new
struct buffer * buffer_new(void *ctx, size_t size)
Definition: buffer.c:71
cmd_lcd
static int cmd_lcd(char **matched)
Definition: command.c:1901
cmd_element::func
int(* func)(struct cmd_element *, struct vty *, int, const char *[])
Definition: command.h:143
vty::max
int max
Command max length.
Definition: vty.h:97
cmd_ipv4_prefix_match
static enum match_type cmd_ipv4_prefix_match(const char *str)
Definition: command.c:925
buffer_new
struct buffer * buffer_new(void *ctx, size_t)
Definition: buffer.c:71
BASE_CMD_DESCR
#define BASE_CMD_DESCR
Definition: talloc_ctx_vty.c:172
vty_out_context
Definition: utils.c:47
buffer_data::cp
size_t cp
Definition: buffer.c:53
cfg_no_description_cmd
struct cmd_element cfg_no_description_cmd
osmo_vty_save_config_file
int osmo_vty_save_config_file(void)
Save the current state to the config file.
Definition: command.c:3764
vty_parent_node::node
int node
Node status of this vty.
Definition: vty.h:57
buffer_data::next
struct buffer_data * next
Definition: buffer.c:50
AUTH_ENABLE_NODE
@ AUTH_ENABLE_NODE
Authentication mode for change enable.
Definition: command.h:74
vty_transpose_chars
static void vty_transpose_chars(struct vty *vty)
Definition: vty.c:963
install_node
void install_node(struct cmd_node *, int(*)(struct vty *))
Install top node of command vector.
Definition: command.c:180
default_motd
const char * default_motd
Definition: command.c:104
CONFIG_NODE
@ CONFIG_NODE
Config node.
Definition: command.h:76
telnet_connection
A telnet connection.
Definition: telnet_interface.h:35
logging_vty_add_deprecated_subsys
void logging_vty_add_deprecated_subsys(void *ctx, const char *name)
Definition: logging_vty.c:839
CMD_VARIABLE
#define CMD_VARIABLE(S)
Definition: command.h:297
vector_count
unsigned int vector_count(vector v)
Definition: vector.c:191
osmo_stat_item_group_handler
static int osmo_stat_item_group_handler(struct osmo_stat_item_group *statg, void *vctx_)
Definition: utils.c:282
rate_ctr_group_handler
static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_)
Definition: stats_vty.c:533
vector_init
vector vector_init(unsigned int size)
Definition: vector.c:42
match_type
match_type
Definition: command.c:858
vector_copy
vector vector_copy(vector v)
Definition: vector.c:79
view_node
struct cmd_node view_node
Definition: command.c:79
MAX_FLUSH
#define MAX_FLUSH
vector_free
void vector_free(vector v)
Definition: vector.c:73
command.h
rate_ctr_group_handler
static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *vctx_)
Definition: utils.c:223
osmo_stats_vty_add_cmds
void osmo_stats_vty_add_cmds()
Add stats related commands to the VTY Call this once during your application initialization if you wo...
Definition: stats_vty.c:616
osmo_stats_vty2srep
static struct osmo_stats_reporter * osmo_stats_vty2srep(struct vty *vty)
Definition: stats_vty.c:72
CFG_STATS_STR
#define CFG_STATS_STR
Definition: stats_vty.c:41
cmd_element::strvec
vector strvec
Pointing out each description vector.
Definition: command.h:146
CMD_ERR_INVALID_INDENT
#define CMD_ERR_INVALID_INDENT
Definition: command.h:171
CONTROL
#define CONTROL(X)
Definition: vty.c:1245
SHOW_STR
#define SHOW_STR
Definition: command.h:307
buffer_putstr
void buffer_putstr(struct buffer *b, const char *c)
Definition: buffer.c:192
STATE_MASK
#define STATE_MASK
Definition: command.c:1004
vty_app_info::version
const char * version
version string of the application
Definition: vty.h:175
CFG_LOG_NODE
@ CFG_LOG_NODE
Configure the logging.
Definition: command.h:79
talloc_ctx_walk
static void talloc_ctx_walk(const char *ctx, const char *depth, struct walk_cb_params *params)
Parse talloc context and depth values from a VTY command.
Definition: talloc_ctx_vty.c:145
desc_unique_string
static int desc_unique_string(vector v, const char *str)
Definition: command.c:1700
vty_buffer_reset
static void vty_buffer_reset(struct vty *vty)
Definition: vty.c:1275
vty_parent_node::priv
void * priv
private data, specified by creator
Definition: vty.h:54
vty_parent_node::entry
struct llist_head entry
Definition: vty.h:51
CMD_RANGE
#define CMD_RANGE(S)
Definition: command.h:299
vty_signal_data
Definition: vty.h:227
telnet_init
int telnet_init(void *tall_ctx, void *priv, int port)
Initialize telnet based VTY interface listening to 127.0.0.1.
Definition: telnet_interface.c:72
pad_append_str
static char * pad_append_str(char *s, const char *a, int minwidth)
Definition: utils.c:88
vty_will_echo
static void vty_will_echo(struct vty *vty)
Definition: vty.c:707
host::motdfile
char * motdfile
Definition: command.h:64
vty_describe_fold
static void vty_describe_fold(struct vty *vty, int cmd_width, unsigned int desc_width, struct desc *desc)
Definition: vty.c:1065
vty_insert_word_overwrite
static void vty_insert_word_overwrite(struct vty *vty, char *str)
Definition: vty.c:505
ipv6_prefix_match
@ ipv6_prefix_match
Definition: command.c:864
vector_slot
#define vector_slot(V, I)
Definition: vector.h:39
vty_install_default
void vty_install_default(int node_type) OSMO_DEPRECATED("Now happens implicitly with install_node()")
Deprecated, now happens implicitly when calling install_node().
Definition: command.c:3694
telnet_connection::fd
struct osmo_fd fd
filedsecriptor (socket )
Definition: telnet_interface.h:41
local_sysl_map
static const int local_sysl_map[]
Definition: logging_vty.c:488
_cfg_log_syslog
static int _cfg_log_syslog(struct vty *vty, int facility)
Definition: logging_vty.c:502
sysl_level_names
static struct value_string sysl_level_names[]
Definition: logging_vty.c:535
vty::width
int width
Window width.
Definition: vty.h:142
vty_close
void vty_close(struct vty *)
Close a given vty interface.
Definition: vty.c:207
vty_next_line
static void vty_next_line(struct vty *vty)
Definition: vty.c:758
vty::sb_buf
unsigned char sb_buf[TELNET_NAWS_SB_LEN]
sub-negotiation buffer
Definition: vty.h:135
misc.h
cmd_describe_command
vector cmd_describe_command(vector vline, struct vty *vty, int *status)
Definition: command.c:1870
BUFFER_DATA_FREE
#define BUFFER_DATA_FREE(D)
Definition: buffer.c:68
buffer_add
static struct buffer_data * buffer_add(struct buffer *b)
Definition: buffer.c:140
vty
Internal representation of a single VTY.
Definition: vty.h:65
config_write_stats
static int config_write_stats(struct vty *vty)
Definition: stats_vty.c:597
vty::type
enum vty_type type
Is this vty connect to file or not.
Definition: vty.h:76
is_cmd_ambiguous
static int is_cmd_ambiguous(char *command, vector v, int index, enum match_type type)
Definition: command.c:1480
vty::hindex
int hindex
History insert end point.
Definition: vty.h:106
pad_append_ctr
static char * pad_append_ctr(char *s, uint64_t ctr, int minwidth)
Definition: utils.c:96
config_write_stats_reporter
static int config_write_stats_reporter(struct vty *vty, struct osmo_stats_reporter *srep)
Definition: stats_vty.c:549
STATE_START
#define STATE_START
Definition: command.c:998
TELNET_NAWS_SB_LEN
#define TELNET_NAWS_SB_LEN
Definition: vty.h:133
copy_runningconfig_startupconfig_cmd
write Write running configuration to or terminal n Write configuration to the copy_runningconfig_startupconfig_cmd
Definition: command.c:2930
vty_current_index
void * vty_current_index(struct vty *vty)
return the current index of a given VTY
Definition: vty.c:323
config_from_file
int config_from_file(struct vty *, FILE *)
Definition: command.c:2472
cmd_prompt
const char * cmd_prompt(enum node_type)
Return prompt character of specified node.
Definition: command.c:488
cmd_make_descvec
static vector cmd_make_descvec(const char *string, const char *descstr)
New string vector.
Definition: command.c:385
vty_clear_parents
static void vty_clear_parents(struct vty *vty)
Definition: command.c:2127
tall_telnet_ctx
static void * tall_telnet_ctx
Definition: telnet_interface.c:56
WALK_FILTER_REGEXP
@ WALK_FILTER_REGEXP
Definition: talloc_ctx_vty.c:39
CMD_WARNING
#define CMD_WARNING
Definition: command.h:161
buffer_flush_available
buffer_status_t buffer_flush_available(struct buffer *b, int fd)
Definition: buffer.c:379
check_element_exists
static int check_element_exists(struct cmd_node *cnode, const char *cmdstring)
Definition: command.c:738
asciidoc_osmo_stat_item_group_handler
static int asciidoc_osmo_stat_item_group_handler(struct osmo_stat_item_group *statg, void *sctx_)
Definition: stats_vty.c:485
DEFUN_HIDDEN
DEFUN_HIDDEN(do_echo, echo_cmd, "echo .MESSAGE", "Echo a message back to the vty\n" "The message to echo\n")
Definition: command.c:3275
telnet_init_dynif
int telnet_init_dynif(void *tall_ctx, void *priv, const char *ip, int port)
Initialize telnet based VTY interface.
Definition: telnet_interface.c:83
host::enable_encrypt
char * enable_encrypt
Definition: command.h:47
host::lines
int lines
System wide terminal lines.
Definition: command.h:50
vty_reset
void vty_reset(void)
Reset all VTY status.
Definition: vty.c:1719
vty::buf
char * buf
Command input buffer.
Definition: vty.h:88
ENABLE_NODE
@ ENABLE_NODE
Enable node.
Definition: command.h:75
vty_app_info::is_config_node
int(* is_config_node)(struct vty *vty, int node)
call-back to determine if node is config node
Definition: vty.h:183
vty::node
int node
Node status of this vty.
Definition: vty.h:79
vty_out_context::max_level
int max_level
Definition: utils.c:50
buffer_status_t
buffer_status_t
Definition: buffer.h:56
node_name_from_prompt
static const char * node_name_from_prompt(const char *prompt, char *name_buf, size_t name_buf_size)
Definition: command.c:144
vty_print_logtarget
static void vty_print_logtarget(struct vty *vty, const struct log_info *info, const struct log_target *tgt)
Definition: logging_vty.c:356
config_exit_cmd
struct cmd_element config_exit_cmd
logging_print_file_args
static const struct value_string logging_print_file_args[]
Definition: logging_vty.c:240
walk_cb_params::chunk_ptr
const void * chunk_ptr
Definition: talloc_ctx_vty.c:46
S_VTY_EVENT
@ S_VTY_EVENT
Definition: vty.h:224
LOG_STR
#define LOG_STR
Definition: logging_vty.c:42
cmd_range_match
static int cmd_range_match(const char *range, const char *str)
Definition: command.c:1231
AUTH_NODE
@ AUTH_NODE
Authentication mode of vty interface.
Definition: command.h:72
cmd_element::string
const char * string
Command specification by string.
Definition: command.h:142
DEFUN_DEPRECATED
#define DEFUN_DEPRECATED(funcname, cmdname, cmdstr, helpstr)
Definition: command.h:238
gDEFUN
gDEFUN(cfg_description, cfg_description_cmd, "description .TEXT", "Save human-readable description of the object\n" "Text until the end of the line\n")
Definition: logging_vty.c:435
vty_dump_element
static int vty_dump_element(struct cmd_element *cmd, struct vty *vty)
Definition: command.c:624
DECIMAL_STRLEN_MAX
#define DECIMAL_STRLEN_MAX
Definition: command.c:1229
CMD_ERR_EXEED_ARGC_MAX
#define CMD_ERR_EXEED_ARGC_MAX
Definition: command.h:165
cmd_element::daemon
int daemon
Daemon to which this command belong.
Definition: command.h:145
install_basic_node_commands
static void install_basic_node_commands(int node)
Install common commands like 'exit' and 'list'.
Definition: command.c:3699
cmd_unique_string
static int cmd_unique_string(vector v, const char *str)
Definition: command.c:1686
cmd_element::attr
unsigned char attr
Command attributes.
Definition: command.h:150
host::app_info
const struct vty_app_info * app_info
VTY application information.
Definition: command.h:67
vty_out
int vty_out(struct vty *, const char *,...) VTY_PRINTF_ATTRIBUTE(2
vty_app_info::go_parent_cb
int(* go_parent_cb)(struct vty *vty)
call-back for returning to parent n ode
Definition: vty.h:181
vty_signal_data::sock
int sock
Definition: vty.h:229
is_config_child
static int is_config_child(struct vty *vty)
Definition: command.c:203
vty_cmd_string_from_valstr
char * vty_cmd_string_from_valstr(void *ctx, const struct value_string *vals, const char *prefix, const char *sep, const char *end, int do_lower)
Generate a VTY command string from value_string.
Definition: utils.c:342
host::enable
char * enable
Enable password.
Definition: command.h:46
buffer
Definition: buffer.c:39
vty_app_info::config_is_consistent
int(* config_is_consistent)(struct vty *vty)
Check if the config is consistent before write.
Definition: vty.h:185
install_element
void install_element(int node_type, struct cmd_element *)
Install a command into a node.
Definition: command.c:757
vty_read_config_file
int vty_read_config_file(const char *file_name, void *priv)
Read the configuration file using the VTY code.
Definition: vty.c:1816
event
event
VTY events.
Definition: vty.h:30
vty::parent_nodes
struct llist_head parent_nodes
List of parent nodes, last item is the outermost parent.
Definition: vty.h:155
STATE_SLASH
#define STATE_SLASH
Definition: command.c:1003
CMD_COMPLETE_MATCH
#define CMD_COMPLETE_MATCH
Definition: command.h:168
vty::fail
int fail
Failure count.
Definition: vty.h:82
vty_out_context::vty
struct vty * vty
Definition: utils.c:48
vty_parent_node::indent
char * indent
When reading from a config file, these are the indenting characters expected for children of this VTY...
Definition: vty.h:61
vty_newline
static const char * vty_newline(struct vty *vty)
Definition: vty.h:165
walk_cb_params::depth_pass
unsigned int depth_pass
Definition: talloc_ctx_vty.c:45
STATE_DOUBLE
#define STATE_DOUBLE
Definition: command.c:1000
SH_FSM_STR
#define SH_FSM_STR
Definition: fsm_vty.c:110
_vector::alloced
unsigned int alloced
Definition: vector.h:29
asciidoc_rate_ctr_handler
static int asciidoc_rate_ctr_handler(struct rate_ctr_group *ctrg, struct rate_ctr *ctr, const struct rate_ctr_desc *desc, void *sctx_)
Definition: stats_vty.c:412
host::encrypt
int encrypt
Definition: command.h:60
buffer_putc
void buffer_putc(struct buffer *b, unsigned char c)
Definition: buffer.c:186
VIEW_NODE
@ VIEW_NODE
View node.
Definition: command.h:73
BUFFER_SIZE_DEFAULT
#define BUFFER_SIZE_DEFAULT
Definition: buffer.c:66
if
if(vty->type==VTY_SHELL_SERV)
Definition: command.c:2946
no_match
@ no_match
Definition: command.c:859
node
struct cmd_node * node
Definition: command.c:2944
vty_node
struct cmd_node vty_node
Definition: vty.c:1712
auth_enable_node
struct cmd_node auth_enable_node
Definition: command.c:85
CMD_COMPLETE_LIST_MATCH
#define CMD_COMPLETE_LIST_MATCH
Definition: command.h:169
CMD_ATTR_HIDDEN
@ CMD_ATTR_HIDDEN
Definition: command.h:137
cfg_log_node
struct cmd_node cfg_log_node
Definition: logging_vty.c:478
config_help_cmd
struct cmd_element config_help_cmd
SHOW_LOG_STR
#define SHOW_LOG_STR
Definition: logging_vty.c:390
vty_event
void vty_event(enum event event, int sock, struct vty *vty)
vty_hello
void vty_hello(struct vty *vty)
Definition: vty.c:363
buffer.h
vty_prompt
static void vty_prompt(struct vty *vty)
Definition: vty.c:398
asciidoc_rate_ctr_group_handler
static int asciidoc_rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_)
Definition: stats_vty.c:437
cmd_node::vtysh
int vtysh
Is this node's configuration goes to vtysh ?
Definition: command.h:121
print_version
void print_version(int print_copyright)
print the version (and optionally copyright) information
Definition: command.c:109
vty::status
enum vty::@1 status
Current vty status.
CMD_IPV4
#define CMD_IPV4(S)
Definition: command.h:301
rate_ctr_handler
static int rate_ctr_handler(struct rate_ctr_group *ctrg, struct rate_ctr *ctr, const struct rate_ctr_desc *desc, void *vctx_)
Definition: utils.c:53
host::name
char * name
Host name of this router.
Definition: command.h:39
buffer_write
buffer_status_t buffer_write(struct buffer *b, int fd, const void *p, size_t size)
Definition: buffer.c:439
config_node
struct cmd_node config_node
Definition: command.c:97
host::config
char * config
config file name of this host
Definition: command.h:56
host::password_encrypt
char * password_encrypt
Definition: command.h:43
SYSCONFDIR
#define SYSCONFDIR
Definition: vty.c:79
CMD_ATTR_DEPRECATED
@ CMD_ATTR_DEPRECATED
Definition: command.h:136
WALK_FILTER_NONE
@ WALK_FILTER_NONE
Definition: talloc_ctx_vty.c:38
config_write_memory_cmd
config_write_memory_cmd
Definition: command.c:2924
vector_only_index_free
void vector_only_index_free(void *index)
Definition: vector.c:68
vty_current_node
int vty_current_node(struct vty *vty)
return the current node of a given VTY
Definition: vty.c:329
vty_out
int vty_out(struct vty *vty, const char *format,...)
VTY standard output function.
Definition: vty.c:258
logging_vty_add_cmds
void logging_vty_add_cmds()
Register logging related commands to the VTY.
Definition: logging_vty.c:856
vty::escape
unsigned char escape
For escape character.
Definition: vty.h:116
config_write_log
static int config_write_log(struct vty *vty)
Definition: logging_vty.c:823
vty_signal_data::vty
struct vty * vty
Definition: vty.h:230
buffer_data
Definition: buffer.c:49
vty::monitor
int monitor
Definition: vty.h:149
VTY_NORMAL
#define VTY_NORMAL
Definition: vty.c:1246
telnet_connection::vty
struct vty * vty
VTY instance associated with telnet connection.
Definition: telnet_interface.h:43
vty_parent_node
Definition: vty.h:50
cmd_filter
static enum match_type cmd_filter(char *command, vector v, unsigned int index, enum match_type level)
Definition: command.c:1394
vty_self_insert
static void vty_self_insert(struct vty *vty, char c)
Definition: vty.c:471
buffer_reset
void buffer_reset(struct buffer *)
Definition: buffer.c:127
cmd_try_do_shortcut
static int cmd_try_do_shortcut(enum node_type node, char *first_word)
Definition: command.c:1712
desc
Command description structure.
Definition: command.h:154
vty_forward_word
static void vty_forward_word(struct vty *vty)
Definition: vty.c:808
host
Host configuration variable.
Definition: command.h:37
terminal
write Write running configuration to or terminal n Write configuration to the copy running config startup Copy configuration n Copy running config to n Copy running config to startup write terminal
Definition: command.c:2939
buffer_data::data
unsigned char data[0]
Definition: buffer.c:59
password_check
static int password_check
Definition: vty.c:102
IPV6_PREFIX_STR
#define IPV6_PREFIX_STR
Definition: command.c:997
asciidoc_handle_counter
static int asciidoc_handle_counter(struct osmo_counter *counter, void *sctx_)
Definition: stats_vty.c:375
VTY_SHELL
@ VTY_SHELL
Definition: vty.h:46
vty::obuf
struct buffer * obuf
Output buffer.
Definition: vty.h:85
memory
write memory
Definition: command.c:2925
INIT_MATCHVEC_SIZE
#define INIT_MATCHVEC_SIZE
indent_cmp
static int indent_cmp(const char *a, const char *b)
Make sure the common length of strings a and b is identical, then compare their lengths.
Definition: command.c:2455
vty::index_sub
void * index_sub
For multiple level index treatment such as key chain and key.
Definition: vty.h:113
vty_read_file
static int vty_read_file(FILE *confp, void *priv)
Definition: vty.c:1470
walk_filter_type
walk_filter_type
Definition: talloc_ctx_vty.c:37
host::logfile
char * logfile
Log filename.
Definition: command.h:53
IPV6_ADDR_STR
#define IPV6_ADDR_STR
Definition: command.c:996
ALIAS_DEPRECATED
ALIAS_DEPRECATED(logging_set_category_mask, logging_set_category_mask_old_cmd, "logging set log mask MASK", LOGGING_STR "Decide which categories to output.\n" "Log commands\n" "Mask commands\n" "'set log mask' is deprecated, please refer to the docs of 'set-log-mask' instead\n")
cmd_complete_command
char ** cmd_complete_command()
vty_ensure
static void vty_ensure(struct vty *vty, int length)
Definition: vty.c:461
VTY_SHELL_SERV
@ VTY_SHELL_SERV
Definition: vty.h:47
BUFFER_ERROR
@ BUFFER_ERROR
Definition: buffer.h:59
talloc_ctx_walk_cb
static void talloc_ctx_walk_cb(const void *chunk, int depth, int max_depth, int is_ref, void *data)
Print a talloc memory hierarchy to the given VTY.
Definition: talloc_ctx_vty.c:63
walk_cb_params
Definition: talloc_ctx_vty.c:43
vector_ensure
void vector_ensure(vector v, unsigned int num)
Definition: vector.c:101
vector.h
walk_cb_params::vty
struct vty * vty
Definition: talloc_ctx_vty.c:47
vty_create
struct vty * vty_create(int vty_sock, void *priv)
Create new vty structure.
Definition: vty.c:1510
vty::config
int config
In configure mode.
Definition: vty.h:152
cmd_entry_function_desc
static const char * cmd_entry_function_desc(const char *src, const char *dst)
Definition: command.c:1629
buffer_empty
int buffer_empty(struct buffer *b)
Definition: buffer.c:121
CMD_ARGC_MAX
#define CMD_ARGC_MAX
Definition: command.h:174
vty_redraw_line
static void vty_redraw_line(struct vty *)
Definition: vty.c:801
cmd_cmdsize
static int cmd_cmdsize(vector strvec)
Definition: command.c:466
vty_write
static void vty_write(struct vty *vty, const char *buf, size_t nbytes)
Definition: vty.c:451
vty_config_write
static int vty_config_write(struct vty *vty)
Definition: vty.c:1695
cmd_init
void cmd_init(int)
Definition: command.c:3778
ERRNO_IO_RETRY
#define ERRNO_IO_RETRY(EN)
Definition: vty.h:20
vty_parent
static struct vty_parent_node * vty_parent(struct vty *vty)
Definition: command.c:2105
VTY_NODE
@ VTY_NODE
Vty node.
Definition: command.h:82
buffer_put
void buffer_put(struct buffer *, const void *, size_t)
Definition: buffer.c:162
logging.h
cmd_match
static enum match_type cmd_match(const char *str, const char *command, enum match_type min, bool recur)
Definition: command.c:1326
CMD_IPV6_PREFIX
#define CMD_IPV6_PREFIX(S)
Definition: command.h:304
vty_history_print
static void vty_history_print(struct vty *vty)
Definition: vty.c:742
vty_event
void vty_event(enum event event, int sock, struct vty *vty)
callback from core VTY code about VTY related events
Definition: telnet_interface.c:189
cmd_execute_command_strict
int cmd_execute_command_strict(vector, struct vty *, struct cmd_element **)
Definition: command.c:2336
VTY_BUFSIZ
#define VTY_BUFSIZ
Definition: vty.h:26
osmo_log_info
const struct log_info * osmo_log_info
cfg_description_cmd
struct cmd_element cfg_description_cmd
tall_vty_ctx
void * tall_vty_ctx
Definition: vty.c:104
file
write Write running configuration to or terminal n Write configuration to the file(same as write file)\n") ALIAS(config_write_file
VTY_READ
@ VTY_READ
Definition: vty.h:32
vty_out_fsm_inst
void vty_out_fsm_inst(struct vty *vty, struct osmo_fsm_inst *fsmi)
Print a FSM instance to the given VTY.
Definition: fsm_vty.c:86
ipv4_match
@ ipv4_match
Definition: command.c:863
vty::iac
unsigned char iac
IAC handling.
Definition: vty.h:126
vty_config
static int vty_config
Definition: vty.c:100
osmo_g_fsms
struct llist_head osmo_g_fsms
vty_will_suppress_go_ahead
static void vty_will_suppress_go_ahead(struct vty *vty)
Definition: vty.c:715
vty_out_rate_ctr_group_fmt
void vty_out_rate_ctr_group_fmt(struct vty *vty, const char *fmt, struct rate_ctr_group *ctrg)
print a rate counter group to given VTY, formatting the line for each counter according to a format s...
Definition: utils.c:213
vty_down_level
static void vty_down_level(struct vty *vty)
Definition: vty.c:836
vty_go_parent
int vty_go_parent(struct vty *vty)
Definition: command.c:2147
vty_auth
static void vty_auth(struct vty *vty, char *buf)
Definition: vty.c:142
config_write_host
static int config_write_host(struct vty *vty)
Definition: command.c:810
ipv6_match
@ ipv6_match
Definition: command.c:865
host::motd
const char * motd
Banner configuration.
Definition: command.h:63
VTY_MAXHIST
#define VTY_MAXHIST
Definition: vty.h:27
vty_config_lock
int vty_config_lock(struct vty *)
Lock the configuration to a given VTY.
Definition: vty.c:340
vty::hp
int hp
History lookup current point.
Definition: vty.h:103
_vector::index
void ** index
Definition: vector.h:30
osmo_log_vty2tgt
struct log_target * osmo_log_vty2tgt(struct vty *vty)
Definition: logging_vty.c:108
cmd_desc_str
static char * cmd_desc_str(const char **string)
Fetch next description.
Definition: command.c:350
vty_get_cwd
char * vty_get_cwd(void)
Definition: vty.c:1759
config_write_terminal_cmd
write Write running configuration to or terminal n Write configuration to the copy running config startup Copy configuration n Copy running config to n Copy running config to startup config_write_terminal_cmd
Definition: command.c:2938
vty_end_of_line
static void vty_end_of_line(struct vty *vty)
Definition: vty.c:540
cmd_ipv4_match
static enum match_type cmd_ipv4_match(const char *str)
Definition: command.c:872
VTY_PRE_ESCAPE
#define VTY_PRE_ESCAPE
Definition: vty.c:1247
VTY_ESCAPE
#define VTY_ESCAPE
Definition: vty.c:1248
_vty_output
static void _vty_output(struct log_target *tgt, unsigned int level, const char *line)
Definition: logging_vty.c:63
VTY_READ_BUFSIZ
#define VTY_READ_BUFSIZ
Definition: vty.h:24
vty_backward_word
static void vty_backward_word(struct vty *vty)
Definition: vty.c:825
set_srep_parameter_int
static int set_srep_parameter_int(struct vty *vty, int(*fun)(struct osmo_stats_reporter *, int), const char *val, const char *param_name)
Definition: stats_vty.c:98
walk_cb_params::filter
enum walk_filter_type filter
Definition: talloc_ctx_vty.c:44
cmd_make_strvec2
int cmd_make_strvec2(const char *string, char **indent, vector *strvec_p)
Break up string in command tokens.
Definition: command.c:255
buffer_data::sp
size_t sp
Definition: buffer.c:56
cmd_complete_command_real
static char ** cmd_complete_command_real(vector vline, struct vty *vty, int *status)
Definition: command.c:1931
argv_concat
char * argv_concat(const char **argv, int argc, int shift)
Definition: command.c:118
cmd_node::cmd_vector
vector cmd_vector
Vector of this node's command list.
Definition: command.h:127
_LAST_OSMOVTY_NODE
@ _LAST_OSMOVTY_NODE
Definition: command.h:106
vty::height
int height
Widnow height.
Definition: vty.h:144
STATE_ADDR
#define STATE_ADDR
Definition: command.c:1001
cmd_deopt
static char * cmd_deopt(void *ctx, const char *str)
Definition: command.c:1312
CMD_SUCCESS
return CMD_SUCCESS
Definition: command.c:2965
buffer_free
void buffer_free(struct buffer *)
Definition: buffer.c:93
BUFFER_EMPTY
@ BUFFER_EMPTY
Definition: buffer.h:63
CMD_OPTION
#define CMD_OPTION(S)
Definition: command.h:296
STATE_COLON
#define STATE_COLON
Definition: command.c:999
vty_delete_backward_char
static void vty_delete_backward_char(struct vty *vty)
Definition: vty.c:908
cmp_desc
static int cmp_desc(const void *p, const void *q)
Definition: command.c:195
vty_shell_serv
int vty_shell_serv(struct vty *vty)
Definition: vty.c:1764
vty_self_insert_overwrite
static void vty_self_insert_overwrite(struct vty *vty, char c)
Definition: vty.c:490
_vector::active
unsigned int active
Definition: vector.h:28
vty_out_context::prefix
const char * prefix
Definition: utils.c:49
vty::VTY_CLOSE
@ VTY_CLOSE
Definition: vty.h:119
vty_read
int vty_read(struct vty *vty)
Read data via vty socket.
Definition: vty.c:1283
buffer::head
struct buffer_data * head
Definition: buffer.c:41
vtyvec
static vector vtyvec
Definition: vty.c:87
vty_backward_kill_word
static void vty_backward_kill_word(struct vty *vty)
Definition: vty.c:954
gDEFUN
gDEFUN(config_exit, config_exit_cmd, "exit", "Exit current mode and down to previous mode\n")
Definition: command.c:2640
VTY_TERM
@ VTY_TERM
Definition: vty.h:44
CMD_SUCCESS_DAEMON
#define CMD_SUCCESS_DAEMON
Definition: command.h:170
vty_out_newline
int vty_out_newline(struct vty *vty)
print a newline on the given VTY
Definition: vty.c:315
cmd_describe_command
vector cmd_describe_command()
sort_node
void sort_node(void)
Sort each node's command element according to command string.
Definition: command.c:216
stats_class_strs
static const struct value_string stats_class_strs[]
Definition: stats_vty.c:65
cmd_node::prompt
const char * prompt
Prompt character at vty interface.
Definition: command.h:118
vty_init
void vty_init(struct vty_app_info *app_info)
Initialize VTY layer.
Definition: vty.c:1780
vector_set
int vector_set(vector v, void *val)
Definition: vector.c:133
buffer_flush_all
buffer_status_t buffer_flush_all(struct buffer *, int fd)
Definition: buffer.c:199
cmdvec
vector cmdvec
Definition: command.c:67
auth_node
struct cmd_node auth_node
Definition: command.c:73
CMD_ERR_INCOMPLETE
#define CMD_ERR_INCOMPLETE
Definition: command.h:164
vty_command_is_common
static bool vty_command_is_common(struct cmd_element *cmd)
Return true if a node is installed by install_basic_node_commands(), so that we can avoid repeating t...
Definition: command.c:3721
desc::str
const char * str
Command's description.
Definition: command.h:156
vty_app_info::copyright
const char * copyright
copyright string of the application
Definition: vty.h:177
vector_unset
void vector_unset(vector v, unsigned int i)
Definition: vector.c:177
vty_describe_command
static void vty_describe_command(struct vty *vty)
Definition: vty.c:1105
vty_out
vty_out(vty, "!%s", VTY_NEWLINE)
vty_out_statistics_partial
void vty_out_statistics_partial(struct vty *vty, const char *prefix, int max_level)
Definition: utils.c:325
buffer_flush_window
buffer_status_t buffer_flush_window(struct buffer *, int fd, int width, int height, int erase, int no_more)
FILTER_STR
#define FILTER_STR
Definition: logging.h:6
CMD_IPV6
#define CMD_IPV6(S)
Definition: command.h:303
ADD
#define ADD(out, str)
STATE_DOT
#define STATE_DOT
Definition: command.c:1002
tall_bsc_ctx
void * tall_bsc_ctx
walk_cb_params::regexp
regex_t regexp
Definition: talloc_ctx_vty.c:48
asciidoc_osmo_stat_item_handler
static int asciidoc_osmo_stat_item_handler(struct osmo_stat_item_group *statg, struct osmo_stat_item *item, void *sctx_)
Definition: stats_vty.c:458
osmo_stat_item_handler
static int osmo_stat_item_handler(struct osmo_stat_item_group *statg, struct osmo_stat_item *item, void *vctx_)
Definition: utils.c:250
handle_counter
static int handle_counter(struct osmo_counter *counter, void *vctx_)
Definition: utils.c:309
vty_previous_line
static void vty_previous_line(struct vty *vty)
Definition: vty.c:782
vty_app_info
Information an application registers with the VTY.
Definition: vty.h:171
cmd_make_strvec
vector cmd_make_strvec(const char *)
Breaking up string into each command piece.
Definition: command.c:326
vty_out_stat_item_group
void vty_out_stat_item_group(struct vty *vty, const char *prefix, struct osmo_stat_item_group *statg)
print a stat item group to given VTY
Definition: utils.c:272
LOGGING_STR
#define LOGGING_STR
Definition: logging.h:5
DEFUN
DEFUN(enable_logging, enable_logging_cmd, "logging enable", LOGGING_STR "Enables logging to this vty\n")
Definition: logging_vty.c:86
telnet_exit
void telnet_exit(void)
Close all telnet connections and release the telnet socket.
Definition: telnet_interface.c:225