diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-11-20 21:59:18 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-11-20 21:59:18 +0000 |
commit | e8d4f4f0ac7481c316b3e25a41b1cc747440220e (patch) | |
tree | ae3c72a5204d6498a7f2957738be88615f89a115 /packet-isl.c | |
parent | 62490b8fdb16d066581c40405cb0d8484248fb09 (diff) | |
download | wireshark-e8d4f4f0ac7481c316b3e25a41b1cc747440220e.tar.gz wireshark-e8d4f4f0ac7481c316b3e25a41b1cc747440220e.tar.bz2 wireshark-e8d4f4f0ac7481c316b3e25a41b1cc747440220e.zip |
Make the capture routines take an additional argument giving the amount
of packet data captured.
Make the "BYTES_ARE_IN_FRAME()" macro take a "captured length of the
packet" argument.
Add some length checks to capture routines.
svn path=/trunk/; revision=4235
Diffstat (limited to 'packet-isl.c')
-rw-r--r-- | packet-isl.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/packet-isl.c b/packet-isl.c index 768cce1897..2c6a4d3957 100644 --- a/packet-isl.c +++ b/packet-isl.c @@ -1,12 +1,11 @@ /* packet-isl.c * Routines for Cisco ISL Ethernet header disassembly * - * $Id: packet-isl.c,v 1.25 2001/06/18 02:17:48 guy Exp $ + * $Id: packet-isl.c,v 1.26 2001/11/20 21:59:13 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs - * * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -86,11 +85,11 @@ static dissector_handle_t eth_handle; static dissector_handle_t tr_handle; void -capture_isl(const u_char *pd, int offset, packet_counts *ld) +capture_isl(const u_char *pd, int offset, int len, packet_counts *ld) { guint8 type; - if (!BYTES_ARE_IN_FRAME(offset, ISL_HEADER_SIZE)) { + if (!BYTES_ARE_IN_FRAME(offset, len, ISL_HEADER_SIZE)) { ld->other++; return; } @@ -101,12 +100,12 @@ capture_isl(const u_char *pd, int offset, packet_counts *ld) case TYPE_ETHER: offset += 14+12; /* skip the header */ - capture_eth(pd, offset, ld); + capture_eth(pd, offset, len, ld); break; case TYPE_TR: offset += 14+17; /* skip the header */ - capture_tr(pd, offset, ld); + capture_tr(pd, offset, len, ld); break; default: |