Changeset View
Changeset View
Standalone View
Standalone View
contrib/tcpdump/addrtoname.c
Context not available. | |||||
#include "config.h" | #include "config.h" | ||||
#endif | #endif | ||||
#ifdef HAVE_CAPSICUM | #ifdef HAVE_CAPSPER | ||||
#include <libcapsicum.h> | #include <libcasper.h> | ||||
#include <libcapsicum_dns.h> | #include <casper/cap_dns.h> | ||||
#endif /* HAVE_CAPSICUM */ | #endif /* HAVE_CAPSPER */ | ||||
#include <tcpdump-stdinc.h> | #include <tcpdump-stdinc.h> | ||||
#ifdef USE_ETHER_NTOHOST | #ifdef USE_ETHER_NTOHOST | ||||
Context not available. | |||||
static uint32_t f_netmask; | static uint32_t f_netmask; | ||||
static uint32_t f_localnet; | static uint32_t f_localnet; | ||||
#ifdef HAVE_CAPSICUM | #ifdef HAVE_CAPSPER | ||||
extern cap_channel_t *capdns; | extern cap_channel_t *capdns; | ||||
#endif | #endif | ||||
Context not available. | |||||
*/ | */ | ||||
if (!ndo->ndo_nflag && | if (!ndo->ndo_nflag && | ||||
(addr & f_netmask) == f_localnet) { | (addr & f_netmask) == f_localnet) { | ||||
#ifdef HAVE_CAPSICUM | #ifdef HAVE_CAPSPER | ||||
if (capdns != NULL) { | if (capdns != NULL) { | ||||
hp = cap_gethostbyaddr(capdns, (char *)&addr, 4, | hp = cap_gethostbyaddr(capdns, (char *)&addr, 4, | ||||
AF_INET); | AF_INET); | ||||
Context not available. | |||||
* Do not print names if -n was given. | * Do not print names if -n was given. | ||||
*/ | */ | ||||
if (!ndo->ndo_nflag) { | if (!ndo->ndo_nflag) { | ||||
#ifdef HAVE_CAPSICUM | #ifdef HAVE_CAPSPER | ||||
if (capdns != NULL) { | if (capdns != NULL) { | ||||
hp = cap_gethostbyaddr(capdns, (char *)&addr, | hp = cap_gethostbyaddr(capdns, (char *)&addr, | ||||
sizeof(addr), AF_INET6); | sizeof(addr), AF_INET6); | ||||
Context not available. |