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
76Ref2 for further edits - delete when done
77 \section Introduction
78
79 This document describes the data structures and the functions exported by the CACE Technologies AirPcap library.
80 The AirPcap library provides low-level access to the AirPcap driver including advanced capabilities such as channel setting,
81 link type control and WEP configuration.<br>
82 This manual includes the following sections:
83
84 \note throughout this documentation, \e device refers to a physical USB AirPcap device, while \e adapter is an open API
85 instance. Most of the AirPcap API operations are adapter-specific but some of them, like setting the channel, are
86 per-device and will be reflected on all the open adapters. These functions will have "Device" in their name, e.g.
87 AirpcapSetDeviceChannel().
88
89 \b Sections:
90
91 - \ref airpcapfuncs
92 - \ref airpcapdefs
93 - \ref radiotap
94*/
95
103WS_DLL_PUBLIC
104bool epan_init(register_cb cb, void *client_data, bool load_plugins);
105
109WS_DLL_PUBLIC
111
113WS_DLL_PUBLIC
114void epan_cleanup(void);
115
116typedef struct {
117 void (*init)(void); /* Called before proto_init() */
118 void (*post_init)(void); /* Called at the end of epan_init() */
119 void (*dissect_init)(epan_dissect_t *);
120 void (*dissect_cleanup)(epan_dissect_t *);
121 void (*cleanup)(void);
122 void (*register_all_protocols)(register_cb, void *);
123 void (*register_all_handoffs)(register_cb, void *);
124 void (*register_all_tap_listeners)(void);
126
127WS_DLL_PUBLIC void epan_register_plugin(const epan_plugin *plugin);
128
134WS_DLL_PUBLIC int epan_plugins_supported(void);
135
142void epan_conversation_init(void);
143
151typedef struct epan_session epan_t;
152
153WS_DLL_PUBLIC epan_t *epan_new(struct packet_provider_data *prov,
154 const struct packet_provider_funcs *funcs);
155
156WS_DLL_PUBLIC wtap_block_t epan_get_modified_block(const epan_t *session, const frame_data *fd);
157
158WS_DLL_PUBLIC const char *epan_get_interface_name(const epan_t *session, uint32_t interface_id, unsigned section_number);
159
160WS_DLL_PUBLIC const char *epan_get_interface_description(const epan_t *session, uint32_t interface_id, unsigned section_number);
161
162const nstime_t *epan_get_frame_ts(const epan_t *session, uint32_t frame_num);
163
164WS_DLL_PUBLIC void epan_free(epan_t *session);
165
166WS_DLL_PUBLIC const char*
167epan_get_version(void);
168
169WS_DLL_PUBLIC void epan_get_version_number(int *major, int *minor, int *micro);
170
181WS_DLL_PUBLIC
182void epan_set_always_visible(bool force);
183
185WS_DLL_PUBLIC
186void
187epan_dissect_init(epan_dissect_t *edt, epan_t *session, const bool create_proto_tree, const bool proto_tree_visible);
188
192WS_DLL_PUBLIC
194epan_dissect_new(epan_t *session, const bool create_proto_tree, const bool proto_tree_visible);
195
196WS_DLL_PUBLIC
197void
198epan_dissect_reset(epan_dissect_t *edt);
199
201WS_DLL_PUBLIC
202void
203epan_dissect_fake_protocols(epan_dissect_t *edt, const bool fake_protocols);
204
206WS_DLL_PUBLIC
207void
208epan_dissect_run(epan_dissect_t *edt, int file_type_subtype,
209 wtap_rec *rec, tvbuff_t *tvb, frame_data *fd,
210 struct epan_column_info *cinfo);
211
212WS_DLL_PUBLIC
213void
214epan_dissect_run_with_taps(epan_dissect_t *edt, int file_type_subtype,
215 wtap_rec *rec, tvbuff_t *tvb, frame_data *fd,
216 struct epan_column_info *cinfo);
217
219WS_DLL_PUBLIC
220void
222 tvbuff_t *tvb, frame_data *fd, struct epan_column_info *cinfo);
223
224WS_DLL_PUBLIC
225void
226epan_dissect_file_run_with_taps(epan_dissect_t *edt, wtap_rec *rec,
227 tvbuff_t *tvb, frame_data *fd, struct epan_column_info *cinfo);
228
230WS_DLL_PUBLIC
231void
233
235WS_DLL_PUBLIC
236void
238
240WS_DLL_PUBLIC
241void
243
245WS_DLL_PUBLIC
246void
248
250WS_DLL_PUBLIC
251void
252epan_dissect_fill_in_columns(epan_dissect_t *edt, const bool fill_col_exprs, const bool fill_fd_colums);
253
255WS_DLL_PUBLIC
256bool
258 const char *field_name);
259
261WS_DLL_PUBLIC
262void
264
266WS_DLL_PUBLIC
267void
269
271const char *
272epan_custom_set(epan_dissect_t *edt, GSList *ids, int occurrence, bool display_details,
273 char *result, char *expr, const int size);
274
278WS_DLL_PUBLIC
279void
280epan_gather_compile_info(feature_list l);
281
285WS_DLL_PUBLIC
286void
287epan_gather_runtime_info(feature_list l);
288
289#ifdef __cplusplus
290}
291#endif /* __cplusplus */
292
293#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, tvbuff_t *tvb, 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, tvbuff_t *tvb, 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:919
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:161
Definition plugins.c:29
Definition column-info.h:62
Definition dfilter-int.h:35
Definition epan_dissect.h:28
Definition epan.h:116
Definition epan.c:467
Definition nstime.h:26
Definition cfile.h:58
Definition epan.h:47
Definition tvbuff-int.h:35
Definition wtap_opttypes.c:85
Definition wtap.h:1432