summaryrefslogtreecommitdiff
path: root/capture_loop.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2007-11-25 21:38:18 +0000
committerGerald Combs <gerald@wireshark.org>2007-11-25 21:38:18 +0000
commit0ffff17f5386e575f81dfbd930758f886094ab8d (patch)
treec91e7312735b59da611d427d56800af3f9dd7d08 /capture_loop.h
parent060834df82011c9332a414bbd5f470928090c0d7 (diff)
downloadwireshark-0ffff17f5386e575f81dfbd930758f886094ab8d.tar.gz
Move some items back into capture_loop.c (since TShark no longer needs them).
Clean up some of the Windows named pipe code. svn path=/trunk/; revision=23592
Diffstat (limited to 'capture_loop.h')
-rw-r--r--capture_loop.h71
1 files changed, 0 insertions, 71 deletions
diff --git a/capture_loop.h b/capture_loop.h
index 8f8100b672..77d0720d71 100644
--- a/capture_loop.h
+++ b/capture_loop.h
@@ -102,56 +102,6 @@ extern void capture_loop_stop(void);
typedef void (*capture_packet_cb_fct)(u_char *, const struct pcap_pkthdr *, const u_char *);
-
-/* moved from capture_loop.c here, so we can combine it (and the related functions) with tshark */
-/* XXX - should be moved back to capture_loop.c */
-/* E: capture_loop.c only (Wireshark/dumpcap) T: tshark only */
-typedef struct _loop_data {
- /* common */
- gboolean go; /* TRUE as long as we're supposed to keep capturing */
- int err; /* E: if non-zero, error seen while capturing */
- gint packet_count; /* Number of packets we have already captured */
- gint packet_max; /* E: Number of packets we're supposed to capture - 0 means infinite */
-
- jmp_buf stopenv; /* T: starting point of loop (jump back this point on SIG...) */
-
- char *save_file; /* T: Name of file to which we're writing */
- capture_packet_cb_fct packet_cb; /* callback for a single captured packet */
-
- /* pcap "input file" */
- pcap_t *pcap_h; /* pcap handle */
- gboolean pcap_err; /* E: TRUE if error from pcap */
-#ifdef MUST_DO_SELECT
- int pcap_fd; /* pcap file descriptor */
-#endif
-
- /* capture pipe (unix only "input file") */
- gboolean from_cap_pipe; /* TRUE if we are capturing data from a capture pipe */
- struct pcap_hdr cap_pipe_hdr; /* ? */
- struct pcaprec_modified_hdr cap_pipe_rechdr; /* ? */
- int cap_pipe_fd; /* the file descriptor of the capture pipe */
- gboolean cap_pipe_modified; /* TRUE if data in the pipe uses modified pcap headers */
- gboolean cap_pipe_byte_swapped; /* TRUE if data in the pipe is byte swapped */
- unsigned int cap_pipe_bytes_to_read;/* Used by cap_pipe_dispatch */
- unsigned int cap_pipe_bytes_read; /* Used by cap_pipe_dispatch */
- enum {
- STATE_EXPECT_REC_HDR,
- STATE_READ_REC_HDR,
- STATE_EXPECT_DATA,
- STATE_READ_DATA
- } cap_pipe_state;
- enum { PIPOK, PIPEOF, PIPERR, PIPNEXIST } cap_pipe_err;
-
- /* output file */
- FILE *pdh;
- int linktype;
- gint wtap_linktype;
- long bytes_written;
-
-} loop_data;
-
-
-
/** init the capture filter */
typedef enum {
INITFILTER_NO_ERROR,
@@ -159,27 +109,6 @@ typedef enum {
INITFILTER_OTHER_ERROR
} initfilter_status_t;
-extern initfilter_status_t
-capture_loop_init_filter(pcap_t *pcap_h, gboolean from_cap_pipe, gchar * iface, gchar * cfilter);
-
-int
-capture_loop_dispatch(capture_options *capture_opts _U_, loop_data *ld,
- char *errmsg, int errmsg_len);
-
-extern gboolean
-capture_loop_open_input(capture_options *capture_opts, loop_data *ld,
- char *errmsg, size_t errmsg_len,
- char *secondary_errmsg, size_t secondary_errmsg_len);
-
-extern gboolean
-capture_loop_open_output(capture_options *capture_opts, int *save_file_fd, char *errmsg, int errmsg_len);
-
-extern gboolean
-capture_loop_init_output(capture_options *capture_opts, int save_file_fd, loop_data *ld, char *errmsg, int errmsg_len);
-
-extern gboolean
-capture_loop_close_output(capture_options *capture_opts, loop_data *ld, int *err_close);
-
/*
* Routines called by the capture loop code to report things.
*/