aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/vty
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmocom/vty')
-rw-r--r--include/osmocom/vty/command.h120
-rw-r--r--include/osmocom/vty/telnet_interface.h12
-rw-r--r--include/osmocom/vty/vty.h68
3 files changed, 100 insertions, 100 deletions
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h
index 62989c1d..9a072d73 100644
--- a/include/osmocom/vty/command.h
+++ b/include/osmocom/vty/command.h
@@ -31,97 +31,97 @@
*/
/*! \file command.h */
-/*! \brief Host configuration variable */
+/*! Host configuration variable */
struct host {
- /*! \brief Host name of this router. */
+ /*! Host name of this router. */
char *name;
- /*! \brief Password for vty interface. */
+ /*! Password for vty interface. */
char *password;
char *password_encrypt;
- /*! \brief Enable password */
+ /*! Enable password */
char *enable;
char *enable_encrypt;
- /*! \brief System wide terminal lines. */
+ /*! System wide terminal lines. */
int lines;
- /*! \brief Log filename. */
+ /*! Log filename. */
char *logfile;
- /*! \brief config file name of this host */
+ /*! config file name of this host */
char *config;
- /*! \brief Flags for services */
+ /*! Flags for services */
int advanced;
int encrypt;
- /*! \brief Banner configuration. */
+ /*! Banner configuration. */
const char *motd;
char *motdfile;
- /*! \brief VTY application information */
+ /*! VTY application information */
const struct vty_app_info *app_info;
};
-/*! \brief There are some command levels which called from command node. */
+/*! There are some command levels which called from command node. */
enum node_type {
- AUTH_NODE, /*!< \brief Authentication mode of vty interface. */
- VIEW_NODE, /*!< \brief View node. Default mode of vty interface. */
- AUTH_ENABLE_NODE, /*!< \brief Authentication mode for change enable. */
- ENABLE_NODE, /*!< \brief Enable node. */
- CONFIG_NODE, /*!< \brief Config node. Default mode of config file. */
- SERVICE_NODE, /*!< \brief Service node. */
- DEBUG_NODE, /*!< \brief Debug node. */
- CFG_LOG_NODE, /*!< \brief Configure the logging */
- CFG_STATS_NODE, /*!< \brief Configure the statistics */
-
- VTY_NODE, /*!< \brief Vty node. */
-
- L_E1INP_NODE, /*!< \brief E1 line in libosmo-abis. */
- L_IPA_NODE, /*!< \brief IPA proxying commands in libosmo-abis. */
- L_NS_NODE, /*!< \brief NS node in libosmo-gb. */
- L_BSSGP_NODE, /*!< \brief BSSGP node in libosmo-gb. */
- L_CTRL_NODE, /*!< \brief Control interface node. */
-
- L_CS7_NODE, /*!< \brief SS7 root node */
- L_CS7_AS_NODE, /*!< \brief SS7 Application Server */
- L_CS7_ASP_NODE, /*!< \brief SS7 Application Server Process */
- L_CS7_XUA_NODE, /*!< \brief SS7 xUA Listener */
- L_CS7_RTABLE_NODE, /*!< \brief SS7 Routing Table */
- L_CS7_LINK_NODE, /*!< \brief SS7 Link */
- L_CS7_LINKSET_NODE, /*!< \brief SS7 Linkset */
- L_CS7_SCCPADDR_NODE, /*!< \brief SS7 SCCP Address */
- L_CS7_SCCPADDR_GT_NODE, /*!< \brief SS7 SCCP Global Title */
+ AUTH_NODE, /*!< Authentication mode of vty interface. */
+ VIEW_NODE, /*!< View node. Default mode of vty interface. */
+ AUTH_ENABLE_NODE, /*!< Authentication mode for change enable. */
+ ENABLE_NODE, /*!< Enable node. */
+ CONFIG_NODE, /*!< Config node. Default mode of config file. */
+ SERVICE_NODE, /*!< Service node. */
+ DEBUG_NODE, /*!< Debug node. */
+ CFG_LOG_NODE, /*!< Configure the logging */
+ CFG_STATS_NODE, /*!< Configure the statistics */
+
+ VTY_NODE, /*!< Vty node. */
+
+ L_E1INP_NODE, /*!< E1 line in libosmo-abis. */
+ L_IPA_NODE, /*!< IPA proxying commands in libosmo-abis. */
+ L_NS_NODE, /*!< NS node in libosmo-gb. */
+ L_BSSGP_NODE, /*!< BSSGP node in libosmo-gb. */
+ L_CTRL_NODE, /*!< Control interface node. */
+
+ L_CS7_NODE, /*!< SS7 root node */
+ L_CS7_AS_NODE, /*!< SS7 Application Server */
+ L_CS7_ASP_NODE, /*!< SS7 Application Server Process */
+ L_CS7_XUA_NODE, /*!< SS7 xUA Listener */
+ L_CS7_RTABLE_NODE, /*!< SS7 Routing Table */
+ L_CS7_LINK_NODE, /*!< SS7 Link */
+ L_CS7_LINKSET_NODE, /*!< SS7 Linkset */
+ L_CS7_SCCPADDR_NODE, /*!< SS7 SCCP Address */
+ L_CS7_SCCPADDR_GT_NODE, /*!< SS7 SCCP Global Title */
/*
* When adding new nodes to the libosmocore project, these nodes can be
* used to avoid ABI changes for unrelated projects.
*/
- RESERVED3_NODE, /*!< \brief Reserved for later extensions */
+ RESERVED3_NODE, /*!< Reserved for later extensions */
_LAST_OSMOVTY_NODE
};
#include "vty.h"
-/*! \brief Node which has some commands and prompt string and
+/*! Node which has some commands and prompt string and
* configuration function pointer . */
struct cmd_node {
- /*! \brief Node index */
+ /*! Node index */
int node;
- /*! \brief Prompt character at vty interface. */
+ /*! Prompt character at vty interface. */
const char *prompt;
- /*! \brief Is this node's configuration goes to vtysh ? */
+ /*! Is this node's configuration goes to vtysh ? */
int vtysh;
- /*! \brief Node's configuration write function */
+ /*! Node's configuration write function */
int (*func) (struct vty *);
- /*! \brief Vector of this node's command list. */
+ /*! Vector of this node's command list. */
vector cmd_vector;
};
@@ -130,26 +130,26 @@ enum {
CMD_ATTR_HIDDEN,
};
-/*! \brief Structure of a command element */
+/*! Structure of a command element */
struct cmd_element {
- const char *string; /*!< \brief Command specification by string. */
+ const char *string; /*!< Command specification by string. */
int (*func) (struct cmd_element *, struct vty *, int, const char *[]);
- const char *doc; /*!< \brief Documentation of this command. */
- int daemon; /*!< \brief Daemon to which this command belong. */
- vector strvec; /*!< \brief Pointing out each description vector. */
- unsigned int cmdsize; /*!< \brief Command index count. */
- char *config; /*!< \brief Configuration string */
- vector subconfig; /*!< \brief Sub configuration string */
- unsigned char attr; /*!< \brief Command attributes */
+ const char *doc; /*!< Documentation of this command. */
+ int daemon; /*!< Daemon to which this command belong. */
+ vector strvec; /*!< Pointing out each description vector. */
+ unsigned int cmdsize; /*!< Command index count. */
+ char *config; /*!< Configuration string */
+ vector subconfig; /*!< Sub configuration string */
+ unsigned char attr; /*!< Command attributes */
};
-/*! \brief Command description structure. */
+/*! Command description structure. */
struct desc {
- const char *cmd; /*!< \brief Command string. */
- const char *str; /*!< \brief Command's description. */
+ const char *cmd; /*!< Command string. */
+ const char *str; /*!< Command's description. */
};
-/*! \brief Return value of the commands. */
+/*! Return value of the commands. */
#define CMD_SUCCESS 0
#define CMD_WARNING 1
#define CMD_ERR_NO_MATCH 2
@@ -197,7 +197,7 @@ struct desc {
static int funcname \
(struct cmd_element *self, struct vty *vty, int argc, const char *argv[])
-/*! \brief Macro for defining a VTY node and function
+/*! Macro for defining a VTY node and function
* \param[in] funcname Name of the function implementing the node
* \param[in] cmdname Name of the command node
* \param[in] cmdstr String with syntax of node
@@ -208,7 +208,7 @@ struct desc {
DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, 0, 0) \
DEFUN_CMD_FUNC_TEXT(funcname)
-/*! \brief Macro for defining a non-static (global) VTY node and function
+/*! Macro for defining a non-static (global) VTY node and function
* \param[in] funcname Name of the function implementing the node
* \param[in] cmdname Name of the command node
* \param[in] cmdstr String with syntax of node
diff --git a/include/osmocom/vty/telnet_interface.h b/include/osmocom/vty/telnet_interface.h
index e939ec71..bca91564 100644
--- a/include/osmocom/vty/telnet_interface.h
+++ b/include/osmocom/vty/telnet_interface.h
@@ -31,17 +31,17 @@
/*! \file telnet_interface.h */
-/*! \brief A telnet connection */
+/*! A telnet connection */
struct telnet_connection {
- /*! \brief linked list header for internal management */
+ /*! linked list header for internal management */
struct llist_head entry;
- /*! \brief private data pointer passed through */
+ /*! private data pointer passed through */
void *priv;
- /*! \brief filedsecriptor (socket ) */
+ /*! filedsecriptor (socket ) */
struct osmo_fd fd;
- /*! \brief VTY instance associated with telnet connection */
+ /*! VTY instance associated with telnet connection */
struct vty *vty;
- /*! \brief logging target associated with this telnet connection */
+ /*! logging target associated with this telnet connection */
struct log_target *dbg;
};
diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h
index 43cb0cfe..d59f5d47 100644
--- a/include/osmocom/vty/vty.h
+++ b/include/osmocom/vty/vty.h
@@ -25,7 +25,7 @@
#define VTY_BUFSIZ 512
#define VTY_MAXHIST 20
-/*! \brief VTY events */
+/*! VTY events */
enum event {
VTY_SERV,
VTY_READ,
@@ -48,92 +48,92 @@ enum vty_type {
/*! Internal representation of a single VTY */
struct vty {
- /*! \brief underlying file (if any) */
+ /*! underlying file (if any) */
FILE *file;
- /*! \brief private data, specified by creator */
+ /*! private data, specified by creator */
void *priv;
- /*! \brief File descripter of this vty. */
+ /*! File descripter of this vty. */
int fd;
- /*! \brief Is this vty connect to file or not */
+ /*! Is this vty connect to file or not */
enum vty_type type;
- /*! \brief Node status of this vty */
+ /*! Node status of this vty */
int node;
- /*! \brief Failure count */
+ /*! Failure count */
int fail;
- /*! \brief Output buffer. */
+ /*! Output buffer. */
struct buffer *obuf;
- /*! \brief Command input buffer */
+ /*! Command input buffer */
char *buf;
- /*! \brief Command cursor point */
+ /*! Command cursor point */
int cp;
- /*! \brief Command length */
+ /*! Command length */
int length;
- /*! \brief Command max length. */
+ /*! Command max length. */
int max;
- /*! \brief Histry of command */
+ /*! Histry of command */
char *hist[VTY_MAXHIST];
- /*! \brief History lookup current point */
+ /*! History lookup current point */
int hp;
- /*! \brief History insert end point */
+ /*! History insert end point */
int hindex;
- /*! \brief For current referencing point of interface, route-map,
+ /*! For current referencing point of interface, route-map,
access-list etc... */
void *index;
- /*! \brief For multiple level index treatment such as key chain and key. */
+ /*! For multiple level index treatment such as key chain and key. */
void *index_sub;
- /*! \brief For escape character. */
+ /*! For escape character. */
unsigned char escape;
- /*! \brief Current vty status. */
+ /*! Current vty status. */
enum { VTY_NORMAL, VTY_CLOSE, VTY_MORE, VTY_MORELINE } status;
- /*! \brief IAC handling
+ /*! IAC handling
*
* IAC handling: was the last character received the IAC
* (interpret-as-command) escape character (and therefore the next
* character will be the command code)? Refer to Telnet RFC 854. */
unsigned char iac;
- /*! \brief IAC SB (option subnegotiation) handling */
+ /*! IAC SB (option subnegotiation) handling */
unsigned char iac_sb_in_progress;
/* At the moment, we care only about the NAWS (window size) negotiation,
* and that requires just a 5-character buffer (RFC 1073):
* <NAWS char> <16-bit width> <16-bit height> */
#define TELNET_NAWS_SB_LEN 5
- /*! \brief sub-negotiation buffer */
+ /*! sub-negotiation buffer */
unsigned char sb_buf[TELNET_NAWS_SB_LEN];
- /*! \brief How many subnegotiation characters have we received?
+ /*! How many subnegotiation characters have we received?
*
* We just drop those that do not fit in the buffer. */
size_t sb_len;
- /*! \brief Window width */
+ /*! Window width */
int width;
- /*! \brief Widnow height */
+ /*! Widnow height */
int height;
- /*! \brief Configure lines. */
+ /*! Configure lines. */
int lines;
int monitor;
- /*! \brief In configure mode. */
+ /*! In configure mode. */
int config;
};
@@ -147,19 +147,19 @@ static inline const char *vty_newline(struct vty *vty)
/*! Information an application registers with the VTY */
struct vty_app_info {
- /*! \brief name of the application */
+ /*! name of the application */
const char *name;
- /*! \brief version string of the application */
+ /*! version string of the application */
const char *version;
- /*! \brief copyright string of the application */
+ /*! copyright string of the application */
const char *copyright;
- /*! \brief \ref talloc context */
+ /*! \ref talloc context */
void *tall_ctx;
- /*! \brief call-back for returning to parent n ode */
+ /*! call-back for returning to parent n ode */
int (*go_parent_cb)(struct vty *vty);
- /*! \brief call-back to determine if node is config node */
+ /*! call-back to determine if node is config node */
int (*is_config_node)(struct vty *vty, int node);
- /*! \brief Check if the config is consistent before write */
+ /*! Check if the config is consistent before write */
int (*config_is_consistent)(struct vty *vty);
};