aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_sample.c
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* net: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-2/+1
| | | | Notes: svn path=/head/; revision=365071
* sys/netgraph: spelling fixes in comments.Pedro F. Giffuni2016-04-291-4/+4
| | | | | | | No functional change. Notes: svn path=/head/; revision=298813
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.Ed Schouten2011-11-071-1/+1
| | | | | | | This means that their use is restricted to a single C file. Notes: svn path=/head/; revision=227293
* Node constructor methods are supposed to be called in syscallGleb Smirnoff2011-04-181-4/+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-3/+3
| | | | | | | MFC after: 3 months Notes: svn path=/head/; revision=184205
* Whitespace.Gleb Smirnoff2005-02-061-9/+9
| | | | Notes: svn path=/head/; revision=141410
* Remove comment which left after removal of ng_rcvdataq_t.Gleb Smirnoff2005-02-061-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=141409
* /* -> /*- for license, minor formatting changesWarner Losh2005-01-071-2/+3
| | | | Notes: svn path=/head/; revision=139823
* Kill a half dead comment. It's first half was killed in rev 1.12.Roman Kurakin2005-01-041-1/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=139688
* Fix creation on "dlciX" hook in ng_sample.Roman Kurakin2004-12-231-2/+3
| | | | | | | | Approved by: julian MFC after: 3 days Notes: svn path=/head/; revision=139249
* Fix counting length of leadin for hook name (sizeof () => strlen ()).Roman Kurakin2004-12-231-1/+1
| | | | | | | | Approved by: julian MFC after: 3 days Notes: svn path=/head/; revision=139238
* Address node in a less complex way.Gleb Smirnoff2004-07-291-1/+1
| | | | | | | Approved by: julian (mentor) Notes: svn path=/head/; revision=132828
* Slight cosmetic changes.Julian Elischer2004-07-201-4/+4
| | | | | | | | | | | | Also introduce a macro to be called by persistent nodes to signal their persistence during shutdown to hide this mechanism from the node author. Make node flags have a consistent style in naming. Document the change. Notes: svn path=/head/; revision=132464
* Having moved metadata usage to mbuf tags, remove code that supportsJulian Elischer2004-06-261-10/+10
| | | | | | | | | the old way of doing it. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Notes: svn path=/head/; revision=131155
* Switch to using C99 sparse initialisers for the type methods array.Julian Elischer2004-05-291-12/+11
| | | | | | | | | | | 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
* Fix GCC warnings caused by initializing a zero length array. In the process,Archie Cobbs2002-05-311-3/+3
| | | | | | | | | | 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
* Make the sample netgraph node compileable again.Julian Elischer2001-02-251-6/+3
| | | | | | | | Makes it easier for people if they can start with something that actually compiles. Notes: svn path=/head/; revision=73005
* Implement direct support for semipersistant nodes.Julian Elischer2001-01-301-27/+20
| | | | | | | | | | | | | | | | (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. Notes: svn path=/head/; revision=71849
* Another brian fix, luckily not in live code.Julian Elischer2001-01-111-1/+2
| | | | Notes: svn path=/head/; revision=70933
* Fix some memory leaksJulian Elischer2001-01-101-0/+8
| | | | | | | Add memory leak detection assitance. Notes: svn path=/head/; revision=70870
* Part 2 of the netgraph rewrite.Julian Elischer2001-01-081-28/+27
| | | | | | | | | 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-38/+62
| | | | | | | | | | | 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-32/+39
| | | | | | | | | | | | | | | | 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/+2
| | | | | | | | | | 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
* Two simple changes to the kernel internal API for netgraph modules,Julian Elischer2000-04-281-4/+6
| | | | | | | | | | to support future work in flow-control and 'packet reject/replace' processing modes. reviewed by: phk, archie Notes: svn path=/head/; revision=59728
* Show how to supply a struct ng_cmdlist for (de)asciificationArchie Cobbs1999-12-011-7/+34
| | | | | | | | | of control messages. Suggested by: julian Notes: svn path=/head/; revision=53997
* 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
* Change the prototype of the strto* routines to make the secondArchie Cobbs1999-11-241-1/+1
| | | | | | | | | | | | | | parameter a char ** instead of a const char **. This make these kernel routines consistent with the corresponding libc userland routines. Which is actually 'correct' is debatable, but consistency and following the spec was deemed more important in this case. Reviewed by (in concept): phk, bde Notes: svn path=/head/; revision=53648
* Simplify checking/parsing of strings using strtoul(), isdigit(), etc.Archie Cobbs1999-11-021-9/+9
| | | | Notes: svn path=/head/; revision=52816
* Add typedefs for node methodsJulian Elischer1999-11-011-10/+9
| | | | | | | Suggested by phk. Notes: svn path=/head/; revision=52752
* braino in sample code.Julian Elischer1999-11-011-2/+2
| | | | | | | picked up by phk. Notes: svn path=/head/; revision=52736
* Whistle's Netgraph link-layer (sometimes more) networking infrastructure.Julian Elischer1999-10-211-0/+441
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