2004-12-28 00:36:06 +00:00
|
|
|
/* ringbuffer.h
|
|
|
|
* Definitions for capture ringbuffer files
|
2001-12-04 08:45:04 +00:00
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2001-12-04 08:45:04 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2001-12-04 08:45:04 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2001-12-04 08:45:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2001-12-04 08:45:04 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2001-12-04 08:45:04 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __RINGBUFFER_H__
|
|
|
|
#define __RINGBUFFER_H__
|
|
|
|
|
2003-06-22 16:09:04 +00:00
|
|
|
#include <stdio.h>
|
2001-12-04 08:45:04 +00:00
|
|
|
#include "file.h"
|
|
|
|
#include "wiretap/wtap.h"
|
|
|
|
|
2003-06-22 16:09:04 +00:00
|
|
|
#define RINGBUFFER_UNLIMITED_FILES 0
|
2010-05-27 18:00:46 +00:00
|
|
|
/* Minimum number of ringbuffer files */
|
2003-06-22 16:09:04 +00:00
|
|
|
#define RINGBUFFER_MIN_NUM_FILES 0
|
2010-05-27 18:00:46 +00:00
|
|
|
/* 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
|
2001-12-04 08:45:04 +00:00
|
|
|
|
|
|
|
int ringbuf_init(const char *capture_name, guint num_files);
|
2005-03-28 00:19:02 +00:00
|
|
|
const gchar *ringbuf_current_filename(void);
|
2009-04-26 15:51:25 +00:00
|
|
|
FILE *ringbuf_init_libpcap_fdopen(int *err);
|
2006-04-29 17:54:46 +00:00
|
|
|
gboolean ringbuf_switch_file(FILE **pdh, gchar **save_file, int *save_file_fd,
|
2009-04-26 15:51:25 +00:00
|
|
|
int *err);
|
2006-03-04 22:33:04 +00:00
|
|
|
gboolean ringbuf_libpcap_dump_close(gchar **save_file, int *err);
|
2001-12-04 08:45:04 +00:00
|
|
|
void ringbuf_free(void);
|
|
|
|
void ringbuf_error_cleanup(void);
|
|
|
|
|
|
|
|
#endif /* ringbuffer.h */
|