diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-03-10 19:46:16 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-03-10 19:46:16 +0000 |
commit | c63e51daac1dc0c04041ec2101cee735c170641f (patch) | |
tree | d922bb6f41ab62a79d77f8177e0b2efbc280a17f /include | |
parent | d256d4f19c251e6e78cbbfc3d0e1e796418f90ed (diff) |
* correctly handle VTY_READ/VTY_WRITE events and select loop integration of VTY
Diffstat (limited to 'include')
-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); |