tls: format and send CLIENT_KEY_EXCHANGE
[oweals/busybox.git] / networking / ping.c
index d8767a39fb0cac066c1941b53e2dc160417c32e8..d0ef7ba62b7a5018acc2ce660928d57995fb86ed 100644 (file)
 //config:config PING6
 //config:      bool "ping6"
 //config:      default y
-//config:      depends on FEATURE_IPV6 && PING
+//config:      depends on FEATURE_IPV6
 //config:      help
 //config:        This will give you a ping that can talk IPv6.
 //config:
 //config:config FEATURE_FANCY_PING
 //config:      bool "Enable fancy ping output"
 //config:      default y
-//config:      depends on PING
+//config:      depends on PING || PING6
 //config:      help
 //config:        Make the output from the ping applet include statistics, and at the
 //config:        same time provide full support for ICMP packets.
@@ -341,7 +341,7 @@ static int common_ping_main(sa_family_t af, char **argv)
 
 /* Full(er) version */
 
-#define OPT_STRING ("qvc:s:t:w:W:I:np:4" IF_PING6("6"))
+#define OPT_STRING ("qvc:+s:t:+w:+W:+I:np:4" IF_PING6("6"))
 enum {
        OPT_QUIET = 1 << 0,
        OPT_VERBOSE = 1 << 1,
@@ -865,7 +865,7 @@ static int common_ping_main(int opt, char **argv)
        INIT_G();
 
        /* exactly one argument needed; -v and -q don't mix; -c NUM, -t NUM, -w NUM, -W NUM */
-       opt_complementary = "=1:q--v:v--q:c+:t+:w+:W+";
+       opt_complementary = "=1:q--v:v--q";
        opt |= getopt32(argv, OPT_STRING, &pingcount, &str_s, &opt_ttl, &deadline, &timeout, &str_I, &str_p);
        if (opt & OPT_s)
                datalen = xatou16(str_s); // -s
@@ -907,15 +907,17 @@ static int common_ping_main(int opt, char **argv)
 #endif /* FEATURE_FANCY_PING */
 
 
+#if ENABLE_PING
 int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int ping_main(int argc UNUSED_PARAM, char **argv)
 {
-#if !ENABLE_FEATURE_FANCY_PING
+# if !ENABLE_FEATURE_FANCY_PING
        return common_ping_main(AF_UNSPEC, argv);
-#else
+# else
        return common_ping_main(0, argv);
-#endif
+# endif
 }
+#endif
 
 #if ENABLE_PING6
 int ping6_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;