|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Macros | |
| #define | RINGBUFFER_UNLIMITED_FILES 0 |
| #define | RINGBUFFER_MIN_NUM_FILES 0 |
| #define | RINGBUFFER_MAX_NUM_FILES 100000 |
| #define | RINGBUFFER_WARN_NUM_FILES 65535 |
Functions | |
| int | ringbuf_init (const char *capture_name, unsigned num_files, bool group_read_access, const char *compress_type, bool nametimenum) |
| Initialize the ringbuffer system. | |
| bool | ringbuf_is_initialized (void) |
| Check if the ringbuffer system is initialized. | |
| const char * | ringbuf_current_filename (void) |
| Get the current filename used by the ringbuffer. | |
| ws_cwstream * | ringbuf_init_libpcap_fdopen (int *err) |
| Initialize a libpcap dump file for the ringbuffer. Initializes a libpcap dump file for writing captured packets to the ringbuffer. | |
| bool | ringbuf_switch_file (ws_cwstream **pdh, char **save_file, int *save_file_fd, int *err) |
| Switch the ringbuffer dump file. | |
| bool | ringbuf_libpcap_dump_close (char **save_file, int *err) |
| Close the ringbuffer dump file. | |
| void | ringbuf_free (void) |
| Frees all memory allocated by the ringbuffer. | |
| void | ringbuf_error_cleanup (void) |
| Clean up any errors related to the ringbuffer system. | |
| bool | ringbuf_set_print_name (char *name, int *err) |
| Set the name for the ringbuffer. | |
Definitions for capture ringbuffer files
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| const char * ringbuf_current_filename | ( | void | ) |
Get the current filename used by the ringbuffer.
| void ringbuf_error_cleanup | ( | void | ) |
Clean up any errors related to the ringbuffer system.
Frees all memory allocated by the ringbuffer and closes any open files.
| void ringbuf_free | ( | void | ) |
Frees all memory allocated by the ringbuffer.
Cleans up and frees all resources used by the ringbuffer system.
| int ringbuf_init | ( | const char * | capture_name, |
| unsigned | num_files, | ||
| bool | group_read_access, | ||
| const char * | compress_type, | ||
| bool | nametimenum | ||
| ) |
Initialize the ringbuffer system.
Initializes the ringbuffer system with the specified parameters.
| capture_name | The name of the capture file. |
| num_files | The number of files in the ringbuffer. |
| group_read_access | Whether to set group read access for the files. |
| compress_type | The compression type for the files. |
| nametimenum | Whether to include name, time, and number in the filenames. |
| ws_cwstream * ringbuf_init_libpcap_fdopen | ( | int * | err | ) |
Initialize a libpcap dump file for the ringbuffer. Initializes a libpcap dump file for writing captured packets to the ringbuffer.
| err | Pointer to an integer that will be set to an error code if an error occurs. |
| bool ringbuf_is_initialized | ( | void | ) |
Check if the ringbuffer system is initialized.
Determines whether the ringbuffer system has been initialized.
| bool ringbuf_libpcap_dump_close | ( | char ** | save_file, |
| int * | err | ||
| ) |
Close the ringbuffer dump file.
Closes the current ringbuffer dump file and cleans up resources.
| save_file | Pointer to a string that will be set to the name of the saved file. |
| err | Pointer to an integer that will be set to an error code if an error occurs. |
| bool ringbuf_set_print_name | ( | char * | name, |
| int * | err | ||
| ) |
Set the name for the ringbuffer.
Sets the name of the file to which the ringbuffer will write data.
| name | Pointer to a string that will be set to the name of the capture file. |
| err | Pointer to an integer that will be set to an error code if an error occurs. |
| bool ringbuf_switch_file | ( | ws_cwstream ** | pdh, |
| char ** | save_file, | ||
| int * | save_file_fd, | ||
| int * | err | ||
| ) |
Switch the ringbuffer dump file.
| pdh | Pointer to the current pcap dump handle, which will be updated to the new handle. |
| save_file | Pointer to a string that will be set to the name of the saved file. |
| save_file_fd | Pointer to an integer that will be set to the file descriptor of the saved file. |
| err | Pointer to an integer that will be set to an error code if an error occurs. |