summaryrefslogtreecommitdiff
path: root/capture_ifinfo.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-05-13 17:37:39 +0000
committerGuy Harris <guy@alum.mit.edu>2010-05-13 17:37:39 +0000
commit1c18115bd3e8a0b1a56ab8effcf5843240bde0c6 (patch)
tree29698446c6b8deeebed235c4337365c42d7d3f4a /capture_ifinfo.h
parent951485bf355f1e9269bf62803190931618d7a047 (diff)
downloadwireshark-1c18115bd3e8a0b1a56ab8effcf5843240bde0c6.tar.gz
Fetch an indication of whether the interface supports capturing in
monitor mode at the same time that we fetch its list of link-layer types. Support fetching that list in monitor mode, as the list may be different in regular and monitor mode. If the interface supports monitor mode, when printing the list of link-layer types, indicate whether they're fetched in monitor mode or not, as tcpdump 4.1.x does. svn path=/trunk/; revision=32789
Diffstat (limited to 'capture_ifinfo.h')
-rw-r--r--capture_ifinfo.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/capture_ifinfo.h b/capture_ifinfo.h
index 28ebb5c701..e0cec1db7f 100644
--- a/capture_ifinfo.h
+++ b/capture_ifinfo.h
@@ -67,8 +67,17 @@ extern GList *capture_interface_list(int *err, char **err_str);
void free_interface_list(GList *if_list);
/*
- * The list of data link types returned by "get_pcap_linktype_list()" and
- * "capture_pcap_linktype_list()" is a list of these structures.
+ * "get_if_capabilities()" and "capture_if_capabilities()" return a pointer
+ * to an allocated instance of this structure. "free_if_capabilities()"
+ * frees the returned instance.
+ */
+typedef struct {
+ gboolean can_set_rfmon; /* TRUE if can be put into monitor mode */
+ GList *data_link_types; /* GList of data_link_info_t's */
+} if_capabilities_t;
+
+/*
+ * Information about data link types.
*/
typedef struct {
int dlt; /* e.g. DLT_EN10MB (which is 1) */
@@ -79,9 +88,11 @@ typedef struct {
/**
* Fetch the linktype list for the specified interface from a child process.
*/
-extern GList *capture_pcap_linktype_list(const char *devname, char **err_str);
+extern if_capabilities_t *
+capture_get_if_capabilities(const char *devname, gboolean monitor_mode,
+ char **err_str);
-void free_pcap_linktype_list(GList *linktype_list);
+void free_if_capabilities(if_capabilities_t *caps);
#endif /* HAVE_LIBPCAP */