summaryrefslogtreecommitdiff
path: root/packet-frame.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 /packet-frame.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 'packet-frame.h')
-rw-r--r--packet-frame.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/packet-frame.h b/packet-frame.h
new file mode 100644
index 0000000000..62ed6584a9
--- /dev/null
+++ b/packet-frame.h
@@ -0,0 +1,28 @@
+/* packet-frame.h
+ *
+ * Top-most dissector. Decides dissector based on Wiretap Encapsulation Type.
+ *
+ * $Id: packet-frame.h,v 1.1 2000/10/06 10:10:49 gram Exp $
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@zing.org>
+ * Copyright 2000 Gerald Combs
+ *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+void
+dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);