pcap.h revision 190225
164567Sgshapiro/*
264567Sgshapiro * Copyright (c) 1993, 1994, 1995, 1996, 1997
364567Sgshapiro *	The Regents of the University of California.  All rights reserved.
464567Sgshapiro *
564567Sgshapiro * Redistribution and use in source and binary forms, with or without
690798Sgshapiro * modification, are permitted provided that the following conditions
764567Sgshapiro * are met:
864567Sgshapiro * 1. Redistributions of source code must retain the above copyright
965970Sgshapiro *    notice, this list of conditions and the following disclaimer.
1065970Sgshapiro * 2. Redistributions in binary form must reproduce the above copyright
1165970Sgshapiro *    notice, this list of conditions and the following disclaimer in the
12201381Sed *    documentation and/or other materials provided with the distribution.
13201381Sed * 3. All advertising materials mentioning features or use of this software
1464567Sgshapiro *    must display the following acknowledgement:
1564567Sgshapiro *	This product includes software developed by the Computer Systems
1690798Sgshapiro *	Engineering Group at Lawrence Berkeley Laboratory.
1764567Sgshapiro * 4. Neither the name of the University nor of the Laboratory may be used
1890798Sgshapiro *    to endorse or promote products derived from this software without
1964567Sgshapiro *    specific prior written permission.
20136910Sru *
2164567Sgshapiro * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2290798Sgshapiro * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2390798Sgshapiro * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2490798Sgshapiro * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2564567Sgshapiro * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $FreeBSD: head/contrib/libpcap/pcap.h 190225 2009-03-21 22:58:08Z rpaulo $
34 * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.59 2006/10/04 18:09:22 guy Exp $ (LBL)
35 */
36
37#ifndef lib_pcap_h
38#define lib_pcap_h
39
40#if defined(WIN32)
41  #include <pcap-stdinc.h>
42#elif defined(MSDOS)
43  #include <sys/types.h>
44  #include <sys/socket.h>  /* u_int, u_char etc. */
45#else /* UN*X */
46  #include <sys/types.h>
47  #include <sys/time.h>
48#endif /* WIN32/MSDOS/UN*X */
49
50#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
51#include <pcap-bpf.h>
52#endif
53
54#include <stdio.h>
55
56#ifdef __cplusplus
57extern "C" {
58#endif
59
60#define PCAP_VERSION_MAJOR 2
61#define PCAP_VERSION_MINOR 4
62
63#define PCAP_ERRBUF_SIZE 256
64
65/*
66 * For backwards compatibility.
67 *
68 * Note to OS vendors: do NOT get rid of this file!  Many applications
69 * expect to be able to include <pcap.h>, and at least some of them
70 * go through contortions in their configure scripts to try to detect
71 * OSes that have "helpfully" moved pcap.h to <pcap/pcap.h> without
72 * leaving behind a <pcap.h> file.
73 */
74#include <pcap/pcap.h>
75#endif
76