Commit Graph

235 Commits (a3f4c573bfd1ddfc71d2fa672f51c41047473a53)

Author SHA1 Message Date
German Service Network 7351afdd89 Move the OS detection to configure.ac script to set the use of clock_realtime 1 year ago
ilyam8 a6c314516c remove host from netdata chart titles 1 year ago
Khem Raj c0fbccb977 fping: Initialize msghdr struct in a portable way
Initializing the structure assuming glibc layout results in
compile errors on musl, therefore do partial intialization and then
assigning the members individually.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 year ago
German Service Network d45438c723 fping: add option to exit immeditely once N hosts have been found 1 year ago
German Service Network e597c48d77 Fixing build warning long int on seqmap.c line 84 1 year ago
German Service Network 9d7731e7a0 OpenBSD is not affected by the "broken alpha headers" bug, too. 1 year ago
German Service Network e8660637cc Fallback to SO_TIMESTAMP if SO_TIMESTAMPNS is not available 1 year ago
David Schweikert 8dc0b7f39a correctly call getnameinfo() 2 years ago
David Schweikert 041ba7acb8 reformat 2 years ago
Thomas Klausner 5d3eee1105 NetBSD/alpha is not affected by the "broken alpha headers" bug. 3 years ago
David Schweikert ab1ed993ba fix socket4 vs socket6 typo (#249, thanks @sfan5) 3 years ago
David Schweikert e975a4339b fix unprivileged ping broken in v5.1 (fixes #248) 3 years ago
German Service Network 948b58ee1f Remove dublicate include time.h entry 3 years ago
Erik Auerswald 36b652b358 Improve -Q documentation
The `-Q, --squiet=SECS` option does not replace the summary
statistics of `-q, --quiets`, but adds interval summary
statistics every SECS seconds to the output.
3 years ago
Erik Auerswald 1452bf362e Improve -d and -n documentation
* Adjust `fping.pod` entries for `-d, --rdns` and `-n, --name`:

  * The code performs reverse DNS lookups on the given targets,
    not on source addresses from ICMP Echo Responses or ICMP
    error messages.  Adjust the `-d` description to reflect this.

  * The sentence describing `-n` seems incomplete, so provide a
    completion in similar spirit to `-d`.

* Add `-d, --rdns` to `-h, --help` output since `-d` and `-n` are
  no longer equivalent.
3 years ago
German Service Network 04af04c839 Fixed wrong timestamp under Free- and OpenBSD and macOS 3 years ago
David Schweikert 749127f525
Merge pull request #227 from aafbsd/patch-1
fix getnameinfo
3 years ago
David Schweikert 03aea81617
Merge pull request #229 from gsnw/bug/219
use formatstring macro PRId64 in print_netdata for output int64_t
3 years ago
David Schweikert 19ddae8fdc
Merge pull request #226 from k0ste/help
Netdata feature: use host instead name as family label
3 years ago
German Service Network ea0eda41f1 use formatstring macro PRId64 in print_netdata for output int64_t 3 years ago
aafbsd bbe847a5d9
Update fping.c
getnameinfo() was not called properly for IPv4 (didn't check v6).
Additionally, one might also want to check the result code, call gai_strerror() and inform the user if s.th. goes wrong
3 years ago
David Schweikert b4aeda17fd
Merge pull request #215 from normanr/develop
Allow -4 option to be given multiple times when IPv6 is enabled.
3 years ago
Konstantin Shalygin b46c161bb3
Netdata feature: use host instead name as family label
Fixes https://github.com/netdata/netdata/issues/11336
3 years ago
Norman Rasmussen e432f46e01 Allow -4 option to be given multiple times when IPv6 is enabled. 4 years ago
Tim Gates 95df9d00f5
docs: fix simple typo, permanetly -> permanently
There is a small typo in src/fping.c.

Should read `permanently` rather than `permanetly`.
4 years ago
David Schweikert eac20347ba
Merge pull request #200 from simetnicbr/for-upstream/privileged-SO_BINDTODEVICE
fping: retain privileges until after privileged setsockopt
4 years ago
Henrique de Moraes Holschuh 59d83ed402 fping: retain privileges until after privileged setsockopt
On Linux, one needs privileges to setsockopt(SO_BINDTODEVICE), and the
current code would drop setuid root privileges too soon.

Temporarily drop privileges instead, and raise them back to issue the
privileged setsockopt().  Once we know we won't need to do any further
privileged setsockopt(), permanently drop privileges.

For now, assume SO_BINDTODEVICE is the only setsockopt that needs this.
4 years ago
Dirk Meyer 31f76f6071 - fix regression introduced in fping 4.3
bind to source only when option was set.
this allows to work in jails and lxc with custom IPs.
this allows IPv4 only and IPv6 only hosts
4 years ago
David Schweikert 4f16eea49f use int64_t for time-related variables 4 years ago
David Schweikert 363396c28f use int64_t everywhere, instead of long and 10us values 4 years ago
David Schweikert 2f71a6a701 travis-ci improvements, add macos testing 4 years ago
David Schweikert a136764f8c always exclude IP header in returned size 4 years ago
David Schweikert 43f6e3498e print lost pings in loop and count mode, fixes #175 4 years ago
David Schweikert 130b1d6f9b revert sprint_tm change doing apparent wrong casting 4 years ago
David Schweikert fec099871c fix compiler warning 4 years ago
David Schweikert da27697eb4 small formatting fixes to printed time 4 years ago
David Schweikert fe4388ca3d use int64_t whenever time is stored, fixes #195 4 years ago
David Schweikert eb87a2affd use int64_t instead of struct timespec everywhere
This should be more efficient and is also easier to read.
4 years ago
David Schweikert 5473c7d734 remove unused host_entry fields 4 years ago
David Schweikert ac3eb34ad7 Merge branch 'develop' of github.com:schweikert/fping into develop 4 years ago
David Schweikert 2cb373463f simplify timespec conversions to ns, prepare mocking of receive_packet 4 years ago
David van Leusen 254573f241 use sigaction when possible 4 years ago
David van Leusen 69f7277076 implement finish handler through flag instead of direct call in signal handler 4 years ago
David Schweikert bb8d71ef27 refactored event loop, now for each ping we create both a ping and a timeout event 4 years ago
Steven Noonan 6600b04152 only use getsockname() for identity with SOCK_DGRAM sockets
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
4 years ago
Lars Wendler 54e97d9e39
Fix build with --disable-ipv6
Otherwise build breaks with:

fping.c:399:14: error: ‘ident6’ undeclared (first use in this function); did you mean ‘ident4’?
  399 |     ident4 = ident6 = getpid() & 0xFFFF;
      |              ^~~~~~
      |              ident4

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
4 years ago
David Schweikert 721af135db
Merge pull request #136 from tycho/high-resolution-clock-sources
Move to 1us resolution for latency measurements
4 years ago
David Schweikert 97f995f38e get rid of deprecated bzero() 4 years ago
David Schweikert efc5ed3263 Use line buffering for stdout. fixes #179 4 years ago
David Schweikert f5f9415651
Merge pull request #151 from brownowski/duplicate-patch-1
Only increase num_alive if response is not a duplicate
4 years ago