nc: show help text on bad parameters
[oweals/busybox.git] / networking / arping.c
index ab39c717b6c7249a5ff4ff6dd73555fdd20d7ef5..f2b12ed04d3ad235605c2a93ddcf8c6ba36a04b6 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * arping.c - Ping hosts by ARP requests/replies
  *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  *
  * Author:     Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
  * Busybox port: Nick Fedchik <nick@fedchik.org.ua>
@@ -45,7 +45,7 @@ struct globals {
        unsigned received;
        unsigned brd_recv;
        unsigned req_recv;
-};
+} FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
 #define src        (G.src       )
 #define dst        (G.dst       )
@@ -169,7 +169,7 @@ static bool recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
         && FROM->sll_pkttype != PACKET_MULTICAST)
                return false;
 
-       /* Only these types are recognised */
+       /* Only these types are recognized */
        if (ah->ar_op != htons(ARPOP_REQUEST) && ah->ar_op != htons(ARPOP_REPLY))
                return false;
 
@@ -237,7 +237,7 @@ static bool recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
                } else {
                        printf(" UNSOLICITED?\n");
                }
-               fflush(stdout);
+               fflush_all();
        }
        received++;
        if (FROM->sll_pkttype != PACKET_HOST)