ND_TCHECK_2((const u_int *)hdr);
ts = EXTRACT_BE_U_2(hdr);
if ((ts & 0xf060) != 0) {
/* probably vt */
ND_TCHECK_2((const u_int *)hdr);
ts = EXTRACT_BE_U_2(hdr);
if ((ts & 0xf060) != 0) {
/* probably vt */
- ND_TCHECK_2(up->uh_ulen);
- ND_PRINT((ndo, "udp/vt %u %d / %d",
- (uint32_t)(EXTRACT_BE_U_2(up->uh_ulen) - sizeof(*up)),
- ts & 0x3ff, ts >> 10));
+ ND_PRINT("udp/vt %u %u / %u",
+ length,
+ ts & 0x3ff, ts >> 10);
ND_TCHECK_4(&((const u_int *)hdr)[0]);
i0 = EXTRACT_BE_U_4(&((const u_int *)hdr)[0]);
ND_TCHECK_4(&((const u_int *)hdr)[1]);
i1 = EXTRACT_BE_U_4(&((const u_int *)hdr)[1]);
ND_TCHECK_4(&((const u_int *)hdr)[0]);
i0 = EXTRACT_BE_U_4(&((const u_int *)hdr)[0]);
ND_TCHECK_4(&((const u_int *)hdr)[1]);
i1 = EXTRACT_BE_U_4(&((const u_int *)hdr)[1]);
- ND_TCHECK_2(up->uh_ulen);
- ND_PRINT((ndo, "udp/vat %u c%d %u%s",
- (uint32_t)(EXTRACT_BE_U_2(up->uh_ulen) - sizeof(*up) - 8),
+ ND_PRINT("udp/vat %u c%u %u%s",
+ length - 8,
-rtp_print(netdissect_options *ndo, const void *hdr, u_int len,
- const struct udphdr *up)
+rtp_print(netdissect_options *ndo, const void *hdr, u_int len)
ND_TCHECK_4(&((const u_int *)hdr)[0]);
i0 = EXTRACT_BE_U_4(&((const u_int *)hdr)[0]);
ND_TCHECK_4(&((const u_int *)hdr)[1]);
i1 = EXTRACT_BE_U_4(&((const u_int *)hdr)[1]);
ND_TCHECK_4(&((const u_int *)hdr)[0]);
i0 = EXTRACT_BE_U_4(&((const u_int *)hdr)[0]);
ND_TCHECK_4(&((const u_int *)hdr)[1]);
i1 = EXTRACT_BE_U_4(&((const u_int *)hdr)[1]);
hasext = i0 & 0x10000000;
contype = (i0 >> 16) & 0x7f;
hasmarker = i0 & 0x800000;
hasext = i0 & 0x10000000;
contype = (i0 >> 16) & 0x7f;
hasmarker = i0 & 0x800000;
len = (EXTRACT_BE_U_2(rh->rh_len) + 1) * 4;
flags = EXTRACT_BE_U_2(rh->rh_flags);
cnt = (flags >> 8) & 0x1f;
switch (flags & 0xff) {
case RTCP_PT_SR:
sr = (const struct rtcp_sr *)(rh + 1);
len = (EXTRACT_BE_U_2(rh->rh_len) + 1) * 4;
flags = EXTRACT_BE_U_2(rh->rh_flags);
cnt = (flags >> 8) & 0x1f;
switch (flags & 0xff) {
case RTCP_PT_SR:
sr = (const struct rtcp_sr *)(rh + 1);
- ND_PRINT((ndo, " @%.2f %u %up %ub", ts, EXTRACT_BE_U_4(sr->sr_ts),
- EXTRACT_BE_U_4(sr->sr_np), EXTRACT_BE_U_4(sr->sr_nb)));
+ ND_PRINT(" @%.2f %u %up %ub", ts, EXTRACT_BE_U_4(sr->sr_ts),
+ EXTRACT_BE_U_4(sr->sr_np), EXTRACT_BE_U_4(sr->sr_nb));
- ND_PRINT((ndo, " type-0x%x %d", flags & 0xff, len));
+ ND_PRINT(" type-0x%x %u", flags & 0xff, len);
ts = (double)(EXTRACT_BE_U_4(rr->rr_lsr)) / 65536.;
dts = (double)(EXTRACT_BE_U_4(rr->rr_dlsr)) / 65536.;
ts = (double)(EXTRACT_BE_U_4(rr->rr_lsr)) / 65536.;
dts = (double)(EXTRACT_BE_U_4(rr->rr_dlsr)) / 65536.;
EXTRACT_BE_U_4(rr->rr_nl) & 0x00ffffff,
EXTRACT_BE_U_4(rr->rr_ls),
EXTRACT_BE_U_4(rr->rr_nl) & 0x00ffffff,
EXTRACT_BE_U_4(rr->rr_ls),
ip6addr_string(ndo, &ip6->ip6_src),
udpport_string(ndo, sport),
ip6addr_string(ndo, &ip6->ip6_dst),
ip6addr_string(ndo, &ip6->ip6_src),
udpport_string(ndo, sport),
ip6addr_string(ndo, &ip6->ip6_dst),
ipaddr_string(ndo, &ip->ip_src),
udpport_string(ndo, sport),
ipaddr_string(ndo, &ip->ip_dst),
ipaddr_string(ndo, &ip->ip_src),
udpport_string(ndo, sport),
ipaddr_string(ndo, &ip->ip_dst),
udpipaddr_print(ndo, ip, -1, -1);
goto trunc;
}
udpipaddr_print(ndo, ip, -1, -1);
goto trunc;
}
if (length < sizeof(struct udphdr)) {
udpipaddr_print(ndo, ip, sport, dport);
if (length < sizeof(struct udphdr)) {
udpipaddr_print(ndo, ip, sport, dport);
udpipaddr_print(ndo, ip, sport, dport);
goto trunc;
}
ulen = EXTRACT_BE_U_2(up->uh_ulen);
if (ulen < sizeof(struct udphdr)) {
udpipaddr_print(ndo, ip, sport, dport);
udpipaddr_print(ndo, ip, sport, dport);
goto trunc;
}
ulen = EXTRACT_BE_U_2(up->uh_ulen);
if (ulen < sizeof(struct udphdr)) {
udpipaddr_print(ndo, ip, sport, dport);
case PT_VAT:
udpipaddr_print(ndo, ip, sport, dport);
case PT_VAT:
udpipaddr_print(ndo, ip, sport, dport);
break;
case PT_WB:
udpipaddr_print(ndo, ip, sport, dport);
break;
case PT_WB:
udpipaddr_print(ndo, ip, sport, dport);
if (direction == SUNRPC_CALL)
sunrpc_print(ndo, (const u_char *)rp, length,
(const u_char *)ip);
if (direction == SUNRPC_CALL)
sunrpc_print(ndo, (const u_char *)rp, length,
(const u_char *)ip);
case PT_RTP:
udpipaddr_print(ndo, ip, sport, dport);
case PT_RTP:
udpipaddr_print(ndo, ip, sport, dport);
- rtp_print(ndo, (const void *)(up + 1), length, up);
+ rtp_print(ndo, (const void *)(up + 1), length);
- if (ND_TTEST(rp->rm_direction)) {
- direction = (enum sunrpc_msg_type) EXTRACT_BE_U_4(&rp->rm_direction);
+ if (ND_TTEST_4(rp->rm_direction)) {
+ direction = (enum sunrpc_msg_type) EXTRACT_BE_U_4(rp->rm_direction);
- ND_PRINT((ndo, "NFS request xid %u ", EXTRACT_BE_U_4(&rp->rm_xid)));
+ ND_PRINT("NFS request xid %u ",
+ EXTRACT_BE_U_4(rp->rm_xid));
nfsreq_noaddr_print(ndo, (const u_char *)rp, length,
(const u_char *)ip);
return;
}
if (sport == NFS_PORT && direction == SUNRPC_REPLY) {
nfsreq_noaddr_print(ndo, (const u_char *)rp, length,
(const u_char *)ip);
return;
}
if (sport == NFS_PORT && direction == SUNRPC_REPLY) {
- ND_PRINT((ndo, "NFS reply xid %u ", EXTRACT_BE_U_4(&rp->rm_xid)));
+ ND_PRINT("NFS reply xid %u ",
+ EXTRACT_BE_U_4(rp->rm_xid));
nfsreply_noaddr_print(ndo, (const u_char *)rp, length,
(const u_char *)ip);
return;
nfsreply_noaddr_print(ndo, (const u_char *)rp, length,
(const u_char *)ip);
return;
} else if (ND_TTEST_LEN(cp, length)) {
sum = udp_cksum(ndo, ip, up, length + sizeof(struct udphdr));
if (sum != 0) {
} else if (ND_TTEST_LEN(cp, length)) {
sum = udp_cksum(ndo, ip, up, length + sizeof(struct udphdr));
if (sum != 0) {
nbt_udp138_print(ndo, (const u_char *)(up + 1), length);
#endif
else if (dport == VAT_PORT)
nbt_udp138_print(ndo, (const u_char *)(up + 1), length);
#endif
else if (dport == VAT_PORT)
else if (IS_SRC_OR_DST_PORT(ZEPHYR_SRV_PORT) || IS_SRC_OR_DST_PORT(ZEPHYR_CLT_PORT))
zephyr_print(ndo, (const void *)(up + 1), length);
/*
else if (IS_SRC_OR_DST_PORT(ZEPHYR_SRV_PORT) || IS_SRC_OR_DST_PORT(ZEPHYR_CLT_PORT))
zephyr_print(ndo, (const void *)(up + 1), length);
/*
else if (IS_SRC_OR_DST_PORT(CISCO_AUTORP_PORT))
cisco_autorp_print(ndo, (const void *)(up + 1), length);
else if (IS_SRC_OR_DST_PORT(RADIUS_PORT) ||
else if (IS_SRC_OR_DST_PORT(CISCO_AUTORP_PORT))
cisco_autorp_print(ndo, (const void *)(up + 1), length);
else if (IS_SRC_OR_DST_PORT(RADIUS_PORT) ||
lisp_print(ndo, (const u_char *)(up + 1), length);
else if (IS_SRC_OR_DST_PORT(VXLAN_GPE_PORT))
vxlan_gpe_print(ndo, (const u_char *)(up + 1), length);
lisp_print(ndo, (const u_char *)(up + 1), length);
else if (IS_SRC_OR_DST_PORT(VXLAN_GPE_PORT))
vxlan_gpe_print(ndo, (const u_char *)(up + 1), length);
- else if (ND_TTEST(((const struct LAP *)cp)->type) &&
- EXTRACT_U_1(((const struct LAP *)cp)->type) == lapDDP &&
- (atalk_port(sport) || atalk_port(dport))) {
+ else if (ND_TTEST_1(((const struct LAP *)cp)->type) &&
+ EXTRACT_U_1(((const struct LAP *)cp)->type) == lapDDP &&
+ (atalk_port(sport) || atalk_port(dport))) {