From b9a279ba9466d8733261aff1bab0d3ec1031c34c Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 24 Jan 2007 23:53:22 +0000 Subject: Unify ping and ping6. ping has -4 and -6 which force name resolution into IP or IPv6 only, otherwise we take address family returned by host2sockaddr() in lsa->sa.sa_family. IOW: "ping ::1" with do IPv6 ping, "ping 127.0.0.1" will do IPv4 ping. ping6 is aliased to "ping -6". --- include/usage.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/usage.h b/include/usage.h index 8ddd116..c29c6c8 100644 --- a/include/usage.h +++ b/include/usage.h @@ -2401,6 +2401,10 @@ "host" #define ping_full_usage \ "Send ICMP ECHO_REQUEST packets to network hosts" +#define ping6_trivial_usage \ + "host" +#define ping6_full_usage \ + "Send ICMP ECHO_REQUEST packets to network hosts" #else #define ping_trivial_usage \ "[OPTION]... host" @@ -2412,22 +2416,6 @@ " -I IP Use IP as source address\n" \ " -q Quiet mode, only displays output at start\n" \ " and when finished" -#endif -#define ping_example_usage \ - "$ ping localhost\n" \ - "PING slag (127.0.0.1): 56 data bytes\n" \ - "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \ - "\n" \ - "--- debian ping statistics ---\n" \ - "1 packets transmitted, 1 packets received, 0% packet loss\n" \ - "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" - -#ifndef CONFIG_FEATURE_FANCY_PING6 -#define ping6_trivial_usage \ - "host" -#define ping6_full_usage \ - "Send ICMP ECHO_REQUEST packets to network hosts" -#else #define ping6_trivial_usage \ "[OPTION]... host" #define ping6_full_usage \ @@ -2438,6 +2426,14 @@ " -q Quiet mode, only displays output at start\n" \ " and when finished" #endif +#define ping_example_usage \ + "$ ping localhost\n" \ + "PING slag (127.0.0.1): 56 data bytes\n" \ + "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \ + "\n" \ + "--- debian ping statistics ---\n" \ + "1 packets transmitted, 1 packets received, 0% packet loss\n" \ + "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" #define ping6_example_usage \ "$ ping6 ip6-localhost\n" \ "PING ip6-localhost (::1): 56 data bytes\n" \ -- cgit v1.1