X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/64677b0d78ff168d98c3035e894c4910c021136e..9e7cd40a7af81c08da36ef3cc4e0a951d58dd01e:/print-domain.c diff --git a/print-domain.c b/print-domain.c index 20071cd2..4ea39234 100644 --- a/print-domain.c +++ b/print-domain.c @@ -22,10 +22,10 @@ /* \summary: Domain Name System (DNS) printer */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" #include @@ -218,7 +218,7 @@ ns_nprint(netdissect_options *ndo, return(NULL); } } else { - if (fn_printn(ndo, cp, l, ndo->ndo_snapend)) + if (nd_printn(ndo, cp, l, ndo->ndo_snapend)) return(NULL); } @@ -249,7 +249,7 @@ ns_cprint(netdissect_options *ndo, return (NULL); i = EXTRACT_U_1(cp); cp++; - if (fn_printn(ndo, cp, i, ndo->ndo_snapend)) + if (nd_printn(ndo, cp, i, ndo->ndo_snapend)) return (NULL); return (cp + i); } @@ -431,7 +431,7 @@ ns_rprint(netdissect_options *ndo, switch (typ) { case T_A: - if (!ND_TTEST_LEN(cp, sizeof(struct in_addr))) + if (!ND_TTEST_LEN(cp, sizeof(nd_ipv4))) return(NULL); ND_PRINT(" %s", intoa(EXTRACT_IPV4_TO_NETWORK_ORDER(cp))); break; @@ -502,7 +502,7 @@ ns_rprint(netdissect_options *ndo, { char ntop_buf[INET6_ADDRSTRLEN]; - if (!ND_TTEST_LEN(cp, sizeof(struct in6_addr))) + if (!ND_TTEST_LEN(cp, sizeof(nd_ipv6))) return(NULL); ND_PRINT(" %s", addrtostr6(cp, ntop_buf, sizeof(ntop_buf))); @@ -548,7 +548,7 @@ ns_rprint(netdissect_options *ndo, case T_UNSPECA: /* One long string */ if (!ND_TTEST_LEN(cp, len)) return(NULL); - if (fn_printn(ndo, cp, len, ndo->ndo_snapend)) + if (nd_printn(ndo, cp, len, ndo->ndo_snapend)) return(NULL); break; @@ -598,6 +598,7 @@ domain_print(netdissect_options *ndo, const u_char *cp; uint16_t b2; + ndo->ndo_protocol = "domain"; np = (const dns_header_t *)bp; ND_TCHECK_SIZE(np); flags = EXTRACT_BE_U_2(np->flags); @@ -776,5 +777,5 @@ domain_print(netdissect_options *ndo, return; trunc: - ND_PRINT("[|domain]"); + nd_print_trunc(ndo); }