2000-09-27 04:55:05 +00:00
|
|
|
/* epan.h
|
Give libethereal its own configuration file, and have that configuration
file, rather than the top-level Ethereal configuration file, check for
"inet_aton()", "inet_pton()", and "inet_ntop()". Then make its
Makefile.am include the appropriate object files if necessary.
Otherwise, they don't get built and put into libethereal, and therefore
attempts to link with anything in libethereal that uses them fail on
platforms that lack ethem, causing the build to fail.
That means a bunch of things need to be fixed to cope with libethereal
having its own "config.h" file; this means removing the include of
"config.h" from some libethereal header files. Move the definitions of
the path names used only by "resolv.c" to "resolv.c" from "resolv.h" (so
"resolv.h" doesn't need "config.h", define HAVE_PLUGINS in the configure
script (so we don't have to include it in "plugins.h" to check whether
HAVE_DLFCN_H is defined).
Unfortunately, stuff outside libethereal needs to know PLUGIN_DIR; for
now, define that in the top-level configuration file, and have Ethereal
and Tethereal pass it as an argument to "epan_init()" - that should be
cleaned up at some point.
Remove from the top-level configure script checks for things used only
in libethereal.
svn path=/trunk/; revision=2498
2000-10-16 23:18:05 +00:00
|
|
|
*
|
2001-10-21 21:48:00 +00:00
|
|
|
* $Id: epan.h,v 1.7 2001/10/21 21:47:58 guy Exp $
|
2000-09-27 04:55:05 +00:00
|
|
|
*
|
|
|
|
* Ethereal Protocol Analyzer Library
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef EPAN_H
|
2000-10-06 10:11:40 +00:00
|
|
|
#define EPAN_H
|
2000-09-27 04:55:05 +00:00
|
|
|
|
2000-09-28 03:16:29 +00:00
|
|
|
#include <glib.h>
|
2000-10-06 10:11:40 +00:00
|
|
|
|
|
|
|
/* XXX - for now */
|
|
|
|
#include "packet.h"
|
|
|
|
|
2001-04-02 00:38:36 +00:00
|
|
|
void epan_init(const char * plugindir, void (register_all_protocols)(void),
|
|
|
|
void (register_all_handoffs)(void));
|
2000-09-27 04:55:05 +00:00
|
|
|
void epan_cleanup(void);
|
|
|
|
void epan_conversation_init(void);
|
|
|
|
|
2000-10-06 10:11:40 +00:00
|
|
|
|
|
|
|
|
2000-09-27 04:55:05 +00:00
|
|
|
/* 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.
|
|
|
|
*/
|
2001-02-01 20:21:25 +00:00
|
|
|
typedef struct {
|
|
|
|
tvbuff_t *tvb;
|
|
|
|
proto_tree *tree;
|
|
|
|
} epan_dissect_t;
|
2000-09-27 04:55:05 +00:00
|
|
|
|
|
|
|
epan_dissect_t*
|
2000-10-06 10:11:40 +00:00
|
|
|
epan_dissect_new(void* pseudo_header, const guint8* data, frame_data *fd, proto_tree *tree);
|
2000-09-27 04:55:05 +00:00
|
|
|
|
|
|
|
void
|
2000-10-06 10:11:40 +00:00
|
|
|
epan_dissect_free(epan_dissect_t* edt);
|
|
|
|
|
2000-09-27 04:55:05 +00:00
|
|
|
#endif /* EPAN_H */
|