summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/netgraph.h
Commit message (Collapse)AuthorAgeFilesLines
* Add an external function to unlink a netgraph type from the types list.julian2001-07-231-0/+1
|
* Catch up to header include changes:jhb2001-03-281-0/+1
| | | | | - <sys/mutex.h> now requires <sys/systm.h> - <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>
* netgraph.h:julian2001-03-101-5/+7
| | | | | | | | | | | | | | | | | | | Change a prototype. Add a function version of ng_ref_node() when debugging so a breakpoint can be set on it. ng_base.c: add 'node' as an argument to ng_apply_item so that it is up to the caller to take over and release the item's reference on the node. If the release reports back that the node went away due to the reference going to 0, the caller should cease referencing the now defunct node. (e.g. the item was a 'kill node' message). Alter ng_unref_node to report back the residual references as a result. ng_pptpgre.c: Don't reference a node after we dropped a reference to it. (What if it was the last?) Fixes a node leak reported by Harti Brandt <brandt@fokus.gmd.de> which was due to an incorrect earlier attempt to fix the "accessing node after dropping the last reference" problem.
* Cleanups to Macros for sending data between netgraph nodes.julian2001-03-031-62/+32
|
* Add parenthesis to a macro.julian2001-03-031-1/+1
| | | | This took me 2 whole days to track down. (bleah)
* Shuffle sysctls a bit (thankyou whoever made them dynamic for modules)julian2001-02-231-1/+5
| | | | | | | | | | | | and add a sysctl to pppoe to activate non standard ethertypes so that idiot ISPs (apparently in France) who use equipment from idiot suppliers (rumour says 3com) who use nonstandard ethertypes can still connect. "yep, sure we do pppoe, we use a different identifier to that dictated in the standard, but sure it's pppoe!" sysctl -w net.graph.stupid_isp=1 enables the changeover.
* Make netgraph modules refuse to link with modules of a different ABI version.julian2001-02-051-1/+3
| | | | | | also try implement teh documented behaviour in socket nodes so that when there is only one hook, an unaddressed write/send will DTRT and send the data to that hook.
* Change the kernel internal ABI number as the HOOK structure has changed.julian2001-02-011-1/+1
| | | | Forgotten by: me
* Add the ability to declare ore-ride methods on a per-hook basisjulian2001-01-311-11/+38
| | | | | | for the rcvdata() and rcvmsg() methods. Also bring the man page up to sync with my last commit. (and this one)
* Implement direct support for semipersistant nodes.julian2001-01-301-33/+100
| | | | | | | | | | | | | (e.g. ethernet nodes are persistent until you rip out the hardware) Use this support in the ethernet and sample nodes. Add some more abstraction on the 'item's so that node and hook reference counting can be checked easier. Slight man page correction. Make pppoe type dependent on ethernet type. Clean up node shutdown a little. Move a mutex from MTX_SPIN to MTX_DEF (oops) Fix small ref-counting bug. remove warning on one2many type.
* Add a generic "queued function callin" mechanismjulian2001-01-141-9/+49
| | | | | | Use it to implement (hopefully) SMP safe node/hook addition and removal. Fix some debug stuff.
* Add an exported function ng_rmhook_self() that removes a hookjulian2001-01-111-1/+3
| | | | | | | | from a node, but does it via the locking queue, thus ensuring that the node is locked when it's hook is removed. Add 'deadnode' and 'deadhook' structures for when a node or hook is invalidated but not yet freed. (not yet freed)
* Unbreak compilation.archie2001-01-111-1/+1
|
* Fix some memory leaksjulian2001-01-101-1/+2
| | | | Add memory leak detection assitance.
* Part 2 of the netgraph rewrite.julian2001-01-081-171/+564
| | | | | | 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-67/+373
| | | | | | | | 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/+8
| | | | | | | | | 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-28/+54
| | | | | | | | | | | | | 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 :-)
* 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..
* Back out the previous change to the queue(3) interface.jake2000-05-261-5/+5
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-5/+5
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Macro call to ng_send_dataq() should have been to ng_send_data() instead.archie2000-05-011-5/+5
|
* Use 'type_name' structure field instead of 'typename', which isarchie2000-05-011-0/+1
| | | | | | a C++ reserved work. Add a ng_copy_meta() function.
* Minimal tweak to make the ng_XXX modules depend on netgraph so that theypeter2000-04-291-1/+2
| | | | see its symbols and link ok.
* Two simple changes to the kernel internal API for netgraph modules,julian2000-04-281-7/+21
| | | | | | | to support future work in flow-control and 'packet reject/replace' processing modes. reviewed by: phk, archie
* Some minor prototype tweaks.archie2000-03-131-5/+4
|
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-1/+1
| | | | | | 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 a new function ng_findhook() for finding a node's hook;archie1999-12-031-0/+1
| | | | | | | if the node type provides a more efficient implementation than the normal linear scan, use it. Reviewed by: julian
* Add two new generic control messages, NGM_ASCII2BINARY andarchie1999-11-301-5/+21
| | | | | | | | | | | | | | | | | | | | | | | 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
* Add typedefs for node methodsjulian1999-11-011-26/+25
| | | | Suggested by phk.
* Start making the contents of the generic framework opaque to the nodes.julian1999-11-011-1/+4
| | | | | This step: IDs are no-longer the address of the node. Reviewd by: Archie@freebsd.org
* Whistle's Netgraph link-layer (sometimes more) networking infrastructure.julian1999-10-211-0/+255
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
OpenPOWER on IntegriCloud