diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-02-24 09:25:36 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-02-24 09:25:36 +0000 |
commit | 541c654ff07e1f85dbd1a54b18fea0579d79dfa3 (patch) | |
tree | c96fb1b378ffc8b4a42368a32df39ab1fa288d9c /capture.h | |
parent | 1be3629f30b319af0d161ba3c02b8ef700cae312 (diff) | |
download | wireshark-541c654ff07e1f85dbd1a54b18fea0579d79dfa3.tar.gz wireshark-541c654ff07e1f85dbd1a54b18fea0579d79dfa3.tar.bz2 wireshark-541c654ff07e1f85dbd1a54b18fea0579d79dfa3.zip |
Put all the capture options into a structure.
Move the ringbuffer capture options from the "capture_file" structure to
the structure for capture options, as they're a property of an
in-progress capture, not a property of a particular capture file.
svn path=/trunk/; revision=4799
Diffstat (limited to 'capture.h')
-rw-r--r-- | capture.h | 33 |
1 files changed, 22 insertions, 11 deletions
@@ -1,7 +1,7 @@ /* capture.h * Definitions for packet capture windows * - * $Id: capture.h,v 1.30 2002/02/24 03:33:04 guy Exp $ + * $Id: capture.h,v 1.31 2002/02/24 09:25:34 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -31,16 +31,27 @@ /* Name we give to the child process when doing a "-S" capture. */ #define CHILD_NAME "ethereal-capture" -extern gboolean has_snaplen; /* TRUE if maximum capture packet length is specified */ -extern int snaplen; /* Maximum captured packet length */ -extern int promisc_mode; /* capture in promiscuous mode */ -extern int sync_mode; /* fork a child to do the capture, and sync between them */ -extern gboolean has_autostop_count; -extern int autostop_count; -extern gboolean has_autostop_filesize; /* TRUE if maximum capture file size is specified */ -extern gint32 autostop_filesize; /* Maximum capture file size */ -extern gboolean has_autostop_duration; /* TRUE if maximum capture duration is specified */ -extern gint32 autostop_duration; /* Maximum capture duration */ +typedef struct { + gboolean has_snaplen; /* TRUE if maximum capture packet + length is specified */ + int snaplen; /* Maximum captured packet length */ + int promisc_mode; /* Capture in promiscuous mode */ + int sync_mode; /* Fork a child to do the capture, + and sync between them */ + gboolean has_autostop_count; /* TRUE if maximum packet count is + specified */ + int autostop_count; /* Maximum packet count */ + gboolean has_autostop_duration; /* TRUE if maximum capture duration + is specified */ + gint32 autostop_duration; /* Maximum capture duration */ + gboolean has_autostop_filesize; /* TRUE if maximum capture file size + is specified */ + gint32 autostop_filesize; /* Maximum capture file size */ + gboolean ringbuffer_on; /* TRUE if ring buffer in use */ + guint32 ringbuffer_num_files; /* Number of ring buffer files */ +} capture_options; + +extern capture_options capture_opts; extern int sync_pipe[2]; /* used to sync father */ extern int quit_after_cap; /* Makes a "capture only mode". Implies -k */ |