Fix some misinformation in netgraph manual pages.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov gmail.com>
This commit is contained in:
Gleb Smirnoff 2013-11-28 06:45:30 +00:00
parent bcc4cae9d6
commit 4131c351c3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258702
2 changed files with 19 additions and 18 deletions

View File

@ -35,7 +35,7 @@
.\" $FreeBSD$ .\" $FreeBSD$
.\" $Whistle: netgraph.3,v 1.7 1999/01/25 07:14:06 archie Exp $ .\" $Whistle: netgraph.3,v 1.7 1999/01/25 07:14:06 archie Exp $
.\" .\"
.Dd January 27, 2004 .Dd November 25, 2013
.Dt NETGRAPH 3 .Dt NETGRAPH 3
.Os .Os
.Sh NAME .Sh NAME
@ -57,7 +57,7 @@
.Sh LIBRARY .Sh LIBRARY
.Lb libnetgraph .Lb libnetgraph
.Sh SYNOPSIS .Sh SYNOPSIS
.In netgraph.h .In netgraph/netgraph.h
.Ft int .Ft int
.Fn NgMkSockNode "const char *name" "int *csp" "int *dsp" .Fn NgMkSockNode "const char *name" "int *csp" "int *dsp"
.Ft int .Ft int

View File

@ -36,7 +36,7 @@
.\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $ .\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd May 25, 2008 .Dd November 25, 2013
.Dt NETGRAPH 4 .Dt NETGRAPH 4
.Os .Os
.Sh NAME .Sh NAME
@ -292,7 +292,7 @@ unless specifically declared to be a reader in their definition.
(See (See
.Dv NGM_READONLY .Dv NGM_READONLY
in in
.In ng_message.h . ) .In netgraph/ng_message.h . )
.Pp .Pp
While this mode of operation While this mode of operation
results in good performance, it has a few implications for node results in good performance, it has a few implications for node
@ -840,26 +840,27 @@ and should be used as a starting point for new node writers.
.Ss Netgraph Message Structure .Ss Netgraph Message Structure
Control messages have the following structure: Control messages have the following structure:
.Bd -literal .Bd -literal
#define NG_CMDSTRSIZ 32 /* Max command string (including nul) */ #define NG_CMDSTRSIZ 32 /* Max command string (including null) */
struct ng_mesg { struct ng_mesg {
struct ng_msghdr { struct ng_msghdr {
u_char version; /* Must equal NG_VERSION */ u_char version; /* Must equal NG_VERSION */
u_char spare; /* Pad to 2 bytes */ u_char spare; /* Pad to 4 bytes */
u_short arglen; /* Length of cmd/resp data */ uint16_t spare2;
u_long flags; /* Message status flags */ uint32_t arglen; /* Length of cmd/resp data */
u_long token; /* Reply should have the same token */ uint32_t cmd; /* Command identifier */
u_long typecookie; /* Node type understanding this message */ uint32_t flags; /* Message status flags */
u_long cmd; /* Command identifier */ uint32_t token; /* Reply should have the same token */
u_char cmdstr[NG_CMDSTRSIZ]; /* Cmd string (for debug) */ uint32_t typecookie; /* Node type understanding this message */
u_char cmdstr[NG_CMDSTRSIZ]; /* cmd string + \0 */
} header; } header;
char data[0]; /* Start of cmd/resp data */ char data[]; /* placeholder for actual data */
}; };
#define NG_ABI_VERSION 5 /* Netgraph kernel ABI version */ #define NG_ABI_VERSION 12 /* Netgraph kernel ABI version */
#define NG_VERSION 4 /* Netgraph message version */ #define NG_VERSION 8 /* Netgraph message version */
#define NGF_ORIG 0x0000 /* Command */ #define NGF_ORIG 0x00000000 /* The msg is the original request */
#define NGF_RESP 0x0001 /* Response */ #define NGF_RESP 0x00000001 /* The message is a response */
.Ed .Ed
.Pp .Pp
Control messages have the fixed header shown above, followed by a Control messages have the fixed header shown above, followed by a
@ -1296,7 +1297,7 @@ Used in conjunction with
either either
.Xr ppp 8 .Xr ppp 8
or the or the
.Pa net/mpd .Pa net/mpd5
port. port.
.It BRIDGE .It BRIDGE
This node, together with the Ethernet nodes, allows a very flexible This node, together with the Ethernet nodes, allows a very flexible