diff options
Diffstat (limited to 'include/vty/vty.h')
-rw-r--r-- | include/vty/vty.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/vty/vty.h b/include/vty/vty.h index 6df6b6715..4bb785b9f 100644 --- a/include/vty/vty.h +++ b/include/vty/vty.h @@ -21,9 +21,25 @@ #define VTY_BUFSIZ 512 #define VTY_MAXHIST 20 +/* Vty events */ +enum event { + VTY_SERV, + VTY_READ, + VTY_WRITE, + VTY_TIMEOUT_RESET, +#ifdef VTYSH + VTYSH_SERV, + VTYSH_READ, + VTYSH_WRITE +#endif /* VTYSH */ +}; + struct vty { FILE *file; + /* private data, specified by creator */ + void *priv; + /* File descripter of this vty. */ int fd; @@ -115,7 +131,7 @@ void vty_init (void); void vty_init_vtysh (void); void vty_reset (void); struct vty *vty_new (void); -struct vty *vty_create (int vty_sock); +struct vty *vty_create (int vty_sock, void *priv); int vty_out (struct vty *, const char *, ...) PRINTF_ATTRIBUTE(2, 3); int vty_out_newline(struct vty *); int vty_read(struct vty *vty); |