diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-10-06 10:11:40 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-10-06 10:11:40 +0000 |
commit | e69b5278aaddce2af02174afe0515adceb841973 (patch) | |
tree | 8cb476c958c815d3d73d4ac79ffeb15df28484d8 /file.h | |
parent | e735d485aee9d56723dea97fae3064cf4bdd7e9a (diff) | |
download | wireshark-e69b5278aaddce2af02174afe0515adceb841973.tar.gz wireshark-e69b5278aaddce2af02174afe0515adceb841973.tar.bz2 wireshark-e69b5278aaddce2af02174afe0515adceb841973.zip |
Implement epan_dissect_new() and epan_dissect_free(). These are the
"top-level" dissectors that libepan-users call, instead of dissect_packet().
The epan_dissect_t holds the tvbuff after dissection so that the tvbuff's
memory is not cleared until after the proto_tree is freed. (I might stuff
the proto_tree into the epan_dissect_t, too).
What remains of dissect_packet() in packet.c handles the tvbuff initialiation.
The real meat of dissect_packet() is now in dissect_frame(), in packet-frame.c
This means that "packet.c" is no longer a dissector, os it is no longer
passed to make-reg-dotc.
Once dissect_fddi() gets two wrapper functions (dissect_fddi_swapped()
and dissect_fddi_nonswapped()), the a dissector handoff routine could
be used instead of the switch statement in dissect_frame(). I'd register
a field like "wtap.encap"
svn path=/trunk/; revision=2478
Diffstat (limited to 'file.h')
-rw-r--r-- | file.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* file.h * Definitions for file structures and routines * - * $Id: file.h,v 1.76 2000/08/21 15:45:21 deniel Exp $ + * $Id: file.h,v 1.77 2000/10/06 10:10:48 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -42,6 +42,8 @@ #include <errno.h> +#include <epan.h> + #ifdef HAVE_LIBZ #include "zlib.h" #define FILE_T gzFile @@ -106,6 +108,7 @@ typedef struct _capture_file { column_info cinfo; /* Column formatting information */ frame_data *current_frame; /* Frame data for current frame */ proto_tree *protocol_tree; /* Protocol tree for currently selected packet */ + epan_dissect_t *edt; /* Protocol dissection fo rcurrently selected packet */ FILE *print_fh; /* File we're printing to */ } capture_file; |