summaryrefslogtreecommitdiffstats
path: root/lib/vty.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vty.h')
-rw-r--r--lib/vty.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/lib/vty.h b/lib/vty.h
index 1e7f1261..3c56a0b3 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -23,6 +23,10 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "thread.h"
#include "log.h"
+#include "qpthreads.h"
+#include "qpselect.h"
+#include "qtimers.h"
+#include "qpnexus.h"
#define VTY_BUFSIZ 512
#define VTY_MAXHIST 20
@@ -30,7 +34,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
/* VTY struct. */
struct vty
{
- /* File descripter of this vty. */
+ /* File descriptor of this vty. */
int fd;
/* Is this vty connect to file or not */
@@ -39,7 +43,7 @@ struct vty
/* Node status of this vty */
int node;
- /* What address is this vty comming from. */
+ /* What address is this vty coming from. */
char *address;
/* Failure count */
@@ -112,11 +116,14 @@ struct vty
int config;
/* Read and write thread. */
+
+ qps_file qf;
struct thread *t_read;
struct thread *t_write;
/* Timeout seconds and thread. */
unsigned long v_timeout;
+ qtimer qtr;
struct thread *t_timeout;
};
@@ -205,13 +212,20 @@ do {
/* Exported variables */
extern char integrate_default[];
+extern qpt_mutex_t* vty_mutex;
+#ifndef NDEBUG
+extern int vty_lock_count;
+extern int vty_lock_asserted;
+#endif
/* Prototypes. */
+extern void vty_init_r (qpn_nexus, qpn_nexus);
+extern void vty_exec_r(void);
extern void vty_init (struct thread_master *);
extern void vty_init_vtysh (void);
extern void vty_terminate (void);
extern void vty_reset (void);
-extern struct vty *vty_new (void);
+extern struct vty *vty_new (int, int);
extern int vty_out (struct vty *, const char *, ...) PRINTF_ATTRIBUTE(2, 3);
extern int vty_puts(struct vty* vty, const char* str) ;
extern int vty_out_newline(struct vty *vty) ;
@@ -228,6 +242,14 @@ extern int vty_config_unlock (struct vty *);
extern int vty_shell (struct vty *);
extern int vty_shell_serv (struct vty *);
extern void vty_hello (struct vty *);
+extern void vty_queued_result(struct vty *, int);
+extern int vty_get_node(struct vty *);
+extern void vty_set_node(struct vty *, int);
+extern int vty_get_type(struct vty *);
+extern int vty_get_status(struct vty *);
+extern void vty_set_status(struct vty *, int);
+extern int vty_get_lines(struct vty *);
+extern void vty_set_lines(struct vty *, int);
/* Send a fixed-size message to all vty terminal monitors; this should be
an async-signal-safe function. */