summaryrefslogtreecommitdiff
path: root/epan/epan.h
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-10-06 10:11:40 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-10-06 10:11:40 +0000
commite69b5278aaddce2af02174afe0515adceb841973 (patch)
tree8cb476c958c815d3d73d4ac79ffeb15df28484d8 /epan/epan.h
parente735d485aee9d56723dea97fae3064cf4bdd7e9a (diff)
downloadwireshark-e69b5278aaddce2af02174afe0515adceb841973.tar.gz
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 'epan/epan.h')
-rw-r--r--epan/epan.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/epan/epan.h b/epan/epan.h
index 649627c44e..f38067d284 100644
--- a/epan/epan.h
+++ b/epan/epan.h
@@ -5,13 +5,19 @@
*/
#ifndef EPAN_H
+#define EPAN_H
#include <glib.h>
-
+
+/* XXX - for now */
+#include "packet.h"
+
void epan_init(void);
void epan_cleanup(void);
void epan_conversation_init(void);
+
+
/* A client will create one epan_t for an entire dissection session.
* A single epan_t will be used to analyze the entire sequence of packets,
* sequentially, in a single session. A session corresponds to a single
@@ -21,7 +27,6 @@ void epan_conversation_init(void);
*/
typedef struct epan_session epan_t;
-
epan_t*
epan_new(void);
@@ -39,17 +44,21 @@ epan_free(epan_t*);
*/
typedef struct epan_dissect epan_dissect_t;
-
epan_dissect_t*
-epan_dissect_new(epan_t*, guint8* data, guint len, guint32 wtap_encap,
- void* pseudo_header);
+epan_dissect_new(void* pseudo_header, const guint8* data, frame_data *fd, proto_tree *tree);
void
-epan_dissect_free(epan_t*, epan_dissect_t*);
+epan_dissect_free(epan_dissect_t* edt);
+
+
+
+
/* Should this be ".libepan"? For backwards-compatibility, I'll keep
* it ".ethereal" for now.
*/
#define PF_DIR ".ethereal"
+
+
#endif /* EPAN_H */