From f81eb328b61f65a09b7233aaa70b2f655c0300bc Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 24 Feb 2016 00:10:41 +0100 Subject: vty: add ctrl section for Control interface bind address This may seem like overkill for a mere const char * config item, but it makes the Control interface VTY commands reusable in any main() scope (inspired by libosmo-abis' VTY config). Add API functions ctrl_vty_init() and ctrl_vty_get_bind_addr(), in new files src/ctrl/control_vty.c and include/osmocom/ctrl/control_vty.h, compiled and/or installed dependent on ENABLE_VTY. Using these functions allows configuring a static const char* with the VTY commands ctrl bind A.B.C.D which callers shall subsequently use to bind the Control interface to a specific local interface address, by passing the return value of ctrl_vty_get_bind_addr() to control_interface_setup(). Add CTRL_NODE to enum node_type, "eating" RESERVED4_NODE to heed that comment on avoiding ABI changes. --- include/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/Makefile.am') diff --git a/include/Makefile.am b/include/Makefile.am index a965fb92..ac22ee64 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -117,7 +117,8 @@ nobase_include_HEADERS += \ osmocom/vty/telnet_interface.h \ osmocom/vty/vector.h \ osmocom/vty/vty.h \ - osmocom/vty/ports.h + osmocom/vty/ports.h \ + osmocom/ctrl/control_vty.h endif noinst_HEADERS = \ -- cgit v1.2.3