aboutsummaryrefslogtreecommitdiffstats
path: root/packet-eth.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-05-05 09:32:36 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-05-05 09:32:36 +0000
commit449d904e572464df76fdee2852368db15b1465eb (patch)
tree950d9eb832f91889530022ffd446ddf3b4772801 /packet-eth.c
parentbba60bca8ccf55df30c451bbc4d8ef343c0987b9 (diff)
Add routines to:
register lists of "heuristic" dissectors, which are handed a frame that may or may contain a payload for the protocol they dissect, and that return FALSE if it's not or dissect the packet and return TRUE if it is; add a dissector to such a list; go through such a list, calling each dissector until either a dissector returns TRUE, in which case the routine returns TRUE, or it runs out of entries in the list, in which case the routine returns FALSE. Have lists of heuristic dissectors for TCP and for COTP when used with the Inactive Subset of CLNP, and add the GIOP and Yahoo Messenger dissectors to the first list and the Sinec H1 dissector to the second list. Make the dissector name argument to "dissector_add()" and "dissector_delete()" a "const char *" rarther than just a "char *". Add "heur_dissector_add()", the routine to add a heuristic dissector to a list of heuristic dissectors, to the set of routines we can export to plugins through a table on platforms where dynamically-loaded code can't call stuff in the main program, and initialize the element in the table in question for "dissector_add()" (which we'd forgotten to do). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1909 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-eth.c')
-rw-r--r--packet-eth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/packet-eth.c b/packet-eth.c
index ed570090b0..fec20d78e3 100644
--- a/packet-eth.c
+++ b/packet-eth.c
@@ -1,7 +1,7 @@
/* packet-eth.c
* Routines for ethernet packet disassembly
*
- * $Id: packet-eth.c,v 1.31 2000/03/20 21:21:33 gram Exp $
+ * $Id: packet-eth.c,v 1.32 2000/05/05 09:32:02 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -139,6 +139,7 @@ capture_eth(const u_char *pd, int offset, packet_counts *ld)
void
dissect_eth(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
+ int orig_captured_len;
guint16 etype, length;
proto_tree *fh_tree = NULL;
proto_item *ti;
@@ -149,6 +150,8 @@ dissect_eth(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
return;
}
+ orig_captured_len = pi.captured_len;
+
SET_ADDRESS(&pi.dl_src, AT_ETHER, 6, &pd[offset+6]);
SET_ADDRESS(&pi.src, AT_ETHER, 6, &pd[offset+6]);
SET_ADDRESS(&pi.dl_dst, AT_ETHER, 6, &pd[offset+0]);