Wireshark  4.3.0
The Wireshark network protocol analyzer
/builds/wireshark/wireshark/sharkd.h
Go to the documentation of this file.
1 
12 #ifndef __SHARKD_H
13 #define __SHARKD_H
14 
15 #include <file.h>
16 #include <wiretap/wtap_opttypes.h>
17 
18 #define SHARKD_DISSECT_FLAG_NULL 0x00u
19 #define SHARKD_DISSECT_FLAG_BYTES 0x01u
20 #define SHARKD_DISSECT_FLAG_COLUMNS 0x02u
21 #define SHARKD_DISSECT_FLAG_PROTO_TREE 0x04u
22 #define SHARKD_DISSECT_FLAG_COLOR 0x08u
23 
24 #define SHARKD_MODE_CLASSIC_CONSOLE 1
25 #define SHARKD_MODE_CLASSIC_DAEMON 2
26 #define SHARKD_MODE_GOLD_CONSOLE 3
27 #define SHARKD_MODE_GOLD_DAEMON 4
28 
29 typedef void (*sharkd_dissect_func_t)(epan_dissect_t *edt, proto_tree *tree, struct epan_column_info *cinfo, const GSList *data_src, void *data);
30 
31 /* sharkd.c */
32 cf_status_t sharkd_cf_open(const char *fname, unsigned int type, gboolean is_tempfile, int *err);
33 int sharkd_load_cap_file(void);
34 int sharkd_retap(void);
35 int sharkd_filter(const char *dftext, guint8 **result);
36 frame_data *sharkd_get_frame(guint32 framenum);
37 enum dissect_request_status {
38  DISSECT_REQUEST_SUCCESS,
39  DISSECT_REQUEST_NO_SUCH_FRAME,
40  DISSECT_REQUEST_READ_ERROR
41 };
42 enum dissect_request_status
43 sharkd_dissect_request(guint32 framenum, guint32 frame_ref_num,
44  guint32 prev_dis_num, wtap_rec *rec, Buffer *buf,
45  column_info *cinfo, guint32 dissect_flags,
46  sharkd_dissect_func_t cb, void *data,
47  int *err, gchar **err_info);
48 wtap_block_t sharkd_get_modified_block(const frame_data *fd);
49 wtap_block_t sharkd_get_packet_block(const frame_data *fd);
50 int sharkd_set_modified_block(frame_data *fd, wtap_block_t new_block);
51 const char *sharkd_version(void);
52 
53 /* sharkd_daemon.c */
54 int sharkd_init(int argc, char **argv);
55 int sharkd_loop(int argc _U_, char* argv[] _U_);
56 
57 /* sharkd_session.c */
58 int sharkd_session_main(int mode_setting);
59 
60 #endif /* __SHARKD_H */
61 
62 /*
63  * Editor modelines - https://www.wireshark.org/tools/modelines.html
64  *
65  * Local variables:
66  * c-basic-offset: 8
67  * tab-width: 8
68  * indent-tabs-mode: t
69  * End:
70  *
71  * vi: set shiftwidth=8 tabstop=8 noexpandtab:
72  * :indentSize=8:tabSize=8:noTabs=false:
73  */
cf_status_t
Definition: file.h:26
Definition: proto.h:904
Definition: buffer.h:22
Definition: column-info.h:63
Definition: epan_dissect.h:28
Definition: wtap_opttypes.c:85
Definition: wtap.h:1431