| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
/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
29typedef 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#define LONGOPT_FOREGROUND 4000
32
33/* sharkd.c */
34 cf_status_t sharkd_cf_open(const char *fname, unsigned int type, bool is_tempfile, int *err);
35int sharkd_load_cap_file(void);
36int sharkd_load_cap_file_with_limits(int max_packet_count, int64_t max_byte_count);
37int sharkd_retap(void);
38int sharkd_filter(const char *dftext, uint8_t **result);
39frame_data *sharkd_get_frame(uint32_t framenum);
40enum dissect_request_status {
41 DISSECT_REQUEST_SUCCESS,
42 DISSECT_REQUEST_NO_SUCH_FRAME,
43 DISSECT_REQUEST_READ_ERROR
44};
45enum dissect_request_status
46sharkd_dissect_request(uint32_t framenum, uint32_t frame_ref_num,
47 uint32_t prev_dis_num, wtap_rec *rec,
48 column_info *cinfo, uint32_t dissect_flags,
49 sharkd_dissect_func_t cb, void *data,
50 int *err, char **err_info);
51 wtap_block_t sharkd_get_modified_block(const frame_data *fd);
52 wtap_block_t sharkd_get_packet_block(const frame_data *fd);
53int sharkd_set_modified_block(frame_data *fd, wtap_block_t new_block);
54const char *sharkd_version(void);
55const struct ws_option* sharkd_long_options(void);
56const char* sharkd_optstring(void);
57
58
59/* sharkd_daemon.c */
60int sharkd_init(int argc, char **argv);
61int sharkd_loop(int argc _U_, char* argv[] _U_);
62
63/* sharkd_session.c */
64int sharkd_session_main(int mode_setting);
65
66#endif /* __SHARKD_H */
67
68/*
69 * Editor modelines - https://www.wireshark.org/tools/modelines.html
70 *
71 * Local variables:
72 * c-basic-offset: 8
73 * tab-width: 8
74 * indent-tabs-mode: t
75 * End:
76 *
77 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
78 * :indentSize=8:tabSize=8:noTabs=false:
79 */
file.h
cf_status_t
cf_status_t
Definition file.h:26
_proto_node
Definition proto.h:907
epan_column_info
Definition column-info.h:62
epan_dissect
Definition epan_dissect.h:28
ws_option
Structure representing a long-form command-line option.
Definition ws_getopt.h:64
wtap_block
Definition wtap_opttypes.h:272
wtap_rec
Definition wtap.h:1512
wtap_opttypes.h