3a3197f5403cdb80801be3285307b37d0e99e08c
[obnox/wireshark/wip.git] / epan / epan.h
1 /* epan.h
2  *
3  * $Id: epan.h,v 1.12 2001/12/18 19:09:03 gram Exp $
4  *
5  * Ethereal Protocol Analyzer Library
6  *
7  * Copyright (c) 2001 by Gerald Combs <gerald@ethereal.com>
8  * 
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  * 
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  * 
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22  *
23  */
24
25 #ifndef EPAN_H
26 #define EPAN_H
27
28 #include <glib.h>
29 #include "frame_data.h"
30 #include "column_info.h"
31
32 typedef struct _epan_dissect_t epan_dissect_t;
33
34 #include "dfilter/dfilter.h"
35
36 void epan_init(const char * plugindir, void (register_all_protocols)(void),
37                void (register_all_handoffs)(void));
38 void epan_cleanup(void);
39 void epan_conversation_init(void);
40
41
42
43 /* A client will create one epan_t for an entire dissection session.
44  * A single epan_t will be used to analyze the entire sequence of packets,
45  * sequentially, in a single session. A session corresponds to a single
46  * packet trace file. The reaons epan_t exists is that some packets in
47  * some protocols cannot be decoded without knowledge of previous packets.
48  * This inter-packet "state" is stored in the epan_t.
49  */
50 typedef struct epan_session epan_t;
51
52 epan_t*
53 epan_new(void);
54
55 void
56 epan_free(epan_t*);
57
58
59 epan_dissect_t*
60 epan_dissect_new(gboolean create_proto_tree, gboolean proto_tree_visible);
61
62 void
63 epan_dissect_run(epan_dissect_t *edt, void* pseudo_header,
64         const guint8* data, frame_data *fd, column_info *cinfo);
65
66 void
67 epan_dissect_prime_dfilter(epan_dissect_t *edt, dfilter_t*);
68
69 void
70 epan_dissect_fill_in_columns(epan_dissect_t *edt);
71
72 void
73 epan_dissect_free(epan_dissect_t* edt);
74
75 #endif /* EPAN_H */