aboutsummaryrefslogtreecommitdiffstats
path: root/caputils/capture_ifinfo.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-08-12 20:32:01 -0700
committerGuy Harris <guy@alum.mit.edu>2018-08-13 04:37:00 +0000
commit149e74b70d207228802a463214271c9e537476c9 (patch)
tree1deea5228d89492b4950735b99159bde6eba90b2 /caputils/capture_ifinfo.h
parentd48262753eecd46a5ba0fc13bbc8c336fa16c207 (diff)
Put the interface descrptions into the IDB when capturing to pcapng.
capture_opts_add_iface_opt(), when called in a program acting as a capture child, will fetch the description for the interface, and will also generate a "display name" for the interface. In the process, we clean up capture_opts_add_iface_opt() a bit, combining duplicate code. We rename console_display_name to just display_name, as it may also be used in the title bar of Wireshark when capturing. Change-Id: Ifd18955bb3cb41df4c0ed4362d4854068c825b96 Reviewed-on: https://code.wireshark.org/review/29117 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'caputils/capture_ifinfo.h')
-rw-r--r--caputils/capture_ifinfo.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/caputils/capture_ifinfo.h b/caputils/capture_ifinfo.h
index 7ee447aa5c..171561d16c 100644
--- a/caputils/capture_ifinfo.h
+++ b/caputils/capture_ifinfo.h
@@ -75,6 +75,17 @@ extern GList *capture_interface_list(int *err, char **err_str, void (*update_cb)
void free_interface_list(GList *if_list);
+/**
+ * Get an if_info_t for a particular interface.
+ * (May require privilege, so should only be used by dumpcap.)
+ */
+extern if_info_t *if_info_get(const char *name);
+
+/**
+ * Free an if_info_t.
+ */
+void if_info_free(if_info_t *if_info);
+
/*
* "get_if_capabilities()" and "capture_if_capabilities()" return a pointer
* to an allocated instance of this structure. "free_if_capabilities()"