Telnet Interface

## Files

file | telnet_interface.h
| minimalistic telnet/network interface it might turn into a wire interface

## Data Structures

struct | telnet_connection
| A telnet connection. More...

## Functions

int | telnet_init (void *tall_ctx, void *priv, int port)
| Initialize telnet based VTY interface listening to 127.0.0.1. More...
int | telnet_init_dynif (void *tall_ctx, void *priv, const char *ip, int port)
| Initialize telnet based VTY interface. More...
int | telnet_init_default (void *tall_ctx, void *priv, int default_port)
| Initializes telnet based VTY interface using the configured bind addr/port. More...
void | telnet_exit (void)
| Close all telnet connections and release the telnet socket. More...

## Detailed Description

## Function Documentation

## telnet_exit()

void telnet_exit | ( | void |  | ) |

Close all telnet connections and release the telnet socket.

References telnet_connection::entry, osmo_fd::fd, telnet_connection::fd, llist_for_each_entry_safe, osmo_fd_unregister(), server_socket, tall_telnet_ctx, and telnet_close_client().

## telnet_init()

int telnet_init | ( | void * | tall_ctx,
|  | void * | priv,
|  | int | port
| ) |  |

Initialize telnet based VTY interface listening to 127.0.0.1.

Parameters

  [in] | tall_ctx | talloc context
  [in] | priv | private data to be passed to callback
  [in] | port | TCP port number to bind to

References telnet_init_dynif().

## telnet_init_default()

int telnet_init_default | ( | void * | tall_ctx,
|  | void * | priv,
|  | int | default_port
| ) |  |

Initializes telnet based VTY interface using the configured bind addr/port.

Parameters

  [in] | tall_ctx | talloc context
  [in] | priv | private data to be passed to callback
  [in] | default_port | TCP port number to bind to if not explicitely configured

References telnet_init_dynif(), vty_get_bind_addr(), and vty_get_bind_port().

## telnet_init_dynif()

int telnet_init_dynif | ( | void * | tall_ctx,
|  | void * | priv,
|  | const char * | ip,
|  | int | port
| ) |  |

Initialize telnet based VTY interface.

Parameters

  [in] | tall_ctx | talloc context
  [in] | priv | private data to be passed to callback
  [in] | ip | IP to listen to ('::1' for localhost, '::0' for all, ...)
  [in] | port | TCP port number to bind to

References osmo_fd::data, DLGLOBAL, LOGL_ERROR, LOGL_NOTICE, LOGP, OSMO_SOCK_F_BIND, osmo_sock_init_ofd(), server_socket, and tall_telnet_ctx.

Referenced by telnet_init(), and telnet_init_default().