Deleted Added
sdiff udiff text old ( 146771 ) new ( 147897 )
full compact
1/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */
2/*
3 * Copyright (c) 1993, 1994, 1995, 1996, 1997
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 17 unchanged lines hidden (view full) ---

26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $FreeBSD: head/contrib/libpcap/pcap.h 146771 2005-05-29 18:09:04Z sam $
35 * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.52 2004/12/18 08:52:11 guy Exp $ (LBL)
36 */
37
38#ifndef lib_pcap_h
39#define lib_pcap_h
40
41#include <sys/types.h>
42#include <sys/time.h>

--- 64 unchanged lines hidden (view full) ---

107 u_short version_major;
108 u_short version_minor;
109 bpf_int32 thiszone; /* gmt to local correction */
110 bpf_u_int32 sigfigs; /* accuracy of timestamps */
111 bpf_u_int32 snaplen; /* max length saved portion of each pkt */
112 bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */
113};
114
115/*
116 * Each packet in the dump file is prepended with this generic header.
117 * This gets around the problem of different headers for different
118 * packet interfaces.
119 */
120struct pcap_pkthdr {
121 struct timeval ts; /* time stamp */
122 bpf_u_int32 caplen; /* length of portion present */

--- 82 unchanged lines hidden (view full) ---

205int pcap_loop(pcap_t *, int, pcap_handler, u_char *);
206int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *);
207const u_char*
208 pcap_next(pcap_t *, struct pcap_pkthdr *);
209int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
210void pcap_breakloop(pcap_t *);
211int pcap_stats(pcap_t *, struct pcap_stat *);
212int pcap_setfilter(pcap_t *, struct bpf_program *);
213int pcap_getnonblock(pcap_t *, char *);
214int pcap_setnonblock(pcap_t *, int, char *);
215void pcap_perror(pcap_t *, char *);
216int pcap_inject(pcap_t *, const void *, size_t);
217int pcap_sendpacket(pcap_t *, const u_char *, int);
218char *pcap_strerror(int);
219char *pcap_geterr(pcap_t *);
220int pcap_compile(pcap_t *, struct bpf_program *, char *, int,

--- 13 unchanged lines hidden (view full) ---

234int pcap_minor_version(pcap_t *);
235
236/* XXX */
237FILE *pcap_file(pcap_t *);
238int pcap_fileno(pcap_t *);
239
240pcap_dumper_t *pcap_dump_open(pcap_t *, const char *);
241pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp);
242int pcap_dump_flush(pcap_dumper_t *);
243void pcap_dump_close(pcap_dumper_t *);
244void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *);
245FILE *pcap_dump_file(pcap_dumper_t *);
246
247int pcap_findalldevs(pcap_if_t **, char *);
248void pcap_freealldevs(pcap_if_t *);
249
250const char *pcap_lib_version(void);
251
252/* XXX this guy lives in the bpf tree */
253u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int);

--- 48 unchanged lines hidden ---