Log of /inetutils/ping/ping.c
Parent Directory
| Revision Log
Revision
1.41
Thu Aug 20 06:49:35 2009 UTC
(14 years, 8 months ago)
by
cvs2git
Branch:
MAIN
CVS Tags:
HEAD
Changes since
1.40: +0 -0 lines
FILE REMOVED
remove all files; README-use-git: add this one file
Revision
1.40 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Jun 26 14:21:20 2009 UTC
(14 years, 9 months ago)
by
gray
Branch:
MAIN
Changes since
1.39: +18 -18 lines
Diff to
previous 1.39
Finish argp-fying the utilities.
* libinetutils/Makefile.am (libinetutils_a_SOURCES): Order source
names.
* libinetutils/libinetutils.h (iu_argp_init): New macro.
* ftp/main.c, ftpd/ftpd.c, hostname/hostname.c, inetd/inetd.c,
logger/logger.c, ping/ping.c, ping/ping6.c, rcp/rcp.c,
rexecd/rexecd.c, rlogin/rlogin.c, rlogind/rlogind.c,
rsh/rsh.c, rshd/rshd.c, syslogd/syslogd.c, talk/talk.c,
talkd/talkd.c, telnet/main.c, telnetd/telnetd.c, tftpd/tftpd.c,
traceroute/traceroute.c, uucpd/uucpd.c: Use iu_argp_init. Rewrite
option descriptions to conform to standards.texi.
* ifconfig/Makefile.am (INCLUDES): Add libinetutils
* ifconfig/changeif.c: Use error() for diagnostics.
* ifconfig/printif.c: Likewise.
* ifconfig/ifconfig.c: Likewise.
(main): Call parse_cmdline.
* ifconfig/ifconfig.h: Include error.h, argp.h and libinetutils.h.
* ifconfig/options.c: Use argp.
"check-existence": fix typo (was *check-existance).
(usage): Remove.
Use error() for diagnostics.
* ifconfig/options.h (parse_opt): Rename to parse_cmdline.
* ifconfig/system.h (system_argp_child): New extern.
(system_help_options, SYSTEM_SHORT_OPTIONS)
(SYSTEM_LONG_OPTIONS): Remove.
* ifconfig/system/generic.c: Use new command line parsing method.
* ifconfig/system/hpux.c: Likewise.
* ifconfig/system/linux.c: Likewise.
* ifconfig/system/linux.h: Likewise.
* ifconfig/system/osf.c: Likewise.
* ifconfig/system/qnx.c: Likewise.
* ifconfig/system/solaris.c: Likewise.
* gwhois/Makefile.am (INCLUDES): Add libinetutils.
* gwhois/whois.c: Use argp to parse the command line.
(is_ripe_server): New function.
(queryformat): Use is_ripe_server to determine if the server
supports RIPE syntax.
Revision
1.39 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Jun 25 08:31:01 2009 UTC
(14 years, 9 months ago)
by
gray
Branch:
MAIN
Changes since
1.38: +6 -3 lines
Diff to
previous 1.38
Use argp-version-etc module from gnulib
* bootstrap.conf: Add argp-version-etc;
Remove deprecated modules.
* ftp/main.c, ftpd/ftpd.c, hostname/hostname.c,
inetd/inetd.c, logger/logger.c, ping/ping.c,
ping/ping6.c, rlogin/rlogin.c, syslogd/syslogd.c,
talkd/talkd.c, traceroute/traceroute.c: Use argp-version-etc
instead of ARGP_PROGRAM_DATA.
* libinetutils/defauthors.c: New file.
* libinetutils/Makefile.am (libinetutils_a_SOURCES): Add
defauthors.c.
* libinetutils/libinetutils.h: Include argp-version-etc.h.
(default_program_authors): New extern.
(ARGP_PROGRAM_DATA_SIMPLE, ARGP_PROGRAM_DATA): Removed.
* rcp/Makefile.am (INCLUDES): Add libinetutils.
* rcp/rcp.c: Use argp and asprintf. Remove obsolete varargs
stuff. Use error to display error messages on tty.
* rexecd/Makefile.am (INCLUDES): Add libinetutils.
* rexecd/rexecd.c: Use argp. Remove obsolete varargs stuff.
Use error to display error messages on tty.
Revision
1.38 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Dec 27 21:18:37 2008 UTC
(15 years, 3 months ago)
by
gray
Branch:
MAIN
Changes since
1.37: +2 -0 lines
Diff to
previous 1.37
More fixes.
* bootstrap.conf: Add xgethostname and xgetdomainname.
* configure.ac: Check for opendir2
* hostname/hostname.c: Use xgethostname and xgetdomainname.
* libinetutils/libinetutils.h (ARGP_PROGRAM_DATA_SIMPLE): New
macro.
(ARGP_PROGRAM_DATA): Rewrite using ARGP_PROGRAM_DATA_SIMPLE.
* ftp/main.c, logger/logger.c, rlogin/rlogin.c,
syslogd/syslogd.c: Use ARGP_PROGRAM_DATA_SIMPLE.
* libls/fts.c: Fix bsdisms.
* ping/ping.c: Include netinet/in.h
* ping/ping_common.c: Include sys/socket.h and string.h.
Revision
1.37 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Dec 27 20:35:58 2008 UTC
(15 years, 3 months ago)
by
gray
Branch:
MAIN
Changes since
1.36: +3 -1 lines
Diff to
previous 1.36
Bugfixes.
* bootstrap.conf: Add dirfd, filemode, inttostr and progname.
* configure.ac: Fix checks for IPv6 header files.
* doc/Makefile.am (inetutils_TEXINFOS): Add traceroute.texi.
* doc/ftp.texi: Fixes.
* ftp/cmds.c: Add missing includes.
* ftp/ftp.c: Remove extern program_name.
* ftp/ftp_var.h: Include progname.h
* ftp/main.c (main): Call set_program_name
* ftp/ruserpass.c: Include error.h
* ftpd/Makefile.am (LDADD): Link LIBLS before libgnu.
* ftpd/extern.h: Include getopt.h
* ftpd/ftpd.c, gwhois/whois.c, hostname/hostname.c,
logger/logger.c, rcp/rcp.c, rexecd/rexecd.c, rlogin/rlogin.c,
rsh/rsh.c, rshd/rshd.c, syslogd/syslogd.c, talk/talk.c,
traceroute/traceroute.c: Include progname.h
(main): Call set_program_name.
* ftpd/popen.c: Remove useless extern.
* ifconfig/ifconfig.h: Include progname.h.
* ifconfig/options.c (parse_opt): Call set_program_name.
* ifconfig/options.h (program_name): Remove extern.
* inetd/inetd.c: Include progname.h
(main): Call set_program_name.
(EAI_ADDRFAMILY): Provide a fallback definition for FreeBSD.
* libinetutils/argcv.c: Include ctype.h
* libinetutils/libinetutils.h (utmp_logout, logwtmp_keep_open):
New protos.
* libls/bsdport.h: Remove
* libls/bsdport.c: Remove
* libls/Makefile.am (libls_a_SOURCES): Remove bsdport.c
(noinst_HEADERS): Remove bsdport.h
(INCLUDES): New var.
* libls/fts.c: Remove bsdport.h
* libls/ls.c: Remove bsdisms.
* libls/print.c: Likewise.
* libtelnet/auth.h (auth_debug_mode): Fix extern.
* ping/libping.c (ping_recv): Fix call to ping_event.handler.
* ping/ping.c, ping/ping6.c (main): Call set_program_name.
* ping/ping_common.c (ping_set_data): Remove useless if.
* ping/ping_common.h: Include error.h and progname.h
* rcp/util.c: Include error.h
* rlogind/rlogind.c: Include utmp.h
* talk/ctl.c (print_addr): Remove unused function.
* talk/ctl_transact.c: Include talk.h
* talk/display.c: Fix order of function definitions.
* talk/get_addrs.c: Include unistd.h
* talk/get_names.c: Include unistd.h and netinet/in.h
* talk/init_disp.c: Include unistd.h
* talk/invite.c: Fix order of function definitions.
* talk/io.c: Include unistd.h
* talk/look_up.c: Include unistd.h. Fix order of function
definitions.
* talk/talk.h: Include progname.h.
Add missing prototypes.
* talk/talk_ctl.h (ctl_transact): New proto.
* telnet/commands.c: Include sys/wait.h. Reorder function
definitions.
* telnet/externs.h, telnet/ring.h: Add missing prototypes.
* telnet/telnet.c: Reorder function definitions.
* telnet/utilities.c: Include sys/socket.h
* telnetd/telnetd.h: Include sys/stat.h and ctype.h.
Add missing prototypes.
* traceroute/Makefile.am (INCLUDES): Add ../lib.
(LDADD): Add ../libgnu.a
* uucpd/uucpd.c: Reorder function definitions.
Revision
1.36 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Tue Oct 14 17:40:29 2008 UTC
(15 years, 6 months ago)
by
rakeshpandit
Branch:
MAIN
Changes since
1.35: +2 -7 lines
Diff to
previous 1.35
2008-10-06 Rakesh Pandit <rakesh.pandit@gmail.com>
* ping/ping_common.h, ping/ping.c, ping/ping_address.c,
ping/ping_echo.c, ping/ping_router.c, ping/ping_timestamp.c,
ping/libping.c: Added common headers from ping related
files (ping.c, ping_address.c, ping_echo.c, ping_router.c,
ping_timestamp.c, libping.c) and ping6.c to ping/ping_common.h.
* ping/ping.h, ping/ping6.h, ping/ping_common.h (ping_data,
ping_efp): Moved ping_data, ping_efp from ping.h & ping6.h
to ping_common.h
* ping/libping.c, ping/ping6.c, ping/ping_common.c (_ping_setbuf,
ping_set_data): Moved _ping_setbuf and ping_set_data from libping.c
& ping6.c to ping_common.c
* ping/ping_common.h (ping_address, event, ping_data): Introduced new
unions ping_address and event in ping_common.h. Replaced ping efp
handler(ping_efp/ping_efp6) with event union and socket
address(sockaddr_in sockaddr_in6) with ping_address union.
* ping/ping_common.h (_PING_BUFLEN, _ping_setbuf, ping_set_data): New arg
use_ipv6 and all callers changed.
Revision
1.35 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Jun 6 16:43:43 2008 UTC
(15 years, 10 months ago)
by
debarshiray
Branch:
MAIN
Changes since
1.34: +19 -14 lines
Diff to
previous 1.34
2008-06-05 Debarshi Ray <rishi@gnu.org>
* libicmp/libping.c (ping_reset): New function.
(_ping_freebuf): Free PING->ping_cktab.
(ping_unset_data): New function.
* libicmp/ping.h (ping_reset): New function.
(ping_unset_data): New function.
* ping/ping.c (ping_type): Changed type to `int (*ping_type) (char
*hostname)'. All users changed accordingly.
(decode_type): Likewise.
(main): Multiple host support implemented.
(ping_run): Added new variable I. Replaced `while' with `for' to
avoid decrementing PRELOAD. Replaced free with ping_unset_data.
* ping/ping6.c (main): Added new variable STATUS. Multiple host
support implemented.
(ping_run): Added new variable I. Replaced `while' with `for' to
avoid decrementing PRELOAD.
(ping_echo): Changed type to `static int ping_echo (char *hostname)`.
All callers and declarations changed accordingly. Added new variable
STATUS. Free PING->ping_hostname.
(ping_reset): New function.
(echo_finish): Call return instead of exit.
* ping/ping_address.c (ping_address): Changed type to
`int ping_address (char *hostname)'. All callers and extern
declarations changed accordingly.
* ping/ping_echo.c (ping_echo): Likewise.
* ping/ping_router.c (ping_router): Likewise.
* ping/ping_timestamp.c (ping_timestamp): Likewise.
Revision
1.34 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Jul 26 18:46:24 2007 UTC
(16 years, 8 months ago)
by
ams
Branch:
MAIN
Changes since
1.33: +9 -1 lines
Diff to
previous 1.33
2007-07-26 Debarshi Ray <rishi@gnu.org>
* ping/ping_echo.c (ping_echo): Free PING->ping_hostname.
(echo_finish): Call return instead of exit.
* ping/ping.c (main): Free PING and DATA_BUFFER.
(ping_run): Free PING->ping_buffer and PING->ping_cktab.
Revision
1.32 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Jun 4 17:29:23 2007 UTC
(16 years, 10 months ago)
by
ams
Branch:
MAIN
Changes since
1.31: +3 -3 lines
Diff to
previous 1.31
* ping/ping6.c (main): Move argument parsing before calling
ping_init.
* ping/ping.c (main): Reorder assignment of argc and argv to be
right after calling argp_parse.
Revision
1.31 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon May 28 20:26:02 2007 UTC
(16 years, 10 months ago)
by
ams
Branch:
MAIN
Changes since
1.30: +177 -250 lines
Diff to
previous 1.30
* ping/ping_timestamp.c: Don't include "getopt.h". Include
"ping_common.h".
(ping_timestamp): Use error instead of "output message; exit;"
concoction's.
* ping/ping_impl.h (is_root, preload): Removed extern
declarations.
* ping/ping_echo.c (ping_echo): Use error instead of "output
message; exit;" concoction's.
* ping/ping_common.h (show_license): Removed declaration.
* ping/ping_common.c: Include "ping_common.h".
(ping_cvt_number, decode_pattern): Use error instead of "output
message; exit;" concoction's.
(show_license): Function removed.
* ping/ping_address.c: Don't include "getopt.h". Include
"ping_common.h".
(ping_address): Use error instead of "output message; exit;"
concoction's.
* ping/ping6.c: Include <stdbool.h>. Don't include <getopt.h>.
Include <argp.h> and "libinetutils.h".
(short_options, long_options): Variables removed.
(is_root, patptr, one, pattern_len): New variables.
(show_usage): Function removed.
(program_name): Variable removed.
(ARGP_PROGRAM_DATA): Call macro.
(args_doc, doc, argp_options): New variables.
(parse_opt): New function.
(argp): New variable.
(main): Use argp to parse program options.
(ping_echo, ping_init): Use error instead of "output message;
exit;" concoction's.
* ping/ping.c: Don't include <getopt.h>. Include <argp.h> and
"libinetutils.h".
(short_options, long_options): Variables removed.
(is_root, patptr, pattern_len, socket_type, count, interval): New
variables.
(show_usage): Function removed.
(decode_type): Changed type to `int (*decode_type (const char
*arg)) (int argc, char **argv)'. All callers changed accordingly.
(program_name): Variable removed.
(ARGP_PROGRAM_DATA): Call macro.
(args_doc, doc): New variables.
(ARG_ECHO, ARG_ADDRESS, ARG_TIMESTAMP, ARG_ROUTERDISCOVERY): New
enums.
(argp_options): New variable.
(parse_opt): New function.
(main): Use argp to parse program options.
* ping/Makefile.am (INCLUDES): Added
`-I$(top_srcdir)/libinetutils'.
Revision
1.29 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Sat Nov 11 01:31:15 2006 UTC
(17 years, 5 months ago)
by
ams
Branch:
MAIN
Changes since
1.28: +4 -4 lines
Diff to
previous 1.28
* ping/ping_common.h (DEFAULT_PING_COUNT): New macro.
* ping/ping6.c (ping_init): Set default ping count to
DEFAULT_PING_COUNT.
(show_usage): Mention the default.
* ping/ping.c (main): Set default ping count to DEFAULT_PING_COUNT.
(show_usage): Mention the default.
* NEWS: Mention new behaviour.
Revision
1.24 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Jul 29 19:06:08 2005 UTC
(18 years, 8 months ago)
by
ams
Branch:
MAIN
Changes since
1.23: +0 -25 lines
Diff to
previous 1.23
* ping_common.h (ping_cvt_number): Prototype restored (but with
updated types).
* ping_common.c (ping_cvt_number): Changed return type to size_t,
changed type of argument maxval to size_t.
* ping.c (ping_cvt_number): Removed (once again).
Revision
1.23 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Jul 29 17:13:48 2005 UTC
(18 years, 8 months ago)
by
gray
Branch:
MAIN
Changes since
1.22: +30 -10 lines
Diff to
previous 1.22
ping.c (main): Changed types of count and interval
(ping_cvt_number): Restored function. atoi should not be
used to convert to size_t. According to POSIX "The atoi() function
is subsumed by strtol() but is retained because it is used
extensively in existing code. If the number is not known to be in
range, strtol() should be used because atoi() is not required to
perform any error checking.
Revision
1.22 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Jun 20 08:21:48 2005 UTC
(18 years, 10 months ago)
by
ams
Branch:
MAIN
Changes since
1.21: +22 -79 lines
Diff to
previous 1.21
2005-06-19 Jeroen Dekkers <jeroen@dekkers.cx>
* Makefile.am: Add ping6.
(ping_SOURCES): Add ping_common.c and ping_common.h.
* ping6.c: New file.
* ping6.h: Likewise.
* ping_common.c: Likewise.
* ping_common.h: Likewise.
* ping.c: Include "ping_common.h". Remove __P macro in
prototypes.
(ping_cvt_number, init_data_buffer,
decode_pattern, show_license): Move to ...
* ping_common.c: ... here.
* ping_echo.c: Include "ping_common.h".
(tvsub, nabs, nsqrt): Move to ...
* ping_common.c: ... here.
Revision
1.21 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Jan 20 22:17:19 2005 UTC
(19 years, 3 months ago)
by
ams
Branch:
MAIN
Changes since
1.20: +12 -15 lines
Diff to
previous 1.20
Comply with GCS.
(init_data_buffer): Use xmalloc().
(show_usage): Print the "report bugs" string as all other GNU
programs do.
Revision
1.20 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Thu Jan 20 22:11:07 2005 UTC
(19 years, 3 months ago)
by
ams
Branch:
MAIN
Changes since
1.19: +39 -42 lines
Diff to
previous 1.19
* ping.c: Include <stdbool.h>
(ping_cvt_number): Function removed.
(main): Store the values for -c, -i and -t in variables, and don't
use `ping_cvt_number' to check if the arguments to an option are
valid, do it manually. Set them accordingly after ping_init() is
done.
* ping.c (main): Changed type of `is_root' to `bool'. Update all
usage accordingly.
* ping.c (main): Moved ping startup code to after the parsing of
the command line. (and no, this should not be done before any
command line parsing!)
Revision
1.19 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Wed Mar 3 10:21:03 2004 UTC
(20 years, 1 month ago)
by
gray
Branch:
MAIN
Changes since
1.18: +9 -4 lines
Diff to
previous 1.18
(ping_cvt_number): Take an additional parameter indicating whether zero value is allowed
Revision
1.11 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Aug 9 19:42:27 2002 UTC
(21 years, 8 months ago)
by
gray
Branch:
MAIN
Changes since
1.10: +10 -0 lines
Diff to
previous 1.10
Restored ping startup to its right place (bug introduced during switching to new autoconf)
Revision
1.10 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Jun 24 17:03:26 2002 UTC
(21 years, 10 months ago)
by
ams
Branch:
MAIN
CVS Tags:
release1_4_0
Changes since
1.9: +12 -13 lines
Diff to
previous 1.9
(main): Moved ping startup code to after the parsing
of the command line.
(is_root): Variable moved into main().
Revision
1.9 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Mon Apr 29 21:06:23 2002 UTC
(21 years, 11 months ago)
by
ams
Branch:
MAIN
Changes since
1.8: +5 -6 lines
Diff to
previous 1.8
<version.h>: Include removed.
(inetutils_package): Renamed to PACKAGE_NAME.
(inetutils_version): Renamed to PACKAGE_VERSION.
(inetutils_bugaddr): Renamed to PACKAGE_BUGREPORT.
Revision
1.3 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Fri Mar 27 06:47:47 1998 UTC
(26 years, 1 month ago)
by
devnull
Branch:
MAIN
Changes since
1.2: +4 -3 lines
Diff to
previous 1.2
(version.h): Include it.
(show_usage): Use inetutils_bugaddr.
(main): Use inetutils_version rather than VERSION. Don't use
GNU_PACKAGE.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
select a symbolic revision name using the selection box, or choose
'Use Text Field' and enter a numeric revision.