libosmovty 1.9.0.195-dafd
Osmocom VTY library
tdef_vty.h File Reference

API to configure osmo_tdef Tnnn timers from VTY configuration. More...

#include <stdint.h>
#include <stdarg.h>
#include <osmocom/vty/command.h>

Go to the source code of this file.

Macros

#define OSMO_TDEF_VTY_ARG_T   "TNNNN"
 
#define OSMO_TDEF_VTY_DOC_T
 
#define OSMO_TDEF_VTY_ARG_T_OPTIONAL   "[" OSMO_TDEF_VTY_ARG_T "]"
 
#define OSMO_TDEF_VTY_ARG_VAL   "(<0-2147483647>|default)"
 
#define OSMO_TDEF_VTY_DOC_VAL   "New timer value\n" "Set to default timer value\n"
 
#define OSMO_TDEF_VTY_ARG_VAL_OPTIONAL   "[" OSMO_TDEF_VTY_ARG_VAL "]"
 
#define OSMO_TDEF_VTY_ARG_SET   OSMO_TDEF_VTY_ARG_T " " OSMO_TDEF_VTY_ARG_VAL
 
#define OSMO_TDEF_VTY_DOC_SET   OSMO_TDEF_VTY_DOC_T OSMO_TDEF_VTY_DOC_VAL
 
#define OSMO_TDEF_VTY_ARG_SET_OPTIONAL   OSMO_TDEF_VTY_ARG_T_OPTIONAL " " OSMO_TDEF_VTY_ARG_VAL_OPTIONAL
 

Functions

int osmo_tdef_vty_set_cmd (struct vty *vty, struct osmo_tdef *tdefs, const char **args)
 Apply a timer configuration from VTY argument strings. More...
 
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]'. More...
 
void osmo_tdef_vty_write (struct vty *vty, struct osmo_tdef *tdefs, const char *prefix_fmt,...)
 Write current timer configuration arguments to the vty. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
struct osmo_tdefosmo_tdef_vty_parse_T_arg (struct vty *vty, struct osmo_tdef *tdefs, const char *T_str)
 Parse an argument like "1234", "T1234", "t1234", or "X1234", "x1234", as from OSMO_TDEF_VTY_ARG_T. More...
 
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. More...
 
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. More...
 
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_init(). More...
 

Detailed Description

API to configure osmo_tdef Tnnn timers from VTY configuration.