summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin/ping
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-09 13:04:41 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-21 10:29:37 +0200
commite4a8065910cd6b2e7e0448cc6431ca2906322389 (patch)
tree73492991cfa40f994c20d761d476e6bc16304536 /freebsd/sbin/ping
parentUpdate to FreeBSD head 2017-08-01 (diff)
downloadrtems-libbsd-e4a8065910cd6b2e7e0448cc6431ca2906322389.tar.bz2
Update to FreeBSD head 2017-10-01
Git mirror commit b2f0376b45428f13151d229c5ae9d4d8f74acbd1. Update #3472.
Diffstat (limited to 'freebsd/sbin/ping')
-rw-r--r--freebsd/sbin/ping/ping.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/freebsd/sbin/ping/ping.c b/freebsd/sbin/ping/ping.c
index 96bd410f..e0897962 100644
--- a/freebsd/sbin/ping/ping.c
+++ b/freebsd/sbin/ping/ping.c
@@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/ip_var.h>
#include <arpa/inet.h>
-#ifdef HAVE_LIBCASPER
+#ifdef WITH_CASPER
#include <libcasper.h>
#include <casper/cap_dns.h>
#endif
@@ -224,7 +224,7 @@ static volatile sig_atomic_t finish_up;
static volatile sig_atomic_t siginfo_p;
#endif /* __rtems__ */
-#ifdef HAVE_LIBCASPER
+#ifdef WITH_CASPER
static cap_channel_t *capdns;
#endif
#ifdef __rtems__
@@ -234,7 +234,7 @@ static char hnamebuf[MAXHOSTNAMELEN], snamebuf[MAXHOSTNAMELEN];
static void fill(char *, char *);
static u_short in_cksum(u_short *, int);
-#ifdef HAVE_LIBCASPER
+#ifdef WITH_CASPER
static cap_channel_t *capdns_setup(void);
#endif
static void check_status(void);
@@ -632,7 +632,7 @@ main(int argc, char *const *argv)
if (options & F_PINGFILLED) {
fill((char *)datap, payload);
}
-#ifdef HAVE_LIBCASPER
+#ifdef WITH_CASPER
capdns = capdns_setup();
#endif
if (source) {
@@ -641,7 +641,7 @@ main(int argc, char *const *argv)
if (inet_aton(source, &sock_in.sin_addr) != 0) {
shostname = source;
} else {
-#ifdef HAVE_LIBCASPER
+#ifdef WITH_CASPER
if (capdns != NULL)
hp = cap_gethostbyname2(capdns, source,
AF_INET);
@@ -675,7 +675,7 @@ main(int argc, char *const *argv)
if (inet_aton(target, &to->sin_addr) != 0) {
hostname = target;
} else {
-#ifdef HAVE_LIBCASPER
+#ifdef WITH_CASPER
if (capdns != NULL)
hp = cap_gethostbyname2(capdns, target, AF_INET);
else
@@ -693,7 +693,7 @@ main(int argc, char *const *argv)
hostname = hnamebuf;
}
-#ifdef HAVE_LIBCASPER
+#ifdef WITH_CASPER
/* From now on we will use only reverse DNS lookups. */
if (capdns != NULL) {
const char *types[1];
@@ -791,7 +791,7 @@ main(int argc, char *const *argv)
if (options & F_NUMERIC)
cansandbox = true;
-#ifdef HAVE_LIBCASPER
+#ifdef WITH_CASPER
else if (capdns != NULL)
cansandbox = true;
#endif
@@ -1784,7 +1784,7 @@ pr_addr(struct in_addr ina)
if (options & F_NUMERIC)
return inet_ntoa(ina);
-#ifdef HAVE_LIBCASPER
+#ifdef WITH_CASPER
if (capdns != NULL)
hp = cap_gethostbyaddr(capdns, (char *)&ina, 4, AF_INET);
else
@@ -1868,7 +1868,7 @@ fill(char *bp, char *patp)
}
}
-#ifdef HAVE_LIBCASPER
+#ifdef WITH_CASPER
static cap_channel_t *
capdns_setup(void)
{
@@ -1894,7 +1894,7 @@ capdns_setup(void)
return (capdnsloc);
}
-#endif /* HAVE_LIBCASPER */
+#endif /* WITH_CASPER */
#if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC)
#define SECOPT " [-P policy]"