3 * $Id: epan.c,v 1.6 2001/02/01 20:21:16 gram Exp $
5 * Ethereal Protocol Analyzer Library
16 #include "conversation.h"
17 #include "dfilter/dfilter.h"
24 * XXX - this takes the plugin directory as an argument, because
25 * libethereal now has its own configure script and "config.h" file,
26 * which is what code in the "epan" directory includes, but we need
27 * to define PLUGIN_DIR in the top-level directory, as it's used by,
28 * for example, the Makefile for the Gryphon plugin, so it knows
29 * where to install the plugin.
31 * Eventually, we should probably have an "epan-configure" script
32 * (or "libethereal-configure", or whatever), along the lines of what
33 * GTK+ and GLib have, that can print, among other things, the directory
34 * into which plugins should be installed. That way, only libethereal
35 * need know what directory that is; programs using it won't, *and*
36 * Makefiles for plugins can just use "epan-configure" to figure out
37 * where to install the plugins.
39 * (Would that *more* libraries had configure scripts like that, so
40 * that configure scripts didn't have to go through various contortions
41 * to figure out where the header files and libraries for various
42 * libraries are located.)
45 epan_init(const char *plugin_dir)
50 proto_init(plugin_dir);
66 epan_conversation_init(void)
74 epan_dissect_new(void* pseudo_header, const guint8* data, frame_data *fd, proto_tree *tree)
78 edt = g_new(epan_dissect_t, 1);
83 dissect_packet(&edt->tvb, pseudo_header, data, fd, tree);
90 epan_dissect_free(epan_dissect_t* edt)
92 /* Free all tvb's created from this tvb, unless dissector
93 * wanted to store the pointer (in which case, the dissector
94 * would have incremented the usage count on that tvbuff_t*) */
95 tvb_free_chain(edt->tvb);