aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/vty/vty.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmocom/vty/vty.h')
-rw-r--r--include/osmocom/vty/vty.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h
index 6a82d7e3..3a2ec6f6 100644
--- a/include/osmocom/vty/vty.h
+++ b/include/osmocom/vty/vty.h
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <stdbool.h>
+#include <time.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/defs.h>
@@ -55,20 +56,6 @@ enum vty_type {
VTY_SHELL_SERV
};
-struct vty_parent_node {
- struct llist_head entry;
-
- /*! private data, specified by creator */
- void *priv;
-
- /*! Node status of this vty */
- int node;
-
- /*! When reading from a config file, these are the indenting characters expected for children of
- * this VTY node. */
- char *indent;
-};
-
/*! Internal representation of a single VTY */
struct vty {
/*! underlying file (if any) */
@@ -141,7 +128,7 @@ struct vty {
#define TELNET_NAWS_SB_LEN 5
/*! sub-negotiation buffer */
unsigned char sb_buf[TELNET_NAWS_SB_LEN];
- /*! 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;
@@ -165,6 +152,9 @@ struct vty {
/*! When reading from a config file, these are the indenting characters expected for children of
* the current VTY node. */
char *indent;
+
+ /*! Whether the expert mode is enabled. */
+ bool expert_mode;
};
/* Small macro to determine newline is newline only or linefeed needed. */
@@ -207,6 +197,7 @@ struct vty_app_info {
/* Prototypes. */
void vty_init(struct vty_app_info *app_info);
int vty_read_config_file(const char *file_name, void *priv);
+int vty_read_config_filep(FILE *confp, void *priv);
void vty_init_vtysh (void);
void vty_reset (void);
struct vty *vty_new (void);
@@ -215,9 +206,11 @@ bool vty_is_active(struct vty *vty);
int vty_out (struct vty *, const char *, ...) VTY_PRINTF_ATTRIBUTE(2, 3);
int vty_out_va(struct vty *vty, const char *format, va_list ap);
int vty_out_newline(struct vty *);
+int vty_out_uptime(struct vty *vty, const struct timespec *starttime);
int vty_read(struct vty *vty);
//void vty_time_print (struct vty *, int);
void vty_close (struct vty *);
+void vty_flush(struct vty *vty);
char *vty_get_cwd (void);
void vty_log (const char *level, const char *proto, const char *fmt, va_list);
int vty_config_lock (struct vty *);