Wireshark
2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
|
#include "capture_opts.h"
Go to the source code of this file.
Macros | |
#define | IFLIST_QUOTE_IF_DESCRIPTION 0x00000001 |
#define | IFLIST_SHOW_FILTER 0x00000002 |
Functions | |
char * | capture_dev_user_descr_find (const gchar *if_name) |
gint | capture_dev_user_linktype_find (const gchar *if_name) |
gboolean | capture_dev_user_snaplen_find (const gchar *if_name, gboolean *hassnap, int *snaplen) |
gboolean | capture_dev_user_pmode_find (const gchar *if_name, gboolean *pmode) |
gchar * | capture_dev_user_cfilter_find (const gchar *if_name) |
char * | get_interface_descriptive_name (const char *if_name) |
GList * | build_capture_combo_list (GList *if_list, gboolean do_hide) |
void | free_capture_combo_list (GList *combo_list) |
const char * | get_if_name (const char *if_text) |
const char * | get_iface_description_for_interface (capture_options *capture_opts, guint i) |
void | set_active_dlt (interface_t *device, int global_default_dlt) |
GString * | get_iface_list_string (capture_options *capture_opts, guint32 style) |
gchar * | get_iface_display_name (const gchar *description, const if_info_t *if_info) |
GList of available capture interfaces.
#define IFLIST_QUOTE_IF_DESCRIPTION 0x00000001 |
Get a descriptive string for a list of interfaces.
capture_opts | The capture_options structure that contains the interfaces |
style | flags to indicate the style of string to use: |
IFLIST_QUOTE_IF_DESCRIPTION: put the interface descriptive string in single quotes
IFLIST_SHOW_FILTER: include the capture filters in the string
GList* build_capture_combo_list | ( | GList * | if_list, |
gboolean | do_hide | ||
) |
Build the GList of available capture interfaces.
if_list | An interface list from capture_interface_list(). |
do_hide | Hide the "hidden" interfaces. |
gchar* capture_dev_user_cfilter_find | ( | const gchar * | if_name | ) |
Find user-specified capture filter that matches interface name, if any.
This is deprecated and should not be used in new code.
if_name | The name of the interface. |
char* capture_dev_user_descr_find | ( | const gchar * | if_name | ) |
Find user-specified capture device description that matches interface name, if any.
if_name | The name of the interface. |
gint capture_dev_user_linktype_find | ( | const gchar * | if_name | ) |
Find user-specified link-layer header type that matches interface name, if any.
if_name | The name of the interface. |
gboolean capture_dev_user_pmode_find | ( | const gchar * | if_name, |
gboolean * | pmode | ||
) |
Find user-specified promiscuous mode that matches interface name, if any.
if_name | The name of the interface. |
pmode | Pointer to a variable to be set to TRUE if promiscuous mode should be used and FALSE if it shouldn't be used. |
gboolean capture_dev_user_snaplen_find | ( | const gchar * | if_name, |
gboolean * | hassnap, | ||
int * | snaplen | ||
) |
Find user-specified snap length that matches interface name, if any.
if_name | The name of the interface. |
hassnap | Pointer to a variable to be set to TRUE if the interface should be given a snap length or FALSE if it shouldn't be given a snap length. |
snaplen | Pointer to a variable to be set to the snap length if the interface should be given a snap length or the maximum snap length if it shouldn't be given a snap length. |
void free_capture_combo_list | ( | GList * | combo_list | ) |
Free the GList from build_capture_combo_list().
combo_list | the interface list from build_capture_combo_list() |
const char* get_if_name | ( | const char * | if_text | ) |
Given text that contains an interface name possibly prefixed by an interface description, extract the interface name.
if_text | A string containing the interface description + name. This is usually the data from one of the list elements returned by build_capture_combo_list(). |
const char* get_iface_description_for_interface | ( | capture_options * | capture_opts, |
guint | i | ||
) |
Return the interface description (after setting it if not already set)
capture_opts | The capture_options structure that contains the used interface |
i | The index of the interface |
gchar* get_iface_display_name | ( | const gchar * | description, |
const if_info_t * | if_info | ||
) |
Get the interface display name to present in the interfaces list.
description | A user-specified capture device description |
if_info | The if_info for the interface |
char* get_interface_descriptive_name | ( | const char * | if_name | ) |
Return as descriptive a name for an interface as we can get. If the user has specified a comment, use that. Otherwise, if capture_interface_list() supplies a description, use that, otherwise use the interface name.
if_name | The name of the interface. |
void set_active_dlt | ( | interface_t * | device, |
int | global_default_dlt | ||
) |
Set the active DLT for a device appropriately.
device | the device on which to set the active DLT |
global_default_dlt | the global default DLT |