aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_tee.c
Commit message (Collapse)AuthorAgeFilesLines
* sys/netgraph: spelling fixes in comments.Pedro F. Giffuni2016-04-291-2/+2
| | | | | | | No functional change. Notes: svn path=/head/; revision=298813
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-051-1/+1
| | | | | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually Notes: svn path=/head/; revision=243882
* Node constructor methods are supposed to be called in syscallGleb Smirnoff2011-04-181-3/+1
| | | | | | | | | | context always. Convert nodes to consistently use M_WAITOK flag for memory allocation. Reviewed by: julian Notes: svn path=/head/; revision=220768
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).Dag-Erling Smørgrav2008-10-231-2/+2
| | | | | | | MFC after: 3 months Notes: svn path=/head/; revision=184205
* Fix shutdown bug made by previous commit.Alexander Motin2008-02-241-0/+1
| | | | Notes: svn path=/head/; revision=176508
* Move all possible node logic out of the rcvdata() functionAlexander Motin2008-02-031-96/+90
| | | | | | | | to the newhook()/disconnect(). Unify function names with other nodes. Notes: svn path=/head/; revision=175954
* Update statistics only in case if delivery was successfull.Gleb Smirnoff2005-06-071-2/+4
| | | | Notes: svn path=/head/; revision=147104
* /* -> /*- for license, minor formatting changesWarner Losh2005-01-071-1/+3
| | | | Notes: svn path=/head/; revision=139823
* Having moved metadata usage to mbuf tags, remove code that supportsJulian Elischer2004-06-261-13/+2
| | | | | | | | | the old way of doing it. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Notes: svn path=/head/; revision=131155
* Removed a leftover from the previous change.Ruslan Ermilov2004-06-011-4/+0
| | | | | | | Submitted by: Gleb Smirnoff Notes: svn path=/head/; revision=129942
* Add a new netgraph method to allow restoration of someJulian Elischer2004-05-291-8/+20
| | | | | | | | | | | | | behaviour lost in the change from 4.x style netgraph tee nodes. Alter the tee node to use the new method. Document the behaviour. Step the ABI version number... old netgraph klds will refuse to load. Better than just crashing. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Notes: svn path=/head/; revision=129836
* Switch to using C99 sparse initialisers for the type methods array.Julian Elischer2004-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 Notes: svn path=/head/; revision=129823
* Don't duplicate a packet, just to throw it away when we discover theJulian Elischer2004-03-241-1/+1
| | | | | | | duplicat hook is not connected. Notes: svn path=/head/; revision=127364
* Dont count bytes being sent to a disconnected hook.Julian Elischer2004-03-221-4/+4
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=127286
* Allow the caller to get an erro direclty if we sent the packet immediatly.Julian Elischer2003-07-031-1/+1
| | | | | | | | Submitted by: Ian Dowse <iedowse@maths.tcd.ie> MFC after: 1 day Notes: svn path=/head/; revision=117209
* Fix a commentJulian Elischer2003-06-251-1/+1
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=116839
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-1/+1
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-1/+1
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* o Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} andBosko Milekic2002-12-191-1/+1
| | | | | | | | | | | | | the mbuf allocator flags {M_TRYWAIT, M_DONTWAIT}. o Fix a bpf_compat issue where malloc() was defined to just call bpf_alloc() and pass the 'canwait' flag(s) along. It's been changed to call bpf_alloc() but pass the corresponding M_TRYWAIT or M_DONTWAIT flag (and only one of those two). Submitted by: Hiten Pandya <hiten@unixdaemons.com> (hiten->commit_count++) Notes: svn path=/head/; revision=108107
* Fix GCC warnings caused by initializing a zero length array. In the process,Archie Cobbs2002-05-311-6/+6
| | | | | | | | | | 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 Notes: svn path=/head/; revision=97685
* Update to C99, s/__FUNCTION__/__func__/,David E. O'Brien2001-12-101-2/+2
| | | | | | | also don't use ANSI string concatenation. Notes: svn path=/head/; revision=87599
* KSE Milestone 2Julian Elischer2001-09-121-1/+5
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* Swap egress hooks for packets entering from the monitor hooks.Julian Elischer2001-01-261-2/+2
| | | | Notes: svn path=/head/; revision=71669
* Part 2 of the netgraph rewrite.Julian Elischer2001-01-081-22/+21
| | | | | | | | | This is mostly cosmetic changes, (though I caught a bug or two while makeing them) Reviewed by: archie@freebsd.org Notes: svn path=/head/; revision=70784
* Rewrite of netgraph to start getting ready for SMP.Julian Elischer2001-01-061-49/+65
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=70700
* Divorce the kernel binary ABI version number from the messageJulian Elischer2000-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) Notes: svn path=/head/; revision=70159
* Reviewed by: Archie@freebsd.orgJulian Elischer2000-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 :-) Notes: svn path=/head/; revision=69922
* Add the use of M_ZERO to netgraph.David Malone2000-11-181-2/+1
| | | | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Submitted by: archie Approved by: archie Notes: svn path=/head/; revision=68876
* Since neither archie nor I work at Whistle any more, change our emailJulian Elischer2000-10-241-1/+1
| | | | | | | | | addresses to be the more usefu @freebsd.org ones so we can keep getting bug-reports. - man pages to follow.. Notes: svn path=/head/; revision=67506
* Allocate all memory (including within node constructors) with M_NOWAITArchie Cobbs2000-09-211-1/+1
| | | | | | | instead of M_WAITOK, to allow for maximum flexibility. Notes: svn path=/head/; revision=66182
* Add new control message to atomically get and clear statistics.Archie Cobbs2000-08-101-24/+37
| | | | Notes: svn path=/head/; revision=64513
* Two simple changes to the kernel internal API for netgraph modules,Julian Elischer2000-04-281-2/+3
| | | | | | | | | | to support future work in flow-control and 'packet reject/replace' processing modes. reviewed by: phk, archie Notes: svn path=/head/; revision=59728
* Add control message ASCII conversion for this node type.Archie Cobbs2000-01-271-4/+40
| | | | Notes: svn path=/head/; revision=56658
* Use m_dup() instead of m_copypacket() to duplicate the mbuf chain.Archie Cobbs1999-12-011-1/+1
| | | | | | | | This fixes a bug where if the original packet was modified downstream of the tee node, then the copy could get modified too. Notes: svn path=/head/; revision=54007
* Add two new generic control messages, NGM_ASCII2BINARY andArchie Cobbs1999-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | NGM_BINARY2ASCII, which convert control messages to ASCII and back. This allows control messages to be sent and received in ASCII form using ngctl(8), which makes ngctl a lot more useful. This also allows all the type-specific debugging code in libnetgraph to go away -- instead, we just ask the node itself to do the ASCII translation for us. Currently, all generic control messages are supported, as well as messages associated with the following node types: async, cisco, ksocket, and ppp. See /usr/share/examples/netgraph/ngctl for an example of using this. Also give ngctl(8) the ability to print out incoming data and control messages at any time. Eventually nghook(8) may be subsumed. Several other misc. bug fixes. Reviewed by: julian Notes: svn path=/head/; revision=53913
* Fix crash when trying to duplicate a NULL meta.Archie Cobbs1999-11-081-9/+12
| | | | Notes: svn path=/head/; revision=52977
* Add statistics counters to "tee" netgraph node type.Archie Cobbs1999-11-021-53/+119
| | | | Notes: svn path=/head/; revision=52817
* Add typedefs for node methodsJulian Elischer1999-11-011-8/+7
| | | | | | | Suggested by phk. Notes: svn path=/head/; revision=52752
* Whistle's Netgraph link-layer (sometimes more) networking infrastructure.Julian Elischer1999-10-211-0/+268
Been in production for 3 years now. Gives Instant Frame relay to if_sr and if_ar drivers, and PPPOE support soon. See: ftp://ftp.whistle.com/pub/archie/netgraph/index.html for on-line manual pages. Reviewed by: Doug Rabson (dfr@freebsd.org) Obtained from: Whistle CVS tree Notes: svn path=/head/; revision=52419