summaryrefslogtreecommitdiff
path: root/epan/epan.h
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-09-27 04:55:05 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-09-27 04:55:05 +0000
commit83ec54675c19f25cfbb2e8a8863c6ee2191d8b0c (patch)
tree35d39e43d20aca160b96d8a85ddc2b80e4646f67 /epan/epan.h
parentf881e13932e0ba390c26cce15d1334b2154a8062 (diff)
downloadwireshark-83ec54675c19f25cfbb2e8a8863c6ee2191d8b0c.tar.gz
First step in moving core Ethereal routines to libepan.
svn path=/trunk/; revision=2458
Diffstat (limited to 'epan/epan.h')
-rw-r--r--epan/epan.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/epan/epan.h b/epan/epan.h
new file mode 100644
index 0000000000..87463449ea
--- /dev/null
+++ b/epan/epan.h
@@ -0,0 +1,49 @@
+/* epan.h
+ *
+ * Ethereal Protocol Analyzer Library
+ *
+ */
+
+#ifndef EPAN_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
+ * packet trace file. The reaons epan_t exists is that some packets in
+ * some protocols cannot be decoded without knowledge of previous packets.
+ * This inter-packet "state" is stored in the epan_t.
+ */
+typedef struct epan_session epan_t;
+
+
+epan_t*
+epan_new(void);
+
+void
+epan_free(epan_t*);
+
+
+
+
+/* Dissection of a single byte array. Holds tvbuff info as
+ * well as proto_tree info. As long as the epan_dissect_t for a byte
+ * array is in existence, you must not free or move that byte array,
+ * as the structures that the epan_dissect_t contains might have pointers
+ * to addresses in your byte array.
+ */
+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);
+
+void
+epan_dissect_free(epan_t*, epan_dissect_t*);
+
+#endif /* EPAN_H */