History log of /freebsd-current/sys/netgraph/ng_message.h
Revision Date Author Comments
# 4064a110 27-Nov-2023 Gleb Smirnoff <glebius@FreeBSD.org>

netgraph: increase size of sockaddr_ng to match maximum node name

The ng_socket(4) node already writes more than declared size of the
struct at least in the in ng_getsockaddr(). Make size match size of
a node name. The value is pasted instead of including ng_message.h
into ng_socket.h. This is external API and we want to keep it stable
even if NG_NODESIZ is redefined in a kernel build.

Reviewed by: afedorov
Differential Revision: https://reviews.freebsd.org/D42690


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 662c1305 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

net: clean up empty lines in .c and .h files


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 0941c782 09-Jun-2009 Warner Losh <imp@FreeBSD.org>

World now builds without these defines, so eliminate them.

Approved by: julian@


# 1ede983c 23-Oct-2008 Dag-Erling Smørgrav <des@FreeBSD.org>

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

MFC after: 3 months


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# bb964e74 17-Oct-2006 Gleb Smirnoff <glebius@FreeBSD.org>

Make ng_ID_t fixed size, so that its maximum value is platform independent.
This will be important in future.


# 2df050ad 12-Jan-2006 Gleb Smirnoff <glebius@FreeBSD.org>

In the splnet(9) times netgraph(4) was synchronous and if a message
had been replied, the reply was always delivered to the originator
synchronously.

With introduction of netgraph item callbacks and a wait channel with
mutex in ng_socket(4), we have fixed the problem with ngctl(8) returning
earlier than the command has been proceeded by target node. But still
ngctl(8) can return prior to the reply has arrived to its node.

To fix this:
- Introduce a new flag for netgraph(4) messages - NGM_HASREPLY.
This flag is or'ed with message like NGM_READONLY.
- In netgraph userland library if we have sent a message with
NGM_HASREPLY flag, then select(2) until reply comes.
- Mark appropriate generic commands with NGM_HASREPLY flag,
gathering them into one enum {}. Bump generic cookie.


# 644168ee 19-Apr-2005 Gleb Smirnoff <glebius@FreeBSD.org>

Add macro NG_COPYMESSAGE(), which allocates memory and creates a
copy of given control message.


# 4feaf224 05-Feb-2005 Gleb Smirnoff <glebius@FreeBSD.org>

Increase size of arglen to uint32_t, since uint16_t proved to be
not enough (e.g. listing 911 nodes). Bump NG_VERSION.

Reviewed by: julian, archie, ru


# c398230b 06-Jan-2005 Warner Losh <imp@FreeBSD.org>

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


# f036d408 19-Aug-2004 Julian Elischer <julian@FreeBSD.org>

Align netgraph message fields ready for 64-bit (and 128 bit :-) machines.
requires a recompile of netgraph users.
Also change the size of a field in the bluetooth code
that was waiting for the next change that needed recompiles so
it could piggyback its way in.

Submitted by: jdp, maksim
MFC after: 2 days


# a65d0dc8 07-Jun-2004 Julian Elischer <julian@FreeBSD.org>

Now that mbufs are allocated using uma,
don't check for accidental usage of mbuf 'how' flags as
they are the same thing.


# 87e2c66a 26-Jan-2004 Hartmut Brandt <harti@FreeBSD.org>

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


# 67371b0f 12-Nov-2003 Hartmut Brandt <harti@FreeBSD.org>

Bump the netgraph header version to 6 for the change of the name
length definitions.

Reminded by: jdp


# 387ebc6d 12-Nov-2003 Hartmut Brandt <harti@FreeBSD.org>

Double length of node names, hook names, command strings and types. Add
defines for these constants that include the trailing NUL byte. These
new constants have SIZ in their name instead of LEN. As soon as all
consumers in the tree are converted to use the new defines the old
defines will be put under BURN_BRIDGES.

Reviewed by: archie, julian, ru
Approved by: re (in principle)


# e20480bf 10-Nov-2003 Ruslan Ermilov <ru@FreeBSD.org>

Use a single style of multiple inclusion protection for Netgraph headers.

Reviewed by: archie, harti, emax


# 0eecad8d 22-Oct-2003 Hartmut Brandt <harti@FreeBSD.org>

Remove a gcc-ism: declaring a variable array at the end of a structure
as [0] and replace it with the ISO way of writing []. This has caused
warnings with WARNS=6.


# 11589318 17-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

KASSERT that NG_MKMESSAGE() is not called with mbuf flags.


# f0184ff8 31-May-2002 Archie Cobbs <archie@FreeBSD.org>

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


# b57a7965 01-Feb-2001 Julian Elischer <julian@FreeBSD.org>

Clean up reference counting with relation to queued packets and the worklist,
and while I'm there, clean up the worklist insertion and removal.

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


# 1acb27c6 30-Jan-2001 Julian Elischer <julian@FreeBSD.org>

Implement direct support for semipersistant nodes.
(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.


# 069154d5 05-Jan-2001 Julian Elischer <julian@FreeBSD.org>

Rewrite of netgraph to start getting ready for SMP.
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.


# 589f6ed8 18-Dec-2000 Julian Elischer <julian@FreeBSD.org>

Divorce the kernel binary ABI version number from the message
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)


# 859a4d16 12-Dec-2000 Julian Elischer <julian@FreeBSD.org>

Reviewed by: Archie@freebsd.org
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 :-)


# 99cdf4cc 18-Nov-2000 David Malone <dwmalone@FreeBSD.org>

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


# cc3bbd68 24-Oct-2000 Julian Elischer <julian@FreeBSD.org>

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..


# 57b57be3 10-Aug-2000 Archie Cobbs <archie@FreeBSD.org>

Take advantage of the new unsigned and hex integer types.


# 7095e097 03-Jul-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Experiemntal ascii based device configuration mechanism.

This may or may not survive, decision will be made well before 5.0-R


# a096e45a 01-May-2000 Archie Cobbs <archie@FreeBSD.org>

Use 'type_name' structure field instead of 'typename', which is
a C++ reserved work.

Add a ng_copy_meta() function.


# a4ec03cf 28-Apr-2000 Julian Elischer <julian@FreeBSD.org>

Two simple changes to the kernel internal API for netgraph modules,
to support future work in flow-control and 'packet reject/replace'
processing modes.

reviewed by: phk, archie


# 664a31e4 28-Dec-1999 Peter Wemm <peter@FreeBSD.org>

Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
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.


# f8307e12 29-Nov-1999 Archie Cobbs <archie@FreeBSD.org>

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


# dc90cad9 31-Oct-1999 Julian Elischer <julian@FreeBSD.org>

Start making the contents of the generic framework opaque to the nodes.
This step: IDs are no-longer the address of the node.
Reviewd by: Archie@freebsd.org


# 4cf49a43 21-Oct-1999 Julian Elischer <julian@FreeBSD.org>

Whistle's Netgraph link-layer (sometimes more) networking infrastructure.
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