Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
epan.h
Go to the documentation of this file.
1
10#ifndef __EPAN_H__
11#define __EPAN_H__
12
13#include <wsutil/feature_list.h>
14#include <epan/tvbuff.h>
15#include <epan/prefs.h>
16#include <epan/frame_data.h>
17#include <epan/register.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
28extern bool wireshark_abort_on_too_many_items;
29
30typedef struct epan_dissect epan_dissect_t;
31
32struct epan_dfilter;
33struct epan_column_info;
34
42
48 const nstime_t *(*get_frame_ts)(struct packet_provider_data *prov, uint32_t frame_num);
49 const char *(*get_interface_name)(struct packet_provider_data *prov, uint32_t interface_id, unsigned section_number);
50 const char *(*get_interface_description)(struct packet_provider_data *prov, uint32_t interface_id, unsigned section_number);
51 wtap_block_t (*get_modified_block)(struct packet_provider_data *prov, const frame_data *fd);
52};
53
61/*
62Ref 1
63Epan
64Enhanced Packet ANalyzer, aka the packet analyzing engine. Source code can be found in the epan directory.
65
66Protocol-Tree - Keep data of the capture file protocol information.
67
68Dissectors - The various protocol dissectors in epan/dissectors.
69
70Plugins - Some of the protocol dissectors are implemented as plugins. Source code can be found at plugins.
71
72Display-Filters - the display filter engine at epan/dfilter
73
74*/
75
83WS_DLL_PUBLIC
84bool epan_init(register_cb cb, void *client_data, bool load_plugins);
85
89WS_DLL_PUBLIC
91
93WS_DLL_PUBLIC
94void epan_cleanup(void);
95
96typedef struct {
97 void (*init)(void); /* Called before proto_init() */
98 void (*post_init)(void); /* Called at the end of epan_init() */
99 void (*dissect_init)(epan_dissect_t *);
100 void (*dissect_cleanup)(epan_dissect_t *);
101 void (*cleanup)(void);
102 void (*register_all_protocols)(register_cb, void *);
103 void (*register_all_handoffs)(register_cb, void *);
104 void (*register_all_tap_listeners)(void);
106
107WS_DLL_PUBLIC void epan_register_plugin(const epan_plugin *plugin);
108
114WS_DLL_PUBLIC int epan_plugins_supported(void);
115
122void epan_conversation_init(void);
123
131typedef struct epan_session epan_t;
132
133WS_DLL_PUBLIC epan_t *epan_new(struct packet_provider_data *prov,
134 const struct packet_provider_funcs *funcs);
135
136WS_DLL_PUBLIC wtap_block_t epan_get_modified_block(const epan_t *session, const frame_data *fd);
137
138WS_DLL_PUBLIC const char *epan_get_interface_name(const epan_t *session, uint32_t interface_id, unsigned section_number);
139
140WS_DLL_PUBLIC const char *epan_get_interface_description(const epan_t *session, uint32_t interface_id, unsigned section_number);
141
142const nstime_t *epan_get_frame_ts(const epan_t *session, uint32_t frame_num);
143
144WS_DLL_PUBLIC void epan_free(epan_t *session);
145
146WS_DLL_PUBLIC const char*
147epan_get_version(void);
148
149WS_DLL_PUBLIC void epan_get_version_number(int *major, int *minor, int *micro);
150
161WS_DLL_PUBLIC
162void epan_set_always_visible(bool force);
163
165WS_DLL_PUBLIC
166void
167epan_dissect_init(epan_dissect_t *edt, epan_t *session, const bool create_proto_tree, const bool proto_tree_visible);
168
172WS_DLL_PUBLIC
174epan_dissect_new(epan_t *session, const bool create_proto_tree, const bool proto_tree_visible);
175
176WS_DLL_PUBLIC
177void
178epan_dissect_reset(epan_dissect_t *edt);
179
181WS_DLL_PUBLIC
182void
183epan_dissect_fake_protocols(epan_dissect_t *edt, const bool fake_protocols);
184
186WS_DLL_PUBLIC
187void
188epan_dissect_run(epan_dissect_t *edt, int file_type_subtype,
189 wtap_rec *rec, const uint8_t *data, frame_data *fd,
190 struct epan_column_info *cinfo);
191
192WS_DLL_PUBLIC
193void
194epan_dissect_run_with_taps(epan_dissect_t *edt, int file_type_subtype,
195 wtap_rec *rec, const uint8_t *data, frame_data *fd,
196 struct epan_column_info *cinfo);
197
199WS_DLL_PUBLIC
200void
202 const uint8_t *data, frame_data *fd, struct epan_column_info *cinfo);
203
204WS_DLL_PUBLIC
205void
206epan_dissect_file_run_with_taps(epan_dissect_t *edt, wtap_rec *rec,
207 const uint8_t *data, frame_data *fd, struct epan_column_info *cinfo);
208
210WS_DLL_PUBLIC
211void
213
215WS_DLL_PUBLIC
216void
218
220WS_DLL_PUBLIC
221void
223
225WS_DLL_PUBLIC
226void
228
230WS_DLL_PUBLIC
231void
232epan_dissect_fill_in_columns(epan_dissect_t *edt, const bool fill_col_exprs, const bool fill_fd_colums);
233
235WS_DLL_PUBLIC
236bool
238 const char *field_name);
239
241WS_DLL_PUBLIC
242void
244
246WS_DLL_PUBLIC
247void
249
251const char *
252epan_custom_set(epan_dissect_t *edt, GSList *ids, int occurrence, bool display_details,
253 char *result, char *expr, const int size);
254
258WS_DLL_PUBLIC
259void
260epan_gather_compile_info(feature_list l);
261
265WS_DLL_PUBLIC
266void
267epan_gather_runtime_info(feature_list l);
268
269#ifdef __cplusplus
270}
271#endif /* __cplusplus */
272
273#endif /* __EPAN_H__ */
WS_DLL_PUBLIC void epan_dissect_init(epan_dissect_t *edt, epan_t *session, const bool create_proto_tree, const bool proto_tree_visible)
Definition epan.c:563
WS_DLL_PUBLIC void epan_dissect_fake_protocols(epan_dissect_t *edt, const bool fake_protocols)
Definition epan.c:634
void epan_conversation_init(void)
Definition epan.c:542
bool wireshark_abort_on_dissector_bug
Definition epan.c:118
WS_DLL_PUBLIC void epan_gather_compile_info(feature_list l)
Definition epan.c:811
WS_DLL_PUBLIC void epan_dissect_cleanup(epan_dissect_t *edt)
Definition epan.c:705
WS_DLL_PUBLIC e_prefs * epan_load_settings(void)
Definition epan.c:374
WS_DLL_PUBLIC void epan_dissect_prime_with_hfid(epan_dissect_t *edt, int hfid)
Definition epan.c:754
WS_DLL_PUBLIC bool epan_init(register_cb cb, void *client_data, bool load_plugins)
Definition epan.c:243
WS_DLL_PUBLIC int epan_plugins_supported(void)
Definition epan.c:226
WS_DLL_PUBLIC void epan_dissect_run(epan_dissect_t *edt, int file_type_subtype, wtap_rec *rec, const uint8_t *data, frame_data *fd, struct epan_column_info *cinfo)
Definition epan.c:641
WS_DLL_PUBLIC void epan_cleanup(void)
Definition epan.c:393
WS_DLL_PUBLIC void epan_dissect_free(epan_dissect_t *edt)
Definition epan.c:735
WS_DLL_PUBLIC void epan_dissect_fill_in_columns(epan_dissect_t *edt, const bool fill_col_exprs, const bool fill_fd_colums)
Definition epan.c:782
WS_DLL_PUBLIC bool epan_dissect_packet_contains_field(epan_dissect_t *edt, const char *field_name)
Definition epan.c:789
WS_DLL_PUBLIC void epan_dissect_prime_with_dfilter(epan_dissect_t *edt, const struct epan_dfilter *dfcode)
WS_DLL_PUBLIC void epan_dissect_file_run(epan_dissect_t *edt, wtap_rec *rec, const uint8_t *data, frame_data *fd, struct epan_column_info *cinfo)
Definition epan.c:674
WS_DLL_PUBLIC void epan_gather_runtime_info(feature_list l)
Definition epan.c:923
WS_DLL_PUBLIC void epan_dissect_prime_with_hfid_array(epan_dissect_t *edt, GArray *hfids)
Definition epan.c:760
WS_DLL_PUBLIC epan_dissect_t * epan_dissect_new(epan_t *session, const bool create_proto_tree, const bool proto_tree_visible)
Definition epan.c:623
WS_DLL_PUBLIC void epan_dissect_prime_with_dfilter_print(epan_dissect_t *edt, const struct epan_dfilter *dfcode)
WS_DLL_PUBLIC void epan_set_always_visible(bool force)
Definition epan.c:554
const char * epan_custom_set(epan_dissect_t *edt, GSList *ids, int occurrence, bool display_details, char *result, char *expr, const int size)
Definition epan.c:772
void register_all_protocols(register_cb cb, void *client_data)
Definition register.c:65
Definition prefs.h:165
Definition plugins.c:29
Definition column-info.h:62
Definition dfilter-int.h:35
Definition epan_dissect.h:28
Definition epan.h:96
Definition epan.c:467
Definition nstime.h:26
Definition cfile.h:58
Definition epan.h:47
Definition wtap_opttypes.c:85
Definition wtap.h:1432