summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-12-21 01:25:21 +0000
committerjulian <julian@FreeBSD.org>1999-12-21 01:25:21 +0000
commit443430016ec78bb04567a578c007b74e84575dd1 (patch)
treec186d4285318db13cd0ced96f929b0001e3d7016
parentb8abdf85cef25cc056288b6e4a2e277af4cb63ed (diff)
downloadFreeBSD-src-443430016ec78bb04567a578c007b74e84575dd1.zip
FreeBSD-src-443430016ec78bb04567a578c007b74e84575dd1.tar.gz
Manual page style work.
Submitted by: Alexey Zelkin <phantom@FreeBSD.org> thanks!
-rw-r--r--lib/libnetgraph/netgraph.353
-rw-r--r--share/man/man4/netgraph.4200
-rw-r--r--share/man/man4/ng_UI.411
-rw-r--r--share/man/man4/ng_async.419
-rw-r--r--share/man/man4/ng_bpf.435
-rw-r--r--share/man/man4/ng_cisco.423
-rw-r--r--share/man/man4/ng_echo.416
-rw-r--r--share/man/man4/ng_frame_relay.415
-rw-r--r--share/man/man4/ng_hole.416
-rw-r--r--share/man/man4/ng_iface.436
-rw-r--r--share/man/man4/ng_ksocket.427
-rw-r--r--share/man/man4/ng_lmi.413
-rw-r--r--share/man/man4/ng_ppp.415
-rw-r--r--share/man/man4/ng_pppoe.415
-rw-r--r--share/man/man4/ng_pptpgre.49
-rw-r--r--share/man/man4/ng_rfc1490.411
-rw-r--r--share/man/man4/ng_socket.419
-rw-r--r--share/man/man4/ng_tee.415
-rw-r--r--share/man/man4/ng_tty.422
-rw-r--r--share/man/man4/ng_vjc.429
-rw-r--r--sys/modules/netgraph/UI/ng_UI.411
-rw-r--r--sys/modules/netgraph/UI/ng_UI.811
-rw-r--r--sys/modules/netgraph/async/ng_async.419
-rw-r--r--sys/modules/netgraph/async/ng_async.819
-rw-r--r--sys/modules/netgraph/bpf/ng_bpf.435
-rw-r--r--sys/modules/netgraph/bpf/ng_bpf.835
-rw-r--r--sys/modules/netgraph/cisco/ng_cisco.423
-rw-r--r--sys/modules/netgraph/cisco/ng_cisco.823
-rw-r--r--sys/modules/netgraph/echo/ng_echo.416
-rw-r--r--sys/modules/netgraph/echo/ng_echo.816
-rw-r--r--sys/modules/netgraph/frame_relay/ng_frame_relay.415
-rw-r--r--sys/modules/netgraph/frame_relay/ng_frame_relay.815
-rw-r--r--sys/modules/netgraph/hole/ng_hole.416
-rw-r--r--sys/modules/netgraph/hole/ng_hole.816
-rw-r--r--sys/modules/netgraph/iface/ng_iface.436
-rw-r--r--sys/modules/netgraph/iface/ng_iface.836
-rw-r--r--sys/modules/netgraph/ksocket/ng_ksocket.427
-rw-r--r--sys/modules/netgraph/ksocket/ng_ksocket.827
-rw-r--r--sys/modules/netgraph/lmi/ng_lmi.413
-rw-r--r--sys/modules/netgraph/lmi/ng_lmi.813
-rw-r--r--sys/modules/netgraph/netgraph/netgraph.4200
-rw-r--r--sys/modules/netgraph/ppp/ng_ppp.415
-rw-r--r--sys/modules/netgraph/ppp/ng_ppp.815
-rw-r--r--sys/modules/netgraph/pppoe/ng_pppoe.415
-rw-r--r--sys/modules/netgraph/pppoe/ng_pppoe.815
-rw-r--r--sys/modules/netgraph/pptpgre/ng_pptpgre.49
-rw-r--r--sys/modules/netgraph/pptpgre/ng_pptpgre.89
-rw-r--r--sys/modules/netgraph/rfc1490/ng_rfc1490.411
-rw-r--r--sys/modules/netgraph/rfc1490/ng_rfc1490.811
-rw-r--r--sys/modules/netgraph/socket/ng_socket.419
-rw-r--r--sys/modules/netgraph/socket/ng_socket.819
-rw-r--r--sys/modules/netgraph/tee/ng_tee.415
-rw-r--r--sys/modules/netgraph/tee/ng_tee.815
-rw-r--r--sys/modules/netgraph/tty/ng_tty.422
-rw-r--r--sys/modules/netgraph/tty/ng_tty.822
-rw-r--r--sys/modules/netgraph/vjc/ng_vjc.429
-rw-r--r--sys/modules/netgraph/vjc/ng_vjc.829
-rw-r--r--usr.sbin/ngctl/ngctl.839
-rw-r--r--usr.sbin/nghook/nghook.819
59 files changed, 1059 insertions, 490 deletions
diff --git a/lib/libnetgraph/netgraph.3 b/lib/libnetgraph/netgraph.3
index 6926f96..8f33658 100644
--- a/lib/libnetgraph/netgraph.3
+++ b/lib/libnetgraph/netgraph.3
@@ -47,7 +47,7 @@
.Nm NgRecvData ,
.Nm NgSetDebug ,
.Nm NgSetErrLog
-.Nd Netgraph user library
+.Nd netgraph user library
.Sh SYNOPSIS
.Fd #include <netgraph.h>
.Ft int
@@ -78,7 +78,7 @@ These functions facilitate user-mode program participation in the kernel
graph-based networking system, by utilizing the netgraph
.Em socket
node type (see
-.Xr ng_socket 8 ")."
+.Xr ng_socket 8 ) .
.Pp
.Fn NgMkSockNode
should be called first, to create a new
@@ -130,16 +130,22 @@ The original message header should be pointed to by
.Fn NgSendAsciiMsg
performs the same function as
.Fn NgSendMsg ,
-but adds support for ASCII encoding of control messages.
+but adds support for
+.Tn ASCII
+encoding of control messages.
.Fn NgSendAsciiMsg
formats its input a la
.Xr printf 3
-and then sends the resulting ASCII string to the node in a
+and then sends the resulting
+.Tn ASCII
+string to the node in a
.Dv NGM_ASCII2BINARY
control message. The node returns a binary version of the
message, which is then sent back to the node just as with
.Fn NgSendMsg .
-Note that ASCII conversion may not be supported by all node types.
+Note that
+.Tn ASCII
+conversion may not be supported by all node types.
.Pp
.Fn NgRecvMsg
reads the next control message received by the node associated with
@@ -159,12 +165,16 @@ the node from which the message was received.
works exactly like
.Fn NgRecvMsg ,
except that after the message is received, any binary arguments
-are converted to ASCII by sending a
+are converted to
+.Tn ASCII
+by sending a
.Dv NGM_BINARY2ASCII
request back to the originating node. The result is the same as
.Fn NgRecvAsciiMsg ,
with the exception that the reply arguments field will contain
-a NUL-terminated ASCII version of the arguments (and the reply
+a NUL-terminated
+.Tn ASCII
+version of the arguments (and the reply
header argument length field will be adjusted).
.Pp
.Fn NgSendData
@@ -203,7 +213,9 @@ and
.Xr vwarnx 3 .
.Pp
At debug level 3, the library attempts to display control message arguments
-in ASCII format; however, this results in additional messages being
+in
+.Tn ASCII
+format; however, this results in additional messages being
sent which may interfere with debugging. At even higher levels,
even these additional messagages will be displayed, etc.
.Pp
@@ -219,7 +231,9 @@ User mode programs must be linked with the
flag to link in this library.
.Sh INITIALIZATION
To enable Netgraph in your kernel, either your kernel must be
-compiled with ``options NETGRAPH'' in the kernel configuration
+compiled with
+.Dq options NETGRAPH
+in the kernel configuration
file, or else the
.Xr netgraph 4
and
@@ -244,11 +258,16 @@ The node type does not know how to encode or decode the control message.
.It Bq Er ERANGE
The encoded or decoded arguments were too long for the supplied buffer.
.It Bq Er ENOENT
-An unknown structure field was seen in an ASCII control message.
+An unknown structure field was seen in an
+.Tn ASCII
+control message.
.It Bq Er EALREADY
-The same structure field was specified twice in an ASCII control message.
+The same structure field was specified twice in an
+.Tn ASCII
+control message.
.It Bq Er EINVAL
-ASCII control message parse error or illegal value.
+.Tn ASCII
+control message parse error or illegal value.
.It Bq Er E2BIG
ASCII control message array or fixed width string buffer overflow.
.El
@@ -260,8 +279,10 @@ ASCII control message array or fixed width string buffer overflow.
.Xr ng_socket 8 .
.Sh HISTORY
The
-.Em netgraph
+.Nm netgraph
system was designed and first implemented at Whistle Communications, Inc. in
-a version FreeBSD 2.2 customized for the Whistle InterJet.
-.Sh AUTHOR
-.An Archie Cobbs <archie@whistle.com>
+a version of
+.Fx 2.2
+customized for the Whistle InterJet.
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/share/man/man4/netgraph.4 b/share/man/man4/netgraph.4
index 46cc658..546aeed 100644
--- a/share/man/man4/netgraph.4
+++ b/share/man/man4/netgraph.4
@@ -80,25 +80,37 @@ to interact with other nodes in a well defined manner.
Each node has a
.Em type ,
which is a static property of the node determined at node creation time.
-A node's type is described by a unique ASCII type name.
+A node's type is described by a unique
+.Tn ASCII
+type name.
The type implies what the node does and how it may be connected
to other nodes.
.Pp
In object-oriented language, types are classes and nodes are instances
of their respective class. All node types are subclasses of the generic node
type, and hence inherit certain common functionality and capabilities
-(e.g., the ability to have an ASCII name).
+(e.g., the ability to have an
+.Tn ASCII
+name).
.Pp
-Nodes may be assigned a globally unique ASCII name which can be
+Nodes may be assigned a globally unique
+.Tn ASCII
+name which can be
used to refer to the node.
-The name must not contain the characters ``.'' or ``:'' and is limited to
+The name must not contain the characters
+.Dq \&.
+or
+.Dq \&:
+and is limited to
.Dv "NG_NODELEN + 1"
characters (including NUL byte).
.Pp
Each node instance has a unique
.Em ID number
which is expressed as a 32-bit hex value. This value may be used to
-refer to a node when there is no ASCII name assigned to it.
+refer to a node when there is no
+.Tn ASCII
+name assigned to it.
.Sh Hooks
Nodes are connected to other nodes by connecting a pair of
.Em hooks ,
@@ -110,9 +122,15 @@ Hooks have these properties:
.Pp
.Bl -bullet -compact -offset 2n
.It
-A hook has an ASCII name which is unique among all hooks
+A hook has an
+.Tn ASCII
+name which is unique among all hooks
on that node (other hooks on other nodes may have the same name).
-The name must not contain a ``.'' or a ``:'' and is
+The name must not contain a
+.Dq \&.
+or a
+.Dq \&:
+and is
limited to
.Dv "NG_HOOKLEN + 1"
characters (including NUL byte).
@@ -123,7 +141,9 @@ removing either hook destroys both hooks.
.El
.Pp
A node may decide to assign special meaning to some hooks.
-For example, connecting to the hook named ``debug'' might trigger
+For example, connecting to the hook named
+.Dq debug
+might trigger
the node to start sending debugging information to that hook.
.Sh Data Flow
Two types of information flow between nodes: data messages and
@@ -137,7 +157,8 @@ directly to some arbitrary other node. Control messages have a common
header format, followed by type-specific data, and are binary structures
for efficiency. However, node types also may support conversion of the
type specific data between binary and
-ASCII for debugging and human interface purposes (see the
+.Tn ASCII
+for debugging and human interface purposes (see the
.Dv NGM_ASCII2BINARY
and
.Dv NGM_BINARY2ASCII
@@ -146,9 +167,13 @@ these conversions.
.Pp
There are two ways to address a control message. If
there is a sequence of edges connecting the two nodes, the message
-may be ``source routed'' by specifying the corresponding sequence
+may be
+.Dq source routed
+by specifying the corresponding sequence
of hooks as the destination address for the message (relative
-addressing). Otherwise, the recipient node global ASCII name
+addressing). Otherwise, the recipient node global
+.Tn ASCII
+name
(or equivalent ID based name) is used as the destination address
for the message (absolute addressing). The two types of addressing
may be combined, by specifying an absolute start node and a sequence
@@ -156,7 +181,9 @@ of hooks.
.Pp
Messages often represent commands that are followed by a reply message
in the reverse direction. To facilitate this, the recipient of a
-control message is supplied with a ``return address'' that is suitable
+control message is supplied with a
+.Dq return address
+that is suitable
for addressing a reply.
.Pp
Each control message contains a 32 bit value called a
@@ -167,7 +194,7 @@ that it understands. However, a node may choose to recognize and
implement more than one type of message.
.Sh Netgraph is Functional
In order to minimize latency, most
-.Nm netgraph
+.Nm
operations are functional.
That is, data and control messages are delivered by making function
calls rather than by using queues and mailboxes. For example, if node
@@ -175,7 +202,9 @@ A wishes to send a data mbuf to neighboring node B, it calls the
generic
.Nm
data delivery function. This function in turn locates
-node B and calls B's ``receive data'' method. While this mode of operation
+node B and calls B's
+.Dq receive data
+method. While this mode of operation
results in good performance, it has a few implications for node
developers:
.Pp
@@ -186,13 +215,13 @@ may need to allow for the possibility of receiving a returning message
before the original delivery function call returns.
.It
Netgraph nodes and support routines generally run at
-.Dv "splnet()" .
+.Fn splnet .
However, some nodes may want to send data and control messages
from a different priority level. Netgraph supplies queueing routines which
utilize the NETISR system to move message delivery to
-.Dv "splnet()" .
+.Fn splnet .
Note that messages are always received at
-.Dv "splnet()" .
+.Fn splnet .
.It
It's possible for an infinite loop to occur if the graph contains cycles.
.El
@@ -215,7 +244,7 @@ which is both a netgraph node and a
BSD socket in the protocol family
.Dv PF_NETGRAPH .
Socket nodes allow user processes to participate in
-.Nm netgraph .
+.Nm Ns .
Other nodes communicate with socket nodes using the usual methods, and the
node hides the fact that it is also passing information to and from a
cooperating user process.
@@ -225,7 +254,7 @@ a node interface to the hardware.
.Sh Node Methods
Nodes are notified of the following actions via function calls
to the following node methods (all at
-.Dv "splnet()" )
+.Fn splnet )
and may accept or reject that action (by returning the appropriate
error code):
.Bl -tag -width xxx
@@ -235,7 +264,9 @@ allowed, the constructor must call the generic node creation
function (in object-oriented terms, the superclass constructor)
and then allocate any special resources it needs. For nodes that
correspond to hardware, this is typically done during the device
-attach routine. Often a global ASCII name corresponding to the
+attach routine. Often a global
+.Tn ASCII
+name corresponding to the
device name is assigned here as well.
.It Creation of a new hook
The hook is created and tentatively
@@ -270,7 +301,7 @@ An mbuf chain is passed to the node.
The node is notified on which hook the data arrived,
and can use this information in its processing decision.
The node must must always
-.Dv m_freem()
+.Fn m_freem
the mbuf chain on completion or error, or pass it on to another node
(or kernel module) which will then be responsible for freeing it.
.Pp
@@ -280,13 +311,13 @@ structure describing meta-data about the message
.Dv NULL
if there is no additional information. The format for this information is
described in
-.Dv netgraph.h .
+.Pa netgraph.h .
The memory for meta-data must allocated via
-.Dv malloc()
+.Fn malloc
with type
.Dv M_NETGRAPH .
As with the data itself, it is the receiver's responsibility to
-.Dv free()
+.Fn free
the meta-data. If the mbuf chain is freed the meta-data must
be freed at the same time. If the meta-data is freed but the
real data on is passed on, then a
@@ -324,14 +355,14 @@ to point to the reply.
Then when the control message delivery function returns,
the caller can check if this pointer has been made non-NULL,
and if so then it points to the reply message allocated via
-.Dv malloc()
+.Fn malloc
and containing the synchronous response. In both directions,
(request and response) it is up to the
receiver of that message to
-.Dv free()
+.Fn free
the control message buffer. All control messages and replies are
allocated with
-.Dv malloc()
+.Fn malloc
type
.Dv M_NETGRAPH .
.El
@@ -339,7 +370,9 @@ type
Much use has been made of reference counts, so that nodes being
free'd of all references are automatically freed, and this behaviour
has been tested and debugged to present a consistent and trustworthy
-framework for the ``type module'' writer to use.
+framework for the
+.Dq type module
+writer to use.
.Sh Addressing
The
.Nm
@@ -358,7 +391,11 @@ A relative address includes only the sequence of hook names, implicitly
starting hook traversal at the local node.
.Pp
There are a couple of special possibilities for the node name.
-The name ``.'' (referred to as ``.:'') always refers to the local node.
+The name
+.Dq \&.
+(referred to as
+.Dq \&.: )
+always refers to the local node.
Also, nodes that have no global name may be addressed by their ID numbers,
by enclosing the hex representation of the ID number within square brackets.
Here are some examples of valid netgraph addresses:
@@ -560,19 +597,22 @@ be changed.
The de facto method for generating unique type cookies is to take the
seconds from the epoch at the time the header file is written
(i.e., the output of
-.Dv "date -u +'%s'" ")."
+.Dv "date -u +'%s'" ) .
.Pp
There is a predefined typecookie
.Dv NGM_GENERIC_COOKIE
-for the ``generic'' node type, and
+for the
+.Dq generic
+node type, and
a corresponding set of generic messages which all nodes understand.
The handling of these messages is automatic.
.It Dv command
The identifier for the message command. This is type specific,
and is defined in the same header file as the typecookie.
.It Dv cmdstr
-Room for a short human readable version of ``command'' (for debugging
-purposes only).
+Room for a short human readable version of
+.Dq command
+(for debugging purposes only).
.El
.Pp
Some modules may choose to implement messages from more than one
@@ -580,25 +620,34 @@ of the header files and thus recognize more than one type cookie.
.Sh Control Message ASCII Form
Control messages are in binary format for efficiency. However, for
debugging and human interface purposes, and if the node type supports
-it, control messages may be converted to and from an equivalent ASCII
-form. The ASCII form is similar to the binary form, with two exceptions:
+it, control messages may be converted to and from an equivalent
+.Tn ASCII
+form. The
+.Tn ASCII
+form is similar to the binary form, with two exceptions:
.Pp
.Bl -tag -compact -width xxx
.It o
The
.Dv cmdstr
-header field must contain the ASCII name of the command, corresponding to the
+header field must contain the
+.Tn ASCII
+name of the command, corresponding to the
.Dv cmd
header field.
.It o
The
.Dv args
-field contains a NUL-terminated ASCII string version of the message arguments.
+field contains a NUL-terminated
+.Tn ASCII
+string version of the message arguments.
.El
.Pp
In general, the arguments field of a control messgage can be any
arbitrary C data type. Netgraph includes parsing routines to support
-some pre-defined datatypes in ASCII with this simple syntax:
+some pre-defined datatypes in
+.Tn ASCII
+with this simple syntax:
.Pp
.Bl -tag -compact -width xxx
.It o
@@ -616,24 +665,28 @@ does not have an explicit index, the index is implicitly the previous
element's index plus one.
.It o
Structures are enclosed in curly braces, and each field is specified
-in the form ``fieldname=value''.
+in the form
+.Dq fieldname=value .
.It o
Any array element or structure field whose value is equal to its
-``default value'' may be omitted. For integer types, the default value
+.Dq default value
+may be omitted. For integer types, the default value
is usually zero; for string types, the empty string.
.It o
Array elements and structure fields may be specified in any order.
.El
.Pp
Each node type may define its own arbitrary types by providing
-the necessary routines to parse and unparse. ASCII forms defined
+the necessary routines to parse and unparse.
+.Tn ASCII
+forms defined
for a specific node type are documented in the documentation for
that node type.
.Sh Generic Control Messages
There are a number of standard predefined messages that will work
for any node, as they are supported directly by the framework itself.
These are defined in
-.Dv ng_message.h
+.Pa ng_message.h
along with the basic layout of messages and other similar information.
.Bl -tag -width xxx
.It Dv NGM_CONNECT
@@ -655,7 +708,9 @@ is the default for nodes created using the
method. Such nodes can only be addressed relatively or by their ID number.
.It Dv NGM_RMHOOK
Ask the node to break a hook connection to one of its neighbours.
-Both nodes will have their ``disconnect'' method invoked.
+Both nodes will have their
+.Dq disconnect
+method invoked.
Either node may elect to totally shut down as a result.
.It Dv NGM_NODEINFO
Asks the target node to describe itself. The four returned fields
@@ -688,12 +743,16 @@ elect to not support this message. The text response must be less than
bytes in length (presently 1024). This can be used to return general
status information in human readable form.
.It Dv NGM_BINARY2ASCII
-This message converts a binary control message to its ASCII form.
+This message converts a binary control message to its
+.Tn ASCII
+form.
The entire control message to be converted is contained within the
arguments field of the
.Dv Dv NGM_BINARY2ASCII
message itself. If successful, the reply will contain the same control
-message in ASCII form.
+message in
+.Tn ASCII
+form.
A node will typically only know how to translate messages that it
itself understands, so the target node of the
.Dv NGM_BINARY2ASCII
@@ -701,7 +760,9 @@ is often the same node that would actually receive that message.
.It Dv NGM_ASCII2BINARY
The opposite of
.Dv NGM_BINARY2ASCII .
-The entire control message to be converted, in ASCII form, is contained
+The entire control message to be converted, in
+.Tn ASCII
+form, is contained
in the arguments section of the
.Dv NGM_ASCII2BINARY
and need only have the
@@ -765,20 +826,20 @@ node of unknown type
is made,
.Nm
will attempt to load the KLD module
-.Dv ng_type.ko .
+.Pa ng_type.ko .
.Pp
Types can also be installed at boot time, as certain device drivers
may want to export each instance of the device as a netgraph node.
.Pp
In general, new types can be installed at any time from within the
kernel by calling
-.Dv ng_newtype() ,
+.Fn ng_newtype ,
supplying a pointer to the type's
.Dv struct ng_type
structure.
.Pp
The
-.Dv "NETGRAPH_INIT()"
+.Fn NETGRAPH_INIT
macro automates this process by using a linker set.
.Sh EXISTING NODE TYPES
Several node types currently exist. Each is fully documented
@@ -808,8 +869,9 @@ calls, using a
socket address.
.Pp
.It HOLE
-Responds only to generic messages and is a ``black hole'' for data,
-Useful for testing. Always accepts new hooks.
+Responds only to generic messages and is a
+.Dq black hole
+for data, Useful for testing. Always accepts new hooks.
.Pp
.It ECHO
Responds only to generic messages and always echoes data back through the
@@ -817,7 +879,9 @@ hook from which it arrived. Returns any non generic messages as their
own response. Useful for testing. Always accepts new hooks.
.Pp
.It TEE
-This node is useful for ``snooping.'' It has 4 hooks:
+This node is useful for
+.Dq snooping .
+It has 4 hooks:
.Dv left ,
.Dv right ,
.Dv left2right ,
@@ -836,24 +900,31 @@ to left.
.Pp
.It RFC1490 MUX
Encapsulates/de-encapsulates frames encoded according to RFC 1490.
-Has a hook for the encapsulated packets (``downstream'') and one hook
+Has a hook for the encapsulated packets
+.Pq Dq downstream
+and one hook
for each protocol (i.e., IP, PPP, etc.).
.Pp
.It FRAME RELAY MUX
Encapsulates/de-encapsulates Frame Relay frames.
-Has a hook for the encapsulated packets (``downstream'') and one hook
+Has a hook for the encapsulated packets
+.Pq Dq downstream
+and one hook
for each DLCI.
.Pp
.It FRAME RELAY LMI
Automatically handles frame relay
-``LMI'' (link management interface) operations and packets.
+.Dq LMI
+(link management interface) operations and packets.
Automatically probes and detects which of several LMI standards
is in use at the exchange.
.Pp
.It TTY
This node is also a line discipline. It simply converts between mbuf
frames and sequential serial data, allowing a tty to appear as a netgraph
-node. It has a programmable ``hotkey'' character.
+node. It has a programmable
+.Dq hotkey
+character.
.Pp
.It ASYNC
This node encapsulates and de-encapsulates asynchronous frames
@@ -891,14 +962,14 @@ It might be freed by any node the data passes through, and a
.Dv NULL
passed onwards, but the caller will never free it.
Two macros
-.Dv "NG_FREE_META(meta)"
+.Fn NG_FREE_META "meta"
and
-.Dv "NG_FREE_DATA(m, meta)"
+.Fn NG_FREE_DATA "m" "meta"
should be used if possible to free data and meta data (see
-.Dv netgraph.h ")."
+.Pa netgraph.h ) .
.It 3
Messages sent using
-.Dv ng_send_message()
+.Fn ng_send_message
are freed by the callee. As in the case above, the addresses
associated with the message are freed by whatever allocated them so the
recipient should copy them if it wants to keep that information.
@@ -974,7 +1045,10 @@ and
The
.Nm
system was designed and first implemented at Whistle Communications, Inc.
-in a version FreeBSD 2.2 customized for the Whistle InterJet.
+in a version
+.Fx 2.2
+customized for the Whistle InterJet.
.Sh AUTHORS
-Julian Elischer <julian@whistle.com>, with contributions by
-Archie Cobbs <archie@whistle.com>.
+.An Julian Elischer Aq julian@whistle.com ,
+with contributions by
+.An Archie Cobbs Aq archie@whistle.com .
diff --git a/share/man/man4/ng_UI.4 b/share/man/man4/ng_UI.4
index 74b6832..ab551bb 100644
--- a/share/man/man4/ng_UI.4
+++ b/share/man/man4/ng_UI.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_UI 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_UI
.Nd UI netgraph node type
@@ -82,5 +82,10 @@ control message, or when both hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/share/man/man4/ng_async.4 b/share/man/man4/ng_async.4
index 7c061c9..6f9693e 100644
--- a/share/man/man4/ng_async.4
+++ b/share/man/man4/ng_async.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_ASYNC 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_async
.Nd asynchronous framing netgraph node type
@@ -75,7 +75,9 @@ is enabled for that frame (in PPP, LCP packets are always sent with
no address and control field compression and all control characters
escaped).
.Pp
-This node supports ``flag sharing'' for packets transmitted on
+This node supports
+.Dq flag sharing
+for packets transmitted on
.Dv async .
This is an optimization where the trailing flag byte
of one frame is shared with the opening flag byte of the next.
@@ -122,7 +124,9 @@ struct ng_async_cfg {
The
.Dv enabled
field enables or disables all encoding/decoding functions (default disabled).
-When disabled, the node operates in simple ``pass through'' mode.
+When disabled, the node operates in simple
+.Dq pass through
+mode.
The
.Dv amru
and
@@ -156,5 +160,10 @@ control message, or when all hooks have been disconnected.
.%T "The Point-to-Point Protocol (PPP)"
.%O RFC 1661
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/share/man/man4/ng_bpf.4 b/share/man/man4/ng_bpf.4
index e9079ea..ef33495 100644
--- a/share/man/man4/ng_bpf.4
+++ b/share/man/man4/ng_bpf.4
@@ -37,7 +37,7 @@
.\"
.Dd December 2, 1999
.Dt NG_BPF 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_bpf
.Nd Berkeley packet filter netgraph node type
@@ -48,17 +48,17 @@
The
.Nm bpf
node type allows Berkeley Packet Filter (see
-.Xr bpf 8 )
+.Xr bpf 4 )
filters to be applied to data travelling through a Netgraph network.
Each node allows an arbitrary number of connections to arbitrarily
named hooks. With each hook is associated a
-.Xf bpf 8
+.Xf bpf 4
filter program which is applied to incoming data only, a destination hook
for matching packets, a destination hook for non-matching packets,
and various statistics counters.
.Pp
A
-.Xr bpf 8
+.Xr bpf 4
program returns an unsigned integer, which is normally interpreted as
the length of the prefix of the packet to return. In the context of this
node type, returning zero is considered a non-match, in which case the
@@ -102,21 +102,27 @@ Matching and non-matching incoming packets are delivered out the hooks named
and
.Dv ifNotMatch ,
respectively. The program must be a valid
-.Xr bpf 8
+.Xr bpf 4
program or else
.Er EINVAL
is returned.
.It Dv NGM_BPF_GET_FILTER
-This command takes an ASCII string argument, the hook name, and returns the
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
corresponding
.Dv "struct ngm_bpf_hookprog"
as shown above.
.It Dv NGM_BPF_GET_STATS
-This command takes an ASCII string argument, the hook name, and returns the
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
statistics associated with the hook as a
.Dv "struct ng_bpf_hookstat" .
.It Dv NGM_BPF_CLR_STATS
-This command takes an ASCII string argument, the hook name, and clears the
+This command takes an
+.Tn ASCII
+string argument, the hook name, and clears the
statistics associated with the hook.
.It Dv NGM_BPF_GETCLR_STATS
This command is identical to
@@ -129,15 +135,20 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh BUGS
When built as a loadable kernel module, this module includes the file
-.Dv "net/bpf_filter.c" .
+.Pa net/bpf_filter.c .
Although loading the module should fail if
-.Dv "net/bpf_filter.c"
+.Pa net/bpf_filter.c
already exists in the kernel, currently it does not, and the duplicate
copies of the file do not interfere.
However, this may change in the future.
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr bpf 4 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/share/man/man4/ng_cisco.4 b/share/man/man4/ng_cisco.4
index 26370cd..03ffcb4 100644
--- a/share/man/man4/ng_cisco.4
+++ b/share/man/man4/ng_cisco.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_CISCO 8
-.Os FreeBSD 3
+.Os FreeBSD
.Sh NAME
.Nm ng_cisco
.Nd Cisco HDLC protocol netgraph node type
@@ -52,7 +52,10 @@ using the Cisco HDLC protocol. This is a fairly simple
protocol for the transmission of packets across
high speed synchronous lines. Each packet is prepended with
an Ethertype, indicating the protocol. There is also a
-``keep alive'' and an ``inquire'' capability.
+.Dq keep alive
+and an
+.Dq inquire
+capability.
.Pp
The
.Dv downstream
@@ -70,7 +73,9 @@ type node.
.Sh IP Configuration
In order to function properly for IP traffic, the node must be informed
of the local IP address and netmask setting. This is because the protocol
-includes an ``inquire'' packet which we must be prepared to answer.
+includes an
+.Dq inquire
+packet which we must be prepared to answer.
There are two ways to accomplish this, manually and automatically.
.Pp
Whenever such an inquire packet is received, the node sends a
@@ -154,7 +159,13 @@ and netmask.
.%O RFC 1547
.Re
.Sh LEGAL
-Cisco is a trademark of Cisco Systems, Inc.
+.Tn Cisco
+is a trademark of Cisco Systems, Inc.
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
.Sh AUTHORS
-Julian Elischer <julian@whistle.com>,
-Archie Cobbs <archie@whistle.com>
+.An Julian Elischer Aq julian@whistle.com ,
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/share/man/man4/ng_echo.4 b/share/man/man4/ng_echo.4
index 7e22a6f..bdef682 100644
--- a/share/man/man4/ng_echo.4
+++ b/share/man/man4/ng_echo.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_ECHO 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_echo
.Nd netgraph echo node type
@@ -49,8 +49,9 @@ The
node type reflects all data and control messages back to the sender.
This node type is used for testing and debugging.
.Sh HOOKS
-.Nm Echo
-nodes accept any request to connect, regardless of the hook name,
+A
+.Nm echo
+node accepts any request to connect, regardless of the hook name,
as long as the name is unique.
.Sh CONTROL MESSAGES
This node type supports only the generic control messages.
@@ -63,5 +64,10 @@ control message, or when all hooks have been disconnected.
.Xr netgraph 4 ,
.Xr ng_hole 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/share/man/man4/ng_frame_relay.4 b/share/man/man4/ng_frame_relay.4
index fc9ef0f..7686d0e 100644
--- a/share/man/man4/ng_frame_relay.4
+++ b/share/man/man4/ng_frame_relay.4
@@ -37,10 +37,10 @@
.\"
.Dd January 19, 1999
.Dt NG_FRAME_RELAY 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_frame_relay
-.Nd Frame relay netgraph node type
+.Nd frame relay netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_frame_relay.h>
.Sh DESCRIPTION
@@ -80,7 +80,7 @@ control message, or when all hooks have been disconnected.
Technically, frames on DLCI X should not be transmitted to the switch
until the LMI protocol entity on both ends has configured DLCI X as active.
The
-.Nm frame_relay
+.Nm
node type ignores this restriction, and will always pass data received
on a DLCI hook to
.Dv downstream .
@@ -89,5 +89,10 @@ Instead, it should query the LMI node first.
.Xr netgraph 4 ,
.Xr ng_lmi 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/share/man/man4/ng_hole.4 b/share/man/man4/ng_hole.4
index 472b22c..f1a7014 100644
--- a/share/man/man4/ng_hole.4
+++ b/share/man/man4/ng_hole.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_HOLE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_hole
.Nd netgraph discard node type
@@ -49,8 +49,9 @@ The
node type silently discards all data and control messages it receives.
This type is used for testing and debugging.
.Sh HOOKS
-.Nm Hole
-nodes accept any request to connect, regardless of the hook name,
+A
+.Nm
+node accepts any request to connect, regardless of the hook name,
as long as the name is unique.
.Sh CONTROL MESSAGES
This node type supports only the generic control messages.
@@ -63,5 +64,10 @@ control message, or when all hooks have been disconnected.
.Xr netgraph 4 ,
.Xr ng_echo 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/share/man/man4/ng_iface.4 b/share/man/man4/ng_iface.4
index 376b5c5..40c6f88 100644
--- a/share/man/man4/ng_iface.4
+++ b/share/man/man4/ng_iface.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_IFACE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_iface
.Nd interface netgraph node type
@@ -47,7 +47,7 @@
An
.Nm iface
node is both a netgraph node and a system networking interface. When an
-.Nm iface
+.Nm
node is created, a new point-to-point interface appears which is accessible via
.Xr ifconfig 8 .
The new interfaces are named
@@ -56,8 +56,9 @@ The new interfaces are named
etc. The node is assigned the same name as its interface, unless the name
already exists, in which case the node remains unnamed.
.Pp
-.Nm Iface
-nodes have a single hook corresponding to each supported protocol.
+An
+.Nm
+node has a single hook corresponding to each supported protocol.
Packets transmitted via the interface flow out the corresponding
protocol-specific hook.
Similarly, packets received on a hook appear on the interface as
@@ -66,8 +67,9 @@ packets received in the corresponding protocol.
The currently supported protocols are IP, IPX, AppleTalk, and NS.
In the KLD module, only support for IP is compiled in by default.
.Pp
-.Nm Iface
-nodes support the Berkeley Packet Filter (BPF).
+An
+.Nm
+node supports the Berkeley Packet Filter (BPF).
.Sh HOOKS
This node type supports the following hooks:
.Pp
@@ -96,7 +98,7 @@ struct ng_iface_ifname {
Returns the list of addresses associated with this interface.
The list is returned in the same format as the
.Dv SIOCGIFCONF
-ioctl().
+.Fn ioctl .
.It Dv NGM_CISCO_GET_IPADDR
This message is defined by the
.Xr ng_cisco 8
@@ -106,8 +108,9 @@ for a description.
.El
.Sh SHUTDOWN
Because it is currently not possible to remove a system networking
-interface in FreeBSD,
-.Nm iface
+interface in
+.Fx ,
+.Nm
nodes are
.Em persistent.
That is, once created they are never destroyed.
@@ -115,12 +118,17 @@ The receipt of a
.Dv NGM_SHUTDOWN
control message disconnects all hooks but does not remove the node.
.Sh SEE ALSO
-.Xr netgraph 4 ,
.Xr bpf 4 ,
+.Xr netgraph 4 ,
+.Xr ifconfig 8 ,
.Xr ng_cisco 8 ,
.Xr ng_ppp 8 ,
.Xr ng_rfc1490 8 ,
-.Xr ngctl 8 ,
-.Xr ifconfig 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Xr ngctl 8 .
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/share/man/man4/ng_ksocket.4 b/share/man/man4/ng_ksocket.4
index d32c2cf..c5fdc3b 100644
--- a/share/man/man4/ng_ksocket.4
+++ b/share/man/man4/ng_ksocket.4
@@ -46,21 +46,21 @@
A
.Nm ksocket
node is both a netgraph node and a BSD socket. The
-.Nm ksocket
+.Nm
node type allows one to open a socket inside the kernel and have
it appear as a Netgraph node. The
-.Nm ksocket
+.Nm
node type is the reverse of the socket node type (see
-.Xr ng_socket 8 "):"
+.Xr ng_socket 8 ) :
whereas the socket node type enables the user-level manipulation (via
a socket) of what is normally a kernel-level entity (the associated
Netgraph node), the
-.Nm ksocket
+.Nm
node type enables the kernel-level manipulation (via a Netgraph node) of
what is normally a user-level entity (the associated socket).
.Pp
A
-.Nm ksocket
+.Nm
node allows at most one hook connection. Connecting to the node is
equivalent to opening the associated socket. The name given to the hook
determines what kind of socket the node will open (see below).
@@ -136,7 +136,9 @@ retrieved value.
.Sh ASCII FORM CONTROL MESSAGES
For control messages that pass a
.Dv "struct sockaddr"
-in the argument field, the normal ASCII equivalent of the C structure
+in the argument field, the normal
+.Tn ASCII
+equivalent of the C structure
is an acceptable form. For the
.Dv PF_INET
and
@@ -162,7 +164,9 @@ local/"/tmp/foo.socket"
.Pp
For control messages that pass a
.Dv "struct ng_ksocket_sockopt" ,
-the normal ASCII form for that structure is used. In the future, more
+the normal
+.Tn ASCII
+form for that structure is used. In the future, more
convenient encoding of the more common socket options may be supported.
.Sh SHUTDOWN
This node shuts down upon receipt of a
@@ -174,5 +178,10 @@ Shutdown of the node closes the associated socket.
.Xr netgraph 4 ,
.Xr ng_socket 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/share/man/man4/ng_lmi.4 b/share/man/man4/ng_lmi.4
index 2ce52a7..d03c018 100644
--- a/share/man/man4/ng_lmi.4
+++ b/share/man/man4/ng_lmi.4
@@ -37,10 +37,10 @@
.\"
.Dd January 19, 1999
.Dt NG_LMI 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_lmi
-.Nd Frame relay LMI protocol netgraph node type
+.Nd frame relay LMI protocol netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_lmi.h>
.Sh DESCRIPTION
@@ -126,5 +126,10 @@ control message, or when all hooks have been disconnected.
.Rs
.%T "ITU-T Q.933 Digital Subscriber Signaling System No. 1 - Signaling Specification for Frame Mode Basic Call Control, Annex A"
.Re
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/share/man/man4/ng_ppp.4 b/share/man/man4/ng_ppp.4
index ac23ee4..96045e0 100644
--- a/share/man/man4/ng_ppp.4
+++ b/share/man/man4/ng_ppp.4
@@ -66,7 +66,7 @@ hook which is used to handle any protocol not directly supported
by the node. This includes all of the control protocols: LCP, IPCP,
CCP, etc. Typically this node is connected to a user-land daemon
via a
-.Xr ng_socket(8)
+.Xr ng_socket 8
type node.
.Sh ENABLING FUNCTIONALITY
In general, the PPP node enables a specific link or functionality when
@@ -153,7 +153,9 @@ hooks are connected, and the corresponding configuration flag is
enabled, Van Jacobsen compression and/or decompression will become active.
Normally these hooks connect to the corresponding hooks of a single
.Xr ng_vjc 8
-node. The PPP node is compatible with the ``pass through'' modes of the
+node. The PPP node is compatible with the
+.Dq pass through
+modes of the
.Xr ng_vjc 8
node type.
.Sh BYPASS HOOK
@@ -375,5 +377,10 @@ control message, or when all hooks have been disconnected.
.%T "The PPP Multilink Protocol (MP)"
.%O RFC 1990
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/share/man/man4/ng_pppoe.4 b/share/man/man4/ng_pppoe.4
index 69d0016..60c4069 100644
--- a/share/man/man4/ng_pppoe.4
+++ b/share/man/man4/ng_pppoe.4
@@ -37,7 +37,7 @@
.\"
.Dd October 28, 1999
.Dt NG_PPPOE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_pppoe
.Nd RFC 2516 PPPOE protocol netgraph node type
@@ -46,7 +46,7 @@
.Fd #include <netgraph/ng_pppoe.h>
.Sh DESCRIPTION
The
-.Nm
+.Nm pppoe
node type performs the PPPoE protocol. It is used in conjunction with the
.Xr netgraph 4
extensions to the Ethernet framework to divert and inject Ethernet packets
@@ -164,7 +164,7 @@ This node shuts down upon receipt of a
control message, when all session have been disconnected or when the
.Dv ethernet
hook is disconnected.
-.Sh EXAMPLE USAGE
+.Sh EXAMPLES
The following code uses
.Dv libnetgraph
to set up a
@@ -395,5 +395,10 @@ setup(char *ethername, char *service, char *sessname,
.%T "A Method for transmitting PPP over Ethernet (PPPoE)"
.%O RFC 2516
.Re
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/share/man/man4/ng_pptpgre.4 b/share/man/man4/ng_pptpgre.4
index 7eadcc3..8685be8 100644
--- a/share/man/man4/ng_pptpgre.4
+++ b/share/man/man4/ng_pptpgre.4
@@ -132,5 +132,10 @@ control message, or when both hooks have been disconnected.
.%T "Generic Routing Encapsulation over IPv4 networks"
.%O RFC 1702
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/share/man/man4/ng_rfc1490.4 b/share/man/man4/ng_rfc1490.4
index a2aa9d0..f8d3e01 100644
--- a/share/man/man4/ng_rfc1490.4
+++ b/share/man/man4/ng_rfc1490.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_RFC1490 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_rfc1490
.Nd RFC 1490 netgraph node type
@@ -105,5 +105,10 @@ Not all of RFC 1490 is implemented.
.%T "PPP in Frame Relay"
.%O RFC 1973
.Re
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/share/man/man4/ng_socket.4 b/share/man/man4/ng_socket.4
index cb224bc..2a43b6a 100644
--- a/share/man/man4/ng_socket.4
+++ b/share/man/man4/ng_socket.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_SOCKET 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_socket
.Nd netgraph socket node type
@@ -48,7 +48,7 @@
A
.Nm socket
node is both a BSD socket and a netgraph node. The
-.Nm socket
+.Nm
node type allows user-mode processes to participate in the kernel
.Xr netgraph 4
networking subsystem using the BSD socket interface. The process must have
@@ -56,7 +56,7 @@ root privileges to be able to create netgraph sockets however once created,
any process that has one may use it.
.Pp
A new
-.Nm socket
+.Nm
node is created by creating a new socket of type
.Dv NG_CONTROL
in the protocol family
@@ -85,13 +85,13 @@ To transmit and receive netgraph data packets, a
socket must also be created using
.Xr socket 2
and associated with a
-.Nm socket
+.Nm
node.
.Dv NG_DATA sockets do not automatically
have nodes associated with them; they are bound to a specific node via the
.Xr connect 2
system call. The address argument is the netgraph address of the
-.Nm socket
+.Nm
node already created. Once a data socket is associated with a node,
any data packets received by the node are read using
.Xr recvfrom 2
@@ -169,5 +169,10 @@ socket).
.Xr netgraph 4 ,
.Xr ng_ksocket 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/share/man/man4/ng_tee.4 b/share/man/man4/ng_tee.4
index 1a774e6..6116d27 100644
--- a/share/man/man4/ng_tee.4
+++ b/share/man/man4/ng_tee.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_TEE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_tee
.Nd netgraph ``tee'' node type
@@ -50,7 +50,9 @@ node type has a purpose similar to the
.Xr tee 1
command.
.Nm Tee
-nodes are useful for debugging or ``snooping'' on a connection
+nodes are useful for debugging or
+.Dq snooping
+on a connection
between two netgraph nodes.
.Nm Tee
nodes have four hooks,
@@ -113,5 +115,10 @@ control message, or when all hooks have been disconnected.
.Xr tee 1 ,
.Xr netgraph 4 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/share/man/man4/ng_tty.4 b/share/man/man4/ng_tty.4
index c3f0aa5..de4a4c2 100644
--- a/share/man/man4/ng_tty.4
+++ b/share/man/man4/ng_tty.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_TTY 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_tty
.Nd netgraph node type that is also a line discipline
@@ -52,7 +52,7 @@ node type is both a netgraph node type and a line discipline.
A new node is created when the corresponding line discipline,
.Dv NETGRAPHDISC ,
is registered on a tty device (see
-.Xr tty 4 ")."
+.Xr tty 4 ) .
.Pp
The node has a single hook called
.Dv hook .
@@ -65,7 +65,9 @@ While the line discipline is installed on a tty, the normal
read and write operations are unavailable, returning
.Er EIO .
.Pp
-The node supports an optional ``hot character.'' If set to non-zero, incoming
+The node supports an optional
+.Dq hot character .
+If set to non-zero, incoming
data from the tty device is queued until this character is seen.
This avoids sending lots of mbufs containing a small number of bytes,
but introduces potentially infinite latency.
@@ -114,11 +116,12 @@ The
control message is not valid, and always returns the error
.Er EOPNOTSUPP .
.Sh BUGS
-The serial driver code also has a notion of a ``hot character.''
+The serial driver code also has a notion of a
+.Dq hot character .
Unfortunately, this value is statically defined in terms of the
line discipline and cannot be changed.
Therefore, if a hot character other than 0x7e (the default) is set for the
-.Nm tty
+.Nm
node, the node has no way to convey this information to the
serial driver, and sub-optimal performance may result.
.Sh SEE ALSO
@@ -127,5 +130,10 @@ serial driver, and sub-optimal performance may result.
.Xr tty 4 ,
.Xr ng_async 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/share/man/man4/ng_vjc.4 b/share/man/man4/ng_vjc.4
index c86be55..768dc80 100644
--- a/share/man/man4/ng_vjc.4
+++ b/share/man/man4/ng_vjc.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_VJC 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_vjc
.Nd Van Jacobsen compression netgraph node type
@@ -60,10 +60,14 @@ nodes represent the compressed side of the node. Packets received on the
.Dv ip
will be compressed or passed through as appropriate. Packets received
on the other three hooks will be uncompressed as appropriate.
-This node also supports ``always pass through'' mode in either direction.
+This node also supports
+.Dq always pass through
+mode in either direction.
.Pp
Van Jacobsen compression only applies to TCP packets.
-Only ``normal'' (i.e., common case) TCP packets are actually compressed.
+Only
+.Dq normal
+(i.e., common case) TCP packets are actually compressed.
These are output on the
.Dv vjcomp
hook. Other TCP packets are run through the state machine but not
@@ -138,7 +142,9 @@ and
hooks.
When a node is first created,
both compression and decompression are disabled and the node is
-therefore operating in bi-directional ``pass through'' mode.
+therefore operating in bi-directional
+.Dq pass through
+mode.
.Pp
When enabling compression,
.Dv maxChannel
@@ -155,7 +161,7 @@ message is immediately sent whenever this occurs.
This command returns the node's current state described by the
.Dv "struct slcompress"
structure, which is defined in
-.Dv "net/slcompress.h" .
+.Pa net/slcompress.h .
.It Dv NGM_VJC_CLR_STATS
Clears the node statistics counters. Statistics are also cleared whenever the
.Dv enableComp
@@ -185,9 +191,9 @@ both enabled. This of course resets the node state. This restriction
may be lifted in a later version.
.Pp
When built as a loadable kernel module, this module includes the file
-.Dv "net/slcompress.c" .
+.Pa net/slcompress.c .
Although loading the module should fail if
-.Dv "net/slcompress.c"
+.Pa net/slcompress.c
already exists in the kernel, currently it does not, and the duplicate
copies of the file do not interfere.
However, this may change in the future.
@@ -206,5 +212,10 @@ However, this may change in the future.
.%T "The PPP Internet Control Protocol (IPCP)"
.%O RFC 1332
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/UI/ng_UI.4 b/sys/modules/netgraph/UI/ng_UI.4
index 74b6832..ab551bb 100644
--- a/sys/modules/netgraph/UI/ng_UI.4
+++ b/sys/modules/netgraph/UI/ng_UI.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_UI 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_UI
.Nd UI netgraph node type
@@ -82,5 +82,10 @@ control message, or when both hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/UI/ng_UI.8 b/sys/modules/netgraph/UI/ng_UI.8
index 74b6832..ab551bb 100644
--- a/sys/modules/netgraph/UI/ng_UI.8
+++ b/sys/modules/netgraph/UI/ng_UI.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_UI 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_UI
.Nd UI netgraph node type
@@ -82,5 +82,10 @@ control message, or when both hooks have been disconnected.
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/async/ng_async.4 b/sys/modules/netgraph/async/ng_async.4
index 7c061c9..6f9693e 100644
--- a/sys/modules/netgraph/async/ng_async.4
+++ b/sys/modules/netgraph/async/ng_async.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_ASYNC 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_async
.Nd asynchronous framing netgraph node type
@@ -75,7 +75,9 @@ is enabled for that frame (in PPP, LCP packets are always sent with
no address and control field compression and all control characters
escaped).
.Pp
-This node supports ``flag sharing'' for packets transmitted on
+This node supports
+.Dq flag sharing
+for packets transmitted on
.Dv async .
This is an optimization where the trailing flag byte
of one frame is shared with the opening flag byte of the next.
@@ -122,7 +124,9 @@ struct ng_async_cfg {
The
.Dv enabled
field enables or disables all encoding/decoding functions (default disabled).
-When disabled, the node operates in simple ``pass through'' mode.
+When disabled, the node operates in simple
+.Dq pass through
+mode.
The
.Dv amru
and
@@ -156,5 +160,10 @@ control message, or when all hooks have been disconnected.
.%T "The Point-to-Point Protocol (PPP)"
.%O RFC 1661
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/async/ng_async.8 b/sys/modules/netgraph/async/ng_async.8
index 7c061c9..6f9693e 100644
--- a/sys/modules/netgraph/async/ng_async.8
+++ b/sys/modules/netgraph/async/ng_async.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_ASYNC 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_async
.Nd asynchronous framing netgraph node type
@@ -75,7 +75,9 @@ is enabled for that frame (in PPP, LCP packets are always sent with
no address and control field compression and all control characters
escaped).
.Pp
-This node supports ``flag sharing'' for packets transmitted on
+This node supports
+.Dq flag sharing
+for packets transmitted on
.Dv async .
This is an optimization where the trailing flag byte
of one frame is shared with the opening flag byte of the next.
@@ -122,7 +124,9 @@ struct ng_async_cfg {
The
.Dv enabled
field enables or disables all encoding/decoding functions (default disabled).
-When disabled, the node operates in simple ``pass through'' mode.
+When disabled, the node operates in simple
+.Dq pass through
+mode.
The
.Dv amru
and
@@ -156,5 +160,10 @@ control message, or when all hooks have been disconnected.
.%T "The Point-to-Point Protocol (PPP)"
.%O RFC 1661
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/bpf/ng_bpf.4 b/sys/modules/netgraph/bpf/ng_bpf.4
index e9079ea..ef33495 100644
--- a/sys/modules/netgraph/bpf/ng_bpf.4
+++ b/sys/modules/netgraph/bpf/ng_bpf.4
@@ -37,7 +37,7 @@
.\"
.Dd December 2, 1999
.Dt NG_BPF 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_bpf
.Nd Berkeley packet filter netgraph node type
@@ -48,17 +48,17 @@
The
.Nm bpf
node type allows Berkeley Packet Filter (see
-.Xr bpf 8 )
+.Xr bpf 4 )
filters to be applied to data travelling through a Netgraph network.
Each node allows an arbitrary number of connections to arbitrarily
named hooks. With each hook is associated a
-.Xf bpf 8
+.Xf bpf 4
filter program which is applied to incoming data only, a destination hook
for matching packets, a destination hook for non-matching packets,
and various statistics counters.
.Pp
A
-.Xr bpf 8
+.Xr bpf 4
program returns an unsigned integer, which is normally interpreted as
the length of the prefix of the packet to return. In the context of this
node type, returning zero is considered a non-match, in which case the
@@ -102,21 +102,27 @@ Matching and non-matching incoming packets are delivered out the hooks named
and
.Dv ifNotMatch ,
respectively. The program must be a valid
-.Xr bpf 8
+.Xr bpf 4
program or else
.Er EINVAL
is returned.
.It Dv NGM_BPF_GET_FILTER
-This command takes an ASCII string argument, the hook name, and returns the
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
corresponding
.Dv "struct ngm_bpf_hookprog"
as shown above.
.It Dv NGM_BPF_GET_STATS
-This command takes an ASCII string argument, the hook name, and returns the
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
statistics associated with the hook as a
.Dv "struct ng_bpf_hookstat" .
.It Dv NGM_BPF_CLR_STATS
-This command takes an ASCII string argument, the hook name, and clears the
+This command takes an
+.Tn ASCII
+string argument, the hook name, and clears the
statistics associated with the hook.
.It Dv NGM_BPF_GETCLR_STATS
This command is identical to
@@ -129,15 +135,20 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh BUGS
When built as a loadable kernel module, this module includes the file
-.Dv "net/bpf_filter.c" .
+.Pa net/bpf_filter.c .
Although loading the module should fail if
-.Dv "net/bpf_filter.c"
+.Pa net/bpf_filter.c
already exists in the kernel, currently it does not, and the duplicate
copies of the file do not interfere.
However, this may change in the future.
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr bpf 4 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/bpf/ng_bpf.8 b/sys/modules/netgraph/bpf/ng_bpf.8
index e9079ea..ef33495 100644
--- a/sys/modules/netgraph/bpf/ng_bpf.8
+++ b/sys/modules/netgraph/bpf/ng_bpf.8
@@ -37,7 +37,7 @@
.\"
.Dd December 2, 1999
.Dt NG_BPF 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_bpf
.Nd Berkeley packet filter netgraph node type
@@ -48,17 +48,17 @@
The
.Nm bpf
node type allows Berkeley Packet Filter (see
-.Xr bpf 8 )
+.Xr bpf 4 )
filters to be applied to data travelling through a Netgraph network.
Each node allows an arbitrary number of connections to arbitrarily
named hooks. With each hook is associated a
-.Xf bpf 8
+.Xf bpf 4
filter program which is applied to incoming data only, a destination hook
for matching packets, a destination hook for non-matching packets,
and various statistics counters.
.Pp
A
-.Xr bpf 8
+.Xr bpf 4
program returns an unsigned integer, which is normally interpreted as
the length of the prefix of the packet to return. In the context of this
node type, returning zero is considered a non-match, in which case the
@@ -102,21 +102,27 @@ Matching and non-matching incoming packets are delivered out the hooks named
and
.Dv ifNotMatch ,
respectively. The program must be a valid
-.Xr bpf 8
+.Xr bpf 4
program or else
.Er EINVAL
is returned.
.It Dv NGM_BPF_GET_FILTER
-This command takes an ASCII string argument, the hook name, and returns the
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
corresponding
.Dv "struct ngm_bpf_hookprog"
as shown above.
.It Dv NGM_BPF_GET_STATS
-This command takes an ASCII string argument, the hook name, and returns the
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
statistics associated with the hook as a
.Dv "struct ng_bpf_hookstat" .
.It Dv NGM_BPF_CLR_STATS
-This command takes an ASCII string argument, the hook name, and clears the
+This command takes an
+.Tn ASCII
+string argument, the hook name, and clears the
statistics associated with the hook.
.It Dv NGM_BPF_GETCLR_STATS
This command is identical to
@@ -129,15 +135,20 @@ This node shuts down upon receipt of a
control message, or when all hooks have been disconnected.
.Sh BUGS
When built as a loadable kernel module, this module includes the file
-.Dv "net/bpf_filter.c" .
+.Pa net/bpf_filter.c .
Although loading the module should fail if
-.Dv "net/bpf_filter.c"
+.Pa net/bpf_filter.c
already exists in the kernel, currently it does not, and the duplicate
copies of the file do not interfere.
However, this may change in the future.
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
.Sh SEE ALSO
.Xr netgraph 4 ,
.Xr bpf 4 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/cisco/ng_cisco.4 b/sys/modules/netgraph/cisco/ng_cisco.4
index 26370cd..03ffcb4 100644
--- a/sys/modules/netgraph/cisco/ng_cisco.4
+++ b/sys/modules/netgraph/cisco/ng_cisco.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_CISCO 8
-.Os FreeBSD 3
+.Os FreeBSD
.Sh NAME
.Nm ng_cisco
.Nd Cisco HDLC protocol netgraph node type
@@ -52,7 +52,10 @@ using the Cisco HDLC protocol. This is a fairly simple
protocol for the transmission of packets across
high speed synchronous lines. Each packet is prepended with
an Ethertype, indicating the protocol. There is also a
-``keep alive'' and an ``inquire'' capability.
+.Dq keep alive
+and an
+.Dq inquire
+capability.
.Pp
The
.Dv downstream
@@ -70,7 +73,9 @@ type node.
.Sh IP Configuration
In order to function properly for IP traffic, the node must be informed
of the local IP address and netmask setting. This is because the protocol
-includes an ``inquire'' packet which we must be prepared to answer.
+includes an
+.Dq inquire
+packet which we must be prepared to answer.
There are two ways to accomplish this, manually and automatically.
.Pp
Whenever such an inquire packet is received, the node sends a
@@ -154,7 +159,13 @@ and netmask.
.%O RFC 1547
.Re
.Sh LEGAL
-Cisco is a trademark of Cisco Systems, Inc.
+.Tn Cisco
+is a trademark of Cisco Systems, Inc.
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
.Sh AUTHORS
-Julian Elischer <julian@whistle.com>,
-Archie Cobbs <archie@whistle.com>
+.An Julian Elischer Aq julian@whistle.com ,
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/cisco/ng_cisco.8 b/sys/modules/netgraph/cisco/ng_cisco.8
index 26370cd..03ffcb4 100644
--- a/sys/modules/netgraph/cisco/ng_cisco.8
+++ b/sys/modules/netgraph/cisco/ng_cisco.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_CISCO 8
-.Os FreeBSD 3
+.Os FreeBSD
.Sh NAME
.Nm ng_cisco
.Nd Cisco HDLC protocol netgraph node type
@@ -52,7 +52,10 @@ using the Cisco HDLC protocol. This is a fairly simple
protocol for the transmission of packets across
high speed synchronous lines. Each packet is prepended with
an Ethertype, indicating the protocol. There is also a
-``keep alive'' and an ``inquire'' capability.
+.Dq keep alive
+and an
+.Dq inquire
+capability.
.Pp
The
.Dv downstream
@@ -70,7 +73,9 @@ type node.
.Sh IP Configuration
In order to function properly for IP traffic, the node must be informed
of the local IP address and netmask setting. This is because the protocol
-includes an ``inquire'' packet which we must be prepared to answer.
+includes an
+.Dq inquire
+packet which we must be prepared to answer.
There are two ways to accomplish this, manually and automatically.
.Pp
Whenever such an inquire packet is received, the node sends a
@@ -154,7 +159,13 @@ and netmask.
.%O RFC 1547
.Re
.Sh LEGAL
-Cisco is a trademark of Cisco Systems, Inc.
+.Tn Cisco
+is a trademark of Cisco Systems, Inc.
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
.Sh AUTHORS
-Julian Elischer <julian@whistle.com>,
-Archie Cobbs <archie@whistle.com>
+.An Julian Elischer Aq julian@whistle.com ,
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/echo/ng_echo.4 b/sys/modules/netgraph/echo/ng_echo.4
index 7e22a6f..bdef682 100644
--- a/sys/modules/netgraph/echo/ng_echo.4
+++ b/sys/modules/netgraph/echo/ng_echo.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_ECHO 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_echo
.Nd netgraph echo node type
@@ -49,8 +49,9 @@ The
node type reflects all data and control messages back to the sender.
This node type is used for testing and debugging.
.Sh HOOKS
-.Nm Echo
-nodes accept any request to connect, regardless of the hook name,
+A
+.Nm echo
+node accepts any request to connect, regardless of the hook name,
as long as the name is unique.
.Sh CONTROL MESSAGES
This node type supports only the generic control messages.
@@ -63,5 +64,10 @@ control message, or when all hooks have been disconnected.
.Xr netgraph 4 ,
.Xr ng_hole 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/echo/ng_echo.8 b/sys/modules/netgraph/echo/ng_echo.8
index 7e22a6f..bdef682 100644
--- a/sys/modules/netgraph/echo/ng_echo.8
+++ b/sys/modules/netgraph/echo/ng_echo.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_ECHO 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_echo
.Nd netgraph echo node type
@@ -49,8 +49,9 @@ The
node type reflects all data and control messages back to the sender.
This node type is used for testing and debugging.
.Sh HOOKS
-.Nm Echo
-nodes accept any request to connect, regardless of the hook name,
+A
+.Nm echo
+node accepts any request to connect, regardless of the hook name,
as long as the name is unique.
.Sh CONTROL MESSAGES
This node type supports only the generic control messages.
@@ -63,5 +64,10 @@ control message, or when all hooks have been disconnected.
.Xr netgraph 4 ,
.Xr ng_hole 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/frame_relay/ng_frame_relay.4 b/sys/modules/netgraph/frame_relay/ng_frame_relay.4
index fc9ef0f..7686d0e 100644
--- a/sys/modules/netgraph/frame_relay/ng_frame_relay.4
+++ b/sys/modules/netgraph/frame_relay/ng_frame_relay.4
@@ -37,10 +37,10 @@
.\"
.Dd January 19, 1999
.Dt NG_FRAME_RELAY 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_frame_relay
-.Nd Frame relay netgraph node type
+.Nd frame relay netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_frame_relay.h>
.Sh DESCRIPTION
@@ -80,7 +80,7 @@ control message, or when all hooks have been disconnected.
Technically, frames on DLCI X should not be transmitted to the switch
until the LMI protocol entity on both ends has configured DLCI X as active.
The
-.Nm frame_relay
+.Nm
node type ignores this restriction, and will always pass data received
on a DLCI hook to
.Dv downstream .
@@ -89,5 +89,10 @@ Instead, it should query the LMI node first.
.Xr netgraph 4 ,
.Xr ng_lmi 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/frame_relay/ng_frame_relay.8 b/sys/modules/netgraph/frame_relay/ng_frame_relay.8
index fc9ef0f..7686d0e 100644
--- a/sys/modules/netgraph/frame_relay/ng_frame_relay.8
+++ b/sys/modules/netgraph/frame_relay/ng_frame_relay.8
@@ -37,10 +37,10 @@
.\"
.Dd January 19, 1999
.Dt NG_FRAME_RELAY 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_frame_relay
-.Nd Frame relay netgraph node type
+.Nd frame relay netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_frame_relay.h>
.Sh DESCRIPTION
@@ -80,7 +80,7 @@ control message, or when all hooks have been disconnected.
Technically, frames on DLCI X should not be transmitted to the switch
until the LMI protocol entity on both ends has configured DLCI X as active.
The
-.Nm frame_relay
+.Nm
node type ignores this restriction, and will always pass data received
on a DLCI hook to
.Dv downstream .
@@ -89,5 +89,10 @@ Instead, it should query the LMI node first.
.Xr netgraph 4 ,
.Xr ng_lmi 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/hole/ng_hole.4 b/sys/modules/netgraph/hole/ng_hole.4
index 472b22c..f1a7014 100644
--- a/sys/modules/netgraph/hole/ng_hole.4
+++ b/sys/modules/netgraph/hole/ng_hole.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_HOLE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_hole
.Nd netgraph discard node type
@@ -49,8 +49,9 @@ The
node type silently discards all data and control messages it receives.
This type is used for testing and debugging.
.Sh HOOKS
-.Nm Hole
-nodes accept any request to connect, regardless of the hook name,
+A
+.Nm
+node accepts any request to connect, regardless of the hook name,
as long as the name is unique.
.Sh CONTROL MESSAGES
This node type supports only the generic control messages.
@@ -63,5 +64,10 @@ control message, or when all hooks have been disconnected.
.Xr netgraph 4 ,
.Xr ng_echo 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/hole/ng_hole.8 b/sys/modules/netgraph/hole/ng_hole.8
index 472b22c..f1a7014 100644
--- a/sys/modules/netgraph/hole/ng_hole.8
+++ b/sys/modules/netgraph/hole/ng_hole.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_HOLE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_hole
.Nd netgraph discard node type
@@ -49,8 +49,9 @@ The
node type silently discards all data and control messages it receives.
This type is used for testing and debugging.
.Sh HOOKS
-.Nm Hole
-nodes accept any request to connect, regardless of the hook name,
+A
+.Nm
+node accepts any request to connect, regardless of the hook name,
as long as the name is unique.
.Sh CONTROL MESSAGES
This node type supports only the generic control messages.
@@ -63,5 +64,10 @@ control message, or when all hooks have been disconnected.
.Xr netgraph 4 ,
.Xr ng_echo 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/iface/ng_iface.4 b/sys/modules/netgraph/iface/ng_iface.4
index 376b5c5..40c6f88 100644
--- a/sys/modules/netgraph/iface/ng_iface.4
+++ b/sys/modules/netgraph/iface/ng_iface.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_IFACE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_iface
.Nd interface netgraph node type
@@ -47,7 +47,7 @@
An
.Nm iface
node is both a netgraph node and a system networking interface. When an
-.Nm iface
+.Nm
node is created, a new point-to-point interface appears which is accessible via
.Xr ifconfig 8 .
The new interfaces are named
@@ -56,8 +56,9 @@ The new interfaces are named
etc. The node is assigned the same name as its interface, unless the name
already exists, in which case the node remains unnamed.
.Pp
-.Nm Iface
-nodes have a single hook corresponding to each supported protocol.
+An
+.Nm
+node has a single hook corresponding to each supported protocol.
Packets transmitted via the interface flow out the corresponding
protocol-specific hook.
Similarly, packets received on a hook appear on the interface as
@@ -66,8 +67,9 @@ packets received in the corresponding protocol.
The currently supported protocols are IP, IPX, AppleTalk, and NS.
In the KLD module, only support for IP is compiled in by default.
.Pp
-.Nm Iface
-nodes support the Berkeley Packet Filter (BPF).
+An
+.Nm
+node supports the Berkeley Packet Filter (BPF).
.Sh HOOKS
This node type supports the following hooks:
.Pp
@@ -96,7 +98,7 @@ struct ng_iface_ifname {
Returns the list of addresses associated with this interface.
The list is returned in the same format as the
.Dv SIOCGIFCONF
-ioctl().
+.Fn ioctl .
.It Dv NGM_CISCO_GET_IPADDR
This message is defined by the
.Xr ng_cisco 8
@@ -106,8 +108,9 @@ for a description.
.El
.Sh SHUTDOWN
Because it is currently not possible to remove a system networking
-interface in FreeBSD,
-.Nm iface
+interface in
+.Fx ,
+.Nm
nodes are
.Em persistent.
That is, once created they are never destroyed.
@@ -115,12 +118,17 @@ The receipt of a
.Dv NGM_SHUTDOWN
control message disconnects all hooks but does not remove the node.
.Sh SEE ALSO
-.Xr netgraph 4 ,
.Xr bpf 4 ,
+.Xr netgraph 4 ,
+.Xr ifconfig 8 ,
.Xr ng_cisco 8 ,
.Xr ng_ppp 8 ,
.Xr ng_rfc1490 8 ,
-.Xr ngctl 8 ,
-.Xr ifconfig 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Xr ngctl 8 .
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/iface/ng_iface.8 b/sys/modules/netgraph/iface/ng_iface.8
index 376b5c5..40c6f88 100644
--- a/sys/modules/netgraph/iface/ng_iface.8
+++ b/sys/modules/netgraph/iface/ng_iface.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_IFACE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_iface
.Nd interface netgraph node type
@@ -47,7 +47,7 @@
An
.Nm iface
node is both a netgraph node and a system networking interface. When an
-.Nm iface
+.Nm
node is created, a new point-to-point interface appears which is accessible via
.Xr ifconfig 8 .
The new interfaces are named
@@ -56,8 +56,9 @@ The new interfaces are named
etc. The node is assigned the same name as its interface, unless the name
already exists, in which case the node remains unnamed.
.Pp
-.Nm Iface
-nodes have a single hook corresponding to each supported protocol.
+An
+.Nm
+node has a single hook corresponding to each supported protocol.
Packets transmitted via the interface flow out the corresponding
protocol-specific hook.
Similarly, packets received on a hook appear on the interface as
@@ -66,8 +67,9 @@ packets received in the corresponding protocol.
The currently supported protocols are IP, IPX, AppleTalk, and NS.
In the KLD module, only support for IP is compiled in by default.
.Pp
-.Nm Iface
-nodes support the Berkeley Packet Filter (BPF).
+An
+.Nm
+node supports the Berkeley Packet Filter (BPF).
.Sh HOOKS
This node type supports the following hooks:
.Pp
@@ -96,7 +98,7 @@ struct ng_iface_ifname {
Returns the list of addresses associated with this interface.
The list is returned in the same format as the
.Dv SIOCGIFCONF
-ioctl().
+.Fn ioctl .
.It Dv NGM_CISCO_GET_IPADDR
This message is defined by the
.Xr ng_cisco 8
@@ -106,8 +108,9 @@ for a description.
.El
.Sh SHUTDOWN
Because it is currently not possible to remove a system networking
-interface in FreeBSD,
-.Nm iface
+interface in
+.Fx ,
+.Nm
nodes are
.Em persistent.
That is, once created they are never destroyed.
@@ -115,12 +118,17 @@ The receipt of a
.Dv NGM_SHUTDOWN
control message disconnects all hooks but does not remove the node.
.Sh SEE ALSO
-.Xr netgraph 4 ,
.Xr bpf 4 ,
+.Xr netgraph 4 ,
+.Xr ifconfig 8 ,
.Xr ng_cisco 8 ,
.Xr ng_ppp 8 ,
.Xr ng_rfc1490 8 ,
-.Xr ngctl 8 ,
-.Xr ifconfig 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Xr ngctl 8 .
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/ksocket/ng_ksocket.4 b/sys/modules/netgraph/ksocket/ng_ksocket.4
index d32c2cf..c5fdc3b 100644
--- a/sys/modules/netgraph/ksocket/ng_ksocket.4
+++ b/sys/modules/netgraph/ksocket/ng_ksocket.4
@@ -46,21 +46,21 @@
A
.Nm ksocket
node is both a netgraph node and a BSD socket. The
-.Nm ksocket
+.Nm
node type allows one to open a socket inside the kernel and have
it appear as a Netgraph node. The
-.Nm ksocket
+.Nm
node type is the reverse of the socket node type (see
-.Xr ng_socket 8 "):"
+.Xr ng_socket 8 ) :
whereas the socket node type enables the user-level manipulation (via
a socket) of what is normally a kernel-level entity (the associated
Netgraph node), the
-.Nm ksocket
+.Nm
node type enables the kernel-level manipulation (via a Netgraph node) of
what is normally a user-level entity (the associated socket).
.Pp
A
-.Nm ksocket
+.Nm
node allows at most one hook connection. Connecting to the node is
equivalent to opening the associated socket. The name given to the hook
determines what kind of socket the node will open (see below).
@@ -136,7 +136,9 @@ retrieved value.
.Sh ASCII FORM CONTROL MESSAGES
For control messages that pass a
.Dv "struct sockaddr"
-in the argument field, the normal ASCII equivalent of the C structure
+in the argument field, the normal
+.Tn ASCII
+equivalent of the C structure
is an acceptable form. For the
.Dv PF_INET
and
@@ -162,7 +164,9 @@ local/"/tmp/foo.socket"
.Pp
For control messages that pass a
.Dv "struct ng_ksocket_sockopt" ,
-the normal ASCII form for that structure is used. In the future, more
+the normal
+.Tn ASCII
+form for that structure is used. In the future, more
convenient encoding of the more common socket options may be supported.
.Sh SHUTDOWN
This node shuts down upon receipt of a
@@ -174,5 +178,10 @@ Shutdown of the node closes the associated socket.
.Xr netgraph 4 ,
.Xr ng_socket 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/ksocket/ng_ksocket.8 b/sys/modules/netgraph/ksocket/ng_ksocket.8
index d32c2cf..c5fdc3b 100644
--- a/sys/modules/netgraph/ksocket/ng_ksocket.8
+++ b/sys/modules/netgraph/ksocket/ng_ksocket.8
@@ -46,21 +46,21 @@
A
.Nm ksocket
node is both a netgraph node and a BSD socket. The
-.Nm ksocket
+.Nm
node type allows one to open a socket inside the kernel and have
it appear as a Netgraph node. The
-.Nm ksocket
+.Nm
node type is the reverse of the socket node type (see
-.Xr ng_socket 8 "):"
+.Xr ng_socket 8 ) :
whereas the socket node type enables the user-level manipulation (via
a socket) of what is normally a kernel-level entity (the associated
Netgraph node), the
-.Nm ksocket
+.Nm
node type enables the kernel-level manipulation (via a Netgraph node) of
what is normally a user-level entity (the associated socket).
.Pp
A
-.Nm ksocket
+.Nm
node allows at most one hook connection. Connecting to the node is
equivalent to opening the associated socket. The name given to the hook
determines what kind of socket the node will open (see below).
@@ -136,7 +136,9 @@ retrieved value.
.Sh ASCII FORM CONTROL MESSAGES
For control messages that pass a
.Dv "struct sockaddr"
-in the argument field, the normal ASCII equivalent of the C structure
+in the argument field, the normal
+.Tn ASCII
+equivalent of the C structure
is an acceptable form. For the
.Dv PF_INET
and
@@ -162,7 +164,9 @@ local/"/tmp/foo.socket"
.Pp
For control messages that pass a
.Dv "struct ng_ksocket_sockopt" ,
-the normal ASCII form for that structure is used. In the future, more
+the normal
+.Tn ASCII
+form for that structure is used. In the future, more
convenient encoding of the more common socket options may be supported.
.Sh SHUTDOWN
This node shuts down upon receipt of a
@@ -174,5 +178,10 @@ Shutdown of the node closes the associated socket.
.Xr netgraph 4 ,
.Xr ng_socket 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/lmi/ng_lmi.4 b/sys/modules/netgraph/lmi/ng_lmi.4
index 2ce52a7..d03c018 100644
--- a/sys/modules/netgraph/lmi/ng_lmi.4
+++ b/sys/modules/netgraph/lmi/ng_lmi.4
@@ -37,10 +37,10 @@
.\"
.Dd January 19, 1999
.Dt NG_LMI 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_lmi
-.Nd Frame relay LMI protocol netgraph node type
+.Nd frame relay LMI protocol netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_lmi.h>
.Sh DESCRIPTION
@@ -126,5 +126,10 @@ control message, or when all hooks have been disconnected.
.Rs
.%T "ITU-T Q.933 Digital Subscriber Signaling System No. 1 - Signaling Specification for Frame Mode Basic Call Control, Annex A"
.Re
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/lmi/ng_lmi.8 b/sys/modules/netgraph/lmi/ng_lmi.8
index 2ce52a7..d03c018 100644
--- a/sys/modules/netgraph/lmi/ng_lmi.8
+++ b/sys/modules/netgraph/lmi/ng_lmi.8
@@ -37,10 +37,10 @@
.\"
.Dd January 19, 1999
.Dt NG_LMI 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_lmi
-.Nd Frame relay LMI protocol netgraph node type
+.Nd frame relay LMI protocol netgraph node type
.Sh SYNOPSIS
.Fd #include <netgraph/ng_lmi.h>
.Sh DESCRIPTION
@@ -126,5 +126,10 @@ control message, or when all hooks have been disconnected.
.Rs
.%T "ITU-T Q.933 Digital Subscriber Signaling System No. 1 - Signaling Specification for Frame Mode Basic Call Control, Annex A"
.Re
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/netgraph/netgraph.4 b/sys/modules/netgraph/netgraph/netgraph.4
index 46cc658..546aeed 100644
--- a/sys/modules/netgraph/netgraph/netgraph.4
+++ b/sys/modules/netgraph/netgraph/netgraph.4
@@ -80,25 +80,37 @@ to interact with other nodes in a well defined manner.
Each node has a
.Em type ,
which is a static property of the node determined at node creation time.
-A node's type is described by a unique ASCII type name.
+A node's type is described by a unique
+.Tn ASCII
+type name.
The type implies what the node does and how it may be connected
to other nodes.
.Pp
In object-oriented language, types are classes and nodes are instances
of their respective class. All node types are subclasses of the generic node
type, and hence inherit certain common functionality and capabilities
-(e.g., the ability to have an ASCII name).
+(e.g., the ability to have an
+.Tn ASCII
+name).
.Pp
-Nodes may be assigned a globally unique ASCII name which can be
+Nodes may be assigned a globally unique
+.Tn ASCII
+name which can be
used to refer to the node.
-The name must not contain the characters ``.'' or ``:'' and is limited to
+The name must not contain the characters
+.Dq \&.
+or
+.Dq \&:
+and is limited to
.Dv "NG_NODELEN + 1"
characters (including NUL byte).
.Pp
Each node instance has a unique
.Em ID number
which is expressed as a 32-bit hex value. This value may be used to
-refer to a node when there is no ASCII name assigned to it.
+refer to a node when there is no
+.Tn ASCII
+name assigned to it.
.Sh Hooks
Nodes are connected to other nodes by connecting a pair of
.Em hooks ,
@@ -110,9 +122,15 @@ Hooks have these properties:
.Pp
.Bl -bullet -compact -offset 2n
.It
-A hook has an ASCII name which is unique among all hooks
+A hook has an
+.Tn ASCII
+name which is unique among all hooks
on that node (other hooks on other nodes may have the same name).
-The name must not contain a ``.'' or a ``:'' and is
+The name must not contain a
+.Dq \&.
+or a
+.Dq \&:
+and is
limited to
.Dv "NG_HOOKLEN + 1"
characters (including NUL byte).
@@ -123,7 +141,9 @@ removing either hook destroys both hooks.
.El
.Pp
A node may decide to assign special meaning to some hooks.
-For example, connecting to the hook named ``debug'' might trigger
+For example, connecting to the hook named
+.Dq debug
+might trigger
the node to start sending debugging information to that hook.
.Sh Data Flow
Two types of information flow between nodes: data messages and
@@ -137,7 +157,8 @@ directly to some arbitrary other node. Control messages have a common
header format, followed by type-specific data, and are binary structures
for efficiency. However, node types also may support conversion of the
type specific data between binary and
-ASCII for debugging and human interface purposes (see the
+.Tn ASCII
+for debugging and human interface purposes (see the
.Dv NGM_ASCII2BINARY
and
.Dv NGM_BINARY2ASCII
@@ -146,9 +167,13 @@ these conversions.
.Pp
There are two ways to address a control message. If
there is a sequence of edges connecting the two nodes, the message
-may be ``source routed'' by specifying the corresponding sequence
+may be
+.Dq source routed
+by specifying the corresponding sequence
of hooks as the destination address for the message (relative
-addressing). Otherwise, the recipient node global ASCII name
+addressing). Otherwise, the recipient node global
+.Tn ASCII
+name
(or equivalent ID based name) is used as the destination address
for the message (absolute addressing). The two types of addressing
may be combined, by specifying an absolute start node and a sequence
@@ -156,7 +181,9 @@ of hooks.
.Pp
Messages often represent commands that are followed by a reply message
in the reverse direction. To facilitate this, the recipient of a
-control message is supplied with a ``return address'' that is suitable
+control message is supplied with a
+.Dq return address
+that is suitable
for addressing a reply.
.Pp
Each control message contains a 32 bit value called a
@@ -167,7 +194,7 @@ that it understands. However, a node may choose to recognize and
implement more than one type of message.
.Sh Netgraph is Functional
In order to minimize latency, most
-.Nm netgraph
+.Nm
operations are functional.
That is, data and control messages are delivered by making function
calls rather than by using queues and mailboxes. For example, if node
@@ -175,7 +202,9 @@ A wishes to send a data mbuf to neighboring node B, it calls the
generic
.Nm
data delivery function. This function in turn locates
-node B and calls B's ``receive data'' method. While this mode of operation
+node B and calls B's
+.Dq receive data
+method. While this mode of operation
results in good performance, it has a few implications for node
developers:
.Pp
@@ -186,13 +215,13 @@ may need to allow for the possibility of receiving a returning message
before the original delivery function call returns.
.It
Netgraph nodes and support routines generally run at
-.Dv "splnet()" .
+.Fn splnet .
However, some nodes may want to send data and control messages
from a different priority level. Netgraph supplies queueing routines which
utilize the NETISR system to move message delivery to
-.Dv "splnet()" .
+.Fn splnet .
Note that messages are always received at
-.Dv "splnet()" .
+.Fn splnet .
.It
It's possible for an infinite loop to occur if the graph contains cycles.
.El
@@ -215,7 +244,7 @@ which is both a netgraph node and a
BSD socket in the protocol family
.Dv PF_NETGRAPH .
Socket nodes allow user processes to participate in
-.Nm netgraph .
+.Nm Ns .
Other nodes communicate with socket nodes using the usual methods, and the
node hides the fact that it is also passing information to and from a
cooperating user process.
@@ -225,7 +254,7 @@ a node interface to the hardware.
.Sh Node Methods
Nodes are notified of the following actions via function calls
to the following node methods (all at
-.Dv "splnet()" )
+.Fn splnet )
and may accept or reject that action (by returning the appropriate
error code):
.Bl -tag -width xxx
@@ -235,7 +264,9 @@ allowed, the constructor must call the generic node creation
function (in object-oriented terms, the superclass constructor)
and then allocate any special resources it needs. For nodes that
correspond to hardware, this is typically done during the device
-attach routine. Often a global ASCII name corresponding to the
+attach routine. Often a global
+.Tn ASCII
+name corresponding to the
device name is assigned here as well.
.It Creation of a new hook
The hook is created and tentatively
@@ -270,7 +301,7 @@ An mbuf chain is passed to the node.
The node is notified on which hook the data arrived,
and can use this information in its processing decision.
The node must must always
-.Dv m_freem()
+.Fn m_freem
the mbuf chain on completion or error, or pass it on to another node
(or kernel module) which will then be responsible for freeing it.
.Pp
@@ -280,13 +311,13 @@ structure describing meta-data about the message
.Dv NULL
if there is no additional information. The format for this information is
described in
-.Dv netgraph.h .
+.Pa netgraph.h .
The memory for meta-data must allocated via
-.Dv malloc()
+.Fn malloc
with type
.Dv M_NETGRAPH .
As with the data itself, it is the receiver's responsibility to
-.Dv free()
+.Fn free
the meta-data. If the mbuf chain is freed the meta-data must
be freed at the same time. If the meta-data is freed but the
real data on is passed on, then a
@@ -324,14 +355,14 @@ to point to the reply.
Then when the control message delivery function returns,
the caller can check if this pointer has been made non-NULL,
and if so then it points to the reply message allocated via
-.Dv malloc()
+.Fn malloc
and containing the synchronous response. In both directions,
(request and response) it is up to the
receiver of that message to
-.Dv free()
+.Fn free
the control message buffer. All control messages and replies are
allocated with
-.Dv malloc()
+.Fn malloc
type
.Dv M_NETGRAPH .
.El
@@ -339,7 +370,9 @@ type
Much use has been made of reference counts, so that nodes being
free'd of all references are automatically freed, and this behaviour
has been tested and debugged to present a consistent and trustworthy
-framework for the ``type module'' writer to use.
+framework for the
+.Dq type module
+writer to use.
.Sh Addressing
The
.Nm
@@ -358,7 +391,11 @@ A relative address includes only the sequence of hook names, implicitly
starting hook traversal at the local node.
.Pp
There are a couple of special possibilities for the node name.
-The name ``.'' (referred to as ``.:'') always refers to the local node.
+The name
+.Dq \&.
+(referred to as
+.Dq \&.: )
+always refers to the local node.
Also, nodes that have no global name may be addressed by their ID numbers,
by enclosing the hex representation of the ID number within square brackets.
Here are some examples of valid netgraph addresses:
@@ -560,19 +597,22 @@ be changed.
The de facto method for generating unique type cookies is to take the
seconds from the epoch at the time the header file is written
(i.e., the output of
-.Dv "date -u +'%s'" ")."
+.Dv "date -u +'%s'" ) .
.Pp
There is a predefined typecookie
.Dv NGM_GENERIC_COOKIE
-for the ``generic'' node type, and
+for the
+.Dq generic
+node type, and
a corresponding set of generic messages which all nodes understand.
The handling of these messages is automatic.
.It Dv command
The identifier for the message command. This is type specific,
and is defined in the same header file as the typecookie.
.It Dv cmdstr
-Room for a short human readable version of ``command'' (for debugging
-purposes only).
+Room for a short human readable version of
+.Dq command
+(for debugging purposes only).
.El
.Pp
Some modules may choose to implement messages from more than one
@@ -580,25 +620,34 @@ of the header files and thus recognize more than one type cookie.
.Sh Control Message ASCII Form
Control messages are in binary format for efficiency. However, for
debugging and human interface purposes, and if the node type supports
-it, control messages may be converted to and from an equivalent ASCII
-form. The ASCII form is similar to the binary form, with two exceptions:
+it, control messages may be converted to and from an equivalent
+.Tn ASCII
+form. The
+.Tn ASCII
+form is similar to the binary form, with two exceptions:
.Pp
.Bl -tag -compact -width xxx
.It o
The
.Dv cmdstr
-header field must contain the ASCII name of the command, corresponding to the
+header field must contain the
+.Tn ASCII
+name of the command, corresponding to the
.Dv cmd
header field.
.It o
The
.Dv args
-field contains a NUL-terminated ASCII string version of the message arguments.
+field contains a NUL-terminated
+.Tn ASCII
+string version of the message arguments.
.El
.Pp
In general, the arguments field of a control messgage can be any
arbitrary C data type. Netgraph includes parsing routines to support
-some pre-defined datatypes in ASCII with this simple syntax:
+some pre-defined datatypes in
+.Tn ASCII
+with this simple syntax:
.Pp
.Bl -tag -compact -width xxx
.It o
@@ -616,24 +665,28 @@ does not have an explicit index, the index is implicitly the previous
element's index plus one.
.It o
Structures are enclosed in curly braces, and each field is specified
-in the form ``fieldname=value''.
+in the form
+.Dq fieldname=value .
.It o
Any array element or structure field whose value is equal to its
-``default value'' may be omitted. For integer types, the default value
+.Dq default value
+may be omitted. For integer types, the default value
is usually zero; for string types, the empty string.
.It o
Array elements and structure fields may be specified in any order.
.El
.Pp
Each node type may define its own arbitrary types by providing
-the necessary routines to parse and unparse. ASCII forms defined
+the necessary routines to parse and unparse.
+.Tn ASCII
+forms defined
for a specific node type are documented in the documentation for
that node type.
.Sh Generic Control Messages
There are a number of standard predefined messages that will work
for any node, as they are supported directly by the framework itself.
These are defined in
-.Dv ng_message.h
+.Pa ng_message.h
along with the basic layout of messages and other similar information.
.Bl -tag -width xxx
.It Dv NGM_CONNECT
@@ -655,7 +708,9 @@ is the default for nodes created using the
method. Such nodes can only be addressed relatively or by their ID number.
.It Dv NGM_RMHOOK
Ask the node to break a hook connection to one of its neighbours.
-Both nodes will have their ``disconnect'' method invoked.
+Both nodes will have their
+.Dq disconnect
+method invoked.
Either node may elect to totally shut down as a result.
.It Dv NGM_NODEINFO
Asks the target node to describe itself. The four returned fields
@@ -688,12 +743,16 @@ elect to not support this message. The text response must be less than
bytes in length (presently 1024). This can be used to return general
status information in human readable form.
.It Dv NGM_BINARY2ASCII
-This message converts a binary control message to its ASCII form.
+This message converts a binary control message to its
+.Tn ASCII
+form.
The entire control message to be converted is contained within the
arguments field of the
.Dv Dv NGM_BINARY2ASCII
message itself. If successful, the reply will contain the same control
-message in ASCII form.
+message in
+.Tn ASCII
+form.
A node will typically only know how to translate messages that it
itself understands, so the target node of the
.Dv NGM_BINARY2ASCII
@@ -701,7 +760,9 @@ is often the same node that would actually receive that message.
.It Dv NGM_ASCII2BINARY
The opposite of
.Dv NGM_BINARY2ASCII .
-The entire control message to be converted, in ASCII form, is contained
+The entire control message to be converted, in
+.Tn ASCII
+form, is contained
in the arguments section of the
.Dv NGM_ASCII2BINARY
and need only have the
@@ -765,20 +826,20 @@ node of unknown type
is made,
.Nm
will attempt to load the KLD module
-.Dv ng_type.ko .
+.Pa ng_type.ko .
.Pp
Types can also be installed at boot time, as certain device drivers
may want to export each instance of the device as a netgraph node.
.Pp
In general, new types can be installed at any time from within the
kernel by calling
-.Dv ng_newtype() ,
+.Fn ng_newtype ,
supplying a pointer to the type's
.Dv struct ng_type
structure.
.Pp
The
-.Dv "NETGRAPH_INIT()"
+.Fn NETGRAPH_INIT
macro automates this process by using a linker set.
.Sh EXISTING NODE TYPES
Several node types currently exist. Each is fully documented
@@ -808,8 +869,9 @@ calls, using a
socket address.
.Pp
.It HOLE
-Responds only to generic messages and is a ``black hole'' for data,
-Useful for testing. Always accepts new hooks.
+Responds only to generic messages and is a
+.Dq black hole
+for data, Useful for testing. Always accepts new hooks.
.Pp
.It ECHO
Responds only to generic messages and always echoes data back through the
@@ -817,7 +879,9 @@ hook from which it arrived. Returns any non generic messages as their
own response. Useful for testing. Always accepts new hooks.
.Pp
.It TEE
-This node is useful for ``snooping.'' It has 4 hooks:
+This node is useful for
+.Dq snooping .
+It has 4 hooks:
.Dv left ,
.Dv right ,
.Dv left2right ,
@@ -836,24 +900,31 @@ to left.
.Pp
.It RFC1490 MUX
Encapsulates/de-encapsulates frames encoded according to RFC 1490.
-Has a hook for the encapsulated packets (``downstream'') and one hook
+Has a hook for the encapsulated packets
+.Pq Dq downstream
+and one hook
for each protocol (i.e., IP, PPP, etc.).
.Pp
.It FRAME RELAY MUX
Encapsulates/de-encapsulates Frame Relay frames.
-Has a hook for the encapsulated packets (``downstream'') and one hook
+Has a hook for the encapsulated packets
+.Pq Dq downstream
+and one hook
for each DLCI.
.Pp
.It FRAME RELAY LMI
Automatically handles frame relay
-``LMI'' (link management interface) operations and packets.
+.Dq LMI
+(link management interface) operations and packets.
Automatically probes and detects which of several LMI standards
is in use at the exchange.
.Pp
.It TTY
This node is also a line discipline. It simply converts between mbuf
frames and sequential serial data, allowing a tty to appear as a netgraph
-node. It has a programmable ``hotkey'' character.
+node. It has a programmable
+.Dq hotkey
+character.
.Pp
.It ASYNC
This node encapsulates and de-encapsulates asynchronous frames
@@ -891,14 +962,14 @@ It might be freed by any node the data passes through, and a
.Dv NULL
passed onwards, but the caller will never free it.
Two macros
-.Dv "NG_FREE_META(meta)"
+.Fn NG_FREE_META "meta"
and
-.Dv "NG_FREE_DATA(m, meta)"
+.Fn NG_FREE_DATA "m" "meta"
should be used if possible to free data and meta data (see
-.Dv netgraph.h ")."
+.Pa netgraph.h ) .
.It 3
Messages sent using
-.Dv ng_send_message()
+.Fn ng_send_message
are freed by the callee. As in the case above, the addresses
associated with the message are freed by whatever allocated them so the
recipient should copy them if it wants to keep that information.
@@ -974,7 +1045,10 @@ and
The
.Nm
system was designed and first implemented at Whistle Communications, Inc.
-in a version FreeBSD 2.2 customized for the Whistle InterJet.
+in a version
+.Fx 2.2
+customized for the Whistle InterJet.
.Sh AUTHORS
-Julian Elischer <julian@whistle.com>, with contributions by
-Archie Cobbs <archie@whistle.com>.
+.An Julian Elischer Aq julian@whistle.com ,
+with contributions by
+.An Archie Cobbs Aq archie@whistle.com .
diff --git a/sys/modules/netgraph/ppp/ng_ppp.4 b/sys/modules/netgraph/ppp/ng_ppp.4
index ac23ee4..96045e0 100644
--- a/sys/modules/netgraph/ppp/ng_ppp.4
+++ b/sys/modules/netgraph/ppp/ng_ppp.4
@@ -66,7 +66,7 @@ hook which is used to handle any protocol not directly supported
by the node. This includes all of the control protocols: LCP, IPCP,
CCP, etc. Typically this node is connected to a user-land daemon
via a
-.Xr ng_socket(8)
+.Xr ng_socket 8
type node.
.Sh ENABLING FUNCTIONALITY
In general, the PPP node enables a specific link or functionality when
@@ -153,7 +153,9 @@ hooks are connected, and the corresponding configuration flag is
enabled, Van Jacobsen compression and/or decompression will become active.
Normally these hooks connect to the corresponding hooks of a single
.Xr ng_vjc 8
-node. The PPP node is compatible with the ``pass through'' modes of the
+node. The PPP node is compatible with the
+.Dq pass through
+modes of the
.Xr ng_vjc 8
node type.
.Sh BYPASS HOOK
@@ -375,5 +377,10 @@ control message, or when all hooks have been disconnected.
.%T "The PPP Multilink Protocol (MP)"
.%O RFC 1990
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/ppp/ng_ppp.8 b/sys/modules/netgraph/ppp/ng_ppp.8
index ac23ee4..96045e0 100644
--- a/sys/modules/netgraph/ppp/ng_ppp.8
+++ b/sys/modules/netgraph/ppp/ng_ppp.8
@@ -66,7 +66,7 @@ hook which is used to handle any protocol not directly supported
by the node. This includes all of the control protocols: LCP, IPCP,
CCP, etc. Typically this node is connected to a user-land daemon
via a
-.Xr ng_socket(8)
+.Xr ng_socket 8
type node.
.Sh ENABLING FUNCTIONALITY
In general, the PPP node enables a specific link or functionality when
@@ -153,7 +153,9 @@ hooks are connected, and the corresponding configuration flag is
enabled, Van Jacobsen compression and/or decompression will become active.
Normally these hooks connect to the corresponding hooks of a single
.Xr ng_vjc 8
-node. The PPP node is compatible with the ``pass through'' modes of the
+node. The PPP node is compatible with the
+.Dq pass through
+modes of the
.Xr ng_vjc 8
node type.
.Sh BYPASS HOOK
@@ -375,5 +377,10 @@ control message, or when all hooks have been disconnected.
.%T "The PPP Multilink Protocol (MP)"
.%O RFC 1990
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/pppoe/ng_pppoe.4 b/sys/modules/netgraph/pppoe/ng_pppoe.4
index 69d0016..60c4069 100644
--- a/sys/modules/netgraph/pppoe/ng_pppoe.4
+++ b/sys/modules/netgraph/pppoe/ng_pppoe.4
@@ -37,7 +37,7 @@
.\"
.Dd October 28, 1999
.Dt NG_PPPOE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_pppoe
.Nd RFC 2516 PPPOE protocol netgraph node type
@@ -46,7 +46,7 @@
.Fd #include <netgraph/ng_pppoe.h>
.Sh DESCRIPTION
The
-.Nm
+.Nm pppoe
node type performs the PPPoE protocol. It is used in conjunction with the
.Xr netgraph 4
extensions to the Ethernet framework to divert and inject Ethernet packets
@@ -164,7 +164,7 @@ This node shuts down upon receipt of a
control message, when all session have been disconnected or when the
.Dv ethernet
hook is disconnected.
-.Sh EXAMPLE USAGE
+.Sh EXAMPLES
The following code uses
.Dv libnetgraph
to set up a
@@ -395,5 +395,10 @@ setup(char *ethername, char *service, char *sessname,
.%T "A Method for transmitting PPP over Ethernet (PPPoE)"
.%O RFC 2516
.Re
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/pppoe/ng_pppoe.8 b/sys/modules/netgraph/pppoe/ng_pppoe.8
index 69d0016..60c4069 100644
--- a/sys/modules/netgraph/pppoe/ng_pppoe.8
+++ b/sys/modules/netgraph/pppoe/ng_pppoe.8
@@ -37,7 +37,7 @@
.\"
.Dd October 28, 1999
.Dt NG_PPPOE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_pppoe
.Nd RFC 2516 PPPOE protocol netgraph node type
@@ -46,7 +46,7 @@
.Fd #include <netgraph/ng_pppoe.h>
.Sh DESCRIPTION
The
-.Nm
+.Nm pppoe
node type performs the PPPoE protocol. It is used in conjunction with the
.Xr netgraph 4
extensions to the Ethernet framework to divert and inject Ethernet packets
@@ -164,7 +164,7 @@ This node shuts down upon receipt of a
control message, when all session have been disconnected or when the
.Dv ethernet
hook is disconnected.
-.Sh EXAMPLE USAGE
+.Sh EXAMPLES
The following code uses
.Dv libnetgraph
to set up a
@@ -395,5 +395,10 @@ setup(char *ethername, char *service, char *sessname,
.%T "A Method for transmitting PPP over Ethernet (PPPoE)"
.%O RFC 2516
.Re
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/pptpgre/ng_pptpgre.4 b/sys/modules/netgraph/pptpgre/ng_pptpgre.4
index 7eadcc3..8685be8 100644
--- a/sys/modules/netgraph/pptpgre/ng_pptpgre.4
+++ b/sys/modules/netgraph/pptpgre/ng_pptpgre.4
@@ -132,5 +132,10 @@ control message, or when both hooks have been disconnected.
.%T "Generic Routing Encapsulation over IPv4 networks"
.%O RFC 1702
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/pptpgre/ng_pptpgre.8 b/sys/modules/netgraph/pptpgre/ng_pptpgre.8
index 7eadcc3..8685be8 100644
--- a/sys/modules/netgraph/pptpgre/ng_pptpgre.8
+++ b/sys/modules/netgraph/pptpgre/ng_pptpgre.8
@@ -132,5 +132,10 @@ control message, or when both hooks have been disconnected.
.%T "Generic Routing Encapsulation over IPv4 networks"
.%O RFC 1702
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/rfc1490/ng_rfc1490.4 b/sys/modules/netgraph/rfc1490/ng_rfc1490.4
index a2aa9d0..f8d3e01 100644
--- a/sys/modules/netgraph/rfc1490/ng_rfc1490.4
+++ b/sys/modules/netgraph/rfc1490/ng_rfc1490.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_RFC1490 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_rfc1490
.Nd RFC 1490 netgraph node type
@@ -105,5 +105,10 @@ Not all of RFC 1490 is implemented.
.%T "PPP in Frame Relay"
.%O RFC 1973
.Re
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/rfc1490/ng_rfc1490.8 b/sys/modules/netgraph/rfc1490/ng_rfc1490.8
index a2aa9d0..f8d3e01 100644
--- a/sys/modules/netgraph/rfc1490/ng_rfc1490.8
+++ b/sys/modules/netgraph/rfc1490/ng_rfc1490.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_RFC1490 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_rfc1490
.Nd RFC 1490 netgraph node type
@@ -105,5 +105,10 @@ Not all of RFC 1490 is implemented.
.%T "PPP in Frame Relay"
.%O RFC 1973
.Re
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/socket/ng_socket.4 b/sys/modules/netgraph/socket/ng_socket.4
index cb224bc..2a43b6a 100644
--- a/sys/modules/netgraph/socket/ng_socket.4
+++ b/sys/modules/netgraph/socket/ng_socket.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_SOCKET 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_socket
.Nd netgraph socket node type
@@ -48,7 +48,7 @@
A
.Nm socket
node is both a BSD socket and a netgraph node. The
-.Nm socket
+.Nm
node type allows user-mode processes to participate in the kernel
.Xr netgraph 4
networking subsystem using the BSD socket interface. The process must have
@@ -56,7 +56,7 @@ root privileges to be able to create netgraph sockets however once created,
any process that has one may use it.
.Pp
A new
-.Nm socket
+.Nm
node is created by creating a new socket of type
.Dv NG_CONTROL
in the protocol family
@@ -85,13 +85,13 @@ To transmit and receive netgraph data packets, a
socket must also be created using
.Xr socket 2
and associated with a
-.Nm socket
+.Nm
node.
.Dv NG_DATA sockets do not automatically
have nodes associated with them; they are bound to a specific node via the
.Xr connect 2
system call. The address argument is the netgraph address of the
-.Nm socket
+.Nm
node already created. Once a data socket is associated with a node,
any data packets received by the node are read using
.Xr recvfrom 2
@@ -169,5 +169,10 @@ socket).
.Xr netgraph 4 ,
.Xr ng_ksocket 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/socket/ng_socket.8 b/sys/modules/netgraph/socket/ng_socket.8
index cb224bc..2a43b6a 100644
--- a/sys/modules/netgraph/socket/ng_socket.8
+++ b/sys/modules/netgraph/socket/ng_socket.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_SOCKET 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_socket
.Nd netgraph socket node type
@@ -48,7 +48,7 @@
A
.Nm socket
node is both a BSD socket and a netgraph node. The
-.Nm socket
+.Nm
node type allows user-mode processes to participate in the kernel
.Xr netgraph 4
networking subsystem using the BSD socket interface. The process must have
@@ -56,7 +56,7 @@ root privileges to be able to create netgraph sockets however once created,
any process that has one may use it.
.Pp
A new
-.Nm socket
+.Nm
node is created by creating a new socket of type
.Dv NG_CONTROL
in the protocol family
@@ -85,13 +85,13 @@ To transmit and receive netgraph data packets, a
socket must also be created using
.Xr socket 2
and associated with a
-.Nm socket
+.Nm
node.
.Dv NG_DATA sockets do not automatically
have nodes associated with them; they are bound to a specific node via the
.Xr connect 2
system call. The address argument is the netgraph address of the
-.Nm socket
+.Nm
node already created. Once a data socket is associated with a node,
any data packets received by the node are read using
.Xr recvfrom 2
@@ -169,5 +169,10 @@ socket).
.Xr netgraph 4 ,
.Xr ng_ksocket 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/tee/ng_tee.4 b/sys/modules/netgraph/tee/ng_tee.4
index 1a774e6..6116d27 100644
--- a/sys/modules/netgraph/tee/ng_tee.4
+++ b/sys/modules/netgraph/tee/ng_tee.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_TEE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_tee
.Nd netgraph ``tee'' node type
@@ -50,7 +50,9 @@ node type has a purpose similar to the
.Xr tee 1
command.
.Nm Tee
-nodes are useful for debugging or ``snooping'' on a connection
+nodes are useful for debugging or
+.Dq snooping
+on a connection
between two netgraph nodes.
.Nm Tee
nodes have four hooks,
@@ -113,5 +115,10 @@ control message, or when all hooks have been disconnected.
.Xr tee 1 ,
.Xr netgraph 4 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/tee/ng_tee.8 b/sys/modules/netgraph/tee/ng_tee.8
index 1a774e6..6116d27 100644
--- a/sys/modules/netgraph/tee/ng_tee.8
+++ b/sys/modules/netgraph/tee/ng_tee.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_TEE 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_tee
.Nd netgraph ``tee'' node type
@@ -50,7 +50,9 @@ node type has a purpose similar to the
.Xr tee 1
command.
.Nm Tee
-nodes are useful for debugging or ``snooping'' on a connection
+nodes are useful for debugging or
+.Dq snooping
+on a connection
between two netgraph nodes.
.Nm Tee
nodes have four hooks,
@@ -113,5 +115,10 @@ control message, or when all hooks have been disconnected.
.Xr tee 1 ,
.Xr netgraph 4 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Julian Elischer <julian@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@whistle.com
diff --git a/sys/modules/netgraph/tty/ng_tty.4 b/sys/modules/netgraph/tty/ng_tty.4
index c3f0aa5..de4a4c2 100644
--- a/sys/modules/netgraph/tty/ng_tty.4
+++ b/sys/modules/netgraph/tty/ng_tty.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_TTY 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_tty
.Nd netgraph node type that is also a line discipline
@@ -52,7 +52,7 @@ node type is both a netgraph node type and a line discipline.
A new node is created when the corresponding line discipline,
.Dv NETGRAPHDISC ,
is registered on a tty device (see
-.Xr tty 4 ")."
+.Xr tty 4 ) .
.Pp
The node has a single hook called
.Dv hook .
@@ -65,7 +65,9 @@ While the line discipline is installed on a tty, the normal
read and write operations are unavailable, returning
.Er EIO .
.Pp
-The node supports an optional ``hot character.'' If set to non-zero, incoming
+The node supports an optional
+.Dq hot character .
+If set to non-zero, incoming
data from the tty device is queued until this character is seen.
This avoids sending lots of mbufs containing a small number of bytes,
but introduces potentially infinite latency.
@@ -114,11 +116,12 @@ The
control message is not valid, and always returns the error
.Er EOPNOTSUPP .
.Sh BUGS
-The serial driver code also has a notion of a ``hot character.''
+The serial driver code also has a notion of a
+.Dq hot character .
Unfortunately, this value is statically defined in terms of the
line discipline and cannot be changed.
Therefore, if a hot character other than 0x7e (the default) is set for the
-.Nm tty
+.Nm
node, the node has no way to convey this information to the
serial driver, and sub-optimal performance may result.
.Sh SEE ALSO
@@ -127,5 +130,10 @@ serial driver, and sub-optimal performance may result.
.Xr tty 4 ,
.Xr ng_async 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/tty/ng_tty.8 b/sys/modules/netgraph/tty/ng_tty.8
index c3f0aa5..de4a4c2 100644
--- a/sys/modules/netgraph/tty/ng_tty.8
+++ b/sys/modules/netgraph/tty/ng_tty.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_TTY 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_tty
.Nd netgraph node type that is also a line discipline
@@ -52,7 +52,7 @@ node type is both a netgraph node type and a line discipline.
A new node is created when the corresponding line discipline,
.Dv NETGRAPHDISC ,
is registered on a tty device (see
-.Xr tty 4 ")."
+.Xr tty 4 ) .
.Pp
The node has a single hook called
.Dv hook .
@@ -65,7 +65,9 @@ While the line discipline is installed on a tty, the normal
read and write operations are unavailable, returning
.Er EIO .
.Pp
-The node supports an optional ``hot character.'' If set to non-zero, incoming
+The node supports an optional
+.Dq hot character .
+If set to non-zero, incoming
data from the tty device is queued until this character is seen.
This avoids sending lots of mbufs containing a small number of bytes,
but introduces potentially infinite latency.
@@ -114,11 +116,12 @@ The
control message is not valid, and always returns the error
.Er EOPNOTSUPP .
.Sh BUGS
-The serial driver code also has a notion of a ``hot character.''
+The serial driver code also has a notion of a
+.Dq hot character .
Unfortunately, this value is statically defined in terms of the
line discipline and cannot be changed.
Therefore, if a hot character other than 0x7e (the default) is set for the
-.Nm tty
+.Nm
node, the node has no way to convey this information to the
serial driver, and sub-optimal performance may result.
.Sh SEE ALSO
@@ -127,5 +130,10 @@ serial driver, and sub-optimal performance may result.
.Xr tty 4 ,
.Xr ng_async 8 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/vjc/ng_vjc.4 b/sys/modules/netgraph/vjc/ng_vjc.4
index c86be55..768dc80 100644
--- a/sys/modules/netgraph/vjc/ng_vjc.4
+++ b/sys/modules/netgraph/vjc/ng_vjc.4
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_VJC 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_vjc
.Nd Van Jacobsen compression netgraph node type
@@ -60,10 +60,14 @@ nodes represent the compressed side of the node. Packets received on the
.Dv ip
will be compressed or passed through as appropriate. Packets received
on the other three hooks will be uncompressed as appropriate.
-This node also supports ``always pass through'' mode in either direction.
+This node also supports
+.Dq always pass through
+mode in either direction.
.Pp
Van Jacobsen compression only applies to TCP packets.
-Only ``normal'' (i.e., common case) TCP packets are actually compressed.
+Only
+.Dq normal
+(i.e., common case) TCP packets are actually compressed.
These are output on the
.Dv vjcomp
hook. Other TCP packets are run through the state machine but not
@@ -138,7 +142,9 @@ and
hooks.
When a node is first created,
both compression and decompression are disabled and the node is
-therefore operating in bi-directional ``pass through'' mode.
+therefore operating in bi-directional
+.Dq pass through
+mode.
.Pp
When enabling compression,
.Dv maxChannel
@@ -155,7 +161,7 @@ message is immediately sent whenever this occurs.
This command returns the node's current state described by the
.Dv "struct slcompress"
structure, which is defined in
-.Dv "net/slcompress.h" .
+.Pa net/slcompress.h .
.It Dv NGM_VJC_CLR_STATS
Clears the node statistics counters. Statistics are also cleared whenever the
.Dv enableComp
@@ -185,9 +191,9 @@ both enabled. This of course resets the node state. This restriction
may be lifted in a later version.
.Pp
When built as a loadable kernel module, this module includes the file
-.Dv "net/slcompress.c" .
+.Pa net/slcompress.c .
Although loading the module should fail if
-.Dv "net/slcompress.c"
+.Pa net/slcompress.c
already exists in the kernel, currently it does not, and the duplicate
copies of the file do not interfere.
However, this may change in the future.
@@ -206,5 +212,10 @@ However, this may change in the future.
.%T "The PPP Internet Control Protocol (IPCP)"
.%O RFC 1332
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/sys/modules/netgraph/vjc/ng_vjc.8 b/sys/modules/netgraph/vjc/ng_vjc.8
index c86be55..768dc80 100644
--- a/sys/modules/netgraph/vjc/ng_vjc.8
+++ b/sys/modules/netgraph/vjc/ng_vjc.8
@@ -37,7 +37,7 @@
.\"
.Dd January 19, 1999
.Dt NG_VJC 8
-.Os FreeBSD 4.0
+.Os FreeBSD
.Sh NAME
.Nm ng_vjc
.Nd Van Jacobsen compression netgraph node type
@@ -60,10 +60,14 @@ nodes represent the compressed side of the node. Packets received on the
.Dv ip
will be compressed or passed through as appropriate. Packets received
on the other three hooks will be uncompressed as appropriate.
-This node also supports ``always pass through'' mode in either direction.
+This node also supports
+.Dq always pass through
+mode in either direction.
.Pp
Van Jacobsen compression only applies to TCP packets.
-Only ``normal'' (i.e., common case) TCP packets are actually compressed.
+Only
+.Dq normal
+(i.e., common case) TCP packets are actually compressed.
These are output on the
.Dv vjcomp
hook. Other TCP packets are run through the state machine but not
@@ -138,7 +142,9 @@ and
hooks.
When a node is first created,
both compression and decompression are disabled and the node is
-therefore operating in bi-directional ``pass through'' mode.
+therefore operating in bi-directional
+.Dq pass through
+mode.
.Pp
When enabling compression,
.Dv maxChannel
@@ -155,7 +161,7 @@ message is immediately sent whenever this occurs.
This command returns the node's current state described by the
.Dv "struct slcompress"
structure, which is defined in
-.Dv "net/slcompress.h" .
+.Pa net/slcompress.h .
.It Dv NGM_VJC_CLR_STATS
Clears the node statistics counters. Statistics are also cleared whenever the
.Dv enableComp
@@ -185,9 +191,9 @@ both enabled. This of course resets the node state. This restriction
may be lifted in a later version.
.Pp
When built as a loadable kernel module, this module includes the file
-.Dv "net/slcompress.c" .
+.Pa net/slcompress.c .
Although loading the module should fail if
-.Dv "net/slcompress.c"
+.Pa net/slcompress.c
already exists in the kernel, currently it does not, and the duplicate
copies of the file do not interfere.
However, this may change in the future.
@@ -206,5 +212,10 @@ However, this may change in the future.
.%T "The PPP Internet Control Protocol (IPCP)"
.%O RFC 1332
.Re
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/usr.sbin/ngctl/ngctl.8 b/usr.sbin/ngctl/ngctl.8
index 44b5402..11cf21f 100644
--- a/usr.sbin/ngctl/ngctl.8
+++ b/usr.sbin/ngctl/ngctl.8
@@ -40,7 +40,7 @@
.Nm ngctl
.Nd netgraph control utility
.Sh SYNOPSIS
-.Nm ngctl
+.Nm
.Op Fl d
.Op Fl f Ar filename
.Op Fl n Ar nodename
@@ -55,19 +55,21 @@ If no
.Fl f
flag is given, no
command is supplied on the command line, and standard input is a tty,
-.Nm ngctl
+.Nm
will enter interactive mode. Otherwise
-.Nm ngctl
+.Nm
will execute the supplied command(s) and exit immediately.
.Pp
Nodes can be created, removed, joined together, etc.
-ASCII formatted control messages can be sent to any node if that node
+.Tn ASCII
+formatted control messages can be sent to any node if that node
supports binary/ASCII control message conversion.
.Pp
In interactive mode,
.Nm
will display any control messages and data packets received by the socket node.
-In the case of control messages, the message arguments are displayed in ASCII
+In the case of control messages, the message arguments are displayed in
+.Tn ASCII
form if the originating node supports conversion.
.Pp
The options are as follows:
@@ -75,7 +77,9 @@ The options are as follows:
.It Fl f Ar nodeinfo
Read commands from the named file.
A single dash represents the standard input.
-Blank lines and lines starting with a ``#'' are ignored.
+Blank lines and lines starting with a
+.Dq #
+are ignored.
.It Fl n Ar nodename
Assign
.Em nodename
@@ -87,7 +91,7 @@ Increase the debugging verbosity level.
.El
.Sh COMMANDS
The currently supported commands in
-.Nm ngctl
+.Nm
are:
.Pp
.Bd -literal -offset indent -compact
@@ -107,8 +111,13 @@ types Show all installed node types
quit Exit program
.Ed
.Pp
-Some commands have aliases, e.g., ``ls'' is the same as ``list''.
-The ``help'' command displays the available
+Some commands have aliases, e.g.,
+.Dq ls
+is the same as
+.Dq list .
+The
+.Dq help
+command displays the available
commands, their usage and aliases, and a brief description.
.Sh EXIT VALUE
The
@@ -116,12 +125,14 @@ The
utility exits 0 on success, and >0 if an error occurs.
.Sh SEE ALSO
.Xr netgraph 3 ,
-.Xr netgraph 4 .
+.Xr netgraph 4 ,
.Xr nghook 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
.Sh HISTORY
The
-.Em netgraph
+.Nm netgraph
system was designed and first implemented at Whistle Communications, Inc. in
-a version FreeBSD 2.2 customized for the Whistle InterJet.
+a version
+.Fx 2.2
+customized for the Whistle InterJet.
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@whistle.com
diff --git a/usr.sbin/nghook/nghook.8 b/usr.sbin/nghook/nghook.8
index 33016b0..d501d8f 100644
--- a/usr.sbin/nghook/nghook.8
+++ b/usr.sbin/nghook/nghook.8
@@ -39,7 +39,7 @@
.Sh NAME
.Nm nghook
.Nd connect to a
-.Xr netgraph 8
+.Xr ng_socket 8
node
.Sh SYNOPSIS
.Nm
@@ -50,14 +50,16 @@ node
.Sh DESCRIPTION
.Nm
creates a
-.Xr netgraph 8
+.Xr ng_socket 8
socket type node and connects it to hook
.Ar hookname
of the node found at
.Ar path .
If
.Ar hookname
-is omitted, ``debug'' is assumed.
+is omitted,
+.Dq debug
+is assumed.
.Pp
At this point all data written to standard input is sent
to the node and all data received from the node is relayed
@@ -67,7 +69,8 @@ The options are as follows:
.Pp
.Bl -tag -width indent
.It Fl a
-Output each read packet in ASCII.
+Output each read packet in
+.Tn ASCII .
.It Fl d
Increase the debugging verbosity level.
.El
@@ -78,10 +81,12 @@ there's no way to control the packetization of the input.
.Xr netgraph 4 ,
.Xr netgraph 3 ,
.Xr ngctl 8 .
-.Sh AUTHOR
-Archie Cobbs <archie@whistle.com>
.Sh HISTORY
The
.Em netgraph
system was designed and first implemented at Whistle Communications, Inc.
-in a version FreeBSD 2.2 customized for the Whistle InterJet.
+in a version of
+.Fx 2.2
+customized for the Whistle InterJet.
+.Sh AUTHOR
+.An Archie Cobbs Aq archie@whistle.com
OpenPOWER on IntegriCloud