aboutsummaryrefslogtreecommitdiffstats
path: root/packet.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-01-23 08:55:37 +0000
committerGuy Harris <guy@alum.mit.edu>2000-01-23 08:55:37 +0000
commit2461d79698e685644e2f07ee46381a092348461c (patch)
tree8647292ca380ae9108970a167959b9df1c931ec9 /packet.h
parent42d68156a9599948fb0c5c633efc9d61548d5a5b (diff)
In "dissect_eth()", update "pi.len" and "pi.captured_len" regardless of
whether we're building a protocol tree or not. Make "dissect_eth()" use "BYTES_ARE_IN_FRAME()" to see if we have a full Ethernet header - it can be called with a non-zero offset, if Ethernet frames are encapsulated inside other frames (e.g., ATM LANE). Make capture routines take an "offset" argument if the corresponding dissect routine takes one (for symmetry, and for Cisco ISL or any other protocol that encapsulates Ethernet or Token-Ring frames inside other frames). Pass the frame lengths to capture routines via the "pi" structure, rather than as an in-line argument, so that they can macros such as "BYTES_ARE_IN_FRAME()" the way the corresponding dissect routines do. Make capture routines update "pi.len" and "pi.captured_len" the same way the corresponding diseect routines do, if the capture routines then call other capture routines. Make "capture_vlan()" count as "other" frames that are too short, the way other capture routines do. svn path=/trunk/; revision=1525
Diffstat (limited to 'packet.h')
-rw-r--r--packet.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/packet.h b/packet.h
index cd9ca5e0c0..e8ded27085 100644
--- a/packet.h
+++ b/packet.h
@@ -1,7 +1,7 @@
/* packet.h
* Definitions for packet disassembly structures and routines
*
- * $Id: packet.h,v 1.166 2000/01/20 21:34:14 guy Exp $
+ * $Id: packet.h,v 1.167 2000/01/23 08:55:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -270,29 +270,28 @@ void dissect_packet(const u_char *, frame_data *, proto_tree *);
/*
* Routines in packet-*.c
- * Routines should take three args: packet data *, cap_len, packet_counts *
+ * Routines should take two args: packet data *, packet_counts *
* They should never modify the packet data.
*/
-void capture_clip(const u_char *, guint32, packet_counts *);
-void capture_eth(const u_char *, guint32, packet_counts *);
-void capture_fddi(const u_char *, guint32, packet_counts *);
-void capture_null(const u_char *, guint32, packet_counts *);
-void capture_ppp(const u_char *, guint32, packet_counts *);
-void capture_raw(const u_char *, guint32, packet_counts *);
-void capture_tr(const u_char *, guint32, packet_counts *);
+void capture_clip(const u_char *, packet_counts *);
+void capture_fddi(const u_char *, packet_counts *);
+void capture_null(const u_char *, packet_counts *);
+void capture_ppp(const u_char *, packet_counts *);
+void capture_raw(const u_char *, packet_counts *);
/*
* Routines in packet-*.c
- * Routines should take four args: packet data *, offset, cap_len,
- * packet_counts *
+ * Routines should take three args: packet data *, offset, packet_counts *
* They should never modify the packet data.
*/
-void capture_netbios(const u_char *, int, guint32, packet_counts *);
-void capture_llc(const u_char *, int, guint32, packet_counts *);
-void capture_ip(const u_char *, int, guint32, packet_counts *);
-void capture_ipx(const u_char *, int, guint32, packet_counts *);
-void capture_vines(const u_char *, int, guint32, packet_counts *);
-void capture_vlan(const u_char *, int, guint32, packet_counts *);
+void capture_eth(const u_char *, int, packet_counts *);
+void capture_ip(const u_char *, int, packet_counts *);
+void capture_ipx(const u_char *, int, packet_counts *);
+void capture_llc(const u_char *, int, packet_counts *);
+void capture_netbios(const u_char *, int, packet_counts *);
+void capture_tr(const u_char *, int, packet_counts *);
+void capture_vines(const u_char *, int, packet_counts *);
+void capture_vlan(const u_char *, int, packet_counts *);
/*
* Routines in packet-*.c
@@ -440,7 +439,7 @@ void init_dissect_x25(void);
/* These functions are in ethertype.c */
void capture_ethertype(guint16 etype, int offset,
- const u_char *pd, guint32 cap_len, packet_counts *ld);
+ const u_char *pd, packet_counts *ld);
void ethertype(guint16 etype, int offset,
const u_char *pd, frame_data *fd, proto_tree *tree,
proto_tree *fh_tree, int item_id);