summaryrefslogtreecommitdiff
path: root/vtysh/vtysh.h
diff options
context:
space:
mode:
authorajs <ajs>2005-01-28 21:11:46 +0000
committerajs <ajs>2005-01-28 21:11:46 +0000
commitb1aa147d09b0e06992cdb39ed11b46df0a3b984f (patch)
tree786c03a44c77ebedf98616053157fdbfa5d4135a /vtysh/vtysh.h
parentafb8b6055c5e54be762e220cf9b7b65a22266733 (diff)
2005-01-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* vtysh.h: Remove obsolete VTYSH_INDEX_* defines. Fix many prototypes for functions with no arguments (must specify argument list as void). * vtysh.c: Enhance vtysh_client array to include the daemon's name and bitmask and socket path (in addition to the fd). This allows us to use loop constructs for various operations that need to be applied to all client daemons, and it facilitates better error messages. Also fix some prototypes with void argument lists. (vclient_close) Issue a warning message indicating which daemon's socket is being closed. (vtysh_execute_func,vtysh_config_from_file) Use a for loop to call vtysh_client_execute. (vtysh_write_terminal,write_config_integrated) Use a for loop to call vtysh_client_config. (vtysh_write_memory) Use a for loop to call vtysh_client_execute. (vtysh_show_daemons) Use a for loop. (vtysh_connect) The struct vtysh_client is now statically initialized, so do not initialize it here. (vtysh_connect_all) Use a for loop to call vtysh_connect. Set ripd_client pointer for use in vtysh_exit_ripd_only.
Diffstat (limited to 'vtysh/vtysh.h')
-rw-r--r--vtysh/vtysh.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h
index e0c3a5b7..d619c294 100644
--- a/vtysh/vtysh.h
+++ b/vtysh/vtysh.h
@@ -33,30 +33,21 @@
#define VTYSH_RMAP VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD
#define VTYSH_INTERFACE VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_ISISD
-#define VTYSH_INDEX_ZEBRA 0
-#define VTYSH_INDEX_RIP 1
-#define VTYSH_INDEX_RIPNG 2
-#define VTYSH_INDEX_OSPF 3
-#define VTYSH_INDEX_OSPF6 4
-#define VTYSH_INDEX_BGP 5
-#define VTYSH_INDEX_ISIS 6
-#define VTYSH_INDEX_MAX 7
-
/* vtysh local configuration file. */
#define VTYSH_DEFAULT_CONFIG "vtysh.conf"
-void vtysh_init_vty ();
-void vtysh_init_cmd ();
-void vtysh_connect_all ();
-void vtysh_readline_init ();
-void vtysh_user_init ();
+void vtysh_init_vty (void);
+void vtysh_init_cmd (void);
+void vtysh_connect_all (void);
+void vtysh_readline_init (void);
+void vtysh_user_init (void);
void vtysh_execute (const char *);
void vtysh_execute_no_pager (const char *);
-char *vtysh_prompt ();
+char *vtysh_prompt (void);
-void vtysh_config_write ();
+void vtysh_config_write (void);
int vtysh_config_from_file (struct vty *, FILE *);
@@ -66,9 +57,9 @@ void vtysh_config_parse (char *);
void vtysh_config_dump (FILE *);
-void vtysh_config_init ();
+void vtysh_config_init (void);
-void vtysh_pager_init ();
+void vtysh_pager_init (void);
/* Child process execution flag. */
extern int execute_flag;