Commit Graph

78 Commits

Author SHA1 Message Date
Rui Paulo
efbbe93e56 Revert previous commit that commented out some bpf functions.
Unconstify arguments of bpf_image(), bpf_filter() and bpf_dump(). This
is needed because some ports rely heavely on these arguments (some of
them even roll out their own implemenentations of bpf_dump).
2009-04-11 17:36:11 +00:00
Rui Paulo
0c9438135a Restore local change to include <sys/bpf.h> inside pcap.h. This fixes
remaining ports build problems.
2009-04-02 13:04:17 +00:00
Rui Paulo
fa01cfefc2 Remove a dangling extern "C" declaration that was missed during the
merge. Fixes C++ ports using libpcap (nmap, for example).

Submitted by:	Daniel Roethlisberger <daniel at roe.ch>
2009-03-31 11:04:51 +00:00
VANHULLEBUS Yvan
ff1fdd77ff Fixed indentation for LINKTYPE_ENC
Approved by:	gnn(mentor)
2009-03-24 15:57:35 +00:00
Rui Paulo
1d111e6dfe bpf_filter() and bpf_validate() can't live here if they already live in
bpf.h
2009-03-22 00:47:41 +00:00
Rui Paulo
b2e0e80d0c Remove remaining references to BIOCSETBUFMODE ifdefs. We now have
another ifdef for zerocopy bpf.
2009-03-21 23:13:48 +00:00
Rui Paulo
2676a4aff3 Finish merge of zerocopy bpf. 2009-03-21 23:08:04 +00:00
Rui Paulo
a8e0710125 Merge libpcap 1.0.0. 2009-03-21 22:58:08 +00:00
Rui Paulo
e744b7e395 Add Mac OS X stuff. 2009-03-21 20:39:22 +00:00
Rui Paulo
4eea7c44d8 Add a couple more paths. 2009-03-21 20:34:41 +00:00
Rui Paulo
4953d4b64d Add exclude list for libpcap. 2009-03-21 20:16:15 +00:00
Rui Paulo
3430dc7c1f Flatten vendor/libpcap and remove keyword expansion. 2009-03-20 13:44:43 +00:00
VANHULLEBUS Yvan
ef39bc9f18 Added DLT_ENC to map list, so it is now possible
to save dumps on enc0

Reviewed by:	gnn(mentor)
Obtained from:	NETASQ
MFC after:	1 week
2009-03-16 15:09:47 +00:00
Christian S.J. Peron
154bbe416c Implement zero-copy bpf(4) buffer or "zbuf" support for libpcap. A slightly
different version has been committed upstream in the libpcap vendor branch.
This will allow people to experiment with zero-copy bpf(4) without requiring
external patches.

Note to enable this functionality:

    sysctl net.bpf.zerocopy_enable=1

By default, libpcap will use the legacy buffering method unless this sysctl
variable is set to 1.

For the details about zero-copy bpf(4) implementation see svn change r177548.

Requested by:		many
Discussed with:		sam
In collaboration with:	rwatson
2008-09-16 20:32:29 +00:00
Max Laier
1f631dacae Revert back to including the whole net/bpf.h again.
Requested by:	sam, nork
X-MFC after:	now
2007-10-20 20:23:39 +00:00
Max Laier
5357e0fedb Resolve merge conflicts
Approved by:	re (kensmith)
Obtained from:	tcpdump.org
2007-10-16 02:07:55 +00:00
Max Laier
ef96d74f8a Import of libpcap v0.9.8 2007-10-16 02:02:02 +00:00
Max Laier
1f372e4dae This commit was generated by cvs2svn to compensate for changes in r172677,
which included commits to RCS files with non-trunk default branches.
2007-10-16 02:02:02 +00:00
Jung-uk Kim
560a54e10c Add three new ioctl(2) commands for bpf(4).
- BIOCGDIRECTION and BIOCSDIRECTION get or set the setting determining
whether incoming, outgoing, or all packets on the interface should be
returned by BPF.  Set to BPF_D_IN to see only incoming packets on the
interface.  Set to BPF_D_INOUT to see packets originating locally and
remotely on the interface.  Set to BPF_D_OUT to see only outgoing
packets on the interface.  This setting is initialized to BPF_D_INOUT
by default.  BIOCGSEESENT and BIOCSSEESENT are obsoleted by these but
kept for backward compatibility.

- BIOCFEEDBACK sets packet feedback mode.  This allows injected packets
to be fed back as input to the interface when output via the interface is
successful.  When BPF_D_INOUT direction is set, injected outgoing packet
is not returned by BPF to avoid duplication.  This flag is initialized to
zero by default.

Note that libpcap has been modified to support BPF_D_OUT direction for
pcap_setdirection(3) and PCAP_D_OUT direction is functional now.

Reviewed by:	rwatson
2007-02-26 22:24:14 +00:00
Sam Leffler
34c97c7db9 sigh, put back buffer overflow fix of 1.1.11 that seems to have
not gone into the 0.9.4 release; don't put it on the vendor branch
so we won't lose it on the next import if they continue to lose it
2006-09-04 20:12:45 +00:00
Sam Leffler
73c9abba78 update instructions 2006-09-04 19:54:49 +00:00
Sam Leffler
ff252dbedb resolve merge conflicts
MFC after:	1 month
2006-09-04 19:54:21 +00:00
Sam Leffler
5d18909f05 Import of libpcap v0.9.4 2006-09-04 19:43:23 +00:00
Sam Leffler
47aafbd8f9 This commit was generated by cvs2svn to compensate for changes in r162012,
which included commits to RCS files with non-trunk default branches.
2006-09-04 19:43:23 +00:00
Sam Leffler
04679efc46 correct dlt buffer alloc; this goes on the vendor branch as it
will be committed there shortly

MFC after:	3 days
2006-01-16 20:33:23 +00:00
Sam Leffler
d5807d9482 This commit was generated by cvs2svn to compensate for changes in r154439,
which included commits to RCS files with non-trunk default branches.
2006-01-16 20:33:23 +00:00
Sam Leffler
4238c2cd94 resolve merge conflicts
Approved by:	re (scottl)
2005-07-11 03:43:25 +00:00
Sam Leffler
ee2dd488bf Virgin import of libpcap v0.9.1 (release) from tcpdump.org
Approved by:	re (scottl)
2005-07-11 03:24:53 +00:00
Sam Leffler
8930d062b6 This commit was generated by cvs2svn to compensate for changes in r147894,
which included commits to RCS files with non-trunk default branches.
2005-07-11 03:24:53 +00:00
Sam Leffler
c761ebcb2c resolve merge conflicts
Reviewed by:	bms (earlier version)
2005-05-29 18:09:04 +00:00
Sam Leffler
04fb274578 Virgin import of libpcap v0.9.1 (alpha 096) from tcpdump.org 2005-05-29 17:46:52 +00:00
Sam Leffler
0a71d148de This commit was generated by cvs2svn to compensate for changes in r146768,
which included commits to RCS files with non-trunk default branches.
2005-05-29 17:46:52 +00:00
Bruce M Simpson
21f48b73b0 pcap clients should use strlcpy() from the base system libc by default also. 2004-03-31 18:15:37 +00:00
Bruce M Simpson
2a5eb7e1d4 snprintf() and vsnprintf() are part of our base system libc, therefore
pcap should not fall back to its own implementations in the absence of
HAVE_SNPRINTF and HAVE_VSNPRINTF defines when compiled and installed
as part of the world. This should fix builds of pflogd and packages
depending on the base system libpcap.

Reported by:	Andrzej Tobola
2004-03-31 18:14:27 +00:00
Bruce M Simpson
d87e118db2 Correct imported pcap.h for FreeBSD builds. 2004-03-31 10:21:28 +00:00
Bruce M Simpson
eb9f0330c0 Merge of libpcap 0.8.3 from tcpdump.org. 2004-03-31 09:15:09 +00:00
Bruce M Simpson
feb4ecdbac Import libpcap 0.8.3, from http://www.tcpdump.org/releases/libpcap-0.8.3.tar.gz 2004-03-31 09:07:39 +00:00
Bruce M Simpson
2f9208fff6 This commit was generated by cvs2svn to compensate for changes in r127664,
which included commits to RCS files with non-trunk default branches.
2004-03-31 09:07:39 +00:00
Brian Feldman
fe1e903532 Remove a reference to part of the pcap API not yet merged. 2003-11-04 06:16:55 +00:00
Brian Feldman
3267cc18e1 * Modify libpcap to work a bit better with our 802.11 code. This means
tcpdump -y ieee802_11 will work in the basic senses, including the
  code compilation for filters (where you may specify "link[]" to refer
  to parts of the 802.11 header, as well as treat it like a normal
  Ethernet header).  Previously, it was just too far off to do anything
  useful for us.
* While I'm here, fix some compile problems that will result from lex
  and yacc namespace polution when linking with -lpcap.  The namespace
  is now "pcapyy*" instead of "yy*", and it tests fine with world and
  some external applications that may or may not use "yy*".
2003-11-04 06:12:21 +00:00
Bill Fenner
6121e7f0d2 Merge multi-DLT support. 2003-01-26 01:21:53 +00:00
Bill Fenner
09f33d614a Commit tcpdump.org's multi-DLT support to vendor branch. 2003-01-26 01:16:33 +00:00
Bill Fenner
a63efadcf1 This commit was generated by cvs2svn to compensate for changes in r109839,
which included commits to RCS files with non-trunk default branches.
2003-01-26 01:16:33 +00:00
Bill Fenner
c0653930da Merge libpcap 0.7.1
MFC after:	2 weeks
2002-06-21 01:38:14 +00:00
Bill Fenner
0a94d38f05 Import libpcap 0.7.1, from
http://www.tcpdump.org/release/libpcap-0.7.1.tar.gz
2002-06-21 01:36:27 +00:00
Bill Fenner
8e10e3e69d This commit was generated by cvs2svn to compensate for changes in r98530,
which included commits to RCS files with non-trunk default branches.
2002-06-21 01:36:27 +00:00
David E. O'Brien
8519d4e5fc Correct email address for bug reports and patch submissions.
Submitted by:	Marco Molteni <molter@tin.it>
2002-02-08 19:45:58 +00:00
Bill Fenner
8e1481d144 Merge libpcap 0.6.2 2001-04-03 04:32:48 +00:00
Bill Fenner
dc2c730546 Virgin import of tcpdump.org libpcap v0.6.2 2001-04-03 04:18:09 +00:00
Bill Fenner
bd053aaff0 This commit was generated by cvs2svn to compensate for changes in r75107,
which included commits to RCS files with non-trunk default branches.
2001-04-03 04:18:09 +00:00