| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
/builds/wireshark/wireshark/ringbuffer.h
Go to the documentation of this file.
1
12#ifndef __RINGBUFFER_H__
13#define __RINGBUFFER_H__
14
15#include <wireshark.h>
16#include <writecap/pcapio.h>
17
18#define RINGBUFFER_UNLIMITED_FILES 0
19/* Minimum number of ringbuffer files */
20#define RINGBUFFER_MIN_NUM_FILES 0
21/* Maximum number of ringbuffer files */
22/* Avoid crashes on very large numbers. Should be a power of 10 */
23#define RINGBUFFER_MAX_NUM_FILES 100000
24/* Maximum number for FAT filesystems */
25#define RINGBUFFER_WARN_NUM_FILES 65535
26
39 int ringbuf_init(const char *capture_name, unsigned num_files, bool group_read_access,
40 const char *compress_type, bool nametimenum);
41
49 bool ringbuf_is_initialized(void);
50
54 const char *ringbuf_current_filename(void);
55
62 ws_cwstream* ringbuf_init_libpcap_fdopen(int *err);
63
72 bool ringbuf_switch_file(ws_cwstream* *pdh, char **save_file, int *save_file_fd,
73 int *err);
74
84 bool ringbuf_libpcap_dump_close(char **save_file, int *err);
85
91 void ringbuf_free(void);
92
98 void ringbuf_error_cleanup(void);
99
109 bool ringbuf_set_print_name(char *name, int *err);
110
111#endif /* ringbuffer.h */
pcapio.h
ringbuf_init_libpcap_fdopen
ws_cwstream * ringbuf_init_libpcap_fdopen(int *err)
Initialize a libpcap dump file for the ringbuffer. Initializes a libpcap dump file for writing captur...
ringbuf_switch_file
bool ringbuf_switch_file(ws_cwstream **pdh, char **save_file, int *save_file_fd, int *err)
Switch the ringbuffer dump file.
ringbuf_init
int ringbuf_init(const char *capture_name, unsigned num_files, bool group_read_access, const char *compress_type, bool nametimenum)
Initialize the ringbuffer system.
ringbuf_error_cleanup
void ringbuf_error_cleanup(void)
Clean up any errors related to the ringbuffer system.
ringbuf_free
void ringbuf_free(void)
Frees all memory allocated by the ringbuffer.
ringbuf_libpcap_dump_close
bool ringbuf_libpcap_dump_close(char **save_file, int *err)
Close the ringbuffer dump file.
ringbuf_current_filename
const char * ringbuf_current_filename(void)
Get the current filename used by the ringbuffer.
ringbuf_is_initialized
bool ringbuf_is_initialized(void)
Check if the ringbuffer system is initialized.
ringbuf_set_print_name
bool ringbuf_set_print_name(char *name, int *err)
Set the name for the ringbuffer.
ws_cwstream
Definition file_compressed.c:152