forked from osmocom/wireshark
775bbbcded
A while back Graham pointed out the SPDX project (spdx.org), which is working on standardizing license specifications: https://www.wireshark.org/lists/wireshark-dev/201509/msg00119.html Appendix V of the specification describes a short identifier (SPDX-License-Identifier) that you can use in place of boilerplate in your source files: https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b Start the conversion process with our top-level C and C++ files. Change-Id: Iba1d835776714deb6285e2181e8ca17f95221878 Reviewed-on: https://code.wireshark.org/review/24302 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Balint Reczey <balint@balintreczey.hu> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
49 lines
1.3 KiB
C
49 lines
1.3 KiB
C
/* ringbuffer.h
|
|
* Definitions for capture ringbuffer files
|
|
*
|
|
* Wireshark - Network traffic analyzer
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
* Copyright 1998 Gerald Combs
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef __RINGBUFFER_H__
|
|
#define __RINGBUFFER_H__
|
|
|
|
#include <stdio.h>
|
|
#include "wiretap/wtap.h"
|
|
|
|
#define RINGBUFFER_UNLIMITED_FILES 0
|
|
/* Minimum number of ringbuffer files */
|
|
#define RINGBUFFER_MIN_NUM_FILES 0
|
|
/* Maximum number of ringbuffer files */
|
|
/* Avoid crashes on very large numbers. Should be a power of 10 */
|
|
#define RINGBUFFER_MAX_NUM_FILES 100000
|
|
/* Maximum number for FAT filesystems */
|
|
#define RINGBUFFER_WARN_NUM_FILES 65535
|
|
|
|
int ringbuf_init(const char *capture_name, guint num_files, gboolean group_read_access);
|
|
const gchar *ringbuf_current_filename(void);
|
|
FILE *ringbuf_init_libpcap_fdopen(int *err);
|
|
gboolean ringbuf_switch_file(FILE **pdh, gchar **save_file, int *save_file_fd,
|
|
int *err);
|
|
gboolean ringbuf_libpcap_dump_close(gchar **save_file, int *err);
|
|
void ringbuf_free(void);
|
|
void ringbuf_error_cleanup(void);
|
|
|
|
#endif /* ringbuffer.h */
|
|
|
|
/*
|
|
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
*
|
|
* Local Variables:
|
|
* c-basic-offset: 2
|
|
* tab-width: 8
|
|
* indent-tabs-mode: nil
|
|
* End:
|
|
*
|
|
* vi: set shiftwidth=2 tabstop=8 expandtab:
|
|
* :indentSize=2:tabSize=8:noTabs=true:
|
|
*/
|