Loading...
Searching...
No Matches
tdef_vty.c File Reference
Tnnn timer VTY configuration

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

`#include <string.h>`
`#include <stdlib.h>`
`#include <errno.h>`
`#include <limits.h>`
`#include <osmocom/vty/vty.h>`
`#include <osmocom/vty/command.h>`
`#include <osmocom/vty/tdef_vty.h>`
`#include <osmocom/core/tdef.h>`
`#include <osmocom/core/fsm.h>`

## Functions

struct osmo_tdef * | osmo_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.
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.
int | osmo_tdef_vty_set_cmd (struct vty *vty, struct osmo_tdef *tdefs, const char **args)
| Apply a timer configuration from VTY argument strings.
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]'.
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.
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.
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.
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.
void | osmo_tdef_vty_write (struct vty *vty, struct osmo_tdef *tdefs, const char *prefix_fmt,...)
| Write current timer configuration arguments to the vty.
| osmo_tdef_groups_for_each (g, global_tdef_groups)
| if (argc< 3) return show_timer(self
return | osmo_tdef_vty_set_cmd (vty, tdefs, timer_args)
static char * | add_group_args (void *talloc_ctx, char *dest)
static char * | add_group_docs (void *talloc_ctx, char *dest)
static char * | timer_command_string (const char *prefix, const char *suffix)
static char * | timer_doc_string (const char *prefix, const char *suffix)
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.
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().

## Variables

static struct osmo_tdef_group * | global_tdef_groups
| Singleton Tnnn groups definition as set by osmo_tdef_vty_groups_init().
const char * | T_arg = argc > 1 ? argv[1] : NULL
struct osmo_tdef_group * | g = NULL
return | CMD_SUCCESS
const char ** | timer_args
struct osmo_tdef * | tdefs = NULL
| vty
| argc
| argv
| group_arg = argv[0]

## Detailed Description

Implementation to configure osmo_tdef Tnnn timers from VTY configuration.