Merge branch 'version3' of github.com:schweikert/fping into version3

version3
David Schweikert 8 years ago
commit 36030dce3b

@ -1,3 +1,6 @@
Unreleased (version 3 branch)
* Fix compatibility issue with GNU Hurd
2017-02-09 David Schweikert <david@schweikert.ch> 2017-02-09 David Schweikert <david@schweikert.ch>
* Version 3.16 * Version 3.16
* (feature) Support kernel-timestamping of received packets (#46) * (feature) Support kernel-timestamping of received packets (#46)

@ -562,11 +562,17 @@ int main(int argc, char** argv)
if (sscanf(optarg, "%i", &tos)) { if (sscanf(optarg, "%i", &tos)) {
#ifndef IPV6 #ifndef IPV6
if (setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) { if (setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) {
perror("setting type of service octet IP_TOS");
}
#else #else
#ifdef IPV6_TCLASS
if (setsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof(tos))) { if (setsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof(tos))) {
#endif perror("setting type of service octet IPV6_TCLASS");
perror("setting type of service octet IP_TOS");
} }
#else
fprintf(stderr, "%s: -O (set TOS) for IPv6 not supported on this platform\n", prog);
#endif
#endif
} else { } else {
usage(1); usage(1);
} }

Loading…
Cancel
Save