};
struct tha6 {
- struct in6_addr src;
- struct in6_addr dst;
+ nd_ipv6 src;
+ nd_ipv6 dst;
u_int port;
};
hlen = TH_OFF(tp) * 4;
if (hlen < sizeof(*tp)) {
- ND_PRINT(" tcp %u [bad hdr length %u - too short, < %lu]",
- length - hlen, hlen, (unsigned long)sizeof(*tp));
+ ND_PRINT(" tcp %u [bad hdr length %u - too short, < %zu]",
+ length - hlen, hlen, sizeof(*tp));
return;
}
case PT_RESP:
resp_print(ndo, bp, length);
break;
+ case PT_DOMAIN:
+ /* over_tcp: TRUE, is_mdns: FALSE */
+ domain_print(ndo, bp, length, TRUE, FALSE);
+ break;
}
return;
}
} else if (IS_SRC_OR_DST_PORT(RTSP_PORT) || IS_SRC_OR_DST_PORT(RTSP_PORT_ALT)) {
ND_PRINT(": ");
rtsp_print(ndo, bp, length);
- } else if (length > 2 &&
- (IS_SRC_OR_DST_PORT(NAMESERVER_PORT))) {
- /* domain_print() assumes it does not have to prepend a space before its
- * own output to separate it from the output of the calling function. This
- * works well with udp_print(), but requires a small prop here.
- */
- ND_PRINT(" ");
-
- /*
- * TCP DNS query has 2byte length at the head.
- * XXX packet could be unaligned, it can go strange
- */
- domain_print(ndo, bp + 2, length - 2, 0);
+ } else if (IS_SRC_OR_DST_PORT(NAMESERVER_PORT)) {
+ /* over_tcp: TRUE, is_mdns: FALSE */
+ domain_print(ndo, bp, length, TRUE, FALSE);
} else if (IS_SRC_OR_DST_PORT(MSDP_PORT)) {
msdp_print(ndo, bp, length);
} else if (IS_SRC_OR_DST_PORT(RPKI_RTR_PORT)) {
rpki_rtr_print(ndo, bp, length);
- }
- else if (length > 0 && (IS_SRC_OR_DST_PORT(LDP_PORT))) {
+ } else if (IS_SRC_OR_DST_PORT(LDP_PORT)) {
ldp_print(ndo, bp, length);
- }
- else if ((IS_SRC_OR_DST_PORT(NFS_PORT)) &&
+ } else if ((IS_SRC_OR_DST_PORT(NFS_PORT)) &&
length >= 4 && ND_TTEST_4(bp)) {
/*
* If data present, header length valid, and NFS port used,
}
return;
- bad:
+bad:
ND_PRINT("[bad opt]");
if (ch != '\0')
ND_PRINT("]");
return;
- trunc:
+trunc:
nd_print_trunc(ndo);
if (ch != '\0')
ND_PRINT(">");