diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-05-05 09:32:36 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-05-05 09:32:36 +0000 |
commit | 6bbfd97bde03e01dbf64173b9fd4e85747fabf8e (patch) | |
tree | 950d9eb832f91889530022ffd446ddf3b4772801 /packet-eth.c | |
parent | dedc615898ca05105579430990f44a441fa44009 (diff) | |
download | wireshark-6bbfd97bde03e01dbf64173b9fd4e85747fabf8e.tar.gz wireshark-6bbfd97bde03e01dbf64173b9fd4e85747fabf8e.tar.bz2 wireshark-6bbfd97bde03e01dbf64173b9fd4e85747fabf8e.zip |
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).
svn path=/trunk/; revision=1909
Diffstat (limited to 'packet-eth.c')
-rw-r--r-- | packet-eth.c | 5 |
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]); |