libosmovty  1.4.0
Osmocom VTY library
buffer.h File Reference

Buffering to output and input. More...

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

References data, buffer::head, and tall_vty_ctx.

◆ 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(), and c.

◆ buffer_putstr()

void buffer_putstr ( struct buffer ,
const char *   
)

References buffer_put(), and c.

◆ buffer_reset()

void buffer_reset ( struct buffer )

◆ buffer_write()

buffer_status_t buffer_write ( struct buffer ,
int  fd,
const void *  ,
size_t   
)
ALIAS_DEPRECATED
ALIAS_DEPRECATED(logging_level_force_all, deprecated_logging_level_all_cmd, "logging level all " LOG_LEVEL_ARGS, LOGGING_STR LEVEL_STR CATEGORY_ALL_STR LOG_LEVEL_STRS)
vty_out_va
int int vty_out_va(struct vty *vty, const char *format, va_list ap)
Definition: vty.c:263
stats.h
cmd_node_vector
static vector cmd_node_vector(vector v, enum node_type ntype)
Definition: command.c:893
osmo_stats_reporter::have_net_config
unsigned int have_net_config
vty_go_parent
int vty_go_parent(struct vty *vty)
Definition: command.c:2222
cmd_execute_command_real
static int cmd_execute_command_real(vector vline, struct vty *vty, struct cmd_element **cmd)
Definition: command.c:2249
vty::index
void * index
For current referencing point of interface, route-map, access-list etc...
Definition: vty.h:112
osmo_gettimeofday
int osmo_gettimeofday(struct timeval *tv, struct timezone *tz)
log_target_create_vty
struct log_target * log_target_create_vty(struct vty *vty)
Definition: logging_vty.c:91
osmo_stats_reporter_disable
int osmo_stats_reporter_disable(struct osmo_stats_reporter *srep)
OSMO_STATS_CLASS_GLOBAL
OSMO_STATS_CLASS_GLOBAL
sched_vty_opts
static struct sched_vty_opts * sched_vty_opts
Definition: cpu_sched_vty.c:81
vty_is_active
bool vty_is_active(struct vty *vty)
Definition: telnet_interface.c:212
rate_ctr_for_each_counter
int rate_ctr_for_each_counter(struct rate_ctr_group *ctrg, rate_ctr_handler_t handle_counter, void *data)
osmo_stats_reporter::dest_port
int dest_port
vty::sb_len
size_t sb_len
How many subnegotiation characters have we received?
Definition: vty.h:141
osmo_stats_reporter_free
void osmo_stats_reporter_free(struct osmo_stats_reporter *srep)
cmd_describe_command_real
static vector cmd_describe_command_real(vector vline, struct vty *vty, int *status)
Definition: command.c:1791
GSMTAP_UDP_PORT
#define GSMTAP_UDP_PORT
RATE_CTR_INTV_HOUR
RATE_CTR_INTV_HOUR
SHOW_STATS_STR
#define SHOW_STATS_STR
Definition: stats_vty.c:44
VTY_BIND_ADDR_DEFAULT
#define VTY_BIND_ADDR_DEFAULT
Definition: vty.c:102
client_data
static int client_data(struct osmo_fd *fd, unsigned int what)
Definition: telnet_interface.c:147
rate_ctr_desc
buffer::size
size_t size
Definition: buffer.c:45
log_add_target
void log_add_target(struct log_target *target)
vty_command
static int vty_command(struct vty *vty)
Definition: vty.c:431
_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:748
log_category_name
const char * log_category_name(int subsys)
ACQUIRE_VTY_LOG_TGT_WITH_LOCK
#define ACQUIRE_VTY_LOG_TGT_WITH_LOCK(vty, tgt)
Get tgt with log lock acquired, return and release lock with warning if tgt is not found.
Definition: logging_vty.c:107
time
char time[12]
telnet_close_client
int telnet_close_client(struct osmo_fd *fd)
close a telnet connection
Definition: telnet_interface.c:123
vty_shell
int vty_shell(struct vty *vty)
Return if this VTY is a shell or not.
Definition: vty.c:258
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:316
vty_app_info::tall_ctx
void * tall_ctx
talloc context
Definition: vty.h:181
osmo_fsm_state
enable_node
struct cmd_node enable_node
Definition: command.c:97
cmd_node::node
int node
Node index.
Definition: command.h:116
vty_delete_char
static void vty_delete_char(struct vty *vty)
Definition: vty.c:895
signal.h
IPV6_MATCH
@ IPV6_MATCH
Definition: command.c:907
OSMO_STRINGIFY
#define OSMO_STRINGIFY(x)
OSMO_SOCK_NAME_MAXLEN
#define OSMO_SOCK_NAME_MAXLEN
log_target::tgt_gsmtap
struct log_target::@8::@14 tgt_gsmtap
RANGE_MATCH
@ RANGE_MATCH
Definition: command.c:908
log_set_print_filename2
void log_set_print_filename2(struct log_target *target, enum log_filename_type lft)
LOGL_FATAL
#define LOGL_FATAL
timer_doc_string
static char * timer_doc_string(const char *prefix, const char *suffix)
Definition: tdef_vty.c:348
telnet_backward_char
static const char telnet_backward_char
Definition: vty.c:464
tall_vty_cmd_ctx
void * tall_vty_cmd_ctx
Definition: command.c:69
osmo_stats_reporter::flush_period
unsigned int flush_period
OSMO_STRINGIFY_VAL
#define OSMO_STRINGIFY_VAL(x)
ANY_MATCH
@ ANY_MATCH
Definition: command.c:902
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
log_parse_level
int log_parse_level(const char *lvl)
telnet_new_connection
static int telnet_new_connection(struct osmo_fd *fd, unsigned int what)
Definition: telnet_interface.c:170
sched_vty_opts
Definition: cpu_sched_vty.c:74
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
loglevel_strs
const struct value_string loglevel_strs[]
EVERYTHING_STR
#define EVERYTHING_STR
Definition: logging_vty.c:62
vty::length
int length
Command length.
Definition: vty.h:96
cmd_node::func
int(* func)(struct vty *)
Node's configuration write function.
Definition: command.h:125
get_value_string
const char * get_value_string(const struct value_string *vs, uint32_t val)
vty::indent
char * indent
When reading from a config file, these are the indenting characters expected for children of the curr...
Definition: vty.h:161
vty_app_info::name
const char * name
name of the application
Definition: vty.h:175
rate_ctr_group::desc
const struct rate_ctr_group_desc * desc
CMD_COMPLETE_FULL_MATCH
#define CMD_COMPLETE_FULL_MATCH
Definition: command.h:169
log_target_find
struct log_target * log_target_find(int type, const char *fname)
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:176
CMD_VARARG
#define CMD_VARARG(S)
Definition: command.h:300
CMD_ERR_NO_MATCH
#define CMD_ERR_NO_MATCH
Definition: command.h:164
config_write_sched
static int config_write_sched(struct vty *vty)
Definition: cpu_sched_vty.c:572
osmo_fsm::name
const char * name
len
static size_t len(const char *str)
Definition: command.c:2575
vty_stop_input
static void vty_stop_input(struct vty *vty)
Definition: vty.c:1233
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:3822
cmd_execute_command
int cmd_execute_command(vector, struct vty *, struct cmd_element **, int)
Definition: command.c:2431
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:146
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:3077
vty_pop_parent
static bool vty_pop_parent(struct vty *vty)
Definition: command.c:2187
vty_backward_pure_word
static void vty_backward_pure_word(struct vty *vty)
Definition: vty.c:835
log_category
OSMO_STATS_REPORTER_LOG
OSMO_STATS_REPORTER_LOG
cmd_entry_function
static const char * cmd_entry_function(const char *src, const char *dst)
Definition: command.c:1674
vty_beginning_of_line
static void vty_beginning_of_line(struct vty *vty)
Definition: vty.c:550
g
struct osmo_tdef_group * g
Definition: tdef_vty.c:277
VTY_CLOSED
@ VTY_CLOSED
Definition: vty.h:36
osmo_tdef_vty_groups_init
void osmo_tdef_vty_groups_init(unsigned int parent_cfg_node, struct osmo_tdef_group *groups)
Convenience implementation for keeping a fixed set of timer groups in a program.
Definition: tdef_vty.c:367
vty::hist
char * hist[VTY_MAXHIST]
Histry of command.
Definition: vty.h:102
Vvty_serv_thread
vector Vvty_serv_thread
Definition: vty.c:94
LOG_FILENAME_PATH
LOG_FILENAME_PATH
BUFFER_PENDING
@ BUFFER_PENDING
Definition: buffer.h:68
telnet_connection::priv
void * priv
private data pointer passed through
Definition: telnet_interface.h:39
OSMO_ASSERT
#define OSMO_ASSERT(exp)
config_write_log_single
static int config_write_log_single(struct vty *vty, struct log_target *tgt)
Definition: logging_vty.c:896
vty_bind_addr
static const char * vty_bind_addr
Definition: vty.c:101
log_parse_category_mask
void log_parse_category_mask(struct log_target *target, const char *_mask)
osmo_stat_item_group
cfg_stats_node
struct cmd_node cfg_stats_node
Definition: stats_vty.c:61
LOG_FILENAME_BASENAME
LOG_FILENAME_BASENAME
vty_signal_data::event
enum event event
Definition: vty.h:241
server_socket
static struct osmo_fd server_socket
Definition: telnet_interface.c:61
vty_dump_xml_ref_to_vty
static int vty_dump_xml_ref_to_vty(struct vty *vty)
Definition: command.c:757
sched_vty_thread_id
sched_vty_thread_id
Definition: cpu_sched_vty.c:57
write_config_file
static int write_config_file(const char *config_file, char **outpath)
Definition: command.c:2873
log_target_create
struct log_target * log_target_create(void)
rate_ctr_group_desc::class_id
int class_id
cmp_node
static int cmp_node(const void *p, const void *q)
Definition: command.c:193
utils.h
xml_escape
static char * xml_escape(const char *inp)
Definition: command.c:556
osmo_stat_item_group::idx
unsigned int idx
vty_kill_line_from_beginning
static void vty_kill_line_from_beginning(struct vty *)
Definition: vty.c:955
vty::iac_sb_in_progress
unsigned char iac_sb_in_progress
IAC SB (option subnegotiation) handling.
Definition: vty.h:131
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:82
osmo_tdef::val
unsigned long val
config_end_cmd
struct cmd_element config_end_cmd
vector_active
#define vector_active(V)
Definition: vector.h:44
osmo_strrb_elements
size_t osmo_strrb_elements(const struct osmo_strrb *rb)
MAXPATHLEN
#define MAXPATHLEN
Definition: command.c:52
telnet_interface.h
minimalistic telnet/network interface it might turn into a wire interface
osmo_talloc_vty_add_cmds
void osmo_talloc_vty_add_cmds(void)
Install VTY commands for talloc context introspection.
Definition: talloc_ctx_vty.c:248
desc::cmd
const char * cmd
Command string.
Definition: command.h:157
cmd_complete_command
char ** cmd_complete_command(vector vline, struct vty *vty, int *status)
Definition: command.c:2150
osmo_stats_reporter_set_local_addr
int osmo_stats_reporter_set_local_addr(struct osmo_stats_reporter *srep, const char *addr)
rate_ctr_per_intv::rate
uint64_t rate
config
write Write running configuration to or terminal n Write configuration to the copy running config startup config
Definition: command.c:3066
LOG_TGT_TYPE_STDERR
LOG_TGT_TYPE_STDERR
osmo_stat_item
osmo_fd_register
int osmo_fd_register(struct osmo_fd *fd)
sched_node
static struct cmd_node sched_node
Definition: cpu_sched_vty.c:83
proc_tid_exists
static bool proc_tid_exists(pid_t tid)
Definition: cpu_sched_vty.c:195
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
osmo_fsm_inst::children
struct llist_head children
osmo_fd::cb
int(* cb)(struct osmo_fd *fd, unsigned int what)
vty_hist_add
static void vty_hist_add(struct vty *vty)
Definition: vty.c:564
set_sched_rr
static int set_sched_rr(unsigned int prio)
Definition: cpu_sched_vty.c:463
cmd_free_strvec
void cmd_free_strvec(vector)
Free allocated string vector.
Definition: command.c:328
NO_FORCE_ALL_STR
#define NO_FORCE_ALL_STR
Definition: logging_vty.c:51
OSMO_TDEF_VTY_ARG_SET_OPTIONAL
#define OSMO_TDEF_VTY_ARG_SET_OPTIONAL
Definition: tdef_vty.h:54
buffer_reset
void buffer_reset(struct buffer *b)
Definition: buffer.c:127
generate_cpu_hex_mask
static int generate_cpu_hex_mask(char *str, size_t str_buf_size, cpu_set_t *cpuset, size_t cpuset_size)
Definition: cpu_sched_vty.c:152
VTY_NEWLINE
#define VTY_NEWLINE
Definition: vty.h:165
cmd_element
Structure of a command element.
Definition: command.h:143
osmo_stat_item_group_reset
void osmo_stat_item_group_reset(struct osmo_stat_item_group *statg)
log_info_cat::name
const char * name
osmo_fsm::log_subsys
int log_subsys
msgb.h
node_type
node_type
There are some command levels which called from command node.
Definition: command.h:71
log_set_print_category_hex
void log_set_print_category_hex(struct log_target *target, int print_category_hex)
IPV4_MATCH
@ IPV4_MATCH
Definition: command.c:905
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:1587
vty_cwd
char * vty_cwd
Definition: vty.c:96
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:3881
CMD_SUCCESS
return CMD_SUCCESS
Definition: tdef_vty.c:286
LOG_LEVEL_STRS
#define LOG_LEVEL_STRS
Definition: logging_vty.c:55
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:93
log_info
osmo_talloc_asprintf
#define osmo_talloc_asprintf(ctx, dest, fmt, args ...)
llist_for_each_entry_safe
#define llist_for_each_entry_safe(pos, n, head, member)
WALK_FILTER_TREE
@ WALK_FILTER_TREE
Definition: talloc_ctx_vty.c:40
buffer::tail
struct buffer_data * tail
Definition: buffer.c:42
log_target_create_stderr
struct log_target * log_target_create_stderr(void)
vector_lookup
void * vector_lookup(vector, unsigned int)
Definition: vector.c:162
MAX_CHUNKS
#define MAX_CHUNKS
osmo_fsm_inst::proc
struct osmo_fsm_inst::@0 proc
CMD_ERR_NOTHING_TODO
#define CMD_ERR_NOTHING_TODO
Definition: command.h:168
osmo_fsm_inst::child
struct llist_head child
host::password
char * password
Password for vty interface.
Definition: command.h:42
osmo_tdef_vty_out_all_va
void osmo_tdef_vty_out_all_va(struct vty *vty, struct osmo_tdef *tdefs, const char *prefix_fmt, va_list va)
Write to VTY the current status of all given timers.
Definition: tdef_vty.c:218
get_string_value
int get_string_value(const struct value_string *vs, const char *str)
vty_get_bind_addr
const char * vty_get_bind_addr(void)
Definition: vty.c:1634
strrb.h
osmo_tdef::desc
const char * desc
RATE_CTR_INTV_MIN
RATE_CTR_INTV_MIN
vty_end_config
static void vty_end_config(struct vty *vty)
Definition: vty.c:866
OSMO_TDEF_VTY_DOC_T
#define OSMO_TDEF_VTY_DOC_T
Definition: tdef_vty.h:43
config_list_cmd
struct cmd_element config_list_cmd
log_set_print_category
void log_set_print_category(struct log_target *target, int print_category)
get_value_string_or_null
const char * get_value_string_or_null(const struct value_string *vs, uint32_t val)
rate_ctr.h
osmo_strrb_get_nth
const char * osmo_strrb_get_nth(const struct osmo_strrb *rb, unsigned int string_index)
vty_config_unlock
int vty_config_unlock(struct vty *)
Unlock the configuration from a given VTY.
Definition: vty.c:370
VECTOR_MIN_SIZE
#define VECTOR_MIN_SIZE
Definition: vector.h:34
name
const char * name
osmo_fd_unregister
void osmo_fd_unregister(struct osmo_fd *fd)
osmo_stat_item_group_desc::group_description
const char * group_description
cmd_element::cmdsize
unsigned int cmdsize
Command index count.
Definition: command.h:149
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
log_set_print_timestamp
void log_set_print_timestamp(struct log_target *target, int print_timestamp)
osmo_stats_reporter::type
enum osmo_stats_reporter_type type
log_target::print_filename2
enum log_filename_type print_filename2
OSMO_FD_READ
#define OSMO_FD_READ
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
osmo_tdef_group
vty_execute
static int vty_execute(struct vty *vty)
Definition: vty.c:694
CFG_STATS_NODE
@ CFG_STATS_NODE
Configure the statistics.
Definition: command.h:80
CONFIGFILE_MASK
#define CONFIGFILE_MASK
Definition: command.c:67
NO_MATCH
@ NO_MATCH
Definition: command.c:901
log_info::print_fn
log_print_filters * print_fn
vty_out_statistics_full
void vty_out_statistics_full(struct vty *vty, const char *prefix)
Definition: utils.c:333
osmo_tdefs_reset
void osmo_tdefs_reset(struct osmo_tdef *tdefs)
cmd_node::name
char name[64]
Human-readable ID of this node.
Definition: command.h:133
INIT_LLIST_HEAD
#define INIT_LLIST_HEAD(ptr)
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:1763
vty_forward_kill_word
static void vty_forward_kill_word(struct vty *vty)
Definition: vty.c:962
osmo_stats_reporter_create_statsd
struct osmo_stats_reporter * osmo_stats_reporter_create_statsd(const char *name)
CMD_ERR_AMBIGUOUS
#define CMD_ERR_AMBIGUOUS
Definition: command.h:165
osmo_fsm_event_name
const char * osmo_fsm_event_name(struct osmo_fsm *fsm, uint32_t event)
vty_new
struct vty * vty_new(void)
Allocate a new vty interface structure.
Definition: vty.c:119
vty::lines
int lines
Configure lines.
Definition: vty.h:149
OSMO_STATS_REPORTER_STATSD
OSMO_STATS_REPORTER_STATSD
CMD_IPV4_PREFIX
#define CMD_IPV4_PREFIX(S)
Definition: command.h:304
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
LOG_FILENAME_NONE
LOG_FILENAME_NONE
vty.h
vty_get_bind_port
int vty_get_bind_port(int default_port)
Returns configured port passed to the 'line vty'/'bind' command or default_port.
Definition: vty.c:1641
osmo_tdef
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:911
osmo_stats_reporter
vty_dont_linemode
static void vty_dont_linemode(struct vty *vty)
Definition: vty.c:740
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:532
vty_kill_line
static void vty_kill_line(struct vty *vty)
Definition: vty.c:935
MAXPATHLEN
#define MAXPATHLEN
Definition: vty.c:71
start
uint32_t start
vty_init_vtysh
void vty_init_vtysh(void)
Definition: vty.c:1791
log_target_create_file
struct log_target * log_target_create_file(const char *fname)
log_target_create_gsmtap
struct log_target * log_target_create_gsmtap(const char *host, uint16_t port, const char *ident, bool ofd_wq_mode, bool add_sink)
vty_telnet_option
static int vty_telnet_option(struct vty *vty, unsigned char *buf, int nbytes)
Definition: vty.c:595
log_deprecated_func
static int log_deprecated_func(struct cmd_element *cmd, struct vty *vty, int argc, const char *argv[])
Definition: logging_vty.c:1001
log_target_create_syslog
struct log_target * log_target_create_syslog(const char *ident, int option, int facility)
telnet_space_char
static const char telnet_space_char
Definition: vty.c:465
sched_vty_opts::tall_ctx
void * tall_ctx
Definition: cpu_sched_vty.c:75
vty_backward_char
static void vty_backward_char(struct vty *vty)
Definition: vty.c:541
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:35
log_target_create_rb
struct log_target * log_target_create_rb(size_t size)
cpu_affinity_it::entry
struct llist_head entry
Definition: cpu_sched_vty.c:66
vty_clear_buf
static void vty_clear_buf(struct vty *vty)
Definition: vty.c:113
vty_complete_command
static void vty_complete_command(struct vty *vty)
Definition: vty.c:1009
osmo_fsm_inst
vty::fd
int fd
File descripter of this vty.
Definition: vty.h:75
SH_FSMI_STR
#define SH_FSMI_STR
Definition: fsm_vty.c:111
SCHED_VTY_THREAD_UNKNOWN
@ SCHED_VTY_THREAD_UNKNOWN
Definition: cpu_sched_vty.c:62
LOG_TGT_TYPE_SYSLOG
LOG_TGT_TYPE_SYSLOG
LLIST_HEAD
LLIST_HEAD(active_connections)
cmd_node
Node which has some commands and prompt string and configuration function pointer .
Definition: command.h:114
log_target::entry
struct llist_head entry
install_element_ve
void install_element_ve(struct cmd_element *cmd)
Definition: command.c:817
log_category::loglevel
uint8_t loglevel
OSMO_TDEF_VTY_DOC_SET
#define OSMO_TDEF_VTY_DOC_SET
Definition: tdef_vty.h:53
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
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:121
length
uint8_t length
vty_escape_map
static void vty_escape_map(unsigned char c, struct vty *vty)
Definition: vty.c:1250
network
write Write running configuration to network
Definition: command.c:3061
osmo_tdef::unit
enum osmo_tdef_unit unit
log_target::use_color
unsigned int use_color
CONF_BACKUP_EXT
#define CONF_BACKUP_EXT
Definition: command.h:347
osmo_stat_item_desc::description
const char * description
osmo_counter
VTY_FILE
@ VTY_FILE
Definition: vty.h:47
osmo_asciidoc_escape
char * osmo_asciidoc_escape(const char *inp)
escape all special asciidoc symbols
Definition: command.c:513
asciidoc_counter_generate
static void asciidoc_counter_generate(struct vty *vty)
Definition: stats_vty.c:416
DEFUN
DEFUN(config_terminal, config_terminal_cmd, "configure terminal", "Configuration from vty interface\n" "Configuration terminal\n")
Definition: command.c:2734
osmo_fsm
buffer_flush_all
buffer_status_t buffer_flush_all(struct buffer *b, int fd)
Definition: buffer.c:199
SS_L_VTY
SS_L_VTY
osmo_tdef_vty_groups_write
void osmo_tdef_vty_groups_write(struct vty *vty, const char *indent)
Write the global osmo_tdef_group configuration to VTY, as previously passed to osmo_tdef_vty_groups_i...
Definition: tdef_vty.c:390
llist_del
static void llist_del(struct llist_head *entry)
osmo_stats_reporter_find
struct osmo_stats_reporter * osmo_stats_reporter_find(enum osmo_stats_reporter_type type, const char *name)
vty::priv
void * priv
private data, specified by creator
Definition: vty.h:72
host_config_set
void host_config_set(const char *)
Definition: command.c:3814
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:1967
osmo_tdef::default_val
const unsigned long default_val
cmd_element::func
int(* func)(struct cmd_element *, struct vty *, int, const char *[])
Definition: command.h:145
level
uint8_t level
vty::max
int max
Command max length.
Definition: vty.h:99
cmd_ipv4_prefix_match
static enum match_type cmd_ipv4_prefix_match(const char *str)
Definition: command.c:967
tall_log_ctx
void * tall_log_ctx
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
osmo_tdef_vty_write
void osmo_tdef_vty_write(struct vty *vty, struct osmo_tdef *tdefs, const char *prefix_fmt,...)
Write current timer configuration arguments to the vty.
Definition: tdef_vty.c:253
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:3899
log_set_print_level
void log_set_print_level(struct log_target *target, int print_level)
vty_parent_node::node
int node
Node status of this vty.
Definition: vty.h:59
log_target::print_ext_timestamp
unsigned int print_ext_timestamp
log_target::loglevel
uint8_t loglevel
data
uint8_t data[0]
osmo_stats_config
osmo_sock_init_ofd
int osmo_sock_init_ofd(struct osmo_fd *ofd, int family, int type, int proto, const char *host, uint16_t port, unsigned int flags)
cpu_affinity_it::cpuset_size
size_t cpuset_size
Definition: cpu_sched_vty.c:70
buffer_data::next
struct buffer_data * next
Definition: buffer.c:50
osmo_cpu_sched_vty_apply_localthread
int osmo_cpu_sched_vty_apply_localthread(void)
Apply cpu-affinity on calling thread based on VTY configuration.
Definition: cpu_sched_vty.c:625
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:980
LOGL_INFO
#define LOGL_INFO
install_node
void install_node(struct cmd_node *, int(*)(struct vty *))
Install top node of command vector.
Definition: command.c:186
log_target
default_motd
const char * default_motd
Definition: command.c:110
CONFIG_NODE
@ CONFIG_NODE
Config node.
Definition: command.h:76
telnet_connection
A telnet connection.
Definition: telnet_interface.h:35
procname2pid
static enum sched_vty_thread_id procname2pid(pid_t *res_pid, const char *str, bool applynow)
Definition: cpu_sched_vty.c:276
logging_vty_add_deprecated_subsys
void logging_vty_add_deprecated_subsys(void *ctx, const char *name)
Definition: logging_vty.c:1007
CMD_VARIABLE
#define CMD_VARIABLE(S)
Definition: command.h:299
log_info::cat
const struct log_info_cat * cat
vty_dump_element
static int vty_dump_element(struct cmd_element *cmd, print_func_t print_func, void *data, const char *newline)
Definition: command.c:633
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:279
rate_ctr_group_handler
static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_)
Definition: stats_vty.c:555
vector_init
vector vector_init(unsigned int size)
Definition: vector.c:42
match_type
match_type
Definition: command.c:900
vector_copy
vector vector_copy(vector v)
Definition: vector.c:79
view_node
struct cmd_node view_node
Definition: command.c:85
MAX_FLUSH
#define MAX_FLUSH
osmo_tdef_groups_for_each
osmo_tdef_groups_for_each(g, global_tdef_groups)
Definition: tdef_vty.c:282
vector_free
void vector_free(vector v)
Definition: vector.c:73
command.h
Zebra configuration command interface routine.
rate_ctr_group_handler
static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *vctx_)
Definition: utils.c:220
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:674
osmo_stats_vty2srep
static struct osmo_stats_reporter * osmo_stats_vty2srep(struct vty *vty)
Definition: stats_vty.c:74
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:148
SCHED_VTY_THREAD_ALL
@ SCHED_VTY_THREAD_ALL
Definition: cpu_sched_vty.c:59
CMD_ERR_INVALID_INDENT
#define CMD_ERR_INVALID_INDENT
Definition: command.h:173
CONTROL
#define CONTROL(X)
Definition: vty.c:1244
log_target::facility
int facility
SHOW_STR
#define SHOW_STR
Definition: command.h:313
buffer_putstr
void buffer_putstr(struct buffer *b, const char *c)
Definition: buffer.c:192
log_target::print_level
bool print_level
osmo_fsm_find_by_name
struct osmo_fsm * osmo_fsm_find_by_name(const char *name)
osmo_stat_item_desc::unit
const char * unit
STATE_MASK
#define STATE_MASK
Definition: command.c:1046
osmo_stat_item::desc
const struct osmo_stat_item_desc * desc
vty_app_info::version
const char * version
version string of the application
Definition: vty.h:177
osmo_stats_reporter::dest_addr_str
char * dest_addr_str
OSMO_STRLCPY_ARRAY
#define OSMO_STRLCPY_ARRAY(array, src)
osmo_fsm::states
const struct osmo_fsm_state * states
log_info::num_cat
unsigned int num_cat
rate_ctr_group
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:1766
vty_buffer_reset
static void vty_buffer_reset(struct vty *vty)
Definition: vty.c:1274
vty_parent_node::priv
void * priv
private data, specified by creator
Definition: vty.h:56
rate_ctr_group_desc::group_description
const char * group_description
vty_parent_node::entry
struct llist_head entry
Definition: vty.h:53
CMD_RANGE
#define CMD_RANGE(S)
Definition: command.h:301
vty_signal_data
Definition: vty.h:240
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:724
log_target::tgt_file
struct log_target::@8::@10 tgt_file
host::motdfile
char * motdfile
Definition: command.h:64
osmo_tdef_val_in_range
bool osmo_tdef_val_in_range(struct osmo_tdef *tdef, unsigned long new_val)
vty_describe_fold
static void vty_describe_fold(struct vty *vty, int cmd_width, unsigned int desc_width, struct desc *desc)
Definition: vty.c:1082
vty_insert_word_overwrite
static void vty_insert_word_overwrite(struct vty *vty, char *str)
Definition: vty.c:522
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:3829
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:626
_cfg_log_syslog
static int _cfg_log_syslog(struct vty *vty, int facility)
Definition: logging_vty.c:640
sysl_level_names
static struct value_string sysl_level_names[]
Definition: logging_vty.c:674
LOG_FILENAME_POS_LINE_END
LOG_FILENAME_POS_LINE_END
osmo_tdef_unit_name
static const char * osmo_tdef_unit_name(enum osmo_tdef_unit val)
vty::width
int width
Window width.
Definition: vty.h:144
log_set_use_color
void log_set_use_color(struct log_target *target, int use_color)
tdef_vty.h
API to configure osmo_tdef Tnnn timers from VTY configuration.
vty_close
void vty_close(struct vty *)
Close a given vty interface.
Definition: vty.c:215
vty_next_line
static void vty_next_line(struct vty *vty)
Definition: vty.c:775
vty::sb_buf
unsigned char sb_buf[TELNET_NAWS_SB_LEN]
sub-negotiation buffer
Definition: vty.h:137
misc.h
cmd_describe_command
vector cmd_describe_command(vector vline, struct vty *vty, int *status)
Definition: command.c:1936
LOG_FILENAME_POS_HEADER_END
LOG_FILENAME_POS_HEADER_END
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:67
config_write_stats
static int config_write_stats(struct vty *vty)
Definition: stats_vty.c:655
vty::type
enum vty_type type
Is this vty connect to file or not.
Definition: vty.h:78
is_cmd_ambiguous
static int is_cmd_ambiguous(char *command, vector v, int index, enum match_type type)
Definition: command.c:1540
osmo_counters_count
int osmo_counters_count()
vty::hindex
int hindex
History insert end point.
Definition: vty.h:108
STATS_STR
#define STATS_STR
Definition: stats_vty.c:46
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:603
LEVEL_STR
#define LEVEL_STR
Definition: logging_vty.c:44
log_del_target
void log_del_target(struct log_target *target)
STATE_START
#define STATE_START
Definition: command.c:1040
TELNET_NAWS_SB_LEN
#define TELNET_NAWS_SB_LEN
Definition: vty.h:135
copy_runningconfig_startupconfig_cmd
write Write running configuration to or terminal n Write configuration to the copy_runningconfig_startupconfig_cmd
Definition: command.c:3065
vty_current_index
void * vty_current_index(struct vty *vty)
return the current index of a given VTY
Definition: vty.c:340
config_from_file
int config_from_file(struct vty *, FILE *)
Definition: command.c:2601
cmd_prompt
const char * cmd_prompt(enum node_type)
Return prompt character of specified node.
Definition: command.c:500
cmd_make_descvec
static vector cmd_make_descvec(const char *string, const char *descstr)
New string vector.
Definition: command.c:379
vty_clear_parents
static void vty_clear_parents(struct vty *vty)
Definition: command.c:2202
tall_telnet_ctx
static void * tall_telnet_ctx
Definition: telnet_interface.c:56
osmo_tdef::min_val
unsigned long min_val
WALK_FILTER_REGEXP
@ WALK_FILTER_REGEXP
Definition: talloc_ctx_vty.c:39
osmo_stats_reporter_set_max_class
int osmo_stats_reporter_set_max_class(struct osmo_stats_reporter *srep, enum osmo_stats_class class_id)
CMD_WARNING
#define CMD_WARNING
Definition: command.h:163
value_string::str
const char * str
buffer_flush_available
buffer_status_t buffer_flush_available(struct buffer *b, int fd)
Definition: buffer.c:379
value_string::value
int value
osmo_fsm_inst::parent
struct osmo_fsm_inst * parent
check_element_exists
static int check_element_exists(struct cmd_node *cnode, const char *cmdstring)
Definition: command.c:780
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:507
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:3410
get_num_cpus
static int get_num_cpus()
Definition: cpu_sched_vty.c:90
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:1741
tdefs
struct osmo_tdef * tdefs
Definition: tdef_vty.c:294
vty::buf
char * buf
Command input buffer.
Definition: vty.h:90
ENABLE_NODE
@ ENABLE_NODE
Enable node.
Definition: command.h:75
osmo_signal_dispatch
void osmo_signal_dispatch(unsigned int subsys, unsigned int signal, void *signal_data)
timer_command_string
static char * timer_command_string(const char *prefix, const char *suffix)
Definition: tdef_vty.c:339
vty::node
int node
Node status of this vty.
Definition: vty.h:81
vty_out_context::max_level
int max_level
Definition: utils.c:50
osmo_tdef_vty_show_cmd
int osmo_tdef_vty_show_cmd(struct vty *vty, struct osmo_tdef *tdefs, const char *T_arg, const char *prefix_fmt,...)
Output one or all timers to the VTY, as for a VTY command like 'show timer [TNNNN]'.
Definition: tdef_vty.c:147
buffer_status_t
buffer_status_t
Definition: buffer.h:56
osmo_str_tolower_buf
size_t osmo_str_tolower_buf(char *dest, size_t dest_len, const char *src)
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:150
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:494
config_exit_cmd
struct cmd_element config_exit_cmd
vty_dump_xml_ref
int vty_dump_xml_ref(FILE *stream)
Print the XML reference of all VTY nodes to the given stream.
Definition: command.c:774
logging_print_file_args
static const struct value_string logging_print_file_args[]
Definition: logging_vty.c:274
osmo_tdef_group::name
const char * name
osmo_tdef::T
const int T
walk_cb_params::chunk_ptr
const void * chunk_ptr
Definition: talloc_ctx_vty.c:46
S_VTY_EVENT
@ S_VTY_EVENT
Definition: vty.h:237
LOG_STR
#define LOG_STR
Definition: logging_vty.c:43
cmd_range_match
static int cmd_range_match(const char *range, const char *str)
Definition: command.c:1288
print_func_vty
static int print_func_vty(void *data, const char *format,...)
Definition: command.c:746
AUTH_NODE
@ AUTH_NODE
Authentication mode of vty interface.
Definition: command.h:72
osmo_fd::when
unsigned int when
telnet_init_default
int telnet_init_default(void *tall_ctx, void *priv, int default_port)
Initializes telnet based VTY interface using the configured bind addr/port.
Definition: telnet_interface.c:113
EXTEND_MATCH
@ EXTEND_MATCH
Definition: command.c:903
cmd_element::string
const char * string
Command specification by string.
Definition: command.h:144
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:573
vty
vty
Definition: tdef_vty.c:299
depth
unsigned int depth
CMD_ERR_EXEED_ARGC_MAX
#define CMD_ERR_EXEED_ARGC_MAX
Definition: command.h:167
osmo_stat_item_for_each_group
int osmo_stat_item_for_each_group(osmo_stat_item_group_handler_t handle_group, void *data)
cmd_element::daemon
int daemon
Daemon to which this command belong.
Definition: command.h:147
install_basic_node_commands
static void install_basic_node_commands(int node)
Install common commands like 'exit' and 'list'.
Definition: command.c:3834
cmd_unique_string
static int cmd_unique_string(vector v, const char *str)
Definition: command.c:1752
cmd_element::attr
unsigned char attr
Command attributes.
Definition: command.h:152
host::app_info
const struct vty_app_info * app_info
VTY application information.
Definition: command.h:67
assert_loginfo
void assert_loginfo(const char *src)
vty_out
int vty_out(struct vty *, const char *,...) VTY_PRINTF_ATTRIBUTE(2
osmo_counters_for_each
int osmo_counters_for_each(int(*handle_counter)(struct osmo_counter *, void *), void *data)
osmo_fsm_inst::name
const char * name
vty_app_info::go_parent_cb
int(* go_parent_cb)(struct vty *vty)
Call-back for taking actions upon exiting a node.
Definition: vty.h:187
osmo_fsm_inst::state
uint32_t state
log_target::print_category
unsigned int print_category
vty_signal_data::sock
int sock
Definition: vty.h:242
osmo_stat_item_get_last
static int32_t osmo_stat_item_get_last(const struct osmo_stat_item *item)
log_info::save_fn
log_save_filters * save_fn
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:339
host::enable
char * enable
Enable password.
Definition: command.h:46
IPV6_PREFIX_MATCH
@ IPV6_PREFIX_MATCH
Definition: command.c:906
buffer
Definition: buffer.c:39
cpu_affinity_it::bufname
char bufname[64]
Definition: cpu_sched_vty.c:68
vty_app_info::config_is_consistent
int(* config_is_consistent)(struct vty *vty)
Check if the config is consistent before write.
Definition: vty.h:194
install_element
void install_element(int node_type, struct cmd_element *)
Install a command into a node.
Definition: command.c:799
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:1836
event
event
VTY events.
Definition: vty.h:32
talloc.h
log_target::rb
void * rb
osmo_stats_reporter::bind_addr_str
char * bind_addr_str
vty::parent_nodes
struct llist_head parent_nodes
List of parent nodes, last item is the outermost parent.
Definition: vty.h:157
STATE_SLASH
#define STATE_SLASH
Definition: command.c:1045
CMD_COMPLETE_MATCH
#define CMD_COMPLETE_MATCH
Definition: command.h:170
vty::fail
int fail
Failure count.
Definition: vty.h:84
vty_out_context::vty
struct vty * vty
Definition: utils.c:48
pid
uint32_t pid
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:63
vty_newline
static const char * vty_newline(struct vty *vty)
Definition: vty.h:167
walk_cb_params::depth_pass
unsigned int depth_pass
Definition: talloc_ctx_vty.c:45
STATE_DOUBLE
#define STATE_DOUBLE
Definition: command.c:1042
SH_FSM_STR
#define SH_FSM_STR
Definition: fsm_vty.c:110
log_target::type
enum log_target_type type
_vector::alloced
unsigned int alloced
Definition: vector.h:29
log_target::print_category_hex
bool print_category_hex
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:434
host::encrypt
int encrypt
Definition: command.h:60
SCHED_VTY_THREAD_SELF
@ SCHED_VTY_THREAD_SELF
Definition: cpu_sched_vty.c:58
llist_head
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
add_group_args
static char * add_group_args(void *talloc_ctx, char *dest)
Definition: tdef_vty.c:317
BUFFER_SIZE_DEFAULT
#define BUFFER_SIZE_DEFAULT
Definition: buffer.c:66
osmo_stats_reporter_set_remote_addr
int osmo_stats_reporter_set_remote_addr(struct osmo_stats_reporter *srep, const char *addr)
if
if(vty->type==VTY_SHELL_SERV)
Definition: command.c:3081
node
struct cmd_node * node
Definition: command.c:3079
vty_node
struct cmd_node vty_node
Definition: vty.c:1734
auth_enable_node
struct cmd_node auth_enable_node
Definition: command.c:91
c
struct abis_rsl_common_hdr c
CMD_COMPLETE_LIST_MATCH
#define CMD_COMPLETE_LIST_MATCH
Definition: command.h:171
CMD_ATTR_HIDDEN
@ CMD_ATTR_HIDDEN
Definition: command.h:139
osmo_stats_reporter_set_flush_period
int osmo_stats_reporter_set_flush_period(struct osmo_stats_reporter *srep, unsigned int period)
cfg_log_node
struct cmd_node cfg_log_node
Definition: logging_vty.c:616
config_help_cmd
struct cmd_element config_help_cmd
log_tgt_mutex_lock
#define log_tgt_mutex_lock()
osmo_stats_reporter::max_class
enum osmo_stats_class max_class
LOG_TGT_TYPE_FILE
LOG_TGT_TYPE_FILE
osmo_tdef_group::desc
const char * desc
SHOW_LOG_STR
#define SHOW_LOG_STR
Definition: logging_vty.c:528
l
int gsm48_generate_mid_from_tmsi *(uint8_t *buf, uint32_t tmsi) OSMO_DEPRECATED_OUTSIDE("Instead u l))
osmo_fsm_inst::T
int T
log_set_print_extended_timestamp
void log_set_print_extended_timestamp(struct log_target *target, int print_timestamp)
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:223
vty_hello
void vty_hello(struct vty *vty)
Definition: vty.c:380
loggingrb.h
buffer.h
Buffering to output and input.
vty_prompt
static void vty_prompt(struct vty *vty)
Definition: vty.c:415
asciidoc_rate_ctr_group_handler
static int asciidoc_rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_)
Definition: stats_vty.c:459
cmd_node::vtysh
int vtysh
Is this node's configuration goes to vtysh ?
Definition: command.h:122
print_version
void print_version(int print_copyright)
print the version (and optionally copyright) information
Definition: command.c:115
vty::status
enum vty::@1 status
Current vty status.
cpu_affinity_it::tid_type
enum sched_vty_thread_id tid_type
Definition: cpu_sched_vty.c:67
CMD_IPV4
#define CMD_IPV4(S)
Definition: command.h:303
LOG_TGT_TYPE_GSMTAP
LOG_TGT_TYPE_GSMTAP
osmo_stats_reporter_set_name_prefix
int osmo_stats_reporter_set_name_prefix(struct osmo_stats_reporter *srep, const char *prefix)
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:103
timer.h
osmo_stats_reporter_enable
int osmo_stats_reporter_enable(struct osmo_stats_reporter *srep)
SCHED_VTY_THREAD_ID
@ SCHED_VTY_THREAD_ID
Definition: cpu_sched_vty.c:60
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:84
osmo_tdef_range_str_buf
int osmo_tdef_range_str_buf(char *buf, size_t buf_len, struct osmo_tdef *t)
CMD_ATTR_DEPRECATED
@ CMD_ATTR_DEPRECATED
Definition: command.h:138
L_CPU_SCHED_NODE
@ L_CPU_SCHED_NODE
CPU Sched related options node.
Definition: command.h:100
osmo_fsm::num_states
unsigned int num_states
WALK_FILTER_NONE
@ WALK_FILTER_NONE
Definition: talloc_ctx_vty.c:38
config_write_memory_cmd
config_write_memory_cmd
Definition: command.c:3059
vector_only_index_free
void vector_only_index_free(void *index)
Definition: vector.c:68
add_category_strings
static void add_category_strings(char **cmd_str_p, char **doc_str_p, const struct log_info *categories)
Definition: logging_vty.c:304
vty_current_node
int vty_current_node(struct vty *vty)
return the current node of a given VTY
Definition: vty.c:346
tdef.h
LOG_LEVEL_ARGS
#define LOG_LEVEL_ARGS
Definition: logging_vty.c:54
osmo_stats_reporter::mtu
int mtu
rate_ctr_group_reset
void rate_ctr_group_reset(struct rate_ctr_group *ctrg)
log_target::fname
const char * fname
vty_out
int vty_out(struct vty *vty, const char *format,...)
VTY standard output function.
Definition: vty.c:321
logging_vty_add_cmds
void logging_vty_add_cmds()
Register logging related commands to the VTY.
Definition: logging_vty.c:1063
vty::escape
unsigned char escape
For escape character.
Definition: vty.h:118
rate_ctr_group_desc::group_name_prefix
const char * group_name_prefix
log_set_log_level
void log_set_log_level(struct log_target *target, int log_level)
vty_dump_nodes
static int vty_dump_nodes(print_func_t print_func, void *data, const char *newline)
Definition: command.c:671
config_write_log
static int config_write_log(struct vty *vty)
Definition: logging_vty.c:989
vty_signal_data::vty
struct vty * vty
Definition: vty.h:243
buffer_data
Definition: buffer.c:49
llist_for_each_entry
#define llist_for_each_entry(pos, head, member)
vty::monitor
int monitor
Definition: vty.h:151
VTY_NORMAL
#define VTY_NORMAL
Definition: vty.c:1245
osmo_stat_item_group::desc
const struct osmo_stat_item_group_desc * desc
osmo_fsm_inst::id
const char * id
print_func_t
int(* print_func_t)(void *data, const char *fmt,...)
Definition: command.c:628
telnet_connection::vty
struct vty * vty
VTY instance associated with telnet connection.
Definition: telnet_interface.h:43
vty_parent_node
Definition: vty.h:52
cmd_filter
static enum match_type cmd_filter(char *command, vector v, unsigned int index, enum match_type level)
Definition: command.c:1454
LOGL_NOTICE
#define LOGL_NOTICE
vty_self_insert
static void vty_self_insert(struct vty *vty, char c)
Definition: vty.c:488
buffer_reset
void buffer_reset(struct buffer *)
Definition: buffer.c:127
DEFUN
DEFUN(cfg_sched_cpu_affinity, cfg_sched_cpu_affinity_cmd, "cpu-affinity (self|all|<0-4294967295>|THREADNAME) CPUHEXMASK [delay]", "Set CPU affinity mask on a (group of) thread(s)\n" "Set CPU affinity mask on thread running the VTY\n" "Set CPU affinity mask on all process' threads\n" "Set CPU affinity mask on a thread with specified PID\n" "Set CPU affinity mask on a thread with specified thread name\n" "CPU affinity mask\n" "If set, delay applying the affinity mask now and let the app handle it at a later point\n")
Definition: cpu_sched_vty.c:374
cmd_try_do_shortcut
static int cmd_try_do_shortcut(enum node_type node, char *first_word)
Definition: command.c:1778
llist_add
static void llist_add(struct llist_head *_new, struct llist_head *head)
desc
Command description structure.
Definition: command.h:156
vty_forward_word
static void vty_forward_word(struct vty *vty)
Definition: vty.c:825
osmo_stat_item_desc::name
const char * name
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:3074
buffer_data::data
unsigned char data[0]
Definition: buffer.c:59
value_string
OSMO_T_FMT_ARGS
#define OSMO_T_FMT_ARGS(T)
password_check
static int password_check
Definition: vty.c:109
IPV6_PREFIX_STR
#define IPV6_PREFIX_STR
Definition: command.c:1039
asciidoc_handle_counter
static int asciidoc_handle_counter(struct osmo_counter *counter, void *sctx_)
Definition: stats_vty.c:397
llist_first_entry_or_null
#define llist_first_entry_or_null(ptr, type, member)
VTY_SHELL
@ VTY_SHELL
Definition: vty.h:48
vty::obuf
struct buffer * obuf
Output buffer.
Definition: vty.h:87
memory
write memory
Definition: command.c:3060
OSMO_STAT_ITEM_NO_UNIT
#define OSMO_STAT_ITEM_NO_UNIT
linuxlist.h
INIT_MATCHVEC_SIZE
#define INIT_MATCHVEC_SIZE
osmo_tdef_group::tdefs
struct osmo_tdef * tdefs
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:2584
osmo_stats_report
int osmo_stats_report()
vty::index_sub
void * index_sub
For multiple level index treatment such as key chain and key.
Definition: vty.h:115
vty_read_file
static int vty_read_file(FILE *confp, void *priv)
Definition: vty.c:1471
walk_filter_type
walk_filter_type
Definition: talloc_ctx_vty.c:37
host::logfile
char * logfile
Log filename.
Definition: command.h:53
logging_internal.h
IPV6_ADDR_STR
#define IPV6_ADDR_STR
Definition: command.c:1038
osmo_fsm_inst::fsm
struct osmo_fsm * fsm
cmd_complete_command
char ** cmd_complete_command()
vty_ensure
static void vty_ensure(struct vty *vty, int length)
Definition: vty.c:478
DEFUN_DEPRECATED
DEFUN_DEPRECATED(deprecated_logging_level_everything, deprecated_logging_level_everything_cmd, NULL, NULL)
Definition: logging_vty.c:401
VTY_SHELL_SERV
@ VTY_SHELL_SERV
Definition: vty.h:49
log_target_destroy
void log_target_destroy(struct log_target *target)
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
llist_add_tail
static void llist_add_tail(struct llist_head *_new, struct llist_head *head)
walk_cb_params
Definition: talloc_ctx_vty.c:43
vector_ensure
void vector_ensure(vector v, unsigned int num)
Definition: vector.c:101
add_group_docs
static char * add_group_docs(void *talloc_ctx, char *dest)
Definition: tdef_vty.c:330
vector.h
Generic vector interface header.
type
enum osmo_sub_auth_type type
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:1515
vty::config
int config
In configure mode.
Definition: vty.h:154
counter.h
sched_vty_opts::cpu_affinity_li_mutex
pthread_mutex_t cpu_affinity_li_mutex
Definition: cpu_sched_vty.c:78
osmo_str_startswith
bool osmo_str_startswith(const char *str, const char *startswith_str)
cmd_entry_function_desc
static const char * cmd_entry_function_desc(const char *src, const char *dst)
Definition: command.c:1695
osmo_log_target_list
struct llist_head osmo_log_target_list
osmo_fsm::instances
struct llist_head instances
osmo_sock_get_name_buf
int osmo_sock_get_name_buf(char *str, size_t str_len, int fd)
rate_ctr::previous
uint64_t previous
argv
argv
Definition: tdef_vty.c:299
buffer_empty
int buffer_empty(struct buffer *b)
Definition: buffer.c:121
DEFUN
#define DEFUN(funcname, cmdname, cmdstr, helpstr)
Macro for defining a VTY node and function.
Definition: command.h:216
osmo_stat_item_group_desc::group_name_prefix
const char * group_name_prefix
log_target::hostname
const char * hostname
CMD_ARGC_MAX
#define CMD_ARGC_MAX
Definition: command.h:176
vty_redraw_line
static void vty_redraw_line(struct vty *)
Definition: vty.c:818
cmd_cmdsize
static int cmd_cmdsize(vector strvec)
Definition: command.c:478
vty_write
static void vty_write(struct vty *vty, const char *buf, size_t nbytes)
Definition: vty.c:468
log_set_print_filename_pos
void log_set_print_filename_pos(struct log_target *target, enum log_filename_pos pos)
vty_config_write
static int vty_config_write(struct vty *vty)
Definition: vty.c:1709
log_target::output
void(* output)(struct log_target *target, unsigned int level, const char *string)
cmd_init
void cmd_init(int)
Definition: command.c:3913
PARTLY_MATCH
@ PARTLY_MATCH
Definition: command.c:910
vty_bind_port
static int vty_bind_port
Definition: vty.c:104
log_target::categories
struct log_category * categories
ERRNO_IO_RETRY
#define ERRNO_IO_RETRY(EN)
Definition: vty.h:22
vty_parent
static struct vty_parent_node * vty_parent(struct vty *vty)
Definition: command.c:2180
sched_vty_opts::sched_rr_prio
int sched_rr_prio
Definition: cpu_sched_vty.c:76
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
osmo_counter::name
const char * name
sched_vty_opts::cpu_affinity_li
struct llist_head cpu_affinity_li
Definition: cpu_sched_vty.c:77
reset_rate_ctr_group_handler
static int reset_rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_)
Definition: stats_vty.c:581
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:1386
CMD_IPV6_PREFIX
#define CMD_IPV6_PREFIX(S)
Definition: command.h:306
osmo_stats_reporter_set_mtu
int osmo_stats_reporter_set_mtu(struct osmo_stats_reporter *srep, int mtu)
vty_history_print
static void vty_history_print(struct vty *vty)
Definition: vty.c:759
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:223
RET_WITH_UNLOCK
#define RET_WITH_UNLOCK(ret)
Definition: logging_vty.c:117
OSMO_FD_WRITE
#define OSMO_FD_WRITE
rate_ctr::current
uint64_t current
LOG_TGT_TYPE_VTY
LOG_TGT_TYPE_VTY
OSMO_TDEF_CUSTOM
OSMO_TDEF_CUSTOM
cmd_execute_command_strict
int cmd_execute_command_strict(vector, struct vty *, struct cmd_element **)
Definition: command.c:2465
VTY_BUFSIZ
#define VTY_BUFSIZ
Definition: vty.h:28
argc
argc
Definition: tdef_vty.c:299
IPV4_PREFIX_MATCH
@ IPV4_PREFIX_MATCH
Definition: command.c:904
cfg_description_cmd
struct cmd_element cfg_description_cmd
tall_vty_ctx
void * tall_vty_ctx
Definition: vty.c:111
file
write Write running configuration to or terminal n Write configuration to the file(same as write file)\n") ALIAS(config_write_file
osmo_fsm_state_name
const char * osmo_fsm_state_name(struct osmo_fsm *fsm, uint32_t state)
VTY_READ
@ VTY_READ
Definition: vty.h:34
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
rate_ctr::intv
struct rate_ctr_per_intv intv[RATE_CTR_INTV_NUM]
OSMO_STATS_CLASS_PEER
OSMO_STATS_CLASS_PEER
vty::iac
unsigned char iac
IAC handling.
Definition: vty.h:128
log_target_rb_avail_size
size_t log_target_rb_avail_size(struct log_target const *target)
vty_config
static int vty_config
Definition: vty.c:107
osmo_g_fsms
struct llist_head osmo_g_fsms
osmo_tdef_vty_set_cmd
return osmo_tdef_vty_set_cmd(vty, tdefs, timer_args)
osmo_fsm_inst::parent_term_event
uint32_t parent_term_event
vty_will_suppress_go_ahead
static void vty_will_suppress_go_ahead(struct vty *vty)
Definition: vty.c:732
vty_auth
static void vty_auth(struct vty *vty)
Definition: vty.c:150
log_target::tgt_syslog
struct log_target::@8::@11 tgt_syslog
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:853
DLGLOBAL
#define DLGLOBAL
osmo_stats_reporter_create_log
struct osmo_stats_reporter * osmo_stats_reporter_create_log(const char *name)
log_tgt_mutex_unlock
#define log_tgt_mutex_unlock()
group_arg
group_arg
Definition: tdef_vty.c:302
vty_go_parent
int vty_go_parent(struct vty *vty)
Definition: command.c:2222
osmo_fd
log_level_str
const char * log_level_str(unsigned int lvl)
osmo_fsm_state::in_event_mask
uint32_t in_event_mask
log_parse_category
int log_parse_category(const char *category)
config_write_host
static int config_write_host(struct vty *vty)
Definition: command.c:852
host::motd
const char * motd
Banner configuration.
Definition: command.h:63
VTY_MAXHIST
#define VTY_MAXHIST
Definition: vty.h:29
vty_config_lock
int vty_config_lock(struct vty *)
Lock the configuration to a given VTY.
Definition: vty.c:357
SCHED_VTY_THREAD_NAME
@ SCHED_VTY_THREAD_NAME
Definition: cpu_sched_vty.c:61
log_category::enabled
uint8_t enabled
LOGP
#define LOGP(ss, level, fmt, args...)
reset_osmo_stat_item_group_handler
static int reset_osmo_stat_item_group_handler(struct osmo_stat_item_group *statg, void *sctx_)
Definition: stats_vty.c:587
osmo_tdef::max_val
unsigned long max_val
vty::hp
int hp
History lookup current point.
Definition: vty.h:105
llist_empty
static int llist_empty(const struct llist_head *head)
_vector::index
void ** index
Definition: vector.h:30
osmo_log_vty2tgt
struct log_target * osmo_log_vty2tgt(struct vty *vty)
Get log target associated to VTY console.
Definition: logging_vty.c:150
cmd_desc_str
static char * cmd_desc_str(const char **string)
Fetch next description.
Definition: command.c:344
vty_get_cwd
char * vty_get_cwd(void)
Definition: vty.c:1781
log_target::print_timestamp
unsigned int print_timestamp
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:3073
osmo_stats_reporter::enabled
int enabled
vty_end_of_line
static void vty_end_of_line(struct vty *vty)
Definition: vty.c:557
cmd_ipv4_match
static enum match_type cmd_ipv4_match(const char *str)
Definition: command.c:914
VTY_PRE_ESCAPE
#define VTY_PRE_ESCAPE
Definition: vty.c:1246
fsm.h
log_target::tgt_rb
struct log_target::@8::@13 tgt_rb
VTY_ESCAPE
#define VTY_ESCAPE
Definition: vty.c:1247
osmo_counter::description
const char * description
osmo_fsm::event_names
const struct value_string * event_names
_vty_output
static void _vty_output(struct log_target *tgt, unsigned int level, const char *line)
Definition: logging_vty.c:81
VTY_READ_BUFSIZ
#define VTY_READ_BUFSIZ
Definition: vty.h:26
vty_backward_word
static void vty_backward_word(struct vty *vty)
Definition: vty.c:842
osmo_tdef_vty_out_one
void osmo_tdef_vty_out_one(struct vty *vty, struct osmo_tdef *t, const char *prefix_fmt,...)
Write to VTY the current status of one timer.
Definition: tdef_vty.c:204
osmo_fsm_state::out_state_mask
uint32_t out_state_mask
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:100
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:249
buffer_data::sp
size_t sp
Definition: buffer.c:56
global_tdef_groups
static struct osmo_tdef_group * global_tdef_groups
Singleton Tnnn groups definition as set by osmo_tdef_vty_groups_init().
Definition: tdef_vty.c:270
cmd_complete_command_real
static char ** cmd_complete_command_real(vector vline, struct vty *vty, int *status)
Definition: command.c:1997
argv_concat
char * argv_concat(const char **argv, int argc, int shift)
Definition: command.c:124
cmd_node::cmd_vector
vector cmd_vector
Vector of this node's command list.
Definition: command.h:128
my_sched_setaffinity
static int my_sched_setaffinity(enum sched_vty_thread_id tid_type, pid_t pid, cpu_set_t *cpuset, size_t cpuset_size)
Definition: cpu_sched_vty.c:330
VARARG_MATCH
@ VARARG_MATCH
Definition: command.c:909
vty::height
int height
Widnow height.
Definition: vty.h:146
osmo_stats_reporter_set_remote_port
int osmo_stats_reporter_set_remote_port(struct osmo_stats_reporter *srep, int port)
osmo_tdef_for_each
#define osmo_tdef_for_each(t, tdefs)
log_info_cat::description
const char * description
OSMO_STATS_CLASS_SUBSCRIBER
OSMO_STATS_CLASS_SUBSCRIBER
rate_ctr_for_each_group
int rate_ctr_for_each_group(rate_ctr_group_handler_t handle_group, void *data)
k
uint8_t k[OSMO_A5_MAX_KEY_LEN_BYTES]
osmo_stats_config::interval
int interval
STATE_ADDR
#define STATE_ADDR
Definition: command.c:1043
logging.h
timer_args
const char ** timer_args
Definition: tdef_vty.c:291
log_target::tgt_vty
struct log_target::@8::@12 tgt_vty
cmd_deopt
static char * cmd_deopt(void *ctx, const char *str)
Definition: command.c:1372
OSMO_T_FMT
#define OSMO_T_FMT
CMD_SUCCESS
return CMD_SUCCESS
Definition: command.c:3100
osmo_fsm_state::name
const char * name
buffer_free
void buffer_free(struct buffer *)
Definition: buffer.c:93
gen_logging_level_cmd_strs
static void gen_logging_level_cmd_strs(struct cmd_element *cmd, const char *level_args, const char *level_strs)
Definition: logging_vty.c:321
osmo_stats_reporter::name_prefix
char * name_prefix
list
struct llist_head list
BUFFER_EMPTY
@ BUFFER_EMPTY
Definition: buffer.h:63
CMD_OPTION
#define CMD_OPTION(S)
Definition: command.h:298
log_target::filter_map
int filter_map
vty_out_newline
int vty_out_newline(struct vty *vty)
print a newline on the given VTY
Definition: vty.c:332
RATE_CTR_INTV_DAY
RATE_CTR_INTV_DAY
STATE_COLON
#define STATE_COLON
Definition: command.c:1041
cpu_affinity_it
Definition: cpu_sched_vty.c:65
vty_delete_backward_char
static void vty_delete_backward_char(struct vty *vty)
Definition: vty.c:925
cmp_desc
static int cmp_desc(const void *p, const void *q)
Definition: command.c:201
vty_shell_serv
int vty_shell_serv(struct vty *vty)
Definition: vty.c:1786
OSMO_SNPRINTF_RET
#define OSMO_SNPRINTF_RET(ret, rem, offset, len)
osmo_stat_item_group_desc::class_id
int class_id
vty_self_insert_overwrite
static void vty_self_insert_overwrite(struct vty *vty, char c)
Definition: vty.c:507
_vector::active
unsigned int active
Definition: vector.h:28
vty_out_context::prefix
const char * prefix
Definition: utils.c:49
osmo_fd::fd
int fd
vty::VTY_CLOSE
@ VTY_CLOSE
Definition: vty.h:121
osmo_tdef_get_entry
struct osmo_tdef * osmo_tdef_get_entry(struct osmo_tdef *tdefs, int T)
socket.h
osmo_strrb
osmo_tdef_vty_parse_T_arg
struct osmo_tdef * osmo_tdef_vty_parse_T_arg(struct vty *vty, struct osmo_tdef *tdefs, const char *osmo_tdef_str)
Parse an argument like "1234", "T1234", "t1234", or "X1234", "x1234", as from OSMO_TDEF_VTY_ARG_T.
Definition: tdef_vty.c:51
vty_read
int vty_read(struct vty *vty)
Read data via vty socket.
Definition: vty.c:1282
buffer::head
struct buffer_data * head
Definition: buffer.c:41
osmo_stat_item_for_each_item
int osmo_stat_item_for_each_item(struct osmo_stat_item_group *statg, osmo_stat_item_handler_t handle_item, void *data)
vtyvec
static vector vtyvec
Definition: vty.c:92
gsmtap.h
vty_backward_kill_word
static void vty_backward_kill_word(struct vty *vty)
Definition: vty.c:971
OSMO_TDEF_VTY_ARG_T_OPTIONAL
#define OSMO_TDEF_VTY_ARG_T_OPTIONAL
Definition: tdef_vty.h:46
gDEFUN
gDEFUN(config_exit, config_exit_cmd, "exit", "Exit current mode and down to previous mode\n")
Definition: command.c:2772
VTY_TERM
@ VTY_TERM
Definition: vty.h:46
OSMO_SOCK_F_BIND
#define OSMO_SOCK_F_BIND
CMD_SUCCESS_DAEMON
#define CMD_SUCCESS_DAEMON
Definition: command.h:172
osmo_tdef_vty_parse_val_arg
unsigned long osmo_tdef_vty_parse_val_arg(const char *val_arg, unsigned long default_val)
Parse an argument of the form "(0-2147483647|default)", as from OSMO_TDEF_VTY_ARG_VAL.
Definition: tdef_vty.c:99
cmd_describe_command
vector cmd_describe_command()
osmo_fd::data
void * data
sort_node
void sort_node(void)
Sort each node's command element according to command string.
Definition: command.c:210
stats_class_strs
static const struct value_string stats_class_strs[]
Definition: stats_vty.c:67
cpu_affinity_it::cpuset
cpu_set_t * cpuset
Definition: cpu_sched_vty.c:69
LOGL_ERROR
#define LOGL_ERROR
RATE_CTR_INTV_SEC
RATE_CTR_INTV_SEC
cmd_node::prompt
const char * prompt
Prompt character at vty interface.
Definition: command.h:119
vty_init
void vty_init(struct vty_app_info *app_info)
Initialize VTY layer.
Definition: vty.c:1800
osmo_stats_set_interval
int osmo_stats_set_interval(int interval)
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:73
auth_node
struct cmd_node auth_node
Definition: command.c:79
CMD_ERR_INCOMPLETE
#define CMD_ERR_INCOMPLETE
Definition: command.h:166
osmo_tdef_vty_out_all
void osmo_tdef_vty_out_all(struct vty *vty, struct osmo_tdef *tdefs, const char *prefix_fmt,...)
Write to VTY the current status of all given timers.
Definition: tdef_vty.c:238
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:3856
LOG_TGT_TYPE_STRRB
LOG_TGT_TYPE_STRRB
desc::str
const char * str
Command's description.
Definition: command.h:158
rate_ctr
vty_app_info::copyright
const char * copyright
copyright string of the application
Definition: vty.h:179
vector_unset
void vector_unset(vector v, unsigned int i)
Definition: vector.c:177
log_set_all_filter
void log_set_all_filter(struct log_target *target, int all)
print_func_stream
static int print_func_stream(void *data, const char *format,...)
Definition: command.c:762
vty_describe_command
static void vty_describe_command(struct vty *vty)
Definition: vty.c:1122
CMD_SUCCESS
#define CMD_SUCCESS
Return value of the commands.
Definition: command.h:162
vty_out
vty_out(vty, "!%s", VTY_NEWLINE)
LOG_FLT_ALL
LOG_FLT_ALL
FORCE_ALL_STR
#define FORCE_ALL_STR
Definition: logging_vty.c:47
vty_out_statistics_partial
void vty_out_statistics_partial(struct vty *vty, const char *prefix, int max_level)
Definition: utils.c:322
osmo_tdef_vty_out_one_va
void osmo_tdef_vty_out_one_va(struct vty *vty, struct osmo_tdef *t, const char *prefix_fmt, va_list va)
Write to VTY the current status of one timer.
Definition: tdef_vty.c:172
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
gen_vty_logp_cmd_strs
static void gen_vty_logp_cmd_strs(struct cmd_element *cmd)
Definition: logging_vty.c:1033
T_arg
const char * T_arg
Definition: tdef_vty.c:276
stat_item.h
osmo_cpu_sched_vty_init
int osmo_cpu_sched_vty_init(void *tall_ctx)
Initialize sched VTY nodes.
Definition: cpu_sched_vty.c:598
proc_name_exists
static bool proc_name_exists(const char *name, pid_t *res_pid)
Definition: cpu_sched_vty.c:225
CMD_IPV6
#define CMD_IPV6(S)
Definition: command.h:305
ADD
#define ADD(out, str)
STATE_DOT
#define STATE_DOT
Definition: command.c:1044
walk_cb_params::regexp
regex_t regexp
Definition: talloc_ctx_vty.c:48
cpu_affinity_it::delay
bool delay
Definition: cpu_sched_vty.c:71
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:480
osmo_fsm_inst::log_level
int log_level
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:247
handle_counter
static int handle_counter(struct osmo_counter *counter, void *vctx_)
Definition: utils.c:306
vty_previous_line
static void vty_previous_line(struct vty *vty)
Definition: vty.c:799
vty_app_info
Information an application registers with the VTY.
Definition: vty.h:173
cmd_make_strvec
vector cmd_make_strvec(const char *)
Breaking up string into each command piece.
Definition: command.c:320
osmo_log_info
struct log_info * osmo_log_info
CATEGORY_ALL_STR
#define CATEGORY_ALL_STR
Definition: logging_vty.c:46
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:269
LOGGING_STR
#define LOGGING_STR
Definition: logging.h:5
rate_ctr_group::idx
unsigned int idx
parse_cpu_hex_mask
static int parse_cpu_hex_mask(const char *str, cpu_set_t *cpuset, size_t cpuset_size)
Definition: cpu_sched_vty.c:112
DEFUN
DEFUN(enable_logging, enable_logging_cmd, "logging enable", LOGGING_STR "Enables logging to this vty\n")
Definition: logging_vty.c:123
telnet_exit
void telnet_exit(void)
Close all telnet connections and release the telnet socket.
Definition: telnet_interface.c:259