summaryrefslogtreecommitdiff
path: root/capture.h
blob: ff9e59519ddc10488b49a852ecdf024c883c435a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* capture.h
 * Definitions for packet capture windows
 *
 * $Id: capture.h,v 1.17 1999/09/30 06:49:54 guy Exp $
 *
 * Ethereal - Network traffic analyzer
 * By Gerald Combs <gerald@zing.org>
 * Copyright 1998 Gerald Combs
 *
 * 
 * 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.
 * 
 * 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.
 * 
 * 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 __CAPTURE_H__
#define __CAPTURE_H__

#ifdef HAVE_LIBPCAP

#ifndef lib_pcap_h
#include <pcap.h>
#endif

/* The version of pcap.h that comes with some systems is missing these
 * #defines.
 */

#ifndef DLT_RAW
#define DLT_RAW 12
#endif

#ifndef DLT_SLIP_BSDOS
#define DLT_SLIP_BSDOS 13
#endif

#ifndef DLT_PPP_BSDOS
#define DLT_PPP_BSDOS 14
#endif

/* Name we give to the child process when doing a "-S" or "-F" capture. */
#define	CHILD_NAME	"ethereal-capture"

/* Create a temporary file and start a capture to it. */
void   do_capture(void);

/* Start a capture to a file we've opened; "cf.save_file" is the
   pathname of the file, and "cf.save_file_fd" is the file descriptor
   we got when we opened it. */
void   run_capture(void);

/* Do the low-level work of a capture. */
void   capture(void);

#endif /* HAVE_LIBPCAP */
#endif /* capture.h */