uint8_t tsp_type;
int sec, usec;
- ND_TCHECK(tsp->tsp_type);
+ ND_TCHECK_1(tsp->tsp_type);
tsp_type = EXTRACT_U_1(tsp->tsp_type);
if (tsp_type < TSPTYPENUMBER)
ND_PRINT("TSP_%s", tsptype[tsp_type]);
else
ND_PRINT("(tsp_type %#x)", tsp_type);
- ND_TCHECK(tsp->tsp_vers);
+ ND_TCHECK_1(tsp->tsp_vers);
ND_PRINT(" vers %u", EXTRACT_U_1(tsp->tsp_vers));
- ND_TCHECK(tsp->tsp_seq);
+ ND_TCHECK_2(tsp->tsp_seq);
ND_PRINT(" seq %u", EXTRACT_BE_U_2(tsp->tsp_seq));
switch (tsp_type) {
case TSP_LOOP:
- ND_TCHECK(tsp->tsp_hopcnt);
+ ND_TCHECK_1(tsp->tsp_hopcnt);
ND_PRINT(" hopcnt %u", EXTRACT_U_1(tsp->tsp_hopcnt));
break;
case TSP_SETTIME:
ip6 = (const struct ip6_hdr *)bp2;
else
ip6 = NULL;
- if (!ND_TTEST(up->uh_dport)) {
+ if (!ND_TTEST_2(up->uh_dport)) {
udpipaddr_print(ndo, ip, -1, -1);
goto trunc;
}
ND_PRINT("truncated-udp %u", length);
return;
}
- if (!ND_TTEST(up->uh_ulen)) {
+ if (!ND_TTEST_2(up->uh_ulen)) {
udpipaddr_print(ndo, ip, sport, dport);
goto trunc;
}
enum sunrpc_msg_type direction;
rp = (const struct sunrpc_msg *)(up + 1);
- if (ND_TTEST(rp->rm_direction)) {
+ if (ND_TTEST_4(rp->rm_direction)) {
direction = (enum sunrpc_msg_type) EXTRACT_BE_U_4(rp->rm_direction);
if (dport == NFS_PORT && direction == SUNRPC_CALL) {
ND_PRINT("NFS request xid %u ",
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))) {
if (ndo->ndo_vflag)
ND_PRINT("kip ");
llap_print(ndo, cp, length);