Commit Graph

14 Commits

Author SHA1 Message Date
dyoung 0ee313689a Fix bpf_open so that we can run tcpdump without write-access to
any of the /dev/bpf* device nodes.  In bpf_open, first try to open
each /dev/bpf* read-write; if that fails, try to open each read-only.
2005-06-10 19:00:09 +00:00
christos 8d79e1b130 Use /dev/bpf. 2004-12-02 00:05:02 +00:00
dyoung c14b894413 Resolve conflicts in libpcap-0.8.3 import.
Remove some extraneous files.
2004-09-27 23:02:53 +00:00
jonathan f0d1f46d5b Do runtime dynamic binary-search for maximum obtainable bpf capture
size (via BIOCSBLEN). Obtained from FreeBSD 4.x; originally from
http://www.tcpdump.org's version of libpcap.

Taken verbatim from the FreeBSD 4.9 version, lint and all, other than
increasing the maximum size from 32Kibyte to an extremely generous
4Mibytes.  We assume root will configure the in-kernel maximum value
sensibly on small-memory machines.
2004-01-20 23:31:20 +00:00
christos 6f8e24d360 prevent double free. From OpenBSD 2003-11-24 21:49:12 +00:00
thorpej 6ac6a2a09f Open the BPF file descriptor as read-write. Some pcap-using programs
(notably, simulators) expect to be able to send packets on the descriptor,
as well as receive.
2002-10-19 22:03:44 +00:00
thorpej bfd8b5c80d * Add support for DLT_IEEE802_11.
* When opening a live pcap, obtain the list of supported DLTs from
  the BPF.
* Add pcap_list_datalinks() to obtain a list of supported DLTs
  supported by the interface associated with the pcap descriptor.
* Add pcap_set_datalink() to set the current DLT of the pcap.
* Bump shlib 1.2 -> 1.3; new functions added.

From David Young <dyoung@ojctech.com>, with some minor changes by me.
2002-09-22 16:13:01 +00:00
itojun c6f88a42f4 support IPv6 address and IPv6 protocols.
"tcp" will match both IPv4 TCP and IPv6 TCP.
"ip6" will match IPv6.
you can chase header chain by using "protochain" instead of "proto"
(but bpf code is not optimizable in this case)

commit to tcpdump will follow.

I've sent this fix to LBL guys to get no response.  I wonder why it was.
1999-07-02 10:05:22 +00:00
christos a520af71e9 Resolve conflicts 1997-10-03 15:53:00 +00:00
mrg 9cd5492c02 - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
1997-01-23 14:01:45 +00:00
mikel f17c8ad1a1 Merge libpcap-0.2.1.
Includes numerous improvements (see CHANGES), fixes PR bin/2031.
1996-12-13 08:25:54 +00:00
cgd 64fe160dd5 include string.h and/or stdlib.h as appropriate, if NetBSD. 1995-04-29 05:42:23 +00:00
mycroft b0446b3200 Port to NetBSD, and add NetBSD RCS tags. 1995-03-06 11:37:58 +00:00
mycroft 84c86af405 Import LBL libpcap, version 0.0 patch level 3. 1995-03-06 11:32:59 +00:00