History log of /freebsd-9.3-release/sys/netgraph/ng_parse.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 249132 05-Apr-2013 mav

MFC r227293 (by ed):
Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.

This means that their use is restricted to a single C file.


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 224307 25-Jul-2011 avg

remove RESTARTABLE_PANICS option

This is done per request/suggestion from John Baldwin
who introduced the option. Trying to resume normal
system operation after a panic is very unpredictable
and dangerous. It will become even more dangerous
when we allow a thread in panic(9) to penetrate all
lock contexts.
I understand that the only purpose of this option was
for testing scenarios potentially resulting in panic.

Suggested by: jhb
Reviewed by: attilio, jhb
X-MFC-After: never
Approved by: re (kib)


# 184205 23-Oct-2008 des

Retire the MALLOC and FREE macros. They are an abomination unto style(9).

MFC after: 3 months


# 170996 22-Jun-2007 mjacob

Fix various compilation warnings for gcc-4.2.

Approved by: re (bruce)


# 154521 18-Jan-2006 ru

Fix two accesses to uninitialized variables that a revision 1.27
has introduced.

Found with: Coverity Prevent(tm)


# 154375 14-Jan-2006 glebius

Make code simplier fixing memory leak.

Found with: Coverity Prevent(tm)


# 154353 14-Jan-2006 glebius

Fix two memory leakages.

Found with: Coverity Prevent(tm)


# 148645 02-Aug-2005 ru

Fixed parsing of unsigned integers.


# 142902 01-Mar-2005 glebius

Replace NG_PARSE_APPEND() macro with ng_parse_append() function. Check
its return value and free resources if function returns error. Plug
several memory leaks with this change.

Submitted by: archie
Found by: Coverity Prevent analysis tool


# 139823 06-Jan-2005 imp

/* -> /*- for license, minor formatting changes


# 132780 28-Jul-2004 kan

Avoid casts as lvalues.


# 131108 25-Jun-2004 julian

Convert Netgraph to use mbuf tags to pass its meta information around.
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.


# 128729 28-Apr-2004 jdp

Fix a memory leak in ng_get_string_token. A dynamically-allocated
buffer wasn't freed if the function failed.

MFC after: 3 days


# 125028 26-Jan-2004 harti

Get rid of the deprecated *LEN constants in favour of the new
*SIZ constants that include the trailing \0 byte.


# 123600 17-Dec-2003 ru

Made the Ethernet address parse type standard.

OK'ed by: archie


# 106665 08-Nov-2002 jhb

Use intptr_t to fix various sizeof(int) != sizeof(void *) warnings.


# 97685 31-May-2002 archie

Fix GCC warnings caused by initializing a zero length array. In the process,
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


# 97229 24-May-2002 peter

Fix warnings: deprecated use of label at end of compound statement


# 90584 12-Feb-2002 archie

Fix bug in previous commit.

Submitted by: Harti Brandt <brandt@fokus.gmd.de>


# 90047 01-Feb-2002 archie

Some netgraph parse types (such as for the 'value' field in ng_ksocket's
'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


# 87599 10-Dec-2001 obrien

Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.


# 83366 12-Sep-2001 julian

KSE Milestone 2
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


# 76860 19-May-2001 jdp

Fix a range checking bug in ng_int32_parse which affected 64-bit
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


# 70870 10-Jan-2001 julian

Fix some memory leaks
Add memory leak detection assitance.


# 68876 18-Nov-2000 dwmalone

Add the use of M_ZERO to netgraph.

Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Submitted by: archie
Approved by: archie


# 68845 16-Nov-2000 brian

Go back to using data_len in struct ngpppoe_init_data after discussions
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


# 67506 24-Oct-2000 julian

Since neither archie nor I work at Whistle any more, change our email
addresses to be the more usefu @freebsd.org ones
so we can keep getting bug-reports.
- man pages to follow..


# 65303 31-Aug-2000 archie

Avoid free'ing a NULL pointer.


# 64505 10-Aug-2000 archie

- Add new unsigned and hex integer parse types; this allows simplifying
the bytearray parse type.
- Allocate (larger) temporary work buffer dynamically instead of on the
stack when comparing to the default value.


# 58011 13-Mar-2000 archie

Fix typo: "ng_parse_fixedsstring_info" -> "ng_parse_fixedstring_info"


# 54249 07-Dec-1999 julian

Remove a bunch of un-needed includes.
Submitted by: phk@freebsd.org


# 54094 03-Dec-1999 archie

Fix bug parsing 32 bit integers on machines where sizeof(long) == 4.


# 53913 30-Nov-1999 archie

Add two new generic control messages, NGM_ASCII2BINARY and
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