Commit Graph

82 Commits

Author SHA1 Message Date
Denis Vlasenko
919c10dd88 ping[6]: don't do htons(a++), it can be a macro 2007-01-03 22:14:18 +00:00
Denis Vlasenko
806116b234 fixes from Yann E. MORIN <yann.morin.1998@anciens.enib.fr> 2006-12-31 12:14:16 +00:00
Denis Vlasenko
d9e15f2068 style cleanup: return(a) -> return a, part 2 2006-11-27 16:49:55 +00:00
Denis Vlasenko
48237b0c88 introduce setsockopt_reuseaddr(int fd), setsockopt_broadcast(int fd),
use them where appropriate. 200 bytes saved
2006-11-22 23:22:06 +00:00
Denis Vlasenko
4a5cf16a36 login: use %s - we know that string is not too long there
ping[6]: use getopt32: smaller (-50 bytes) and handles -c6 correctly
(was requiring '-c 6' with mandatory space)
2006-11-20 00:48:22 +00:00
Denis Vlasenko
c6f188def8 silly size savings and capitalization fixes 2006-10-26 00:37:00 +00:00
Denis Vlasenko
e1a0d486e4 message string changes, mostly for consistency, also -32 bytes in .rodata 2006-10-20 13:28:22 +00:00
Denis Vlasenko
1385899416 attempt to regularize atoi mess. 2006-10-08 12:49:22 +00:00
Denis Vlasenko
bcf4908e71 ping: bind -> xbind 2006-09-02 17:53:16 +00:00
Denis Vlasenko
e0b7f71d26 ping(6): use htons instead of SWAP_BE. 2006-09-02 16:57:59 +00:00
Denis Vlasenko
2cbe6e6eb2 ping: implement -I option 2006-09-02 16:17:30 +00:00
Denis Vlasenko
db7f2e5881 ping6: resolve interface name to number early.
gcc is more efficient at truncating int to int16
via cast, use that instead of &.
2006-09-02 16:16:23 +00:00
Denis Vlasenko
cb6874cc66 Sync ping and ping6 a bit, fix style and indentation. 2006-09-02 16:13:36 +00:00
Rob Landley
cae61e7ca4 Make a gcc 4.1 warning go away. 2006-08-01 00:30:26 +00:00
Rob Landley
9b1857f79f Bugfix from Shaun Jackman: don't attempt to write 64 bytes and then fail if
the write wasn't 192 bytes long.
2006-05-31 23:54:50 +00:00
Rob Landley
299a6b4d7b Consolidate #include <sys/time.h> so libbb.h does it. 2006-05-27 21:42:58 +00:00
Rob Landley
07a637df47 Patch from KRONSTORFER Horst to Fix a size mismatch in ping, such as the 56/84
mismatch inthe following example:
  # ping -c 1 172.16.2.1
  PING 172.16.2.1 (172.16.2.1): 56 data bytes
  84 bytes from 172.16.2.1: icmp_seq=0 ttl=64 time=0.2 ms
2006-04-01 17:28:11 +00:00
Mike Frysinger
06adf5fb47 2006-03-21 Shaun Jackman <sjackman@gmail.com>: Include signal.h instead of sys/signal.h. 2006-03-22 00:25:07 +00:00
Rob Landley
bc68cd14cc Patch from Denis Vlasenko turning static const int (which gets emitted into
the busybox binary) into enums (which don't).
2006-03-10 19:22:06 +00:00
Rob Landley
dfba741457 Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions.  (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
Rob Landley
bbf4e167f2 Ok, ping needs a rewrite from the ground up. (This is not a busybox app.)
Fix bug 309, where ping -s 1 localhost would give an elapsed time 9 digits
long due to a stack overflow.  Apparently, iputils also does this.
2006-01-11 03:44:11 +00:00
Rob Landley
42eddbafe7 Add a fflush(stdout). 2005-12-15 08:04:17 +00:00
Mike Frysinger
887a1ad57f BsAtHome writes in Bug 433:
Ping packets sent by busybox have wrong endian on f.x. mips32 (openwrt). Attatched is a patch that 
uses htons() and ntohs() to be platform independent.
2005-09-15 01:32:48 +00:00
Mike Frysinger
03e827a422 2005-03-19 Shaun Jackman <sjackman@gmail.com>
* networking/ping.c (ping): Change the type of fromlen to socklen_t.
2005-07-26 23:00:59 +00:00
Eric Andersen
14f5c8d764 Patch from Bernhard Fischer to make a bunch of symbols static
which were otherwise cluttering the global namespace.
2005-04-16 19:39:00 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Eric Andersen
85e5e72bc1 Remove remaining libc5 support code 2003-07-22 08:56:55 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
4e486a5d00 Kiss Gabor noticed that ping compiled without BB_FEATURE_FANCY_PING
would return 0 instead of EXIT_FAILURE when no response was received.
2003-01-12 06:08:33 +00:00
Eric Andersen
e90e741b1e Per discussion with vodz, Tim's changes do not seem to make sense.
Revert them.
 -Erik
2002-06-06 11:47:00 +00:00
Tim Riker
c6def44cfc ping return 1 if can't ping 2002-05-18 09:16:04 +00:00
Eric Andersen
b88868276c Doh! I broke ping when removing the nested function.
This patch from vodz fixes it again.
2002-03-21 14:04:43 +00:00
Eric Andersen
b5474c48b1 Cave to pressure (2 months later). Eliminate using a
nested function, which is a purely unremovable gcc-ism...
 -Erik
2002-03-20 11:59:28 +00:00
Matt Kraai
369da77d5e 2002-01-30 Neal H Walfield <neal@cs.uml.edu>
* networking/ping.c (hostname): Removed.

        [CONFIG_FEATURE_FANCY_PING] (noresp): Moved from here . . .
        [CONFIG_FEATURE_FANCY_PING] (ping:noresp): . . . to here.
        Use H->h_name, not hostname.
        [CONFIG_FEATURE_FANCY_PING] (ping): Do not copy H->h_name into
        hostname.
        Use H->h_name directly.

        [!CONFIG_FEATURE_FANCY_PING] (hostent): New global variable.
        [!CONFIG_FEATURE_FANCY_PING] (pingstats): Use hostent in favor
        of the now obsolete hostname global variable.
        [!CONFIG_FEATURE_FANCY_PING] (ping): Likewise.
        No need to copy H; use hostent instead.

        [!CONFIG_FEATURE_FANCY_PING] (ntransmitted, nreceived,
        nrepeats, pingcount, myid, options, tmax, tsum): Removed
        superfluous zero initializers.
2002-02-01 16:54:00 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
044228d5ec This is vodz' latest patch. Sorry it took so long...
1) ping cleanup (compile fix from this patch already applied).
    2) traceroute call not spare ntohl() now (and reduce size);
    3) Fix for functions not declared static in insmod, ash, vi and mount.
    4) a more simple API cmdedit :))
    5) adds "stopped jobs" warning to ash on Ctrl-D and fixes "ignoreeof" option
    6) reduce exporting library function index->strchr (traceroute), bzero->memset (syslogd)
2001-07-17 01:12:36 +00:00
Matt Kraai
06ef16563b Allow featureless ping to compile, and featureful ping to shrink
(by Adam Slattery).
2001-07-13 20:56:27 +00:00
Eric Andersen
7467c8d3b6 Patch from vodz:
Changed email address
    cmdedit API change
    optimizations for traceroute and md5sum
    added a new shared create_icmp_socket() function
2001-07-12 20:26:32 +00:00
Eric Andersen
004015e9c4 Patch from Lars Kellogg-Stedman <lars@larsshack.org> to fix bug
#1130 (i.e. When you turn on features it should always ADD features)
2001-05-21 20:30:51 +00:00
Matt Kraai
bf381a0ad8 Whoops. Forgot the x. 2001-05-16 15:52:23 +00:00
Matt Kraai
c55b8d41c1 Add xgethostbyname and herror_msg* functions. 2001-05-16 15:40:51 +00:00
Eric Andersen
b6b519b416 Update how we detect if libc5 is in use.
-Erik
2001-04-09 23:52:18 +00:00
Eric Andersen
14e9e9d1ca Fix socklen_t for libc5 2001-03-14 01:23:07 +00:00
Eric Andersen
cbe31dace5 It turns out that DODMALLOC was broken when I reorganized busybox.h
header file usage before the 0.49 release.  To fix it, I had to move
the '#include "busybox.h"' to the end of the list of #include files.
 -Erik
2001-02-20 06:14:08 +00:00
Eric Andersen
67991cf824 This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
2001-02-14 21:23:06 +00:00
Matt Kraai
dd19c69904 Removed trailing \n from error_msg{,_and_die} messages. 2001-01-31 19:00:21 +00:00
Eric Andersen
ed3ef50c23 Fix header file usage -- there were many unnecessary header files included in
busybox.h which slowed compiles.  I left only what was needed and then fixed up
all the apps to include their own header files.  I also fixed naming for pwd.h
and grp.h functions.  Tested to compile and run with libc5, glibc, and uClibc.
 -Erik
2001-01-27 08:24:39 +00:00
Eric Andersen
f6c6d9aacc Remove the warning messages. By consensus, netkit-tiny doesn't
need to happen.
2001-01-24 18:44:54 +00:00
Eric Andersen
24be980004 Fix spelling. s/maintainence/maintenance/ 2001-01-24 17:37:07 +00:00