diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
commit | 9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch) | |
tree | 2784370cda9bbf2da9114d70f05399c0b229d28c /capture/capture_ifinfo.h | |
parent | Adding debian version 4.2.6-1. (diff) | |
download | wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'capture/capture_ifinfo.h')
-rw-r--r-- | capture/capture_ifinfo.h | 57 |
1 files changed, 49 insertions, 8 deletions
diff --git a/capture/capture_ifinfo.h b/capture/capture_ifinfo.h index 97df2363..021e1913 100644 --- a/capture/capture_ifinfo.h +++ b/capture/capture_ifinfo.h @@ -36,6 +36,21 @@ typedef enum { } interface_type; /* + * "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 { + bool can_set_rfmon; /* true if can be put into monitor mode */ + GList *data_link_types; /* GList of data_link_info_t's */ + GList *data_link_types_rfmon; /* GList of data_link_info_t's */ + GList *timestamp_types; /* GList of timestamp_info_t's */ + int status; + char *primary_msg; /* If non-NULL, the query failed, and a message explaining why */ + const char *secondary_msg; /* An optional supplementary message */ +} if_capabilities_t; + +/* * The list of interfaces returned by "get_interface_list()" is * a list of these structures. */ @@ -51,6 +66,7 @@ typedef struct { interface_type type; /* type of interface */ bool loopback; /* true if loopback, false otherwise */ char *extcap; /* extcap arguments, which present the data to call the extcap interface */ + if_capabilities_t *caps; } if_info_t; /* @@ -69,6 +85,8 @@ typedef struct { } addr; } if_addr_t; +extern GList *deserialize_interface_list(char *data, int *err, char **err_str); + /** * Return the list of interfaces. * @@ -84,6 +102,11 @@ extern GList *capture_interface_list(int *err, char **err_str, void (*update_cb) void free_interface_list(GList *if_list); /** + * Deep copy an interface list + */ +GList * interface_list_copy(GList *if_list); + +/** * Get an if_info_t for a particular interface. * (May require privilege, so should only be used by dumpcap.) */ @@ -94,16 +117,22 @@ extern if_info_t *if_info_get(const char *name); */ 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()" - * frees the returned instance. +/** + * Deep copy an if_info_t. + */ +if_info_t *if_info_copy(const if_info_t *if_info); + +/** + * Deep copy an if_addr_t. */ +if_addr_t *if_addr_copy(const if_addr_t *if_addr); + typedef struct { - bool can_set_rfmon; /* true if can be put into monitor mode */ - GList *data_link_types; /* GList of data_link_info_t's */ - GList *timestamp_types; /* GList of timestamp_info_t's */ -} if_capabilities_t; + const char *name; + bool monitor_mode; + const char *auth_username; + const char *auth_password; +} if_cap_query_t; /* * Information about data link types. @@ -131,10 +160,22 @@ capture_get_if_capabilities(const char *devname, bool monitor_mode, char **err_primary_msg, char **err_secondary_msg, void (*update_cb)(void)); +/** + * Fetch the linktype list for the specified interface from a child process. + */ +extern GHashTable * +capture_get_if_list_capabilities(GList *if_cap_queries, + char **err_primary_msg, char **err_secondary_msg, + void (*update_cb)(void)); + void free_if_capabilities(if_capabilities_t *caps); +#ifdef HAVE_PCAP_REMOTE void add_interface_to_remote_list(if_info_t *if_info); +GList* append_remote_list(GList *iflist); +#endif + #ifdef __cplusplus } #endif /* __cplusplus */ |