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("udp/vt %u %d / %d",
- (uint32_t)(EXTRACT_BE_U_2(up->uh_ulen) - sizeof(*up)),
+ ND_PRINT("udp/vt %u %u / %u",
+ length,
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("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;
if (ndo->ndo_vflag)
ND_PRINT(" %u", EXTRACT_BE_U_4(rh->rh_ssrc));
if ((const u_char *)(sr + 1) > ep)
if (ndo->ndo_vflag)
ND_PRINT(" %u", EXTRACT_BE_U_4(rh->rh_ssrc));
if ((const u_char *)(sr + 1) > ep)
rr = (const struct rtcp_rr *)(rh + 1);
if (ndo->ndo_vflag)
ND_PRINT(" %u", EXTRACT_BE_U_4(rh->rh_ssrc));
break;
case RTCP_PT_SDES:
rr = (const struct rtcp_rr *)(rh + 1);
if (ndo->ndo_vflag)
ND_PRINT(" %u", EXTRACT_BE_U_4(rh->rh_ssrc));
break;
case RTCP_PT_SDES:
EXTRACT_BE_U_4(rr->rr_nl) & 0x00ffffff,
EXTRACT_BE_U_4(rr->rr_ls),
EXTRACT_BE_U_4(rr->rr_dv), ts, dts);
EXTRACT_BE_U_4(rr->rr_nl) & 0x00ffffff,
EXTRACT_BE_U_4(rr->rr_ls),
EXTRACT_BE_U_4(rr->rr_dv), ts, dts);
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);
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);
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) {
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;
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);
/*
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))) {