diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-01-24 23:53:22 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-01-24 23:53:22 +0000 |
commit | b9a279ba9466d8733261aff1bab0d3ec1031c34c (patch) | |
tree | 6a995795abf0322f540585a6c4d28847fbebb773 /include | |
parent | 677cb5eea52f2424bef1fd0fcc6ed3c8c8b5f1d5 (diff) | |
download | busybox-w32-b9a279ba9466d8733261aff1bab0d3ec1031c34c.tar.gz busybox-w32-b9a279ba9466d8733261aff1bab0d3ec1031c34c.tar.bz2 busybox-w32-b9a279ba9466d8733261aff1bab0d3ec1031c34c.zip |
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".
Diffstat (limited to 'include')
-rw-r--r-- | include/usage.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/include/usage.h b/include/usage.h index 8ddd1166b..c29c6c898 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -2401,6 +2401,10 @@ | |||
2401 | "host" | 2401 | "host" |
2402 | #define ping_full_usage \ | 2402 | #define ping_full_usage \ |
2403 | "Send ICMP ECHO_REQUEST packets to network hosts" | 2403 | "Send ICMP ECHO_REQUEST packets to network hosts" |
2404 | #define ping6_trivial_usage \ | ||
2405 | "host" | ||
2406 | #define ping6_full_usage \ | ||
2407 | "Send ICMP ECHO_REQUEST packets to network hosts" | ||
2404 | #else | 2408 | #else |
2405 | #define ping_trivial_usage \ | 2409 | #define ping_trivial_usage \ |
2406 | "[OPTION]... host" | 2410 | "[OPTION]... host" |
@@ -2412,22 +2416,6 @@ | |||
2412 | " -I IP Use IP as source address\n" \ | 2416 | " -I IP Use IP as source address\n" \ |
2413 | " -q Quiet mode, only displays output at start\n" \ | 2417 | " -q Quiet mode, only displays output at start\n" \ |
2414 | " and when finished" | 2418 | " and when finished" |
2415 | #endif | ||
2416 | #define ping_example_usage \ | ||
2417 | "$ ping localhost\n" \ | ||
2418 | "PING slag (127.0.0.1): 56 data bytes\n" \ | ||
2419 | "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \ | ||
2420 | "\n" \ | ||
2421 | "--- debian ping statistics ---\n" \ | ||
2422 | "1 packets transmitted, 1 packets received, 0% packet loss\n" \ | ||
2423 | "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" | ||
2424 | |||
2425 | #ifndef CONFIG_FEATURE_FANCY_PING6 | ||
2426 | #define ping6_trivial_usage \ | ||
2427 | "host" | ||
2428 | #define ping6_full_usage \ | ||
2429 | "Send ICMP ECHO_REQUEST packets to network hosts" | ||
2430 | #else | ||
2431 | #define ping6_trivial_usage \ | 2419 | #define ping6_trivial_usage \ |
2432 | "[OPTION]... host" | 2420 | "[OPTION]... host" |
2433 | #define ping6_full_usage \ | 2421 | #define ping6_full_usage \ |
@@ -2438,6 +2426,14 @@ | |||
2438 | " -q Quiet mode, only displays output at start\n" \ | 2426 | " -q Quiet mode, only displays output at start\n" \ |
2439 | " and when finished" | 2427 | " and when finished" |
2440 | #endif | 2428 | #endif |
2429 | #define ping_example_usage \ | ||
2430 | "$ ping localhost\n" \ | ||
2431 | "PING slag (127.0.0.1): 56 data bytes\n" \ | ||
2432 | "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \ | ||
2433 | "\n" \ | ||
2434 | "--- debian ping statistics ---\n" \ | ||
2435 | "1 packets transmitted, 1 packets received, 0% packet loss\n" \ | ||
2436 | "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" | ||
2441 | #define ping6_example_usage \ | 2437 | #define ping6_example_usage \ |
2442 | "$ ping6 ip6-localhost\n" \ | 2438 | "$ ping6 ip6-localhost\n" \ |
2443 | "PING ip6-localhost (::1): 56 data bytes\n" \ | 2439 | "PING ip6-localhost (::1): 56 data bytes\n" \ |