summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_bpf.c
Commit message (Collapse)AuthorAgeFilesLines
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-071-1/+1
| | | | This means that their use is restricted to a single C file.
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).des2008-10-231-8/+8
| | | | MFC after: 3 months
* Make sure BPF program is not bigger than set maximum (net.bpf.maxinsns).jkim2008-08-291-1/+5
|
* Prepare hooks direct pointers on setup to avoid heavy ng_findhook() callsmav2008-02-041-27/+66
| | | | during operarion.
* Avoid data copying when it is possible.mav2008-01-281-9/+21
| | | | bpf_filter() is able to work directly on mbuf chain.
* Reduce stack usage by 256 bytes per call. It helps to avoid kernelmav2007-07-261-5/+11
| | | | | | | | | | stack overflow in complicated traffic filtering setups. There can be minor performance degradation for the MHLEN < len <= 256 case due to additional buffer allocation, but it is a rare case. Approved by: re (rwatson), glebius (mentor) MFC after: 1 week
* Fix build without BPF_JITTER option.jkim2005-12-071-1/+3
|
* Add BPF Just-In-Time compiler support for ng_bpf(4).jkim2005-12-071-2/+28
| | | | | The sysctl is changed from net.bpf.jitter.enable to net.bpf_jitter.enable and this controls both bpf(4) and ng_bpf(4) now.
* /* -> /*- for license, minor formatting changesimp2005-01-071-2/+3
|
* Avoid calling bpf_filter() with len == 0, which causes a change in semanticsarchie2004-06-231-1/+4
| | | | | | | (it treats the buffer pointer as an mbuf pointer) and subsequent panic. MFC after: 3 days Reported by: Tony Hariman <tony@cbn.net.id>
* Switch to using C99 sparse initialisers for the type methods array.julian2004-05-291-12/+9
| | | | | | | | Should make no binary difference. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Reviewed by: Harti Brandt <harti@freebsd.org> MFC after: 1 week
* Fix GCC warnings caused by initializing a zero length array. In the process,archie2002-05-311-9/+7
| | | | | | | simply things a bit by getting rid of 'struct ng_parse_struct_info' which was useless because it only contained one field. MFC after: 2 weeks
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-1/+1
| | | | also don't use ANSI string concatenation.
* Fix cut and paste error in a comment.julian2001-01-301-1/+1
| | | | Submitted by: Peter Wemm <peter@freebsd.org>
* Another brian fix, luckily not in live code.julian2001-01-111-3/+1
|
* Fix some memory leaksjulian2001-01-101-8/+14
| | | | Add memory leak detection assitance.
* Part 2 of the netgraph rewrite.julian2001-01-081-16/+15
| | | | | | This is mostly cosmetic changes, (though I caught a bug or two while makeing them) Reviewed by: archie@freebsd.org
* Rewrite of netgraph to start getting ready for SMP.julian2001-01-061-30/+32
| | | | | | | | This version is functional and is aproaching solid.. notice I said APROACHING. There are many node types I cannot test I have tested: echo hole ppp socket vjc iface tee bpf async tty The rest compile and "Look" right. More changes to follow. DEBUGGING is enabled in this code to help if people have problems.
* Divorce the kernel binary ABI version number from the messagejulian2000-12-181-1/+1
| | | | | | | | | format version number. (userland programs should not need to be recompiled when the netgraph kernel internal ABI is changed. Also fix modules that don;t handle the fact that a caller may not supply a return message pointer. (benign at the moment because the calling code checks, but that will change)
* Reviewed by: Archie@freebsd.orgjulian2000-12-121-2/+1
| | | | | | | | | | | | | This clears out my outstanding netgraph changes. There is a netgraph change of design in the offing and this is to some extent a superset of soem of the new functionality and some of the old functionality that may be removed. This code works as before, but allows some new features that I want to work with and evaluate. It is the basis for a version of netgraph with integral locking for SMP use. This is running on my test machine with no new problems :-)
* Add the use of M_ZERO to netgraph.dwmalone2000-11-181-2/+1
| | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Submitted by: archie Approved by: archie
* Since neither archie nor I work at Whistle any more, change our emailjulian2000-10-241-1/+1
| | | | | | addresses to be the more usefu @freebsd.org ones so we can keep getting bug-reports. - man pages to follow..
* Allocate all memory (including within node constructors) with M_NOWAITarchie2000-09-211-2/+2
| | | | instead of M_WAITOK, to allow for maximum flexibility.
* Take advantage of the new unsigned and hex integer types.archie2000-08-101-4/+4
|
* Two simple changes to the kernel internal API for netgraph modules,julian2000-04-281-2/+3
| | | | | | | to support future work in flow-control and 'packet reject/replace' processing modes. reviewed by: phk, archie
* Change definition of NG_BPF_HOOKPROG_SIZE() so as not to requirearchie1999-12-061-7/+8
| | | | a structure pointer, just the number of BPF instructions.
* New netgraph node type, ng_bpf(8). This node type allows you toarchie1999-12-031-0/+501
apply bpf(4) filters to data travelling through a netgraph network.
OpenPOWER on IntegriCloud