David Schweikert
97f995f38e
get rid of deprecated bzero()
5 years ago
David Schweikert
efc5ed3263
Use line buffering for stdout. fixes #179
5 years ago
David Schweikert
f5f9415651
Merge pull request #151 from brownowski/duplicate-patch-1
...
Only increase num_alive if response is not a duplicate
5 years ago
Patrick Ladd
e064c36df8
Add SIGQUIT summary support similar to ping
...
This reverts commit 3b3877f651af816006ab620f7a189c2c1a3fad8a.
5 years ago
David Schweikert
ee648fccde
Merge pull request #172 from vlvkobal/develop
...
Fix xmt stats in Netdata output
5 years ago
David Schweikert
589d326650
Merge pull request #174 from tycho/macos-unbreak-getaddrinfo
...
macos: use AI_UNUSABLE hint for getaddrinfo()
5 years ago
Steven Noonan
6bc29919d3
linux: account for missing IP header block when using SOCK_DGRAM
...
Linux doesn't include an IP header in the payload when using an
unprivileged SOCK_DGRAM socket.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
5 years ago
Steven Noonan
1486bf209b
use kernel-assigned ping ident value
...
On Linux, when running with an unprivileged process, the kernel does not
respect the assigned "id" field. So in that scenario we need to ask the
kernel what assignment it has given us instead.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
5 years ago
Steven Noonan
5187f5b990
macos: use AI_UNUSABLE hint for getaddrinfo()
...
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
5 years ago
Vladimir Kobal
edf8475f63
Fix xmt stats in Netdata output
5 years ago
David Schweikert
bc5017b329
Merge pull request #167 from cranderson/gcc10
...
use extern in header files when declaring global variables
5 years ago
Charles R. Anderson
a75a6f8675
increase some buffer sizes to eliminate -Wformat-overflow and -Wformat-truncation warnings
5 years ago
Charles R. Anderson
0ed73181eb
GCC 10 compatibility: use extern in header files when declaring global variables
5 years ago
David Schweikert
aba04241c7
add _GNU_SOURCE to fix some warnings
5 years ago
David Schweikert
410e66ddcc
fix usage of open_ping_socket_ipv4/6
5 years ago
David Schweikert
18dcc6af70
get rid of &tz argument in gettimeofday (obsolete)
5 years ago
David Schweikert
88963ebb1b
Merge pull request #154 from pbhenson/fix_-4_bug
...
Fix -4 option when IPv6 disabled
5 years ago
Konrad Bucheli
bc9ce2fdf1
make fping fail if it cannot bind the interface (-I)
5 years ago
Paul B. Henson
509f5a59cb
Fix -4 option when IPv6 disabled
...
When IPv6 is disabled, hints_ai_family is set to AF_INET at initialization, resulting in the error "can't specify both -4 and -6" if the -4 option is supplied. If there's no IPv6, make the -4 option a no-op.
5 years ago
brownowski
5883c6f272
Update fping.c
...
Should only increase num_alive if response is not a duplicate.
In cases where multiple pings are sent, num_alive can increase past one for a host if a duplicate ping response is received while h->num_recv ==1.
6 years ago
Johan Ström
6fd4f8bd91
Do not fail if using fping6 with -6 flag
...
Mostly for backwards compatability
6 years ago
David Schweikert
a4522f1af2
Get rid of warning "timeout (-t) value larger than period (-p) produces unexpected results", fixes #142
6 years ago
David Schweikert
a74d32cfb1
Merge branch 'develop' of github.com:schweikert/fping into develop
6 years ago
David Schweikert
4b7d4cb536
Allow decimal numbers for '-t', '-i', '-p', and '-Q'. fixes #133
6 years ago
David Schweikert
69f11b104d
rename --min_reachable again to --reachable, and update changelog
6 years ago
David Schweikert
80067fcdd5
Merge pull request #138 from deepak0004/develop
...
Adding -x option which allows user to specify a threshold and check if atleast those many hosts are active
6 years ago
deepak0004
03d821e983
Removing flag variable and its dependencies, printing required and reachable hosts, and changing initialisation of min_reachable
6 years ago
deepak0004
af9b3bfbfe
Adding separate exit codes for success or failure, and printing the number of reachable hosts
6 years ago
David Schweikert
6694668fdb
Merge pull request #139 from abelbeck/fping6
...
Add backward compatibility for fping6 sym-link
Using sym-links to select IPv6 is discouraged (because it doesn't work the same for IPv4), but I understand that this can help for some use cases (i.e. in particular for the embedded linux distro use case, where having two binaries is an issue). Also, I guess nobody is going to have a binary called fping6 and expect it to do IPv4, so, I guess, no harm done.
6 years ago
Lonnie Abelbeck
03e050a395
Fix hang with '-6', with ipv6 kernel module, but not loaded
6 years ago
Lonnie Abelbeck
a82f40f246
Add backward compatibility for fping6 sym-link
6 years ago
deepak0004
9812557c71
Changing the exit code as per travis ci
6 years ago
deepak0004
8e33daed93
Adding travis ci tests for more coverage and rectifying a mistake
6 years ago
deepak0004
b18e930bed
Making the reqd changes
6 years ago
deepak0004
7338b4b859
Adding -x option which allows user to specify a threshold and check if atleast those many hosts are active
6 years ago
David Schweikert
180c6dd8d0
fix whitespace
6 years ago
Lars Wendler
aa4a5f681a
Fix build with --disable-ipv6
...
Otheriwse build breaks with:
fping.c:690:24: error: ‘socket6’ undeclared (first use in this function);
did you mean ‘socket4’?
6 years ago
David Schweikert
b4277e33a9
fix --help test, prepare 4.1 release
7 years ago
David Schweikert
df7a819fd9
Allow running fping --help even when raw socket can't be opened, fixes #131
7 years ago
David Schweikert
b2d35174c9
Fix segfault introduced with #118 change, thanks Simon
7 years ago
David Schweikert
bb0eeaaeba
Fix running on servers with disabled IPv6, fixes #118
7 years ago
Ramon Novoa
c950ceccea
Return -1 when socket_can_read times out.
...
0 is a valid file descriptor. Use -1 instead to signal a timeout.
7 years ago
David Schweikert
5d84ad4c94
avoid duplicate hosts with -m
8 years ago
David Schweikert
2ac223ed34
improve help text
8 years ago
David Schweikert
7f54300634
improve help text
8 years ago
David Schweikert
c2d86786e2
fix compiler warning
8 years ago
David Schweikert
cbfdcb40ff
-i/-p restrictions only enforced with ./configure --enable-safe-limits, change -i default from 25 to 10
8 years ago
David Schweikert
94f976910a
reword a bit help text for #32
8 years ago
David Schweikert
80a45dc165
reformat
8 years ago
David Schweikert
7592cc2a19
discard late packets, auto-adjust timeout for -c/-C/-l, fixes #32
8 years ago