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
David Schweikert
24ce982e5b
improve coverage
8 years ago
David Schweikert
d18ad321de
long options, better example
8 years ago
David Schweikert
bab585e9fa
new option --rdns
8 years ago
David Schweikert
2a86182f95
make help a bit narrower
8 years ago
David Schweikert
4f672b9b62
work on long option names, #73
8 years ago
David Schweikert
6bd608bf7a
initial work on long option names, #73
8 years ago
David Schweikert
9be8d6cb5d
remove references to fping6
8 years ago
David Schweikert
d9f86182e8
fix setting of IPv4 source address
8 years ago
David Schweikert
48ec5600e0
fix compatibility issue with GNU Hurd
8 years ago
David Schweikert
725893402d
reformat
8 years ago
David Schweikert
e5c3839073
integrate optparse ( https://github.com/skeeto/optparse )
8 years ago
David Schweikert
9787dd0136
sync with develop
8 years ago
David Schweikert
6b99b7bb89
compatibility fixes and prepare rc2
8 years ago
David Schweikert
35d52d0b30
Fix option -m to return all IPs of a hostname
8 years ago
David Schweikert
98269fb83e
unification work
8 years ago
David Schweikert
12971e5409
ipv4/ipv6 unification fixes
8 years ago
David Schweikert
3c53d9be3f
first version of fping that can do ipv4 and ipv6 at the same time
8 years ago
David Schweikert
8d4c69998d
unification work
8 years ago
David Schweikert
4262e74ff9
more cleanup
8 years ago
David Schweikert
e827b6719a
another attempt at fixing coverity warning
8 years ago
David Schweikert
64d41f6295
coverity scan fixes
8 years ago
David Schweikert
23d4a021fc
fix warnings
8 years ago
David Schweikert
324242b144
space / formatting fixes and remove unused code
8 years ago
David Schweikert
d017390cbc
remove trailing whitespace, fix mixed whitespace
8 years ago
David Schweikert
9d2daa77c8
remove trailing whitespace
8 years ago
David Schweikert
9adb9a8480
Merge branch 'develop' into unify
8 years ago
David Schweikert
b5046cfa78
Fix -M expecting an argument, when it shouldn't
8 years ago
David Schweikert
c090cd770d
work on ipv4/ipv6 unification
8 years ago
David Schweikert
e71164de22
restart work on ipv4/ipv6 unification
8 years ago
David Schweikert
8481d7432a
simplify restrictions, fixes #29 , #32
8 years ago
David Schweikert
2cf801fdfb
Support kernel-timestamping of received packet, fixes #46
8 years ago
David Schweikert
926c104e90
Fix -q not suppressing some ICMP error messages, fixes #83
8 years ago
David Schweikert
099d873253
AIX compatibility, fixes #69
8 years ago
David Schweikert
356e7b3a69
fix compatibility issue with MacOS in release 3.14 ( fixes #109 )
8 years ago
Peter Bray
1400fc29a5
Set the variable "prog" before the first call to any routine using error reporting
...
Error reporting uses the variable "prog" which is null prior to obtaining a
reference to argv[0]. The call to open_ping_socket() uses this on an error,
such as the executable not being SUID or otherwise privileged invocation.
Solaris 10 printf(3C) of "%s" on a null pointer causes a core dump.
8 years ago
Peter Bray
79ba8c9ae7
Portability Fix: <netinet/ip_icmp.h> requires n_time definition from <netinet/in_systm.h>
...
The include file <netinet/in_systm.h> is already used in src/fping.c,
so hopefully it should not be problem on other systems to include it here.
Discovered on Solaris 10 Update 8, tested on Solaris 10 Update 11 and Solaris 11.2
8 years ago
David Schweikert
dde37baac2
fix average when discarding reply in interval counting
8 years ago
David Schweikert
2cb0860ec6
Merge pull request #106 from ktsaou/develop
...
minor netdata improvements
8 years ago
Costa Tsaousis (ktsaou)
498acc6853
removed fix for 100% cpu time
8 years ago
David Schweikert
36f0b76645
fix interval reporting
8 years ago
Costa Tsaousis (ktsaou)
2f25e1ff8b
fix for 100% CPU time when -l -Q are given
8 years ago
Costa Tsaousis (ktsaou)
4897b015b4
converted netdata charts to area charts; added netdata to trace_flag; fixed compiler warning about setuid
8 years ago
David Schweikert
64af251a33
safer -i option parsing
8 years ago
David Schweikert
32ab06bdd1
port last fix also to netdata
8 years ago
David Schweikert
ea37408c77
another fix for #97 ( fixes #97 )
8 years ago
David Schweikert
1e67616388
first attempt at fixing #97 ( fixes #97 )
8 years ago
David Schweikert
502cd3b0f7
remove unused code
8 years ago
David Schweikert
c6547a118e
fix tests
8 years ago
David Schweikert
7c7e007502
- (bugfix) Lower -i limit to 1 instead of 10
...
- (bugfix) Improve interval preciseness of -Q reporting
8 years ago
Costa Tsaousis (ktsaou)
6470a3d5ae
added help info
8 years ago
Costa Tsaousis (ktsaou)
9c9c166d39
remove dimension lost in favor of returned
8 years ago
Costa Tsaousis (ktsaou)
2426485fe0
added another dimension to track excess received packets
8 years ago
Costa Tsaousis (ktsaou)
eda4c85842
re-order chart information
8 years ago
Costa Tsaousis (ktsaou)
a2cbca7a7b
added option -N to allow fping output statistics in the format expected by netdata
8 years ago
David Schweikert
6d12dfbbcc
Add option -o for accumulated outage time ( #90 )
8 years ago
David Schweikert
814c852da6
New option '-M' to set the 'Don't Fragment' flag ( #91 , Don Bowman)
8 years ago
David Schweikert
88c40cae3a
Merge branch 'develop' of https://github.com/donbowman/fping into donbowman-develop
8 years ago
Martin Topholm
1264b10784
Ignore network and broadcast for cidrs /31 and /32
...
fping has previously been strict about network address and broadcast
addreses. In the commit this is loosened a bit to permit fping to ping
cidrs with prefix length 31, which are commonly used for link ranges
(for newer equipment) and length 32 which denotes a single ip address.
For prefix lengths 31 and 32 fping will simply ignore network address
and broadcast addresses, and consider all addresses in range as a
target.
8 years ago
David Schweikert
b5b630bd3c
fix a couple of compiler warnings
9 years ago
David Schweikert
a37399ede9
Exit code should be 2 when the hostname can't be resolved ( fixes #98 )
9 years ago
Don Bowman
7c7448ab8c
add path mtu discovert (MTU) AKA Don't Fragment support
9 years ago
Jan Gerbecks
458c986d8b
added changes for accumulated outage time
9 years ago