[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Inetutils branch, master, updated. inetutils-1_8-151-g63d7239
From: |
Simon Josefsson |
Subject: |
[SCM] GNU Inetutils branch, master, updated. inetutils-1_8-151-g63d7239 |
Date: |
Mon, 14 Nov 2011 09:41:29 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via 63d7239880d949f1b9cc856e55def0276e232cec (commit)
from c548bd6aba8c95c3ed8fa102362f5a9c60534c9e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=63d7239880d949f1b9cc856e55def0276e232cec
commit 63d7239880d949f1b9cc856e55def0276e232cec
Author: Simon Josefsson <address@hidden>
Date: Mon Nov 14 10:40:34 2011 +0100
ping: Support -W parameter.
* ping/ping.c: New variable.
(argp_options): Add parameter -W aka --linger.
(parse_opt): Parse -W parameter.
(ping_run): Use linger parameter.
* doc/inetutils.texi (ping invocation): Doc fix.
* NEWS: Likewise.
diff --git a/ChangeLog b/ChangeLog
index 5f67afc..3c245e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-11-14 Simon Josefsson <address@hidden>
+
+ * ping/ping.c: New variable.
+ (argp_options): Add parameter -W aka --linger.
+ (parse_opt): Parse -W parameter.
+ (ping_run): Use linger parameter.
+ * doc/inetutils.texi (ping invocation): Doc fix.
+ * NEWS: Likewise.
+
2011-11-12 Simon Josefsson <address@hidden>
* .gitignore, doc/.gitignore: Update from gnulib-tool.
diff --git a/NEWS b/NEWS
index 6942c9e..06a43fc 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,11 @@ Now under GNU/Linux "ifconfig -a" shows also interfaces
without an address.
Adjusted output formating for "unix".
+* ping
+
+Now supports -W parameter to specify number of seconds to wait for
+response.
+
* Various bugs fixes, internal improvements and clean ups.
May 15, 2010
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index f71a5b4..568b597 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -565,6 +565,12 @@ bytes of ICMP header data.
@opindex -w
@opindex --timeout
Stop after @var{n} seconds.
+
address@hidden -W @var{n}
address@hidden address@hidden
address@hidden -W
address@hidden --linger
+Maximum number of seconds @var{n} to wait for a response.
@end table
@section Using ping for network fault isolation
diff --git a/ping/ping.c b/ping/ping.c
index fe65dd9..b90ebec 100644
--- a/ping/ping.c
+++ b/ping/ping.c
@@ -65,6 +65,7 @@ size_t data_length = PING_DATALEN;
unsigned options;
unsigned long preload = 0;
int timeout = -1;
+int linger = MAXWAIT;
int (*ping_type) (char *hostname) = ping_echo;
int (*decode_type (const char *arg)) (char *hostname);
@@ -112,6 +113,7 @@ static struct argp_option argp_options[] = {
"network", GRP+1},
{"verbose", 'v', NULL, 0, "verbose output", GRP+1},
{"timeout", 'w', "N", 0, "stop after N seconds", GRP+1},
+ {"linger", 'W', "N", 0, "number of seconds to wait for response", GRP+1},
#undef GRP
#define GRP 20
{NULL, 0, NULL, 0, "Options valid for --echo requests:", GRP},
@@ -179,6 +181,10 @@ parse_opt (int key, char *arg, struct argp_state *state)
timeout = ping_cvt_number (arg, INT_MAX, 0);
break;
+ case 'W':
+ linger = ping_cvt_number (arg, INT_MAX, 0);
+ break;
+
case 'R':
options |= OPT_RROUTE;
break;
@@ -402,7 +408,7 @@ ping_run (PING * ping, int (*finish) ())
{
finishing = 1;
- intvl.tv_sec = MAXWAIT;
+ intvl.tv_sec = linger;
}
gettimeofday (&last, NULL);
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 +++++++++
NEWS | 5 +++++
doc/inetutils.texi | 6 ++++++
ping/ping.c | 8 +++++++-
4 files changed, 27 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU Inetutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-151-g63d7239,
Simon Josefsson <=