diff options
author | Paul Offord <paul.offord58@gmail.com> | 2021-02-08 10:27:18 +0000 |
---|---|---|
committer | Wireshark GitLab Utility <6629907-ws-gitlab-utility@users.noreply.gitlab.com> | 2021-02-08 10:27:18 +0000 |
commit | 69df23fc40951556d2f9f303944f943547c31ac0 (patch) | |
tree | abd4a8e28cd934e79a706432ec5a313d16f888dd /sharkd.h | |
parent | 37bef583dac539dd66e50c9f34a46563928356d2 (diff) |
sharkd: Add configuration profile and other options
This change adds code to allow the selection of a configuration
profile during sharkd start by adding a -C command line option.
A new -a option has been added to specify the api service
endpoint e.g. tcp:127.0.0.1:4446
The change also adds version display (-v) and help display (-h) options.
These additions have been made in a way to ensure that the original
command line options still work correctly to maintain backward
compatibility.
The new options have been added using the getopt_long(...) function
that is used by tshark to simplify the addition of further command
line options.
Closes #17222
Diffstat (limited to 'sharkd.h')
-rw-r--r-- | sharkd.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -20,6 +20,11 @@ #define SHARKD_DISSECT_FLAG_PROTO_TREE 0x04u #define SHARKD_DISSECT_FLAG_COLOR 0x08u +#define SHARKD_MODE_CLASSIC_CONSOLE 1 +#define SHARKD_MODE_CLASSIC_DAEMON 2 +#define SHARKD_MODE_GOLD_CONSOLE 3 +#define SHARKD_MODE_GOLD_DAEMON 4 + typedef void (*sharkd_dissect_func_t)(epan_dissect_t *edt, proto_tree *tree, struct epan_column_info *cinfo, const GSList *data_src, void *data); /* sharkd.c */ @@ -36,10 +41,10 @@ const char *sharkd_version(void); /* sharkd_daemon.c */ int sharkd_init(int argc, char **argv); -int sharkd_loop(void); +int sharkd_loop(int argc _U_, char* argv[] _U_); /* sharkd_session.c */ -int sharkd_session_main(void); +int sharkd_session_main(int mode_setting); #endif /* __SHARKD_H */ |