diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-11-22 21:58:44 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-11-22 21:58:44 +0100 |
commit | 3c8f3e13b03380742c24070f8a7b56fe12c6b8ee (patch) | |
tree | a351bb5aa207949c220e71b8f26629703e0a0298 /print-domain.c | |
parent | e534e38f78ca28e849fd91eba2a962347b049faf (diff) | |
download | tcpdump-3c8f3e13b03380742c24070f8a7b56fe12c6b8ee.tar.gz |
Rename ND_TCHECK_/ND_TTEST_ macros
Now all the macros have a name meaning a count in bytes.
e.g.:
ND_TCHECK_32BITS -> ND_TCHECK_4
ND_TTEST_32BITS -> ND_TTEST_4
Diffstat (limited to 'print-domain.c')
-rw-r--r-- | print-domain.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/print-domain.c b/print-domain.c index 1968608b..40179293 100644 --- a/print-domain.c +++ b/print-domain.c @@ -56,7 +56,7 @@ ns_nskip(netdissect_options *ndo, { register u_char i; - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return (NULL); i = EXTRACT_8BITS(cp); cp++; @@ -68,7 +68,7 @@ ns_nskip(netdissect_options *ndo, if ((i & ~INDIR_MASK) != EDNS0_ELT_BITLABEL) return(NULL); /* unknown ELT */ - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return (NULL); if ((bitlen = EXTRACT_8BITS(cp)) == 0) bitlen = 256; @@ -77,7 +77,7 @@ ns_nskip(netdissect_options *ndo, cp += bytelen; } else cp += i; - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return (NULL); i = EXTRACT_8BITS(cp); cp++; @@ -94,7 +94,7 @@ blabel_print(netdissect_options *ndo, const u_char *bitp, *lim; char tc; - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return(NULL); if ((bitlen = EXTRACT_8BITS(cp)) == 0) bitlen = 256; @@ -131,7 +131,7 @@ labellen(netdissect_options *ndo, { register u_int i; - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return(-1); i = EXTRACT_8BITS(cp); if ((i & INDIR_MASK) == EDNS0_MASK) { @@ -140,7 +140,7 @@ labellen(netdissect_options *ndo, ND_PRINT((ndo, "<ELT %d>", elt)); return(-1); } - if (!ND_TTEST_8BITS(cp + 1)) + if (!ND_TTEST_1(cp + 1)) return(-1); if ((bitlen = EXTRACT_8BITS(cp + 1)) == 0) bitlen = 256; @@ -161,7 +161,7 @@ ns_nprint(netdissect_options *ndo, if ((l = labellen(ndo, cp)) == (u_int)-1) return(NULL); - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return(NULL); max_offset = (u_int)(cp - bp); i = EXTRACT_8BITS(cp); @@ -178,7 +178,7 @@ ns_nprint(netdissect_options *ndo, rp = cp + 1; compress = 1; } - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return(NULL); offset = (((i << 8) | EXTRACT_8BITS(cp)) & 0x3fff); /* @@ -199,7 +199,7 @@ ns_nprint(netdissect_options *ndo, cp = bp + offset; if ((l = labellen(ndo, cp)) == (u_int)-1) return(NULL); - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return(NULL); i = EXTRACT_8BITS(cp); cp++; @@ -226,7 +226,7 @@ ns_nprint(netdissect_options *ndo, ND_PRINT((ndo, ".")); if ((l = labellen(ndo, cp)) == (u_int)-1) return(NULL); - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return(NULL); i = EXTRACT_8BITS(cp); cp++; @@ -245,7 +245,7 @@ ns_cprint(netdissect_options *ndo, { register u_int i; - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return (NULL); i = EXTRACT_8BITS(cp); cp++; @@ -512,7 +512,7 @@ ns_rprint(netdissect_options *ndo, int pbit, pbyte; char ntop_buf[INET6_ADDRSTRLEN]; - if (!ND_TTEST_8BITS(cp)) + if (!ND_TTEST_1(cp)) return(NULL); pbit = EXTRACT_8BITS(cp); pbyte = (pbit & ~7) / 8; @@ -558,23 +558,23 @@ ns_rprint(netdissect_options *ndo, if ((cp = ns_nprint(ndo, cp, bp)) == NULL) return(NULL); cp += 6; - if (!ND_TTEST_16BITS(cp)) + if (!ND_TTEST_2(cp)) return(NULL); ND_PRINT((ndo, " fudge=%u", EXTRACT_BE_16BITS(cp))); cp += 2; - if (!ND_TTEST_16BITS(cp)) + if (!ND_TTEST_2(cp)) return(NULL); ND_PRINT((ndo, " maclen=%u", EXTRACT_BE_16BITS(cp))); cp += 2 + EXTRACT_BE_16BITS(cp); - if (!ND_TTEST_16BITS(cp)) + if (!ND_TTEST_2(cp)) return(NULL); ND_PRINT((ndo, " origid=%u", EXTRACT_BE_16BITS(cp))); cp += 2; - if (!ND_TTEST_16BITS(cp)) + if (!ND_TTEST_2(cp)) return(NULL); ND_PRINT((ndo, " error=%u", EXTRACT_BE_16BITS(cp))); cp += 2; - if (!ND_TTEST_16BITS(cp)) + if (!ND_TTEST_2(cp)) return(NULL); ND_PRINT((ndo, " otherlen=%u", EXTRACT_BE_16BITS(cp))); cp += 2; |