summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf.h
Commit message (Collapse)AuthorAgeFilesLines
* o add support for multiple link types per interface (e.g. 802.11 and Ethernet)sam2002-11-141-3/+14
| | | | | | | | | | o introduce BPF_TAP and BPF_MTAP macros to hide implementation details and ease code portability o use m_getcl where appropriate Reviewed by: many Approved by: re Obtained from: NetBSD (multiple link type support)
* Update for libpcap 0.7.1fenner2002-06-211-14/+46
| | | | Originally-committed-to-wrong-repository by: fenner
* Remove __P.alfred2002-03-191-7/+7
|
* Update our bpf.h with tcpdump.org's new DLT_ types.fenner2001-07-311-2/+82
| | | | Use our bpf.h instead of tcpdump.org's to build libpcap.
* The advent of if_detach, allowing interface removal at runtime, makes itrwatson2000-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | possible for a panic to occur if BPF is in use on the interface at the time of the call to if_detach. This happens because BPF maintains pointers to the struct ifnet describing the interface, which is freed by if_detach. To correct this problem, a new call, bpfdetach, is introduced. bpfdetach locates BPF descriptor references to the interface, and NULLs them. Other BPF code is modified so that discovery of a NULL interface results in ENXIO (already implemented for some calls). Processes blocked on a BPF call will also be woken up so that they can receive ENXIO. Interface drivers that invoke bpfattach and if_detach must be modified to also call bpfattach(ifp) before calling if_detach(ifp). This is relevant for buses that support hot removal, such as pccard and usb. Patches to all effected devices will not be committed, only to if_wi.c, due to testing limitations. To reproduce the crash, load up tcpdump on you favorite pccard ethernet card, and then eject the card. As some pccard drivers do not invoke if_detach(ifp), this bug will not manifest itself for those drivers. Reviewed by: wes
* Introduce a new bd_seesent flag to the BPF descriptor, indicating whether orrwatson2000-03-181-0/+2
| | | | | | | | | | | | | | | | not the current BPF device should report locally generated packets or not. This allows sniffing applications to see only packets that are not generated locally, which can be useful for debugging bridging problems, or other situations where MAC addresses are not sufficient to identify locally sourced packets. Default to true for this flag, so as to provide existing behavior by default. Introduce two new ioctls, BIOCGSEESENT and BIOCSSEESENT, which may be used to manipulate this flag from userland, given appropriate privilege. Modify bpf.4 to document these two new ioctl arguments. Reviewed by: asmodai
* |The hard limit for the BPF buffer size is 32KB, which appears too lowphk2000-01-151-1/+1
| | | | | | | | | | | | | |for high speed networks (even at 100Mbit/s this corresponds to 1/300th |of a second). The default buffer size is 4KB, but libpcap and ipfilter |both override this (using the BIOCSBLEN ioctl) and allocate 32KB. | |The following patch adds an sysctl for bpf_maxbufsize, similar to the |one for bpf_bufsize that you added back in December 1995. I choose to |make the default for this limit 512KB (the value suggested by NFR). Submitted by: se Reviewed by: phk
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-2/+2
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Add 'const' to the bpf_filter() and bpf_validate() prototypes.archie1999-12-021-2/+2
| | | | Remove a stale comment from bpf_validate().
* Implement pseudo_AF_HDRCMPLT, which controls the state of the 'headermsmith1999-10-151-0/+2
| | | | | | | | | | completion' flag. If set, the interface output routine will assume that the packet already has a valid link-level source address. This defaults to off (the address is overwritten) PR: kern/10680 Submitted by: "Christopher N . Harrell" <cnh@mindspring.net> Obtained from: NetBSD
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Change BPF_ALIGNMENT to long, necessary for correct alignment on Alpha.alex1998-10-041-2/+2
|
* Add DLT_{SLIP,PPP}_BSDOS from libpcap 0.4fenner1998-09-151-1/+3
|
* Implement DLT_RAW from libpcapache1998-08-181-1/+2
|
* Don't attempt to optimize the space allocated for bpf headers ifbde1998-07-131-2/+3
| | | | | | | | sizeof(struct bpf_hdr) > 20. 20 is normal on 32-bit systems with 32-bit alignment, but we still assume that the last 2 bytes of the struct are unnecessary padding on such systems. On systems with 64-bit longs, struct timeval is bloated to 16 bytes, so bpf headers certainly don't fit in 18 bytes.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Update to match definitions in LBL June 96 releasepst1996-08-191-10/+17
|
* Clean up Ethernet drivers:wollman1996-02-061-29/+4
| | | | | | | | - fill in and use ifp->if_softc - use if_bpf rather than private cookie variables - change bpf interface to take advantage of this - call ether_ifattach() directly from Ethernet drivers - delete kludge in if_attach() that did this indirectly
* Fix a bunch of spelling errors in the comment fields ofmpp1996-01-301-2/+2
| | | | a bunch of system include files.
* Moved prototypes for devswitch functions from conf.c and driver sourcesbde1995-11-041-7/+1
| | | | | | | to <machine/conf.h>. conf.h was mechanically generated by `grep ^d_ conf.c >conf.h'. This accounts for part of its ugliness. The prototypes should be moved back to the driver sources when the functions are staticalized.
* Fix benign type mismatches in devsw functions. 82 out of 299 devswbde1995-09-081-6/+6
| | | | functions were wrong.
* Give the BPF the ability to generate signals when a packet is available.pst1995-06-151-1/+5
| | | | | Reviewed by: pst & wollman Submitted by: grossman@cygnus.com
* Remove trailing whitespace.rgrimes1995-05-301-5/+5
|
* Make idempotent.paul1994-08-211-1/+5
| | | | Submitted by: Paul
* Added $Id$dg1994-08-021-1/+1
|
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+252
OpenPOWER on IntegriCloud