diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-08-17 17:13:48 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-08-17 17:14:12 +0200 |
commit | 7acb30c69b1c10458b37ac403c82e3b98edd9ab1 (patch) | |
tree | 0baea1ee03ebec8b7c0840c3afc2ddcd2dbc1611 /src/vty/telnet_interface.c | |
parent | 47379ca95bd926759d34abcdd1b4b0465fd448c0 (diff) |
doxygen: Add (partial) VTY API documentation
Diffstat (limited to 'src/vty/telnet_interface.c')
-rw-r--r-- | src/vty/telnet_interface.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index 1a285102..89cba581 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -33,6 +33,11 @@ #include <osmocom/vty/buffer.h> #include <osmocom/vty/command.h> +/*! \addtogroup vty + * @{ + */ +/*! \file telnet_interface.c */ + /* per connection data */ LLIST_HEAD(active_connections); @@ -47,6 +52,11 @@ static struct osmo_fd server_socket = { .priv_nr = 0, }; +/*! \brief Initialize telnet based VTY interface + * \param[in] tall_ctx \ref talloc context + * \param[in] priv private data to be passed to callback + * \param[in] port UDP port number + */ int telnet_init(void *tall_ctx, void *priv, int port) { struct sockaddr_in sock_addr; @@ -55,6 +65,7 @@ int telnet_init(void *tall_ctx, void *priv, int port) tall_telnet_ctx = talloc_named_const(tall_ctx, 1, "telnet_connection"); + /* FIXME: use new socket.c code of libosmocore */ fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd < 0) { @@ -109,6 +120,7 @@ static void print_welcome(int fd) write(fd, host.app_info->copyright, strlen(host.app_info->copyright)); } +/*! \brief close a telnet connection */ int telnet_close_client(struct osmo_fd *fd) { struct telnet_connection *conn = (struct telnet_connection*)fd->data; @@ -183,7 +195,7 @@ static int telnet_new_connection(struct osmo_fd *fd, unsigned int what) return 0; } -/* callback from VTY code */ +/*! \brief callback from core VTY code about VTY related events */ void vty_event(enum event event, int sock, struct vty *vty) { struct telnet_connection *connection = vty->priv; @@ -209,3 +221,4 @@ void vty_event(enum event event, int sock, struct vty *vty) } } +/*! }@ */ |