13 #define VTY_PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b)))
15 #define VTY_PRINTF_ATTRIBUTE(a,b)
19 #define ERRNO_IO_RETRY(EN) \
20 (((EN) == EAGAIN) || ((EN) == EWOULDBLOCK) || ((EN) == EINTR))
23 #define VTY_READ_BUFSIZ 512
25 #define VTY_BUFSIZ 512
26 #define VTY_MAXHIST 20
104 enum { VTY_NORMAL, VTY_CLOSE, VTY_MORE, VTY_MORELINE }
status;
118 #define TELNET_NAWS_SB_LEN 5
120 unsigned char sb_buf[TELNET_NAWS_SB_LEN];
141 #define VTY_NEWLINE ((vty->type == VTY_TERM) ? "\r\n" : "\n")
143 static inline const char *vty_newline(
struct vty *
vty)
169 void vty_init_vtysh (
void);
173 int vty_out (
struct vty *,
const char *, ...) VTY_PRINTF_ATTRIBUTE(2, 3);
178 char *vty_get_cwd (
void);
179 void vty_log (const
char *level, const
char *proto, const
char *fmt, va_list);
183 int vty_shell_serv (struct vty *);
184 void vty_hello (struct vty *);
187 int vty_go_parent(struct vty *vty);
189 extern
void *tall_vty_ctx;