diff options
author | hasso <hasso> | 2003-06-25 10:49:55 +0000 |
---|---|---|
committer | hasso <hasso> | 2003-06-25 10:49:55 +0000 |
commit | 4eeccf18f357c87e5a973cac8d8d84d20c2f7890 (patch) | |
tree | 29863e21b749fce4589031d8a2d3cc36847d9955 /vtysh | |
parent | b0a053be42e5ab00b1453d3b86b8f3a187cc555f (diff) |
Add IPv6 ping and traceroute.
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh.c | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 6000f817..74707f9c 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1443,13 +1443,20 @@ execute_command (char *command, int argc, char *arg1, char *arg2) DEFUN (vtysh_ping, vtysh_ping_cmd, "ping WORD", - "send echo messages\n" + "Send echo messages\n" "Ping destination address or hostname\n") { execute_command ("ping", 1, argv[0], NULL); return CMD_SUCCESS; } +ALIAS (vtysh_ping, + vtysh_ping_ip_cmd, + "ping ip WORD", + "Send echo messages\n" + "IP echo\n" + "Ping destination address or hostname\n") + DEFUN (vtysh_traceroute, vtysh_traceroute_cmd, "traceroute WORD", @@ -1460,6 +1467,37 @@ DEFUN (vtysh_traceroute, return CMD_SUCCESS; } +ALIAS (vtysh_traceroute, + vtysh_traceroute_ip_cmd, + "traceroute ip WORD", + "Trace route to destination\n" + "IP trace\n" + "Trace route to destination address or hostname\n") + +#ifdef HAVE_IPV6 +DEFUN (vtysh_ping6, + vtysh_ping6_cmd, + "ping ipv6 WORD", + "Send echo messages\n" + "IPv6 echo\n" + "Ping destination address or hostname\n") +{ + execute_command ("ping6", 1, argv[0], NULL); + return CMD_SUCCESS; +} + +DEFUN (vtysh_traceroute6, + vtysh_traceroute6_cmd, + "traceroute ipv6 WORD", + "Trace route to destination\n" + "IPv6 trace\n" + "Trace route to destination address or hostname\n") +{ + execute_command ("traceroute6", 1, argv[0], NULL); + return CMD_SUCCESS; +} +#endif + DEFUN (vtysh_telnet, vtysh_telnet_cmd, "telnet WORD", @@ -1891,12 +1929,24 @@ vtysh_init_vty () install_element (KEYCHAIN_KEY_NODE, &vtysh_write_memory_cmd); install_element (VIEW_NODE, &vtysh_ping_cmd); + install_element (VIEW_NODE, &vtysh_ping_ip_cmd); install_element (VIEW_NODE, &vtysh_traceroute_cmd); + install_element (VIEW_NODE, &vtysh_traceroute_ip_cmd); +#ifdef HAVE_IPV6 + install_element (VIEW_NODE, &vtysh_ping6_cmd); + install_element (VIEW_NODE, &vtysh_traceroute6_cmd); +#endif install_element (VIEW_NODE, &vtysh_telnet_cmd); install_element (VIEW_NODE, &vtysh_telnet_port_cmd); install_element (VIEW_NODE, &vtysh_ssh_cmd); install_element (ENABLE_NODE, &vtysh_ping_cmd); + install_element (ENABLE_NODE, &vtysh_ping_ip_cmd); install_element (ENABLE_NODE, &vtysh_traceroute_cmd); + install_element (ENABLE_NODE, &vtysh_traceroute_ip_cmd); +#ifdef HAVE_IPV6 + install_element (ENABLE_NODE, &vtysh_ping6_cmd); + install_element (ENABLE_NODE, &vtysh_traceroute6_cmd); +#endif install_element (ENABLE_NODE, &vtysh_telnet_cmd); install_element (ENABLE_NODE, &vtysh_telnet_port_cmd); install_element (ENABLE_NODE, &vtysh_start_shell_cmd); |