summaryrefslogtreecommitdiff
path: root/interface.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-03-10 13:25:52 -0700
committerGuy Harris <guy@alum.mit.edu>2015-03-10 13:25:52 -0700
commit4405f138044178bf9756cbb8712d086aaaafcaed (patch)
treedee5f82b4d0b63d96f07568dda6cb5a18e5b9096 /interface.h
parentd83a284abc80d3d09f6bddd087760bb1b01d9cc7 (diff)
downloadtcpdump-4405f138044178bf9756cbb8712d086aaaafcaed.tar.gz
Get rid of support for non-NDOified printers.
Remove the TTEST{2}/TCHECK{2} macros. Rename all "ndo_printer" routines, structures, and structure members to just "printer", and get rid of the old routines/structures/structure members with those names.
Diffstat (limited to 'interface.h')
-rw-r--r--interface.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/interface.h b/interface.h
index 59c1eefd..2389c2e1 100644
--- a/interface.h
+++ b/interface.h
@@ -97,38 +97,6 @@ extern char *program_name; /* used to generate self-identifying messages */
extern int32_t thiszone; /* seconds offset from gmt to local time */
-/*
- * True if "l" bytes of "var" were captured.
- *
- * The "snapend - (l) <= snapend" checks to make sure "l" isn't so large
- * that "snapend - (l)" underflows.
- *
- * The check is for <= rather than < because "l" might be 0.
- *
- * We cast the pointers to uintptr_t to make sure that the compiler
- * doesn't optimize away any of these tests (which it is allowed to
- * do, as adding an integer to, or subtracting an integer from, a
- * pointer assumes that the pointer is a pointer to an element of an
- * array and that the result of the addition or subtraction yields a
- * pointer to another member of the array, so that, for example, if
- * you subtract a positive integer from a pointer, the result is
- * guaranteed to be less than the original pointer value). See
- *
- * http://www.kb.cert.org/vuls/id/162289
- */
-#define TTEST2(var, l) \
- ((uintptr_t)snapend - (l) <= (uintptr_t)snapend && \
- (uintptr_t)&(var) <= (uintptr_t)snapend - (l))
-
-/* True if "var" was captured */
-#define TTEST(var) TTEST2(var, sizeof(var))
-
-/* Bail if "l" bytes of "var" were not captured */
-#define TCHECK2(var, l) if (!TTEST2(var, l)) goto trunc
-
-/* Bail if "var" was not captured */
-#define TCHECK(var) TCHECK2(var, sizeof(var))
-
extern int mask2plen(uint32_t);
extern const char *tok2strary_internal(const char **, int, const char *, int);
#define tok2strary(a,f,i) tok2strary_internal(a, sizeof(a)/sizeof(a[0]),f,i)