docs/66575: [patch] MFC share/man/man4/ng_ksocket.4 v 1.16 and 1.17
Michel Lavondes
fox at vader.aacc.cc.md.us
Wed May 12 18:00:39 UTC 2004
>Number: 66575
>Category: docs
>Synopsis: [patch] MFC share/man/man4/ng_ksocket.4 v 1.16 and 1.17
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Wed May 12 11:00:37 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator: Michel Lavondes
>Release: FreeBSD 4.8-RELEASE-p13
>Organization:
Ecdysiasts United for Overdressing
>Environment:
>Description:
As far as I can tell, 1.16 and 1.17 weren't MFC'd.
>How-To-Repeat:
Compare the output of
man 4 ng_ksocket
on -current and -stable
>Fix:
Also available from http://www.livejournal.com/users/pauamma/2369.html
--- share/man/man4/ng_ksocket.4.orig Fri May 7 23:04:18 2004
+++ share/man/man4/ng_ksocket.4 Fri May 7 23:13:48 2004
@@ -47,10 +47,12 @@
.Nm ksocket
node is both a netgraph node and a
.Bx
-socket. The
+socket.
+The
.Nm
node type allows one to open a socket inside the kernel and have
-it appear as a Netgraph node. The
+it appear as a Netgraph node.
+The
.Nm
node type is the reverse of the socket node type (see
.Xr ng_socket 4 ) :
@@ -63,8 +65,10 @@
.Pp
A
.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
+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).
When the hook is disconnected and/or the node is shutdown, the
associated socket is closed.
@@ -80,7 +84,8 @@
are the decimal equivalent of the same arguments to
.Xr socket 2 .
Alternately, aliases for the commonly used values are accepted as
-well. For example
+well.
+For example
.Dv inet/dgram/udp
is a more readable but equivalent version of
.Dv 2/2/17 .
@@ -90,19 +95,22 @@
.It Dv NGM_KSOCKET_BIND
This functions exactly like the
.Xr bind 2
-system call. The
+system call.
+The
.Dv "struct sockaddr"
socket address parameter should be supplied as an argument.
.It Dv NGM_KSOCKET_LISTEN
This functions exactly like the
.Xr listen 2
-system call. The backlog paramter (a single 32 bit
+system call.
+The backlog parameter (a single 32 bit
.Dv int )
should be supplied as an argument.
.It Dv NGM_KSOCKET_CONNECT
This functions exactly like the
.Xr connect 2
-system call. The
+system call.
+The
.Dv "struct sockaddr"
destination address parameter should be supplied as an argument.
.It Dv NGM_KSOCKET_ACCEPT
@@ -110,13 +118,15 @@
.It Dv NGM_KSOCKET_GETNAME
Equivalent to the
.Xr getsockname 2
-system call. The name is returned as a
+system call.
+The name is returned as a
.Dv "struct sockaddr"
in the arguments field of the reply.
.It Dv NGM_KSOCKET_GETPEERNAME
Equivalent to the
.Xr getpeername 2
-system call. The name is returned as a
+system call.
+The name is returned as a
.Dv "struct sockaddr"
in the arguments field of the reply.
.It Dv NGM_KSOCKET_SETOPT
@@ -140,13 +150,15 @@
in the argument field, the normal
.Tn ASCII
equivalent of the C structure
-is an acceptable form. For the
+is an acceptable form.
+For the
.Dv PF_INET
and
.Dv PF_LOCAL
address families, a more convenient form is also used, which is
the protocol family name, followed by a slash, followed by the actual
-address. For
+address.
+For
.Dv PF_INET ,
the address is an IP address followed by an optional colon and port number.
For
@@ -167,7 +179,8 @@
.Dv "struct ng_ksocket_sockopt" ,
the normal
.Tn ASCII
-form for that structure is used. In the future, more
+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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-doc
mailing list