aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tpkt.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-05-13 21:18:26 +0000
committerGuy Harris <guy@alum.mit.edu>2002-05-13 21:18:26 +0000
commitc845015f0645b6da7e5d7dc8f02002f3713651d0 (patch)
tree085dcc250e18aa4a38218fde65029f263ad216bd /packet-tpkt.h
parenta92af3868dc04904daf6148b1b8368bdbddb9572 (diff)
Have "is_tpkt()" take a minimum-payload-length argument and check
whether the length value in the TPKT header is large enough to include that much payload - if not, report the packet as not being a TPKT packet. Have the heuristic Q.931 dissector supply the appropriate value. svn path=/trunk/; revision=5457
Diffstat (limited to 'packet-tpkt.h')
-rw-r--r--packet-tpkt.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/packet-tpkt.h b/packet-tpkt.h
index d4671b2367..cac6a7a085 100644
--- a/packet-tpkt.h
+++ b/packet-tpkt.h
@@ -5,7 +5,7 @@
* Copyright 2000, Philips Electronics N.V.
* Andreas Sikkema <andreas.sikkema@philips.com>
*
- * $Id: packet-tpkt.h,v 1.7 2002/02/23 02:30:15 guy Exp $
+ * $Id: packet-tpkt.h,v 1.8 2002/05/13 21:18:25 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -30,8 +30,12 @@
* Check whether this could be a TPKT-encapsulated PDU.
* Returns -1 if it's not, and the PDU length from the TPKT header
* if it is.
+ *
+ * "min_len" is the minimum length of the PDU; the length field in the
+ * TPKT header must be at least "4+min_len" in order for this to be a
+ * valid TPKT PDU for the protocol in question.
*/
-extern int is_tpkt(tvbuff_t *tvb);
+extern int is_tpkt(tvbuff_t *tvb, int min_len);
/*
* Dissect TPKT-encapsulated data in a TCP stream.