aboutsummaryrefslogtreecommitdiffstats
path: root/capture
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-04-13 23:14:09 -0700
committerGuy Harris <gharris@sonic.net>2021-04-13 23:14:09 -0700
commitfcb56bd1d46eebfa8e7e34cf548fb4718ca5a207 (patch)
tree7dbc7199dbdf5b9e91ecb215cc2f762faa8bb1ff /capture
parentd6c3781a7a43404a740f1fcce836c1c93888c719 (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')
-rw-r--r--capture/capture_ifinfo.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/capture/capture_ifinfo.c b/capture/capture_ifinfo.c
index d8f2d33bc9..396d0733cf 100644
--- a/capture/capture_ifinfo.c
+++ b/capture/capture_ifinfo.c
@@ -322,15 +322,6 @@ capture_get_if_capabilities(const gchar *ifname, gboolean monitor_mode,
g_strfreev(raw_list);
- /* Check to see if we built a list */
- if (linktype_list == NULL) {
- /* No. */
- if (err_primary_msg)
- *err_primary_msg = g_strdup("Dumpcap returned no link-layer types");
- g_free(caps);
- return NULL;
- }
-
caps->data_link_types = linktype_list;
/* Might be NULL. Not all systems report timestamp types */
caps->timestamp_types = timestamp_list;