From owner-freebsd-doc@FreeBSD.ORG Wed May 12 11:00:39 2004 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5789F16A4CE for ; Wed, 12 May 2004 11:00:39 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1037A43D49 for ; Wed, 12 May 2004 11:00:38 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i4CI0b3S065694 for ; Wed, 12 May 2004 11:00:37 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4CI0bt5065691; Wed, 12 May 2004 11:00:37 -0700 (PDT) (envelope-from gnats) Resent-Date: Wed, 12 May 2004 11:00:37 -0700 (PDT) Resent-Message-Id: <200405121800.i4CI0bt5065691@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Michel Lavondes Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F16ED16A4CE for ; Wed, 12 May 2004 10:51:52 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0931443D46 for ; Wed, 12 May 2004 10:51:52 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i4CHppPw068978 for ; Wed, 12 May 2004 10:51:51 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i4CHpp1h068977; Wed, 12 May 2004 10:51:51 -0700 (PDT) (envelope-from nobody) Message-Id: <200405121751.i4CHpp1h068977@www.freebsd.org> Date: Wed, 12 May 2004 10:51:51 -0700 (PDT) From: Michel Lavondes To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: docs/66575: [patch] MFC share/man/man4/ng_ksocket.4 v 1.16 and 1.17 X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2004 18:00:39 -0000 >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: