pcap.h revision 190225
1139825Simp/*
21541Srgrimes * Copyright (c) 1993, 1994, 1995, 1996, 1997
31541Srgrimes *	The Regents of the University of California.  All rights reserved.
41541Srgrimes *
51541Srgrimes * Redistribution and use in source and binary forms, with or without
61541Srgrimes * modification, are permitted provided that the following conditions
71541Srgrimes * are met:
81541Srgrimes * 1. Redistributions of source code must retain the above copyright
91541Srgrimes *    notice, this list of conditions and the following disclaimer.
101541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111541Srgrimes *    notice, this list of conditions and the following disclaimer in the
121541Srgrimes *    documentation and/or other materials provided with the distribution.
131541Srgrimes * 3. All advertising materials mentioning features or use of this software
141541Srgrimes *    must display the following acknowledgement:
151541Srgrimes *	This product includes software developed by the Computer Systems
161541Srgrimes *	Engineering Group at Lawrence Berkeley Laboratory.
171541Srgrimes * 4. Neither the name of the University nor of the Laboratory may be used
181541Srgrimes *    to endorse or promote products derived from this software without
191541Srgrimes *    specific prior written permission.
201541Srgrimes *
211541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241541Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311541Srgrimes * SUCH DAMAGE.
32116192Sobrien *
33116192Sobrien * $FreeBSD: head/contrib/libpcap/pcap.h 190225 2009-03-21 22:58:08Z rpaulo $
34116192Sobrien * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.59 2006/10/04 18:09:22 guy Exp $ (LBL)
351541Srgrimes */
3698542Smckusick
3793736Sphk#ifndef lib_pcap_h
381541Srgrimes#define lib_pcap_h
391541Srgrimes
401541Srgrimes#if defined(WIN32)
411541Srgrimes  #include <pcap-stdinc.h>
421541Srgrimes#elif defined(MSDOS)
431541Srgrimes  #include <sys/types.h>
441541Srgrimes  #include <sys/socket.h>  /* u_int, u_char etc. */
451541Srgrimes#else /* UN*X */
461541Srgrimes  #include <sys/types.h>
471541Srgrimes  #include <sys/time.h>
481541Srgrimes#endif /* WIN32/MSDOS/UN*X */
491541Srgrimes
501541Srgrimes#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
511541Srgrimes#include <pcap-bpf.h>
528876Srgrimes#endif
531541Srgrimes
541541Srgrimes#include <stdio.h>
551541Srgrimes
561541Srgrimes#ifdef __cplusplus
571541Srgrimesextern "C" {
581541Srgrimes#endif
591541Srgrimes
601541Srgrimes#define PCAP_VERSION_MAJOR 2
611541Srgrimes#define PCAP_VERSION_MINOR 4
6212911Sphk
631541Srgrimes#define PCAP_ERRBUF_SIZE 256
641541Srgrimes
651541Srgrimes/*
661541Srgrimes * For backwards compatibility.
671541Srgrimes *
681541Srgrimes * Note to OS vendors: do NOT get rid of this file!  Many applications
691541Srgrimes * expect to be able to include <pcap.h>, and at least some of them
701541Srgrimes * go through contortions in their configure scripts to try to detect
711541Srgrimes * OSes that have "helpfully" moved pcap.h to <pcap/pcap.h> without
721541Srgrimes * leaving behind a <pcap.h> file.
731541Srgrimes */
741541Srgrimes#include <pcap/pcap.h>
751541Srgrimes#endif
761541Srgrimes