|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#include <sys/types.h>#include <capture/capture_ifinfo.h>#include <wsutil/wslog.h>#include <wsutil/filter_files.h>Go to the source code of this file.
Classes | |
| struct | interface_tag |
| struct | link_row_tag |
| struct | interface_options_tag |
| struct | capture_options_tag |
Macros | |
| #define | LONGOPT_LIST_TSTAMP_TYPES LONGOPT_BASE_CAPTURE+1 |
| #define | LONGOPT_SET_TSTAMP_TYPE LONGOPT_BASE_CAPTURE+2 |
| #define | LONGOPT_COMPRESS_TYPE LONGOPT_BASE_CAPTURE+3 |
| #define | LONGOPT_CAPTURE_TMPDIR LONGOPT_BASE_CAPTURE+4 |
| #define | LONGOPT_UPDATE_INTERVAL LONGOPT_BASE_CAPTURE+5 |
| #define | LONGOPT_NO_OPTIMIZE LONGOPT_BASE_CAPTURE+6 |
| #define | OPTSTRING_A |
| #define | OPTSTRING_B "B:" |
| #define | OPTSTRING_I "I" |
| #define | LONGOPT_CAPTURE_COMMON |
| #define | OPTSTRING_CAPTURE_COMMON "a:" OPTSTRING_A "b:" OPTSTRING_B "c:Df:F:i:" OPTSTRING_I "Lps:y:" |
| #define | DEFAULT_CAPTURE_BUFFER_SIZE 2 |
Typedefs | |
| typedef struct interface_tag | interface_t |
| typedef struct link_row_tag | link_row |
| typedef struct interface_options_tag | interface_options |
| typedef struct capture_options_tag | capture_options |
Enumerations | |
| enum | caps_query { CAPS_QUERY_LINK_TYPES = 0x1 , CAPS_QUERY_TIMESTAMP_TYPES = 0x2 } |
Functions | |
| void | capture_opts_init (capture_options *capture_opts, const char *app_name, GList *(*get_iface_list)(int *, char **)) |
| void | capture_opts_cleanup (capture_options *capture_opts) |
| Clean up capture options. | |
| int | capture_opts_add_opt (const char *app_env_var_prefix, capture_options *capture_opts, int opt, const char *ws_optarg) |
| Set a command line option value. | |
| void | capture_opts_log (const char *domain, enum ws_log_level level, capture_options *capture_opts) |
| Log the content of capture_opts. | |
| void | capture_opts_list_file_types (void) |
| Lists available file types for capture options. | |
| int | capture_opts_print_if_capabilities (if_capabilities_t *caps, const interface_options *interface_opts, int queries) |
| Prints the capabilities of a network interface. | |
| void | capture_opts_print_interfaces (GList *if_list) |
| Prints a list of available network interfaces. | |
| void | capture_opts_trim_snaplen (capture_options *capture_opts, int snaplen_min) |
| Trims the snapshot length of a capture options structure to ensure it meets a minimum value. | |
| void | capture_opts_trim_ring_num_files (capture_options *capture_opts) |
| Trims the number of ring buffer files to a valid range. | |
| int | capture_opts_default_iface_if_necessary (capture_options *capture_opts, const char *capture_device) |
| Set the default capture interface if necessary. | |
| void | capture_opts_del_iface (capture_options *capture_opts, unsigned if_index) |
| Deletes an interface from the capture options. | |
| void | interface_opts_free (interface_options *interface_opts) |
| Free memory allocated for interface options. | |
| interface_options * | interface_opts_from_if_info (capture_options *capture_opts, const if_info_t *if_info) |
| Collects network interfaces based on the provided capture options. | |
| void | collect_ifaces (capture_options *capture_opts) |
| Collects network interfaces based on the provided capture options. | |
| void | capture_opts_free_link_row (void *elem) |
| Frees a link row element. | |
| void | capture_opts_free_interface_t (interface_t *device) |
| Frees an interface_t element. | |
Capture options (all parameters needed to do the actual capture)
| #define LONGOPT_CAPTURE_COMMON |
| typedef struct capture_options_tag capture_options |
Capture options coming from user interface
|
extern |
Set a command line option value.
| app_env_var_prefix | The prefix for the application environment variables. |
| capture_opts | Pointer to the capture options structure. |
| opt | The option to set. |
| ws_optarg | The argument for the option. |
|
extern |
Clean up capture options.
| capture_opts | Pointer to the capture options structure to clean up. |
|
extern |
Set the default capture interface if necessary.
| capture_opts | Pointer to the capture options structure. |
| capture_device | The name of the capture device to use. |
|
extern |
Deletes an interface from the capture options.
| capture_opts | Pointer to the capture options structure. |
| if_index | Index of the interface to be deleted. |
|
extern |
Frees an interface_t element.
| device | Pointer to the interface_t element to be freed. |
|
extern |
Frees a link row element.
| elem | Pointer to the link_row element to be freed. |
|
extern |
Lists available file types for capture options.
List supported file types for capturing. This is intentionally smaller than the list supported by libwiretap (and dumpcap isn't linked with libwiretap.)
|
extern |
Log the content of capture_opts.
| domain | The logging domain. |
| level | The logging level. |
| capture_opts | Pointer to the capture options structure to log. |
|
extern |
Prints the capabilities of a network interface.
| caps | Pointer to the interface capabilities structure. |
| interface_opts | Pointer to the interface options structure. |
| queries | Number of queries related to the interface. |
|
extern |
Prints a list of available network interfaces.
| if_list | A GList containing interface options to be printed. |
|
extern |
Trims the number of ring buffer files to a valid range.
| capture_opts | Pointer to the capture options structure. |
|
extern |
Trims the snapshot length of a capture options structure to ensure it meets a minimum value.
| capture_opts | Pointer to the capture options structure to be trimmed. |
| snaplen_min | The minimum allowed snapshot length. |
|
extern |
Collects network interfaces based on the provided capture options.
| capture_opts | Pointer to the capture options structure. |
|
extern |
Free memory allocated for interface options.
| interface_opts | Pointer to the interface options structure to be freed. |
|
extern |
Collects network interfaces based on the provided capture options.
| capture_opts | Pointer to the capture options structure. |