diff options
author | Guy Harris <gharris@sonic.net> | 2021-04-13 23:14:09 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-04-13 23:14:09 -0700 |
commit | fcb56bd1d46eebfa8e7e34cf548fb4718ca5a207 (patch) | |
tree | 7dbc7199dbdf5b9e91ecb215cc2f762faa8bb1ff /capture_opts.h | |
parent | d6c3781a7a43404a740f1fcce836c1c93888c719 (diff) |
Clean up printing of interface information.
In dumpcap, if we're being run by TShark or Wireshark, if there are no
link-layer types, just provide an empty list to our caller; let them
construct an empty list of link-layer types when they read our output.
In the code that reads that list, don't report an error if the list is
empty, rely on the caller to do so.
Have capture_opts_print_if_capabilities() do more work, moving some
functions from its callers to it.
Diffstat (limited to 'capture_opts.h')
-rw-r--r-- | capture_opts.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/capture_opts.h b/capture_opts.h index 9746f2b974..c815c53586 100644 --- a/capture_opts.h +++ b/capture_opts.h @@ -341,14 +341,15 @@ extern void capture_opts_log(const char *log_domain, GLogLevelFlags log_level, capture_options *capture_opts); enum caps_query { - CAPS_MONITOR_MODE = 0x1, - CAPS_QUERY_LINK_TYPES = 0x2, - CAPS_QUERY_TIMESTAMP_TYPES = 0x4 + CAPS_QUERY_LINK_TYPES = 0x1, + CAPS_QUERY_TIMESTAMP_TYPES = 0x2 }; /* print interface capabilities, including link layer types */ -extern void -capture_opts_print_if_capabilities(if_capabilities_t *caps, char *name, int queries); +extern int +capture_opts_print_if_capabilities(if_capabilities_t *caps, + interface_options *interface_opts, + int queries); /* print list of interfaces */ extern void |