summaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_parse.c
Commit message (Collapse)AuthorAgeFilesLines
* Avoid casts as lvalues.Alexander Kabaev2004-07-281-3/+3
| | | | Notes: svn path=/head/; revision=132780
* Convert Netgraph to use mbuf tags to pass its meta information around.Julian Elischer2004-06-251-0/+1
| | | | | | | | | | | Thanks to Sam for importing tags in a way that allowed this to be done. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Also allow the sr and ar drivers to create netgraph versions of their modules. Document the change to the ksocket node. Notes: svn path=/head/; revision=131108
* Fix a memory leak in ng_get_string_token. A dynamically-allocatedJohn Polstra2004-04-291-0/+1
| | | | | | | | | buffer wasn't freed if the function failed. MFC after: 3 days Notes: svn path=/head/; revision=128729
* Get rid of the deprecated *LEN constants in favour of the newHartmut Brandt2004-01-261-5/+5
| | | | | | | *SIZ constants that include the trailing \0 byte. Notes: svn path=/head/; revision=125028
* Made the Ethernet address parse type standard.Ruslan Ermilov2003-12-171-0/+58
| | | | | | | OK'ed by: archie Notes: svn path=/head/; revision=123600
* Use intptr_t to fix various sizeof(int) != sizeof(void *) warnings.John Baldwin2002-11-081-4/+4
| | | | Notes: svn path=/head/; revision=106665
* Fix GCC warnings caused by initializing a zero length array. In the process,Archie Cobbs2002-05-311-17/+19
| | | | | | | | | | 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
* Fix warnings: deprecated use of label at end of compound statementPeter Wemm2002-05-241-1/+1
| | | | Notes: svn path=/head/; revision=97229
* Fix bug in previous commit.Archie Cobbs2002-02-121-2/+1
| | | | | | | Submitted by: Harti Brandt <brandt@fokus.gmd.de> Notes: svn path=/head/; revision=90584
* Some netgraph parse types (such as for the 'value' field in ng_ksocket'sArchie Cobbs2002-02-011-8/+15
| | | | | | | | | | | 'struct ng_ksocket_sockopt') like to peek into the ng_mesg header for information. Make sure when generating default values that we provide a valid header to peek into. MFC after: 1 week Notes: svn path=/head/; revision=90047
* Update to C99, s/__FUNCTION__/__func__/,David E. O'Brien2001-12-101-7/+7
| | | | | | | also don't use ANSI string concatenation. Notes: svn path=/head/; revision=87599
* KSE Milestone 2Julian Elischer2001-09-121-0/+12
| | | | | | | | | | | | | | | | | 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
* Fix a range checking bug in ng_int32_parse which affected 64-bitJohn Polstra2001-05-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | machines. The code formerly read: long val; if (val < (long)-0x80000000 || ...) return EINVAL; The constant 0x80000000 has type unsigned int. The unary `-' operator does not change the type (or the value, in this case). Therefore the promotion to long is done by 0-extension, giving 0x0000000080000000 instead of the desired 0xffffffff80000000. I got rid of the `-' and changed the cast to (int32_t) to give proper sign-extension on all architectures and to better reflect the fact that we are range-checking a 32-bit value. This commit also makes the analogous changes to ng_int{8,16}_parse for consistency. MFC after: 3 days Notes: svn path=/head/; revision=76860
* Fix some memory leaksJulian Elischer2001-01-101-16/+23
| | | | | | | Add memory leak detection assitance. Notes: svn path=/head/; revision=70870
* 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
* Go back to using data_len in struct ngpppoe_init_data after discussionsBrian Somers2000-11-161-19/+86
| | | | | | | | | | | | | | with Julian and Archie. Implement a new ``sizedstring'' parse type for dealing with field pairs consisting of a uint16_t followed by a data field of that size, and use this to deal with the data_len and data fields. Written by: Archie with some input by me Agreed in principle by: julian Notes: svn path=/head/; revision=68845
* 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
* Avoid free'ing a NULL pointer.Archie Cobbs2000-08-311-1/+2
| | | | Notes: svn path=/head/; revision=65303
* - Add new unsigned and hex integer parse types; this allows simplifyingArchie Cobbs2000-08-101-41/+146
| | | | | | | | | the bytearray parse type. - Allocate (larger) temporary work buffer dynamically instead of on the stack when comparing to the default value. Notes: svn path=/head/; revision=64505
* Fix typo: "ng_parse_fixedsstring_info" -> "ng_parse_fixedstring_info"Archie Cobbs2000-03-131-8/+8
| | | | Notes: svn path=/head/; revision=58011
* Remove a bunch of un-needed includes.Julian Elischer1999-12-071-2/+0
| | | | | | | Submitted by: phk@freebsd.org Notes: svn path=/head/; revision=54249
* Fix bug parsing 32 bit integers on machines where sizeof(long) == 4.Archie Cobbs1999-12-031-1/+2
| | | | Notes: svn path=/head/; revision=54094
* Add two new generic control messages, NGM_ASCII2BINARY andArchie Cobbs1999-11-301-0/+1604
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