diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-05-13 21:18:26 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-05-13 21:18:26 +0000 |
commit | bbcf8235ca3d1ad2f605072d060622da4664592f (patch) | |
tree | 085dcc250e18aa4a38218fde65029f263ad216bd /packet-tpkt.h | |
parent | 6197a1a4fbf9ea61afd376c6b38d43afec9e087b (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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5457 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-tpkt.h')
-rw-r--r-- | packet-tpkt.h | 8 |
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. |