diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2018-12-15 17:36:41 +0000 |
---|---|---|
committer | Holger Freyther <holger@freyther.de> | 2018-12-23 04:20:08 +0000 |
commit | 99ae401e490e60fc07bef7eacc478be7bdcc9f5a (patch) | |
tree | 2b762253f327c4f6b2f9133e32bdd9f1fb850ec0 /include/osmocom/vty/telnet_interface.h | |
parent | d8d0ef6b5c1431645a467d173bd14399f2e9fef7 (diff) |
vty: Make TCP port configurable and introduce telnet_init_default
Extend the vty_bind_cmd VTY command to allow to optionally specify
a port in addition to the IPv4 address.
Introduce telnet_init_default to relieve client code from having
to query the bind IPv4 address (and now the TCP port). Instead a
client only needs to pass the default TCP port to use.
Client code should use it like:
int rc = telnet_init_default(ctx, priv, OSMO_VTY_PORT_SGSN);
Change-Id: Id5fb2faaf4311bd7284ee870526a6f87b7e260f3
Diffstat (limited to 'include/osmocom/vty/telnet_interface.h')
-rw-r--r-- | include/osmocom/vty/telnet_interface.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/vty/telnet_interface.h b/include/osmocom/vty/telnet_interface.h index d653466a..da7cf839 100644 --- a/include/osmocom/vty/telnet_interface.h +++ b/include/osmocom/vty/telnet_interface.h @@ -47,6 +47,7 @@ struct telnet_connection { int telnet_init(void *tall_ctx, void *priv, int port); int telnet_init_dynif(void *tall_ctx, void *priv, const char *ip, int port); +int telnet_init_default(void *tall_ctx, void *priv, int default_port); void telnet_exit(void); |