libosmocore/src/vty
Neels Hofmeyr cf70aa0c40 enable vty xml dumping to stdout
Allow dumping the VTY XML reference (for generating manuals) to a normal FILE*
stream instead of a vty output buffer.

We currently generate the VTY reference by starting the client program,
connecting to the VTY telnet and dumping the reference. That is weirdly
convoluted, especially since there has to be a valid config file that
successfully starts up a minimal set of external links before the reference can
be generated. IMO we should have dumped the XML reference to stdout from the
start, and never to a VTY session.

With this patch, it is trivial to generate the XML VTY reference by a
commandline switch. The client program will set up the entire VTY, and
immediately after parsing the cmdline options but before parsing a config file,
just dumps the reference and doesn't even start establishing local ports. That
would allow generating the XML reference on the fly during the build process of
the manuals, without the need of a docker container or somesuch.

A first implementation of such a commandline switch is `osmo-bsc -X`, added in
I316efedb2c1652791434ecf14a1e261367cd2fb7

This patch jumps through a bit of a hoop to still allow dumping to a VTY buffer
without code dup, to still allow dumping the XML reference through telnet VTY,
until all our programs have implemented an -X switch (TM).

Change-Id: Ic74bbdb6dc5ea05f03c791cc70184861e39cd492
2020-05-18 13:55:08 +02:00
..
Makefile.am Bump version: 1.2.0.108-c6a8-dirty → 1.3.0 2020-01-02 18:42:30 +01:00
buffer.c Fix/Update copyright notices; Add SPDX annotation 2017-11-13 01:35:12 +09:00
command.c enable vty xml dumping to stdout 2020-05-18 13:55:08 +02:00
fsm_vty.c ctrl/vty: fsm: use correct element when iterating over fsm->proc.children 2018-07-29 14:35:00 +00:00
logging_vty.c logging_vty.c: Avoid acquiring log tgt lock in logging level cmd when not needed 2020-01-03 22:16:08 +00:00
stats_vty.c stats: Support regular stats flush 2020-05-09 08:08:53 +00:00
talloc_ctx_vty.c vty/talloc_ctx_vty.c: use REG_NOSUB flag of regcomp() 2019-04-11 00:24:55 +00:00
tdef_vty.c tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() 2020-02-06 01:06:14 +07:00
telnet_interface.c vty/telnet_interface.c: log connection accept() / close() events 2019-07-30 17:17:15 +00:00
utils.c stop printing group description in vty_out_rate_ctr_group_fmt() 2018-10-29 13:48:47 +00:00
vector.c Fix/Update copyright notices; Add SPDX annotation 2017-11-13 01:35:12 +09:00
vty.c libosmovty: simplify condition checking vty->fd in vty_close() 2019-11-30 18:49:33 +00:00