From bbcf8235ca3d1ad2f605072d060622da4664592f Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 13 May 2002 21:18:26 +0000 Subject: 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 --- packet-tpkt.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'packet-tpkt.h') 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 * - * $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 @@ -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. -- cgit v1.2.3